]> git.proxmox.com Git - proxmox-backup.git/commitdiff
ui: dashboard: code cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Oct 2020 13:16:00 +0000 (15:16 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 6 Oct 2020 13:16:00 +0000 (15:16 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/Dashboard.js

index abfaa308f513e1be08b1c3bee678d6b66b6a9008..122aa559859117d0b3e40d2155ad25ca3c1efa75 100644 (file)
@@ -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]++;
                }
            });