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

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);
});
} }
} }