Skip to content

Commit 93b461b

Browse files
Authentication UI: Remove auth settings (grafana#67647)
1 parent f9fd15c commit 93b461b

File tree

2 files changed

+3
-42
lines changed

2 files changed

+3
-42
lines changed

public/app/features/auth-config/AuthConfigPage.tsx

+3-33
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { StoreState } from 'app/types';
1111
import ConfigureAuthCTA from './components/ConfigureAuthCTA';
1212
import { ProviderCard } from './components/ProviderCard';
1313
import { loadSettings } from './state/actions';
14-
import { filterAuthSettings, getProviderUrl } from './utils';
14+
import { getProviderUrl } from './utils';
1515

1616
import { getRegisteredAuthProviders } from '.';
1717

@@ -20,9 +20,8 @@ interface OwnProps {}
2020
export type Props = OwnProps & ConnectedProps<typeof connector>;
2121

2222
function mapStateToProps(state: StoreState) {
23-
const { settings, isLoading, providerStatuses } = state.authConfig;
23+
const { isLoading, providerStatuses } = state.authConfig;
2424
return {
25-
settings,
2625
isLoading,
2726
providerStatuses,
2827
};
@@ -34,12 +33,7 @@ const mapDispatchToProps = {
3433

3534
const connector = connect(mapStateToProps, mapDispatchToProps);
3635

37-
export const AuthConfigPageUnconnected = ({
38-
settings,
39-
providerStatuses,
40-
isLoading,
41-
loadSettings,
42-
}: Props): JSX.Element => {
36+
export const AuthConfigPageUnconnected = ({ providerStatuses, isLoading, loadSettings }: Props): JSX.Element => {
4337
const styles = useStyles2(getStyles);
4438

4539
useEffect(() => {
@@ -54,7 +48,6 @@ export const AuthConfigPageUnconnected = ({
5448
const availableProviders = authProviders.filter(
5549
(p) => !providerStatuses[p.id]?.enabled && !providerStatuses[p.id]?.configured
5650
);
57-
const authSettings = filterAuthSettings(settings);
5851
const firstAvailableProvider = availableProviders?.length ? availableProviders[0] : null;
5952

6053
return (
@@ -100,29 +93,6 @@ export const AuthConfigPageUnconnected = ({
10093
))}
10194
</div>
10295
)}
103-
{!isEmpty(authSettings) && (
104-
<div className={styles.settingsSection}>
105-
<h3>Settings</h3>
106-
<table className="filter-table">
107-
<tbody>
108-
{Object.entries(authSettings).map(([sectionName, sectionSettings], i) => (
109-
<React.Fragment key={`section-${i}`}>
110-
<tr>
111-
<td className="admin-settings-section">{sectionName}</td>
112-
<td />
113-
</tr>
114-
{Object.entries(sectionSettings).map(([settingName, settingValue], j) => (
115-
<tr key={`property-${j}`}>
116-
<td className={styles.settingName}>{settingName}</td>
117-
<td className={styles.settingName}>{settingValue}</td>
118-
</tr>
119-
))}
120-
</React.Fragment>
121-
))}
122-
</tbody>
123-
</table>
124-
</div>
125-
)}
12696
</Page.Contents>
12797
</Page>
12898
);
-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
1-
import { Settings } from 'app/types';
2-
31
import { BASE_PATH } from './constants';
42
import { AuthProviderInfo } from './types';
53

6-
export function filterAuthSettings(settings: Settings) {
7-
const authSettings: Settings = Object.fromEntries(
8-
Object.entries(settings).filter(([sectionName]) => sectionName === 'auth')
9-
);
10-
return authSettings;
11-
}
12-
134
export function getProviderUrl(provider: AuthProviderInfo) {
145
return BASE_PATH + (provider.configPath || provider.id);
156
}

0 commit comments

Comments
 (0)