mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
ui: only dipslay "Dispatch Job" button on parameterized jobs (#11019)
This commit is contained in:
3
.changelog/11019.txt
Normal file
3
.changelog/11019.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
ui: Fixed a bug where the "Dispatch Job" button was displayed for non-parameterized jobs
|
||||
```
|
||||
@@ -1,21 +1,23 @@
|
||||
<div class="boxed-section-head">
|
||||
Job Launches
|
||||
{{#if (can "dispatch job" namespace=this.job.namespace)}}
|
||||
<LinkTo
|
||||
data-test-dispatch-button
|
||||
@route="jobs.job.dispatch"
|
||||
class="button is-primary is-compact pull-right">
|
||||
Dispatch Job
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
<button
|
||||
data-test-dispatch-button
|
||||
class="button is-disabled is-primary is-compact pull-right tooltip multiline"
|
||||
aria-label="You don’t have permission to dispatch jobs"
|
||||
disabled
|
||||
type="button">
|
||||
Dispatch Job
|
||||
</button>
|
||||
{{#if this.job.parameterized}}
|
||||
{{#if (can "dispatch job" namespace=this.job.namespace)}}
|
||||
<LinkTo
|
||||
data-test-dispatch-button
|
||||
@route="jobs.job.dispatch"
|
||||
class="button is-primary is-compact pull-right">
|
||||
Dispatch Job
|
||||
</LinkTo>
|
||||
{{else}}
|
||||
<button
|
||||
data-test-dispatch-button
|
||||
class="button is-disabled is-primary is-compact pull-right tooltip multiline"
|
||||
aria-label="You don’t have permission to dispatch jobs"
|
||||
disabled
|
||||
type="button">
|
||||
Dispatch Job
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="boxed-section-body {{if this.sortedChildren.length "is-full-bleed"}}">
|
||||
|
||||
Reference in New Issue
Block a user