item.hbs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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"}}
  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" 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. {{#if App.isAdmin}}
  54. <div class="service-button">
  55. {{#if view.isMaintenanceActive}}
  56. <div class="btn-group display-inline-block">
  57. <a class="btn dropdown-toggle" 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.content.isClientsOnly}}
  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. <!-- Other service actions -->
  81. {{#each option in view.maintenance}}
  82. <li {{bindAttr class="option.disabled:disabled"}}>
  83. <a {{action "doAction" option target="controller" href=true}}><i {{bindAttr class="option.cssClass"}}></i>
  84. {{option.label}}</a>
  85. </li>
  86. {{/each}}
  87. </ul>
  88. </div>
  89. {{/if}}
  90. </div>
  91. {{/if}}
  92. {{outlet}}