Files
nomad/ui/app/templates/variables/variable/edit.hbs
Phil Renaud a769c12c6d Edit Secure Variables as JSON (#13461)
* Toying with insert and update helpers before translation func

* Working prototype that lets you switch between json and tabular

* No longer add the bonus items row in json mode

* Trimmed the ivy from the codemirror (#13503)

* Trimmed the ivy from the codemirror

* editedJSONItems removal

* De-debugger

* Replaced other instances of IvyCodeMirror throughout the app (#13528)

* Replaced other instances of IvyCodeMirror throughout the app

* PR requests for codemirror modifier

* Screen reader setting as param

* Trying a simpler codemirror test helper

* Lint removal

* Screen Reader Label added for a11y

* JSONViewer cleanup

* JSON editor added to /new and all variables stringified before save or translate

* Give users a foothold when editing an empty item in JSON mode

* Copy the empty KV

* No duplicate keys in KV

* Better handling of cursor snapping in json edit field

* Catch formatting errors on the fly

* Basic tests for JSON to Table and Table to JSON in form
2022-07-11 13:34:06 -04:00

27 lines
565 B
Handlebars

{{page-title "Edit Secure Variable"}}
<h1 class="title variable-title">
<LinkTo class="back-link" @route="variables.variable.index">
<FlightIcon
@name="chevron-left"
@title="Back to {{this.model.path}}"
@size="24"
/>
</LinkTo>
Edit
{{this.model.path}}
<Toggle
data-test-memory-toggle
@isActive={{eq this.view "json"}}
@onToggle={{action this.toggleView}}
title="JSON"
>JSON</Toggle>
</h1>
<SecureVariableForm
@model={{this.model}}
@existingVariables={{this.existingVariables}}
@view={{this.view}}
/>