open-nomad/ui/app/templates/variables/new.hbs
Phil Renaud c8455d34d4 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

22 lines
535 B
Handlebars

{{page-title "New Secure Variable"}}
<Breadcrumb @crumb={{hash label="New" args=(array "variables.new")}} />
<section class="section">
<h1 class="title variable-title">
Create a Secure Variable
<Toggle
data-test-memory-toggle
@isActive={{eq this.view "json"}}
@onToggle={{action this.toggleView}}
title="JSON"
>JSON</Toggle>
</h1>
<SecureVariableForm
@model={{this.model}}
@path={{this.path}}
@existingVariables={{this.existingVariables}}
@view={{this.view}}
/>
</section>