hbase_links.hbs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {{!
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. }}
  18. <div class="links">
  19. <ul>
  20. <li class="thumbnail row">
  21. <a {{bindAttr class=":corner-icon :span1 view.parentView.isMoving:hidden"}}
  22. href="#" {{action deleteWidget target="view"}}><i class="icon-remove-sign icon-large"></i></a>
  23. <div class="caption span10"> {{view.title}}</div>
  24. {{#if view.isDataLoaded}}
  25. <div class="widget-content">
  26. <table>
  27. <!--hbase master server-->
  28. <tr class="hbase-master-link">
  29. <td>
  30. {{#if view.activeMaster}}
  31. <a href="#" {{action showDetails view.activeMaster.host}}>{{t dashboard.services.hbase.masterServer}}</a>
  32. {{else}}
  33. {{t dashboard.services.hbase.noMasterServer}}
  34. {{/if}}
  35. </td>
  36. </tr>
  37. <!--region servers-->
  38. <tr class="hbase-regionserver-link">
  39. <td>
  40. <a href="#" {{action filterHosts view.component}}>{{view.model.regionServersTotal}} {{t dashboard.services.hbase.regionServers}}</a>
  41. </td>
  42. </tr>
  43. <!--hbase master Web UI-->
  44. <tr class="hbase-web-ui-link">
  45. <td>
  46. {{#if view.activeMaster}}
  47. <a {{bindAttr href="view.hbaseMasterWebUrl"}}
  48. target="_blank">{{t dashboard.services.hbase.masterWebUI}}</a>
  49. {{else}}
  50. {{t services.service.summary.notAvailable}}
  51. {{/if}}
  52. </td>
  53. </tr>
  54. </table>
  55. </div>
  56. <div class="link-button">
  57. {{#if view.model.quickLinks.length}}
  58. {{#view App.QuickLinksView contentBinding="view.model"}}
  59. <div class="btn-group">
  60. <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#">
  61. {{t common.more}}
  62. <span class="caret"></span>
  63. </a>
  64. <ul class="dropdown-menu">
  65. {{#if view.isLoaded}}
  66. {{#if view.quickLinksArray}}
  67. <!--there are multiple masters eg, HBase multiple masters or HDFS HA enabled-->
  68. {{#each quickLinks in view.quickLinksArray}}
  69. <li class="dropdown-submenu">
  70. <a href="javascript:void(null)">{{quickLinks.publicHostNameLabel}} &nbsp;</a>
  71. <ul class="dropdown-menu">
  72. {{#each quickLinks}}
  73. <li><a {{bindAttr href="url"}} target="_blank">{{label}}</a></li>
  74. {{/each}}
  75. </ul>
  76. </li>
  77. {{/each}}
  78. {{else}}
  79. {{#each view.quickLinks}}
  80. <li><a {{bindAttr href="url"}} target="_blank">{{label}}</a></li>
  81. {{/each}}
  82. {{/if}}
  83. {{else}}
  84. {{view App.SpinnerView}}
  85. {{/if}}
  86. </ul>
  87. </div>
  88. {{/view}}
  89. {{/if}}
  90. </div>
  91. {{else}}
  92. {{view App.SpinnerView}}
  93. {{/if}}
  94. </li>
  95. </ul>
  96. </div>