From 24f8c101af7ada6ab2c0893135893b879d7b3026 Mon Sep 17 00:00:00 2001 From: dougsc Date: Tue, 17 Aug 2021 09:00:09 -0400 Subject: [PATCH 1/2] add resultFormat field to Target --- panel.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/panel.go b/panel.go index 9a7d201f..551a07ce 100644 --- a/panel.go +++ b/panel.go @@ -133,7 +133,7 @@ type ( Bars bool `json:"bars"` DashLength *uint `json:"dashLength,omitempty"` Dashes *bool `json:"dashes,omitempty"` - Decimals *int `json:"decimals,omitempty"` + Decimals *int `json:"decimals,omitempty"` Fill int `json:"fill"` // Grid grid `json:"grid"` obsoleted in 4.1 by xaxis and yaxis @@ -442,7 +442,7 @@ type ( Type string `json:"type"` ColorMode *string `json:"colorMode,omitempty"` Colors *[]string `json:"colors,omitempty"` - Decimals *int `json:"decimals,omitempty"` + Decimals *int `json:"decimals,omitempty"` Thresholds *[]string `json:"thresholds,omitempty"` Unit *string `json:"unit,omitempty"` MappingType int `json:"mappingType,omitempty"` @@ -514,7 +514,8 @@ type Target struct { Format string `json:"format,omitempty"` // For InfluxDB - Measurement string `json:"measurement,omitempty"` + Measurement string `json:"measurement,omitempty"` + ResultFormat string `json:"resultFormat,omitempty"` // For Elasticsearch DsType *string `json:"dsType,omitempty"` From 724b4204223469ee6deb159d18a73f906507ad8d Mon Sep 17 00:00:00 2001 From: dougsc Date: Tue, 10 Jan 2023 08:57:17 -0500 Subject: [PATCH 2/2] add missing With Credentials option --- datasource.go | 1 + 1 file changed, 1 insertion(+) diff --git a/datasource.go b/datasource.go index fc7f7126..98b88a35 100644 --- a/datasource.go +++ b/datasource.go @@ -37,6 +37,7 @@ type Datasource struct { ReadOnly *bool `json:"readOnly,omitempty"` BasicAuthUser *string `json:"basicAuthUser,omitempty"` BasicAuthPassword *string `json:"basicAuthPassword,omitempty"` + WithCredentials bool `json:"withCredentials"` IsDefault bool `json:"isDefault"` JSONData interface{} `json:"jsonData"` SecureJSONData interface{} `json:"secureJsonData"`