Sailesh Mukil has posted comments on this change. ( http://gerrit.cloudera.org:8080/9378 )
Change subject: KUDU-2309: /masters can show the wrong list of masters ...................................................................... Patch Set 4: (1 comment) http://gerrit.cloudera.org:8080/#/c/9378/4/www/masters.mustache File www/masters.mustache: http://gerrit.cloudera.org:8080/#/c/9378/4/www/masters.mustache@40 PS4, Line 40: {{^has_no_errors}} > In that case, the {{#errors}} section would need to surround the whole <tab I have 2 suggestions below: This is somehow not documented well, but I found this usage in Impala code. You can use the '?' symbol to check if a list is non-empty. So you could do something like this: {{?errors}} <h2>Errors</h2> <table class='table table-striped'> <thead><tr> <th>UUID</th> <th>Error</th> </tr></thead> <tbody> {{#errors}} <tr> <td>{{uuid}}</td> <td><pre><code>{{error}}</code></pre></td> </tr> {{/errors}} </tbody> </table> {{/errors}} I'm not sure if Impala and Kudu use the same version of mustache, but it's worth a try. A final suggestion is to try this, but it may or may not be what you want. We could display the static table headers unconditionally, and only fill in the body through the mustache list: <h2>Errors</h2> <table class='table table-striped'> <thead><tr> <th>UUID</th> <th>Error</th> </tr></thead> <tbody> {{#errors}} <tr> <td>{{uuid}}</td> <td><pre><code>{{error}}</code></pre></td> </tr> {{/errors}} {{^errors}} <tr> <td>N/A</td> <td>N/A</td> </tr> {{/errors}} </tbody> </table> If we don't want to display even the table header when there are no errors, then this doesn't apply. -- To view, visit http://gerrit.cloudera.org:8080/9378 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I603ebc22e998bac9bd00edc939577ae339587f26 Gerrit-Change-Number: 9378 Gerrit-PatchSet: 4 Gerrit-Owner: Will Berkeley <wdberke...@gmail.com> Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com> Gerrit-Reviewer: Andrew Wong <aw...@cloudera.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Sailesh Mukil <sail...@cloudera.com> Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Reviewer: Will Berkeley <wdberke...@gmail.com> Gerrit-Comment-Date: Tue, 06 Mar 2018 18:05:46 +0000 Gerrit-HasComments: Yes