2020-08-26 16:31:18 +00:00
|
|
|
<div class="box is-fullwidth is-sideless is-paddingless is-marginless">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#each this.model.transformFieldAttrs as |attr|}}
|
2020-08-26 16:31:18 +00:00
|
|
|
{{#if (eq attr.type "object")}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<InfoTableRow
|
|
|
|
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
|
|
|
@value={{stringify (get this.model attr.name)}}
|
|
|
|
/>
|
2020-09-15 18:11:24 +00:00
|
|
|
{{else if (eq attr.type "array")}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<InfoTableRow
|
|
|
|
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
|
|
|
@value={{get this.model attr.name}}
|
|
|
|
@type={{attr.type}}
|
|
|
|
@isLink={{eq attr.name "allowed_roles"}}
|
|
|
|
@queryParam="role"
|
|
|
|
@modelType="transform/role"
|
|
|
|
@wildcardLabel={{attr.options.wildcardLabel}}
|
|
|
|
@viewAll="roles"
|
|
|
|
@backend={{this.model.backend}}
|
|
|
|
/>
|
2020-08-26 16:31:18 +00:00
|
|
|
{{else}}
|
2021-12-17 03:44:29 +00:00
|
|
|
<InfoTableRow
|
|
|
|
@label={{capitalize (or attr.options.label (humanize (dasherize attr.name)))}}
|
|
|
|
@value={{get this.model attr.name}}
|
|
|
|
@type={{attr.type}}
|
|
|
|
/>
|
2020-08-26 16:31:18 +00:00
|
|
|
{{/if}}
|
|
|
|
{{/each}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="has-top-margin-xl has-bottom-margin-s">
|
|
|
|
<label class="title has-border-bottom-light page-header">CLI Commands</label>
|
|
|
|
<div class="has-bottom-margin-s">
|
|
|
|
<h2 class="title is-6">Encode</h2>
|
|
|
|
<div class="has-bottom-margin-s">
|
|
|
|
<span class="helper-text has-text-grey">
|
|
|
|
To test the encoding capability of your transformation, use the following command. It will output an encoded_value.
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="copy-text level">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#let (concat "vault write " this.model.backend "/encode/" this.cliCommand) as |copyEncodeCommand|}}
|
|
|
|
<code>vault write {{this.model.backend}}/encode/{{this.cliCommand}}</code>
|
|
|
|
<CopyButton
|
|
|
|
class="button is-transparent level-right"
|
|
|
|
@clipboardText={{copyEncodeCommand}}
|
|
|
|
@buttonType="button"
|
|
|
|
@success={{action (set-flash-message "Command copied!")}}
|
|
|
|
>
|
2021-12-07 17:05:14 +00:00
|
|
|
<Icon @name="clipboard-copy" aria-label="Copy" />
|
2020-08-26 16:31:18 +00:00
|
|
|
</CopyButton>
|
|
|
|
{{/let}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<h2 class="title is-6">Decode</h2>
|
|
|
|
<div class="has-bottom-margin-s">
|
|
|
|
<span class="helper-text has-text-grey">
|
2021-12-17 03:44:29 +00:00
|
|
|
To test decoding capability of your transformation, use the encoded_value in the following command. It should return
|
|
|
|
your original input.
|
2020-08-26 16:31:18 +00:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="copy-text level">
|
2021-12-17 03:44:29 +00:00
|
|
|
{{#let (concat "vault write " this.model.backend "/decode/" this.cliCommand) as |copyDecodeCommand|}}
|
|
|
|
<code>vault write {{this.model.backend}}/decode/{{this.cliCommand}}</code>
|
|
|
|
<CopyButton
|
|
|
|
class="button is-transparent level-right"
|
|
|
|
@clipboardText={{copyDecodeCommand}}
|
|
|
|
@buttonType="button"
|
|
|
|
@success={{action (set-flash-message "Command copied!")}}
|
|
|
|
>
|
2021-12-07 17:05:14 +00:00
|
|
|
<Icon @name="clipboard-copy" aria-label="Copy" />
|
2020-08-26 16:31:18 +00:00
|
|
|
</CopyButton>
|
|
|
|
{{/let}}
|
|
|
|
</div>
|
2021-12-17 03:44:29 +00:00
|
|
|
</div>
|
|
|
|
</div>
|