mirror of
https://github.com/nicolargo/glances.git
synced 2024-09-11 20:57:08 +03:00
Alerts showing different time than time plugin #2214
This commit is contained in:
parent
dbbdc34bf0
commit
36ed96b05a
@ -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];
|
||||
|
BIN
glances/outputs/static/public/glances.js
vendored
BIN
glances/outputs/static/public/glances.js
vendored
Binary file not shown.
Loading…
Reference in New Issue
Block a user