Selaa lähdekoodia

Merge pull request #4206 from badkeyy/bugfix/update-dashboard-stats-on-change

Update the dashboard stats every time the dashboard is shown
jc21 1 vuosi sitten
vanhempi
sitoutus
fcf4117f8e
1 muutettua tiedostoa jossa 1 lisäystä ja 3 poistoa
  1. 1 3
      frontend/js/app/dashboard/main.js

+ 1 - 3
frontend/js/app/dashboard/main.js

@@ -50,8 +50,7 @@ module.exports = Mn.View.extend({
     onRender: function () {
         let view = this;
 
-        if (typeof view.stats.hosts === 'undefined') {
-            Api.Reports.getHostStats()
+        Api.Reports.getHostStats()
                 .then(response => {
                     if (!view.isDestroyed()) {
                         view.stats.hosts = response;
@@ -61,7 +60,6 @@ module.exports = Mn.View.extend({
                 .catch(err => {
                     console.log(err);
                 });
-        }
     },
 
     /**