add credentials to mock
This commit is contained in:
parent
0722b05c06
commit
651e652c56
|
@ -5,15 +5,15 @@ const random_endpoints = [
|
||||||
ip: '192.168.3.1',
|
ip: '192.168.3.1',
|
||||||
status: "active", //active/inactive/unmonitored
|
status: "active", //active/inactive/unmonitored
|
||||||
last_active: "2020-03-21 11:12:33"
|
last_active: "2020-03-21 11:12:33"
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
os: 'Windows',
|
os: "Linux",
|
||||||
ip: '192.168.3.100',
|
name: 'RaspberryPi',
|
||||||
},
|
ip: '192.168.3.81',
|
||||||
{
|
credentials:{
|
||||||
os: 'Linux',
|
user: "pi",
|
||||||
ip: '192.168.3.91',
|
password: "elastic"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -25,6 +25,7 @@ const random_endpoints = [
|
||||||
res.json(random_endpoints);
|
res.json(random_endpoints);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
},
|
},
|
||||||
|
|
||||||
'get /endpoints/get_endpoint/1': function (req, res) {
|
'get /endpoints/get_endpoint/1': function (req, res) {
|
||||||
const responseObj = random_endpoints[random_endpoint_pick % random_endpoints.length];
|
const responseObj = random_endpoints[random_endpoint_pick % random_endpoints.length];
|
||||||
random_endpoint_pick += 1;
|
random_endpoint_pick += 1;
|
Loading…
Reference in New Issue