Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ws): Notebooks 2.0 // Frontend // Workspaces details // Pod template tab #173 #197

Merged
merged 3 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 104 additions & 36 deletions workspaces/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions workspaces/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,13 @@
"webpack-merge": "^5.10.0"
},
"dependencies": {
"@patternfly/react-code-editor": "^6.0.0",
"@patternfly/react-core": "^6.0.0",
"@patternfly/react-icons": "^6.0.0",
"@patternfly/react-styles": "^6.0.0",
"@patternfly/react-table": "^6.0.0",
"@types/js-yaml": "^4.0.9",
"js-yaml": "^4.1.0",
"npm-run-all": "^4.1.5",
"react": "^18",
"react-dom": "^18",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Workspace } from '~/shared/types';
import { WorkspaceDetailsOverview } from '~/app/pages/Workspaces/Details/WorkspaceDetailsOverview';
import { WorkspaceDetailsActions } from '~/app/pages/Workspaces/Details/WorkspaceDetailsActions';
import { WorkspaceDetailsActivity } from '~/app/pages/Workspaces/Details/WorkspaceDetailsActivity';
import { WorkspaceDetailsPodTemplate } from '~/app/pages/Workspaces/Details/WorkspaceDetailsPodTemplate';

type WorkspaceDetailsProps = {
workspace: Workspace;
Expand Down Expand Up @@ -48,43 +49,85 @@ export const WorkspaceDetails: React.FunctionComponent<WorkspaceDetailsProps> =
<DrawerCloseButton onClick={onCloseClick} />
</DrawerActions>
</DrawerHead>

<DrawerPanelBody>
<Tabs activeKey={activeTabKey} onSelect={handleTabClick}>
<Tab eventKey={0} title={<TabTitleText>Overview</TabTitleText>} aria-label="Overview">
<TabContent id="overviewSectionBodyPadding">
<TabContentBody hasPadding>
<WorkspaceDetailsOverview workspace={workspace} />
</TabContentBody>
</TabContent>
</Tab>
<Tab
eventKey={0}
title={<TabTitleText>Overview</TabTitleText>}
tabContentId="overviewTabContent"
aria-label="Overview"
/>
<Tab
eventKey={1}
title={<TabTitleText>Activity</TabTitleText>}
tabContentId="activityTabContent"
aria-label="Activity"
data-testid="activityTab"
>
<TabContent id="activitySectionBodyPadding">
<TabContentBody hasPadding>
<WorkspaceDetailsActivity workspace={workspace} />
</TabContentBody>
</TabContent>
</Tab>
<Tab eventKey={2} title={<TabTitleText>Logs</TabTitleText>} aria-label="Logs">
<TabContent id="logsSectionBodyPadding">
<TabContentBody hasPadding>Logs</TabContentBody>
</TabContent>
</Tab>
/>
<Tab
eventKey={2}
title={<TabTitleText>Logs</TabTitleText>}
tabContentId="logsTabContent"
aria-label="Logs"
/>
<Tab
eventKey={3}
title={<TabTitleText>Pod template</TabTitleText>}
tabContentId="podTemplateTabContent"
aria-label="Pod template"
>
<TabContent id="podTemplateBodyPadding">
<TabContentBody hasPadding>Pod template</TabContentBody>
</TabContent>
</Tab>
/>
</Tabs>
</DrawerPanelBody>

<DrawerPanelBody>
<TabContent
key={0}
eventKey={0}
id="overviewTabContent"
activeKey={activeTabKey}
hidden={activeTabKey !== 0}
>
<TabContentBody hasPadding>
<WorkspaceDetailsOverview workspace={workspace} />
</TabContentBody>
</TabContent>

<TabContent
key={1}
eventKey={1}
id="activityTabContent"
activeKey={activeTabKey}
hidden={activeTabKey !== 1}
>
<TabContentBody hasPadding>
<WorkspaceDetailsActivity workspace={workspace} />
</TabContentBody>
</TabContent>

<TabContent
key={2}
eventKey={2}
id="logsTabContent"
activeKey={activeTabKey}
hidden={activeTabKey !== 2}
>
<TabContentBody hasPadding>Logs</TabContentBody>
</TabContent>

<TabContent
key={3}
style={{ height: '100%' }}
eventKey={3}
id="podTemplateTabContent"
activeKey={activeTabKey}
hidden={activeTabKey !== 3}
>
<TabContentBody style={{ height: '100%' }} hasPadding>
<WorkspaceDetailsPodTemplate />
</TabContentBody>
</TabContent>
</DrawerPanelBody>
</DrawerPanelContent>
);
};
Loading