1
0
Fork 0

fixes the ui dashboard statistics in cluster environment (#6917)

This commit is contained in:
Heiko 2018-10-17 15:52:57 +02:00 committed by Jan
parent 5ac19b9005
commit 477a90d2f7
3 changed files with 19 additions and 3 deletions

View File

@ -1,6 +1,10 @@
devel devel
----- -----
* The single database or single coordinator statistics in a cluster
environment within the Web UI sometimes got called way too often.
This caused artifacts in the graphs, which is now fixed.
* An aardvark statistics route could not collect and sum up the statistics of * An aardvark statistics route could not collect and sum up the statistics of
all coordinators if one of them was ahead and had more results than the others all coordinators if one of them was ahead and had more results than the others

View File

@ -759,7 +759,7 @@
self.history[self.server][figure] = []; self.history[self.server][figure] = [];
for (i = 0; i < d.times.length; ++i) { for (i = 0; i < d.times.length; ++i) {
self.mergeDygraphHistory(d, i, true); self.mergeDygraphHistory(d, i);
} }
} }
); );
@ -1069,6 +1069,12 @@
); );
}, },
clearInterval: function () {
if (this.timer) {
clearInterval(this.timer);
}
},
resize: function () { resize: function () {
if (!this.isUpdating) { if (!this.isUpdating) {
return; return;

View File

@ -71,7 +71,10 @@
if (this.coordinator) { if (this.coordinator) {
dashboard = this.coordinator.get('name'); dashboard = this.coordinator.get('name');
// coordinator // coordinator
this.dashboards[this.coordinator.get('name')] = new window.DashboardView({ if (this.dashboards[dashboard]) {
this.dashboards[dashboard].clearInterval();
}
this.dashboards[dashboard] = new window.DashboardView({
dygraphConfig: window.dygraphConfig, dygraphConfig: window.dygraphConfig,
database: window.App.arangoDatabase, database: window.App.arangoDatabase,
serverToShow: { serverToShow: {
@ -85,7 +88,10 @@
// db server // db server
var attributes = this.dbServer.toJSON(); var attributes = this.dbServer.toJSON();
dashboard = attributes.name; dashboard = attributes.name;
this.dashboards[attributes.name] = new window.DashboardView({ if (this.dashboards[dashboard]) {
this.dashboards[dashboard].clearInterval();
}
this.dashboards[dashboard] = new window.DashboardView({
dygraphConfig: null, dygraphConfig: null,
database: window.App.arangoDatabase, database: window.App.arangoDatabase,
serverToShow: { serverToShow: {