From 21486225c8efae30198e3f7c9fc65689fb843a25 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 6 Oct 2020 15:16:00 +0200 Subject: [PATCH] ui: dashboard: code cleanup Signed-off-by: Thomas Lamprecht --- www/Dashboard.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/www/Dashboard.js b/www/Dashboard.js index abfaa308..122aa559 100644 --- a/www/Dashboard.js +++ b/www/Dashboard.js @@ -151,7 +151,8 @@ Ext.define('PBS.Dashboard', { }; records.forEach(record => { - let type = record.data.worker_type; + let task = record.data; + let type = task.worker_type; if (type === 'syncjob') { type = 'sync'; } @@ -160,8 +161,8 @@ Ext.define('PBS.Dashboard', { type = 'verify'; } - if (data[type] && record.data.status) { - let parsed = Proxmox.Utils.parse_task_status(record.data.status); + if (data[type] && task.status) { + let parsed = Proxmox.Utils.parse_task_status(task.status); data[type][parsed]++; } });