File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
public/app/features/alerting Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,10 @@ func (r *SqlAnnotationRepo) Find(query *annotations.ItemQuery) ([]*annotations.I
53
53
params = append (params , query .PanelId )
54
54
}
55
55
56
- sql .WriteString (` AND epoch BETWEEN ? AND ?` )
57
- params = append (params , query .From , query .To )
56
+ if query .From > 0 && query .To > 0 {
57
+ sql .WriteString (` AND epoch BETWEEN ? AND ?` )
58
+ params = append (params , query .From , query .To )
59
+ }
58
60
59
61
if query .Type != "" {
60
62
sql .WriteString (` AND type = ?` )
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ export class AlertTabCtrl {
86
86
}
87
87
88
88
getAlertHistory ( ) {
89
- this . backendSrv . get ( `/api/alert-history ?dashboardId=${ this . panelCtrl . dashboard . id } &panelId=${ this . panel . id } &limit=50` ) . then ( res => {
89
+ this . backendSrv . get ( `/api/annotations ?dashboardId=${ this . panelCtrl . dashboard . id } &panelId=${ this . panel . id } &limit=50` ) . then ( res => {
90
90
this . alertHistory = _ . map ( res , ah => {
91
91
ah . time = moment ( ah . timestamp ) . format ( 'MMM D, YYYY HH:mm:ss' ) ;
92
92
ah . stateModel = alertDef . getStateDisplayModel ( ah . newState ) ;
Original file line number Diff line number Diff line change 27
27
< div class ="gf-form-group ">
28
28
< h5 class ="section-heading "> Alert Config</ h5 >
29
29
< div class ="gf-form ">
30
- < span class ="gf-form-label width-8 "> Name</ span >
31
- < input type ="text " class ="gf-form-input width-25 " ng-model ="ctrl.alert.name ">
32
- < span class ="gf-form-label width-8 "> Evaluate every</ span >
30
+ < span class ="gf-form-label width-6 "> Name</ span >
31
+ < input type ="text " class ="gf-form-input width-20 " ng-model ="ctrl.alert.name ">
32
+ < span class ="gf-form-label "> Evaluate every</ span >
33
33
< input class ="gf-form-input max-width-5 " type ="text " ng-model ="ctrl.alert.frequency "> </ input >
34
- </ div >
35
34
</ div >
36
35
</ div >
37
36
You can’t perform that action at this time.
0 commit comments