Fix #6115 UI : Getting Invalid field name policyUrl on the roles page (#6124)

* Fix #6115 UI : Getting `Invalid field name policyUrl` on the roles page

* Fix: Entity should be a hyperlink - Explore page
This commit is contained in:
Sachin Chaurasiya 2022-07-15 21:08:55 +05:30 committed by GitHub
parent 2968e600aa
commit ccdfef8f0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 12 deletions

View File

@ -16,7 +16,7 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { isNil, isString, isUndefined, startCase, uniqueId } from 'lodash';
import { ExtraInfo } from 'Models';
import React, { FunctionComponent } from 'react';
import { useHistory, useLocation } from 'react-router-dom';
import { Link, useHistory, useLocation } from 'react-router-dom';
import AppState from '../../../AppState';
import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants';
import { ROUTES } from '../../../constants/constants';
@ -151,13 +151,15 @@ const TableDataCard: FunctionComponent<Props> = ({
src={serviceTypeLogo(serviceType || '')}
/>
<h6 className="tw-flex tw-items-center tw-m-0 tw-text-base tw-pl-2">
<button
className="tw-text-grey-body tw-font-semibold"
data-testid="table-link"
id={`${id}Title`}
onClick={handleLinkClick}>
{stringToHTML(name)}
</button>
<Link to={getEntityLink(indexType, fullyQualifiedName)}>
<button
className="tw-text-grey-body tw-font-semibold"
data-testid="table-link"
id={`${id}Title`}
onClick={handleLinkClick}>
{stringToHTML(name)}
</button>
</Link>
</h6>
{deleted && (
<>

View File

@ -172,10 +172,7 @@ const RolesPage = () => {
const fetchPolicy = (id: string) => {
setIsLoadingPolicy(true);
getPolicy(
id,
'displayName,description,owner,policyUrl,enabled,rules,location'
)
getPolicy(id, 'displayName,description,owner,enabled,rules,location')
.then((res: AxiosResponse) => {
if (res.data) {
setCurrentRolePolicies((preV) => [...preV, res.data]);