mirror of
https://github.com/Lissy93/dashy.git
synced 2025-12-06 16:43:13 +01:00
Converted to dot notation
This commit is contained in:
parent
ae4b0f1592
commit
52bb9b1056
1 changed files with 9 additions and 9 deletions
|
|
@ -46,15 +46,15 @@ export default {
|
||||||
const alerts = [];
|
const alerts = [];
|
||||||
alertData.forEach((alert) => {
|
alertData.forEach((alert) => {
|
||||||
alerts.push({
|
alerts.push({
|
||||||
time: timestampToDateTime(alert["begin"] * 1000),
|
time: timestampToDateTime(alert.begin * 1000),
|
||||||
ongoing: (alert['end'] === -1),
|
ongoing: (alert.end === -1),
|
||||||
timeAgo: getTimeAgo(alert["begin"] * 1000),
|
timeAgo: getTimeAgo(alert.begin * 1000),
|
||||||
lasted: alert['begin'] ? getTimeDifference(alert['begin'] * 1000, alert['end'] * 1000) : 'Ongoing',
|
lasted: alert.begin ? getTimeDifference(alert.begin * 1000, alert.end * 1000) : 'Ongoing',
|
||||||
severity: alert['state'],
|
severity: alert.state,
|
||||||
category: alert['type'],
|
category: alert.type,
|
||||||
value: round(alert['sum']),
|
value: round(alert.sum),
|
||||||
minMax: `Min: ${round(alert['min'])}%<br>Avg: `
|
minMax: `Min: ${round(alert.min)}%<br>Avg: `
|
||||||
+ `${round(alert['avg'])}%<br>Max: ${round(alert['max'])}%`,
|
+ `${round(alert.avg)}%<br>Max: ${round(alert.max)}%`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.alerts = alerts;
|
this.alerts = alerts;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue