From ecfc8048e175779d68e4eeff114bd83faecbe33e Mon Sep 17 00:00:00 2001 From: Hugo Kiyodi Oshiro Date: Tue, 19 Dec 2023 14:53:31 +0100 Subject: [PATCH] Plugins: Disable add new data source for incomplete install (#79658) --- .../GetStartedWithDataSource.tsx | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/public/app/features/plugins/admin/components/GetStartedWithPlugin/GetStartedWithDataSource.tsx b/public/app/features/plugins/admin/components/GetStartedWithPlugin/GetStartedWithDataSource.tsx index 56cf7602f2e..4650a2c885d 100644 --- a/public/app/features/plugins/admin/components/GetStartedWithPlugin/GetStartedWithDataSource.tsx +++ b/public/app/features/plugins/admin/components/GetStartedWithPlugin/GetStartedWithDataSource.tsx @@ -1,7 +1,9 @@ import React, { useCallback } from 'react'; import { DataSourcePluginMeta } from '@grafana/data'; +import { config } from '@grafana/runtime'; import { Button } from '@grafana/ui'; +import configCore from 'app/core/config'; import { useDataSourcesRoutes, addDataSource } from 'app/features/datasources/state'; import { useDispatch } from 'app/types'; @@ -28,8 +30,20 @@ export function GetStartedWithDataSource({ plugin }: Props): React.ReactElement return null; } + const disabledButton = + configCore.featureToggles.managedPluginsInstall && + config.pluginAdminExternalManageEnabled && + !plugin.isFullyInstalled; + return ( - );