Skip to content

Commit

Permalink
chore(dashboards): adjustments to the dashboard types adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderblue committed Jul 1, 2024
1 parent a5a4bec commit 753f374
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/mitchellh/go-homedir v1.1.0
github.com/newrelic/go-agent/v3 v3.30.0
github.com/newrelic/go-insights v1.0.3
github.com/newrelic/newrelic-client-go/v2 v2.38.0
github.com/newrelic/newrelic-client-go/v2 v2.39.1
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ github.com/newrelic/go-agent/v3 v3.30.0 h1:ZXHCT/Cot4iIPwcegCZURuRQOsfmGA6wilW+S
github.com/newrelic/go-agent/v3 v3.30.0/go.mod h1:9utrgxlSryNqRrTvII2XBL+0lpofXbqXApvVWPpbzUg=
github.com/newrelic/go-insights v1.0.3 h1:zSNp1CEZnXktzSIEsbHJk8v6ZihdPFP2WsO/fzau3OQ=
github.com/newrelic/go-insights v1.0.3/go.mod h1:A20BoT8TNkqPGX2nS/Z2fYmKl3Cqa3iKZd4whzedCY4=
github.com/newrelic/newrelic-client-go/v2 v2.38.0 h1:2Q106SyrB7e0zeWP7374HBCJ2N5aWhZ8sZBkzmxwzn0=
github.com/newrelic/newrelic-client-go/v2 v2.38.0/go.mod h1:pDFY24/6iIMEbPIdowTRrRn9YYwkXc3j+B+XpTb4oF4=
github.com/newrelic/newrelic-client-go/v2 v2.39.1 h1:05b9E0bReE9RS00rB8DzD7F1Vxb8+dHMiV95H1TLToI=
github.com/newrelic/newrelic-client-go/v2 v2.39.1/go.mod h1:pDFY24/6iIMEbPIdowTRrRn9YYwkXc3j+B+XpTb4oF4=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
Expand Down
11 changes: 6 additions & 5 deletions newrelic/structures_newrelic_one_dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -1006,19 +1006,20 @@ func flattenDashboardVariable(in *[]entities.DashboardVariable, d *schema.Resour
m := make(map[string]interface{})

if v.DefaultValues != nil {
m["default_values"] = flattenVariableDefaultValues(&v.DefaultValues)
m["default_values"] = flattenVariableDefaultValues(v.DefaultValues)
}
m["default_values"] = nil
m["is_multi_selection"] = v.IsMultiSelection
m["item"] = flattenVariableItems(v.Items)
m["name"] = v.Name
if &v.NRQLQuery != nil {
m["nrql_query"] = flattenVariableNRQLQuery(&v.NRQLQuery)
if v.NRQLQuery != nil {
m["nrql_query"] = flattenVariableNRQLQuery(v.NRQLQuery)
}
m["replacement_strategy"] = strings.ToLower(string(v.ReplacementStrategy))
m["title"] = v.Title
m["type"] = strings.ToLower(string(v.Type))
if &v.Options != nil {
options := flattenVariableOptions(&v.Options, d, i)
if v.Options != nil {
options := flattenVariableOptions(v.Options, d, i)
if options != nil {
// set options -> ignore_time_range to the state only if they already exist in the configuration
// needed to make this backward compatible with configurations which do not yet have options -> ignore_time_range
Expand Down

0 comments on commit 753f374

Please sign in to comment.