open-nomad/ui/app/templates/components/job-version.hbs

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

53 lines
1.9 KiB
Handlebars
Raw Normal View History

2017-09-19 14:47:10 +00:00
<div class="boxed-section-head is-light inline-definitions">
Version #{{this.version.number}}
<span class="bumper-left pair is-faded">
2017-09-19 14:47:10 +00:00
<span class="term">Stable</span>
<span class="badge is-light is-faded" data-test-version-stability><code>{{this.version.stable}}</code></span>
2017-09-19 14:47:10 +00:00
</span>
<span class="pair is-faded">
2017-09-19 14:47:10 +00:00
<span class="term">Submitted</span>
<span data-test-version-submit-time class="submit-date">{{format-ts this.version.submitTime}}</span>
2017-09-19 14:47:10 +00:00
</span>
<div class="pull-right">
{{#unless this.isCurrent}}
{{#if (can "run job" namespace=this.version.job.namespace)}}
<TwoStepButton
data-test-revert-to
@classes={{hash
idleButton="is-warning is-outlined"
confirmButton="is-warning"}}
@alignRight={{true}}
2022-03-24 20:38:43 +00:00
@idleText="Revert Version"
@cancelText="Cancel"
2022-03-24 20:38:43 +00:00
@confirmText="Yes, Revert Version"
@confirmationMessage="Are you sure you want to revert to this version?"
@inlineText={{true}}
@fadingBackground={{true}}
@awaitingConfirmation={{this.revertTo.isRunning}}
@onConfirm={{perform this.revertTo}} />
{{else}}
<button
data-test-revert-to
type="button"
class="button is-warning is-outlined is-small tooltip"
disabled
aria-label="You dont have permission to revert"
>
Revert
</button>
{{/if}}
{{/unless}}
{{#if this.version.diff}}
<button class="button is-light is-small is-fixed-width" {{action "toggleDiff"}} type="button">{{this.changeCount}} {{pluralize "Change" this.changeCount}}</button>
{{else}}
<div class="is-fixed-width is-size-7 has-text-centered">No Changes</div>
{{/if}}
</div>
2017-09-19 14:47:10 +00:00
</div>
{{#if this.isOpen}}
2017-09-19 14:47:10 +00:00
<div class="boxed-section-body is-dark">
<JobDiff @diff={{this.version.diff}} @verbose={{this.verbose}} />
2017-09-19 14:47:10 +00:00
</div>
{{/if}}