mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-27 13:45:21 +00:00
replication GUI: add schedule now Button
This commit is contained in:
parent
88ea8e67d3
commit
85167e5edf
@ -168,6 +168,21 @@ Ext.define('PVE.grid.ReplicaView', {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
scheduleJobNow: function(button,event,rec) {
|
||||||
|
var me = this.getView();
|
||||||
|
var controller = this;
|
||||||
|
|
||||||
|
PVE.Utils.API2Request({
|
||||||
|
url: "/api2/extjs/nodes/" + me.nodename + "/replication/" + rec.data.id + "/schedule_now",
|
||||||
|
method: 'POST',
|
||||||
|
waitMsgTarget: me,
|
||||||
|
callback: function() { controller.reload(); },
|
||||||
|
failure: function (response, opts) {
|
||||||
|
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
showLog: function(button, event, rec) {
|
showLog: function(button, event, rec) {
|
||||||
var me = this.getView();
|
var me = this.getView();
|
||||||
var controller = this;
|
var controller = this;
|
||||||
@ -256,6 +271,13 @@ Ext.define('PVE.grid.ReplicaView', {
|
|||||||
itemId: 'logButton',
|
itemId: 'logButton',
|
||||||
handler: 'showLog',
|
handler: 'showLog',
|
||||||
disabled: true
|
disabled: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
xtype: 'pveButton',
|
||||||
|
text: gettext('Schedule now'),
|
||||||
|
itemId: 'scheduleNowButton',
|
||||||
|
handler: 'scheduleJobNow',
|
||||||
|
disabled: true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
@ -449,10 +471,12 @@ Ext.define('PVE.grid.ReplicaView', {
|
|||||||
|
|
||||||
me.callParent();
|
me.callParent();
|
||||||
|
|
||||||
// we cannot access the log in the datacenter, because
|
// we cannot access the log and scheduleNow button
|
||||||
|
// in the datacenter, because
|
||||||
// we do not know where/if the jobs runs
|
// we do not know where/if the jobs runs
|
||||||
if (mode === 'dc') {
|
if (mode === 'dc') {
|
||||||
me.down('#logButton').setHidden(true);
|
me.down('#logButton').setHidden(true);
|
||||||
|
me.down('#scheduleNowButton').setHidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if we set the warning mask, we do not want to load
|
// if we set the warning mask, we do not want to load
|
||||||
|
Loading…
Reference in New Issue
Block a user