Skip to content

[NIFI-12778] manage remote ports#8433

Merged
mcgilman merged 6 commits intoapache:mainfrom
scottyaslan:NIFI-12778
Feb 29, 2024
Merged

[NIFI-12778] manage remote ports#8433
mcgilman merged 6 commits intoapache:mainfrom
scottyaslan:NIFI-12778

Conversation

@scottyaslan
Copy link
Contributor

@scottyaslan scottyaslan added the ui Pull requests for work relating to the user interface label Feb 20, 2024
@scottyaslan scottyaslan force-pushed the NIFI-12778 branch 2 times, most recently from 237dce4 to 8a1c156 Compare February 21, 2024 17:23
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.

Looking good. Thanks for the PR @scottyaslan! I've noted a few things below.

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 @scottyaslan! I noticed a few more items below.

on(loadRemotePortsSuccess, (state, { response }) => ({
...state,
ports: response.ports,
loadedTimestamp: response.rpg.component.flowRefreshed || '',
Copy link
Contributor

Choose a reason for hiding this comment

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

If the remote flow isn't current this will prevent the port listing from loading as it's used in the condition that shows the skeleton loader.

Also, flowRefreshed won't update each time the listing reloads.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now the loadedTimestamp in the store is calculated from the users browser, the flow configuration timeOffset, and the about timezone values.

Comment on lines +72 to +75
compressed: new FormControl(request.entity.useCompression || false),
count: new FormControl(request.entity.batchSettings.count || ''),
size: new FormControl(request.entity.batchSettings.size || ''),
duration: new FormControl(request.entity.batchSettings.duration || '')
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 use or and null coalescing carefully. || will evaluate to the right side if the left side evaluates to falsy. This includes null/undefined and things like 0 or empty string. If any of the settings are 0 or empty string it will evaluate to the right side. If we used ?? here instead, we would only evaluate to the ride side when the left side is null or undefined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I addressed this along with the way these values are displayed in the main table listing. Please have another look.

@scottyaslan scottyaslan requested a review from mcgilman February 29, 2024 03:18
.manage-remote-ports-table {
.listing-table {
.fa.fa-warning {
color: $canvas-accent-palette-A200;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mcgilman I wasn't sure what color (if any) this icon should be? Red seems too strong and is used throughout nifi to represent an error or invalid. However, the application does not seem to mix using this fa-warning icon with a red color but rather these fa-warning icons typically have a yellow color. I am also fine if you think we just want to leave the icon with no extra colors applied and just let it be the default .listing-table .icon color.

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 @scottyaslan! I noticed a few more items below.

}

formatDuration(entity: PortSummary): string {
if (!this.isSizeBlank(entity)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (!this.isSizeBlank(entity)) {
if (!this.isDurationBlank(entity)) {

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 @scottyaslan! Will merge once CI completes.

@mcgilman mcgilman merged commit f9c1c3f into apache:main Feb 29, 2024
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.

2 participants