mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 05:01:50 +08:00

* 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
34 lines
1.0 KiB
TypeScript
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;
|