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));
})
})
}