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();
|
resetPolicy();
|
||||||
loadPolicy();
|
loadPolicy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nf.Canvas.reload({
|
||||||
|
'transition': true
|
||||||
|
});
|
||||||
}).fail(function (xhr, status, error) {
|
}).fail(function (xhr, status, error) {
|
||||||
nf.Common.handleAjaxError(xhr, status, error)
|
nf.Common.handleAjaxError(xhr, status, error);
|
||||||
resetPolicy();
|
resetPolicy();
|
||||||
loadPolicy();
|
loadPolicy();
|
||||||
|
|
||||||
|
nf.Canvas.reload({
|
||||||
|
'transition': true
|
||||||
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
nf.Dialog.showOkDialog({
|
nf.Dialog.showOkDialog({
|
||||||
|
|
|
@ -1082,19 +1082,25 @@ nf.ProcessGroup = (function () {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reloads the process group state from the server and refreshes the UI.
|
* 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
|
* @param {object} processGroup The process group to reload
|
||||||
*/
|
*/
|
||||||
reload: function (processGroup) {
|
reload: function (processGroup) {
|
||||||
if (processGroupMap.has(processGroup.id)) {
|
if(nf.Common.isDefinedAndNotNull(processGroup)) {
|
||||||
var processGroupEntity = processGroupMap.get(processGroup.id);
|
if (processGroupMap.has(processGroup.id)) {
|
||||||
return $.ajax({
|
var processGroupEntity = processGroupMap.get(processGroup.id);
|
||||||
type: 'GET',
|
return $.ajax({
|
||||||
url: processGroupEntity.uri,
|
type: 'GET',
|
||||||
dataType: 'json'
|
url: processGroupEntity.uri,
|
||||||
}).done(function (response) {
|
dataType: 'json'
|
||||||
nf.ProcessGroup.set(response);
|
}).done(function (response) {
|
||||||
|
nf.ProcessGroup.set(response);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
nf.Canvas.reload({
|
||||||
|
'transition': true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue