Skip to content

Commit

Permalink
Change empty global model mesh serving link text to project display name
Browse files Browse the repository at this point in the history
  • Loading branch information
DaoDaoNoCode committed Nov 13, 2023
1 parent 8344e6d commit 263e7a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test('Empty State No Serving Runtime', async ({ page }) => {
await page.waitForSelector('text=No deployed models yet');

// Test that the button is enabled
await expect(page.getByRole('button', { name: 'Go to the Projects page' })).toBeTruthy();
await expect(page.getByRole('button', { name: 'Go to Test Project' })).toBeTruthy();
});

test('Empty State No Inference Service', async ({ page }) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { getProjectModelServingPlatform } from '~/pages/modelServing/screens/pro
import { ServingRuntimePlatform } from '~/types';
import { byName, ProjectsContext } from '~/concepts/projects/ProjectsContext';
import useServingPlatformStatuses from '~/pages/modelServing/useServingPlatformStatuses';
import { getProjectDisplayName } from '~/pages/projects/utils';
import ServeModelButton from './ServeModelButton';

const EmptyModelServing: React.FC = () => {
Expand Down Expand Up @@ -47,11 +48,9 @@ const EmptyModelServing: React.FC = () => {
<EmptyStateSecondaryActions>
<Button
variant="link"
onClick={() =>
navigate(project?.metadata.name ? `/projects/${project.metadata.name}` : '/projects')
}
onClick={() => navigate(project ? `/projects/${project.metadata.name}` : '/projects')}
>
{project?.metadata.name ? `Go to ${project.metadata.name}` : 'Select a project'}
{project ? `Go to ${getProjectDisplayName(project)}` : 'Select a project'}
</Button>
</EmptyStateSecondaryActions>
</EmptyState>
Expand Down

0 comments on commit 263e7a1

Please sign in to comment.