From 057d28f90ee2522ccb4ccd701d81a5a52d94a846 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Thu, 15 Sep 2022 09:37:40 +0100 Subject: [PATCH] ui: Update mock intention metadata to only include possible values (#14607) --- ui/packages/consul-ui/mock-api/v1/connect/_ | 11 +---------- .../consul-ui/mock-api/v1/connect/intentions/_ | 2 +- .../consul-ui/mock-api/v1/connect/intentions/exact | 2 +- .../mock-api/v1/internal/ui/service-topology/_ | 4 ++-- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/ui/packages/consul-ui/mock-api/v1/connect/_ b/ui/packages/consul-ui/mock-api/v1/connect/_ index 65b0c59727..7ba49d7256 100644 --- a/ui/packages/consul-ui/mock-api/v1/connect/_ +++ b/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", diff --git a/ui/packages/consul-ui/mock-api/v1/connect/intentions/_ b/ui/packages/consul-ui/mock-api/v1/connect/intentions/_ index 40c1abdd40..26dd645f90 100644 --- a/ui/packages/consul-ui/mock-api/v1/connect/intentions/_ +++ b/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", diff --git a/ui/packages/consul-ui/mock-api/v1/connect/intentions/exact b/ui/packages/consul-ui/mock-api/v1/connect/intentions/exact index 06a5834c82..9de0cf4b33 100644 --- a/ui/packages/consul-ui/mock-api/v1/connect/intentions/exact +++ b/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", diff --git a/ui/packages/consul-ui/mock-api/v1/internal/ui/service-topology/_ b/ui/packages/consul-ui/mock-api/v1/internal/ui/service-topology/_ index f2bbb523f3..f6ea48e974 100644 --- a/ui/packages/consul-ui/mock-api/v1/internal/ui/service-topology/_ +++ b/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()} }