reuse do quarantineAction

and make it possible to show both subscription and action window after
one another

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2017-10-05 16:23:33 +02:00 committed by Dietmar Maurer
parent ac5fcb29ad
commit 2fa0b5059a
2 changed files with 4 additions and 16 deletions

View File

@ -135,21 +135,7 @@ Ext.define('PMG.QuarantineView', {
}, },
execQuarantineAction: function(qa) { execQuarantineAction: function(qa) {
Proxmox.Utils.API2Request({ PMG.Utils.doQuarantineAction(qa.action, qa.cselect);
url: '/api2/extjs/quarantine/content',
params: {
id: qa.cselect,
action: qa.action
},
method: 'POST',
success: function(response) {
Ext.Msg.alert(gettext('Info'), "Action " + qa.action + ' ' +
qa.cselect + ' successful');
},
failure: function(response, opts) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}
});
}, },
control: { control: {

View File

@ -499,7 +499,9 @@ Ext.define('PMG.Utils', {
Ext.Msg.alert(gettext('Error'), response.htmlStatus); Ext.Msg.alert(gettext('Error'), response.htmlStatus);
}, },
success: function(response, opts) { success: function(response, opts) {
Ext.Msg.show({ var win = Ext.create('Ext.window.MessageBox',{
closeAction: 'destroy'
}).show({
title: gettext('Info'), title: gettext('Info'),
message: "Action '" + action + ' ' + message: "Action '" + action + ' ' +
id + "' successful", id + "' successful",