diff options
Diffstat (limited to 'applications/luci-app-commands/htdocs/luci-static/resources/view')
-rw-r--r-- | applications/luci-app-commands/htdocs/luci-static/resources/view/commands.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/applications/luci-app-commands/htdocs/luci-static/resources/view/commands.js b/applications/luci-app-commands/htdocs/luci-static/resources/view/commands.js new file mode 100644 index 0000000000..6d369733c6 --- /dev/null +++ b/applications/luci-app-commands/htdocs/luci-static/resources/view/commands.js @@ -0,0 +1,34 @@ +'use strict'; + +'require view'; +'require form'; + +return view.extend({ + render: function(data) { + var m, s, o; + + m = new form.Map('luci', _('Custom Commands'), + _('This page allows you to configure custom shell commands which can be easily invoked from the web interface.')); + + s = m.section(form.GridSection, 'command'); + s.nodescriptions = true; + s.anonymous = true; + s.addremove = true; + + o = s.option(form.Value, 'name', _('Description'), + _('A short textual description of the configured command')); + + o = s.option(form.Value, 'command', _('Command'), _('Command line to execute')); + o.textvalue = function(section_id) { + return E('code', [ this.cfgvalue(section_id) ]); + }; + + o = s.option(form.Flag, 'param', _('Custom arguments'), + _('Allow the user to provide additional command line arguments')); + + o = s.option(form.Flag, 'public', _('Public access'), + _('Allow executing the command and downloading its output without prior authentication')); + + return m.render(); + } +}); |