From f3a508f55bfdc803dd8da1bd4d87f3e5cc2fb783 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 65b0c5972..7ba49d725 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 40c1abdd4..26dd645f9 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 06a5834c8..9de0cf4b3 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 f2bbb523f..f6ea48e97 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()} }