From c5f6cf0809e7af4d95486402de592aa001d0b052 Mon Sep 17 00:00:00 2001 From: Daniel Koehler Date: Fri, 14 Jul 2017 21:58:27 +0200 Subject: [PATCH] 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. --- public/app/plugins/panel/alertlist/module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/panel/alertlist/module.ts b/public/app/plugins/panel/alertlist/module.ts index e120ed05b6d..c934902e7e1 100644 --- a/public/app/plugins/panel/alertlist/module.ts +++ b/public/app/plugins/panel/alertlist/module.ts @@ -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; })); });