NissimShiman commented on code in PR #7833:
URL: https://github.com/apache/nifi/pull/7833#discussion_r1362277274
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-controller-services.js:
##########
@@ -1090,7 +1090,7 @@
} else if (target.hasClass('delete-controller-service')) {
nfControllerService.promptToDeleteController(serviceTable,
controllerServiceEntity);
} else if (target.hasClass('view-state-controller-service')) {
- nfComponentState.showState(controllerServiceEntity,
controllerServiceEntity.state === 'DISABLED');
+ nfComponentState.showState(controllerServiceEntity,
controllerServiceEntity.component.state === 'DISABLED');
Review Comment:
@annanys23 I tried it and it works. Very nice!
I was thinking maybe there should be a check for activeThreadCount as well.
We do this for
[reportingTasks](https://github.com/apache/nifi/blob/rel/nifi-1.23.2/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-settings.js#L1793-L1794)
So we would have something like:
```
var canClear = controllerServiceEntity.status.runStatus === 'DISABLED' &&
(nfCommon.isUndefinedOrNull(controllerServiceEntity.status.activeThreadCount)
|| controllerServiceEntity.status.activeThreadCount === 0);
nfComponentState.showState(controllerServiceEntity, canClear);
```
--
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]