mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
SAML: Remove mention of config found in inifile (#71837)
* remove config found in inifile * remove the text from the provider card * remove description that contained the notion of inifile
This commit is contained in:
parent
70c05fff57
commit
649cd08a19
@ -88,7 +88,6 @@ export const AuthConfigPageUnconnected = ({ providerStatuses, isLoading, loadSet
|
|||||||
displayName={provider.displayName}
|
displayName={provider.displayName}
|
||||||
authType={provider.type}
|
authType={provider.type}
|
||||||
enabled={providerStatuses[provider.id]?.enabled}
|
enabled={providerStatuses[provider.id]?.enabled}
|
||||||
configFoundInIniFile={providerStatuses[provider.id]?.configFoundInIniFile}
|
|
||||||
configPath={provider.configPath}
|
configPath={provider.configPath}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onProviderCardClick(provider);
|
onProviderCardClick(provider);
|
||||||
@ -103,9 +102,6 @@ export const AuthConfigPageUnconnected = ({ providerStatuses, isLoading, loadSet
|
|||||||
buttonIcon="plus-circle"
|
buttonIcon="plus-circle"
|
||||||
buttonLink={getProviderUrl(firstAvailableProvider)}
|
buttonLink={getProviderUrl(firstAvailableProvider)}
|
||||||
buttonTitle={`Configure ${firstAvailableProvider.type}`}
|
buttonTitle={`Configure ${firstAvailableProvider.type}`}
|
||||||
description={`Important: if you have ${firstAvailableProvider.type} configuration enabled via the .ini file Grafana is using it.
|
|
||||||
Configuring ${firstAvailableProvider.type} via UI will take precedence over any configuration in the .ini file.
|
|
||||||
No changes will be written into .ini file.`}
|
|
||||||
onClick={onCTAClick}
|
onClick={onCTAClick}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -118,7 +114,6 @@ export const AuthConfigPageUnconnected = ({ providerStatuses, isLoading, loadSet
|
|||||||
displayName={provider.displayName}
|
displayName={provider.displayName}
|
||||||
authType={provider.protocol}
|
authType={provider.protocol}
|
||||||
enabled={providerStatuses[provider.id]?.enabled}
|
enabled={providerStatuses[provider.id]?.enabled}
|
||||||
configFoundInIniFile={providerStatuses[provider.id]?.configFoundInIniFile}
|
|
||||||
configPath={provider.configPath}
|
configPath={provider.configPath}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
|
@ -2,7 +2,7 @@ import { css } from '@emotion/css';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { GrafanaTheme2 } from '@grafana/data';
|
import { GrafanaTheme2 } from '@grafana/data';
|
||||||
import { Badge, Card, useStyles2, Icon, Tooltip } from '@grafana/ui';
|
import { Badge, Card, useStyles2 } from '@grafana/ui';
|
||||||
|
|
||||||
import { BASE_PATH } from '../constants';
|
import { BASE_PATH } from '../constants';
|
||||||
|
|
||||||
@ -12,43 +12,19 @@ type Props = {
|
|||||||
providerId: string;
|
providerId: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
configFoundInIniFile?: boolean;
|
|
||||||
configPath?: string;
|
configPath?: string;
|
||||||
authType?: string;
|
authType?: string;
|
||||||
badges?: JSX.Element[];
|
badges?: JSX.Element[];
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
export function ProviderCard({
|
export function ProviderCard({ providerId, displayName, enabled, configPath, authType, badges, onClick }: Props) {
|
||||||
providerId,
|
|
||||||
displayName,
|
|
||||||
enabled,
|
|
||||||
configFoundInIniFile,
|
|
||||||
configPath,
|
|
||||||
authType,
|
|
||||||
badges,
|
|
||||||
onClick,
|
|
||||||
}: Props) {
|
|
||||||
const styles = useStyles2(getStyles);
|
const styles = useStyles2(getStyles);
|
||||||
configPath = BASE_PATH + (configPath || providerId);
|
configPath = BASE_PATH + (configPath || providerId);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card href={configPath} className={styles.container} onClick={() => onClick && onClick()}>
|
<Card href={configPath} className={styles.container} onClick={() => onClick && onClick()}>
|
||||||
<Card.Heading className={styles.name}>{displayName}</Card.Heading>
|
<Card.Heading className={styles.name}>{displayName}</Card.Heading>
|
||||||
{configFoundInIniFile && (
|
|
||||||
<>
|
|
||||||
<span className={styles.initext}>
|
|
||||||
<Tooltip
|
|
||||||
content={`Note: Settings enabled in the .ini configuration file will overwritten by the current settings.`}
|
|
||||||
>
|
|
||||||
<>
|
|
||||||
<Icon name="adjust-circle" />
|
|
||||||
Configuration found in .ini file
|
|
||||||
</>
|
|
||||||
</Tooltip>
|
|
||||||
</span>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<div className={styles.footer}>
|
<div className={styles.footer}>
|
||||||
{authType && <Badge text={authType} color="blue" icon="info-circle" />}
|
{authType && <Badge text={authType} color="blue" icon="info-circle" />}
|
||||||
{enabled ? <Badge text="Enabled" color="green" icon="check" /> : <Badge text="Not enabled" color="red" />}
|
{enabled ? <Badge text="Enabled" color="green" icon="check" /> : <Badge text="Not enabled" color="red" />}
|
||||||
@ -82,11 +58,5 @@ export const getStyles = (theme: GrafanaTheme2) => {
|
|||||||
color: ${theme.colors.text.primary};
|
color: ${theme.colors.text.primary};
|
||||||
margin: 0;
|
margin: 0;
|
||||||
`,
|
`,
|
||||||
initext: css`
|
|
||||||
font-size: ${theme.typography.bodySmall.fontSize};
|
|
||||||
color: ${theme.colors.text.secondary};
|
|
||||||
padding: ${theme.spacing(1)} 0; // Add some padding
|
|
||||||
max-width: 90%; // Add a max-width to prevent text from stretching too wide
|
|
||||||
`,
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -11,7 +11,6 @@ export interface AuthConfigState {
|
|||||||
export interface AuthProviderStatus {
|
export interface AuthProviderStatus {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
configured: boolean;
|
configured: boolean;
|
||||||
configFoundInIniFile?: boolean;
|
|
||||||
hide?: boolean;
|
hide?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user