8000 fixes the ui dashboard statistics in cluster environment (#6917) · mnemosdev/arangodb@477a90d · GitHub
[go: up one dir, main page]

Skip to content

Commit 477a90d

Browse files
hkernbachjsteemann
authored andcommitted
fixes the ui dashboard statistics in cluster environment (arangodb#6917)
1 parent 5ac19b9 commit 477a90d

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
devel
22
-----
33

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

js/apps/system/_admin/aardvark/APP/frontend/js/views/dashboardView.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@
759759
self.history[self.server][figure] = [];
760760

761761
for (i = 0; i < d.times.length; ++i) {
762-
self.mergeDygraphHistory(d, i, true);
762+
self.mergeDygraphHistory(d, i);
763763
}
764764
}
765765
);
@@ -1069,6 +1069,12 @@
10691069
);
10701070
},
10711071

1072+
clearInterval: function () {
1073+
if (this.timer) {
1074+
clearInterval(this.ti 8000 mer);
1075+
}
1076+
},
1077+
10721078
resize: function () {
10731079
if (!this.isUpdating) {
10741080
return;

js/apps/system/_admin/aardvark/APP/frontend/js/views/nodeView.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@
7171
if (this.coordinator) {
7272
dashboard = this.coordinator.get('name');
7373
// coordinator
74-
this.dashboards[this.coordinator.get('name')] = new window.DashboardView({
74+
if (this.dashboards[dashboard]) {
75+
this.dashboards[dashboard].clearInterval();
76+
}
77+
this.dashboards[dashboard] = new window.DashboardView({
7578
dygraphConfig: window.dygraphConfig,
7679
database: window.App.arangoDatabase,
7780
serverToShow: {
@@ -85,7 +88,10 @@
8588
// db server
8689
var attributes = this.dbServer.toJSON();
8790
dashboard = attributes.name;
88-
this.dashboards[attributes.name] = new window.DashboardView({
91+
if (this.dashboards[dashboard]) {
92+
this.dashboards[dashboard].clearInterval();
93+
}
94+
this.dashboards[dashboard] = new window.DashboardView({
8995
dygraphConfig: null,
9096
database: window.App.arangoDatabase,
9197
serverToShow: {

0 commit comments

Comments
 (0)
0