Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
3bc64bc6
Commit
3bc64bc6
authored
6 years ago
by
Simon Belak
Browse files
Options
Downloads
Patches
Plain Diff
Alow this in card titles
parent
ed982852
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/metabase/automagic_dashboards/core.clj
+7
-6
7 additions, 6 deletions
src/metabase/automagic_dashboards/core.clj
with
7 additions
and
6 deletions
src/metabase/automagic_dashboards/core.clj
+
7
−
6
View file @
3bc64bc6
...
...
@@ -215,7 +215,8 @@
[
template-type
context
bindings
template
]
(
str/replace
template
#
"\[\[(\w+)\]\]"
(
fn
[[
_
identifier
]]
(
->reference
template-type
(
or
(
bindings
identifier
)
(
->reference
template-type
(
or
((
merge
{
"this"
(
->
context
:root
:entity
)}
bindings
)
identifier
)
(
->
identifier
rules/->entity
(
filter-tables
(
:tables
context
))
...
...
@@ -307,7 +308,7 @@
(
->reference
:mbql
(
->
identifier
bindings
(
merge
opts
))))
subform
))
{
:type
:query
:database
(
:database
context
)
:database
(
->
context
:root
:database
)
:query
(
cond->
{
:source_table
(
->
context
:source-table
:id
)}
(
not-empty
filters
)
(
assoc
:filter
(
transduce
(
map
:filter
)
...
...
@@ -328,7 +329,7 @@
([
context
bindings
query
]
{
:type
:native
:native
{
:query
(
fill-template
:native
context
bindings
query
)}
:database
(
:database
context
)}))
:database
(
->
context
:root
:database
)}))
(
defn-
has-matches?
[
dimensions
definition
]
...
...
@@ -479,9 +480,9 @@
field/with-targets
(
group-by
:table_id
))
:id
)]
(
as->
{
:source-table
(
assoc
source-table
:fields
(
table->fields
source-table
))
(
as->
{
:root
root
:source-table
(
assoc
source-table
:fields
(
table->fields
source-table
))
:tables
(
map
#
(
assoc
%
:fields
(
table->fields
%
))
tables
)
:database
(
:database
root
)
:query-filter
(
merge-filter-clauses
(
:query-filter
root
)
(
:cell-query
root
))}
context
(
assoc
context
:dimensions
(
bind-dimensions
context
(
:dimensions
rule
)))
...
...
@@ -508,7 +509,7 @@
([
root
rule
context
]
(
->
rule
(
select-keys
[
:title
:description
:groups
:transient_title
])
(
instantiate-metadata
context
{
"this"
(
:entity
root
)
})
(
instantiate-metadata
context
{})
(
assoc
:refinements
(
:cell-query
root
)))))
(
defn-
apply-rule
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment