aeaversa commented on a change in pull request #3281: NIFI-5986 Adding "Stop &
Configure" button functionality to Processor…
URL: https://github.com/apache/nifi/pull/3281#discussion_r278694475
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-processor-configuration.js
##########
@@ -885,8 +915,61 @@
});
}
+ //Synchronize the current component canvas attributes in
the status bar
+ if(config.supportsStatusBar){
+
+ //initialize the synchronization
+ var target = function() {
+
$('#processor-configuration').modal('refreshButtons');
+ return nfProcessor.get(processor.id);
+ };
+
$("#processor-configuration-status-bar").statusbar('observe',target);
+
+ //if there are active threads, add the terminate
button to the status bar
+ if(nfCommon.isDefinedAndNotNull(config.nfActions) &&
+
nfCommon.getKeyValue(processorResponse,ACTIVE_THREAD_COUNT_KEY) != 0){
+
+
$("#processor-configuration-status-bar").statusbar('buttons',[{
+ buttonText: 'Terminate',
+ clazz: 'fa fa-hourglass-end button-icon',
+ color: {
+ hover: '#C7D2D7',
+ base: 'transparent',
+ text: '#004849'
+ },
+ disabled : function() {
+ var selection =
nfCanvasUtils.getSelectionById(processor.id);
Review comment:
@mcgilman - Refactored to remove duplicated selection.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services