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 fc8f072e0a [NIFI-13165] hide resize handle is status history when 
insufficient h… (#8768)
fc8f072e0a is described below

commit fc8f072e0a87c5fc627050f39089c58c4e9b11b2
Author: Scott Aslan <scottyas...@users.noreply.github.com>
AuthorDate: Wed May 8 14:08:22 2024 -0400

    [NIFI-13165] hide resize handle is status history when insufficient h… 
(#8768)
    
    * [NIFI-13165] hide resize handle is status history when insufficient 
history
    
    * hide last updated/refresh button when insufficient history
    
    * Update 
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/status-history/status-history.component.html
    
    Co-authored-by: Rob Fellows <rob.fell...@gmail.com>
    
    ---------
    
    Co-authored-by: Rob Fellows <rob.fell...@gmail.com>
    
    This closes #8768
---
 .../app/ui/common/resizable/resizable.component.html   | 18 ++++++++++--------
 .../app/ui/common/resizable/resizable.component.scss   |  1 +
 .../src/app/ui/common/resizable/resizable.component.ts |  1 +
 .../status-history/status-history.component.html       | 10 ++++++++--
 4 files changed, 20 insertions(+), 10 deletions(-)

diff --git 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.html
 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.html
index dfa2a33325..42cd51b7e1 100644
--- 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.html
+++ 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.html
@@ -16,12 +16,14 @@
   -->
 
 <ng-content></ng-content>
-<div
-    class="resizable-handle"
-    cdkDrag
-    (cdkDragStarted)="dragStarted()"
-    (cdkDragEnded)="dragEnded($event)"
-    (cdkDragMoved)="dragMoved($event)"></div>
-@if (sub$ | async) {
-    <div class="resizable-triangle"></div>
+@if (!resizeDisabled) {
+    <div
+        class="resizable-handle"
+        cdkDrag
+        (cdkDragStarted)="dragStarted()"
+        (cdkDragEnded)="dragEnded($event)"
+        (cdkDragMoved)="dragMoved($event)"></div>
+    @if (sub$ | async) {
+        <div class="resizable-triangle"></div>
+    }
 }
diff --git 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.scss
 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.scss
index 3ac2025b19..65b66b11b2 100644
--- 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.scss
+++ 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.scss
@@ -24,6 +24,7 @@ $handle-size: 15px;
 }
 
 .resizable-handle {
+    background: unset;
     position: absolute;
     width: $handle-size;
     height: $handle-size;
diff --git 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.ts
 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.ts
index 76ba77693c..cdbb9c709b 100644
--- 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.ts
+++ 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/resizable/resizable.component.ts
@@ -33,6 +33,7 @@ export class Resizable {
     @Output() resized = new EventEmitter<DOMRect>();
     @Input() minHeight = 0;
     @Input() minWidth = 0;
+    @Input() resizeDisabled = false;
 
     private startSize$ = new Subject<DOMRect>();
     private dragMove$ = new Subject<CdkDragMove>();
diff --git 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/status-history/status-history.component.html
 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/status-history/status-history.component.html
index e86b03d2da..82c9a6e982 100644
--- 
a/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/status-history/status-history.component.html
+++ 
b/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-frontend/src/main/nifi/src/app/ui/common/status-history/status-history.component.html
@@ -14,7 +14,13 @@
 ~  See the License for the specific language governing permissions and
 ~  limitations under the License.
 -->
-<div resizable (resized)="resized()" [minHeight]="720" [minWidth]="887" 
class="flex flex-col status-history-container">
+<div
+    resizable
+    [resizeDisabled]="instances.length === 0 || fieldDescriptors.length === 0"
+    (resized)="resized()"
+    [minHeight]="720"
+    [minWidth]="887"
+    class="flex flex-col status-history-container">
     @if (statusHistoryState$ | async; as statusHistoryState) {
         <h2 mat-dialog-title>Status History</h2>
         <error-banner></error-banner>
@@ -164,7 +170,7 @@
             <mat-dialog-actions align="start">
                 <div class="flex w-full">
                     <div class="flex-1">
-                        @if (instances.length > 0) {
+                        @if (instances.length > 0 && fieldDescriptors.length > 
0) {
                             <div class="refresh-container flex items-center 
gap-x-2">
                                 <button mat-icon-button color="primary" 
(click)="refresh()">
                                     <i

Reply via email to