mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ShareModal: Remove PublicDashboard tab when share panel (#86946)
This commit is contained in:
@@ -77,11 +77,11 @@ export class ShareModal extends SceneObjectBase<ShareModalState> implements Moda
|
|||||||
|
|
||||||
if (!panelRef) {
|
if (!panelRef) {
|
||||||
tabs.push(...customDashboardTabs.map((Tab) => new Tab({ dashboardRef, modalRef })));
|
tabs.push(...customDashboardTabs.map((Tab) => new Tab({ dashboardRef, modalRef })));
|
||||||
}
|
|
||||||
|
|
||||||
if (isPublicDashboardsEnabled()) {
|
if (isPublicDashboardsEnabled()) {
|
||||||
tabs.push(new SharePublicDashboardTab({ dashboardRef, modalRef }));
|
tabs.push(new SharePublicDashboardTab({ dashboardRef, modalRef }));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.setState({ tabs });
|
this.setState({ tabs });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ function getTabs(canEditDashboard: boolean, panel?: PanelModel, activeTab?: stri
|
|||||||
component: ShareExport,
|
component: ShareExport,
|
||||||
});
|
});
|
||||||
tabs.push(...customDashboardTabs);
|
tabs.push(...customDashboardTabs);
|
||||||
}
|
|
||||||
|
|
||||||
if (isPublicDashboardsEnabled()) {
|
if (isPublicDashboardsEnabled()) {
|
||||||
tabs.push({
|
tabs.push({
|
||||||
@@ -64,6 +63,7 @@ function getTabs(canEditDashboard: boolean, panel?: PanelModel, activeTab?: stri
|
|||||||
component: SharePublicDashboard,
|
component: SharePublicDashboard,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const at = tabs.find((t) => t.value === activeTab);
|
const at = tabs.find((t) => t.value === activeTab);
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ export const renderSharePublicDashboard = async (
|
|||||||
|
|
||||||
const newProps = Object.assign(
|
const newProps = Object.assign(
|
||||||
{
|
{
|
||||||
panel: mockPanel,
|
|
||||||
dashboard: mockDashboard,
|
dashboard: mockDashboard,
|
||||||
onDismiss: () => {},
|
onDismiss: () => {},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user