mirror of
https://github.com/grafana/grafana.git
synced 2025-01-27 08:47:12 -06:00
ShareModal: Remove PublicDashboard tab when share panel (#86946)
This commit is contained in:
parent
45effc48d9
commit
85c23eed38
@ -77,10 +77,10 @@ export class ShareModal extends SceneObjectBase<ShareModalState> implements Moda
|
||||
|
||||
if (!panelRef) {
|
||||
tabs.push(...customDashboardTabs.map((Tab) => new Tab({ dashboardRef, modalRef })));
|
||||
}
|
||||
|
||||
if (isPublicDashboardsEnabled()) {
|
||||
tabs.push(new SharePublicDashboardTab({ dashboardRef, modalRef }));
|
||||
if (isPublicDashboardsEnabled()) {
|
||||
tabs.push(new SharePublicDashboardTab({ dashboardRef, modalRef }));
|
||||
}
|
||||
}
|
||||
|
||||
this.setState({ tabs });
|
||||
|
@ -55,14 +55,14 @@ function getTabs(canEditDashboard: boolean, panel?: PanelModel, activeTab?: stri
|
||||
component: ShareExport,
|
||||
});
|
||||
tabs.push(...customDashboardTabs);
|
||||
}
|
||||
|
||||
if (isPublicDashboardsEnabled()) {
|
||||
tabs.push({
|
||||
label: t('share-modal.tab-title.public-dashboard-title', 'Public dashboard'),
|
||||
value: shareDashboardType.publicDashboard,
|
||||
component: SharePublicDashboard,
|
||||
});
|
||||
if (isPublicDashboardsEnabled()) {
|
||||
tabs.push({
|
||||
label: t('share-modal.tab-title.public-dashboard-title', 'Public dashboard'),
|
||||
value: shareDashboardType.publicDashboard,
|
||||
component: SharePublicDashboard,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const at = tabs.find((t) => t.value === activeTab);
|
||||
|
@ -56,7 +56,6 @@ export const renderSharePublicDashboard = async (
|
||||
|
||||
const newProps = Object.assign(
|
||||
{
|
||||
panel: mockPanel,
|
||||
dashboard: mockDashboard,
|
||||
onDismiss: () => {},
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user