From 3f723a092d05f6e0cfb0cc6af300de7f49914288 Mon Sep 17 00:00:00 2001 From: Rares Mardare Date: Tue, 1 Aug 2023 16:54:08 +0300 Subject: [PATCH] minor tweaks to amv2 (#2708) UI tweaks for amv2 --- .../IntegrationLogo/IntegrationLogo.config.ts | 2 ++ .../src/pages/integrations/Integrations.tsx | 32 +++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/grafana-plugin/src/components/IntegrationLogo/IntegrationLogo.config.ts b/grafana-plugin/src/components/IntegrationLogo/IntegrationLogo.config.ts index c291b26e..9b65a2b5 100644 --- a/grafana-plugin/src/components/IntegrationLogo/IntegrationLogo.config.ts +++ b/grafana-plugin/src/components/IntegrationLogo/IntegrationLogo.config.ts @@ -1,8 +1,10 @@ export const logoCoors: { [key: string]: { x: number; y: number } } = { grafana: { x: 9, y: 0 }, grafana_alerting: { x: 9, y: 0 }, + legacy_grafana_alerting: { x: 9, y: 0 }, webhook: { x: 2, y: 14 }, alertmanager: { x: 12, y: 4 }, + legacy_alertmanager: { x: 12, y: 4 }, kapacitor: { x: 10, y: 1 }, fabric: { x: 8, y: 7 }, newrelic: { x: 0, y: 11 }, diff --git a/grafana-plugin/src/pages/integrations/Integrations.tsx b/grafana-plugin/src/pages/integrations/Integrations.tsx index db59e22d..bf462d0d 100644 --- a/grafana-plugin/src/pages/integrations/Integrations.tsx +++ b/grafana-plugin/src/pages/integrations/Integrations.tsx @@ -243,23 +243,23 @@ class Integrations extends React.Component const integration = alertReceiveChannelStore.getIntegration(alertReceiveChannel); const isLegacyIntegration = (integration?.value as string)?.toLowerCase().startsWith('legacy_'); + if (isLegacyIntegration) { + return ( + + + + + + {integration?.display_name} + + + ); + } + return ( - - {isLegacyIntegration ? ( - <> - - - - - {integration?.display_name} - - - ) : ( - <> - - {integration?.display_name} - - )} + + + {integration?.display_name} ); }