From 147d97145b3c3ad0edde6b852fe90e0e4243c813 Mon Sep 17 00:00:00 2001 From: Luiz Aoqui Date: Wed, 8 Dec 2021 19:13:22 -0500 Subject: [PATCH] ui: revert default mirage scenario to topoMedium and set product links in all scenarios (#11649) --- ui/config/environment.js | 3 +-- ui/mirage/scenarios/default.js | 8 ++++---- ui/mirage/scenarios/sysbatch.js | 3 ++- ui/mirage/scenarios/topo.js | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ui/config/environment.js b/ui/config/environment.js index fd9caf529..35f112b9b 100644 --- a/ui/config/environment.js +++ b/ui/config/environment.js @@ -25,8 +25,7 @@ module.exports = function(environment) { APP: { blockingQueries: true, - // TODO: revert before merging to main. - mirageScenario: 'sysbatchSmall', // convert to 'sysbatchSmall' when working on feature + mirageScenario: 'topoMedium', mirageWithNamespaces: false, mirageWithTokens: true, mirageWithRegions: true, diff --git a/ui/mirage/scenarios/default.js b/ui/mirage/scenarios/default.js index d01d7f460..139b4d4c3 100644 --- a/ui/mirage/scenarios/default.js +++ b/ui/mirage/scenarios/default.js @@ -60,7 +60,7 @@ function smallCluster(server) { } function mediumCluster(server) { - server.createList('agent', 3); + server.createList('agent', 3, 'withConsulLink', 'withVaultLink'); server.createList('node', 50); server.createList('job', 25); } @@ -79,7 +79,7 @@ function massiveCluster(server) { } function allJobTypes(server) { - server.createList('agent', 3); + server.createList('agent', 3, 'withConsulLink', 'withVaultLink'); server.createList('node', 5); server.create('job', { type: 'service' }); @@ -93,7 +93,7 @@ function allJobTypes(server) { } function allNodeTypes(server) { - server.createList('agent', 3); + server.createList('agent', 3, 'withConsulLink', 'withVaultLink'); server.create('node'); server.create('node', 'forceIPv4'); @@ -106,7 +106,7 @@ function allNodeTypes(server) { } function everyFeature(server) { - server.createList('agent', 3); + server.createList('agent', 3, 'withConsulLink', 'withVaultLink'); server.create('node', 'forceIPv4'); server.create('node', 'draining'); diff --git a/ui/mirage/scenarios/sysbatch.js b/ui/mirage/scenarios/sysbatch.js index 8b3161b8b..e3724ab87 100644 --- a/ui/mirage/scenarios/sysbatch.js +++ b/ui/mirage/scenarios/sysbatch.js @@ -7,7 +7,8 @@ export function sysbatchLarge(server) { } function sysbatchScenario(server, clientCount) { - server.createList('agent', 3); + server.createList('agent', 3, 'withConsulLink', 'withVaultLink'); + const clients = server.createList('node', clientCount, { datacenter: 'dc1', status: 'ready', diff --git a/ui/mirage/scenarios/topo.js b/ui/mirage/scenarios/topo.js index c8ce1ed65..fc5910060 100644 --- a/ui/mirage/scenarios/topo.js +++ b/ui/mirage/scenarios/topo.js @@ -10,7 +10,7 @@ const genResources = (CPU, Memory) => ({ }); export function topoSmall(server) { - server.createList('agent', 3); + server.createList('agent', 3, 'withConsulLink', 'withVaultLink'); server.createList('node', 12, { datacenter: 'dc1', status: 'ready', @@ -46,7 +46,7 @@ export function topoSmall(server) { } export function topoMedium(server) { - server.createList('agent', 3); + server.createList('agent', 3, 'withConsulLink', 'withVaultLink'); server.createList('node', 10, { datacenter: 'us-west-1', status: 'ready',