open-consul/ui/packages/consul-ui/mock-api/v1/acl/auth-methods
Kenia eab741eab8
ui: Create auth-method show page with General Info Tab (#9845)
* Update list items to be linkable to auth-methods show

* Add general, namespace, and binding sub-routes

* Remove namespace and binding tabs to be done separately

* Update auth-method byId endpoint

* Style the show auth-method kubernetes type

* Finish Kubernetes auth-method type styling

* OIDC and JWT auth-method styling

* Create consul-auth-method-view component

* Add navigation test for auth-methods

* Create Certificate component
2021-03-17 10:40:56 -04:00

47 lines
1.2 KiB
Plaintext

[
${
range(
env(
'CONSUL_AUTH_METHOD_COUNT',
Math.floor(
(
Math.random() * env('CONSUL_AUTH_METHOD_MAX', 10)
) + parseInt(env('CONSUL_AUTH_METHOD_MIN', 1))
)
)
).map(
function(item, i) {
return `
{
"Name": "${fake.hacker.noun()}-${i}",
${typeof location.search.ns !== 'undefined' ? `
"Namespace": "${location.search.ns}",
` : ``}
${env('CONSUL_NSPACES_ENABLE', false) ? `
"Type": "${fake.helpers.randomize(['kubernetes', 'jwt', 'oidc'])}",
` : `
"Type": "${fake.helpers.randomize(['kubernetes', 'jwt'])}",
`}
"Description": "${fake.lorem.sentence()}",
${i%2 ? `
"DisplayName": "${fake.hacker.noun()}-${i}",
` : `
"DisplayName": "",
`}
${i%2 ? `
"MaxTokenTTL": "${fake.random.number({min: 0, max: 60})}m${fake.random.number({min: 0, max: 60})}s",
` : `
`}
${i%2 ? `
"TokenLocality": "${fake.helpers.randomize(['local', 'global', ''])}",
` : `
`}
"CreateIndex": ${fake.random.number()},
"ModifyIndex": 10
}
`
}
)
}
]