[ 
https://issues.apache.org/jira/browse/DRILL-6364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16470783#comment-16470783
 ] 

ASF GitHub Bot commented on DRILL-6364:
---------------------------------------

kkhatua commented on a change in pull request #1241: DRILL-6364: Handle Cluster 
Info in WebUI when existing/new bits restart
URL: https://github.com/apache/drill/pull/1241#discussion_r187398773
 
 

 ##########
 File path: exec/java-exec/src/main/resources/rest/index.ftl
 ##########
 @@ -217,21 +217,34 @@
       </div>
   </div>
    <script charset="utf-8">
-      var updateRemoteInfo = <#if 
(model.isAuthEnabled())>false<#else>true</#if>;
       var refreshTime = 10000;
+      var nAText = "Not Available";
       var refresh = getRefreshTime();
       var timeout;
       var size = $("#size").html();
       reloadMetrics();
       setInterval(reloadMetrics, refreshTime);
+      var hideShutdownBtns = setShutdownCtrl();
 
+      //Hide Shutdown buttons for remote HTTPS entries
+      function setShutdownCtrl() {
+        for (i = 1; i <= size; i++) {
+          let currentRow = $("#row-"+i);
+          if ( location.protocol == "https" && 
(currentRow.find("#current").html() != "Current") ) {
 
 Review comment:
   I can't do that check because Javascript seems to be returning an object 
even for remote Drillbits. So, this is the correct (and reliable) way to do it. 
   (This is also how it has been used for populating the running queries during 
shutdown: 
https://github.com/apache/drill/blob/master/exec/java-exec/src/main/resources/rest/index.ftl#L274
 )

----------------------------------------------------------------
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:
us...@infra.apache.org


> WebUI does not cleanly handle shutdown and state toggling when Drillbits go 
> on and offline
> ------------------------------------------------------------------------------------------
>
>                 Key: DRILL-6364
>                 URL: https://issues.apache.org/jira/browse/DRILL-6364
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Web Server
>            Reporter: Kunal Khatua
>            Assignee: Kunal Khatua
>            Priority: Major
>             Fix For: 1.14.0
>
>
> When the webpage is loaded the first time, the shutdown button is enabled by 
> default, which might not be correct, since scenarios like HTTPS, etc does not 
> support this for remote bits. (i.e the user needs to navigate to that node's 
> UI for shutting it down). 
> Similarly, when a previously unseen Drillbit comes online, the node will not 
> be rendered until the page is refreshed by the user. 
> Lastly, if the node from whom the UI page was served goes down, the status 
> update for the rest of the cluster is not updated.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to