vault/ui/app/helpers/mountable-auth-methods.js
claire bontempo a5b60cd8cc
UI: move selectable card to add-on (#23739)
* remove title-number class and consolidate border radius

* move selectable card to core addon

* add top padding to db cards

* update transform icon color

* new selectable card component

* fix db test

* use selectable card in mount backend form

* fix query param for overview card

* update tests

* fix replication card styling

* make card accessible;

* update tabindex

* change to standalone for error handling

* update test selector

* update tests

* go back to number only css class

* fix on click tests

* add changelog

* update class name in template file

* delete box radio
2023-10-20 15:10:49 -07:00

126 lines
2.2 KiB
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: BUSL-1.1
*/
import { helper as buildHelper } from '@ember/component/helper';
const ENTERPRISE_AUTH_METHODS = [
{
displayName: 'SAML',
value: 'saml',
type: 'saml',
category: 'generic',
glyph: 'saml-color',
},
];
const MOUNTABLE_AUTH_METHODS = [
{
displayName: 'AliCloud',
value: 'alicloud',
type: 'alicloud',
category: 'cloud',
glyph: 'alibaba-color',
},
{
displayName: 'AppRole',
value: 'approle',
type: 'approle',
category: 'generic',
},
{
displayName: 'AWS',
value: 'aws',
type: 'aws',
category: 'cloud',
glyph: 'aws-color',
},
{
displayName: 'Azure',
value: 'azure',
type: 'azure',
category: 'cloud',
glyph: 'azure-color',
},
{
displayName: 'Google Cloud',
value: 'gcp',
type: 'gcp',
category: 'cloud',
glyph: 'gcp-color',
},
{
displayName: 'GitHub',
value: 'github',
type: 'github',
category: 'cloud',
glyph: 'github-color',
},
{
displayName: 'JWT',
value: 'jwt',
type: 'jwt',
glyph: 'auth',
category: 'generic',
},
{
displayName: 'OIDC',
value: 'oidc',
type: 'oidc',
glyph: 'auth',
category: 'generic',
},
{
displayName: 'Kubernetes',
value: 'kubernetes',
type: 'kubernetes',
category: 'infra',
glyph: 'kubernetes-color',
},
{
displayName: 'LDAP',
value: 'ldap',
type: 'ldap',
glyph: 'auth',
category: 'infra',
},
{
displayName: 'Okta',
value: 'okta',
type: 'okta',
category: 'infra',
glyph: 'okta-color',
},
{
displayName: 'RADIUS',
value: 'radius',
type: 'radius',
glyph: 'auth',
category: 'infra',
},
{
displayName: 'TLS Certificates',
value: 'cert',
type: 'cert',
category: 'generic',
},
{
displayName: 'Username & Password',
value: 'userpass',
type: 'userpass',
category: 'generic',
glyph: 'users',
},
];
export function methods() {
return MOUNTABLE_AUTH_METHODS.slice();
}
export function allMethods() {
return [...MOUNTABLE_AUTH_METHODS, ...ENTERPRISE_AUTH_METHODS];
}
export default buildHelper(methods);