[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.fellows@gmail.com>

---------

Co-authored-by: Rob Fellows <rob.fellows@gmail.com>

This closes #8768
This commit is contained in:
Scott Aslan 2024-05-08 14:08:22 -04:00 committed by GitHub
parent 43aca6597e
commit fc8f072e0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 20 additions and 10 deletions

View File

@ -16,12 +16,14 @@
--> -->
<ng-content></ng-content> <ng-content></ng-content>
<div @if (!resizeDisabled) {
<div
class="resizable-handle" class="resizable-handle"
cdkDrag cdkDrag
(cdkDragStarted)="dragStarted()" (cdkDragStarted)="dragStarted()"
(cdkDragEnded)="dragEnded($event)" (cdkDragEnded)="dragEnded($event)"
(cdkDragMoved)="dragMoved($event)"></div> (cdkDragMoved)="dragMoved($event)"></div>
@if (sub$ | async) { @if (sub$ | async) {
<div class="resizable-triangle"></div> <div class="resizable-triangle"></div>
}
} }

View File

@ -24,6 +24,7 @@ $handle-size: 15px;
} }
.resizable-handle { .resizable-handle {
background: unset;
position: absolute; position: absolute;
width: $handle-size; width: $handle-size;
height: $handle-size; height: $handle-size;

View File

@ -33,6 +33,7 @@ export class Resizable {
@Output() resized = new EventEmitter<DOMRect>(); @Output() resized = new EventEmitter<DOMRect>();
@Input() minHeight = 0; @Input() minHeight = 0;
@Input() minWidth = 0; @Input() minWidth = 0;
@Input() resizeDisabled = false;
private startSize$ = new Subject<DOMRect>(); private startSize$ = new Subject<DOMRect>();
private dragMove$ = new Subject<CdkDragMove>(); private dragMove$ = new Subject<CdkDragMove>();

View File

@ -14,7 +14,13 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ 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) { @if (statusHistoryState$ | async; as statusHistoryState) {
<h2 mat-dialog-title>Status History</h2> <h2 mat-dialog-title>Status History</h2>
<error-banner></error-banner> <error-banner></error-banner>
@ -164,7 +170,7 @@
<mat-dialog-actions align="start"> <mat-dialog-actions align="start">
<div class="flex w-full"> <div class="flex w-full">
<div class="flex-1"> <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"> <div class="refresh-container flex items-center gap-x-2">
<button mat-icon-button color="primary" (click)="refresh()"> <button mat-icon-button color="primary" (click)="refresh()">
<i <i