mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 12:44:10 -06:00
style(alertlist): remove unused code
This commit is contained in:
parent
9dd8b3b408
commit
31892ed73c
@ -9,7 +9,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="gf-form">
|
<div class="gf-form">
|
||||||
<span class="gf-form-label width-8">Max items</span>
|
<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>
|
</div>
|
||||||
<div class="section gf-form-group">
|
<div class="section gf-form-group">
|
||||||
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
<div class="section gf-form-group" ng-if="ctrl.panel.show == 'changes'">
|
<div class="section gf-form-group" ng-if="ctrl.panel.show == 'changes'">
|
||||||
<!-- <h5 class="section-heading">Search options</h5> -->
|
<!-- <h5 class="section-heading">Search options</h5> -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="section gf-form-group" ng-if="ctrl.panel.show == 'current'">
|
<div class="section gf-form-group" ng-if="ctrl.panel.show == 'current'">
|
||||||
|
@ -14,7 +14,7 @@ class AlertListPanel extends PanelCtrl {
|
|||||||
|
|
||||||
showOptions = [
|
showOptions = [
|
||||||
{text: 'Current state', value: 'current'},
|
{text: 'Current state', value: 'current'},
|
||||||
{text: 'Recent statechanges', value: 'changes'}
|
{text: 'State changes', value: 'changes'}
|
||||||
];
|
];
|
||||||
|
|
||||||
stateFilter: any = {};
|
stateFilter: any = {};
|
||||||
@ -71,24 +71,6 @@ class AlertListPanel extends PanelCtrl {
|
|||||||
newState: this.panel.stateFilter
|
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)
|
this.backendSrv.get(`/api/annotations`, params)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.alertHistory = _.map(res, al => {
|
this.alertHistory = _.map(res, al => {
|
||||||
|
Loading…
Reference in New Issue
Block a user