AlertingNG: POC of evaluator under feature flag. (#27922)

* New feature toggle for enabling alerting NG

* Initial commit

* Modify evaluate alert API request

* Check for unique labels in alert execution result dataframes

* Remove print statement

* Additional minor fixes/comments

* Fix lint issues

* Add API endpoint for evaluating panel queries

* Push missing renaming

* add refId for condition to API

* add refId for condition to API

* switch dashboard based eval to get method

* add from/to params to dashboard based eval

* add from/to params to  eval endpoint

Co-authored-by: kyle <kyle@grafana.com>
This commit is contained in:
Sofia Papagiannaki
2020-10-12 21:51:39 +03:00
committed by GitHub
co-authored by kyle
parent 3928d0c531
commit 4acbcd7053
11 changed files with 441 additions and 28 deletions
+21 -21
View File
@@ -42,29 +42,29 @@ var (
type DsAccess string
type DataSource struct {
Id int64
OrgId int64
Version int
Id int64 `json:"id"`
OrgId int64 `json:"orgId"`
Version int `json:"version"`
Name string
Type string
Access DsAccess
Url string
Password string
User string
Database string
BasicAuth bool
BasicAuthUser string
BasicAuthPassword string
WithCredentials bool
IsDefault bool
JsonData *simplejson.Json
SecureJsonData securejsondata.SecureJsonData
ReadOnly bool
Uid string
Name string `json:"name"`
Type string `json:"type"`
Access DsAccess `json:"access"`
Url string `json:"url"`
Password string `json:"password"`
User string `json:"user"`
Database string `json:"database"`
BasicAuth bool `json:"basicAuth"`
BasicAuthUser string `json:"basicAuthUser"`
BasicAuthPassword string `json:"basicAuthPassword"`
WithCredentials bool `json:"withCredentials"`
IsDefault bool `json:"isDefault"`
JsonData *simplejson.Json `json:"jsonData"`
SecureJsonData securejsondata.SecureJsonData `json:"secureJsonData"`
ReadOnly bool `json:"readOnly"`
Uid string `json:"uid"`
Created time.Time
Updated time.Time
Created time.Time `json:"created"`
Updated time.Time `json:"updated"`
}
// DecryptedBasicAuthPassword returns data source basic auth password in plain text. It uses either deprecated