ui: only dipslay "Dispatch Job" button on parameterized jobs (#11019)
This commit is contained in:
parent
5b50b385e8
commit
d283e90c35
|
@ -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"}}">
|
||||
|
|
Loading…
Reference in New Issue