From 315feceaa8835e9b47fe5609d8f8db61f642d862 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 19 Jan 2023 17:30:28 +0100 Subject: [PATCH] ui: backup info: merge not-in-any-job warning into button to save space We got reports in the forum about accessibility issues, as buttons where cut-off due to the relatively long warning. Use the old text as tooltip for the button and add the icon also there. Link: https://forum.proxmox.com/threads/120714/#post-526376 Signed-off-by: Thomas Lamprecht --- www/manager6/dc/Backup.js | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 8d1b3ad7..0afd2328 100644 --- a/www/manager6/dc/Backup.js +++ b/www/manager6/dc/Backup.js @@ -514,14 +514,11 @@ Ext.define('PVE.dc.BackupView', { }, }); - let noBackupJobWarning, noBackupJobInfoButton; + let noBackupJobInfoButton; let reload = function() { store.load(); not_backed_store.load({ - callback: function(records, operation, success) { - noBackupJobWarning.setVisible(records.length > 0); - noBackupJobInfoButton.setVisible(records.length > 0); - }, + callback: records => noBackupJobInfoButton.setVisible(records.length > 0), }); }; @@ -726,13 +723,10 @@ Ext.define('PVE.dc.BackupView', { handler: run_detail, }); - noBackupJobWarning = Ext.create('Ext.toolbar.TextItem', { - html: '' + gettext('Some guests are not covered by any backup job.'), - hidden: true, - }); - noBackupJobInfoButton = new Proxmox.button.Button({ - text: gettext('Show'), + text: `${gettext('Show')}: ${gettext('Guests Without Backup Job')}`, + tooltip: gettext('Some guests are not covered by any backup job.'), + iconCls: 'fa fa-fw fa-exclamation-circle', hidden: true, handler: run_show_not_backed, }); @@ -763,7 +757,6 @@ Ext.define('PVE.dc.BackupView', { '-', run_btn, '->', - noBackupJobWarning, noBackupJobInfoButton, '-', {