-
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
102 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/EdgeModels.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-edgemodels', 'empty-state-no-models-in-registry')); | ||
|
||
// wait for page to load | ||
await page.waitForSelector('text=No models added'); | ||
}); |
13 changes: 13 additions & 0 deletions
13
frontend/src/__tests__/integration/pages/edge/EdgeModels.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 EdgeModels from '~/pages/edge/EdgeModels'; | ||
|
||
export default { | ||
component: EdgeModels, | ||
}; | ||
|
||
const Template: StoryFn<typeof EdgeModels> = (args) => <EdgeModels {...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 EmptyEdgeModels from './EmptyEdgeModels'; | ||
|
||
const EdgeModels: React.FC = () => ( | ||
<ApplicationsPage | ||
title="Models" | ||
description={''} | ||
loaded={true} | ||
empty={true} | ||
emptyStatePage={<EmptyEdgeModels />} | ||
/> | ||
); | ||
|
||
export default EdgeModels; |
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 EdgeModels from './EdgeModels'; | ||
|
||
const EdgeModelsRoutes: React.FC = () => ( | ||
<Routes> | ||
<Route path="/models" element={<EdgeModels />} /> | ||
</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 EmptyEdgeModels: React.FC = () => ( | ||
<PageSection isFilled> | ||
<EmptyState> | ||
<EmptyStateIcon icon={PlusCircleIcon} /> | ||
<Title headingLevel="h1" size="lg" style={{ marginBottom: '10px' }}> | ||
No models added | ||
</Title> | ||
<EmptyStateBody style={{ margin: 'auto', width: '50%' }}> | ||
To get started, add a model. 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 EmptyEdgeModels; |
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