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}
|
||||
authType={provider.type}
|
||||
enabled={providerStatuses[provider.id]?.enabled}
|
||||
configFoundInIniFile={providerStatuses[provider.id]?.configFoundInIniFile}
|
||||
configPath={provider.configPath}
|
||||
onClick={() => {
|
||||
onProviderCardClick(provider);
|
||||
@ -103,9 +102,6 @@ export const AuthConfigPageUnconnected = ({ providerStatuses, isLoading, loadSet
|
||||
buttonIcon="plus-circle"
|
||||
buttonLink={getProviderUrl(firstAvailableProvider)}
|
||||
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}
|
||||
/>
|
||||
)}
|
||||
@ -118,7 +114,6 @@ export const AuthConfigPageUnconnected = ({ providerStatuses, isLoading, loadSet
|
||||
displayName={provider.displayName}
|
||||
authType={provider.protocol}
|
||||
enabled={providerStatuses[provider.id]?.enabled}
|
||||
configFoundInIniFile={providerStatuses[provider.id]?.configFoundInIniFile}
|
||||
configPath={provider.configPath}
|
||||
/>
|
||||
))}
|
||||
|
@ -2,7 +2,7 @@ import { css } from '@emotion/css';
|
||||
import React from 'react';
|
||||
|
||||
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';
|
||||
|
||||
@ -12,43 +12,19 @@ type Props = {
|
||||
providerId: string;
|
||||
displayName: string;
|
||||
enabled: boolean;
|
||||
configFoundInIniFile?: boolean;
|
||||
configPath?: string;
|
||||
authType?: string;
|
||||
badges?: JSX.Element[];
|
||||
onClick?: () => void;
|
||||
};
|
||||
|
||||
export function ProviderCard({
|
||||
providerId,
|
||||
displayName,
|
||||
enabled,
|
||||
configFoundInIniFile,
|
||||
configPath,
|
||||
authType,
|
||||
badges,
|
||||
onClick,
|
||||
}: Props) {
|
||||
export function ProviderCard({ providerId, displayName, enabled, configPath, authType, badges, onClick }: Props) {
|
||||
const styles = useStyles2(getStyles);
|
||||
configPath = BASE_PATH + (configPath || providerId);
|
||||
|
||||
return (
|
||||
<Card href={configPath} className={styles.container} onClick={() => onClick && onClick()}>
|
||||
<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}>
|
||||
{authType && <Badge text={authType} color="blue" icon="info-circle" />}
|
||||
{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};
|
||||
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 {
|
||||
enabled: boolean;
|
||||
configured: boolean;
|
||||
configFoundInIniFile?: boolean;
|
||||
hide?: boolean;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user