buczi commented on code in PR #9884:
URL: https://github.com/apache/nifi/pull/9884#discussion_r2050796479
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/parameter-contexts/ui/parameter-context-listing/parameter-context-table/parameter-context-table.component.ts:
##########
@@ -86,6 +86,19 @@ export class ParameterContextTable {
return this.canRead(entity) && entity.component ?
entity.component.description : '';
}
+ formatBoundedProcessGroups(entity: ParameterContextEntity): string {
+ return this.canRead(entity) && entity.component ?
this.getHighLevelParameterContexts(entity.component) : '';
+ }
+
+ private getHighLevelParameterContexts(component: ParameterContext) {
+ const componentIds: string[] = component.boundProcessGroups.map(group
=> group.component.id)
+ const boundedProcessGroupNames: string[] =
component.boundProcessGroups
+ .filter(group =>
!componentIds.includes(group.component.parentGroupId))
+ .map(group => group.component.name);
+
+ return boundedProcessGroupNames.length <= 1 ?
boundedProcessGroupNames.toString() : '(shared)'
Review Comment:
That will be nice! I adjusted the code.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]