mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Feature highlights: Highlight team group sync (#44477)
* Highlight team group sync * Update text
This commit is contained in:
parent
6533eb9244
commit
28c51cde3a
@ -15,6 +15,7 @@ import { contextSrv } from 'app/core/services/context_srv';
|
||||
import { NavModel } from '@grafana/data';
|
||||
import { featureEnabled } from '@grafana/runtime';
|
||||
import { GrafanaRouteComponentProps } from 'app/core/navigation/types';
|
||||
import { UpgradeBox } from 'app/core/components/Upgrade/UpgradeBox';
|
||||
|
||||
interface TeamPageRouteParams {
|
||||
id: string;
|
||||
@ -127,7 +128,17 @@ export class TeamPages extends PureComponent<Props, State> {
|
||||
case PageTypes.Settings:
|
||||
return isSignedInUserTeamAdmin && <TeamSettings team={team!} />;
|
||||
case PageTypes.GroupSync:
|
||||
return isSignedInUserTeamAdmin && isSyncEnabled && <TeamGroupSync />;
|
||||
if (isSignedInUserTeamAdmin && isSyncEnabled) {
|
||||
return <TeamGroupSync />;
|
||||
} else if (config.featureHighlights.enabled) {
|
||||
return (
|
||||
<UpgradeBox
|
||||
text={
|
||||
"Team Sync immediately updates each user's Grafana teams and permissions based on their LDAP or Oauth group membership, instead of updating when users sign in."
|
||||
}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -1,9 +1,11 @@
|
||||
import { Team, TeamPermissionLevel } from 'app/types';
|
||||
import { featureEnabled } from '@grafana/runtime';
|
||||
import { NavModelItem, NavModel } from '@grafana/data';
|
||||
import config from 'app/core/config';
|
||||
import { ProBadge } from 'app/core/components/Upgrade/ProBadge';
|
||||
|
||||
export function buildNavModel(team: Team): NavModelItem {
|
||||
const navModel = {
|
||||
const navModel: NavModelItem = {
|
||||
img: team.avatarUrl,
|
||||
id: 'team-' + team.id,
|
||||
subTitle: 'Manage members and settings',
|
||||
@ -28,14 +30,18 @@ export function buildNavModel(team: Team): NavModelItem {
|
||||
],
|
||||
};
|
||||
|
||||
const teamGroupSync = {
|
||||
active: false,
|
||||
icon: 'sync',
|
||||
id: `team-groupsync-${team.id}`,
|
||||
text: 'External group sync',
|
||||
url: `org/teams/edit/${team.id}/groupsync`,
|
||||
};
|
||||
|
||||
if (featureEnabled('teamsync')) {
|
||||
navModel.children.push({
|
||||
active: false,
|
||||
icon: 'sync',
|
||||
id: `team-groupsync-${team.id}`,
|
||||
text: 'External group sync',
|
||||
url: `org/teams/edit/${team.id}/groupsync`,
|
||||
});
|
||||
navModel.children!.push(teamGroupSync);
|
||||
} else if (config.featureHighlights.enabled) {
|
||||
navModel.children!.push({ ...teamGroupSync, tabSuffix: ProBadge });
|
||||
}
|
||||
|
||||
return navModel;
|
||||
|
Loading…
Reference in New Issue
Block a user