if (legend && output)
{
- var prefix = location.protocol + '//' + location.hostname +
- (location.port ? ':' + location.port : '') +
- location.pathname.split(';')[0] + 'command/';
+ var prefix = location.protocol + '//' + location.host + '<%=url('command')%>/';
var suffix = (args ? '/' + args : '');
var link = prefix + id + suffix;
uci:foreach("luci", "command", function(s) commands[#commands+1] = s end)
%>
-<form method="get" action="<%=pcdata(luci.http.getenv("REQUEST_URI"))%>">
+<form method="get" action="<%=pcdata(FULL_REQUEST_URI)%>">
<div class="cbi-map">
<h2 name="content"><%:Custom Commands%></h2>