minor tweaks to amv2 (#2708)

UI tweaks for amv2
This commit is contained in:
Rares Mardare 2023-08-01 16:54:08 +03:00 committed by GitHub
parent 66e59adbca
commit 3f723a092d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 16 deletions

View file

@ -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 },

View file

@ -243,23 +243,23 @@ class Integrations extends React.Component<IntegrationsProps, IntegrationsState>
const integration = alertReceiveChannelStore.getIntegration(alertReceiveChannel);
const isLegacyIntegration = (integration?.value as string)?.toLowerCase().startsWith('legacy_');
if (isLegacyIntegration) {
return (
<HorizontalGroup>
<Tooltip placement="top" content={'This integration has been deprecated, consider migrating it.'}>
<Icon name="info-circle" className="u-opacity" />
</Tooltip>
<Text type="secondary">
<span className="u-opacity">{integration?.display_name}</span>
</Text>
</HorizontalGroup>
);
}
return (
<HorizontalGroup spacing="xs">
{isLegacyIntegration ? (
<>
<Tooltip placement="top" content={'This integration has been deprecated, consider migrating it.'}>
<Icon name="info-circle" className="u-opacity" />
</Tooltip>
<Text type="secondary">
<span className="u-opacity">{integration?.display_name}</span>
</Text>
</>
) : (
<>
<IntegrationLogo scale={0.08} integration={integration} />
<Text type="secondary">{integration?.display_name}</Text>
</>
)}
<HorizontalGroup>
<IntegrationLogo scale={0.08} integration={integration} />
<Text type="secondary">{integration?.display_name}</Text>
</HorizontalGroup>
);
}