You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/02/04 13:07:06 UTC

[GitHub] aeaversa commented on a change in pull request #3281: NIFI-5986 Adding "Stop & Configure" button functionality to Processor…

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_r253461215
 
 

 ##########
 File path: nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-processor-details.js
 ##########
 @@ -274,6 +280,82 @@
                     }
                 }];
 
+                // determine if we should show the Stop & Configure  button
+                if (top === window &&
+                        nfCommon.isDefinedAndNotNull(processor.state) &&
+                        nfCommon.isDefinedAndNotNull(processorResponse.uri) &&
+                        nfCommon.isDefinedAndNotNull(nfProcessor) &&
+                        nfCommon.isDefinedAndNotNull(nfProcessorConfiguration) ) {
+
+                    //Add in the Stop & Configure button
+                    buttons.splice(1,0,{
+                         buttonText: ' Stop & Configure',
+                         clazz: 'fa fa-stop button-icon auto-width',
+                         color: {
+                             base: '#E3E8EB',
+                             hover: '#C7D2D7',
+                             text: '#813131'
+                         },
+                         disabled : function(){
+                           return !( processor.state == "RUNNING" &&
+                                     (processorResponse.permissions.canWrite ||
+                                         processorResponse.operatePermissions.canWrite) );
+                         },
+                         handler: {
+                             click: function () {
 
 Review comment:
   @mcgilman - 100% agree with this approach and will refactor accordingly.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services