From 9a2376fc69892ece076d123cedbb0811173df8e1 Mon Sep 17 00:00:00 2001 From: guillaume-peoch-sonarsource Date: Tue, 19 Dec 2023 15:24:33 +0100 Subject: [PATCH] SONAR-21244 add Gitlab logo near Gitlab managed groups --- .../src/main/js/apps/groups/GroupsApp.tsx | 2 ++ .../js/apps/groups/components/ListItem.tsx | 24 +++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/groups/GroupsApp.tsx b/server/sonar-web/src/main/js/apps/groups/GroupsApp.tsx index d041a45e106..24cbae5c7c6 100644 --- a/server/sonar-web/src/main/js/apps/groups/GroupsApp.tsx +++ b/server/sonar-web/src/main/js/apps/groups/GroupsApp.tsx @@ -21,6 +21,7 @@ import * as React from 'react'; import { useState } from 'react'; import { Helmet } from 'react-helmet-async'; import GitHubSynchronisationWarning from '../../app/components/GitHubSynchronisationWarning'; +import GitLabSynchronisationWarning from '../../app/components/GitLabSynchronisationWarning'; import ListFooter from '../../components/controls/ListFooter'; import { ManagedFilter } from '../../components/controls/ManagedFilter'; import SearchBox from '../../components/controls/SearchBox'; @@ -52,6 +53,7 @@ export default function GroupsApp() {
{manageProvider?.provider === Provider.Github && } + {manageProvider?.provider === Provider.Gitlab && }
{ - return manageProvider === Provider.Github && managed; + const renderIdentityProviderIcon = (identityProvider: Provider | undefined) => { + if (identityProvider === undefined || identityProvider === Provider.Scim) { + return null; + } + + return ( + {identityProvider} + ); }; return ( @@ -63,14 +74,7 @@ export default function ListItem(props: ListItemProps) { {name} {group.default && ({translate('default')})} - {isGithubGroup() && ( - github - )} + {managed && renderIdentityProviderIcon(manageProvider)} {isGroupLocal() && {translate('local')}} -- 2.39.5