Files
nomad/ui/app/templates/components/exec/open-button.hbs
Buck Doyle 8c3a210839 Add ACL-checking to turn off exec button (#7919)
This closes #7453. It adds an abstraction to handle the common
needs of ability-determination.
2020-05-11 14:43:17 -05:00

12 lines
388 B
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.
{{#let (cannot "exec allocation") 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"}}>
{{x-icon "console"}}
<span>Exec</span>
</button>
{{/let}}