[NIFI-14033] - Disable links to referencing components while saving. (#9543)

This closes #9543
This commit is contained in:
Rob Fellows 2024-11-20 15:43:59 -05:00 committed by GitHub
parent c12c5fbd53
commit 685f5712b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 47 additions and 12 deletions

View File

@ -82,6 +82,10 @@ export const parameterContextListingReducer = createReducer(
updateRequestEntity: response.requestEntity
})
),
on(deleteParameterContextUpdateRequestSuccess, (state) => ({
...state,
saving: false
})),
on(editParameterContextComplete, (state) => {
return produce(state, (draftState) => {
const updateRequestEntity: ParameterContextUpdateRequestEntity | null = draftState.updateRequestEntity;

View File

@ -72,6 +72,7 @@
<div class="relative h-full border">
<div class="absolute inset-0 overflow-y-auto p-1">
<parameter-references
[disabledLinks]="(saving$ | async)!"
[parameterReferences]="
requestEntity.request.referencingComponents
"></parameter-references>

View File

@ -103,6 +103,7 @@
<div class="relative h-full border">
<div class="absolute inset-0 overflow-y-auto p-1">
<parameter-references
[disabledLinks]="(saving$ | async)!"
[parameterReferences]="
parameterProvider.component.affectedComponents
"></parameter-references>

View File

@ -98,9 +98,13 @@
} @else {
<div [ngClass]="getNonServiceStateIcon(reference.component)"></div>
}
<a (click)="goToReferencingComponentClicked($event, reference.component)">{{
reference.component.name
}}</a>
@if (!disabledLinks) {
<a (click)="goToReferencingComponentClicked($event, reference.component)">{{
reference.component.name
}}</a>
} @else {
<div>{{ reference.component.name }}</div>
}
@if (hasBulletins(reference)) {
<div
class="pointer fa fa-sticky-note-o primary-color"
@ -135,9 +139,15 @@
} @else {
<div [ngClass]="getServiceStateIcon(service.component)"></div>
}
<a (click)="goToReferencingComponentClicked($event, service.component)">{{
service.component.name
}}</a>
@if (!disabledLinks) {
<a (click)="goToReferencingComponentClicked($event, service.component)">{{
service.component.name
}}</a>
} @else {
<div>{{ service.component.name }}</div>
}
@if (hasBulletins(service)) {
<div
class="pointer fa fa-sticky-note-o primary-color"

View File

@ -49,6 +49,7 @@ import { MatDialogModule } from '@angular/material/dialog';
styleUrls: ['./controller-service-references.component.scss']
})
export class ControllerServiceReferences {
@Input() disabledLinks: boolean = false;
@Input() serviceReferences!: ControllerServiceReferencingComponentEntity[];
@Input() goToReferencingComponent!: (component: ControllerServiceReferencingComponent) => void;

View File

@ -157,6 +157,10 @@
<div class="relative h-full border" style="min-height: 320px">
<div class="absolute inset-0 overflow-y-auto p-1">
<controller-service-references
[disabledLinks]="
disableRequest.currentStep !== SetEnableStep.Completed &&
!disableRequest.error
"
[serviceReferences]="controllerService.component.referencingComponents"
[goToReferencingComponent]="
goToReferencingComponent

View File

@ -105,6 +105,7 @@
<div class="relative h-full border">
<div class="absolute inset-0 overflow-y-auto p-1">
<controller-service-references
[disabledLinks]="(saving$ | async)!"
[serviceReferences]="request.controllerService.component.referencingComponents"
[goToReferencingComponent]="
goToReferencingComponent

View File

@ -170,6 +170,10 @@
<div class="relative h-full border" style="min-height: 320px">
<div class="absolute inset-0 overflow-y-auto p-1">
<controller-service-references
[disabledLinks]="
enableRequest.currentStep !== SetEnableStep.Completed &&
!enableRequest.error
"
[serviceReferences]="controllerService.component.referencingComponents"
[goToReferencingComponent]="
goToReferencingComponent

View File

@ -66,9 +66,13 @@
} @else {
<div [ngClass]="getNonServiceStateIcon(reference.component)"></div>
}
<a [routerLink]="getRouteForReference(reference.component)">{{
reference.component.name
}}</a>
@if (!disabledLinks) {
<a [routerLink]="getRouteForReference(reference.component)">{{
reference.component.name
}}</a>
} @else {
<div>{{ reference.component.name }}</div>
}
@if (hasBulletins(reference)) {
<div
class="pointer fa fa-sticky-note-o primary-color"
@ -103,9 +107,13 @@
} @else {
<div [ngClass]="getServiceStateIcon(service.component)"></div>
}
<a [routerLink]="getRouteForReference(service.component)">
{{ service.component.name }}
</a>
@if (!disabledLinks) {
<a [routerLink]="getRouteForReference(service.component)">
{{ service.component.name }}
</a>
} @else {
<div>{{ service.component.name }}</div>
}
@if (hasBulletins(service)) {
<div
class="pointer fa fa-sticky-note-o primary-color"

View File

@ -50,6 +50,7 @@ import { BulletinsTip } from '../tooltips/bulletins-tip/bulletins-tip.component'
styleUrls: ['./parameter-references.component.scss']
})
export class ParameterReferences {
@Input() disabledLinks: boolean = false;
@Input() set parameterReferences(parameterReferences: AffectedComponentEntity[] | undefined) {
// reset existing state
this.processGroups = [];