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
dca26e08
Commit
dca26e08
authored
6 years ago
by
Tom Robinson
Committed by
Kyle Doherty
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix dashboard header popovers that get stuck open. Resolves #7761 (#8811)
parent
07997021
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/dashboard/components/DashboardActions.jsx
+6
-4
6 additions, 4 deletions
...nd/src/metabase/dashboard/components/DashboardActions.jsx
frontend/src/metabase/dashboard/components/DashboardHeader.jsx
+9
-7
9 additions, 7 deletions
...end/src/metabase/dashboard/components/DashboardHeader.jsx
with
15 additions
and
11 deletions
frontend/src/metabase/dashboard/components/DashboardActions.jsx
+
6
−
4
View file @
dca26e08
...
...
@@ -21,9 +21,9 @@ export const getDashboardActions = ({
if
(
!
isEditing
&&
!
isEmpty
)
{
buttons
.
push
(
<
RefreshWidget
key
=
"refresh"
data-metabase-event
=
"Dashboard;Refresh Menu Open"
className
=
"text-brand-hover"
key
=
"refresh"
period
=
{
refreshPeriod
}
elapsed
=
{
refreshElapsed
}
onChangePeriod
=
{
onRefreshPeriodChange
}
...
...
@@ -33,11 +33,13 @@ export const getDashboardActions = ({
if
(
!
isEditing
&&
isFullscreen
)
{
buttons
.
push
(
<
Tooltip
tooltip
=
{
isNightMode
?
t
`Daytime mode`
:
t
`Nighttime mode`
}
>
<
Tooltip
key
=
"night"
tooltip
=
{
isNightMode
?
t
`Daytime mode`
:
t
`Nighttime mode`
}
>
<
span
data-metabase-event
=
{
"
Dashboard;Night Mode;
"
+
!
isNightMode
}
>
<
NightModeIcon
className
=
"text-brand-hover cursor-pointer"
key
=
"night"
isNightMode
=
{
isNightMode
}
onClick
=
{
()
=>
onNightModeChange
(
!
isNightMode
)
}
/>
...
...
@@ -50,6 +52,7 @@ export const getDashboardActions = ({
// option click to enter fullscreen without making the browser go fullscreen
buttons
.
push
(
<
Tooltip
key
=
"fullscreen"
tooltip
=
{
isFullscreen
?
t
`Exit fullscreen`
:
t
`Enter fullscreen`
}
>
<
span
...
...
@@ -57,7 +60,6 @@ export const getDashboardActions = ({
>
<
FullscreenIcon
className
=
"text-brand-hover cursor-pointer"
key
=
"fullscreen"
isFullscreen
=
{
isFullscreen
}
onClick
=
{
e
=>
onFullscreenChange
(
!
isFullscreen
,
!
e
.
altKey
)
}
/>
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/dashboard/components/DashboardHeader.jsx
+
9
−
7
View file @
dca26e08
...
...
@@ -210,7 +210,7 @@ export default class DashboardHeader extends Component {
if
(
!
isFullscreen
&&
canEdit
)
{
buttons
.
push
(
<
ModalWithTrigger
key
=
"add"
key
=
"add
-a-question
"
ref
=
"addQuestionModal"
triggerElement
=
{
<
Tooltip
tooltip
=
{
t
`Add a question`
}
>
...
...
@@ -244,7 +244,7 @@ export default class DashboardHeader extends Component {
if
(
isEditing
)
{
// Parameters
buttons
.
push
(
<
span
>
<
span
key
=
"add-a-filter"
>
<
Tooltip
tooltip
=
{
t
`Add a filter`
}
>
<
a
key
=
"parameters"
...
...
@@ -272,7 +272,7 @@ export default class DashboardHeader extends Component {
// Add text card button
buttons
.
push
(
<
Tooltip
tooltip
=
{
t
`Add a text box`
}
>
<
Tooltip
key
=
"add-a-text-box"
tooltip
=
{
t
`Add a text box`
}
>
<
a
data-metabase-event
=
"Dashboard;Add Text Box"
key
=
"add-text"
...
...
@@ -286,7 +286,7 @@ export default class DashboardHeader extends Component {
);
buttons
.
push
(
<
Tooltip
tooltip
=
{
t
`Revision history`
}
>
<
Tooltip
key
=
"revision-history"
tooltip
=
{
t
`Revision history`
}
>
<
Link
to
=
{
location
.
pathname
+
"
/history
"
}
data-metabase-event
=
{
"
Dashboard;Revisions
"
}
...
...
@@ -299,7 +299,7 @@ export default class DashboardHeader extends Component {
if
(
!
isFullscreen
)
{
buttons
.
push
(
<
Tooltip
tooltip
=
{
t
`Move dashboard`
}
>
<
Tooltip
key
=
"new-dashboard"
tooltip
=
{
t
`Move dashboard`
}
>
<
Link
to
=
{
location
.
pathname
+
"
/move
"
}
data-metabase-event
=
{
"
Dashboard;Move
"
}
...
...
@@ -312,7 +312,7 @@ export default class DashboardHeader extends Component {
if
(
!
isFullscreen
&&
!
isEditing
&&
canEdit
)
{
buttons
.
push
(
<
Tooltip
tooltip
=
{
t
`Edit dashboard`
}
>
<
Tooltip
key
=
"edit-dashboard"
tooltip
=
{
t
`Edit dashboard`
}
>
<
a
data-metabase-event
=
"Dashboard;Edit"
key
=
"edit"
...
...
@@ -331,7 +331,9 @@ export default class DashboardHeader extends Component {
((
isPublicLinksEnabled
&&
(
isAdmin
||
dashboard
.
public_uuid
))
||
(
isEmbeddingEnabled
&&
isAdmin
))
)
{
buttons
.
push
(<
DashboardEmbedWidget
dashboard
=
{
dashboard
}
/>);
buttons
.
push
(
<
DashboardEmbedWidget
key
=
"dashboard-embed"
dashboard
=
{
dashboard
}
/>,
);
}
buttons
.
push
(...
getDashboardActions
(
this
.
props
));
...
...
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