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
e58df522
Unverified
Commit
e58df522
authored
3 years ago
by
Anton Kulyk
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix database schemas browsing (#16156)
parent
8edda18c
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/src/metabase/browse/containers/TableBrowser.jsx
+26
-9
26 additions, 9 deletions
frontend/src/metabase/browse/containers/TableBrowser.jsx
with
26 additions
and
9 deletions
frontend/src/metabase/browse/containers/TableBrowser.jsx
+
26
−
9
View file @
e58df522
...
...
@@ -23,6 +23,28 @@ import Link from "metabase/components/Link";
import
BrowseHeader
from
"
metabase/browse/components/BrowseHeader
"
;
import
{
ANALYTICS_CONTEXT
,
ITEM_WIDTHS
}
from
"
metabase/browse/constants
"
;
function
getDatabaseId
(
props
)
{
const
{
params
}
=
props
;
const
dbId
=
parseInt
(
props
.
dbId
)
||
parseInt
(
params
.
dbId
)
||
Urls
.
extractEntityId
(
params
.
slug
);
return
Number
.
isSafeInteger
(
dbId
)
?
dbId
:
undefined
;
}
function
getSchemaName
(
props
)
{
return
props
.
schemaName
||
props
.
params
.
schemaName
;
}
function
mapStateToProps
(
state
,
props
)
{
return
{
dbId
:
getDatabaseId
(
props
),
schemaName
:
getSchemaName
(
props
),
metadata
:
getMetadata
(
state
),
xraysEnabled
:
getXraysEnabled
(
state
),
};
}
function
TableBrowser
(
props
)
{
const
{
tables
,
...
...
@@ -119,13 +141,8 @@ function TableBrowser(props) {
}
export
default
Table
.
loadList
({
query
:
(
state
,
{
dbId
,
schemaName
}
)
=>
({
dbId
,
schemaName
,
query
:
(
state
,
props
)
=>
({
dbId
:
getDatabaseId
(
props
)
,
schemaName
:
getSchemaName
(
props
)
,
}),
})(
connect
(
state
=>
({
metadata
:
getMetadata
(
state
),
xraysEnabled
:
getXraysEnabled
(
state
),
}))(
TableBrowser
),
);
})(
connect
(
mapStateToProps
)(
TableBrowser
));
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