Pārlūkot izejas kodu

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

Brendan Abolivier 7 gadus atpakaļ
vecāks
revīzija
05ac42989e
Parakstījis: Brendan Abolivier <contact@brendanabolivier.com> GPG atslēgas ID: 8EF1500759F70623
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1
    1
      src/grafana/dashboards.go

+ 1
- 1
src/grafana/dashboards.go Parādīt failu

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