Przeglądaj źródła

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

Brendan Abolivier 7 lat temu
rodzic
commit
05ac42989e
Podpisane przez: Brendan Abolivier <contact@brendanabolivier.com> ID klucza GPG: 8EF1500759F70623
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1
    1
      src/grafana/dashboards.go

+ 1
- 1
src/grafana/dashboards.go Wyświetl plik

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)