Forms: Remove gf-form from DataSourceLoadError.tsx (#113021)
* Forms: Remove gf-form from DataSourceLoadError.tsx * Forms: Remove gf-form from DataSourceLoadError.tsx
This commit is contained in:
@@ -2397,11 +2397,6 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"public/app/features/datasources/components/DataSourceLoadError.tsx": {
|
||||
"no-restricted-syntax": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"public/app/features/datasources/components/DataSourcePluginState.tsx": {
|
||||
"no-restricted-syntax": {
|
||||
"count": 3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { t, Trans } from '@grafana/i18n';
|
||||
import { Button, EmptyState } from '@grafana/ui';
|
||||
import { Button, EmptyState, Stack } from '@grafana/ui';
|
||||
|
||||
import { DataSourceRights } from '../types';
|
||||
|
||||
@@ -19,24 +19,27 @@ export function DataSourceLoadError({ dataSourceRights, onDelete, notFound }: Pr
|
||||
return (
|
||||
<>
|
||||
{readOnly && <DataSourceReadOnlyMessage />}
|
||||
<Stack direction="column">
|
||||
<Stack direction="column" alignItems="center">
|
||||
{notFound && (
|
||||
<EmptyState
|
||||
variant="not-found"
|
||||
message={t('datasources.data-source-load-error.not-found', 'Data source not found')}
|
||||
/>
|
||||
)}
|
||||
</Stack>
|
||||
<Stack direction="row" gap={2}>
|
||||
{canDelete && (
|
||||
<Button type="submit" variant="destructive" onClick={onDelete}>
|
||||
<Trans i18nKey="datasources.data-source-load-error.delete">Delete</Trans>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<div className="gf-form-button-row">
|
||||
{notFound && (
|
||||
<EmptyState
|
||||
variant="not-found"
|
||||
message={t('datasources.data-source-load-error.not-found', 'Data source not found')}
|
||||
/>
|
||||
)}
|
||||
{canDelete && (
|
||||
<Button type="submit" variant="destructive" onClick={onDelete}>
|
||||
<Trans i18nKey="datasources.data-source-load-error.delete">Delete</Trans>
|
||||
<Button variant="secondary" fill="outline" type="button" onClick={navigateBack}>
|
||||
<Trans i18nKey="datasources.data-source-load-error.back">Back</Trans>
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<Button variant="secondary" fill="outline" type="button" onClick={navigateBack}>
|
||||
<Trans i18nKey="datasources.data-source-load-error.back">Back</Trans>
|
||||
</Button>
|
||||
</div>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user