drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4604) Generate warning on Web UI if drillbits version mismatch is detected
Date Fri, 04 Nov 2016 15:51:59 GMT

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

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

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/482#discussion_r86572497
  
    --- Diff: exec/java-exec/src/main/resources/rest/index.ftl ---
    @@ -17,17 +17,56 @@
       <a href="/queries">back</a><br/>
       <div class="page-header">
       </div>
    -  <div class="table-responsive">
    -    <table class="table table-hover">
    -      <tbody>
    -        <#list model as stat>
    -          <tr>
    -            <td style="border:none;"><b>${stat.getName()}</b></td>
    -            <td style="border:none; font-family: Courier;">${stat.getValue()}</td>
    -          </tr>
    -        </#list>
    -      </tbody>
    -    </table>
    +
    +  <#list model.getDrillbits() as drillbit>
    +    <#if !drillbit.isVersionMatch()>
    +      <div id="message" class="alert alert-danger alert-dismissable">
    +        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
    +        <strong>Drillbits in the cluster have different versions.</strong>
    +      </div>
    +      <#break>
    +    </#if>
    +  </#list>
    +
    +  <div class="row">
    +    <div class="col-md-6">
    +      <h3>General Info</h3>
    +      <div class="table-responsive">
    +        <table class="table table-hover">
    +          <tbody>
    +            <#assign props = model.getProps()>
    +            <#list props?keys as key>
    +              <tr>
    +                <td style="border:none;"><b>${key}</b></td>
    --- End diff --
    
    I see what we're doing and it is clever. However, it forces us to put the user-visible
labels as keys. Since hash maps are unordered, it means that we can't control the order of
display of the properties. Two solutions.
    
    1. Design the layout:
    ```
    <tr><th>Version</th> ...
    <tr><td>${props.version}</td> ...
    ```
    
    Or provide two levels of dynamics:
    ```
    class DisplayPair { String key; String label; ... }
    List<DisplayPair> list = ...; list.add( "version", "Version" };
    ...
    <#list pairs as pair>
      <th>${pair.label}</th>
    ...
    <#list pairs as pair>
       <td>${model[pair.key]}</td>
    ```
    
    The first is simpler and is fine: it lets the UI decide which attributes to display, in
what form. 


> Generate warning on Web UI if drillbits version mismatch is detected
> --------------------------------------------------------------------
>
>                 Key: DRILL-4604
>                 URL: https://issues.apache.org/jira/browse/DRILL-4604
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.6.0
>            Reporter: Arina Ielchiieva
>            Assignee: Sudheesh Katkam
>              Labels: doc-impacting
>             Fix For: Future
>
>         Attachments: index_page.JPG, index_page_mismatch.JPG, screenshots_with_different_states.docx
>
>
> Display drillbit version on web UI. If any of drillbits version doesn't match with current
drillbit, generate warning.
> Screenshots - screenshots_with_different_states.docx.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message