Browse Source

ui: Update mock intention metadata to only include possible values (#14607)

pull/14568/head
John Cowen 2 years ago committed by GitHub
parent
commit
057d28f90e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      ui/packages/consul-ui/mock-api/v1/connect/_
  2. 2
      ui/packages/consul-ui/mock-api/v1/connect/intentions/_
  3. 2
      ui/packages/consul-ui/mock-api/v1/connect/intentions/exact
  4. 4
      ui/packages/consul-ui/mock-api/v1/internal/ui/service-topology/_

11
ui/packages/consul-ui/mock-api/v1/connect/_

@ -97,16 +97,7 @@ ${fake.helpers.randomize([
"Precedence": ${i + 1},
${ fake.random.number({min: 1, max: 10}) > 2 ? `
"Meta": {
"external-source": "${fake.helpers.randomize([
'consul-api-gateway',
'vault',
'nomad',
'terraform',
'kubernetes',
'aws',
'lambda',
''
])}"
"external-source": "${fake.helpers.randomize(['kubernetes', ''])}"
},
` : `` }
"CreatedAt": "2018-05-21T16:41:27.977155457Z",

2
ui/packages/consul-ui/mock-api/v1/connect/intentions/_

@ -81,7 +81,7 @@ ${fake.helpers.randomize([
"Precedence": ${fake.random.number({min: 1, max: 100})},
${ !legacy && fake.random.number({min: 1, max: 10}) > 2 ? `
"Meta": {
"external-source": "${fake.helpers.randomize(['kubernetes', 'consul-api-gateway'])}"
"external-source": "${fake.helpers.randomize(['kubernetes', ''])}"
},
` : `` }
"CreatedAt": "2018-05-21T16:41:27.977155457Z",

2
ui/packages/consul-ui/mock-api/v1/connect/intentions/exact

@ -87,7 +87,7 @@ ${fake.helpers.randomize([
"Precedence": ${fake.random.number({min: 1, max: 100})},
${ (!legacy || source[1] === "external-source") && fake.random.number({min: 1, max: 10}) > 2 ? `
"Meta": {
"external-source": "${fake.helpers.randomize(['kubernetes', 'consul-api-gateway'])}"
"external-source": "${fake.helpers.randomize(['kubernetes', ''])}"
},
` : `` }
"CreatedAt": "2018-05-21T16:41:27.977155457Z",

4
ui/packages/consul-ui/mock-api/v1/internal/ui/service-topology/_

@ -86,7 +86,7 @@ ${(Math.random(1) > 0.3) ? `
"Intention": {
"Allowed": ${allowed},
"HasPermissions": ${hasPerms},
"ExternalSource": "${fake.helpers.randomize(['vault', 'nomad', 'kubernetes', ''])}",
"ExternalSource": "${fake.helpers.randomize(['kubernetes', ''])}",
"HasExact": ${fake.random.boolean()},
"DefaultAllow": ${fake.random.boolean()}
}
@ -116,7 +116,7 @@ ${(Math.random(1) > 0.3) ? `
"Intention": {
"Allowed": ${allowed},
"HasPermissions": ${hasPerms},
"ExternalSource": "${fake.helpers.randomize(['nomad', 'kubernetes', ''])}",
"ExternalSource": "${fake.helpers.randomize(['kubernetes', ''])}",
"HasExact": ${fake.random.boolean()},
"DefaultAllow": ${fake.random.boolean()}
}

Loading…
Cancel
Save