scottyaslan commented on code in PR #9855:
URL: https://github.com/apache/nifi/pull/9855#discussion_r2308702326


##########
nifi-frontend/src/main/frontend/apps/nifi-registry/src/app/pages/expolorer/feature/explorer.component.html:
##########
@@ -0,0 +1,139 @@
+<!--
+~  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.
+-->
+
+<div class="pb-5 px-5 flex-1 flex flex-col">
+    <div class="h-full flex flex-col">
+        <h3 class="primary-color">Flows</h3>
+        <div class="flex justify-between items-center">
+            <droplet-table-filter [buckets]="buckets" 
[filterTerm]="filterTerm" [filterBucket]="filterBucket"
+                [filterColumn]="filterColumn" 
[filteredCount]="dataSource.filteredData.length" 
[totalCount]="dataSource.data.length" 
(filterChanged)="applyFilter($event)"></droplet-table-filter>
+            <button mat-flat-button (click)="openImportNewFlowDialog()">Import 
New Flow</button>
+        </div>
+        @if (droplets$; as droplets) {
+        <div class="flex-1 relative">
+            <div class="flows-table overflow-y-auto absolute inset-0">
+                <table mat-table [dataSource]="dataSource" matSort 
matSortDisableClear
+                    (matSortChange)="sortData($event)" 
[matSortActive]="sort.active"
+                    [matSortDirection]="sort.direction">
+                    <!-- Name Column -->
+                    <ng-container matColumnDef="name">
+                        <th mat-header-cell *matHeaderCellDef 
mat-sort-header>Name</th>
+                        <td mat-cell *matCellDef="let item">
+                            <div class="overflow-ellipsis overflow-hidden 
whitespace-nowrap" [title]="item.name">
+                                {{ item.name }}
+                            </div>
+                        </td>
+                    </ng-container>
+                    <!-- Bucket Column -->
+                    <ng-container matColumnDef="bucketName">
+                        <th mat-header-cell *matHeaderCellDef 
mat-sort-header>Bucket</th>
+                        <td mat-cell *matCellDef="let item">
+                            <div class="overflow-ellipsis overflow-hidden 
whitespace-nowrap" [title]="item.bucketName">
+                                {{ item.bucketName }}
+                            </div>
+                        </td>
+                    </ng-container>
+                    <!-- Flow ID Column -->
+                    <ng-container matColumnDef="bucketIdentifier">
+                        <th mat-header-cell *matHeaderCellDef 
mat-sort-header>Bucket ID</th>
+                        <td mat-cell *matCellDef="let item">
+                            <div class="overflow-ellipsis overflow-hidden 
whitespace-nowrap"
+                                [title]="item.bucketIdentifier">
+                                {{ item.bucketIdentifier }}
+                            </div>
+                        </td>
+                    </ng-container>
+                    <!-- Bucket ID Column -->
+                    <ng-container matColumnDef="identifier">
+                        <th mat-header-cell *matHeaderCellDef 
mat-sort-header>Flow ID</th>
+                        <td mat-cell *matCellDef="let item">
+                            <div class="overflow-ellipsis overflow-hidden 
whitespace-nowrap" [title]="item.identifier">
+                                {{ item.identifier }}
+                            </div>
+                        </td>
+                    </ng-container>
+                    <!-- Type Column -->
+                    <ng-container matColumnDef="type">
+                        <th mat-header-cell *matHeaderCellDef 
mat-sort-header>Type</th>
+                        <td mat-cell *matCellDef="let item">
+                            <div class="overflow-ellipsis overflow-hidden 
whitespace-nowrap" [title]="item.type">
+                                {{ item.type }}
+                            </div>
+                        </td>
+                    </ng-container>
+                    <!-- Versions Column -->
+                    <ng-container matColumnDef="versions">
+                        <th mat-header-cell *matHeaderCellDef 
mat-sort-header>Versions</th>
+                        <td mat-cell *matCellDef="let item">
+                            <div class="overflow-ellipsis overflow-hidden 
whitespace-nowrap"
+                                [title]="item.versionCount">
+                                {{ item.versionCount }}
+                            </div>
+                        </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">
+                                <!-- @if (canRemove()) { -->
+                                <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 (canRemove()) { -->
+                                    <button mat-menu-item 
(click)="openFlowVersionsDialog(item)">
+                                        <i class="fa fa-list primary-color 
mr-2"></i>
+                                        See Versions
+                                    </button>
+                                    @if (item.type === 'Flow') {}
+                                    <button mat-menu-item 
(click)="openImportNewFlowVersionDialog(item)">
+                                        <i class="fa fa-upload primary-color 
mr-2"></i>
+                                        Import new flow version
+                                    </button>
+                                    <button mat-menu-item 
(click)="openExportFlowVersionDialog(item)">
+                                        <i class="fa fa-download primary-color 
mr-2"></i>
+                                        Export flow version
+                                    </button>
+                                    <button mat-menu-item 
(click)="openDeleteDialog(item)">
+                                        <i class="fa fa-trash primary-color 
mr-2"></i>
+                                        Delete flow
+                                    </button>
+                                    <!-- } -->
+                                </mat-menu>
+                            </div>
+                        </td>
+                    </ng-container>
+                    <tr mat-header-row *matHeaderRowDef="displayedColumns; 
sticky: true"></tr>
+                    <tr mat-row *matRowDef="let row; let even = even; columns: 
displayedColumns"></tr>

Review Comment:
   I like the selection. I dislike the queryParams.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to