upgrade_version_box.hbs 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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.isOutOfSync}}
  19. <i class="icon-exclamation-sign out-of-sync-badge"></i>
  20. {{/if}}
  21. <p {{bindAttr class=":version view.isRepoUrlsEditDisabled:not-active-link"}}>
  22. <span>{{view.content.displayName}}</span>
  23. <a class="pull-right not-active link-tooltip" {{action editRepositories target="view"}}>
  24. <i class="icon-edit"></i>
  25. </a>
  26. </p>
  27. <p class="repository-name">({{view.content.repositoryVersion}})</p>
  28. <p class="patch-icon">
  29. {{#if view.isPatch}}
  30. <i class="icon-umbrella"></i>&nbsp;{{t common.patch}}
  31. {{/if}}
  32. </p>
  33. <div {{bindAttr class="view.stateElement.isInstalling:installing :align-center :state"}}>
  34. {{#if view.stateElement.isButton}}
  35. <button class="btn btn-primary"
  36. {{action runAction target="view"}}
  37. {{bindAttr disabled="view.stateElement.isDisabled"}}>
  38. {{view.stateElement.text}}
  39. </button>
  40. {{/if}}
  41. {{#if view.stateElement.isButtonGroup}}
  42. <div class="btn-group">
  43. <button class="btn btn-primary"
  44. {{action runAction target="view"}}
  45. {{bindAttr disabled="view.stateElement.isDisabled"}}>
  46. {{view.stateElement.text}}
  47. </button>
  48. <button class="btn btn-primary dropdown-toggle" data-toggle="dropdown" {{bindAttr disabled="view.stateElement.isDisabled"}}>
  49. <span class="caret"></span>
  50. </button>
  51. <ul class="dropdown-menu">
  52. {{#each button in view.stateElement.buttons}}
  53. <li {{bindAttr class="button.isDisabled:disabled"}}>
  54. <a {{action runAction button.action target="view"}}>
  55. {{button.text}}
  56. </a>
  57. </li>
  58. {{/each}}
  59. </ul>
  60. </div>
  61. {{/if}}
  62. {{#if view.stateElement.isLabel}}
  63. <span {{bindAttr class="view.stateElement.class"}}>{{view.stateElement.text}}</span>
  64. {{/if}}
  65. {{#if view.stateElement.isLink}}
  66. {{#if view.stateElement.iconClass}}
  67. <i {{bindAttr class="view.stateElement.iconClass"}}></i>
  68. {{/if}}
  69. <a href="#" {{action runAction target="view"}}>{{view.stateElement.text}}</a>
  70. {{#if view.stateElement.isInstalling}}
  71. {{view App.ProgressBarView
  72. progressBinding="view.installProgress"
  73. statusBinding="view.PROGRESS_STATUS"
  74. }}
  75. {{/if}}
  76. {{/if}}
  77. {{#if view.stateElement.isSpinner}}
  78. {{view App.SpinnerView}}
  79. {{/if}}
  80. </div>
  81. <div class="hosts-section">
  82. <div class="hosts-bar">{{t common.hosts}}</div>
  83. <div class="row-fluid host-link">
  84. <div class="span4 align-center not-installed-hosts">
  85. <div><a href="#" class="hosts-tooltip not-active" {{bindAttr data-original-title="view.content.noInitHostsTooltip" }}
  86. {{action showHosts view.versionStateMap.not_installed target="view"}}>
  87. {{view.notInstalledHosts.length}}</a></div>
  88. <div>{{t admin.stackVersions.version.notInstalled}}</div>
  89. </div>
  90. <div class="span4 align-center installed-hosts">
  91. <div><a href="#" class="hosts-tooltip not-active" {{bindAttr data-original-title="view.content.noInstalledHostsTooltip" }}
  92. {{action showHosts view.versionStateMap.installed target="view"}}>
  93. {{view.installedHosts.length}}</a></div>
  94. <div>{{t common.installed}}</div>
  95. </div>
  96. <div class="span4 align-center current-hosts">
  97. <div><a href="#" class="hosts-tooltip not-active" {{bindAttr data-original-title="view.content.noCurrentHostsTooltip" }}
  98. {{action showHosts view.versionStateMap.current target="view"}}>
  99. {{view.currentHosts.length}}</a></div>
  100. <div>{{t common.current}}</div>
  101. </div>
  102. </div>
  103. </div>