open-nomad/ui/app/templates/components/job-page/parts/title.hbs

34 lines
1 KiB
Handlebars
Raw Normal View History

<h1 class="title with-flex">
<div>
{{or this.title this.job.name}}
<span class="bumper-left tag {{this.job.statusClass}}" data-test-job-status>{{this.job.status}}</span>
{{yield}}
</div>
<div>
{{#if (not (eq this.job.status "dead"))}}
<div class="two-step-button">
<Exec::OpenButton @job={{this.job}} />
</div>
<TwoStepButton
data-test-stop
@alignRight={{true}}
@idleText="Stop"
@cancelText="Cancel"
@confirmText="Yes, Stop"
@confirmationMessage="Are you sure you want to stop this job?"
@awaitingConfirmation={{this.stopJob.isRunning}}
@onConfirm={{perform this.stopJob}} />
{{else}}
<TwoStepButton
data-test-start
@alignRight={{true}}
@idleText="Start"
@cancelText="Cancel"
@confirmText="Yes, Start"
@confirmationMessage="Are you sure you want to start this job?"
@awaitingConfirmation={{this.startJob.isRunning}}
@onConfirm={{perform this.startJob}} />
{{/if}}
</div>
</h1>