You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui/packages/consul-ui/mock-api/v1/namespaces

71 lines
1.6 KiB

[
{
"Name": "default",
"Description": "The default namespace",
${typeof location.search.partition !== 'undefined' ? `
"Partition": "${location.search.partition}",
` : ``}
"ACLs": {
"PolicyDefaults": [
${range(env('CONSUL_POLICY_COUNT', 3)).map((i) => `
{
"ID": "${fake.random.uuid()}-${i}",
"Name": "${fake.hacker.noun()}-policy"
}
`)}
],
"RoleDefaults": [
${range(env('CONSUL_ROLE_COUNT', 3)).map((i) => `
{
"ID": "${fake.random.uuid()}-${i}",
"Name": "${fake.hacker.noun()}-role"
}
`)}
]
}
}
${range(
env(
'CONSUL_NSPACE_COUNT',
Math.floor(
(
Math.random() * env('CONSUL_NSPACE_MAX', 10)
) + parseInt(env('CONSUL_NSPACE_MIN', 1))
)
) - 1
).map(i => `
${i === 0 ? `
,
` : ``}
{
"Name": "${fake.hacker.noun()}-ns-${i}",
${typeof location.search.partition !== 'undefined' ? `
"Partition": "${location.search.partition}",
` : ``}
"ACLs": {
"PolicyDefaults": [
${range(env('CONSUL_POLICY_COUNT', 3)).map((i) => `
{
"ID": "${fake.random.uuid()}-${i}",
"Name": "${fake.hacker.noun()}-policy"
}
`)}
],
"RoleDefaults": [
${range(env('CONSUL_ROLE_COUNT', 3)).map((i) => `
{
"ID": "${fake.random.uuid()}-${i}",
"Name": "${fake.hacker.noun()}-role"
}
`)}
]
},
${fake.random.boolean() ? `
"Description": "${fake.lorem.sentence()}",
` : ``}
"CreateIndex": 12,
"ModifyIndex": 16
}
`)}
]