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
1010a6fb
Unverified
Commit
1010a6fb
authored
6 years ago
by
Kyle Doherty
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
better ordering of search results (#7982)
* better ordering of search results * explicit ordering
parent
23978bd6
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/metabase/home/containers/SearchApp.jsx
+77
-26
77 additions, 26 deletions
frontend/src/metabase/home/containers/SearchApp.jsx
with
77 additions
and
26 deletions
frontend/src/metabase/home/containers/SearchApp.jsx
+
77
−
26
View file @
1010a6fb
...
...
@@ -12,8 +12,6 @@ import Card from "metabase/components/Card";
import
EntityItem
from
"
metabase/components/EntityItem
"
;
import
Subhead
from
"
metabase/components/Subhead
"
;
import
{
entityTypeForModel
}
from
"
metabase/schema
"
;
export
default
class
SearchApp
extends
React
.
Component
{
render
()
{
return
(
...
...
@@ -36,36 +34,89 @@ export default class SearchApp extends React.Component {
</
Box
>
<
Box
mt
=
{
4
}
>
<
Subhead
>
{
t
`It's quiet around here...`
}
</
Subhead
>
<
Text
>
{
t
`Metabase couldn't find any results for this.`
}
</
Text
>
<
p
>
{
t
`Metabase couldn't find any results for this.`
}
</
p
>
</
Box
>
</
Flex
>
);
}
const
types
=
_
.
chain
(
list
)
.
groupBy
(
"
model
"
)
.
value
();
return
(
<
Box
>
{
_
.
chain
(
list
)
.
groupBy
(
"
model
"
)
.
pairs
()
.
value
()
.
map
(([
model
,
items
])
=>
(
<
Box
mt
=
{
2
}
mb
=
{
3
}
>
<
div
className
=
"text-uppercase text-grey-4 text-small text-bold my1"
>
{
entityTypeForModel
(
model
)
}
</
div
>
<
Card
>
{
items
.
map
(
item
=>
(
<
Link
to
=
{
item
.
getUrl
()
}
>
<
EntityItem
name
=
{
item
.
getName
()
}
iconName
=
{
item
.
getIcon
()
}
iconColor
=
{
item
.
getColor
()
}
/>
</
Link
>
))
}
</
Card
>
</
Box
>
))
}
{
types
.
dashboard
&&
(
<
Box
mt
=
{
2
}
mb
=
{
3
}
>
<
div
className
=
"text-uppercase text-grey-4 text-small text-bold my1"
>
{
t
`Dashboards`
}
</
div
>
<
Card
px
=
{
2
}
>
{
types
.
dashboard
.
map
(
item
=>
(
<
Link
to
=
{
item
.
getUrl
()
}
>
<
EntityItem
name
=
{
item
.
getName
()
}
iconName
=
{
item
.
getIcon
()
}
iconColor
=
{
item
.
getColor
()
}
/>
</
Link
>
))
}
</
Card
>
</
Box
>
)
}
{
types
.
collection
&&
(
<
Box
mt
=
{
2
}
mb
=
{
3
}
>
<
div
className
=
"text-uppercase text-grey-4 text-small text-bold my1"
>
{
t
`Collections`
}
</
div
>
<
Card
px
=
{
2
}
>
{
types
.
collection
.
map
(
item
=>
(
<
Link
to
=
{
item
.
getUrl
()
}
>
<
EntityItem
name
=
{
item
.
getName
()
}
iconName
=
{
item
.
getIcon
()
}
iconColor
=
{
item
.
getColor
()
}
/>
</
Link
>
))
}
</
Card
>
</
Box
>
)
}
{
types
.
card
&&
(
<
Box
mt
=
{
2
}
mb
=
{
3
}
>
<
div
className
=
"text-uppercase text-grey-4 text-small text-bold my1"
>
{
t
`Questions`
}
</
div
>
<
Card
px
=
{
2
}
>
{
types
.
card
.
map
(
item
=>
(
<
Link
to
=
{
item
.
getUrl
()
}
>
<
EntityItem
name
=
{
item
.
getName
()
}
iconName
=
{
item
.
getIcon
()
}
iconColor
=
{
item
.
getColor
()
}
/>
</
Link
>
))
}
</
Card
>
</
Box
>
)
}
{
types
.
pulse
&&
(
<
Box
mt
=
{
2
}
mb
=
{
3
}
>
<
div
className
=
"text-uppercase text-grey-4 text-small text-bold my1"
>
{
t
`Pulse`
}
</
div
>
<
Card
px
=
{
2
}
>
{
types
.
pulse
.
map
(
item
=>
(
<
Link
to
=
{
item
.
getUrl
()
}
>
<
EntityItem
name
=
{
item
.
getName
()
}
iconName
=
{
item
.
getIcon
()
}
iconColor
=
{
item
.
getColor
()
}
/>
</
Link
>
))
}
</
Card
>
</
Box
>
)
}
</
Box
>
);
}
}
...
...
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