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';
<main className="page page-limited" id="groups-page">
<Header manageProvider={manageProvider?.provider} />
{manageProvider?.provider === Provider.Github && <GitHubSynchronisationWarning short />}
+ {manageProvider?.provider === Provider.Gitlab && <GitLabSynchronisationWarning short />}
<div className="display-flex-justify-start big-spacer-bottom big-spacer-top">
<ManagedFilter
return isManaged() && !managed;
};
- const isGithubGroup = () => {
- return manageProvider === Provider.Github && managed;
+ const renderIdentityProviderIcon = (identityProvider: Provider | undefined) => {
+ if (identityProvider === undefined || identityProvider === Provider.Scim) {
+ return null;
+ }
+
+ return (
+ <img
+ alt={identityProvider}
+ className="spacer-left spacer-right"
+ height={16}
+ src={`${getBaseUrl()}/images/alm/${identityProvider}.svg`}
+ />
+ );
};
return (
<td className="width-20" headers="list-group-name">
<b>{name}</b>
{group.default && <span className="little-spacer-left">({translate('default')})</span>}
- {isGithubGroup() && (
- <img
- alt="github"
- className="spacer-left spacer-right"
- height={16}
- src={`${getBaseUrl()}/images/alm/github.svg`}
- />
- )}
+ {managed && renderIdentityProviderIcon(manageProvider)}
{isGroupLocal() && <span className="little-spacer-left badge">{translate('local')}</span>}
</td>