mirror of
git://git.proxmox.com/git/proxmox-backup.git
synced 2025-03-05 20:58:33 +03:00
ui: render 'unmount' maintenance mode correctly
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
This commit is contained in:
parent
703a822c97
commit
f0e1cb86d6
@ -775,7 +775,7 @@ Ext.define('PBS.Utils', {
|
||||
let extra = '';
|
||||
|
||||
if (activeTasks !== undefined) {
|
||||
const conflictingTasks = activeTasks.write + (type === 'offline' ? activeTasks.read : 0);
|
||||
const conflictingTasks = activeTasks.write + (type === 'offline' || type === 'unmount' ? activeTasks.read : 0);
|
||||
|
||||
if (conflictingTasks > 0) {
|
||||
extra += '| <i class="fa fa-spinner fa-pulse fa-fw"></i> ';
|
||||
@ -795,6 +795,8 @@ Ext.define('PBS.Utils', {
|
||||
break;
|
||||
case 'offline': modeText = gettext("Offline");
|
||||
break;
|
||||
case 'unmount': modeText = gettext("Unmounting");
|
||||
break;
|
||||
}
|
||||
return `${modeText} ${extra}`;
|
||||
},
|
||||
|
@ -86,6 +86,15 @@ Ext.define('PBS.window.MaintenanceOptions', {
|
||||
};
|
||||
}
|
||||
|
||||
let unmounting = options['maintenance-type'] === 'unmount';
|
||||
let defaultType = options['maintenance-type'] === '__default__';
|
||||
if (unmounting) {
|
||||
options['maintenance-type'] = '';
|
||||
}
|
||||
|
||||
me.callParent([options]);
|
||||
|
||||
me.lookupReference('type-field').setDisabled(unmounting);
|
||||
me.lookupReference('message-field').setDisabled(unmounting || defaultType);
|
||||
},
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user