NCPA Adding Custom Data to the Web Page
Posted: Sun Nov 02, 2014 8:00 am
What do I need to know in order to add custom data on the web page for NCPA on a host. I am working with a company that wants to add serveral custom graphics for data on the web page.
I can see in the source that there are several functions that create the current data. Can I just write a custom function and add it to this page:
Any information on what I need to do would be helpful....
I can see in the source that there are several functions that create the current data. Can I just write a custom function and add it to this page:
Code: Select all
function load_interface() {
var interface_div = $('#interface');
var INTERFACE_API = '/api/interface/';
var INTERFACE_BASE = '/graph/interface/';
var metrics = ['bytes_recv', 'bytes_sent'];
$.getJSON(INTERFACE_API, function(d) {
$.each(d.value['interface'], function(key) {
var sent = INTERFACE_BASE + key + '/bytes_sent?delta=1&unit=K';
var recv = INTERFACE_BASE + key + '/bytes_recv?delta=1&unit=K';
interface_div.append($('<div>').load(sent));
interface_div.append($('<div>').load(recv));
})
})
}