open-nomad/ui/app/templates/exec.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

46 lines
1.4 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{title "Exec"}}
{{!-- the application shows briefly in the background, shouldnt render at all 😳 --}}
{{!-- issue to fix: https://github.com/hashicorp/nomad/issues/7460 --}}
<nav class="navbar is-popup">
<div class="navbar-brand">
<div class="navbar-item is-logo">
{{partial "partials/nomad-logo"}}
</div>
</div>
{{#if system.shouldShowRegions}}
<div class="navbar-item">
<span class="navbar-label">Region</span>
<span data-test-region>{{model.region}}</span>
</div>
{{/if}}
{{#if system.shouldShowNamespaces}}
<div class="navbar-item">
<span class="navbar-label">Namespace</span>
<span data-test-namespace>{{model.namespace.id}}</span>
</div>
{{/if}}
<div class="navbar-item">
<span class="navbar-label">Job</span>
<span data-test-job>{{model.name}}</span>
</div>
<div class="navbar-end">
<a href="https://nomadproject.io/docs" target="_blank" rel="noopener" class="navbar-item">Documentation</a>
{{x-icon "lock-closed"}}
</div>
</nav>
<div class="tree-and-terminal">
<div class="task-group-tree">
<h4 class="title is-6">Tasks</h4>
<ul>
{{#each uniqueRunningTaskGroups as |taskGroup|}}
<li data-test-task-group>
{{exec/task-group-parent taskGroup=taskGroup openInNewWindow=socketOpen activeTaskState=taskState}}
</li>
{{/each}}
</ul>
</div>
{{exec-terminal terminal=terminal}}
</div>