1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Mark deploy inflight when reverting a file change

This commit is contained in:
Nick O'Leary 2018-02-18 16:30:47 +00:00
parent 326c6c496e
commit f953612695
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -154,6 +154,7 @@ RED.sidebar.versionControl = (function() {
.appendTo(bg) .appendTo(bg)
.click(function(evt) { .click(function(evt) {
evt.preventDefault(); evt.preventDefault();
var spinner = utils.addSpinnerOverlay(container).addClass('projects-dialog-spinner-contain'); var spinner = utils.addSpinnerOverlay(container).addClass('projects-dialog-spinner-contain');
var notification = RED.notify("Are you sure you want to revert the changes to '"+entry.file+"'? This cannot be undone.", { var notification = RED.notify("Are you sure you want to revert the changes to '"+entry.file+"'? This cannot be undone.", {
type: "warning", type: "warning",
@ -188,7 +189,12 @@ RED.sidebar.versionControl = (function() {
} }
} }
} }
utils.sendRequest(options); RED.deploy.setDeployInflight(true);
utils.sendRequest(options).always(function() {
setTimeout(function() {
RED.deploy.setDeployInflight(false);
},500);
});
} }
} }