github.com/hernad/nomad@v1.6.112/ui/app/templates/components/job-page/parts/title.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 <h1 class="title with-flex"> 7 <div data-test-job-name> 8 {{or this.title this.job.name}} 9 {{#if @job.meta.structured.pack}} 10 <span data-test-pack-tag class="tag is-hollow"> 11 {{x-icon "box" class= "test"}} 12 <span>Pack</span> 13 </span> 14 {{/if}} 15 {{yield}} 16 </div> 17 <div> 18 {{#if (not (eq this.job.status "dead"))}} 19 <div class="two-step-button"> 20 <Exec::OpenButton @job={{this.job}} /> 21 </div> 22 <TwoStepButton 23 data-test-stop 24 @alignRight={{true}} 25 @idleText="Stop Job" 26 @cancelText="Cancel" 27 @confirmText="Yes, Stop Job" 28 @confirmationMessage="Are you sure you want to stop this job?" 29 @awaitingConfirmation={{this.stopJob.isRunning}} 30 @onConfirm={{perform this.stopJob}} 31 {{keyboard-shortcut 32 label="Stop" 33 pattern=(array "s" "t" "o" "p") 34 action=(perform this.stopJob true) 35 }} /> 36 {{else}} 37 <TwoStepButton 38 data-test-purge 39 @alignRight={{true}} 40 @idleText="Purge Job" 41 @cancelText="Cancel" 42 @confirmText="Yes, Purge Job" 43 @confirmationMessage="Are you sure? You cannot undo this action." 44 @awaitingConfirmation={{this.purgeJob.isRunning}} 45 @onConfirm={{perform this.purgeJob}} 46 {{keyboard-shortcut 47 label="Purge" 48 pattern=(array "p" "u" "r" "g" "e") 49 action=(perform this.purgeJob) 50 }} 51 /> 52 <TwoStepButton 53 data-test-start 54 @alignRight={{true}} 55 @idleText="Start Job" 56 @cancelText="Cancel" 57 @confirmText="Yes, Start Job" 58 @confirmationMessage="Are you sure you want to start this job?" 59 @awaitingConfirmation={{this.startJob.isRunning}} 60 @onConfirm={{perform this.startJob}} 61 {{keyboard-shortcut 62 label="Start" 63 pattern=(array "s" "t" "a" "r" "t") 64 action=(perform this.startJob true) 65 }} 66 /> 67 {{/if}} 68 </div> 69 </h1>