Change onRender function to always update the dashboard stats

This commit is contained in:
Julian Gassner 2024-12-04 03:45:56 +01:00
parent 4ea50ca40c
commit d26e8c1d0c

View File

@ -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);
});
}
},
/**