github.com/hernad/nomad@v1.6.112/ui/app/templates/components/job-editor.hbs (about) 1 {{! 2 Copyright (c) HashiCorp, Inc. 3 SPDX-License-Identifier: MPL-2.0 4 ~}} 5 6 <div> 7 <JobEditor::Alert 8 @data={{merge (hash error=this.error stage=this.stage) this.data}} 9 @fns={{this.fns}} 10 /> 11 12 {{#if (eq @context "new")}} 13 <header class="run-job-header"> 14 <h1 class="title is-3">Run a job</h1> 15 <p> 16 Paste or author HCL or JSON to submit to your cluster, or select from a list of templates. A plan will be requested before the job is submitted. You can also attach a job spec by uploading a job file or dragging & dropping a file to the editor. 17 </p> 18 19 {{#if (can "write variable" path="*" namespace="*")}} 20 <Hds::ButtonSet> 21 <label 22 class="job-spec-upload hds-button hds-button--color-secondary hds-button--size-medium" 23 > 24 <div class="hds-button__text">Upload file</div> 25 <input 26 type="file" 27 onchange={{action this.uploadJobSpec}} 28 accept=".hcl,.json,.nomad" 29 /> 30 </label> 31 <Hds::Button 32 @text="Choose from template" 33 @color="secondary" 34 @route="jobs.run.templates" 35 data-test-choose-template 36 /> 37 </Hds::ButtonSet> 38 {{/if}} 39 40 </header> 41 {{/if}} 42 {{did-update this.setDefinitionOnModel this.definition}} 43 {{component (concat 'job-editor/' this.stage) data=this.data fns=this.fns}} 44 </div>