consul/ui/packages/consul-ui/mock-api/v1/acl/policy/_

17 lines
741 B
Plaintext

{
"ID": "${location.pathname.get(3)}",
${typeof location.search.ns !== 'undefined' ? `
"Namespace": "${location.search.ns}",
` : ``}
"Description": "${location.pathname.get(3) === '00000000-0000-0000-0000-000000000001' ? 'Built-in Management Policy' : fake.lorem.sentence()}",
${ location.pathname.get(3) !== '00000000-0000-0000-0000-000000000001' ? `
"Datacenters": ${fake.helpers.randomize(['["aq west-5", "ch east-4"]'])},
"Rules": ${JSON.stringify(
`key "foo" {
policy = "write"
}`)},
` : "" }
"Name": "${location.pathname.get(3) === '00000000-0000-0000-0000-000000000001' ? 'global-management' : location.pathname.get(3) === '00000000-0000-0000-0000-000000000002' ? 'global-read-only': fake.hacker.noun() + '-policy'}"
}