open-consul/ui/packages/consul-ui/mock-api/v1/acl/binding-rules
Kenia 5ce88774b8
ui: Auth Methods - Create Binding Rules tab (#9914)
* Create BindingRule adapter and tests

* Create BindingRule serializer and test

* Create BindingRule model and repository

* Add binding-rules mock data

* Create binding-rules router and call endpoint

* Create Binding rules tab

* Create and use BindingView component

* Create empty state for BindingView

* Remove binding rule requestForQueryRecord endpoint and tests

* Update binding rules selector to be monospaced

* Add bind type tooltip

* Create and Tabular-dl styling component

* Update hr tag global styling

* Rename BindingView to BindingList and refactor

* Add translations for bind types tooltip info

* Remove unused endpoint

* Refactor based on review notes
2021-03-26 11:47:47 -04:00

31 lines
889 B
Plaintext

[
${
range(
env(
'CONSUL_BINDING_RULE_COUNT',
Math.floor(
(
Math.random() * env('CONSUL_BINDING_RULE_MAX', 10)
) + parseInt(env('CONSUL_BINDING_RULE_MIN', 1))
)
)
).map(
function(item, i) {
return `
{
"ID": "${fake.random.uuid()}",
"Description": "${fake.lorem.sentence()}",
"AuthMethod": "${fake.hacker.noun()}-${i}",
"Selector": "serviceaccount.namespace==${fake.hacker.noun()} and serviceaccount.name!=${fake.hacker.noun()}",
"BindType": "${fake.helpers.randomize(['service', 'node', 'role'])}",
"BindName": "${fake.hacker.noun()}-${i}",
"Namespace": "${location.search.ns}",
"CreateIndex": ${fake.random.number()},
"ModifyIndex": 10
}
`
}
)
}
]