var interface = {};
- interface.draw = function(rspamd, graphs, checked_server, type) {
+ interface.draw = function(rspamd, graphs, neighbours, checked_server, type) {
if (graphs.graph === undefined) {
graphs.graph = initGraph();
}
type = getSelector("selData");
}
+ if (checked_server === "All SERVERS") {
+ rspamd.alertMessage('alert-error', 'Data consolidation is not implemented yet');
+ graphs.graph.data();
+ graphs.rrd_pie.destroy();
+ drawRrdTable([]);
+ return;
+ }
+
$.ajax({
dataType: 'json',
type: 'GET',
- url: 'graph',
+ url: neighbours[checked_server].url + 'graph',
jsonp: false,
data: {
"type": type
});
break;
case "#throughput_nav":
- tab_graph.draw(interface, graphs, checked_server, selData);
+ tab_graph.draw(interface, graphs, neighbours, checked_server, selData);
var autoRefresh = {
hourly: 60000,
daily: 300000
};
timer_id.throughput = Visibility.every(autoRefresh[selData] || 3600000, function () {
- tab_graph.draw(interface, graphs, checked_server, selData);
+ tab_graph.draw(interface, graphs, neighbours, checked_server, selData);
});
break;
case "#configuration_nav":