luci-0.11: merge outstanding trunk changes
[project/luci.git] / applications / luci-commands / luasrc / model / cbi / commands.lua
1 --[[
2 LuCI - Lua Configuration Interface
3
4 Copyright 2012 Jo-Philipp Wich <jow@openwrt.org>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 ]]--
13
14 local m, s
15
16 m = Map("luci", translate("Custom Commands"),
17 translate("This page allows you to configure custom shell commands which can be easily invoked from the web interface."))
18
19 s = m:section(TypedSection, "command", "")
20 s.template = "cbi/tblsection"
21 s.anonymous = true
22 s.addremove = true
23
24
25 s:option(Value, "name", translate("Description"),
26 translate("A short textual description of the configured command"))
27
28 s:option(Value, "command", translate("Command"),
29 translate("Command line to execute"))
30
31 s:option(Flag, "param", translate("Custom arguments"),
32 translate("Allow the user to provide additional command line arguments"))
33
34 s:option(Flag, "public", translate("Public access"),
35 translate("Allow executing the command and downloading its output without prior authentication"))
36
37 return m