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
-----
* 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
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] = [];
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 () {
if (!this.isUpdating) {
return;

View File

@ -71,7 +71,10 @@
if (this.coordinator) {
dashboard = this.coordinator.get('name');
// 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,
database: window.App.arangoDatabase,
serverToShow: {
@ -85,7 +88,10 @@
// db server
var attributes = this.dbServer.toJSON();
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,
database: window.App.arangoDatabase,
serverToShow: {