item.hbs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. {{view App.MainServiceInfoMenuView configTabBinding="view.hasConfigTab" heatmapTabBinding="view.hasHeatmapTab"}}
  19. <div class="span3 quick-links-wrapper">
  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" id="quick-links-dropdown-btn" data-toggle="dropdown" href="#">{{t common.quickLinks}}<b class="caret"></b></a>
  25. <ul class="dropdown-menu">
  26. {{#if view.isLoaded}}
  27. {{#if view.quickLinksArray}}
  28. <!--there are multiple masters eg, HBase multiple masters or HDFS HA enabled-->
  29. {{#each quickLinks in view.quickLinksArray}}
  30. <li class="dropdown-submenu">
  31. <a href="javascript:void(null)">{{quickLinks.publicHostNameLabel}} &nbsp;</a>
  32. <ul class="dropdown-menu">
  33. {{#each quickLinks}}
  34. <li><a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a></li>
  35. {{/each}}
  36. </ul>
  37. </li>
  38. {{/each}}
  39. {{else}}
  40. {{#each view.quickLinks}}
  41. <li><a {{bindAttr href="url"}} {{bindAttr target="view.linkTarget"}}>{{label}}</a></li>
  42. {{/each}}
  43. {{/if}}
  44. {{else}}
  45. <div class="spinner"></div>
  46. {{/if}}
  47. </ul>
  48. </li>
  49. </ul>
  50. {{/view}}
  51. {{/if}}
  52. </div>
  53. {{#isAccessible ADMIN}}
  54. <div class="service-button">
  55. {{#if view.isMaintenanceActive}}
  56. <div class="btn-group display-inline-block">
  57. <a class="btn dropdown-toggle" id="service-actions-dropdown-btn" data-toggle="dropdown" href="#">
  58. {{t services.service.actions.serviceActions}}
  59. <span class="caret"></span>
  60. </a>
  61. <ul class="pull-right dropdown-menu">
  62. <!-- dropdown menu links -->
  63. <!-- Start/Stop service actions -->
  64. {{#unless controller.isClientsOnlyService}}
  65. <li {{bindAttr class="controller.isStartDisabled:disabled"}}>
  66. <a href="javascript:void(null)" {{bindAttr class="controller.isStartDisabled:disabled" }}
  67. {{action "startService" target="controller"}}>
  68. <i {{bindAttr class=":icon-play controller.isStartDisabled:disabled:enabled" }}></i>
  69. {{t services.service.start}}
  70. </a>
  71. </li>
  72. <li {{bindAttr class="controller.isStopDisabled:disabled"}}>
  73. <a href="javascript:void(null)" {{bindAttr class="controller.isStopDisabled:disabled" }}
  74. data-toggle="modal" {{action "stopService" target="controller"}}>
  75. <i {{bindAttr class=":icon-stop controller.isStopDisabled:disabled:enabled" }}></i>
  76. {{t services.service.stop}}
  77. </a>
  78. </li>
  79. {{/unless}}
  80. {{#if view.maintenance.length}}
  81. <!-- Other service actions -->
  82. {{#each option in view.maintenance}}
  83. <li {{bindAttr class="option.disabled option.isHidden:hidden option.hasSubmenu:dropdown-submenu option.hasSubmenu:submenu-left"}}>
  84. <a {{action "doAction" option target="controller" href=true}} {{bindAttr data-title="option.tooltip"}} rel="HealthTooltip">
  85. <i {{bindAttr class="option.cssClass"}}></i>
  86. {{option.label}}
  87. </a>
  88. {{#if option.hasSubmenu}}
  89. <div class="dropdown-menu-wrap">
  90. <ul class="dropdown-menu">
  91. {{#each item in option.submenuOptions}}
  92. <li>
  93. <a {{action "doAction" item target="controller" href=true}}>{{item.context.label}}</a>
  94. </li>
  95. {{/each}}
  96. </ul>
  97. </div>
  98. {{/if}}
  99. </li>
  100. {{/each}}
  101. {{else}}
  102. <div class="spinner service-button-spinner"></div>
  103. {{/if}}
  104. </ul>
  105. </div>
  106. {{/if}}
  107. </div>
  108. {{/isAccessible}}
  109. {{outlet}}