summary.hbs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. {{#if view.service.isRestartRequired}}
  19. {{#isAccessible ADMIN}}
  20. <div id="summary-restart-bar">
  21. <div class="alert alert-warning clearfix">
  22. <i class="icon-refresh"></i> {{{view.needToRestartMessage}}} {{t services.service.config.restartService.needToRestart}}
  23. <a href="#" {{action showComponentsShouldBeRestarted target="view"}}>{{view.componentsCount}} {{pluralize view.componentsCount singular="t:common.component" plural="t:common.components"}}</a> {{t on}}
  24. <a href="#" {{action showHostsShouldBeRestarted target="view"}}>{{view.hostsCount}} {{pluralize view.hostsCount singular="t:common.host" plural="t:common.hosts"}}</a>
  25. <span class="restart-components pull-right">&nbsp</span>
  26. <div class="btn-group pull-right">
  27. <button type="button" class="btn btn-default dropdown-toggle btn-warning" data-toggle="dropdown">
  28. {{t hosts.host.details.needToRestart.button}}
  29. <span class="caret"></span>
  30. </button>
  31. <ul class="dropdown-menu">
  32. <li><a href="#" {{action restartAllStaleConfigComponents target="view"}}>{{t restart.service.all}}</a></li>
  33. {{#if view.rollingRestartSlaveComponentName}}
  34. <li>
  35. <a href="#" {{action rollingRestartStaleConfigSlaveComponents view.rollingRestartSlaveComponentName target="view"}}>{{view.rollingRestartActionName}}</a>
  36. </li>
  37. {{/if}}
  38. </ul>
  39. </div>
  40. </div>
  41. </div>
  42. {{/isAccessible}}
  43. {{/if}}
  44. <div class="row-fluid service-block">
  45. <div class="span6">
  46. <div class="box">
  47. <div class="box-header summary-box-header">
  48. <h4>{{controller.content.label}} {{t services.service.info.menu.summary}}</h4>
  49. {{#if view.hasAlertDefinitions}}
  50. <span {{action "showServiceAlertsPopup" controller.content target="controller"}}{{bindAttr class=":pull-right view.alertsCount:alerts-count-label:no-alerts-label :label"}}>{{view.alertsCountLabel}}</span>
  51. {{/if}}
  52. </div>
  53. <div class="service-content">
  54. <table id="summary-info" class="table no-borders table-condensed">
  55. <tbody>
  56. {{#if view.serviceSummaryView}}
  57. {{view view.serviceSummaryView}}
  58. {{/if}}
  59. </tbody>
  60. </table>
  61. </div>
  62. </div>
  63. </div>
  64. {{#if view.isServiceMetricLoaded}}
  65. {{#if view.serviceMetricGraphs.length}}
  66. <div class="span6 service-metrics-block">
  67. <div class="box">
  68. <div class="box-header">
  69. <h4>{{t services.service.metrics}}</h4>
  70. <div class="btn-group pull-right">
  71. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
  72. {{view.currentTimeRange.name}} &nbsp;<span class="caret"></span>
  73. </button>
  74. <ul class="dropdown-menu">
  75. {{#each option in view.timeRangeOptions}}
  76. <li><a href="#" {{action setTimeRange option target="view"}}>{{option.name}}</a></li>
  77. {{/each}}
  78. </ul>
  79. </div>
  80. </div>
  81. <div class="">
  82. <table class="graphs">
  83. {{#each graphs in view.serviceMetricGraphs}}
  84. <tr>
  85. {{#each graph in graphs}}
  86. <td>
  87. <div class="">
  88. {{view graph}}
  89. </div>
  90. </td>
  91. {{/each}}
  92. </tr>
  93. {{/each}}
  94. </table>
  95. </div>
  96. </div>
  97. </div>
  98. {{/if}}
  99. {{/if}}
  100. </div>
  101. {{#if view.collapsedSections}}
  102. <div class="row-fluid">
  103. <div class="span12 metrics-collapsed-graphs">
  104. {{#each collapsedSection in view.collapsedSections}}
  105. <div {{bindAttr class=":accordion collapsedSection.toggleIndex"}}>
  106. <div class="accordion-group box">
  107. <div class="accordion-heading box-header">
  108. <span class="pull-left accordion-toggle"
  109. data-toggle="collapse" {{bindAttr dataParent="collapsedSection.toggleIndex" href="collapsedSection.toggleIndex"}}>
  110. <i class="pull-left icon-caret-toggle"></i>
  111. <span>{{collapsedSection.header}}</span>
  112. </span>
  113. <a class="btn pull-right" {{bindAttr href="collapsedSection.url"}} target="_blank">
  114. <i class="icon-link"></i>
  115. </a>
  116. <div class="clearfix"></div>
  117. </div>
  118. <div class="accordion-body collapse in" {{bindAttr id="collapsedSection.id"}}>
  119. <div class="accordion-inner">
  120. {{#if collapsedSection.metricView}}
  121. {{view collapsedSection.metricView viewDataBinding="collapsedSection.metricViewData"}}
  122. {{/if}}
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. {{/each}}
  128. </div>
  129. </div>
  130. {{/if}}