This is an automated email from the ASF dual-hosted git repository.

rfellows pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 0ea55bebc8 NIFI-13634: Accounting for conditionally populated 
attributes based on missing 'view the data' permissions. (#9152)
0ea55bebc8 is described below

commit 0ea55bebc89b6d18d4ae2d2feadae329e6362319
Author: Matt Gilman <[email protected]>
AuthorDate: Tue Aug 6 13:45:27 2024 -0400

    NIFI-13634: Accounting for conditionally populated attributes based on 
missing 'view the data' permissions. (#9152)
    
    This closes #9152
---
 .../apps/nifi/src/app/state/shared/index.ts        |  2 +-
 .../provenance-event-dialog.component.html         | 54 +++++++++++-----------
 2 files changed, 29 insertions(+), 27 deletions(-)

diff --git 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/shared/index.ts 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/shared/index.ts
index 6f216f0d53..5deab78f2c 100644
--- a/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/shared/index.ts
+++ b/nifi-frontend/src/main/frontend/apps/nifi/src/app/state/shared/index.ts
@@ -168,7 +168,7 @@ export interface ProvenanceEvent extends 
ProvenanceEventSummary {
     clusterNodeAddress: string;
     sourceSystemFlowFileId: string;
     alternateIdentifierUri: string;
-    attributes: Attribute[];
+    attributes?: Attribute[];
     parentUuids: string[];
     childUuids: string[];
     transitUri: string;
diff --git 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/provenance-event-dialog/provenance-event-dialog.component.html
 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/provenance-event-dialog/provenance-event-dialog.component.html
index fcce9f206f..c838d73515 100644
--- 
a/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/provenance-event-dialog/provenance-event-dialog.component.html
+++ 
b/nifi-frontend/src/main/frontend/apps/nifi/src/app/ui/common/provenance-event-dialog/provenance-event-dialog.component.html
@@ -224,40 +224,42 @@
                 </div>
             </mat-dialog-content>
         </mat-tab>
-        <mat-tab label="Attributes">
-            <mat-dialog-content>
-                <div class="dialog-tab-content">
-                    <div class="flex flex-col gap-y-4">
-                        <div class="flex justify-between">
-                            <div class="mat-body-strong 
primary-color">Attribute Values</div>
-                            <div class="flex items-center gap-x-1">
-                                <mat-checkbox color="primary" 
[(ngModel)]="onlyShowModifiedAttributes"></mat-checkbox>
-                                <div>Show modified attributes only</div>
+        @if (request.event.attributes !== undefined) {
+            <mat-tab label="Attributes">
+                <mat-dialog-content>
+                    <div class="dialog-tab-content">
+                        <div class="flex flex-col gap-y-4">
+                            <div class="flex justify-between">
+                                <div class="mat-body-strong 
primary-color">Attribute Values</div>
+                                <div class="flex items-center gap-x-1">
+                                    <mat-checkbox color="primary" 
[(ngModel)]="onlyShowModifiedAttributes"></mat-checkbox>
+                                    <div>Show modified attributes only</div>
+                                </div>
                             </div>
-                        </div>
-                        <div class="flex flex-col">
-                            <div *ngFor="let attribute of 
request.event.attributes">
-                                <div *ngIf="shouldShowAttribute(attribute)" 
class="mb-4 flex flex-col">
-                                    <div>{{ attribute.name }}</div>
-                                    <ng-container
-                                        *ngTemplateOutlet="
-                                            formatValue;
-                                            context: { $implicit: 
attribute.value }
-                                        "></ng-container>
-                                    <ng-container 
*ngIf="attributeValueChanged(attribute)">
+                            <div class="flex flex-col">
+                                @for (attribute of request.event.attributes; 
track attribute.name) {
+                                    <div 
*ngIf="shouldShowAttribute(attribute)" class="mb-4 flex flex-col">
+                                        <div>{{ attribute.name }}</div>
                                         <ng-container
                                             *ngTemplateOutlet="
                                                 formatValue;
-                                                context: { $implicit: 
attribute.previousValue }
+                                                context: { $implicit: 
attribute.value }
                                             "></ng-container>
-                                    </ng-container>
-                                </div>
+                                        <ng-container 
*ngIf="attributeValueChanged(attribute)">
+                                            <ng-container
+                                                *ngTemplateOutlet="
+                                                    formatValue;
+                                                    context: { $implicit: 
attribute.previousValue }
+                                                "></ng-container>
+                                        </ng-container>
+                                    </div>
+                                }
                             </div>
                         </div>
                     </div>
-                </div>
-            </mat-dialog-content>
-        </mat-tab>
+                </mat-dialog-content>
+            </mat-tab>
+        }
         <mat-tab label="Content">
             <mat-dialog-content>
                 <div class="dialog-tab-content">

Reply via email to