]>
git.proxmox.com Git - pve-manager.git/blob - www/manager6/window/BulkAction.js
87e972b3d4e88ef51c139b3d98273558ec92e2b5
1 Ext
.define('PVE.window.BulkAction', {
2 extend
: 'Ext.window.Window',
12 // the action to be set
13 // currently there are
19 submit: function(params
) {
21 PVE
.Utils
.API2Request({
23 url
: '/nodes/' + me
.nodename
+ '/' + "/" + me
.action
,
26 failure: function(response
, opts
) {
27 Ext
.Msg
.alert('Error', response
.htmlStatus
);
29 success: function(response
, options
) {
30 var upid
= response
.result
.data
;
32 var win
= Ext
.create('PVE.window.TaskViewer', {
37 win
.on('destroy', function() {
44 initComponent : function() {
48 throw "no node name specified";
52 throw "no action specified";
56 throw "no button text specified";
60 throw "no title specified";
65 if (me
.action
=== 'migrateall') {
68 xtype
: 'pveNodeSelector',
70 disallowedNodes
: [me
.nodename
],
71 fieldLabel
: gettext('Target node'),
76 xtype
: 'pveIntegerField',
81 fieldLabel
: gettext('Parallel jobs'),
85 } else if (me
.action
=== 'startall') {
101 nodename
: me
.nodename
,
105 me
.formPanel
= Ext
.create('Ext.form.Panel', {
119 var form
= me
.formPanel
.getForm();
121 var submitBtn
= Ext
.create('Ext.Button', {
123 handler: function() {
125 me
.submit(form
.getValues());
130 items
: [ me
.formPanel
],
131 buttons
: [ submitBtn
]
136 form
.on('validitychange', function() {
137 var valid
= form
.isValid();
138 submitBtn
.setDisabled(!valid
);