[NIFI-13355] move view cluster details and view flow configuration details into action kebab menus (#8921)

This closes #8921
This commit is contained in:
Scott Aslan 2024-06-04 08:58:32 -04:00 committed by GitHub
parent cfcae70d37
commit 89f153aad8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 34 additions and 49 deletions

View File

@ -36,19 +36,6 @@
(matSortChange)="sortData($event)"
[matSortActive]="initialSortColumn"
[matSortDirection]="initialSortDirection">
<!-- More Details Column -->
<ng-container matColumnDef="moreDetails">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let item">
<div class="flex items-center gap-x-2">
<div
class="pointer fa fa-info-circle primary-color"
(click)="moreDetail(item)"
title="Detail"></div>
</div>
</td>
</ng-container>
<!-- Node Address -->
<ng-container matColumnDef="address">
<th mat-header-cell *matHeaderCellDef mat-sort-header title="Node Address">
@ -161,6 +148,10 @@
</button>
}
<mat-menu #actionMenu="matMenu" xPosition="before">
<button mat-menu-item (click)="moreDetail(item)">
<i class="fa fa-info-circle primary-color mr-2"></i>
Detail
</button>
@if (item.status === 'CONNECTED' || item.status === 'CONNECTING') {
<button mat-menu-item (click)="disconnect(item)">
<i class="fa fa-power-off primary-color mr-2"></i>

View File

@ -18,10 +18,6 @@
.cluster-node-table {
.listing-table {
table {
.mat-column-moreDetails {
width: 32px;
}
.mat-column-address {
width: 25%;
}

View File

@ -80,15 +80,7 @@ export class ClusterNodeTable extends ClusterTable<ClusterNode> {
{ key: 'status', label: 'Status' }
];
displayedColumns: string[] = [
'moreDetails',
'address',
'activeThreadCount',
'queued',
'status',
'nodeStartTime',
'heartbeat'
];
displayedColumns: string[] = ['address', 'activeThreadCount', 'queued', 'status', 'nodeStartTime', 'heartbeat'];
constructor(private nifiCommon: NiFiCommon) {
super();

View File

@ -25,22 +25,6 @@
(matSortChange)="sortData($event)"
[matSortActive]="initialSortColumn"
[matSortDirection]="initialSortDirection">
<ng-container matColumnDef="moreDetails">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let item">
<ng-container>
<div class="flex items-center gap-x-2">
@if (canRead(item)) {
<div
class="pointer fa fa-info-circle primary-color"
title="View Details"
(click)="moreDetails(item)"></div>
}
</div>
</ng-container>
</td>
</ng-container>
<!-- Date/Time Column -->
<ng-container matColumnDef="timestamp">
<th mat-header-cell *matHeaderCellDef mat-sort-header>
@ -103,6 +87,30 @@
</td>
</ng-container>
<!-- Actions Column -->
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let item">
<div class="flex items-center justify-end gap-x-2">
<button
mat-icon-button
type="button"
[matMenuTriggerFor]="actionMenu"
class="h-16 w-16 flex items-center justify-center icon global-menu">
<i class="fa fa-ellipsis-v"></i>
</button>
<mat-menu #actionMenu="matMenu" xPosition="before">
@if (canRead(item)) {
<button mat-menu-item (click)="moreDetails(item)">
<i class="fa fa-info-circle primary-color mr-2"></i>
View Details
</button>
}
</mat-menu>
</div>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: true"></tr>
<tr
mat-row

View File

@ -17,10 +17,6 @@
.flow-configuration-history-table {
.listing-table {
.mat-column-moreDetails {
width: 32px;
}
.mat-column-sourceName {
width: 25%;
}

View File

@ -20,11 +20,13 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
import { MatSortModule, Sort } from '@angular/material/sort';
import { ActionEntity } from '../../../state/flow-configuration-history-listing';
import { MatIconButton } from '@angular/material/button';
import { MatMenu, MatMenuItem, MatMenuTrigger } from '@angular/material/menu';
@Component({
selector: 'flow-configuration-history-table',
standalone: true,
imports: [MatTableModule, MatSortModule],
imports: [MatTableModule, MatSortModule, MatIconButton, MatMenu, MatMenuTrigger, MatMenuItem],
templateUrl: './flow-configuration-history-table.component.html',
styleUrls: ['./flow-configuration-history-table.component.scss']
})
@ -50,13 +52,13 @@ export class FlowConfigurationHistoryTable {
};
displayedColumns: string[] = [
'moreDetails',
'timestamp',
'sourceId',
'sourceName',
'sourceType',
'operation',
'userIdentity'
'userIdentity',
'actions'
];
dataSource: MatTableDataSource<ActionEntity> = new MatTableDataSource<ActionEntity>();