Inspect: Hide Actions tab when it is empty (#55272) (#55274)

(cherry picked from commit 6947e276d6)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Grot (@grafanabot)
2022-09-16 07:35:00 +02:00
committed by GitHub
parent d3d45680d4
commit b67d62c016
@@ -65,7 +65,7 @@ export const useInspectTabs = (
// This is a quick internal hack to allow custom actions in inspect
// For 8.1, something like this should be exposed through grafana/runtime
const supplier = (window as any).grafanaPanelInspectActionSupplier as PanelInspectActionSupplier;
if (supplier && supplier.getActions(panel)) {
if (supplier && supplier.getActions(panel)?.length) {
tabs.push({
label: t({ id: 'dashboard.inspect.actions-tab', message: 'Actions' }),
value: InspectTab.Actions,