mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 11:46:44 +00:00
Fix #1372: require manually entering the Ceph Pool id before destroying a pool
This commit is contained in:
parent
2125c18a23
commit
c9a8015d95
@ -162,32 +162,23 @@ Ext.define('PVE.node.CephPoolList', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var remove_btn = new PVE.button.Button({
|
var remove_btn = Ext.create('PVE.button.Button', {
|
||||||
text: gettext('Remove'),
|
text: gettext('Remove'),
|
||||||
selModel: sm,
|
selModel: sm,
|
||||||
disabled: true,
|
disabled: true,
|
||||||
confirmMsg: function(rec) {
|
|
||||||
var msg = Ext.String.format(gettext('Are you sure you want to remove entry {0}'),
|
|
||||||
"'" + rec.data.pool_name + "'");
|
|
||||||
msg += " " + gettext('This will permanently erase all data.');
|
|
||||||
|
|
||||||
return msg;
|
|
||||||
},
|
|
||||||
handler: function() {
|
handler: function() {
|
||||||
var rec = sm.getSelection()[0];
|
var rec = sm.getSelection()[0];
|
||||||
|
|
||||||
if (!rec.data.pool_name) {
|
if (!rec.data.pool_name) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
var base_url = '/nodes/' + nodename + '/ceph/pools/' +
|
||||||
|
rec.data.pool_name;
|
||||||
|
|
||||||
PVE.Utils.API2Request({
|
Ext.create('PVE.window.SafeDestroy', {
|
||||||
url: "/nodes/" + nodename + "/ceph/pools/" +
|
url: base_url,
|
||||||
rec.data.pool_name,
|
item: { type: 'CephPool', id: rec.data.pool_name }
|
||||||
method: 'DELETE',
|
}).show();
|
||||||
failure: function(response, opts) {
|
|
||||||
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user