소스 검색

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

Brendan Abolivier 7 년 전
부모
커밋
05ac42989e
로그인 계정: Brendan Abolivier <contact@brendanabolivier.com> GPG 키 ID: 8EF1500759F70623
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      src/grafana/dashboards.go

+ 1
- 1
src/grafana/dashboards.go 파일 보기

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)