mirror of https://github.com/apache/nifi.git
NIFI-4518:
- Addressing issues when handling the done callback for controller service references.
This commit is contained in:
parent
32c0e2be3b
commit
f2bd9f87ba
|
@ -284,7 +284,13 @@
|
||||||
|
|
||||||
if (queries.length === 1) {
|
if (queries.length === 1) {
|
||||||
// if there was only one query, return it
|
// if there was only one query, return it
|
||||||
return queries[0].fail(nfErrorHandler.handleAjaxError);
|
return $.Deferred(function (deferred) {
|
||||||
|
queries[0].done(function (response) {
|
||||||
|
deferred.resolve(response);
|
||||||
|
}).fail(function () {
|
||||||
|
deferred.reject();
|
||||||
|
}).fail(nfErrorHandler.handleAjaxError);
|
||||||
|
}).promise();
|
||||||
} else {
|
} else {
|
||||||
// if there were multiple queries, wait for each to complete
|
// if there were multiple queries, wait for each to complete
|
||||||
return $.Deferred(function (deferred) {
|
return $.Deferred(function (deferred) {
|
||||||
|
|
|
@ -864,8 +864,7 @@
|
||||||
dataType: 'json'
|
dataType: 'json'
|
||||||
});
|
});
|
||||||
|
|
||||||
$.when(bulletins, service).done(function (bulletinResult, serviceResult) {
|
$.when(bulletins, service).done(function (bulletinResponse, serviceResult) {
|
||||||
var bulletinResponse = bulletinResult[0];
|
|
||||||
var serviceResponse = serviceResult[0];
|
var serviceResponse = serviceResult[0];
|
||||||
conditionMet(serviceResponse.component, bulletinResponse.bulletinBoard.bulletins);
|
conditionMet(serviceResponse.component, bulletinResponse.bulletinBoard.bulletins);
|
||||||
}).fail(function (xhr, status, error) {
|
}).fail(function (xhr, status, error) {
|
||||||
|
|
Loading…
Reference in New Issue