Files
nomad/ui/app/templates/components/exec/open-button.hbs
Phil Renaud 783572de7d [ui] Actions implementation in the web UI (#18793)
* runAction model and adapter funcs

* Hacky but functional action running from job index

* remove proxy hack

* runAction added to taskSubRow

* Added tty and ws_handshake to job action endpoint call

* delog

* Bunch of streaming work

* action started, running, and finished notification titles, neutral color, and ansi escape

* Handle random alloc selection in the web ui

* Run on All implementation in web ui

* [ui] Helios two-step button and uniform title bar for Actions (#18912)

* Initial pass at title bar button uniformity

* Vertical align on actions dropdown toggle and small edits to prevent keynav overflow issue

* We represent loading state w text and disable now

* Pageheader component to align buttons

* Buttons standardized

* Actions dropdown reveal for multi-alloc job

* Notification code styles

* An action-having single alloc job

* Mirageed

* Actions-laden jobs in mirage

* Separating allocCount and taskCount in mirage mocks

* Unbreak stop job tests

* Permissions for actions dropdown

* tests for running actions from the job index page

* running from a task row actions tests

* some todocleanup

* PR feedback addressed, including page helper for actions
2023-11-07 15:29:43 -05:00

27 lines
516 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
{{#let (cannot "exec allocation" namespace=this.job.namespace) as |cannotExec|}}
<div
class="exec-open-button"
{{keyboard-shortcut
label="Exec"
pattern=(array "e" "x" "e" "c")
action=this.open
}}
>
<Hds::Button
data-test-exec-button
@size="medium"
@text="Exec"
@color="secondary"
disabled={{cannotExec}}
{{on "click" this.open}}
@icon="terminal-screen"
/>
</div>
{{/let}}