background_operations_popup.hbs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. {{#each operation in allOperations}}
  19. {{#view App.MainBackgroundOperation contentBinding="operation"}}
  20. <div>
  21. <a {{action showOperationLog target="view"}} href="#">
  22. <i {{bindAttr class="view.iconClass"}}></i>
  23. {{#if view.isOpen}}{{t common.hide}}{{else}}{{t common.show}}{{/if}} info about {{operation.command}} {{operation.role}}
  24. on {{operation.host_name}}
  25. </a>
  26. {{#if view.hasProgressBar}}
  27. <div {{bindAttr class="view.isInProgress:progress-striped :active view.barColor :progress"}}>
  28. <div class="bar"></div>
  29. </div>
  30. {{/if}}
  31. <div class="content-area">
  32. <div class="textTrigger">{{t popup.highlight}}</div>
  33. {{#if view.isOpen}}
  34. {{#if view.isTextArea}}
  35. <div>
  36. {{view view.textArea contentBinding="operation"}}
  37. </div>
  38. {{else}}
  39. <div>
  40. <h5>exitcode:</h5>
  41. <pre class="stderr">{{#if operation.display_exit_code}}{{operation.exit_code}}{{/if}}</pre>
  42. <h5>stderr:</h5>
  43. <pre class="stderr">{{highlight operation.stderr [err;fail]}}</pre>
  44. <h5>stdout:</h5>
  45. <pre class="stdout">{{highlight operation.stdout [err;fail]}}</pre>
  46. </div>
  47. {{/if}}
  48. {{/if}}
  49. </div>
  50. </div>
  51. {{/view}}
  52. {{/each}}