diff --git a/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/tools.js b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/tools.js index c1f99b5..5eeb5b0 100644 --- a/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/tools.js +++ b/luci-app-ruantiblock/htdocs/luci-static/resources/view/ruantiblock/tools.js @@ -202,7 +202,7 @@ return baseclass.extend({ }, load: function() { - return fs.read(this.file); + return L.resolveDefault(fs.read(this.file), ''); }, render: function(content) { @@ -219,7 +219,7 @@ return baseclass.extend({ 'wrap': 'off', 'spellcheck': 'false', }, - content || '') + content) ) ), ]), diff --git a/luci-app-ruantiblock/root/usr/share/luci/menu.d/luci-app-ruantiblock.json b/luci-app-ruantiblock/root/usr/share/luci/menu.d/luci-app-ruantiblock.json index 428e565..e187bd3 100644 --- a/luci-app-ruantiblock/root/usr/share/luci/menu.d/luci-app-ruantiblock.json +++ b/luci-app-ruantiblock/root/usr/share/luci/menu.d/luci-app-ruantiblock.json @@ -1,63 +1,63 @@ { - "admin/services/ruantiblock": { - "title": "Ruantiblock", - "order": 60, - "action": { - "type": "alias", - "path": "admin/services/ruantiblock/service" - }, - "depends": { - "acl": [ "luci-app-ruantiblock" ], - "fs": { - "/usr/bin/ruantiblock": "executable", - "/etc/init.d/ruantiblock": "executable" - }, - "uci": { "ruantiblock": true } - } - }, + "admin/services/ruantiblock": { + "title": "Ruantiblock", + "order": 60, + "action": { + "type": "alias", + "path": "admin/services/ruantiblock/service" + }, + "depends": { + "acl": [ "luci-app-ruantiblock" ], + "fs": { + "/usr/bin/ruantiblock": "executable", + "/etc/init.d/ruantiblock": "executable" + }, + "uci": { "ruantiblock": true } + } + }, - "admin/services/ruantiblock/service": { - "title": "Service", - "order": 10, - "action": { - "type": "view", - "path": "ruantiblock/service" - } - }, + "admin/services/ruantiblock/service": { + "title": "Service", + "order": 10, + "action": { + "type": "view", + "path": "ruantiblock/service" + } + }, - "admin/services/ruantiblock/settings": { - "title": "Settings", - "order": 20, - "action": { - "type": "view", - "path": "ruantiblock/settings" - } - }, + "admin/services/ruantiblock/settings": { + "title": "Settings", + "order": 20, + "action": { + "type": "view", + "path": "ruantiblock/settings" + } + }, - "admin/services/ruantiblock/cron": { - "title": "Blacklist updates", - "order": 30, - "action": { - "type": "view", - "path": "ruantiblock/cron" - } - }, + "admin/services/ruantiblock/cron": { + "title": "Blacklist updates", + "order": 30, + "action": { + "type": "view", + "path": "ruantiblock/cron" + } + }, - "admin/services/ruantiblock/info": { - "title": "Statistics", - "order": 40, - "action": { - "type": "view", - "path": "ruantiblock/info" - } - }, + "admin/services/ruantiblock/info": { + "title": "Statistics", + "order": 40, + "action": { + "type": "view", + "path": "ruantiblock/info" + } + }, - "admin/services/ruantiblock/log": { - "title": "Log", - "order": 50, - "action": { - "type": "view", - "path": "ruantiblock/log" - } - } + "admin/services/ruantiblock/log": { + "title": "Log", + "order": 50, + "action": { + "type": "view", + "path": "ruantiblock/log" + } + } } diff --git a/luci-app-ruantiblock/root/usr/share/rpcd/acl.d/luci-app-ruantiblock.json b/luci-app-ruantiblock/root/usr/share/rpcd/acl.d/luci-app-ruantiblock.json index d401b2c..3a2cba8 100644 --- a/luci-app-ruantiblock/root/usr/share/rpcd/acl.d/luci-app-ruantiblock.json +++ b/luci-app-ruantiblock/root/usr/share/rpcd/acl.d/luci-app-ruantiblock.json @@ -4,7 +4,7 @@ "read": { "cgi-io": [ "exec" ], "file": { - "/usr/bin": [ "list" ], + "/usr/libexec/ruantiblock": [ "list" ], "/etc/ruantiblock/fqdn_filter": [ "read" ], "/etc/ruantiblock/ip_filter": [ "read" ], "/etc/ruantiblock/user_entries": [ "read" ],