summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-commands/luasrc/view/commands.htm
diff options
context:
space:
mode:
authorDaniel Dickinson <cshoredaniel@users.noreply.github.com>2017-01-20 18:00:42 -0500
committerGitHub <noreply@github.com>2017-01-20 18:00:42 -0500
commite1edb1025cd9e35b3617c20a1117a348971c0421 (patch)
tree8f54e7471b81c82bdf1bb4b0b3bafcb6e5bf362b /applications/luci-app-commands/luasrc/view/commands.htm
parent9b7a5a477a707164d07d17a65acd5a1ac78845db (diff)
parent077ac32635dc0048a684ee0a40345a262e661ecc (diff)
Merge pull request #768 from t123yh/app_commands_nodownload
luci-app-commands: allow executing without downloading on public links
Diffstat (limited to 'applications/luci-app-commands/luasrc/view/commands.htm')
-rw-r--r--applications/luci-app-commands/luasrc/view/commands.htm15
1 files changed, 9 insertions, 6 deletions
diff --git a/applications/luci-app-commands/luasrc/view/commands.htm b/applications/luci-app-commands/luasrc/view/commands.htm
index 73b9e6a2ce..f094e186d4 100644
--- a/applications/luci-app-commands/luasrc/view/commands.htm
+++ b/applications/luci-app-commands/luasrc/view/commands.htm
@@ -108,16 +108,19 @@
if (legend && output)
{
- var link = location.protocol + '//' + location.hostname +
+ var prefix = location.protocol + '//' + location.hostname +
(location.port ? ':' + location.port : '') +
- location.pathname.split(';')[0] + 'command/' +
- id + (args ? '/' + args : '');
-
+ location.pathname.split(';')[0] + 'command/';
+ var suffix = (args ? '/' + args : '');
+
+ var link = prefix + id + suffix;
+ var link_nodownload = prefix + id + "s" + suffix;
+
legend.style.display = 'none';
output.parentNode.style.display = 'block';
output.innerHTML = String.format(
- '<div class="alert-message"><%:Access command with%> <a href="%s">%s</a></div>',
- link, link
+ '<div class="alert-message"><p><%:Download execution result%> <a href="%s">%s</a></p><p><%:Or display result%> <a href="%s">%s</a></p></div>',
+ link, link, link_nodownload, link_nodownload
);
location.hash = '#output';