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

18 lines
732 B
Plaintext

{
"ID": "${location.pathname.get(3)}",
"Namespace": "${
typeof location.search.ns !== 'undefined' ? location.search.ns :
typeof http.body.Namespace !== 'undefined' ? http.body.Namespace : 'default'
}",
"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' : fake.hacker.noun() + '-policy'}"
}