Skip to content

Commit

Permalink
add link to corrisponding run in aim
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio vincenzi committed Mar 26, 2024
1 parent 9f82b69 commit 0a2f8f6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/src/experiment-tracking/components/run-page/RunViewHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { FormattedMessage } from 'react-intl';
import { Link } from '../../../common/utils/RoutingUtils';
import { Button } from '@databricks/design-system';
import { OverflowMenu, PageHeader } from '../../../shared/building_blocks/PageHeader';
import Routes from '../../routes';
import { ExperimentEntity } from '../../types';
import { RenameRunModal } from '../modals/RenameRunModal';
import { RunViewModeSwitch } from './RunViewModeSwitch';
import { shouldEnableDeepLearningUI } from '../../../common/utils/FeatureUtils';
import { useEffect, useState } from 'react';
import { MlflowService } from 'experiment-tracking/sdk/MlflowService';

/**
* Run details page header component, common for all page view modes
Expand Down Expand Up @@ -49,12 +52,26 @@ export const RunViewHeader = ({

const breadcrumbs = [getExperimentPageLink()];

const [namespace, setNamespace] = useState<string>('');

useEffect(() => {
MlflowService.getCurrentNamespacePath().then(setNamespace);
}, []);

return (
<div css={{ flexShrink: 0 }}>
<PageHeader
title={<span data-test-id='runs-header'>{runDisplayName}</span>}
breadcrumbs={breadcrumbs}
>
<a href={`${window.location.origin}${namespace}/aim/runs/${runUuid}/overview`} target='_blank' rel='noreferrer'>
<Button css={{ marginLeft: 16 }} type='link' size='small'>
<FormattedMessage
defaultMessage='Open in Modern UI'
description='Link to the corresponding experiment in the Aim UI'
/>
</Button>
</a>
<OverflowMenu
menu={[
{
Expand Down

0 comments on commit 0a2f8f6

Please sign in to comment.