You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "markobean (via GitHub)" <gi...@apache.org> on 2025/07/16 17:45:00 UTC
[PR] NIFI-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
markobean opened a new pull request, #10097:
URL: https://github.com/apache/nifi/pull/10097
…ary page
<!-- 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
Add a column to the table on the Connections tab of the Summary page. The load balancing status is now indicated. Possible values are Not Configured, Active and Inactive. These states are defined in the nifi-api. The column is sortable and can be used as a filter.
This feature makes it possible to find all connections throughout a flow which have load balancing configured.
[NIFI-14243](https://issues.apache.org/jira/browse/NIFI-14243)
# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [X] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [X] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [X] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
### Pull Request Formatting
- [X] Pull Request based on current revision of the `main` branch
- [X] 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
- [X] 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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "markobean (via GitHub)" <gi...@apache.org>.
markobean commented on PR #10097:
URL: https://github.com/apache/nifi/pull/10097#issuecomment-3168321846
> Reviewing the latest updates, this looks close to completion.
>
> I noticed one minor issue that could lead to confusion related to filtering. `Active` and `Inactive` work, but filtering on `Not Configured` does not work because it doesn't match the enumerated value, but `NOT_CONFIGURED` does work. This is not the most intuitive behavior, given the displayed value is `Not Configured`. One option is to render `NOT_CONFIGURED` for the column value. Another option could be to replace the space character in the `filterTerm` with `_` to allow matching.
Seems reasonable. I modified the filtering for the loadBalanceStatus column so that it replaces spaces with underscores. Now, it will match the enum value. For good measure, I also trimmed the search term to eliminate leading and trailing whitespace that may inadvertently add erroneous underscores.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "markobean (via GitHub)" <gi...@apache.org>.
markobean commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2247858668
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts:
##########
@@ -124,12 +126,27 @@ export class ConnectionStatusTable extends ComponentStatusTable<ConnectionStatus
return `${connection.connectionStatusSnapshot.percentUseCount}% | ${connection.connectionStatusSnapshot.percentUseBytes}%`;
}
+ formatLoadBalanceStatus(connection: ConnectionStatusSnapshotEntity): string {
+ switch (connection.connectionStatusSnapshot.loadBalanceStatus) {
+ case 'LOAD_BALANCE_NOT_CONFIGURED':
+ return 'Not Configured';
+ case 'LOAD_BALANCE_ACTIVE':
+ return 'Active';
+ case 'LOAD_BALANCE_INACTIVE':
+ return 'Inactive';
+ default:
+ return 'unknown';
+
+ }
Review Comment:
Oops - I was logged in to GitHub as a different user. The @nifiguy comments came from @markobean.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "nifiguy (via GitHub)" <gi...@apache.org>.
nifiguy commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2247833460
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html:
##########
@@ -193,6 +193,16 @@
</td>
</ng-container>
+ <!-- Load Balance Status Column -->
+ <ng-container matColumnDef="loadBalanceStatus">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>
+ <div class="overflow-ellipsis overflow-hidden whitespace-nowrap">Load Balance</div>
Review Comment:
It's a subtle difference, but I prefer "Load Balance" (and if necessary will add "Status" back in.) By phrasing it "Load Balancing", this is an active wording and implies active state versus configuration status. It suggest a status of "Active" means the connection is currently in the state of moving data as it load balances and that once complete or once no more data is in the connection's queue, it will update to "Inactive".
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory merged PR #10097:
URL: https://github.com/apache/nifi/pull/10097
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #10097:
URL: https://github.com/apache/nifi/pull/10097#issuecomment-3145006146
Thanks @markobean! Can you rebase on the current `main` branch? There is an issue with the GitHub Action for the `ci-workflow` that is now resolved.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "nifiguy (via GitHub)" <gi...@apache.org>.
nifiguy commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2247833460
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html:
##########
@@ -193,6 +193,16 @@
</td>
</ng-container>
+ <!-- Load Balance Status Column -->
+ <ng-container matColumnDef="loadBalanceStatus">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>
+ <div class="overflow-ellipsis overflow-hidden whitespace-nowrap">Load Balance</div>
Review Comment:
It's a subtle difference, but I prefer "Load Balance" (and if necessary will add "Status" back in.) By phrasing it "Load Balancing", this is a active wording and implies active state versus configuration status. It suggest a status of "Active" means the connection is currently in the state of moving data as it load balances and that once complete or once no more data is in the connection's queue, it will update to "Inactive".
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts:
##########
@@ -124,12 +126,27 @@ export class ConnectionStatusTable extends ComponentStatusTable<ConnectionStatus
return `${connection.connectionStatusSnapshot.percentUseCount}% | ${connection.connectionStatusSnapshot.percentUseBytes}%`;
}
+ formatLoadBalanceStatus(connection: ConnectionStatusSnapshotEntity): string {
+ switch (connection.connectionStatusSnapshot.loadBalanceStatus) {
+ case 'LOAD_BALANCE_NOT_CONFIGURED':
+ return 'Not Configured';
+ case 'LOAD_BALANCE_ACTIVE':
+ return 'Active';
+ case 'LOAD_BALANCE_INACTIVE':
+ return 'Inactive';
+ default:
+ return 'unknown';
+
+ }
Review Comment:
I'm not certain what you mean by "more dynamic". I do not like simply striking `LOAD_BALANCE_` from the string leaving `NOT_CONFIGURED`, `ACTIVE`, and `INACTIVE`. This does not render nicely in the UI, i.e. the ALL CAPS presentation is not appropriate in the UI as it feels over emphasized. Similarly, to make it all lower case using `.toLowerCase()` isn't as elegant as a natural reading presentation having the first character capitalized; it also leaves behind an odd underscore in the case of "not_configured".
Also, in reality, the `unknown` case should never occur by the nature of the `loadBalanceStatus` variable and its underlying allowable values, but is necessary for the switch statement completeness. Since it should never occur, I deliberately left it as all lowercase such that it would stand out as inconsistent and suggest a "problem" if ever it presents itself in the future.
Bottom line, I'm thinking of appropriate presentation in the UI more than elegant and minimal lines of 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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "nifiguy (via GitHub)" <gi...@apache.org>.
nifiguy commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2247833460
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html:
##########
@@ -193,6 +193,16 @@
</td>
</ng-container>
+ <!-- Load Balance Status Column -->
+ <ng-container matColumnDef="loadBalanceStatus">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>
+ <div class="overflow-ellipsis overflow-hidden whitespace-nowrap">Load Balance</div>
Review Comment:
It's a subtle difference, but I prefer "Load Balance" (and if necessary will add "Status" back in.) By phrasing it "Load Balancing", this is an active wording and implies active state versus configuration status. It suggest a status of "Active" means the connection is currently in the state of moving data as it load balances and that once complete or once no more data is in the connection's queue, it will update to "Inactive".
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "markobean (via GitHub)" <gi...@apache.org>.
markobean commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2247843909
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html:
##########
@@ -193,6 +193,16 @@
</td>
</ng-container>
+ <!-- Load Balance Status Column -->
+ <ng-container matColumnDef="loadBalanceStatus">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>
+ <div class="overflow-ellipsis overflow-hidden whitespace-nowrap">Load Balance</div>
Review Comment:
Done.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "markobean (via GitHub)" <gi...@apache.org>.
markobean commented on PR #10097:
URL: https://github.com/apache/nifi/pull/10097#issuecomment-3145020218
@exceptionfactory Sure thing. Rebase to latest `main` complete.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2246776203
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html:
##########
@@ -193,6 +193,16 @@
</td>
</ng-container>
+ <!-- Load Balance Status Column -->
+ <ng-container matColumnDef="loadBalanceStatus">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>
+ <div class="overflow-ellipsis overflow-hidden whitespace-nowrap">Load Balance</div>
Review Comment:
Recommend labeling this `Load Balancing`:
```suggestion
<div class="overflow-ellipsis overflow-hidden whitespace-nowrap">Load Balancing</div>
```
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts:
##########
@@ -124,12 +126,27 @@ export class ConnectionStatusTable extends ComponentStatusTable<ConnectionStatus
return `${connection.connectionStatusSnapshot.percentUseCount}% | ${connection.connectionStatusSnapshot.percentUseBytes}%`;
}
+ formatLoadBalanceStatus(connection: ConnectionStatusSnapshotEntity): string {
+ switch (connection.connectionStatusSnapshot.loadBalanceStatus) {
+ case 'LOAD_BALANCE_NOT_CONFIGURED':
+ return 'Not Configured';
+ case 'LOAD_BALANCE_ACTIVE':
+ return 'Active';
+ case 'LOAD_BALANCE_INACTIVE':
+ return 'Inactive';
+ default:
+ return 'unknown';
+
+ }
Review Comment:
To make this a bit more dynamic, I recommend simply removing `LOAD_BALANCE_` from the `loadBalanceStatus` string. That way `unknown` is not possible.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "markobean (via GitHub)" <gi...@apache.org>.
markobean commented on PR #10097:
URL: https://github.com/apache/nifi/pull/10097#issuecomment-3140213304
Now that 2.5.0 has been released, I rebased this PR to the current `main` updating to the latest version.
Also, I added a small change to re-word the column heading from "Load Balance Status" so simply "Load Balance". This takes up less horizontal real estate allowing additional column(s) to be added in the future without getting overly cramped.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "markobean (via GitHub)" <gi...@apache.org>.
markobean commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2247843909
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.html:
##########
@@ -193,6 +193,16 @@
</td>
</ng-container>
+ <!-- Load Balance Status Column -->
+ <ng-container matColumnDef="loadBalanceStatus">
+ <th mat-header-cell *matHeaderCellDef mat-sort-header>
+ <div class="overflow-ellipsis overflow-hidden whitespace-nowrap">Load Balance</div>
Review Comment:
Oops - I was logged in to GitHub as a different user. The @nifiguy comments came from @markobean.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2247977745
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts:
##########
@@ -124,12 +126,27 @@ export class ConnectionStatusTable extends ComponentStatusTable<ConnectionStatus
return `${connection.connectionStatusSnapshot.percentUseCount}% | ${connection.connectionStatusSnapshot.percentUseBytes}%`;
}
+ formatLoadBalanceStatus(connection: ConnectionStatusSnapshotEntity): string {
+ switch (connection.connectionStatusSnapshot.loadBalanceStatus) {
+ case 'LOAD_BALANCE_NOT_CONFIGURED':
+ return 'Not Configured';
+ case 'LOAD_BALANCE_ACTIVE':
+ return 'Active';
+ case 'LOAD_BALANCE_INACTIVE':
+ return 'Inactive';
+ default:
+ return 'unknown';
+
+ }
Review Comment:
Thanks for clarifying. The application uses uppercased values in other places, but I agree that the title case rendering is more natural. On balance then, I recommend returning the `loadBalanceStatus` value itself, instead of `unknown`.
--
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-14243 add Load Balance Status to the Connections tab of the Summ… [nifi]
Posted by "markobean (via GitHub)" <gi...@apache.org>.
markobean commented on code in PR #10097:
URL: https://github.com/apache/nifi/pull/10097#discussion_r2248265148
##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/summary/ui/connection-status-listing/connection-status-table/connection-status-table.component.ts:
##########
@@ -124,12 +126,27 @@ export class ConnectionStatusTable extends ComponentStatusTable<ConnectionStatus
return `${connection.connectionStatusSnapshot.percentUseCount}% | ${connection.connectionStatusSnapshot.percentUseBytes}%`;
}
+ formatLoadBalanceStatus(connection: ConnectionStatusSnapshotEntity): string {
+ switch (connection.connectionStatusSnapshot.loadBalanceStatus) {
+ case 'LOAD_BALANCE_NOT_CONFIGURED':
+ return 'Not Configured';
+ case 'LOAD_BALANCE_ACTIVE':
+ return 'Active';
+ case 'LOAD_BALANCE_INACTIVE':
+ return 'Inactive';
+ default:
+ return 'unknown';
+
+ }
Review Comment:
Good suggestion. I've updated to return `connection.connectionStatusSnapshot.loadBalanceStatus` in the default case.
--
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