summary.hbs 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. <span {{action "showServiceAlertsPopup" controller.content target="controller"}}{{bindAttr class=":pull-right view.alertsCount:alerts-count-label:no-alerts-label :label"}}>{{view.alertsCountLabel}}</span>
  50. </div>
  51. <div class="service-content">
  52. <table id="summary-info" class="table no-borders table-condensed">
  53. <tbody>
  54. {{#if view.serviceSummaryView}}
  55. {{view view.serviceSummaryView}}
  56. {{/if}}
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. </div>
  62. {{#if view.isServiceMetricLoaded}}
  63. {{#if view.serviceMetricGraphs.length}}
  64. <div class="span6 service-metrics-block">
  65. <div class="box">
  66. <div class="box-header">
  67. <h4>{{t services.service.metrics}}</h4>
  68. <div class="btn-group pull-right">
  69. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
  70. {{t graphs.timeRangeControl.label}} {{view.currentTimeRange.name}}
  71. <span class="caret"></span>
  72. </button>
  73. <ul class="dropdown-menu">
  74. {{#each option in view.timeRangeOptions}}
  75. <li><a href="#" {{action setTimeRange option target="view"}}>{{option.name}}</a></li>
  76. {{/each}}
  77. </ul>
  78. </div>
  79. </div>
  80. <div class="">
  81. <table class="graphs">
  82. {{#each graphs in view.serviceMetricGraphs}}
  83. <tr>
  84. {{#each graph in graphs}}
  85. <td>
  86. <div class="">
  87. {{view graph}}
  88. </div>
  89. </td>
  90. {{/each}}
  91. </tr>
  92. {{/each}}
  93. </table>
  94. </div>
  95. </div>
  96. </div>
  97. {{/if}}
  98. {{/if}}
  99. </div>
  100. {{#if view.collapsedSections}}
  101. <div class="row-fluid">
  102. <div class="span12 metrics-collapsed-graphs">
  103. {{#each collapsedSection in view.collapsedSections}}
  104. <div {{bindAttr class=":accordion collapsedSection.toggleIndex"}}>
  105. <div class="accordion-group box">
  106. <div class="accordion-heading box-header">
  107. <span class="pull-left accordion-toggle"
  108. data-toggle="collapse" {{bindAttr dataParent="collapsedSection.toggleIndex" href="collapsedSection.toggleIndex"}}>
  109. <i class="pull-left icon-caret-toggle"></i>
  110. <span>{{collapsedSection.header}}</span>
  111. </span>
  112. <a class="btn pull-right" {{bindAttr href="collapsedSection.url"}} target="_blank">
  113. <i class="icon-link"></i>
  114. </a>
  115. <div class="clearfix"></div>
  116. </div>
  117. <div class="accordion-body collapse in" {{bindAttr id="collapsedSection.id"}}>
  118. <div class="accordion-inner">
  119. {{#if collapsedSection.metricView}}
  120. {{view collapsedSection.metricView viewDataBinding="collapsedSection.metricViewData"}}
  121. {{/if}}
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. {{/each}}
  127. </div>
  128. </div>
  129. {{/if}}