mcgilman commented on code in PR #9221:
URL: https://github.com/apache/nifi/pull/9221#discussion_r1739270881


##########
nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/content-viewer/feature/content-viewer.component.html:
##########
@@ -0,0 +1,49 @@
+<!--
+  ~ 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="content-viewer-background h-screen flex flex-col gap-y-4 p-4">
+    <div class="flex justify-between items-center">
+        <div>
+            <img ngSrc="assets/icons/nifi-logo-about.svg" priority width="150" 
height="64" alt="NiFi Logo" />
+        </div>
+        <form [formGroup]="viewerForm">
+            <mat-form-field subscriptSizing="dynamic" class="w-72">
+                <mat-label>View</mat-label>
+                <mat-select formControlName="viewAs" 
(selectionChange)="viewAsChanged($event)">
+                    @for (groupOption of viewAsOptions; track 
groupOption.text) {
+                        @if (groupOption.options.length > 1) {
+                            <mat-optgroup [label]="groupOption.text">
+                                @for (option of groupOption.options; track 
option.value) {
+                                    <mat-option [value]="option.value">{{ 
option.text }}</mat-option>
+                                }
+                            </mat-optgroup>
+                        } @else {
+                            <mat-option 
[value]="groupOption.options[0].value">{{ groupOption.text }}</mat-option>
+                        }
+                    }
+                </mat-select>
+            </mat-form-field>
+        </form>
+    </div>
+    <div class="p-2 flex-1 flex border overflow-y-auto">
+        @if (viewerSelected) {
+            <router-outlet></router-outlet>
+        } @else {
+            <div class="unset">No data reference specified</div>

Review Comment:
   I think we should be falling back to the `hex` viewer when encountering an 
unsupported mime type. If the data ref has been specified we should do our best 
to load it with the correct viewer, but if we cannot we should be falling back 
to `hex`. Let me track down why that resulted in the `No data reference 
specified` message.



-- 
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