diff options
Diffstat (limited to 'web/js')
-rw-r--r-- | web/js/nms-dhcp.js | 17 | ||||
-rw-r--r-- | web/js/nms.js | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/web/js/nms-dhcp.js b/web/js/nms-dhcp.js new file mode 100644 index 0000000..b852a45 --- /dev/null +++ b/web/js/nms-dhcp.js @@ -0,0 +1,17 @@ +"use strict"; + +var nmsDhcp = nmsDhcp || { + +} + +nmsDhcp.init = function() { + nmsData.addHandler("dhcpsummary", "nmsDhcpHandler", nmsDhcp.updateSummary); +} + +nmsDhcp.updateSummary = function() { + var e = document.getElementById("dhcp-summary"); + if (e == undefined) { + return; + } + e.innerHTML = nmsData.dhcpsummary.dhcp.clients + " clients"; +} diff --git a/web/js/nms.js b/web/js/nms.js index 9727c09..dc9ba96 100644 --- a/web/js/nms.js +++ b/web/js/nms.js @@ -398,6 +398,7 @@ function initNMS() { detectHandler(); setupKeyhandler(); nmsSearch.init(); + nmsDhcp.init(); } function detectHandler() { |