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
b5914161
Commit
b5914161
authored
9 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Exclude ENTITY, LOCATION, and DATE_TIME from SUMMABLE fields
parent
f9429eaa
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
frontend/src/lib/schema_metadata.js
+11
-2
11 additions, 2 deletions
frontend/src/lib/schema_metadata.js
with
11 additions
and
2 deletions
frontend/src/lib/schema_metadata.js
+
11
−
2
View file @
b5914161
...
...
@@ -46,7 +46,8 @@ const TYPES = {
},
[
SUMMABLE
]:
{
include
:
[
NUMBER
]
include
:
[
NUMBER
],
exclude
:
[
ENTITY
,
LOCATION
,
DATE_TIME
]
},
[
CATEGORY
]:
{
base
:
[
"
BooleanField
"
],
...
...
@@ -67,7 +68,15 @@ export function isFieldType(type, field) {
return
true
;
}
}
// recursively check to see if it's another field th:
// recursively check to see if it's NOT another field type:
if
(
def
.
exclude
)
{
for
(
let
excludeType
of
def
.
exclude
)
{
if
(
isFieldType
(
excludeType
,
field
))
{
return
false
;
}
}
}
// recursively check to see if it's another field type:
if
(
def
.
include
)
{
for
(
let
includeType
of
def
.
include
)
{
if
(
isFieldType
(
includeType
,
field
))
{
...
...
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