mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 15:11:07 +02:00
* updates api client vars to snake_case for custom messages * updates api client vars to snake_case for tools * updates api client vars to snake_case for sync * updates api client vars to snake_case for secrets engine * updates api client vars to snake_case for auth * updates api client vars to snake_case for usage * updates api client dep to point to gh repo * fixes custom-messages service unit tests * fixes configure-ssh test * fixes configure-ssh test...again
75 lines
2.4 KiB
Handlebars
75 lines
2.4 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
<form {{on "submit" (perform this.save)}} aria-label="save ssh creds" class="has-top-padding-m" data-test-configure-form>
|
|
<NamespaceReminder @mode="save" @noun="configuration" />
|
|
<MessageError @errorMessage={{this.errorMessage}} />
|
|
{{#if @configForm.isNew}}
|
|
{{#each @configForm.formFields as |attr|}}
|
|
<FormField @attr={{attr}} @model={{@configForm}} @modelValidations={{this.modelValidations}} />
|
|
{{/each}}
|
|
<hr class="has-background-gray-300" />
|
|
<Hds::ButtonSet>
|
|
<Hds::Button
|
|
@text="Save"
|
|
@icon={{if this.save.isRunning "loading"}}
|
|
type="submit"
|
|
disabled={{this.save.isRunning}}
|
|
data-test-submit
|
|
/>
|
|
<Hds::Button
|
|
@text="Cancel"
|
|
@color="secondary"
|
|
disabled={{this.save.isRunning}}
|
|
{{on "click" this.onCancel}}
|
|
data-test-cancel
|
|
/>
|
|
</Hds::ButtonSet>
|
|
{{#if this.invalidFormAlert}}
|
|
<AlertInline
|
|
data-test-invalid-form-alert
|
|
class="has-top-padding-s"
|
|
@type="danger"
|
|
@message={{this.invalidFormAlert}}
|
|
/>
|
|
{{/if}}
|
|
{{else}}
|
|
{{! Form is not new and keys have already been created. Require user deletes the keys before creating new ones }}
|
|
<p class="has-text-grey-dark has-top-bottom-margin">
|
|
NOTE: You must delete your existing certificate and key before saving new values.
|
|
</p>
|
|
|
|
<div class="box is-fullwidth is-sideless" data-test-edit-config-section>
|
|
<label for="publicKey" class="is-label">
|
|
Public key
|
|
</label>
|
|
<div class="control">
|
|
<MaskedInput
|
|
@name="publicKey"
|
|
@id="publicKey"
|
|
@value={{@configForm.public_key}}
|
|
@displayOnly={{true}}
|
|
@allowCopy={{true}}
|
|
data-test-input="public-key"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<Hds::ButtonSet>
|
|
<Hds::Copy::Button
|
|
@text="Copy"
|
|
@textToCopy={{@configForm.public_key}}
|
|
@onError={{fn (set-flash-message "Clipboard copy failed. The Clipboard API requires a secure context." "danger")}}
|
|
class="primary"
|
|
/>
|
|
<ConfirmAction
|
|
@buttonText="Delete"
|
|
@buttonColor="secondary"
|
|
@confirmMessage="Confirming will remove the CA certificate information."
|
|
@onConfirmAction={{this.deleteCaConfig}}
|
|
data-test-button="delete-public-key"
|
|
/>
|
|
</Hds::ButtonSet>
|
|
{{/if}}
|
|
</form> |