From 8ff9cc387b124f01cf12c61519bc0999968639f9 Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 16 Jul 2013 15:08:58 -0400 Subject: Make mbufs update via ajax --- usr/local/www/javascript/index/ajax.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'usr/local/www/javascript/index') diff --git a/usr/local/www/javascript/index/ajax.js b/usr/local/www/javascript/index/ajax.js index 5cae407..d2a6536 100644 --- a/usr/local/www/javascript/index/ajax.js +++ b/usr/local/www/javascript/index/ajax.js @@ -43,6 +43,7 @@ function stats(x) { updateGatewayStats(values[8]); updateCpuFreq(values[9]); updateLoadAverage(values[10]); + updateMbuf(values[11]); } function updateMemory(x) { @@ -54,6 +55,15 @@ function updateMemory(x) { jQuery("#memwidthb").css('width', (100 - x) + 'px'); } +function updateMbuf(x) { + if(jQuery('#mbufusagemeter')) + jQuery("#mbufusagemeter").html(x + '%'); + if(jQuery('#mbufwidtha')) + jQuery("#mbufwidtha").css('width',x + 'px'); + if(jQuery('#mbufwidthb')) + jQuery("#mbufwidthb").css('width', (100 - x) + 'px'); +} + function updateCPU(x) { if(jQuery('#cpumeter')) jQuery("#cpumeter").html(x + '%'); -- cgit v1.1