mirror of
https://github.com/grafana/grafana.git
synced 2025-09-23 18:52:33 +08:00
Dashboard: Add dashboard validation warning to save drawer (#55732)
* add api route for validating a dashboard json * add feature flag for showDashboardValidationWarnings * tidy up * comments and messages * swagger specs * fix typo * more swagger * tests! * tidy test a little bit * no more ioutil * api will return different status code depending on validation error * clean up * handle 4xx errors * remove console.log * fix backend tests * tidy up * Swagger: Exclude alpha endpoints Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
@ -224,6 +224,10 @@ type SaveDashboardCommand struct {
|
||||
Result *Dashboard `json:"-"`
|
||||
}
|
||||
|
||||
type ValidateDashboardCommand struct {
|
||||
Dashboard string `json:"dashboard" binding:"Required"`
|
||||
}
|
||||
|
||||
type TrimDashboardCommand struct {
|
||||
Dashboard *simplejson.Json `json:"dashboard" binding:"Required"`
|
||||
Meta *simplejson.Json `json:"meta"`
|
||||
|
Reference in New Issue
Block a user