From fd3c986cebfff2ea40a1c6329e46bb5e4ba1bca8 Mon Sep 17 00:00:00 2001 From: Michael Mandrus <41969079+mmandrus@users.noreply.github.com> Date: Wed, 29 Jun 2022 11:05:54 -0400 Subject: [PATCH] Plugins: disable management of secrets manager plugins through the UI (#51553) * add special handling on the plugin gathering side to check whether secrets manager plugins are enabled or not * show disabled badge in front end if the plugin is not enabled * Only show error in disabled badge hover if one is present (otherwise it shows "undefined") * refactor to make use of fields already available in the DTO * fix typo * if there is no error returned for the plugin, just show 'disabled' * fix typo * Update public/app/features/plugins/admin/components/Badges/PluginDisabledBadge.tsx Co-authored-by: Levente Balogh * Update frontendsettings.go add clarifying comment * fix unit test * rework task to use new frontend property combined with plugin type to determine if the plugin should be disabled * Update helpers.test.ts revert test change * fix unit test * show custom uninstall message if the plugin is a secrets manager * bogus commit to trigger precommit * undo commit * run precommit manually Co-authored-by: Levente Balogh --- .../admin/components/InstallControls/InstallControls.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/public/app/features/plugins/admin/components/InstallControls/InstallControls.tsx b/public/app/features/plugins/admin/components/InstallControls/InstallControls.tsx index 73235702496..6563d3d83f1 100644 --- a/public/app/features/plugins/admin/components/InstallControls/InstallControls.tsx +++ b/public/app/features/plugins/admin/components/InstallControls/InstallControls.tsx @@ -40,6 +40,10 @@ export const InstallControls = ({ plugin, latestCompatibleVersion }: Props) => { return
Renderer plugins cannot be managed by the Plugin Catalog.
; } + if (plugin.type === PluginType.secretsmanager) { + return
Secrets manager plugins cannot be managed by the Plugin Catalog.
; + } + if (plugin.isEnterprise && !featureEnabled('enterprise.plugins')) { return (