Skip to content

NIFI-14485 Add Bounded Process Group column to Parameter Contexts Page #9884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

buczi
Copy link

@buczi buczi commented Apr 18, 2025

Summary

NIFI-14485

In this PR I'm adding a new column to Parameter Contexts Page. This column aims to help users distinguish between Contexts when they are using the table view. In the column there can be either value (shared) meaning that the Parameter Context is used in two or more unrelated Process Groups or the name of the parent Process Group if it is only shared common descendants.

Tracking

Please complete the following tracking steps prior to pull request creation.

Issue Tracking

Pull Request Tracking

  • Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
  • Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

  • Pull Request based on current revision of the main branch
  • Pull Request refers to a feature branch with one commit containing changes

Verification

Please indicate the verification steps performed prior to pull request creation.

Build

  • Build completed using mvn clean install -P contrib-check
    • JDK 21

Licensing

  • New dependencies are compatible with the Apache License 2.0 according to the License Policy
  • New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

  • Documentation formatting appears as expected in rendered files

@buczi buczi marked this pull request as ready for review April 18, 2025 14:56
Copy link
Contributor

@exceptionfactory exceptionfactory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for proposing this addition @buczi. I recommended some naming and labeling changes, but tagging @mcgilman and @scottyaslan for additional review.

@buczi buczi force-pushed the NIFI-14485 branch 2 times, most recently from 7110af8 to 465420e Compare April 18, 2025 15:49
@buczi
Copy link
Author

buczi commented Apr 18, 2025

Thanks @exceptionfactory for the review. I adjusted the code to the suggested naming changes.

@exceptionfactory
Copy link
Contributor

Thanks for making the updates! For future reference, only the first commit for the PR should be squashed, during the PR review, additional commits should be added to the branch, and then everything gets squashed when it is approved and merged.

@mcgilman mcgilman added the ui Pull requests for work relating to the user interface label Apr 24, 2025
@mcgilman
Copy link
Contributor

Reviewing...

Copy link
Contributor

@mcgilman mcgilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @buczi! I've left a few notes below. Please ensure that your evaluating the proposed changes with all possible permission scenarios.

}

private getHighLevelProcessGroups(component: ParameterContext) : string {
const componentIds: string[] = component.boundProcessGroups.map(group => group.component.id)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to account for the current users permissions here. When the user lacks permissions to the given Parameter Context or any bound process group this throws an error causing rendering issues in the UI.

@@ -21,7 +21,7 @@ import { MatSortModule, Sort } from '@angular/material/sort';
import { NiFiCommon } from '@nifi/shared';
import { FlowConfiguration } from '../../../../../state/flow-configuration';
import { CurrentUser } from '../../../../../state/current-user';
import { ParameterContextEntity } from '../../../../../state/shared';
import {ParameterContext, ParameterContextEntity} from '../../../../../state/shared';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the formatting here. This can be accomplished by running:

$ npx nx prettier:format

Copy link
Contributor

@mcgilman mcgilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! Just noted a few issues with the updated test spec.

import { Sort } from '@angular/material/sort';
import { HarnessLoader } from '@angular/cdk/testing';
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { MatMenuHarness } from '@angular/material/menu/testing';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused.


describe('ParameterContextTable', () => {
let component: ParameterContextTable;
let fixture: ComponentFixture<ParameterContextTable>;
let loader: HarnessLoader;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is unused.


describe('ParameterContextTable', () => {
let component: ParameterContextTable;
let fixture: ComponentFixture<ParameterContextTable>;
let loader: HarnessLoader;

beforeEach(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are failing tests in this spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui Pull requests for work relating to the user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants