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
c72d47c2
Commit
c72d47c2
authored
7 years ago
by
Atte Keinänen
Browse files
Options
Downloads
Patches
Plain Diff
Don't use getHumanReadableValue for equivalentArgument filter
parent
b7d82d88
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/metabase/lib/query/field.js
+1
-0
1 addition, 0 deletions
frontend/src/metabase/lib/query/field.js
frontend/src/metabase/lib/schema_metadata.js
+3
-2
3 additions, 2 deletions
frontend/src/metabase/lib/schema_metadata.js
with
4 additions
and
2 deletions
frontend/src/metabase/lib/query/field.js
+
1
−
0
View file @
c72d47c2
...
...
@@ -3,6 +3,7 @@ import { mbqlEq } from "./util";
import
type
{
Field
as
FieldReference
}
from
"
metabase/meta/types/Query
"
;
import
type
{
Field
,
FieldId
,
FieldValues
}
from
"
metabase/meta/types/Field
"
;
import
type
{
Value
}
from
"
metabase/meta/types/Dataset
"
;
// gets the target field ID (recursively) from any type of field, including raw field ID, fk->, and datetime-field cast.
export
function
getFieldTargetId
(
field
:
FieldReference
):
?
FieldId
{
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/lib/schema_metadata.js
+
3
−
2
View file @
c72d47c2
import
_
from
"
underscore
"
;
import
{
isa
,
isFK
as
isTypeFK
,
isPK
as
isTypePK
,
TYPE
}
from
"
metabase/lib/types
"
;
import
{
getFieldValues
,
getHumanReadableValue
}
from
"
metabase/lib/query/field
"
;
import
{
getFieldValues
}
from
"
metabase/lib/query/field
"
;
// primary field types used for picking operators, etc
export
const
NUMBER
=
"
NUMBER
"
;
...
...
@@ -182,7 +182,8 @@ function equivalentArgument(field, table) {
.
filter
(([
value
,
displayValue
])
=>
value
!=
null
)
.
map
(([
value
,
displayValue
])
=>
({
key
:
value
,
name
:
getHumanReadableValue
(
value
,
values
)
// NOTE Atte Keinänen 8/7/17: Similar logic as in getHumanReadableValue of lib/query/field
name
:
displayValue
?
displayValue
:
String
(
value
)
}))
.
sort
((
a
,
b
)
=>
a
.
key
===
b
.
key
?
0
:
(
a
.
key
<
b
.
key
?
-
1
:
1
))
};
...
...
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