Adapt SafeDestroy component to be able to delete Ceph Pools

This commit is contained in:
Emmanuel Kasper 2017-06-12 16:18:08 +02:00 committed by Dietmar Maurer
parent a4dc8611e6
commit 2125c18a23
2 changed files with 5 additions and 2 deletions

View File

@ -613,6 +613,7 @@ Ext.define('PVE.Utils', { utilities: {
cephdestroymon: ['Ceph Monitor', gettext('Destroy') ],
cephcreateosd: ['Ceph OSD', gettext('Create') ],
cephdestroyosd: ['Ceph OSD', gettext('Destroy') ],
cephdestroypool: ['Ceph Pool', gettext('Destroy') ],
imgcopy: ['', gettext('Copy data') ],
imgdel: ['', gettext('Erase data') ],
download: ['', gettext('Download') ],

View File

@ -85,7 +85,7 @@ Ext.define('PVE.window.SafeDestroy', {
{
itemId: 'confirmField',
reference: 'confirmField',
xtype: 'numberfield',
xtype: 'textfield',
name: 'confirm',
labelWidth: 300,
hideTrigger: true,
@ -124,8 +124,10 @@ Ext.define('PVE.window.SafeDestroy', {
msg = PVE.Utils.format_task_description('qmdestroy', item.id);
} else if (item.type === 'CT') {
msg = PVE.Utils.format_task_description('vzdestroy', item.id);
} else if (item.type === 'CephPool') {
msg = PVE.Utils.format_task_description('cephdestroypool', item.id);
} else {
throw "unknown VM type specified";
throw "unknown item type specified";
}
messageCmp.setHtml(msg);