aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2017-02-10 12:39:33 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2017-02-10 12:39:33 +0300
commit0c1deefc15039d4194e668af0e5cb8766cdc360c (patch)
treef607da75116f04069b4d8d76f84db59c3bb92d52 /interface
parentf09750119bc4f04a78c713a720077f64e2923dde (diff)
downloadrspamd-0c1deefc15039d4194e668af0e5cb8766cdc360c.tar.gz
rspamd-0c1deefc15039d4194e668af0e5cb8766cdc360c.zip
[WebUI] Add basic cluster support to Throughput tab
Diffstat (limited to 'interface')
-rw-r--r--interface/js/app/graph.js12
-rw-r--r--interface/js/app/rspamd.js4
2 files changed, 12 insertions, 4 deletions
diff --git a/interface/js/app/graph.js b/interface/js/app/graph.js
index 3ff73956d..4ab3e2c13 100644
--- a/interface/js/app/graph.js
+++ b/interface/js/app/graph.js
@@ -150,7 +150,7 @@ function($, D3Evolution, unused) {
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();
}
@@ -163,10 +163,18 @@ function($, D3Evolution, unused) {
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
diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index 98e6f5429..576eda13b 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -93,14 +93,14 @@ define(['jquery', 'd3pie', 'visibility', 'app/stats', 'app/graph', 'app/config',
});
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":