Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: only dipslay "Dispatch Job" button on parameterized jobs #11019

Merged
merged 2 commits into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/11019.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
ui: Fixed a bug where the "Dispatch Job" button was displayed for non-parameterized jobs
```
34 changes: 18 additions & 16 deletions ui/app/templates/components/job-page/parts/children.hbs
Original file line number Diff line number Diff line change
@@ -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"}}">
Expand Down