瀏覽代碼

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 年之前
父節點
當前提交
c5f6cf0809
共有 1 個文件被更改,包括 1 次插入1 次删除
  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;
         }));
       });