diff --git a/public/app/features/datasources/components/EditDataSourceActions.tsx b/public/app/features/datasources/components/EditDataSourceActions.tsx
index e8f3dd202a7..cb525f43f51 100644
--- a/public/app/features/datasources/components/EditDataSourceActions.tsx
+++ b/public/app/features/datasources/components/EditDataSourceActions.tsx
@@ -1,7 +1,7 @@
import { PluginExtensionPoints } from '@grafana/data';
-import { Trans } from '@grafana/i18n';
+import { t, Trans } from '@grafana/i18n';
import { config, usePluginLinks } from '@grafana/runtime';
-import { LinkButton } from '@grafana/ui';
+import { Button, Dropdown, LinkButton, Menu } from '@grafana/ui';
import { contextSrv } from 'app/core/core';
import { useDataSource } from '../state/hooks';
@@ -41,26 +41,12 @@ export function EditDataSourceActions({ uid }: Props) {
const links = allLinks.filter((link) => allowedPluginIds.includes(link.pluginId));
- return (
- <>
- {hasExploreRights && (
- {
- trackDsConfigClicked('explore');
- trackExploreClicked({
- grafana_version: config.buildInfo.version,
- datasource_uid: dataSource.uid,
- plugin_name: dataSource.typeName,
- path: window.location.pathname,
- });
- }}
- >
- Explore data
-
- )}
+ // Only render dropdown if there are multiple actions to show
+ const hasActions = hasExploreRights || (!isLoading && links.length > 0);
+
+ if (!hasActions) {
+ // Always show at least the "Build a dashboard" action
+ return (
Build a dashboard
+ );
+ }
+ const actionsMenu = (
+
+ );
+
+ return (
+
+
+
);
}