luci-app-keepalived: add missing variable declarations
authorDaniel Nilsson <dannil+github@protonmail.com>
Wed, 8 Jan 2025 19:11:28 +0000 (20:11 +0100)
committerDaniel Nilsson <dannil+github@protonmail.com>
Wed, 8 Jan 2025 19:20:13 +0000 (20:20 +0100)
Signed-off-by: Daniel Nilsson <dannil+github@protonmail.com>
applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/script.js
applications/luci-app-keepalived/htdocs/luci-static/resources/view/keepalived/servers.js

index 99d5af29f2ee9078e77b1895544ab22f1bd092e5..c92d48a3c13d80d427abddcc0e3d077567536c10 100644 (file)
@@ -34,7 +34,7 @@ return view.extend({
                o.optional = false;
                o.rmempty = false;
                if (vrrp_scripts != '') {
-                       for (i = 0; i < vrrp_scripts.length; i++) {
+                       for (let i = 0; i < vrrp_scripts.length; i++) {
                                o.value(vrrp_scripts[i]['name']);
                        }
                }
index 1756f4b9fa8c1732b4ca1e9793d3d7a2a1f38bc3..744a0f8aca6842341cc18fa0dc8877bcd67aff7b 100644 (file)
@@ -52,7 +52,7 @@ return view.extend({
                real_servers = uci.sections('keepalived', 'real_server');
                o = s.taboption('general', form.DynamicList, 'real_server', _('Real Server'));
                if (real_servers != '') {
-                       for (i = 0; i < real_servers.length; i++) {
+                       for (let i = 0; i < real_servers.length; i++) {
                                o.value(real_servers[i]['name']);
                        }
                }