You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "sujkm (via GitHub)" <gi...@apache.org> on 2024/06/10 16:25:07 UTC
[PR] NIFI-13378: Adds Version State as filterable option in Process Groups tab in Summary [nifi]
sujkm opened a new pull request, #8945:
URL: https://github.com/apache/nifi/pull/8945
<!-- Licensed to the Apache Software Foundation (ASF) under one or more -->
<!-- contributor license agreements. See the NOTICE file distributed with -->
<!-- this work for additional information regarding copyright ownership. -->
<!-- The ASF licenses this file to You under the Apache License, Version 2.0 -->
<!-- (the "License"); you may not use this file except in compliance with -->
<!-- the License. You may obtain a copy of the License at -->
<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
<!-- Unless required by applicable law or agreed to in writing, software -->
<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!-- See the License for the specific language governing permissions and -->
<!-- limitations under the License. -->
# Summary
[NIFI-13378](https://issues.apache.org/jira/browse/NIFI-13378)
Adds Version State as filterable option in Process Groups tab in Summary similar to Status filter.
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### 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](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
- [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
### Documentation
- [ ] Documentation formatting appears as expected in rendered files
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13378: Adds Version State as filterable option in Process Groups tab in Summary [nifi]
Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows merged PR #8945:
URL: https://github.com/apache/nifi/pull/8945
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13378: Adds Version State as filterable option in Process Groups tab in Summary [nifi]
Posted by "sujkm (via GitHub)" <gi...@apache.org>.
sujkm commented on code in PR #8945:
URL: https://github.com/apache/nifi/pull/8945#discussion_r1633709196
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/process-group-status-listing/process-group-status-table/process-group-status-table.component.ts:
##########
@@ -83,7 +83,14 @@ export class ProcessGroupStatusTable extends ComponentStatusTable<ProcessGroupSt
@Input() rootProcessGroup!: ProcessGroupStatusSnapshot;
override filterPredicate(data: ProcessGroupStatusSnapshotEntity, filter: string): boolean {
- const { filterTerm, filterColumn } = JSON.parse(filter);
+ const { filterTerm, filterColumn, filterVersionedFlowState } = JSON.parse(filter);
+ const matchOnVersionedFlowState: boolean = filterVersionedFlowState !== 'All';
+
+ if (matchOnVersionedFlowState) {
+ if (this.formatVersionedFlowState(data) !== filterVersionedFlowState) {
+ return false;
+ }
Review Comment:
Updated
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13378: Adds Version State as filterable option in Process Groups tab in Summary [nifi]
Posted by "sujkm (via GitHub)" <gi...@apache.org>.
sujkm commented on PR #8945:
URL: https://github.com/apache/nifi/pull/8945#issuecomment-2159270913
@rfellows Thanks so much for reviewing!
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13378: Adds Version State as filterable option in Process Groups tab in Summary [nifi]
Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows commented on PR #8945:
URL: https://github.com/apache/nifi/pull/8945#issuecomment-2159018675
will review
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13378: Adds Version State as filterable option in Process Groups tab in Summary [nifi]
Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows commented on code in PR #8945:
URL: https://github.com/apache/nifi/pull/8945#discussion_r1633684468
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/common/summary-table-filter/summary-table-filter.component.html:
##########
@@ -50,6 +50,21 @@
</mat-form-field>
</div>
}
+ @if (includeVersionedFlowStateFilter) {
+ <div>
+ <mat-form-field subscriptSizing="dynamic">
+ <mat-label>Version State</mat-label>
+ <mat-select formControlName="filterVersionedFlowState">
+ <mat-option value="All">All States</mat-option>
+ <mat-option value="Up to date">Up to date</mat-option>
+ <mat-option value="Locally modified">Locally modified</mat-option>
+ <mat-option value="Stale">Stale</mat-option>
+ <mat-option value="Locally modified and stale">Locally modified and stale</mat-option>
+ <mat-option value="Sync failure">Sync failure</mat-option>
+ </mat-select>
Review Comment:
The values used should be the values found in the data returned from the API and not the labels that the UI has assigned to them. These are enum values defined in `org.apache.nifi.registry.flow.VersionedFlowState` and probably won't change.
However, the labels used in the UI could change at any time, especially if/when NiFi supports another language.
```suggestion
<mat-select formControlName="filterVersionedFlowState">
<mat-option value="All">All States</mat-option>
<mat-option value="UP_TO_DATE">Up to date</mat-option>
<mat-option value="LOCALLY_MODIFIED">Locally modified</mat-option>
<mat-option value="STALE">Stale</mat-option>
<mat-option value="LOCALLY_MODIFIED_AND_STALE">Locally modified and stale</mat-option>
<mat-option value="SYNC_FAILURE">Sync failure</mat-option>
</mat-select>
```
This would then require a change in the filter predicate as well... see my other comment there.
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/process-group-status-listing/process-group-status-table/process-group-status-table.component.ts:
##########
@@ -83,7 +83,14 @@ export class ProcessGroupStatusTable extends ComponentStatusTable<ProcessGroupSt
@Input() rootProcessGroup!: ProcessGroupStatusSnapshot;
override filterPredicate(data: ProcessGroupStatusSnapshotEntity, filter: string): boolean {
- const { filterTerm, filterColumn } = JSON.parse(filter);
+ const { filterTerm, filterColumn, filterVersionedFlowState } = JSON.parse(filter);
+ const matchOnVersionedFlowState: boolean = filterVersionedFlowState !== 'All';
+
+ if (matchOnVersionedFlowState) {
+ if (this.formatVersionedFlowState(data) !== filterVersionedFlowState) {
+ return false;
+ }
Review Comment:
If the value of the selection is the enum value, then we shouldn't have to coerce the data into the label displayed to compare when filtering...
```suggestion
if (data.processGroupStatusSnapshot.versionedFlowState !== filterVersionedFlowState) {
return false;
}
```
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13378: Adds Version State as filterable option in Process Groups tab in Summary [nifi]
Posted by "sujkm (via GitHub)" <gi...@apache.org>.
sujkm commented on code in PR #8945:
URL: https://github.com/apache/nifi/pull/8945#discussion_r1633708974
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/common/summary-table-filter/summary-table-filter.component.html:
##########
@@ -50,6 +50,21 @@
</mat-form-field>
</div>
}
+ @if (includeVersionedFlowStateFilter) {
+ <div>
+ <mat-form-field subscriptSizing="dynamic">
+ <mat-label>Version State</mat-label>
+ <mat-select formControlName="filterVersionedFlowState">
+ <mat-option value="All">All States</mat-option>
+ <mat-option value="Up to date">Up to date</mat-option>
+ <mat-option value="Locally modified">Locally modified</mat-option>
+ <mat-option value="Stale">Stale</mat-option>
+ <mat-option value="Locally modified and stale">Locally modified and stale</mat-option>
+ <mat-option value="Sync failure">Sync failure</mat-option>
+ </mat-select>
Review Comment:
Changed to enum values
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org