summary.hbs 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  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. {{/unless}}
  59. {{/unless}}
  60. {{/unless}}
  61. {{/unless}}
  62. {{/unless}}
  63. {{/unless}}
  64. {{#if view.serviceStatus.hdfs}}
  65. {{view App.MainDashboardServiceHdfsView showOnlyRows=true serviceBinding="view.service"}}
  66. {{/if}}
  67. {{#if view.serviceStatus.mapreduce}}
  68. {{view App.MainDashboardServiceMapreduceView showOnlyRows=true serviceBinding="view.service"}}
  69. {{/if}}
  70. {{#if view.serviceStatus.hbase}}
  71. {{view App.MainDashboardServiceHbaseView showOnlyRows=true serviceBinding="view.service"}}
  72. {{/if}}
  73. {{#if view.serviceStatus.zookeeper}}
  74. <tr>
  75. <td class="summary-label">Hosts</td>
  76. <td>
  77. {{#each component in controller.content.components}}
  78. <a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a>
  79. {{/each}}
  80. </td>
  81. </tr>
  82. {{/if}}
  83. {{#if view.serviceStatus.oozie}}
  84. <tr>
  85. <td class="summary-label">Hosts</td>
  86. <td>
  87. {{#each component in controller.content.components}}
  88. <a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a>
  89. {{/each}}
  90. </td>
  91. </tr>
  92. {{/if}}
  93. {{#if view.serviceStatus.hive}}
  94. <tr>
  95. <td class="summary-label">Host</td>
  96. <td>
  97. {{#each component in controller.content.components}}
  98. <a {{action selectHost component.host}} href="javascript:void(null)">{{component.host.publicHostName}}</a>
  99. {{/each}}
  100. </td>
  101. </tr>
  102. <tr>
  103. <td>Database</td>
  104. <td>{{view.data.hive.database}}</td>
  105. </tr>
  106. <tr>
  107. <td>Database Name</td>
  108. <td>{{view.data.hive.databaseName}}</td>
  109. </tr>
  110. <tr>
  111. <td>User</td>
  112. <td>{{view.data.hive.user}}</td>
  113. </tr>
  114. {{/if}}
  115. </tbody>
  116. </table>
  117. {{!view view.moreStatsView}}
  118. </div>
  119. {{!
  120. <div class="box-footer">
  121. </div>
  122. }}
  123. </div>
  124. </div>
  125. <div class="span6">
  126. <div class="box">
  127. <div class="box-header">
  128. <h4>Alerts</h4>
  129. <div class="btn-group">
  130. <a class="btn" target="_blank" rel="tooltip" title="Go to Nagios" {{bindAttr href="controller.nagiosUrl"}}><i class="icon-link"></i></a>
  131. </div>
  132. </div>
  133. <ul id='summary-alerts-list' class="alerts">
  134. {{#if controller.alerts.length}}
  135. {{#each controller.alerts}}
  136. <li class="status-{{unbound status}}">
  137. <div class="container-fluid">
  138. <div class="row-fluid">
  139. <div class="span1 status-icon">
  140. {{#if isOk}}
  141. <i class="icon-ok icon-large"></i>
  142. {{else}}
  143. <i class="icon-remove icon-large"></i>
  144. {{/if}}
  145. </div>
  146. <div class="span11">
  147. <div class="row-fluid">
  148. <div class="span7 title">{{title}}
  149. </div>
  150. <div class="span5 date-time">{{dateDisplay}}</div>
  151. </div>
  152. <div class="row-fluid message">{{message}}</div>
  153. </div>
  154. </div>
  155. </div>
  156. </li>
  157. {{/each}}
  158. {{else}}
  159. {{#if controller.isNagiosInstalled}}
  160. <div class="alert alert-info">
  161. No alerts
  162. </div>
  163. {{else}}
  164. <div class="alert">
  165. Nagios service required for viewing alerts
  166. </div>
  167. {{/if}}
  168. {{/if}}
  169. </ul>
  170. </div>
  171. </div>
  172. </div>
  173. {{#if view.serviceMetricGraphs.length}}
  174. <div class="row-fluid">
  175. <div class="span12">
  176. <div class="box">
  177. <div class="box-header">
  178. <h4>{{controller.content.label}} Metrics</h4>
  179. <div class="btn-group">
  180. <a class="btn" target="_blank" rel="tooltip" title="Go to Ganglia" {{bindAttr href="view.gangliaUrl"}}><i class="icon-link"></i></a>
  181. </div>
  182. </div>
  183. <div class="summary-metric-graphs row-fluid">
  184. {{#each graph in view.serviceMetricGraphs}}
  185. <div class="span3">
  186. {{view graph}}
  187. </div>
  188. {{/each}}
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. {{/if}}