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
0c0ad437
Unverified
Commit
0c0ad437
authored
1 year ago
by
Aleksandr Lesnenko
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
fix audit cards have actions menu (#31843)
parent
db5ecb9c
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
e2e/test/scenarios/auditing/auditing.cy.spec.js
+11
-1
11 additions, 1 deletion
e2e/test/scenarios/auditing/auditing.cy.spec.js
frontend/src/metabase/dashboard/components/DashCard/DashCardVisualization.tsx
+3
-1
3 additions, 1 deletion
...e/dashboard/components/DashCard/DashCardVisualization.tsx
with
14 additions
and
2 deletions
e2e/test/scenarios/auditing/auditing.cy.spec.js
+
11
−
1
View file @
0c0ad437
import
{
restore
,
describeEE
,
visitQuestion
}
from
"
e2e/support/helpers
"
;
import
{
restore
,
describeEE
,
visitQuestion
,
getDashboardCard
,
}
from
"
e2e/support/helpers
"
;
import
{
USERS
}
from
"
e2e/support/cypress_data
"
;
import
{
SAMPLE_DATABASE
}
from
"
e2e/support/cypress_sample_database
"
;
...
...
@@ -211,6 +216,11 @@ describeEE("audit > auditing", () => {
it
(
"
should load both tabs in Questions
"
,
()
=>
{
// Overview tab
cy
.
visit
(
"
/admin/audit/questions/overview
"
);
// There should not be any menu buttons on dashcards
getDashboardCard
().
realHover
();
cy
.
findByTestId
(
"
dashcard-menu
"
).
should
(
"
not.exist
"
);
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
cy
.
findByText
(
"
Slowest queries
"
);
// eslint-disable-next-line no-unscoped-text-selectors -- deprecated usage
...
...
This diff is collapsed.
Click to expand it.
frontend/src/metabase/dashboard/components/DashCard/DashCardVisualization.tsx
+
3
−
1
View file @
0c0ad437
...
...
@@ -32,6 +32,7 @@ import Question from "metabase-lib/Question";
import
type
Mode
from
"
metabase-lib/Mode
"
;
import
type
Metadata
from
"
metabase-lib/metadata/Metadata
"
;
import
InternalQuery
from
"
metabase-lib/queries/InternalQuery
"
;
import
{
CardSlownessStatus
,
DashCardOnChangeCardAndRunHandler
}
from
"
./types
"
;
import
ClickBehaviorSidebarOverlay
from
"
./ClickBehaviorSidebarOverlay
"
;
import
DashCardMenu
from
"
./DashCardMenu
"
;
...
...
@@ -180,13 +181,14 @@ function DashCardVisualization({
const
question
=
new
Question
(
dashcard
.
card
,
metadata
);
const
mainSeries
=
series
[
0
]
as
unknown
as
Dataset
;
const
isInternalQuery
=
question
.
query
()
instanceof
InternalQuery
;
const
shouldShowDownloadWidget
=
isEmbed
||
(
!
isPublic
&&
!
isEditing
&&
DashCardMenu
.
shouldRender
({
question
,
result
:
mainSeries
}));
if
(
!
shouldShowDownloadWidget
)
{
if
(
isInternalQuery
||
!
shouldShowDownloadWidget
)
{
return
null
;
}
...
...
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