Răsfoiți Sursa

Change onRender function to always update the dashboard stats

Julian Gassner 11 luni în urmă
părinte
comite
d26e8c1d0c
1 a modificat fișierele cu 1 adăugiri și 3 ștergeri
  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);
                 });
-        }
     },
 
     /**