Files
nomad/ui/app/templates/variables/variable/edit.hbs
Phil Renaud 89cceebb91 [ui] Multi-line variable values and helios upgrades generally (#19544)
* Multi-line variable values and helios upgrades generally

* Variables page titles and actions restyle

* Hacky fix to keyboard shortcut otherwise bumping space on shift

* Related entities heliosified

* Namespace and path fields heliosed

* Paths table heliosified

* Variable view table

* Fixups after design discussion

* Monospaced editing

* De-commented template placeholder

* Acceptance tests updated for helios components across variables

* Tests helios'd in variable-form-test

* PR suggestions
2024-01-03 15:54:22 -05:00

37 lines
971 B
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
~}}
{{page-title "Edit Variable"}}
<Hds::PageHeader class="variable-title" as |PH|>
<PH.Title>Editing {{this.model.path}}</PH.Title>
<PH.IconTile @icon="file-text" />
<PH.Actions>
<Hds::Form::Toggle::Field
@value="enable"
{{keyboard-shortcut
label="Toggle View (JSON/List)"
pattern=(array "j")
action=(action this.toggleView)
}}
checked={{eq this.view "json"}}
data-test-json-toggle
{{on "change" (action this.toggleView)}}
as |F|>
<F.Label>JSON</F.Label>
</Hds::Form::Toggle::Field>
</PH.Actions>
<PH.Breadcrumb>
<Hds::Breadcrumb>
<Hds::Breadcrumb::Item @text="Back" @route="variables.variable.index" @icon="chevron-left" />
</Hds::Breadcrumb>
</PH.Breadcrumb>
</Hds::PageHeader>
<VariableForm
@model={{this.model}}
@existingVariables={{this.existingVariables}}
@view={{this.view}}
/>