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
ce115223
Unverified
Commit
ce115223
authored
7 years ago
by
Tom Robinson
Browse files
Options
Downloads
Patches
Plain Diff
Confirm when disabling public link
parent
571c0202
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/public/components/widgets/SharingPane.jsx
+16
-7
16 additions, 7 deletions
...nd/src/metabase/public/components/widgets/SharingPane.jsx
with
16 additions
and
7 deletions
frontend/src/metabase/public/components/widgets/SharingPane.jsx
+
16
−
7
View file @
ce115223
...
...
@@ -6,6 +6,7 @@ import RetinaImage from "react-retina-image";
import
Icon
from
"
metabase/components/Icon
"
;
import
Toggle
from
"
metabase/components/Toggle
"
;
import
CopyWidget
from
"
metabase/components/CopyWidget
"
;
import
Confirm
from
"
metabase/components/Confirm
"
;
import
{
getPublicEmbedHTML
}
from
"
metabase/public/lib/code
"
;
...
...
@@ -67,15 +68,23 @@ export default class SharingPane extends Component<*, Props, State> {
<
div
className
=
"pb2 mb4 border-bottom flex align-center"
>
<
h4
>
Enable sharing
</
h4
>
<
div
className
=
"ml-auto"
>
<
Toggle
value
=
{
!!
resource
.
public_uuid
}
onChange
=
{
(
value
)
=>
{
if
(
value
)
{
{
resource
.
public_uuid
?
<
Confirm
title
=
"Disable this public link?"
content
=
"This will cause the existing link to stop working. You can re-enable it, but when you do it will be a different link."
action
=
{
()
=>
{
MetabaseAnalytics
.
trackEvent
(
"
Sharing Modal
"
,
"
Public Link Disabled
"
,
resourceType
);
onDisablePublicLink
();
}
}
>
<
Toggle
value
=
{
true
}
/>
</
Confirm
>
:
<
Toggle
value
=
{
false
}
onChange
=
{
()
=>
{
MetabaseAnalytics
.
trackEvent
(
"
Sharing Modal
"
,
"
Public Link Enabled
"
,
resourceType
);
onCreatePublicLink
();
}
else
{
MetabaseAnalytics
.
trackEvent
(
"
Sharing Modal
"
,
"
Public Link Disabled
"
,
resourceType
);
onDisablePublicLink
();
}
}
}
/>
}
}
/>
}
</
div
>
</
div
>
}
...
...
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