82 lines
2.7 KiB
Handlebars
82 lines
2.7 KiB
Handlebars
<section class="section">
|
|
{{#if parseError}}
|
|
<div data-test-parse-error class="notification is-danger">
|
|
<h3 class="title is-4">Parse Error</h3>
|
|
<p>{{parseError}}</p>
|
|
</div>
|
|
{{/if}}
|
|
{{#if planError}}
|
|
<div data-test-plan-error class="notification is-danger">
|
|
<h3 class="title is-4">Plan Error</h3>
|
|
<p>{{planError}}</p>
|
|
</div>
|
|
{{/if}}
|
|
{{#if runError}}
|
|
<div data-test-run-error class="notification is-danger">
|
|
<h3 class="title is-4">Run Error</h3>
|
|
<p>{{runError}}</p>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if (eq stage "editor")}}
|
|
{{#if showEditorMessage}}
|
|
<div class="notification is-info">
|
|
<div class="columns">
|
|
<div class="column">
|
|
<h3 class="title is-4">Run a Job</h3>
|
|
<p>Paste or author HCL or JSON to submit to your cluster. A plan will be requested before the job is submitted.</p>
|
|
</div>
|
|
<div class="column is-centered is-minimum">
|
|
<button class="button is-info" onclick={{toggle-action "showEditorMessage" this}}>Okay</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
<div class="boxed-section">
|
|
<div class="boxed-section-head">
|
|
Job Definition
|
|
</div>
|
|
<div class="boxed-section-body is-full-bleed">
|
|
{{ivy-codemirror
|
|
value=(or model._newDefinition jobSpec)
|
|
valueUpdated=(action (mut model._newDefinition))
|
|
options=(hash
|
|
mode="javascript"
|
|
theme="hashi"
|
|
tabSize=2
|
|
lineNumbers=true
|
|
)}}
|
|
</div>
|
|
</div>
|
|
<div class="content is-associative">
|
|
<button class="button is-primary {{if plan.isRunning "is-loading"}}" onclick={{perform plan}}>Plan</button>
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if (eq stage "plan")}}
|
|
{{#if showPlanMessage}}
|
|
<div class="notification is-info">
|
|
<div class="columns">
|
|
<div class="column">
|
|
<h3 class="title is-4">Job Plan</h3>
|
|
<p>This is the impact running this job will have on your cluster.</p>
|
|
</div>
|
|
<div class="column is-centered is-minimum">
|
|
<button class="button is-info" onclick={{toggle-action "showPlanMessage" this}}>Okay</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{/if}}
|
|
<div class="boxed-section">
|
|
<div class="boxed-section-head">Job Plan</div>
|
|
<div class="boxed-section-body is-dark">
|
|
{{job-diff diff=planOutput.Diff}}
|
|
</div>
|
|
</div>
|
|
<div class="content is-associative">
|
|
<button class="button is-primary {{if submit.isRunning "is-loading"}}" onclick={{perform submit}}>Submit</button>
|
|
<button class="button is-light" onclick={{action reset}}>Cancel</button>
|
|
</div>
|
|
{{/if}}
|
|
</section>
|