ui: added title for policy and role page & fix multi selection issue in create policy (#12904)

This commit is contained in:
Shailesh Parmar 2023-08-18 10:54:10 +05:30 committed by GitHub
parent de7c5824cb
commit 99b57db6db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 4 deletions

View File

@ -103,11 +103,11 @@ const PoliciesDetailPage = () => {
url: policiesPath, url: policiesPath,
}, },
{ {
name: fqn, name: getEntityName(policy),
url: '', url: '',
}, },
], ],
[fqn] [policy]
); );
const fetchPolicyPermission = async () => { const fetchPolicyPermission = async () => {
@ -368,7 +368,14 @@ const PoliciesDetailPage = () => {
</ErrorPlaceHolder> </ErrorPlaceHolder>
) : ( ) : (
<div className="policies-detail" data-testid="policy-details"> <div className="policies-detail" data-testid="policy-details">
<Typography.Title
className="m-b-0 m-t-xs"
data-testid="heading"
level={5}>
{getEntityName(policy)}
</Typography.Title>
<Description <Description
className="m-b-md"
description={policy.description || ''} description={policy.description || ''}
entityFqn={policy.fullyQualifiedName} entityFqn={policy.fullyQualifiedName}
entityName={getEntityName(policy)} entityName={getEntityName(policy)}

View File

@ -253,6 +253,7 @@ const RuleForm: FC<RuleFormProps> = ({ ruleData, setRuleData }) => {
]}> ]}>
<TreeSelect <TreeSelect
treeCheckable treeCheckable
autoClearSearchValue={false}
className="w-full" className="w-full"
data-testid="resources" data-testid="resources"
placeholder={t('label.select-field', { placeholder={t('label.select-field', {
@ -281,6 +282,7 @@ const RuleForm: FC<RuleFormProps> = ({ ruleData, setRuleData }) => {
]}> ]}>
<TreeSelect <TreeSelect
treeCheckable treeCheckable
autoClearSearchValue={false}
className="w-full" className="w-full"
data-testid="operations" data-testid="operations"
placeholder={t('label.select-field', { placeholder={t('label.select-field', {

View File

@ -86,11 +86,11 @@ const RolesDetailPage = () => {
url: rolesPath, url: rolesPath,
}, },
{ {
name: fqn, name: getEntityName(role),
url: '', url: '',
}, },
], ],
[fqn] [role]
); );
const fetchRolePermission = async () => { const fetchRolePermission = async () => {
@ -276,7 +276,14 @@ const RolesDetailPage = () => {
</ErrorPlaceHolder> </ErrorPlaceHolder>
) : ( ) : (
<div className="roles-detail" data-testid="role-details"> <div className="roles-detail" data-testid="role-details">
<Typography.Title
className="m-b-0 m-t-xs"
data-testid="heading"
level={5}>
{getEntityName(role)}
</Typography.Title>
<Description <Description
className="m-b-md"
description={role.description || ''} description={role.description || ''}
entityFqn={role.fullyQualifiedName} entityFqn={role.fullyQualifiedName}
entityName={getEntityName(role)} entityName={getEntityName(role)}