ui: dashboard: show tape backups/restores on task summary

for that we have to increase the panel height a bit

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2023-05-03 14:25:18 +02:00 committed by Thomas Lamprecht
parent 21ff6e593b
commit 0763ac140c
2 changed files with 12 additions and 2 deletions

View File

@ -93,6 +93,8 @@ Ext.define('PBS.Dashboard', {
garbage_collection: { error: 0, warning: 0, ok: 0 }, garbage_collection: { error: 0, warning: 0, ok: 0 },
sync: { error: 0, warning: 0, ok: 0 }, sync: { error: 0, warning: 0, ok: 0 },
verify: { error: 0, warning: 0, ok: 0 }, verify: { error: 0, warning: 0, ok: 0 },
'tape-backup': { error: 0, warning: 0, ok: 0 },
'tape-restore': { error: 0, warning: 0, ok: 0 },
}; };
records.forEach(record => { records.forEach(record => {
@ -110,6 +112,10 @@ Ext.define('PBS.Dashboard', {
type = 'prune'; type = 'prune';
} }
if (type.startsWith('tape-backup')) {
type = 'tape-backup';
}
if (data[type] && task.status) { if (data[type] && task.status) {
let parsed = Proxmox.Utils.parse_task_status(task.status); let parsed = Proxmox.Utils.parse_task_status(task.status);
data[type][parsed]++; data[type][parsed]++;
@ -258,13 +264,13 @@ Ext.define('PBS.Dashboard', {
Ext.String.format(gettext('{0} days'), '{days}') + ')', Ext.String.format(gettext('{0} days'), '{days}') + ')',
}, },
xtype: 'pbsTaskSummary', xtype: 'pbsTaskSummary',
height: 200, height: 250,
reference: 'tasksummary', reference: 'tasksummary',
}, },
{ {
iconCls: 'fa fa-ticket', iconCls: 'fa fa-ticket',
title: 'Subscription', title: 'Subscription',
height: 200, height: 250,
reference: 'subscription', reference: 'subscription',
xtype: 'pbsSubscriptionInfo', xtype: 'pbsSubscriptionInfo',
}, },

View File

@ -17,6 +17,8 @@ Ext.define('PBS.TaskSummary', {
"garbage_collection", "garbage_collection",
"sync", "sync",
"verify", "verify",
"tape-backup",
"tape-restore",
], ],
typeFilterMap: { typeFilterMap: {
@ -29,6 +31,8 @@ Ext.define('PBS.TaskSummary', {
"garbage_collection": gettext('Garbage collections'), "garbage_collection": gettext('Garbage collections'),
"sync": gettext('Syncs'), "sync": gettext('Syncs'),
"verify": gettext('Verify'), "verify": gettext('Verify'),
"tape-backup": gettext('Tape Backup'),
"tape-restore": gettext('Tape Restore'),
}, },
// set true to show the onclick panel as modal grid // set true to show the onclick panel as modal grid