da8280f4c5
* Create mock-api endpoints for auth-methods * Implement auth-method endpoints and model with tests * Create route and tab for auth-methods * Create auth-method list and type components with styles * Add JWT and OIDC svg logos to codebase * Add brand translations * Add SearchBar to Auth Methods * Add acceptance test for Auth Methods UI * Skip auth method repo test * Changes from review notes * Fixup auth-method modela and mock-data * Update SearhBar with rebased changes * Add filterBy source and sortBy max token ttl * Update to SortBy MethodName * Update UI acceptance tests * Update mock data DisplayNames * Skip repo test * Fix to breaking serializer test * Implement auth-method endpoints and model with tests * Add acceptance test for Auth Methods UI * Update SearhBar with rebased changes * Add filterBy source and sortBy max token ttl * Update to SortBy MethodName * Update UI acceptance tests * Update mock data DisplayNames * Fix to breaking serializer test * Update class for search * Add auth-methods link to sidebar * Fixup PR review notes * Fixup review notes * Only show OIDC filter with enterprise * Update conditionals for MaxTokenTTL & TokenLocality * Refactor
43 lines
1 KiB
Plaintext
43 lines
1 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}",
|
|
` : ``}
|
|
"Type": "${fake.helpers.randomize(['kubernetes', 'jwt', 'oidc'])}",
|
|
"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
|
|
}
|
|
`
|
|
}
|
|
)
|
|
}
|
|
]
|