Files
grafana/public/app/features/admin/AdminSettings.tsx
Hugo Häggmark 119d5897ea i18n: imports use @grafana/i18n (#105177)
* i18n: everything should target @grafana/i18n

* wip

* chore: updates after PR feedback

* Trigger build

* Trigger build

* Trigger build

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: skip flaky tests

* chore: revert all flaky tests

* chore: some incorrect usages of useTranslate
2025-05-15 09:17:14 +02:00

34 lines
1.0 KiB
TypeScript

import { useAsync } from 'react-use';
import { Trans } from '@grafana/i18n';
import { getBackendSrv } from '@grafana/runtime';
import { Alert } from '@grafana/ui';
import { Page } from 'app/core/components/Page/Page';
import { AdminSettingsTable } from './AdminSettingsTable';
export type Settings = { [key: string]: { [key: string]: string } };
function AdminSettings() {
const { loading, value: settings } = useAsync(() => getBackendSrv().get<Settings>('/api/admin/settings'), []);
return (
<Page navId="server-settings">
<Page.Contents>
<Alert severity="info" title="">
<Trans i18nKey="admin.settings.info-description">
These system settings are defined in grafana.ini or custom.ini (or overridden in ENV variables). To change
these you currently need to restart Grafana.
</Trans>
</Alert>
{loading && <AdminSettingsTable.Skeleton />}
{settings && <AdminSettingsTable settings={settings} />}
</Page.Contents>
</Page>
);
}
export default AdminSettings;