Commit 53a9dec4 by bergquist

feat(alerting): move timestamp to new row

ref #5850
parent a5d49c98
......@@ -76,11 +76,11 @@ export class AlertTabCtrl {
});
}).then(() => {
this.backendSrv.get(`/api/alert-history?dashboardId=${this.panelCtrl.dashboard.id}&panelId=${this.panel.id}`).then(res => {
this.alertHistory = _.map(res, (ah) => {
this.alertHistory = _.map(res, ah => {
ah.time = moment(ah.timestamp).format('MMM D, YYYY HH:mm:ss');
ah.stateModel = alertDef.getStateDisplayModel(ah.newState);
ah.metrics = _.map(ah.data, (ev) => {
ah.metrics = _.map(ah.data, ev=> {
return ev.Metric + "=" + ev.Value;
}).join(', ');
......
......@@ -134,8 +134,11 @@
<div class="card-item-sub-name">
<span class="alert-list-item-state {{ah.stateModel.stateClass}}">
<i class="{{ah.stateModel.iconClass}}"></i>
{{ah.text}}
</span> at {{ah.time}} {{ah.metrics}}
{{ah.stateModel.text}}
</span> {{ah.metrics}}
</div>
<div class="card-item-sub-name">
{{ah.time}}
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment