luci-app-commands public links wrong
Username: Warren Linton
Origin: https://bugs.openwrt.org/index.php?do=details&task_id=184
Using the luci-app-command part of luci works well for the most part. However, there is an error in the links for public commands.
When hitting the “Link” button on the dashboard page, it returns a link in the form below:
“Access command with
http://192.168.1.1/cgi-bin/luci/admin/system/commandscommand/cfg089944
”
It should read:
“Access command with
http://192.168.1.1/cgi-bin/luci/command/cfg089944
”
The error appears to be in /usr/lib/lua/luci/view/commands.htm at line 113
var link = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + location.pathname.split(';')[0] + 'command/' + id + (args ? '/' + args : '');
It perhaps should read (and please pardon my lack of programming ability...)
var link = location.protocol + '//' + location.hostname + (location.port ? ':' + location.port : '') + location.pathname.split('luci/')[0] + 'luci/command/' + id + (args ? '/' + args : '');