diff --git a/public/app/plugins/panel/alertlist/editor.html b/public/app/plugins/panel/alertlist/editor.html
index ad946202432..7ea95c39e02 100644
--- a/public/app/plugins/panel/alertlist/editor.html
+++ b/public/app/plugins/panel/alertlist/editor.html
@@ -22,7 +22,14 @@
-
+
Time options
+
diff --git a/public/app/plugins/panel/alertlist/module.ts b/public/app/plugins/panel/alertlist/module.ts
index f5ba0c61aa8..ddfd77619b7 100644
--- a/public/app/plugins/panel/alertlist/module.ts
+++ b/public/app/plugins/panel/alertlist/module.ts
@@ -24,7 +24,8 @@ class AlertListPanel extends PanelCtrl {
panelDefaults = {
show: 'current',
limit: 10,
- stateFilter: []
+ stateFilter: [],
+ useTimeRange: false
};
/** @ngInject */
@@ -71,6 +72,11 @@ class AlertListPanel extends PanelCtrl {
newState: this.panel.stateFilter
};
+ if (this.panel.useTimeRange) {
+ params.from = dateMath.parse(this.dashboard.time.from).unix() * 1000;
+ params.to = dateMath.parse(this.dashboard.time.to).unix() * 1000;
+ }
+
this.backendSrv.get(`/api/annotations`, params)
.then(res => {
this.alertHistory = _.map(res, al => {