Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Support any type of dashboard widget by JSON string #228

Merged
merged 2 commits into from
Jan 15, 2020

Conversation

suzuki-shunsuke
Copy link
Owner

#227

The field json_configuration is added to graylog_dashboard_widget to support any type of dashboard widget.
The value of json_configuration should be JSON string.

Please see the example.

resource "graylog_dashboard_widget" "stacked_chart" {
  description = "stacked chart"
  dashboard_id = graylog_dashboard.test.id
  type         = "STACKED_CHART"
  cache_time = 10
  json_configuration = <<EOF
{
  "interval": "hour",
  "timerange": {
    "type": "relative",
    "range": 86400
  },
  "renderer": "bar",
  "interpolation": "linear",
  "series": [
    {
      "query": "",
      "field": "AccessMask",
      "statistical_function": "count"
    }
  ]
}
EOF
}

@suzuki-shunsuke suzuki-shunsuke added bug Something isn't working enhancement New feature or request documentation labels Jan 15, 2020
@codecov
Copy link

codecov bot commented Jan 15, 2020

Codecov Report

Merging #228 into master will decrease coverage by 0.11%.
The diff coverage is 23.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #228      +/-   ##
==========================================
- Coverage   52.83%   52.71%   -0.12%     
==========================================
  Files         125      125              
  Lines        5962     5994      +32     
==========================================
+ Hits         3150     3160      +10     
- Misses       2620     2642      +22     
  Partials      192      192
Impacted Files Coverage Δ
dashboard_widget.go 48.48% <100%> (+4.73%) ⬆️
terraform/graylog/resource_dashboard_widget.go 47.49% <18.75%> (-1.51%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44a5fb8...ff70236. Read the comment docs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant