ijokarumawak commented on a change in pull request #3401: NIFI-6160 NIFI-6170 
Apply config error handling convention
URL: https://github.com/apache/nifi/pull/3401#discussion_r275187859
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-error-handler.js
 ##########
 @@ -65,8 +65,20 @@
             // shut off the auto refresh
             nfCanvas.stopPolling();
 
-            // allow page refresh with ctrl-r
+            // disable page refresh with ctrl-r
             nfCanvas.disableRefreshHotKey();
+        },
 
 Review comment:
   Added an `if` condition before executing these actions to disable canvas, so 
that these are only executed when the message pane is shown.
   
   I tested this works with modifying a NiFi REST API endpoint to throw 
NullPointerException. Js received 500 response and show the message pain as 
expected. Also, confirmed that `ctrl+r` hotkey is disabled.
   
![image](https://user-images.githubusercontent.com/1107620/56102890-e1254900-5f6a-11e9-9819-9f4e0d1cc51d.png)
   
   This approach is not what you suggested above that uses jQuery Deferred API, 
but I hope I understand the requirements correctly and the updated code looks 
good.

----------------------------------------------------------------
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

Reply via email to