mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 17:05:43 +03:00
29 lines
719 B
JavaScript
29 lines
719 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
// @ts-check
|
|
import { action } from '@ember/object';
|
|
import Component from '@glimmer/component';
|
|
import { tracked } from '@glimmer/tracking';
|
|
|
|
export default class JobTemplateEditor extends Component {
|
|
@tracked description;
|
|
@tracked template;
|
|
@action
|
|
establishKeyValues() {
|
|
this.description = this.args.keyValues.findBy('key', 'description')?.value;
|
|
this.template = this.args.keyValues.findBy('key', 'template')?.value;
|
|
}
|
|
|
|
@action
|
|
updateDescription(event) {
|
|
this.args.updateKeyValue('description', event.target.value);
|
|
}
|
|
@action
|
|
updateTemplate(value) {
|
|
this.args.updateKeyValue('template', value);
|
|
}
|
|
}
|