scottyaslan commented on a change in pull request #4969:
URL: https://github.com/apache/nifi/pull/4969#discussion_r606233588
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-parameter-contexts.js
##########
@@ -498,293 +525,261 @@
var referencingControllerServices = [];
var unauthorizedReferencingComponents = [];
- // clear the referencing components from the previous selection
- resetUsage();
-
- var parameterReferencingComponentsContainer =
$('#parameter-referencing-components-container');
-
- // referencing component will be undefined when a new parameter is
added
- if (nfCommon.isUndefined(referencingComponents)) {
- // set to pending
- $('<div class="referencing-component-container"><span
class="unset">Pending
Apply</span></div>').appendTo(parameterReferencingComponentsContainer);
- } else {
- var referencingComponentsForBulletinRetrieval = [];
+ var spinner = $('#parameter-context-usage
.referencing-components-loading');
- // bin the referencing components according to their type
- $.each(referencingComponents, function (_,
referencingComponentEntity) {
- if (referencingComponentEntity.permissions.canRead === true &&
referencingComponentEntity.permissions.canWrite === true) {
-
referencingComponentsForBulletinRetrieval.push(referencingComponentEntity.id);
+ var loadingDeferred = $.Deferred(function (deferred) {
+ spinner.addClass('ajax-loading');
+ deferred.resolve();
+ });
+ loadingDeferred.then(function () {
Review comment:
Thanks for the explanation! Sounds reasonable to me!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]