-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Edge Model Registry - Sidebar and EmptyState
- Loading branch information
Showing
14 changed files
with
104 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
frontend/src/__tests__/integration/pages/edge/ModelRegistry.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { test } from '@playwright/test'; | ||
import { navigateToStory } from '~/__tests__/integration/utils'; | ||
|
||
test('Empty State No models in Registry', async ({ page }) => { | ||
await page.goto(navigateToStory('pages-edge-modelregistry', 'empty-state-no-models-in-registry')); | ||
|
||
// wait for page to load | ||
await page.waitForSelector('text=No models in the registry'); | ||
}); |
13 changes: 13 additions & 0 deletions
13
frontend/src/__tests__/integration/pages/edge/ModelRegistry.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { StoryFn, StoryObj } from '@storybook/react'; | ||
import EdgeModelRegistry from '~/pages/edge/EdgeModelRegistry'; | ||
|
||
export default { | ||
component: EdgeModelRegistry, | ||
}; | ||
|
||
const Template: StoryFn<typeof EdgeModelRegistry> = (args) => <EdgeModelRegistry {...args} />; | ||
|
||
export const EmptyStateNoModelsInRegistry: StoryObj = { | ||
render: Template, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as React from 'react'; | ||
import ApplicationsPage from '~/pages/ApplicationsPage'; | ||
import EmptyModelRegistry from './EmptyModelRegistry'; | ||
|
||
const EdgeModelRegistry: React.FC = () => ( | ||
<ApplicationsPage | ||
title="Model registry" | ||
description={''} | ||
loaded={true} | ||
empty={true} | ||
emptyStatePage={<EmptyModelRegistry />} | ||
/> | ||
); | ||
|
||
export default EdgeModelRegistry; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as React from 'react'; | ||
import { Routes, Route } from 'react-router-dom'; | ||
import EdgeModelRegistry from './EdgeModelRegistry'; | ||
|
||
const EdgeModelsRoutes: React.FC = () => ( | ||
<Routes> | ||
<Route path="/modelRegistry" element={<EdgeModelRegistry />} /> | ||
</Routes> | ||
); | ||
|
||
export default EdgeModelsRoutes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import * as React from 'react'; | ||
import { | ||
EmptyState, | ||
EmptyStateBody, | ||
EmptyStateIcon, | ||
PageSection, | ||
Title, | ||
} from '@patternfly/react-core'; | ||
import { PlusCircleIcon } from '@patternfly/react-icons'; | ||
|
||
const EmptyModelRegistry: React.FC = () => ( | ||
<PageSection isFilled> | ||
<EmptyState> | ||
<EmptyStateIcon icon={PlusCircleIcon} /> | ||
<Title headingLevel="h1" size="lg" style={{ marginBottom: '10px' }}> | ||
No models in the registry | ||
</Title> | ||
<EmptyStateBody style={{ margin: 'auto', width: '50%' }}> | ||
To get started, add a model to the model registry. Adding a model will also initiate a | ||
pipeline that will build the model and its dependencies into a container image and save that | ||
image in a container image registry. | ||
</EmptyStateBody> | ||
</EmptyState> | ||
</PageSection> | ||
); | ||
|
||
export default EmptyModelRegistry; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters