diff options
author | Dirk Brenken <dev@brenken.org> | 2019-09-09 16:51:42 +0200 |
---|---|---|
committer | Dirk Brenken <dev@brenken.org> | 2019-09-09 16:51:42 +0200 |
commit | f21f4bd7e5cf74bb37c2acc35d0bb8aea489cf3f (patch) | |
tree | 7bc1ede395bc5cf1c645c5ed1e94c3a6987dd6a3 /applications/luci-app-banip/luasrc/view | |
parent | dffe9ca0a4dffce5ae3df617e67cb69acccca01b (diff) |
luci-app-banip: sync with banIP 0.2.0
* see details in package PR
Signed-off-by: Dirk Brenken <dev@brenken.org>
Diffstat (limited to 'applications/luci-app-banip/luasrc/view')
-rw-r--r-- | applications/luci-app-banip/luasrc/view/banip/runtime.htm | 50 |
1 files changed, 42 insertions, 8 deletions
diff --git a/applications/luci-app-banip/luasrc/view/banip/runtime.htm b/applications/luci-app-banip/luasrc/view/banip/runtime.htm index 410528130c..44682206b7 100644 --- a/applications/luci-app-banip/luasrc/view/banip/runtime.htm +++ b/applications/luci-app-banip/luasrc/view/banip/runtime.htm @@ -10,16 +10,23 @@ This is free software, licensed under the Apache License, Version 2.0 { var btn1 = document.getElementById("btn1"); var btn1_running = document.getElementById("btn1_running"); + var btn2 = document.getElementById("btn2"); + var btn2_running = document.getElementById("btn2_running"); var view = document.getElementById("value_1"); var input = json.data.status; - btn1.value = "<%:Reload%>"; - btn1.name = "do_reload"; + btn1.value = "<%:Refresh%>"; + btn1.name = "do_refresh"; + + btn2.value = "<%:Reload%>"; + btn2.name = "do_reload"; view.innerHTML = input || "-"; if (input != "running") { btn1.disabled = false; running(btn1_running, 0); + btn2.disabled = false; + running(btn2_running, 0); } view = document.getElementById("value_2"); input = json.data.version; @@ -31,6 +38,9 @@ This is free software, licensed under the Apache License, Version 2.0 input = json.data.ipset_info; view.innerHTML = input || "-"; view = document.getElementById("value_5"); + input = json.data.backup_dir; + view.innerHTML = input || "-"; + view = document.getElementById("value_6"); input = json.data.last_run; view.innerHTML = input || "-"; } @@ -39,10 +49,21 @@ function btn_action(action) { var btn1 = document.getElementById("btn1"); var btn1_running = document.getElementById("btn1_running"); + var btn2 = document.getElementById("btn2"); + var btn2_running = document.getElementById("btn2_running"); - btn1.disabled = true; - running(btn1_running, 1); - + if (action.name === "do_refresh") + { + btn1.disabled = true; + btn2.disabled = true; + running(btn1_running, 1); + } + else if (action.name === "do_reload") + { + btn1.disabled = true; + btn2.disabled = true; + running(btn2_running, 1); + } new XHR.get('<%=luci.dispatcher.build_url("admin", "services", "banip")%>/action/' + action.name, null, function(x) { @@ -114,17 +135,30 @@ function btn_action(action) </div> </div> <div class="cbi-value" id="status_5"> - <label class="cbi-value-title" for="status_5"><%:Last Run%></label> + <label class="cbi-value-title" for="status_5"><%:Backup Directory%></label> <div class="cbi-value-field"> <span class="runtime" id="value_5">-</span> </div> </div> +<div class="cbi-value" id="status_6"> + <label class="cbi-value-title" for="status_6"><%:Last Run%></label> + <div class="cbi-value-field"> + <span class="runtime" id="value_6">-</span> + </div> +</div> <hr /> <div class="cbi-value" id="button_1"> - <label class="cbi-value-title" for="button_1"><%:Reload IPSets%></label> + <label class="cbi-value-title" for="button_1"><%:Refresh IPSets%></label> <div class="cbi-value-field"> - <input class="cbi-button cbi-button-apply" id="btn1" type="button" name="do_reload" value="<%:Reload%>" onclick="btn_action(this)" /> + <input class="cbi-button cbi-button-apply" id="btn1" type="button" name="do_refresh" value="<%:Refresh%>" onclick="btn_action(this)" /> <span id="btn1_running" class="btn_running"></span> </div> </div> +<div class="cbi-value" id="button_2"> + <label class="cbi-value-title" for="button_2"><%:Reload IPSet Sources%></label> + <div class="cbi-value-field"> + <input class="cbi-button cbi-button-reset" id="btn2" type="button" name="do_reload" value="<%:Reload%>" onclick="btn_action(this)" /> + <span id="btn2_running" class="btn_running"></span> + </div> +</div> |