mirror of https://github.com/apache/nifi.git
NIFI-2534 Fix JS error when stopping a process group
This closes #867. Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
parent
b22500d0a3
commit
26f5c496d1
|
@ -948,10 +948,18 @@ nf.PolicyManagement = (function () {
|
|||
resetPolicy();
|
||||
loadPolicy();
|
||||
}
|
||||
|
||||
nf.Canvas.reload({
|
||||
'transition': true
|
||||
});
|
||||
}).fail(function (xhr, status, error) {
|
||||
nf.Common.handleAjaxError(xhr, status, error)
|
||||
nf.Common.handleAjaxError(xhr, status, error);
|
||||
resetPolicy();
|
||||
loadPolicy();
|
||||
|
||||
nf.Canvas.reload({
|
||||
'transition': true
|
||||
});
|
||||
});
|
||||
} else {
|
||||
nf.Dialog.showOkDialog({
|
||||
|
|
|
@ -1082,11 +1082,12 @@ nf.ProcessGroup = (function () {
|
|||
|
||||
/**
|
||||
* Reloads the process group state from the server and refreshes the UI.
|
||||
* If the process group is currently unknown, this function just returns.
|
||||
* If the process group is currently unknown, this function reloads the canvas.
|
||||
*
|
||||
* @param {object} processGroup The process group to reload
|
||||
*/
|
||||
reload: function (processGroup) {
|
||||
if(nf.Common.isDefinedAndNotNull(processGroup)) {
|
||||
if (processGroupMap.has(processGroup.id)) {
|
||||
var processGroupEntity = processGroupMap.get(processGroup.id);
|
||||
return $.ajax({
|
||||
|
@ -1097,6 +1098,11 @@ nf.ProcessGroup = (function () {
|
|||
nf.ProcessGroup.set(response);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
nf.Canvas.reload({
|
||||
'transition': true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue