open-nomad/ui/app/templates/components/exec/task-group-parent.hbs
Buck Doyle 674da96a59
UI: add exec terminal (#6697)
This connects Xterm.js to a Nomad exec websocket so people
can interact on clients via live sessions. There are buttons on
job, allocation, task group, and task detail pages that open a
popup that lets them edit their shell command and start a
session.

More is to come, as recorded in issues.
2020-03-24 18:22:16 -05:00

19 lines
845 B
Handlebars

<button {{action "toggleOpen"}} class="toggle-button" data-test-task-group-name>
{{x-icon (if isOpen "chevron-down" "chevron-right")}}
{{taskGroup.name}}
</button>
{{#if isOpen}}
<ul class="task-list">
{{#each tasksWithRunningStates as |task|}}
{{#if openInNewWindow}}
<a {{on "click" (action "openInNewWindow" taskGroup.job taskGroup task)}} class="task-item" data-test-task>
{{exec/task-contents task=task active=(eq task activeTaskState.task) openInNewWindow=openInNewWindow}}
</a>
{{else}}
{{#link-to "exec.task-group.task" taskGroup.job.name taskGroup.name task.name class="task-item" data-test-task=true}}
{{exec/task-contents task=task active=(eq task activeTaskState.task) openInNewWindow=openInNewWindow}}
{{/link-to}}
{{/if}}
{{/each}}
</ul>
{{/if}}