Skip to content

Commit

Permalink
Merge pull request #54 from flovouin/feat/dashboard-filtering-parameters
Browse files Browse the repository at this point in the history
✨ Dashboard filtering parameters (linking filters)
  • Loading branch information
flovouin authored Apr 16, 2024
2 parents f3e4c15 + 23a3bf4 commit b05d199
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
NEW FEATURES:

- Support [linking filters](https://www.metabase.com/learn/dashboards/linking-filters) (aka filtering parameters in the API).

## 0.5.1 (2024-04-07)

BUG FIXES:
Expand Down
23 changes: 17 additions & 6 deletions internal/provider/dashboard_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,24 @@ resource "metabase_dashboard" "%s" {
parameters_json = jsonencode([
{
id = "83e68ca2"
name = "Date range"
slug = "date_filter"
type = "date/all-options"
sectionId = "date"
default = "past30days"
"name": "Month and Year",
"slug": "month_and_year",
"id": "fb55bed",
"type": "date/month-year",
"sectionId": "date",
"required": true,
"default": "2024-02"
},
{
"name": "Text",
"slug": "text",
"id": "dac08e9",
"type": "string/=",
"sectionId": "string",
"filteringParameters": [
"fb55bed"
]
}
])
cards_json = jsonencode([
Expand Down
8 changes: 8 additions & 0 deletions metabase-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,14 @@ components:
- type: string
- type: array
description: The default value for the parameter.
required:
type: boolean
description: Whether the parameter is required.
filteringParameters:
type: array
description: A list of IDs of parameters used to limit the values of this parameter.
items:
type: string
required:
- id
- name
Expand Down
6 changes: 6 additions & 0 deletions metabase/client.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b05d199

Please sign in to comment.