Commit 31892ed7 by bergquist

style(alertlist): remove unused code

parent 9dd8b3b4
......@@ -9,7 +9,7 @@
</div>
<div class="gf-form">
<span class="gf-form-label width-8">Max items</span>
<input type="text" class="gf-form-input max-width-15" ng-model="ctrl.panel.limit" />
<input type="text" class="gf-form-input max-width-15" ng-model="ctrl.panel.limit" ng-change="ctrl.onRender()" />
</div>
</div>
<div class="section gf-form-group">
......@@ -23,7 +23,6 @@
<div class="section gf-form-group" ng-if="ctrl.panel.show == 'changes'">
<!-- <h5 class="section-heading">Search options</h5> -->
</div>
<div class="section gf-form-group" ng-if="ctrl.panel.show == 'current'">
......
......@@ -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 => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment