mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
didUpdateAttributes manually called on modify (#23548)
This commit is contained in:
3
.changelog/23548.txt
Normal file
3
.changelog/23548.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
ui: Fix the Upload Jobspec button on the Run Job page
|
||||
```
|
||||
@@ -31,6 +31,8 @@ export default class CodeMirrorModifier extends Modifier {
|
||||
this.element = element;
|
||||
this.args = { positional, named };
|
||||
this._setup();
|
||||
} else {
|
||||
this.didUpdateArguments();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,28 +15,26 @@
|
||||
<p>
|
||||
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.
|
||||
</p>
|
||||
|
||||
{{#if (can "read variable" path="nomad/job-templates/*" namespace="*")}}
|
||||
<Hds::ButtonSet>
|
||||
<label
|
||||
class="job-spec-upload hds-button hds-button--color-secondary hds-button--size-medium"
|
||||
>
|
||||
<div class="hds-button__text">Upload file</div>
|
||||
<input
|
||||
type="file"
|
||||
onchange={{action this.uploadJobSpec}}
|
||||
accept=".hcl,.json,.nomad"
|
||||
/>
|
||||
</label>
|
||||
<Hds::ButtonSet>
|
||||
<label
|
||||
class="job-spec-upload hds-button hds-button--color-secondary hds-button--size-medium"
|
||||
>
|
||||
<div class="hds-button__text">Upload file</div>
|
||||
<input
|
||||
type="file"
|
||||
onchange={{action this.fns.onUpload}}
|
||||
accept=".hcl,.json,.nomad"
|
||||
/>
|
||||
</label>
|
||||
{{#if (can "read variable" path="nomad/job-templates/*" namespace="*")}}
|
||||
<Hds::Button
|
||||
@text="Choose from template"
|
||||
@color="secondary"
|
||||
@route="jobs.run.templates"
|
||||
data-test-choose-template
|
||||
/>
|
||||
</Hds::ButtonSet>
|
||||
{{/if}}
|
||||
|
||||
{{/if}}
|
||||
</Hds::ButtonSet>
|
||||
</header>
|
||||
{{/if}}
|
||||
{{did-update this.setDefinitionOnModel this.definition}}
|
||||
|
||||
Reference in New Issue
Block a user