Alerts showing different time than time plugin #2214

This commit is contained in:
nicolargo 2023-11-11 10:21:47 +01:00
parent dbbdc34bf0
commit 36ed96b05a
2 changed files with 4 additions and 2 deletions

View File

@ -11,6 +11,7 @@
<div class="table-row" v-for="(alert, alertId) in alerts" :key="alertId">
<div class="table-cell text-left">
{{ formatDate(alert.begin) }}
{{ alert.tz }}
({{ alert.ongoing ? 'ongoing' : alert.duration }}) -
<span v-show="!alert.ongoing"> {{ alert.level }} on </span>
<span :class="alert.level.toLowerCase()">
@ -41,10 +42,11 @@ export default {
alerts() {
return (this.stats || []).map((alertalertStats) => {
const alert = {};
var tzoffset = new Date().getTimezoneOffset();
alert.name = alertalertStats[3];
alert.level = alertalertStats[2];
alert.begin = alertalertStats[0] * 1000;
alert.end = alertalertStats[1] * 1000;
alert.begin = alertalertStats[0] * 1000 - tzoffset * 60 * 1000;
alert.end = alertalertStats[1] * 1000 - tzoffset * 60 * 1000;
alert.ongoing = alertalertStats[1] == -1;
alert.min = alertalertStats[6];
alert.mean = alertalertStats[5];

Binary file not shown.