From: Jo-Philipp Wich Date: Wed, 30 Jun 2021 15:26:07 +0000 (+0200) Subject: luci-mod-status: don't set '-' hostname when creating static lease X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e3357deb7d273b6a982dfaf9800c83eba85fe6b2;p=project%2Fluci.git luci-mod-status: don't set '-' hostname when creating static lease Fixes: #5153 Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js index 9b40e23b5e..69305a2a9c 100644 --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/40_dhcp.js @@ -31,7 +31,7 @@ return baseclass.extend({ ev.currentTarget.blur(); var cfg = uci.add('dhcp', 'host'); - uci.set('dhcp', cfg, 'name', lease.hostname || '-'); + uci.set('dhcp', cfg, 'name', lease.hostname); uci.set('dhcp', cfg, 'ip', lease.ipaddr); uci.set('dhcp', cfg, 'mac', lease.macaddr.toUpperCase()); @@ -48,7 +48,7 @@ return baseclass.extend({ var cfg = uci.add('dhcp', 'host'), ip6arr = lease.ip6addrs[0] ? validation.parseIPv6(lease.ip6addrs[0]) : null; - uci.set('dhcp', cfg, 'name', lease.hostname || '-'); + uci.set('dhcp', cfg, 'name', lease.hostname); uci.set('dhcp', cfg, 'duid', lease.duid.toUpperCase()); uci.set('dhcp', cfg, 'mac', lease.macaddr); if (ip6arr)