jobs.hbs 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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. <div class="dataset-details">
  19. <div class="top-left">
  20. <h4>{{view.dataset.name}}</h4>
  21. </div>
  22. <div class="bottom-left">
  23. <table>
  24. <tr>
  25. <td>{{t mirroring.dataset.source}}:</td>
  26. <td>{{view.dataset.sourceClusterName}}</td>
  27. <td>{{view.dataset.sourceDir}}</td>
  28. </tr>
  29. <tr>
  30. <td>{{t mirroring.dataset.target}}:</td>
  31. <td>{{view.dataset.targetClusterName}}</td>
  32. <td>{{view.dataset.targetDir}}</td>
  33. </tr>
  34. </table>
  35. </div>
  36. {{#if App.isAdmin}}
  37. <div class="top-right">
  38. <div class="btn-group pull-right">
  39. <button class="btn">{{t common.actions}}</button>
  40. <button class="btn dropdown-toggle" data-toggle="dropdown">
  41. <span class="caret"></span>
  42. </button>
  43. <ul class="dropdown-menu pull-right">
  44. {{#if view.dataset.isRunning}}
  45. <li>
  46. <a href="javascript:void(null);">
  47. {{t mirroring.dataset.suspendInstance}}
  48. </a>
  49. </li>
  50. <li>
  51. <a href="javascript:void(null);">
  52. {{t mirroring.dataset.killInstance}}
  53. </a>
  54. </li>
  55. {{else}}
  56. {{#if view.dataset.isSuspended}}
  57. <li>
  58. <a href="javascript:void(null);">
  59. {{t mirroring.dataset.schedule}}
  60. </a>
  61. </li>
  62. {{else}}
  63. <li>
  64. <a href="javascript:void(null);">
  65. {{t mirroring.dataset.suspend}}
  66. </a>
  67. </li>
  68. {{/if}}
  69. <li>
  70. <a {{action editDataset}} href="javascript:void(null);">
  71. {{t common.edit}}
  72. </a>
  73. </li>
  74. <li>
  75. <a href="javascript:void(null);">
  76. {{t common.delete}}
  77. </a>
  78. </li>
  79. {{/if}}
  80. </ul>
  81. </div>
  82. <span {{bindAttr class=":label view.dataset.isRunning:label-info view.dataset.isSuspended:label-warning view.dataset.isScheduled:label-success :pull-right :dataset-status"}}>
  83. {{view.dataset.statusFormatted}}</span>
  84. </div>
  85. {{/if}}
  86. <div class="bottom-right">{{t common.download}}: <a href="javascript:void(null);" {{action downloadEntity target="controller"}}>{{t mirroring.dataset.entity}}.xml</a></div>
  87. </div>
  88. <div>
  89. <table class="table table-bordered table-striped">
  90. <thead>
  91. <tr>
  92. {{#view view.sortView contentBinding="view.filteredContent"}}
  93. <th class="first"></th>
  94. {{view view.parentView.idSort}}
  95. {{view view.parentView.startSort}}
  96. {{view view.parentView.endSort}}
  97. {{/view}}
  98. </tr>
  99. <tr>
  100. <th class="first"></th>
  101. <th>{{view view.idFilterView}}</th>
  102. <th>{{view view.startFilterView}}</th>
  103. <th>{{view view.endFilterView}}</th>
  104. </tr>
  105. </thead>
  106. <tbody>
  107. {{#if controller.isLoaded}}
  108. {{#if view.pageContent}}
  109. {{#each job in view.pageContent}}
  110. {{#view view.JobView contentBinding="job"}}
  111. <td class="first">
  112. <span {{ bindAttr class="job.healthClass"}}></span>
  113. </td>
  114. <td>{{unbound job.id}}</td>
  115. <td>{{unbound job.startFormatted}}</td>
  116. <td>{{unbound job.endFormatted}}</td>
  117. {{/view}}
  118. {{/each}}
  119. {{else}}
  120. <tr>
  121. <td class="first"></td>
  122. <td colspan="3">
  123. {{t mirroring.table.noJobs}}
  124. </td>
  125. </tr>
  126. {{/if}}
  127. {{else}}
  128. <tr>
  129. <td colspan="4">
  130. <div class="spinner"></div>
  131. </td>
  132. </tr>
  133. {{/if}}
  134. </tbody>
  135. </table>
  136. {{#if controller.isLoaded}}
  137. <div class="page-bar">
  138. <div class="items-on-page">
  139. <label>{{t common.show}}
  140. : {{view view.rowsPerPageSelectView selectionBinding="view.displayLength"}}</label>
  141. </div>
  142. <div class="info">{{view.paginationInfo}}</div>
  143. <div class="paging_two_button">
  144. {{view view.paginationLeft}}
  145. {{view view.paginationRight}}
  146. </div>
  147. </div>
  148. {{/if}}
  149. </div>