Chore: Remove gf-form in Permissions (#79908)

* Remove empty table in favor of Alert

* Change to using Box and Text
This commit is contained in:
Tobias Skarhed 2024-01-05 14:32:01 +01:00 committed by GitHub
parent 5e74c19628
commit fbd0ceec7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 11 deletions

View File

@ -6958,9 +6958,6 @@ exports[`no gf-form usage`] = {
"public/app/core/components/AccessControl/PermissionList.tsx:5381": [
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]
],
"public/app/core/components/AccessControl/Permissions.tsx:5381": [
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]
],
"public/app/core/components/PageHeader/PageHeader.tsx:5381": [
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"],
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]

View File

@ -4,7 +4,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
import { GrafanaTheme2 } from '@grafana/data';
import { Space } from '@grafana/experimental';
import { Button, useStyles2 } from '@grafana/ui';
import { Text, Box, Button, useStyles2 } from '@grafana/ui';
import { SlideDown } from 'app/core/components/Animations/SlideDown';
import { Trans, t } from 'app/core/internationalization';
import { getBackendSrv } from 'app/core/services/backend_srv';
@ -191,13 +191,9 @@ export const Permissions = ({
</>
)}
{items.length === 0 && (
<table className="filter-table gf-form-group">
<tbody>
<tr>
<th>{emptyLabel}</th>
</tr>
</tbody>
</table>
<Box>
<Text>{emptyLabel}</Text>
</Box>
)}
<PermissionList
title={titleRole}