]> git.proxmox.com Git - pmg-gui.git/commitdiff
reuse do quarantineAction
authorDominik Csapak <d.csapak@proxmox.com>
Thu, 5 Oct 2017 14:23:33 +0000 (16:23 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 6 Oct 2017 05:31:22 +0000 (07:31 +0200)
and make it possible to show both subscription and action window after
one another

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
js/QuarantineView.js
js/Utils.js

index ce1d5bb30cea2f5c42166fe976d8a365471d3dea..83ae51275556dc5c57687821eb8398ee5f265735 100644 (file)
@@ -135,21 +135,7 @@ Ext.define('PMG.QuarantineView', {
        },
 
        execQuarantineAction: function(qa) {
-           Proxmox.Utils.API2Request({
-               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);
-               }
-           });
+           PMG.Utils.doQuarantineAction(qa.action, qa.cselect);
        },
 
        control: {
index b3df9cc6aa7db4417a1184bde9220f96320549e5..53572863729158aa4a9475a22513760382a7a665 100644 (file)
@@ -499,7 +499,9 @@ Ext.define('PMG.Utils', {
                Ext.Msg.alert(gettext('Error'), response.htmlStatus);
            },
            success: function(response, opts) {
-               Ext.Msg.show({
+               var win = Ext.create('Ext.window.MessageBox',{
+                   closeAction: 'destroy'
+               }).show({
                    title: gettext('Info'),
                    message: "Action '" + action + ' ' +
                    id + "' successful",