vault/ui/app/components/dashboard/vault-configuration-details-card.js
Jordan Reimer 8700becc45
[UI] Ember Data Migration - API Property Casing (#31325)
* 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
2025-07-18 09:32:01 -06:00

31 lines
1.0 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import Component from '@glimmer/component';
/**
* @module DashboardVaultConfigurationCard
* DashboardVaultConfigurationCard component are used to display vault configuration.
*
* @example
* ```js
* <DashboardVaultConfigurationCard @vaultConfiguration={{@model.vaultConfiguration}} />
* ```
* @param {object} vaultConfiguration - object of vault configuration key/values
*/
export default class DashboardSecretsEnginesCard extends Component {
get tls() {
// since the default for tls_disable is false it may not be in the config
// consider tls enabled if tls_disable is undefined or false AND both tls_cert_file and tls_key_file are defined
const tlsListener = this.args.vaultConfiguration?.listeners.find((listener) => {
const { tls_disable, tls_cert_file, tls_key_file } = listener.config || {};
return !tls_disable && tls_cert_file && tls_key_file;
});
return tlsListener ? 'Enabled' : 'Disabled';
}
}