Update peering mocks
This commit is contained in:
parent
db4b38c36e
commit
4c2a5c31dc
|
@ -0,0 +1,31 @@
|
|||
|
||||
${[0].map(
|
||||
() => {
|
||||
let prevKind;
|
||||
let name;
|
||||
const gateways = ['mesh-gateway', 'ingress-gateway', 'terminating-gateway'];
|
||||
return `
|
||||
[
|
||||
${
|
||||
range(
|
||||
env(
|
||||
'CONSUL_SERVICE_COUNT',
|
||||
Math.floor(
|
||||
(
|
||||
Math.random() * env('CONSUL_SERVICE_MAX', 10)
|
||||
) + parseInt(env('CONSUL_SERVICE_MIN', 1))
|
||||
)
|
||||
)
|
||||
).map(
|
||||
function(item, i)
|
||||
{
|
||||
return `
|
||||
{
|
||||
"Name": "service-${i}"
|
||||
}
|
||||
`;
|
||||
}
|
||||
)
|
||||
}
|
||||
]
|
||||
`})}
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
"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)}",
|
||||
"State": "${fake.helpers.randomize([
|
||||
'ACTIVE',
|
||||
|
@ -12,6 +10,13 @@
|
|||
'TERMINATED',
|
||||
'UNDEFINED'
|
||||
])}",
|
||||
"StreamStatus": {
|
||||
"LastHeartbeat": "${fake.date.past(10).toISOString()}",
|
||||
"LastReceive": "${fake.date.past(10).toISOString()}",
|
||||
"LastSend": "${fake.date.past(10).toISOString()}",
|
||||
"ExportedServices": [${range(0, Math.floor(Math.random() * 10)).map((i) => `"exported-service-${i}"`)}],
|
||||
"ImportedServices": [${range(0, Math.floor(Math.random() * 10)).map((i) => `"imported-service-${i}"`)}]
|
||||
},
|
||||
"PeerID": "${fake.random.uuid()}",
|
||||
"PeerServerName": "${fake.internet.domainName()}",
|
||||
"PeerServerAddresses": [
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
"LastHeartbeat": "${fake.date.past(10).toISOString()}",
|
||||
"LastReceive": "${fake.date.past(10).toISOString()}",
|
||||
"LastSend": "${fake.date.past(10).toISOString()}",
|
||||
"ExportedServices": ["${`export-service-${i}`}"],
|
||||
"ImportedServices": ["${`import-service-${i}`}"]
|
||||
"ExportedServices": [${range(0, Math.floor(Math.random() * 10)).map((i) => `"exported-service-${i}"`)}],
|
||||
"ImportedServices": [${range(0, Math.floor(Math.random() * 10)).map((i) => `"imported-service-${i}"`)}]
|
||||
},
|
||||
"PeerID": "${id}",
|
||||
"PeerServerName": "${fake.internet.domainName()}",
|
||||
|
|
Loading…
Reference in New Issue