瀏覽代碼

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

Brendan Abolivier 6 年之前
父節點
當前提交
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,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)