diff options
author | Paul Donald <newtwen+github@gmail.com> | 2024-07-23 15:18:07 +0200 |
---|---|---|
committer | Paul Donald <newtwen+github@gmail.com> | 2024-07-23 15:18:07 +0200 |
commit | 5ab0cb1f15bcb31015ae8345d302c6d023ba51e2 (patch) | |
tree | 134e2bbd887b4e81e620b8263ed6e4cfddc36040 /modules/luci-mod-network/htdocs/luci-static/resources | |
parent | e55f9d967a158fffed70c05ec03694bc73559a05 (diff) |
luci-mod-network: Correctly assign dnsmasq instance: name not number
Closes #7199
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Diffstat (limited to 'modules/luci-mod-network/htdocs/luci-static/resources')
-rw-r--r-- | modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js index 051e8d529c..4f6fe79385 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js @@ -101,7 +101,7 @@ function generateDnsmasqInstanceEntry(data) { } formatString += ')'; - return nameValueMap.get('.name'), formatString; + return [nameValueMap.get('.name'), formatString]; } function getDHCPPools() { @@ -830,8 +830,8 @@ return view.extend({ so.optional = true; Object.values(L.uci.sections('dhcp', 'dnsmasq')).forEach(function(val, index) { - var name, display_str = generateDnsmasqInstanceEntry(val); - so.value(index, display_str); + var [name, display_str] = generateDnsmasqInstanceEntry(val); + so.value(name, display_str); }); o = s.taboption('dnsrecords', form.SectionValue, '__dnsrecords__', form.TypedSection, '__dnsrecords__'); @@ -1125,8 +1125,8 @@ return view.extend({ so.optional = true; Object.values(L.uci.sections('dhcp', 'dnsmasq')).forEach(function(val, index) { - var name, display_str = generateDnsmasqInstanceEntry(val); - so.value(index, display_str); + var [name, display_str] = generateDnsmasqInstanceEntry(val); + so.value(name, display_str); }); |