diff options
author | Kristian Lyngstol <kly@kly.no> | 2016-06-30 08:14:38 +0200 |
---|---|---|
committer | Kristian Lyngstol <kly@kly.no> | 2016-06-30 08:14:38 +0200 |
commit | 1cc733abf69cae25bfb3d7015884a95428e0f849 (patch) | |
tree | cb157bc70c8660f1a97bf546e4b07ea548751d62 /web/js/nms-dhcp.js | |
parent | 25bda93e085c809d021adfa588b08fbce00ad7ee (diff) |
Add DHCP-based client counter in front-end
Diffstat (limited to 'web/js/nms-dhcp.js')
-rw-r--r-- | web/js/nms-dhcp.js | 17 |
1 files changed, 17 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"; +} |