mirror of https://github.com/status-im/consul.git
ui: Slight update to peering mocks to more properly match actual (#13664)
This commit is contained in:
parent
aaad7692ce
commit
892032acae
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"ID": "${fake.random.uuid()}",
|
"ID": "${fake.random.uuid()}",
|
||||||
|
"ImportedServiceCount": ${fake.random.number({min: 0, max: 4000})},
|
||||||
|
"ExportedServiceCount": ${fake.random.number({min: 0, max: 4000})},
|
||||||
"Name": "${location.pathname.get(2)}",
|
"Name": "${location.pathname.get(2)}",
|
||||||
"State": "${fake.helpers.randomize([
|
"State": "${fake.helpers.randomize([
|
||||||
'ACTIVE',
|
'ACTIVE',
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
${
|
${
|
||||||
range(
|
range(
|
||||||
env('CONSUL_PEER_COUNT', Math.floor((Math.random() * 10) + 1))
|
env('CONSUL_PEER_COUNT', Math.floor((Math.random() * 10) + 1))
|
||||||
).map(i => `
|
).map(i => {
|
||||||
|
const id = `${fake.random.uuid()}-${i}`;
|
||||||
|
return `
|
||||||
|
|
||||||
{
|
{
|
||||||
"ID": "${fake.random.uuid()}-${i}",
|
"ID": "${id}",
|
||||||
"Name": "${fake.hacker.noun()}-peer-${i}",
|
"Name": "${fake.hacker.noun()}-peer-${i}",
|
||||||
"State": "${fake.helpers.randomize([
|
"State": "${fake.helpers.randomize([
|
||||||
'ACTIVE',
|
'ACTIVE',
|
||||||
|
@ -18,9 +20,19 @@
|
||||||
])}",
|
])}",
|
||||||
"ImportedServiceCount": ${fake.random.number({min: 0, max: 4000})},
|
"ImportedServiceCount": ${fake.random.number({min: 0, max: 4000})},
|
||||||
"ExportedServiceCount": ${fake.random.number({min: 0, max: 4000})},
|
"ExportedServiceCount": ${fake.random.number({min: 0, max: 4000})},
|
||||||
|
"PeerID": "${id}",
|
||||||
|
"PeerServerName": "${fake.internet.domainName()}",
|
||||||
|
"PeerServerAddresses": [
|
||||||
|
${
|
||||||
|
range(
|
||||||
|
env('CONSUL_PEER_ADDRESS_COUNT', Math.floor((Math.random() * 10) + 1))
|
||||||
|
).map(i => `
|
||||||
|
"${fake.internet.ip()}:${fake.random.number({min: 0, max: 65535})}"
|
||||||
|
`)}
|
||||||
|
],
|
||||||
"CreateIndex": 16,
|
"CreateIndex": 16,
|
||||||
"ModifyIndex": 16
|
"ModifyIndex": 16
|
||||||
}
|
}
|
||||||
|
|
||||||
`)}
|
`})}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue