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
2a0e5492
Unverified
Commit
2a0e5492
authored
6 years ago
by
Kyle Doherty
Browse files
Options
Downloads
Patches
Plain Diff
use entity menu for item creation
parent
44277ddc
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/nav/containers/Navbar.jsx
+16
-31
16 additions, 31 deletions
frontend/src/metabase/nav/containers/Navbar.jsx
with
16 additions
and
31 deletions
frontend/src/metabase/nav/containers/Navbar.jsx
+
16
−
31
View file @
2a0e5492
...
...
@@ -17,6 +17,7 @@ import Icon from "metabase/components/Icon.jsx";
import
Link
from
"
metabase/components/Link
"
;
import
LogoIcon
from
"
metabase/components/LogoIcon.jsx
"
;
import
Tooltip
from
"
metabase/components/Tooltip
"
;
import
EntityMenu
from
"
metabase/components/EntityMenu
"
;
import
PopoverWithTrigger
from
"
metabase/components/PopoverWithTrigger
"
;
import
OnClickOutsideWrapper
from
"
metabase/components/OnClickOutsideWrapper
"
;
...
...
@@ -267,37 +268,21 @@ export default class Navbar extends Component {
<
Link
to
=
{
Urls
.
newQuestion
()
}
mx
=
{
2
}
>
<
Button
medium
>
{
t
`Ask a question`
}
</
Button
>
</
Link
>
<
PopoverWithTrigger
ref
=
{
e
=>
(
this
.
_newPopover
=
e
)
}
triggerElement
=
{
<
Tooltip
tooltip
=
"Create a dashboard or pulse"
>
<
Icon
name
=
"add"
mx
=
{
2
}
/>
</
Tooltip
>
}
>
<
Box
py
=
{
2
}
px
=
{
3
}
style
=
{
{
minWidth
:
300
}
}
>
<
Box
my
=
{
2
}
/>
<
Box
my
=
{
2
}
>
<
Flex
align
=
"center"
style
=
{
{
color
:
normal
.
blue
}
}
className
=
"cursor-pointer"
onClick
=
{
()
=>
this
.
setModal
(
MODAL_NEW_DASHBOARD
)
}
>
<
Icon
name
=
"dashboard"
mr
=
{
1
}
/>
<
h3
>
{
t
`New dashboard`
}
</
h3
>
</
Flex
>
</
Box
>
<
Box
my
=
{
2
}
>
<
Link
to
=
{
Urls
.
newPulse
()
}
>
<
Flex
align
=
"center"
style
=
{
{
color
:
saturated
.
yellow
}
}
>
<
Icon
name
=
"pulse"
mr
=
{
1
}
/>
<
h3
>
{
t
`New pulse`
}
</
h3
>
</
Flex
>
</
Link
>
</
Box
>
</
Box
>
</
PopoverWithTrigger
>
<
EntityMenu
triggerIcon
=
"add"
items
=
{
[
{
title
:
t
`New dashboard`
,
icon
:
`dashboard`
,
action
:
()
=>
this
.
setModal
(
MODAL_NEW_DASHBOARD
),
},
{
title
:
t
`New pulse`
,
icon
:
`pulse`
,
link
:
Urls
.
newPulse
(),
},
]
}
/>
<
Tooltip
tooltip
=
{
t
`Reference`
}
>
<
Link
to
=
"reference"
mx
=
{
2
}
>
<
Icon
name
=
"reference"
/>
...
...
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