open-nomad/ui/app/templates/components/exec/open-button.hbs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
612 B
Handlebars
Raw Normal View History

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: MPL-2.0
}}
{{#let (cannot "exec allocation" namespace=this.job.namespace) as |cannotExec|}}
<button
data-test-exec-button
type="button"
class="button exec-button is-outline is-small {{if cannotExec "tooltip"}}"
disabled={{if cannotExec 'disabled'}}
aria-label={{if cannotExec "You dont have permission to exec"}}
{{action "open"}}
{{keyboard-shortcut
label="Exec"
pattern=(array "e" "x" "e" "c")
action=(action "open")
}}>
{{x-icon "console"}}
<span>Exec</span>
</button>
{{/let}}