Skip to content

Commit 41cdb7d

Browse files
committed
update to also handle disabled run status when user does not have operate
1 parent bc98f4e commit 41cdb7d

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/processor/edit-processor/edit-processor.component.html

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -331,21 +331,33 @@ <h2 id="edit-processor-header" mat-dialog-title>
331331
class="ml-2 -mt-1 fa fa-sort-desc"></i>
332332
</div>
333333
</button>
334-
} @else {
334+
} @else if (isDisabled()) {
335+
<button type="button"
336+
[disabled]="!canOperate()"
337+
mat-stroked-button
338+
[matMenuTriggerFor]="operateMenu">
339+
<div class="flex items-center">
340+
<i class="mr-2 icon icon-enable-false primary-color"></i>Disable<i
341+
class="ml-2 -mt-1 fa fa-sort-desc"></i>
342+
</div>
343+
</button>
344+
} @else if (isStopping()) {
345+
<button type="button"
346+
[disabled]="!canOperate()"
347+
mat-stroked-button
348+
[matMenuTriggerFor]="operateMenu">
349+
<div class="flex items-center">
350+
<i class="mr-2 fa fa-circle-o-notch fa-spin primary-color"></i>Stopping
351+
</div>
352+
</button>
353+
} @else if (isInvalid()) {
335354
<button
336355
type="button"
337356
mat-stroked-button
338-
[disabled]="isStopping() || !canOperate()"
357+
[disabled]="!canOperate()"
339358
[matMenuTriggerFor]="operateMenu">
340359
<div class="flex items-center">
341-
@if (isInvalid() && canOperate()) {
342-
<i class="mr-2 fa fa-warning caution-color"></i>
343-
} @else if (isDisabled() && canOperate()) {
344-
<i class="mr-2 icon icon-enable-false"></i>
345-
} @else {
346-
<i class="mr-2 fa fa-circle-o-notch fa-spin primary-color"></i>
347-
}
348-
{{ formatRunStatus() }}<i class="ml-2 -mt-1 fa fa-sort-desc"></i>
360+
<i class="mr-2 fa fa-warning caution-color"></i>Invalid<i class="ml-2 -mt-1 fa fa-sort-desc"></i>
349361
</div>
350362
</button>
351363
}

nifi-frontend/src/main/frontend/apps/nifi/src/app/pages/flow-designer/ui/canvas/items/processor/edit-processor/edit-processor.component.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -344,14 +344,6 @@ export class EditProcessor extends TabbedDialog {
344344
return this.nifiCommon.formatBundle(this.request.entity.component.bundle);
345345
}
346346

347-
formatRunStatus() {
348-
if (this.status.runStatus === 'Stopped' && this.status.aggregateSnapshot.activeThreadCount > 0) {
349-
return `Stopping (${this.status.aggregateSnapshot.activeThreadCount})`;
350-
}
351-
352-
return `${this.status.runStatus}`;
353-
}
354-
355347
concurrentTasksChanged(): void {
356348
if (this.schedulingStrategy === 'CRON_DRIVEN') {
357349
this.cronDrivenConcurrentTasks = this.editProcessorForm.get('concurrentTasks')?.value;

0 commit comments

Comments
 (0)