From 31892ed73ce78f69694f710b29143a93c4f28712 Mon Sep 17 00:00:00 2001 From: bergquist Date: Wed, 14 Sep 2016 14:17:15 +0200 Subject: [PATCH] style(alertlist): remove unused code --- .../app/plugins/panel/alertlist/editor.html | 3 +-- public/app/plugins/panel/alertlist/module.ts | 20 +------------------ 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/public/app/plugins/panel/alertlist/editor.html b/public/app/plugins/panel/alertlist/editor.html index 7ef9ae3c301..ad946202432 100644 --- a/public/app/plugins/panel/alertlist/editor.html +++ b/public/app/plugins/panel/alertlist/editor.html @@ -9,7 +9,7 @@
Max items - +
@@ -23,7 +23,6 @@
-
diff --git a/public/app/plugins/panel/alertlist/module.ts b/public/app/plugins/panel/alertlist/module.ts index b3cf028da40..f5ba0c61aa8 100644 --- a/public/app/plugins/panel/alertlist/module.ts +++ b/public/app/plugins/panel/alertlist/module.ts @@ -14,7 +14,7 @@ class AlertListPanel extends PanelCtrl { showOptions = [ {text: 'Current state', value: 'current'}, - {text: 'Recent statechanges', value: 'changes'} + {text: 'State changes', value: 'changes'} ]; stateFilter: any = {}; @@ -71,24 +71,6 @@ class AlertListPanel extends PanelCtrl { newState: this.panel.stateFilter }; - //date.unix();i - - this.panel.since = '12h'; - if (this.panel.since) { - var range = this.timeSrv.timeRange(); - - //var timeShiftInterpolated = this.panel.since; - var timeShiftInterpolated = this.templateSrv.replace(this.panel.since, this.panel.scopedVars); - var timeShiftInfo = rangeUtil.describeTextRange(timeShiftInterpolated); - var timeShift = '-' + timeShiftInterpolated; - //params.from = dateMath.parseDateMath(timeShift, range.from, false).unix() * 1000; - params.from = dateMath.parseDateMath(timeShift, moment((new Date()).getTime()), true).unix() * 1000; - //params.to = dateMath.parseDateMath(timeShift, range.to, true).unix() * 1000; - params.to = (new Date()).getTime(); - } - - - console.log(params.from, params.to); this.backendSrv.get(`/api/annotations`, params) .then(res => { this.alertHistory = _.map(res, al => {