rfellows commented on a change in pull request #4969:
URL: https://github.com/apache/nifi/pull/4969#discussion_r606012324



##########
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-variable-registry.js
##########
@@ -820,170 +846,141 @@
         var affectedControllerServices = [];
         var unauthorizedAffectedComponents = [];
 
-        // clear the affected components from the previous selection
-        var processorContainer = $('#variable-registry-affected-processors');
-        nfCommon.cleanUpTooltips(processorContainer, 
'div.referencing-component-state');
-        nfCommon.cleanUpTooltips(processorContainer, 
'div.referencing-component-bulletins');
-        processorContainer.empty();
-
-        var controllerServiceContainer = 
$('#variable-registry-affected-controller-services');
-        nfCommon.cleanUpTooltips(controllerServiceContainer, 
'div.referencing-component-state');
-        nfCommon.cleanUpTooltips(controllerServiceContainer, 
'div.referencing-component-bulletins');
-        controllerServiceContainer.empty();
-
-        var unauthorizedComponentsContainer = 
$('#variable-registry-affected-unauthorized-components').empty();
+        var spinner = $('#variable-registry-dialog 
.referencing-components-loading');
 
-        // affected component will be undefined when a new variable is added
-        if (nfCommon.isUndefined(affectedComponents)) {
-            $('<li class="affected-component-container"><span 
class="unset">Pending Apply</span></li>').appendTo(processorContainer);
-            $('<li class="affected-component-container"><span 
class="unset">Pending Apply</span></li>').appendTo(controllerServiceContainer);
-            $('<li class="affected-component-container"><span 
class="unset">Pending 
Apply</span></li>').appendTo(unauthorizedComponentsContainer);
-        } else {
-            var referencingComponentsForBulletinRetrieval = [];
-
-            // bin the affected components according to their type
-            $.each(affectedComponents, function (_, affectedComponentEntity) {
-                if (affectedComponentEntity.permissions.canRead === true && 
affectedComponentEntity.permissions.canWrite === true) {
-                    
referencingComponentsForBulletinRetrieval.push(affectedComponentEntity.id);
+        var loadingDeferred = $.Deferred(function (deferred) {
+            spinner.addClass('ajax-loading');
+            deferred.resolve();
+        });
 
-                    if (affectedComponentEntity.component.referenceType === 
'PROCESSOR') {
-                        affectedProcessors.push(affectedComponentEntity);
+        var processorContainer = $('#variable-registry-affected-processors');
+        var controllerServiceContainer = 
$('#variable-registry-affected-controller-services');
+        var unauthorizedComponentsContainer = 
$('#variable-registry-affected-unauthorized-components');
+        loadingDeferred.then(function() {
+            // clear the affected components from the previous selection

Review comment:
       Same reasoning here as above...




-- 
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]


Reply via email to