LINXD-1229: Update simulator to work with 3.34

This commit is contained in:
2020-02-17 22:25:09 +02:00
parent 0cac4b7e81
commit 5ec52a6617
5 changed files with 228 additions and 64 deletions

View File

@ -292,9 +292,14 @@ class Asset {
}
_getRecord(startDate, stopDate) {
console.log(this.apiEndpoint + `/history-pagination/1/300/${this.id}/${startDate}/${stopDate}/0/0/0/1/null`)
console.log(`${this.apiEndpoint}/asset-history/${this.id}/call-history/${startDate}/${stopDate}/10`);
// console.log(this.apiEndpoint + `/history-pagination/1/300/${this.id}/${startDate}/${stopDate}/0/0/0/1/null`)
Request.get(
this.apiEndpoint + `/history-pagination/1/300/${this.id}/${startDate}/${stopDate}/0/0/0/1/null`,
`${this.apiEndpoint}/asset-history/${this.id}/call-history/${startDate}/${stopDate}/10`,
// this.apiEndpoint + `/history-pagination/1/300/${this.id}/${startDate}/${stopDate}/0/0/0/1/null`,
{
headers: {
Authorization: `Bearer ${this.token}`
@ -313,8 +318,8 @@ class Asset {
latest = e;
}
})
console.log(chalk.green(`[RECORDER] Record found(${latest.id}) for asset ${this.id} | description: ${latest.description}`));
utils.writeLog(`[RECORDER] Record found(${latest.id}) for asset ${this.id} | description: ${latest.description}`)
console.log(chalk.green(`[RECORDER] Record found(${latest.id}) for asset ${this.id}`));
utils.writeLog(`[RECORDER] Record found(${latest.id}) for asset ${this.id}`)
} else {
console.log(chalk.yellow(`[RECORDER] for asset ${this.id} not found`));
}