-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
[NIFI-13053] Cluster page #8685
Conversation
Will review... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @rfellows! I've left a few comments below. Most are minor but did notice one bigger issue. In the existing NiFi UI, the tabs that are populated through system diagnostics are hidden when the user lacks those permissions.
const routes: Routes = [ | ||
{ | ||
path: '', | ||
component: Cluster, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the changes to navigation.component.html
we should be using the authorizationGuard
to ensure the user has:
user.controllerPermissions.canRead
from(this.clusterService.disconnectNode(request.nodeId)).pipe( | ||
map((entity) => { | ||
this.dialog.closeAll(); | ||
return ClusterListingActions.updateNodeSuccess({ response: entity }); | ||
}), | ||
catchError((errorResponse: HttpErrorResponse) => { | ||
this.dialog.closeAll(); | ||
return of(ClusterListingActions.clusterNodeSnackbarError({ error: errorResponse.error })); | ||
}) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The this.dialog.closeAll()
in this effect is unnecessary. The YesNoDialog
does not stay open when the user presses Yes
or No
.
from(this.clusterService.connectNode(request.nodeId)).pipe( | ||
map((entity) => { | ||
this.dialog.closeAll(); | ||
return ClusterListingActions.updateNodeSuccess({ response: entity }); | ||
}), | ||
catchError((errorResponse: HttpErrorResponse) => { | ||
this.dialog.closeAll(); | ||
return of(ClusterListingActions.clusterNodeSnackbarError({ error: errorResponse.error })); | ||
}) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The this.dialog.closeAll()
in this effect is unnecessary. The YesNoDialog
does not stay open when the user presses Yes
or No
.
from(this.clusterService.offloadNode(request.nodeId)).pipe( | ||
map((entity) => { | ||
this.dialog.closeAll(); | ||
return ClusterListingActions.updateNodeSuccess({ response: entity }); | ||
}), | ||
catchError((errorResponse: HttpErrorResponse) => { | ||
this.dialog.closeAll(); | ||
return of(ClusterListingActions.clusterNodeSnackbarError({ error: errorResponse.error })); | ||
}) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The this.dialog.closeAll()
in this effect is unnecessary. The YesNoDialog
does not stay open when the user presses Yes
or No
.
from(this.clusterService.removeNode(request.nodeId)).pipe( | ||
map(() => { | ||
this.dialog.closeAll(); | ||
return ClusterListingActions.removeNodeSuccess({ response: request }); | ||
}), | ||
catchError((errorResponse: HttpErrorResponse) => { | ||
this.dialog.closeAll(); | ||
return of(ClusterListingActions.clusterNodeSnackbarError({ error: errorResponse.error })); | ||
}) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The this.dialog.closeAll()
in this effect is unnecessary. The YesNoDialog
does not stay open when the user presses Yes
or No
.
return this._initialSortDirection; | ||
} | ||
|
||
@Input({}) set components(components: T[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this {}
empty object needed here?
<!-- Node Address --> | ||
<ng-container matColumnDef="address"> | ||
<th mat-header-cell *matHeaderCellDef mat-sort-header title="Node Address"> | ||
<div class="flex-1 overflow-ellipsis overflow-hidden whitespace-nowrap"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that flex-1
isn needed in our column headers. This would apply to all headers in all tables in this PR.
.cluster-table-filter-container { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be removed?
import { ClusterVersionTable } from './cluster-version-table.component'; | ||
import { NoopAnimationsModule } from '@angular/platform-browser/animations'; | ||
|
||
describe('ClusterVersionTableComponent', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
describe('ClusterVersionTableComponent', () => { | |
describe('ClusterVersionTable', () => { |
{ label: 'System', link: 'system' }, | ||
{ label: 'JVM', link: 'jvm' }, | ||
{ label: 'FlowFile Storage', link: 'flowfile-storage' }, | ||
{ label: 'Content Storage', link: 'content-storage' }, | ||
{ label: 'Provenance Storage', link: 'provenance-storage' }, | ||
{ label: 'Versions', link: 'versions' } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The presence of these tabs should be conditional on the users permissions to System Diagnostics.
0cbc3a7
to
6a6fe89
Compare
There was a problem hiding this 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 @rfellows! Will merge once CI completes.
* Node listing
…the user has the proper permission.
…state when user loses permission to it while on the cluster page.
58c1bf2
to
6c00aaf
Compare
* [NIFI-13053] - Cluster Node Table/Page * Node listing * System Listing * Jvm Listing * FlowFile Storage listing * Content and Provenance Repo Storage listings * Version listing * review feedback * only attempt to load system diagnostic info for cluster node view if the user has the proper permission. * Move Cluster Summary loading/polling to the navigation component. * restore user state resetting when users component is destroyed. * reset state on cluster component destroy and reset system diagnostic state when user loses permission to it while on the cluster page. This closes apache#8685
* [NIFI-13053] - Cluster Node Table/Page * Node listing * System Listing * Jvm Listing * FlowFile Storage listing * Content and Provenance Repo Storage listings * Version listing * review feedback * only attempt to load system diagnostic info for cluster node view if the user has the proper permission. * Move Cluster Summary loading/polling to the navigation component. * restore user state resetting when users component is destroyed. * reset state on cluster component destroy and reset system diagnostic state when user loses permission to it while on the cluster page. This closes apache#8685
NIFI-13053
All table here extend a base table
ClusterTable
and leverage the same filter component. The "Storage" pages all share the same same table implementation.