mirror of
https://github.com/grafana/grafana.git
synced 2024-12-01 21:19:28 -06:00
Dashboards: Remove Explore option from panel menu when panel's datasource uid is "-- Dashboard --" (#69017)
* Remove Explore option from panel menu when panel's datasource uid is "-- Dashboard --" * Use the constant SHARED_DASHBOARD_QUERY
This commit is contained in:
parent
521d5f86dc
commit
3fd04edd81
@ -25,6 +25,7 @@ import {
|
||||
} from 'app/features/dashboard/utils/panel';
|
||||
import { InspectTab } from 'app/features/inspector/types';
|
||||
import { isPanelModelLibraryPanel } from 'app/features/library-panels/guard';
|
||||
import { SHARED_DASHBOARD_QUERY } from 'app/plugins/datasource/dashboard';
|
||||
import { store } from 'app/store/store';
|
||||
|
||||
import { navigateToExplore } from '../../explore/state/main';
|
||||
@ -141,7 +142,11 @@ export function getPanelMenu(
|
||||
shortcut: 'p s',
|
||||
});
|
||||
|
||||
if (contextSrv.hasAccessToExplore() && !(panel.plugin && panel.plugin.meta.skipDataQuery)) {
|
||||
if (
|
||||
contextSrv.hasAccessToExplore() &&
|
||||
!(panel.plugin && panel.plugin.meta.skipDataQuery) &&
|
||||
panel.datasource?.uid !== SHARED_DASHBOARD_QUERY
|
||||
) {
|
||||
menu.push({
|
||||
text: t('panel.header-menu.explore', `Explore`),
|
||||
iconClassName: 'compass',
|
||||
|
Loading…
Reference in New Issue
Block a user