host_progress_popup.hbs 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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="host-component-popup-wrap">
  19. {{#if view.parentView.isLoaded}}
  20. {{!-- SERVICES --}}
  21. <div {{bindAttr class="view.parentView.isServiceListHidden:hidden :task-list-main-warp"}}>
  22. <div class="task-top-wrap">
  23. <div class="operation-name-top">{{t common.operations}}</div>
  24. <div class="start-time-top">{{t common.startTime}}</div>
  25. <div class="duration-top">{{t common.duration}}</div>
  26. <div class="select-wrap">
  27. {{t common.show}}:
  28. {{view Ember.Select
  29. contentBinding="view.categories"
  30. optionValuePath="content.value"
  31. optionLabelPath="content.label"
  32. selectionBinding="view.serviceCategory"
  33. }}
  34. </div>
  35. </div>
  36. <div id="service-info">
  37. {{#if view.isServiceEmptyList}}
  38. <div class="log-list-wrap">{{t hostPopup.noServicesToShow}}</div>
  39. {{else}}
  40. {{#each servicesInfo in view.services}}
  41. <div {{action gotoHosts servicesInfo}} {{bindAttr class="servicesInfo.isVisible::hidden :log-list-wrap"}}>
  42. <div class="task-list-line-cursor">
  43. <div class="operation-name-icon-wrap">
  44. {{view statusIcon servicesInfoBinding="servicesInfo"}}
  45. <a href="#">
  46. {{servicesInfo.name}}
  47. </a>
  48. {{#if servicesInfo.isAbortable}}
  49. {{view abortIcon servicesInfoBinding="servicesInfo"}}
  50. {{/if}}
  51. </div>
  52. <div class="time-summary start-time-text">{{servicesInfo.startTime}}</div>
  53. <div class="time-summary duration-text">{{servicesInfo.duration}}</div>
  54. <div class="progress-bar span2">
  55. <div {{bindAttr class="servicesInfo.isInProgress:progress-striped servicesInfo.isInProgress:active servicesInfo.barColor :progress"}}>
  56. <div class="bar" {{bindAttr style="servicesInfo.barWidth"}}></div>
  57. </div>
  58. </div>
  59. <div class="host-progress-num">{{servicesInfo.progress}}%</div>
  60. <div class="show-details"><i class="icon-caret-right"></i></div>
  61. </div>
  62. </div>
  63. {{/each}}
  64. {{/if}}
  65. {{#if view.isShowMore}}
  66. <div class="show-more" {{action requestMoreOperations}}><a href="#">{{t hostPopup.serviceInfo.showMore}}</a>
  67. </div>
  68. {{/if}}
  69. </div>
  70. </div>
  71. {{!-- HOSTS ---}}
  72. <div {{bindAttr class="view.parentView.isHostListHidden:hidden :task-list-main-warp"}}>
  73. <div class="task-top-wrap">
  74. {{#if controller.isBackgroundOperations}}
  75. <a class="task-detail-back-to-hosts" href="javascript:void(null)" {{action backToServiceList}} >
  76. <i class="icon-arrow-left"></i>&nbsp;{{t common.operations}}
  77. </a>
  78. {{/if}}
  79. <span class="task-detail-log-rolename">{{t common.hosts}}</span>
  80. <div class="select-wrap">
  81. {{t common.show}}:
  82. {{view Ember.Select
  83. contentBinding="view.categories"
  84. optionValuePath="content.value"
  85. optionLabelPath="content.label"
  86. selectionBinding="view.hostCategory"
  87. }}
  88. </div>
  89. </div>
  90. {{#if view.isRequestSchedule}}
  91. {{#if view.sourceRequestScheduleRunning}}
  92. <div class="alert alert-info request-schedule-abort">
  93. {{t hostPopup.bgop.sourceRequestSchedule.running}}
  94. <button type="button" class="btn btn-warning pull-right"
  95. {{action doAbortRequestSchedule view.sourceRequestScheduleId target="view"}}>
  96. {{view.requestScheduleAbortLabel}}
  97. </button>
  98. </div>
  99. {{/if}}
  100. {{#if view.sourceRequestScheduleAborted}}
  101. <div class="alert alert-info request-schedule-abort">
  102. {{t hostPopup.bgop.sourceRequestSchedule.aborted}}
  103. </div>
  104. {{/if}}
  105. {{/if}}
  106. {{#if view.isLevelLoaded}}
  107. <div id="host-info" {{bindAttr class="view.isRequestSchedule:scheduled"}}>
  108. {{#if view.isHostEmptyList}}
  109. <div class="log-list-wrap">{{t hostPopup.noHostsToShow}}</div>
  110. {{else}}
  111. {{#each hostInfo in view.pageContent}}
  112. <div {{action gotoTasks hostInfo}} {{bindAttr class="hostInfo.isVisible::hidden :log-list-wrap"}}>
  113. <div class="task-list-line-cursor">
  114. <div class="host-name-icon-wrap">
  115. {{view statusIcon servicesInfoBinding="hostInfo"}}
  116. <a href="#">
  117. {{hostInfo.displayName}}
  118. </a>
  119. </div>
  120. <div class="progress-bar span2">
  121. <div {{bindAttr class="hostInfo.isInProgress:progress-striped :active hostInfo.barColor :progress"}}>
  122. <div class="bar" {{bindAttr style="hostInfo.barWidth"}}></div>
  123. </div>
  124. </div>
  125. <div class="host-progress-num">{{hostInfo.progress}}%</div>
  126. <div class="show-details"><i class="icon-caret-right"></i></div>
  127. </div>
  128. </div>
  129. {{/each}}
  130. {{/if}}
  131. </div>
  132. {{else}}
  133. {{view App.SpinnerView}}
  134. {{/if}}
  135. </div>
  136. {{!-- TASKS ---}}
  137. <div {{bindAttr class="view.parentView.isTaskListHidden:hidden :task-list-main-warp"}}>
  138. <div class="task-top-wrap">
  139. <a class="task-detail-back-to-hosts" href="javascript:void(null)" {{action backToHostList}} ><i
  140. class="icon-arrow-left"></i>&nbsp;{{t common.hosts}}</a>
  141. <div class="task-name-top task-detail-log-rolename">{{t common.tasks}}</div>
  142. <div class="select-wrap tasks-list-select">
  143. {{t common.show}}:
  144. {{view Ember.Select
  145. contentBinding="view.categories"
  146. optionValuePath="content.value"
  147. optionLabelPath="content.label"
  148. selectionBinding="view.taskCategory"
  149. }}
  150. </div>
  151. </div>
  152. <div id="host-log">
  153. {{#if view.hostInfoLoaded}}
  154. {{#if view.isTasksEmptyList}}
  155. <div class="log-list-wrap">{{t hostPopup.noTasksToShow}}</div>
  156. {{else}}
  157. {{#each taskInfo in view.tasks}}
  158. <div {{action toggleTaskLog taskInfo}} {{bindAttr class="taskInfo.isVisible::hidden :log-list-wrap"}}>
  159. <div class="task-list-line-cursor">
  160. <div class="operation-name-icon-wrap">
  161. {{view statusIcon servicesInfoBinding="taskInfo"}}
  162. <a href="#">
  163. {{taskInfo.commandDetail}}
  164. </a>
  165. </div>
  166. <div class="show-details"><i class="icon-caret-right"></i></div>
  167. </div>
  168. </div>
  169. {{/each}}
  170. {{/if}}
  171. {{else}}
  172. {{view App.SpinnerView}}
  173. {{/if}}
  174. </div>
  175. </div>
  176. <!-- TASK DETAILS --->
  177. <div {{bindAttr class="view.parentView.isLogWrapHidden:hidden :task-detail-info view.hostComponentLogsExists:task-detail-info-tabbed"}}>
  178. <div class="task-top-wrap">
  179. <a class="task-detail-back" href="javascript:void(null)" {{action backToTaskList}} ><i
  180. class="icon-arrow-left"></i>&nbsp;{{t common.tasks}}</a>
  181. <div {{bindAttr class="view.hostComponentLogsExists:task-detail-log-nav-actions"}}>
  182. <i {{bindAttr class="view.openedTask.status :task-detail-status-ico view.openedTask.icon"}}></i>
  183. <div class="task-detail-ico-wrap">
  184. <a {{translateAttr title="common.fullLogPopup.clickToCopy"}} {{action "textTrigger" taskInfo target="view"}} class="task-detail-copy"><i
  185. class="icon-copy"></i> {{t common.copy}}</a>
  186. <a {{translateAttr title="common.openNewWindow"}} {{action openTaskLogInDialog}} class="task-detail-open-dialog"><i
  187. class="icon-external-link"></i> {{t common.open}}</a>
  188. {{#if App.supports.logSearch}}
  189. {{#if view.isLogSearchInstalled}}
  190. <a {{action navigateToHostLogs target="view"}} {{bindAttr class="view.isLogsLinkVisible::hidden"}} href="#">
  191. <i class="icon-file"></i> {{t common.host}} {{t common.logs}}
  192. </a>
  193. {{/if}}
  194. {{/if}}
  195. </div>
  196. <span class="task-detail-log-rolename">{{view.openedTask.commandDetail}}</span>
  197. </div>
  198. <ul {{bindAttr class="view.hostComponentLogsExists::hide :nav :nav-tabs :task-detail-nav"}}>
  199. <li {{bindAttr class="view.isLevelLoaded:active"}}>
  200. <a href="#" data-target="#task-log-tab" data-toggle="tab" {{action setActiveTaskLogTab target="view"}}>{{t app.name}} stdout/stderr</a>
  201. </li>
  202. {{#each hostLog in view.hostComponentLogs}}
  203. <li>
  204. <a href="#" {{action setActiveLogTab hostLog target="view"}} {{bindAttr data-target="hostLog.tabClassNameSelector"}} data-toggle="tab">{{hostLog.displayedFileName}}</a>
  205. </li>
  206. {{/each}}
  207. </ul>
  208. </div>
  209. {{#if view.isLevelLoaded}}
  210. <div class="task-detail-log-info">
  211. <div class="content-area">
  212. <div class="tab-content">
  213. <div class="task-detail-log-clipboard-wrap"></div>
  214. <div id="task-log-tab" class="tab-pane active">
  215. <div {{bindAttr class=":task-detail-log-maintext view.isClipBoardActive:hidden"}}>
  216. {{#if view.openedTask.isRebalanceHDFSTask }}
  217. <h5>{{t services.hdfs.rebalance.title}}</h5>
  218. <div class="progresspopup-rebalancehdfs">
  219. <div {{bindAttr class=":progress view.openedTask.isInProgress:progress-striped view.openedTask.barColor :active"}}>
  220. <div class="bar" {{bindAttr style="view.openedTask.completionProgressStyle"}}></div>
  221. </div>
  222. </div>
  223. <div class="clearfix">
  224. <div class="pull-left">
  225. {{view.openedTask.dataMoved}} moved /
  226. {{view.openedTask.dataLeft}} left /
  227. {{view.openedTask.dataBeingMoved}} being processed
  228. </div>
  229. {{#if view.openedTask.isNotComplete}}
  230. <button class="btn btn-danger pull-right" {{action stopRebalanceHDFS}}>{{t common.cancel}}</button>
  231. {{/if}}
  232. </div>
  233. <hr>
  234. {{/if}}
  235. <p>{{t common.stderr}}: &nbsp; <span class="muted">{{view.openedTask.errorLog}} </span></p>
  236. <pre class="stderr">{{view.openedTask.stderr}}</pre>
  237. <p>{{t common.stdout}}: &nbsp; <span class="muted"> {{view.openedTask.outputLog}} </span></p>
  238. <pre class="stdout">{{view.openedTask.stdout}}</pre>
  239. </div>
  240. </div>
  241. {{#each hostLog in view.hostComponentLogs}}
  242. <div {{bindAttr class=":tab-pane :log-component-tab hostLog.tabClassName"}}>
  243. <p {{bindAttr class="view.isClipBoardActive:hidden"}}>
  244. <span class="text-bold">{{t common.file}}: &nbsp; </span>
  245. <span class="text-bold muted">{{hostLog.fileName}}</span>
  246. {{#view App.LogSearchUILinkView linkQueryParamsBinding="hostLog.linkTail" tagName="span"}}
  247. <a {{bindAttr href="view.formatedLink" class=":pull-right view.isLodaded::disabled"}} target="_blank">
  248. <i class="icon-external-link"></i>
  249. {{t popup.logTail.openInLogSearch}}</a>
  250. {{/view}}
  251. </p>
  252. <div {{bindAttr class="view.isClipBoardActive:hidden"}}>
  253. {{view view.logTailView contentBinding="hostLog"}}
  254. </div>
  255. </div>
  256. {{/each}}
  257. </div>
  258. </div>
  259. </div>
  260. {{else}}
  261. {{view App.SpinnerView}}
  262. {{/if}}
  263. </div>
  264. {{else}}
  265. {{view App.SpinnerView}}
  266. {{/if}}
  267. </div>
  268. {{#if view.isPaginate}}
  269. <div class="page-bar pull-right no-borders mtm">
  270. <div class="items-on-page">
  271. <label>{{t common.show}}: {{view view.rowsPerPageSelectView selectionBinding="view.displayLength"}}</label>
  272. </div>
  273. <div class="info">{{view.paginationInfo}}</div>
  274. <div class="paging_two_button">
  275. {{view view.paginationFirst}}
  276. {{view view.paginationLeft}}
  277. {{view view.paginationRight}}
  278. {{view view.paginationLast}}
  279. </div>
  280. </div>
  281. {{/if}}