open-nomad/ui/app/templates/components/job-page/parts/title.hbs
Buck Doyle 2998deac50
Convert to angle bracket invocation (#8075)
This is mostly a direct application of the ember-angle-brackets-codemod.
I manually restored newlines in multi-line component invocations, usually
preserving file line length except for now-non-positional link-to @route.

I needed to rename task to taskState in some cases to avoid Ember
Concurrency naming conflicts.
2020-06-01 14:03:56 -05:00

34 lines
1,017 B
Handlebars

<h1 class="title with-flex">
<div>
{{or title job.name}}
<span class="bumper-left tag {{job.statusClass}}" data-test-job-status>{{job.status}}</span>
</div>
{{yield}}
<div>
{{#if (not (eq job.status "dead"))}}
<div class="two-step-button">
<Exec::OpenButton @job={{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={{stopJob.isRunning}}
@onConfirm={{perform 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={{startJob.isRunning}}
@onConfirm={{perform startJob}} />
{{/if}}
</div>
</h1>