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

View File

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