Browse Source

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.
Daniel Koehler 8 years ago
parent
commit
c5f6cf0809
1 changed files with 1 additions and 1 deletions
  1. 1 1
      public/app/plugins/panel/alertlist/module.ts

+ 1 - 1
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;
         }));
       });