ui: Update mock intention metadata to only include possible values (#14607)
This commit is contained in:
parent
939074a4e5
commit
f3a508f55b
|
@ -97,16 +97,7 @@ ${fake.helpers.randomize([
|
||||||
"Precedence": ${i + 1},
|
"Precedence": ${i + 1},
|
||||||
${ fake.random.number({min: 1, max: 10}) > 2 ? `
|
${ fake.random.number({min: 1, max: 10}) > 2 ? `
|
||||||
"Meta": {
|
"Meta": {
|
||||||
"external-source": "${fake.helpers.randomize([
|
"external-source": "${fake.helpers.randomize(['kubernetes', ''])}"
|
||||||
'consul-api-gateway',
|
|
||||||
'vault',
|
|
||||||
'nomad',
|
|
||||||
'terraform',
|
|
||||||
'kubernetes',
|
|
||||||
'aws',
|
|
||||||
'lambda',
|
|
||||||
''
|
|
||||||
])}"
|
|
||||||
},
|
},
|
||||||
` : `` }
|
` : `` }
|
||||||
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
|
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
|
||||||
|
|
|
@ -81,7 +81,7 @@ ${fake.helpers.randomize([
|
||||||
"Precedence": ${fake.random.number({min: 1, max: 100})},
|
"Precedence": ${fake.random.number({min: 1, max: 100})},
|
||||||
${ !legacy && fake.random.number({min: 1, max: 10}) > 2 ? `
|
${ !legacy && fake.random.number({min: 1, max: 10}) > 2 ? `
|
||||||
"Meta": {
|
"Meta": {
|
||||||
"external-source": "${fake.helpers.randomize(['kubernetes', 'consul-api-gateway'])}"
|
"external-source": "${fake.helpers.randomize(['kubernetes', ''])}"
|
||||||
},
|
},
|
||||||
` : `` }
|
` : `` }
|
||||||
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
|
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
|
||||||
|
|
|
@ -87,7 +87,7 @@ ${fake.helpers.randomize([
|
||||||
"Precedence": ${fake.random.number({min: 1, max: 100})},
|
"Precedence": ${fake.random.number({min: 1, max: 100})},
|
||||||
${ (!legacy || source[1] === "external-source") && fake.random.number({min: 1, max: 10}) > 2 ? `
|
${ (!legacy || source[1] === "external-source") && fake.random.number({min: 1, max: 10}) > 2 ? `
|
||||||
"Meta": {
|
"Meta": {
|
||||||
"external-source": "${fake.helpers.randomize(['kubernetes', 'consul-api-gateway'])}"
|
"external-source": "${fake.helpers.randomize(['kubernetes', ''])}"
|
||||||
},
|
},
|
||||||
` : `` }
|
` : `` }
|
||||||
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
|
"CreatedAt": "2018-05-21T16:41:27.977155457Z",
|
||||||
|
|
|
@ -86,7 +86,7 @@ ${(Math.random(1) > 0.3) ? `
|
||||||
"Intention": {
|
"Intention": {
|
||||||
"Allowed": ${allowed},
|
"Allowed": ${allowed},
|
||||||
"HasPermissions": ${hasPerms},
|
"HasPermissions": ${hasPerms},
|
||||||
"ExternalSource": "${fake.helpers.randomize(['vault', 'nomad', 'kubernetes', ''])}",
|
"ExternalSource": "${fake.helpers.randomize(['kubernetes', ''])}",
|
||||||
"HasExact": ${fake.random.boolean()},
|
"HasExact": ${fake.random.boolean()},
|
||||||
"DefaultAllow": ${fake.random.boolean()}
|
"DefaultAllow": ${fake.random.boolean()}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ ${(Math.random(1) > 0.3) ? `
|
||||||
"Intention": {
|
"Intention": {
|
||||||
"Allowed": ${allowed},
|
"Allowed": ${allowed},
|
||||||
"HasPermissions": ${hasPerms},
|
"HasPermissions": ${hasPerms},
|
||||||
"ExternalSource": "${fake.helpers.randomize(['nomad', 'kubernetes', ''])}",
|
"ExternalSource": "${fake.helpers.randomize(['kubernetes', ''])}",
|
||||||
"HasExact": ${fake.random.boolean()},
|
"HasExact": ${fake.random.boolean()},
|
||||||
"DefaultAllow": ${fake.random.boolean()}
|
"DefaultAllow": ${fake.random.boolean()}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue