scottyaslan commented on a change in pull request #3695: NIFI-6623 - Support
linking to unauthorized components from referenci…
URL: https://github.com/apache/nifi/pull/3695#discussion_r321452382
##########
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
##########
@@ -692,16 +692,26 @@
}
} else {
var
referencingUnauthorizedComponentContainer = $('<li
class="referencing-component-container"></li>').appendTo(unauthorizedComponentsContainer);
- $('<span
class="parameter-context-referencing-component-name link
ellipsis"></span>').prop('title',
unauthorizedReferencingComponentEntity.id).text(unauthorizedReferencingComponentEntity.id).on('click',
function () {
- // check if there are outstanding
changes
-
handleOutstandingChanges().done(function () {
- // close the shell
-
$('#shell-dialog').modal('hide');
-
- // show the component in
question
-
nfCanvasUtils.showComponent(unauthorizedReferencingComponentEntity.processGroup.id,
unauthorizedReferencingComponentEntity.id);
- });
-
}).appendTo(referencingUnauthorizedComponentContainer);
+ $('<span
class="parameter-context-referencing-component-name link ellipsis"></span>')
+ .prop('title',
unauthorizedReferencingComponentEntity.id)
+
.text(unauthorizedReferencingComponentEntity.id)
+ .on('click', function () {
+ // check if there are
outstanding changes
+
handleOutstandingChanges().done(function () {
+ // close the shell
+
$('#shell-dialog').modal('hide');
+
+ // show the component in
question
+ if
(unauthorizedReferencingComponentEntity.referenceType === 'PROCESSOR') {
+
nfCanvasUtils.showComponent(unauthorizedReferencingComponentEntity.processGroup.id,
unauthorizedReferencingComponentEntity.id);
+ } else if
(unauthorizedReferencingComponentEntity.referenceType === 'CONTROLLER_SERVICE')
{
+
nfProcessGroupConfiguration.showConfiguration(unauthorizedReferencingComponentEntity.processGroup.id).done(function
() {
+
nfProcessGroupConfiguration.selectControllerService(unauthorizedReferencingComponentEntity.id);
Review comment:
You will need to first navigate the user to the correct PG:
```nfProcessGroup.enterGroup(referencingControllerService.processGroupId);
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services