[pbs-devel] [PATCH proxmox-backup v2 5/6] ui: Dashboard/TaskSummary: add Verifies to the Summary

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Oct 6 13:10:19 CEST 2020


On 06.10.20 12:25, Dominik Csapak wrote:
> and count every type that starts with 'verify' (e.g. verifyjob)
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  www/Dashboard.js             | 6 ++++++
>  www/dashboard/TaskSummary.js | 1 +
>  2 files changed, 7 insertions(+)
> 


I have some weird stuff going on here, namely, I get tasks with the same upid
multiple times in the store??

This screws up the counts, e.g., verifies are counted all double,  gc are also
more (but here not doubled!)

I.e., if I apply the below diff I get different numbers, now matching with the
actual task list which opens when clicking on such a summary number..

diff --git a/www/Dashboard.js b/www/Dashboard.js
index 1a68029f..0597194b 100644
--- a/www/Dashboard.js
+++ b/www/Dashboard.js
@@ -150,7 +150,12 @@ Ext.define('PBS.Dashboard', {
                verify: { error: 0, warning: 0, ok: 0 },
            };

+           let upid_seen = {};
            records.forEach(record => {
+               if (upid_seen[record.data.upid]) {
+                   return;
+               }
+               upid_seen[record.data.upid] = 1;
                let type = record.data.worker_type;
                if (type === 'syncjob') {
                    type = 'sync';






More information about the pbs-devel mailing list