mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-19 13:41:10 +02:00
* move files around * move fetches to config to the configuration.index route * working... for aws, lots of clean up left * move error handling to parent route * standarize configModel param * add test coverage * welp a miss for non configurable engines * pr comments * remove mirage interrupts and test actual api * update configuration details test to test for template only things * api error coverage
39 lines
899 B
JavaScript
39 lines
899 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Component from '@glimmer/component';
|
|
import { action } from '@ember/object';
|
|
|
|
/**
|
|
* @module ConfigureSshSComponent
|
|
*
|
|
* @example
|
|
* ```js
|
|
* <SecretEngine::ConfigureSsh
|
|
* @model={{this.model}}
|
|
* @configured={{this.configured}}
|
|
* @saveConfig={{action "saveConfig"}}
|
|
* @loading={{this.loading}}
|
|
* />
|
|
* ```
|
|
*
|
|
* @param {string} model - ssh secret engine model
|
|
* @param {Function} saveConfig - parent action which updates the configuration
|
|
* @param {boolean} loading - property in parent that updates depending on status of parent's action
|
|
*
|
|
*/
|
|
export default class ConfigureSshComponent extends Component {
|
|
@action
|
|
delete() {
|
|
this.args.saveConfig({ delete: true });
|
|
}
|
|
|
|
@action
|
|
saveConfig(event) {
|
|
event.preventDefault();
|
|
this.args.saveConfig({ delete: false });
|
|
}
|
|
}
|