summary.hbs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  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="row-fluid service-block">
  19. <div class="span6">
  20. {{#if view.service.quickLinks.length}}
  21. {{#view App.QuickViewLinks contentBinding="view.service"}}
  22. <ul class="nav nav-pills move">
  23. <li class="dropdown">
  24. <a class="dropdown-toggle" data-toggle="dropdown" href="#">Quick Links<b class="caret"></b></a>
  25. <ul class="dropdown-menu">
  26. {{#each view.quickLinks}}
  27. <a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a>
  28. {{/each}}
  29. </ul>
  30. </li>
  31. </ul>
  32. {{/view}}
  33. {{/if}}
  34. <div class="box">
  35. <div class="box-header">
  36. <h4>{{controller.content.label}} Summary</h4>
  37. </div>
  38. <div class="service-content">
  39. <table id="summary-info" class="table no-borders table-condensed">
  40. <tbody>
  41. {{#unless view.serviceStatus.oozie}}
  42. {{#unless view.serviceStatus.hive}}
  43. {{#unless view.serviceStatus.zookeeper}}
  44. {{#unless view.serviceStatus.hdfs}}
  45. {{#unless view.serviceStatus.mapreduce}}
  46. {{#unless view.serviceStatus.hbase}}
  47. {{#each component in controller.content.components}}
  48. <tr>
  49. {{#if component.isMaster}}
  50. <td class="summary-label">{{component.displayName}}</td>
  51. <td><a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a></td>
  52. {{else}}
  53. <td class="summary-label">{{component.displayName}}s</td>
  54. <td><a {{action filterHosts component}} href="javascript:void(null)">{{component.displayName}}s</a></td>
  55. {{/if}}
  56. </tr>
  57. {{/each}}
  58. {{#if view.serviceStatus.ganglia}}
  59. <tr>
  60. <td class="summary-label">Ganglia Web UI</td>
  61. <td><a target=_blank href="http://{{unbound view.gangliaServer}}/ganglia">{{view.gangliaServer}}/ganglia</a></td>
  62. </tr>
  63. {{/if}}
  64. {{#if view.serviceStatus.nagios}}
  65. <tr>
  66. <td class="summary-label">Nagios Web UI</td>
  67. <td><a target=_blank href="http://{{unbound view.nagiosServer}}/nagios">{{view.nagiosServer}}/nagios</a></td>
  68. </tr>
  69. {{/if}}
  70. {{/unless}}
  71. {{/unless}}
  72. {{/unless}}
  73. {{/unless}}
  74. {{/unless}}
  75. {{/unless}}
  76. {{#if view.serviceStatus.hdfs}}
  77. {{view App.MainDashboardServiceHdfsView showOnlyRows=true serviceBinding="view.service"}}
  78. {{/if}}
  79. {{#if view.serviceStatus.mapreduce}}
  80. {{view App.MainDashboardServiceMapreduceView showOnlyRows=true serviceBinding="view.service"}}
  81. {{/if}}
  82. {{#if view.serviceStatus.hbase}}
  83. {{view App.MainDashboardServiceHbaseView showOnlyRows=true serviceBinding="view.service"}}
  84. {{/if}}
  85. {{#if view.serviceStatus.zookeeper}}
  86. <tr>
  87. <td class="summary-label">Hosts</td>
  88. <td>
  89. {{#each component in controller.content.components}}
  90. <a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a>
  91. {{/each}}
  92. </td>
  93. </tr>
  94. {{/if}}
  95. {{#if view.serviceStatus.oozie}}
  96. <tr>
  97. <td class="summary-label">Hosts</td>
  98. <td>
  99. {{#each component in controller.content.components}}
  100. <a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a>
  101. {{/each}}
  102. </td>
  103. </tr>
  104. {{/if}}
  105. {{#if view.serviceStatus.hive}}
  106. <tr>
  107. <td class="summary-label">Host</td>
  108. <td>
  109. {{#each component in controller.content.components}}
  110. <a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a>
  111. {{/each}}
  112. </td>
  113. </tr>
  114. <tr>
  115. <td>Database</td>
  116. <td>{{view.data.hive.database}}</td>
  117. </tr>
  118. <tr>
  119. <td>Database Name</td>
  120. <td>{{view.data.hive.databaseName}}</td>
  121. </tr>
  122. <tr>
  123. <td>User</td>
  124. <td>{{view.data.hive.user}}</td>
  125. </tr>
  126. {{/if}}
  127. </tbody>
  128. </table>
  129. {{!view view.moreStatsView}}
  130. </div>
  131. {{!
  132. <div class="box-footer">
  133. </div>
  134. }}
  135. </div>
  136. </div>
  137. <div class="span6">
  138. {{#if view.hasAlertsBox }}
  139. <div class="box">
  140. <div class="box-header">
  141. <h4>Alerts and Health Checks</h4>
  142. <div class="btn-group">
  143. <a class="btn" target="_blank" rel="tooltip" title="Go to Nagios" {{bindAttr href="controller.nagiosUrl"}}><i class="icon-link"></i></a>
  144. </div>
  145. </div>
  146. <ul id='summary-alerts-list' class="alerts">
  147. {{#if controller.alerts.length}}
  148. {{#each controller.alerts}}
  149. {{view view.alertItemView contentBinding="this"}}
  150. {{/each}}
  151. {{else}}
  152. {{#if controller.isNagiosInstalled}}
  153. <div class="alert alert-info">
  154. No alerts
  155. </div>
  156. {{else}}
  157. <div class="alert">
  158. Nagios service required for viewing alerts
  159. </div>
  160. {{/if}}
  161. {{/if}}
  162. </ul>
  163. </div>
  164. {{/if}}
  165. </div>
  166. </div>
  167. {{#if view.serviceMetricGraphs.length}}
  168. <div class="row-fluid">
  169. <div class="span12">
  170. <div class="box">
  171. <div class="box-header">
  172. <h4>{{controller.content.label}} Metrics</h4>
  173. <div class="btn-group">
  174. <a class="btn" target="_blank" rel="tooltip" title="Go to Ganglia" {{bindAttr href="view.gangliaUrl"}}><i class="icon-link"></i></a>
  175. </div>
  176. </div>
  177. <div class="summary-metric-graphs row-fluid">
  178. {{#each graph in view.serviceMetricGraphs}}
  179. <div class="span3">
  180. {{view graph}}
  181. </div>
  182. {{/each}}
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. {{/if}}