没有合适的资源?快使用搜索试试~ 我知道了~
Luci-Api手册 - 英文.pdf
需积分: 15 24 下载量 112 浏览量
2020-05-27
15:39:49
上传
评论
收藏 837KB PDF 举报
温馨提示
试读
142页
luci官网一直无法访问,找不到相应的官方API文档,现提供自己亲自整理的一篇API文档,供大家参考使用。
资源推荐
资源详情
资源评论
1
LUCI-APIs-Reference
OverView
Class luci.dispatcher
Functions
_ ()
No-op function used to mark translation entries for
menu labels.
alias (...)
Create a redirect to another dispatching node.
arcombine (trg1, trg2)
Create a combined dispatching target for non argv
and argv requests.
assign (path, clone, title, order)
Clone a node of the dispatching tree to another
2
position.
build_url (...)
Build the URL relative to the server webroot from
given virtual path.
call (name, ...)
Create a function-call dispatching target.
cbi (model)
Create a CBI model dispatching target.
createindex ()
Generate the dispatching index using the native
file-cache based strategy.
createtree ()
Create the dispatching tree from the index.
dispatch (request)
Dispatches a LuCI virtual path.
entry (path, target, title, order)
Create a new dispatching node and define common
parameters.
error404 (message)
Send a 404 error code and render the "error404"
template if available.
error500 (message)
Send a 500 error code and render the "error500"
template if available.
firstchild ()
Alias the first (lowest order) page automatically
form (model)
Create a CBI form model dispatching target.
get (...)
Fetch or create a dispatching node without setting
the target module or enabling the node.
httpdispatch (request)
Dispatch an HTTP request.
lookup (...)
Lookup node in dispatching tree.
node (...)
Fetch or create a new dispatching node.
node_childs (node)
Return a sorted table of visible children within a
given node
node_visible (node)
Check whether a dispatch node shall be visible
rewrite (n, ...)
Rewrite the first x path values of the request.
template (name)
Create a template render dispatching target.
translate (text)
Access the luci.i18n translate() api.
Functions
_ ()
No-op function used to mark translation entries for menu labels.
This function does not actually translate the given argument but
is used by build/i18n-scan.pl to find translatable entries.
3
alias (...)
Create a redirect to another dispatching node.
Parameters
...: Virtual path destination
arcombine (trg1, trg2)
Create a combined dispatching target for non argv and argv requests.
Parameters
trg1: Overview Target
trg2: Detail Target
assign (path, clone, title, order)
Clone a node of the dispatching tree to another position.
Parameters
path: Virtual path destination
clone: Virtual path source
title: Destination node title (optional)
order: Destination node order value (optional)
Return value:
Dispatching tree node
build_url (...)
Build the URL relative to the server webroot from given virtual
path.
Parameters
...: Virtual path
Return value:
Relative URL
call (name, ...)
Create a function-call dispatching target.
Parameters
name: Target function of local controller
...: Additional parameters passed to the function
cbi (model)
4
Create a CBI model dispatching target.
Parameters
model: CBI model to be rendered
createindex ()
Generate the dispatching index using the native file-cache based
strategy.
createtree ()
Create the dispatching tree from the index. Build the index before
if it does not exist yet.
dispatch (request)
Dispatches a LuCI virtual path.
Parameters
request: Virtual path
entry (path, target, title, order)
Create a new dispatching node and define common parameters.
Parameters
path: Virtual path
target: Target function to call when dispatched.
title: Destination node title
order: Destination node order value (optional)
Return value:
Dispatching tree node
error404 (message)
Send a 404 error code and render the "error404" template if
available.
Parameters
message: Custom error message (optional)
Return value:
false
error500 (message)
Send a 500 error code and render the "error500" template if
available.
Parameters
5
message: Custom error message (optional)#
Return value:
false
firstchild ()
Alias the first (lowest order) page automatically
form (model)
Create a CBI form model dispatching target.
Parameters
model: CBI form model tpo be rendered
get (...)
Fetch or create a dispatching node without setting the target module
or enabling the node.
Parameters
...: Virtual path
Return value:
Dispatching tree node
httpdispatch (request)
Dispatch an HTTP request.
Parameters
request: LuCI HTTP Request object
lookup (...)
Lookup node in dispatching tree.
Parameters
...: Virtual path
Return value:
Node object, canonical url or nil if the path was not found.
node (...)
Fetch or create a new dispatching node.
Parameters
...: Virtual path
剩余141页未读,继续阅读
资源评论
fager漫长路
- 粉丝: 123
- 资源: 5
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Python实现的自动化办公项目.zip
- 基于python实现的基于PyQt5和爬虫的小说阅读系统.zip
- 机械设计整经机上纱自动化sw20非常好的设计图纸100%好用.zip
- Screenshot_20240427_031602.jpg
- 网页PDF_2024年04月26日 23-46-14_QQ浏览器网页保存_QQ浏览器转格式(6).docx
- 直接插入排序,冒泡排序,直接选择排序.zip
- 在排序2的基础上,再次对快排进行优化,其次增加快排非递归,归并排序,归并排序非递归版.zip
- 实现了7种排序算法.三种复杂度排序.三种nlogn复杂度排序(堆排序,归并排序,快速排序)一种线性复杂度的排序.zip
- 冒泡排序 直接选择排序 直接插入排序 随机快速排序 归并排序 堆排序.zip
- 课设-内部排序算法比较 包括冒泡排序、直接插入排序、简单选择排序、快速排序、希尔排序、归并排序和堆排序.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功