From 1cc733abf69cae25bfb3d7015884a95428e0f849 Mon Sep 17 00:00:00 2001 From: Kristian Lyngstol Date: Thu, 30 Jun 2016 08:14:38 +0200 Subject: Add DHCP-based client counter in front-end --- web/js/nms-dhcp.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 web/js/nms-dhcp.js (limited to 'web/js/nms-dhcp.js') 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"; +} -- cgit v1.2.3