Fix #6079 MlModel UI - Dashboard Undefined (#6083)

This commit is contained in:
Sachin Chaurasiya 2022-07-14 16:40:33 +05:30 committed by GitHub
parent 46eb7c9bec
commit 902ad0d299
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@
*/
import classNames from 'classnames';
import { startCase, uniqueId } from 'lodash';
import { isUndefined, startCase, uniqueId } from 'lodash';
import { observer } from 'mobx-react';
import {
EntityTags,
@ -160,15 +160,19 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
showLabel: true,
isLink: true,
},
{
key: 'Dashboard',
value: getDashboardDetailsPath(
mlModelDetail.dashboard?.fullyQualifiedName as string
),
placeholderText: getEntityName(mlModelDetail.dashboard),
showLabel: true,
isLink: true,
},
...(!isUndefined(mlModelDetail.dashboard)
? [
{
key: 'Dashboard',
value: getDashboardDetailsPath(
mlModelDetail.dashboard?.fullyQualifiedName as string
),
placeholderText: getEntityName(mlModelDetail.dashboard),
showLabel: true,
isLink: true,
},
]
: []),
];
const hasEditAccess = () => {