From 38fa41f51ffb6131176232f04e67870144985612 Mon Sep 17 00:00:00 2001 From: Juan Cabanas Date: Mon, 29 May 2023 13:08:27 -0300 Subject: [PATCH] PublicDashboards: Revoke public URL from audit table fix (#69032) --- .../features/dashboard/components/ShareModal/ShareModal.tsx | 6 +----- .../ConfigPublicDashboard/ConfigPublicDashboard.tsx | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/public/app/features/dashboard/components/ShareModal/ShareModal.tsx b/public/app/features/dashboard/components/ShareModal/ShareModal.tsx index 2d12915278f..521b794fb7f 100644 --- a/public/app/features/dashboard/components/ShareModal/ShareModal.tsx +++ b/public/app/features/dashboard/components/ShareModal/ShareModal.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { locationService, reportInteraction } from '@grafana/runtime/src'; +import { reportInteraction } from '@grafana/runtime/src'; import { Modal, ModalTabsHeader, TabContent } from '@grafana/ui'; import { config } from 'app/core/config'; import { contextSrv } from 'app/core/core'; @@ -95,10 +95,6 @@ export class ShareModal extends React.Component { reportInteraction('grafana_dashboards_share_modal_viewed'); } - componentWillUnmount() { - locationService.partial({ shareView: null }); - } - onSelectTab: React.ComponentProps['onChangeTab'] = (t) => { this.setState((prevState) => ({ ...prevState, activeTab: t.value })); }; diff --git a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx index f41aa5359a4..7740894da1b 100644 --- a/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx +++ b/public/app/features/dashboard/components/ShareModal/SharePublicDashboard/ConfigPublicDashboard/ConfigPublicDashboard.tsx @@ -97,7 +97,7 @@ const ConfigPublicDashboard = () => { showModal(ShareModal, { dashboard, onDismiss: hideModal, - activeTab: 'share', + activeTab: 'public-dashboard', }); };