Browse Source

Send overwrite: true in creation/update requests because else the Grafana API does weird stuff

Brendan Abolivier 6 years ago
parent
commit
05ac42989e
Signed by: Brendan Abolivier <contact@brendanabolivier.com> GPG key ID: 8EF1500759F70623
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/grafana/dashboards.go

+ 1
- 1
src/grafana/dashboards.go View File

80
 func (c *Client) CreateOrUpdateDashboard(slug string, contentJSON []byte) (err error) {
80
 func (c *Client) CreateOrUpdateDashboard(slug string, contentJSON []byte) (err error) {
81
 	reqBody := dbUpdateRequest{
81
 	reqBody := dbUpdateRequest{
82
 		Dashboard: rawJSON(contentJSON),
82
 		Dashboard: rawJSON(contentJSON),
83
-		Overwrite: false,
83
+		Overwrite: true,
84
 	}
84
 	}
85
 
85
 
86
 	reqBodyJSON, err := json.Marshal(reqBody)
86
 	reqBodyJSON, err := json.Marshal(reqBody)