Commit c5f6cf08 by Daniel Koehler Committed by Torkel Ödegaard

fix for wrong locale and text issues #8840 (#8854)

fixes https://github.com/grafana/grafana/issues/8840
by setting a default locale. Also uses fromNow(true) to work arround the replace.
parent a045f175
......@@ -125,7 +125,7 @@ class AlertListPanel extends PanelCtrl {
.then(res => {
this.currentAlerts = this.sortResult(_.map(res, al => {
al.stateModel = alertDef.getStateDisplayModel(al.state);
al.newStateDateAgo = moment(al.newStateDate).fromNow().replace(" ago", "");
al.newStateDateAgo = moment(al.newStateDate).locale('en').fromNow(true);
return al;
}));
});
......
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