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 classNames from 'classnames';
import { startCase, uniqueId } from 'lodash'; import { isUndefined, startCase, uniqueId } from 'lodash';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import { import {
EntityTags, EntityTags,
@ -160,6 +160,8 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
showLabel: true, showLabel: true,
isLink: true, isLink: true,
}, },
...(!isUndefined(mlModelDetail.dashboard)
? [
{ {
key: 'Dashboard', key: 'Dashboard',
value: getDashboardDetailsPath( value: getDashboardDetailsPath(
@ -169,6 +171,8 @@ const MlModelDetail: FC<MlModelDetailProp> = ({
showLabel: true, showLabel: true,
isLink: true, isLink: true,
}, },
]
: []),
]; ];
const hasEditAccess = () => { const hasEditAccess = () => {