Skip to content

Commit 5b8dca4

Browse files
authored
Merge pull request #333 from rsnyman/fix-332-dashboard
Fix a bug with the dashboard
2 parents 6e3c663 + 3568c3d commit 5b8dca4

File tree

2 files changed

+12
-21
lines changed

2 files changed

+12
-21
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ Version 2.1.3
77
* fix docker-compose command in README
88
* Update version number
99

10+
Version 2.1.2
11+
=============
12+
13+
* Re-release to try to fix previous release mess
14+
15+
Version 2.1.1
16+
=============
17+
18+
* Allow user's name to be edited
19+
* Various bug fixes and enhancements
20+
1021
Version 2.1.0
1122
=============
1223

frontend/src/dashboard.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -96,27 +96,7 @@ export class Dashboard extends React.Component {
9696
HttpClient.get([Settings.serverUrl, 'dashboard'], params)
9797
.then(response => HttpClient.handleResponse(response))
9898
.then(data => {
99-
this.setState(
100-
{dashboards: data['dashboards']},
101-
() => {
102-
// If the current dashboard is not in current list
103-
if (this.state.selectedDashboard) {
104-
let selectedId = null;
105-
data['dashboards'].forEach(item => {
106-
if (item.id === this.state.selectedDashboard.dashboard.id) {
107-
selectedId = item.id;
108-
}
109-
});
110-
if (!selectedId) {
111-
localStorage.removeItem('dashboard');
112-
this.setState({selectedDashboard: null}, this.getWidgets);
113-
}
114-
}
115-
else {
116-
this.getWidgets();
117-
}
118-
}
119-
);
99+
this.setState({dashboards: data['dashboards']}, this.getWidgets);
120100
});
121101
}
122102

0 commit comments

Comments
 (0)