浏览代码

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

父节点
当前提交
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)