From 38e79438f73e00ad3a8238bd3b29cd63ed1b0111 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 19 Jan 2023 17:32:57 +0100 Subject: [PATCH] ui: backup info: code cleanups And switch the title of the "not in any job" info window to title case, just like the button that opens it. Signed-off-by: Thomas Lamprecht --- www/manager6/dc/Backup.js | 62 +++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/www/manager6/dc/Backup.js b/www/manager6/dc/Backup.js index 0afd2328..c6f51a0a 100644 --- a/www/manager6/dc/Backup.js +++ b/www/manager6/dc/Backup.js @@ -646,35 +646,6 @@ Ext.define('PVE.dc.BackupView', { })); }; - let run_show_not_backed = function() { - Ext.create('Ext.window.Window', { - modal: true, - width: 600, - height: 500, - resizable: true, - layout: 'fit', - title: gettext('Guests without backup job'), - items: [ - { - xtype: 'panel', - region: 'center', - layout: { - type: 'vbox', - align: 'stretch', - }, - items: [ - { - xtype: 'pveBackedGuests', - flex: 1, - layout: 'fit', - store: not_backed_store, - }, - ], - }, - ], - }).show(); - }; - var edit_btn = new Proxmox.button.Button({ text: gettext('Edit'), disabled: true, @@ -728,7 +699,35 @@ Ext.define('PVE.dc.BackupView', { 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, + handler: () => { + Ext.create('Ext.window.Window', { + autoShow: true, + modal: true, + width: 600, + height: 500, + resizable: true, + layout: 'fit', + title: gettext('Guests Without Backup Job'), + items: [ + { + xtype: 'panel', + region: 'center', + layout: { + type: 'vbox', + align: 'stretch', + }, + items: [ + { + xtype: 'pveBackedGuests', + flex: 1, + layout: 'fit', + store: not_backed_store, + }, + ], + }, + ], + }); + }, }); Proxmox.Utils.monStoreErrors(me, store); @@ -770,8 +769,9 @@ Ext.define('PVE.dc.BackupView', { schedule = record.data.schedule; } Ext.create('PVE.window.ScheduleSimulator', { + autoShow: true, schedule, - }).show(); + }); }, }, ], -- 2.39.5