From bf74334339db6a9e6c7532a68dcbda4f68805954 Mon Sep 17 00:00:00 2001 From: changelia Date: Fri, 31 May 2024 06:56:30 +0400 Subject: [PATCH 1/4] fix: pods navigation icon --- .../src/pages/Navigation/MainNavigation.tsx | 10 +++++-- .../Icon/Icons/components/Cloud.tsx | 26 +++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 apps/ui/src/share-ui/components/Icon/Icons/components/Cloud.tsx diff --git a/apps/ui/src/pages/Navigation/MainNavigation.tsx b/apps/ui/src/pages/Navigation/MainNavigation.tsx index bc20ba77..2a1ebfb0 100644 --- a/apps/ui/src/pages/Navigation/MainNavigation.tsx +++ b/apps/ui/src/pages/Navigation/MainNavigation.tsx @@ -35,7 +35,8 @@ import Tooltip from 'share-ui/components/Tooltip/Tooltip' import Chats from 'share-ui/components/Icon/Icons/components/Chats' import Integrations from 'share-ui/components/Icon/Icons/components/integrations' import FineTuning from 'share-ui/components/Icon/Icons/components/FineTuning' -import Book from 'share-ui/components/Icon/Icons/components/Book' +// eslint-disable-next-line import/no-named-as-default +import Cloud from 'share-ui/components/Icon/Icons/components/Cloud' const MainNavigation = ({ user }: { user: any }) => { const { getDomainConfig } = useDomainConfig() @@ -190,7 +191,7 @@ const MainNavigation = ({ user }: { user: any }) => { isActive={includes(active, 'pods')} onClick={() => onHandleClick('/pods')} > - + {includes(active, 'pods') && } @@ -344,6 +345,11 @@ const StyledSessionIcon = styled(Session)` fill: ${({ theme }) => theme.body.iconColor}; } ` +export const StyledCloudOutlineIcon = styled(Cloud)` + path { + fill: ${({ theme }) => theme.body.iconColor}; + } +` const StyledBottomSection = styled.div` margin-top: auto; diff --git a/apps/ui/src/share-ui/components/Icon/Icons/components/Cloud.tsx b/apps/ui/src/share-ui/components/Icon/Icons/components/Cloud.tsx new file mode 100644 index 00000000..bdae81a6 --- /dev/null +++ b/apps/ui/src/share-ui/components/Icon/Icons/components/Cloud.tsx @@ -0,0 +1,26 @@ +/* eslint-disable */ +/* tslint:disable */ +import * as React from 'react' +export interface Cloud extends React.SVGAttributes { + size?: string | number +} +const Cloud: React.FC = ({ size, ...props }) => ( + + + + + +) +Cloud.displayName = 'Book' +export default Cloud +/* tslint:enable */ +/* eslint-enable */ From 0e2db860951ceae3345618ab4923f479dc566cf3 Mon Sep 17 00:00:00 2001 From: changelia Date: Fri, 31 May 2024 06:57:00 +0400 Subject: [PATCH 2/4] feat: create pod button --- apps/ui/src/Route.tsx | 4 ++-- apps/ui/src/pages/Pods/MainPod.tsx | 36 ++++++++++++++++++++++++++++++ apps/ui/src/pages/Pods/index.ts | 3 ++- 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 apps/ui/src/pages/Pods/MainPod.tsx diff --git a/apps/ui/src/Route.tsx b/apps/ui/src/Route.tsx index 35a49207..cf6bd4e1 100644 --- a/apps/ui/src/Route.tsx +++ b/apps/ui/src/Route.tsx @@ -109,7 +109,7 @@ import EditScheduleModal from 'modals/EditScheduleModal' import VoiceOptionsModal from 'modals/VoiceOptionsModal' import LlmSettingsModal from 'modals/LlmSettingsModal' import { InviteUsers, CreateUserAccess } from 'pages/InviteUsers' -import { Pods, PodsContent } from 'pages/Pods' +import { Pods, PodsContent, MainPod } from 'pages/Pods' const Route = () => { const { loading } = useContext(AuthContext) @@ -414,7 +414,7 @@ const Route = () => { } key={document.location.href}> - {/* } key={document.location.href} /> */} + } key={document.location.href} /> } diff --git a/apps/ui/src/pages/Pods/MainPod.tsx b/apps/ui/src/pages/Pods/MainPod.tsx new file mode 100644 index 00000000..fb713245 --- /dev/null +++ b/apps/ui/src/pages/Pods/MainPod.tsx @@ -0,0 +1,36 @@ +import styled from 'styled-components' +import { buttonStyles } from './styles' +import Button from '@mui/material/Button' +import { useNavigate } from 'react-router-dom' + + +const MainPod = () => { + const navigate = useNavigate() + + return ( + + + + ) +} + +export default MainPod + +const StyledContainer = styled.div` + width: 100%; + height: 100vh; + display: flex; + justify-content: center; + align-items: center; +` \ No newline at end of file diff --git a/apps/ui/src/pages/Pods/index.ts b/apps/ui/src/pages/Pods/index.ts index c60760d7..4ca43647 100644 --- a/apps/ui/src/pages/Pods/index.ts +++ b/apps/ui/src/pages/Pods/index.ts @@ -1,2 +1,3 @@ export { default as Pods } from './Pods' -export { default as PodsContent } from './PodsContent' \ No newline at end of file +export { default as PodsContent } from './PodsContent' +export { default as MainPod } from './MainPod' \ No newline at end of file From b7fff22aa867f4e6a8068424d5f31ebcbc2e5df3 Mon Sep 17 00:00:00 2001 From: changelia Date: Fri, 31 May 2024 06:57:23 +0400 Subject: [PATCH 3/4] fix: pod content --- apps/ui/src/pages/Pods/Details.tsx | 6 +++--- apps/ui/src/pages/Pods/Pods.tsx | 20 ++++++++++---------- apps/ui/src/pages/Pods/PodsContent.tsx | 19 +++++++++++++++++-- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/apps/ui/src/pages/Pods/Details.tsx b/apps/ui/src/pages/Pods/Details.tsx index 2e799db1..65bd6819 100644 --- a/apps/ui/src/pages/Pods/Details.tsx +++ b/apps/ui/src/pages/Pods/Details.tsx @@ -68,7 +68,7 @@ const Details = () => { - + { ml={3} > - RunPod Pytorch 2.0.1 + Pytorch 2.0.1 - runpod/pytorch:2.0.1-py3.10-cuda11.8.0-devel-ubuntu22.04 + pytorch:2.0.1-py3.10-cuda11.8.0-devel-ubuntu22.04 diff --git a/apps/ui/src/pages/Pods/Pods.tsx b/apps/ui/src/pages/Pods/Pods.tsx index 42949b81..b6232ad7 100644 --- a/apps/ui/src/pages/Pods/Pods.tsx +++ b/apps/ui/src/pages/Pods/Pods.tsx @@ -12,12 +12,12 @@ import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; const cpu = [ - { cpu: 'runpod/base:0.5.1-cpu', ram: '46 GB', running: true }, - { cpu: 'runpod/base:0.5.1-cpu', ram: '32 GB', running: false }, - { cpu: 'runpod/base:0.5.1-cpu', ram: '16 GB', running: true }, - { cpu: 'runpod/base:0.5.1-cpu', ram: '128 GB', running: false }, - { cpu: 'runpod/base:0.5.1-cpu', ram: '46 GB', running: false }, - { cpu: 'runpod/base:0.5.1-cpu', ram: '50 GB', running: true }, + { cpu: 'base:0.5.1-cpu', ram: '46 GB', running: true }, + { cpu: 'base:0.5.1-cpu', ram: '32 GB', running: false }, + { cpu: 'base:0.5.1-cpu', ram: '16 GB', running: true }, + { cpu: 'base:0.5.1-cpu', ram: '128 GB', running: false }, + { cpu: 'base:0.5.1-cpu', ram: '46 GB', running: false }, + { cpu: 'base:0.5.1-cpu', ram: '50 GB', running: true }, ] @@ -48,7 +48,7 @@ const Pods = () => { mt={1} sx={{ width: '100%', - background: 'rgb(217,217,217)', + background: 'rgba(217, 217, 217, 0.342)', borderStartStartRadius: '10px', borderEndStartRadius: '10px', cursor: 'pointer' @@ -73,10 +73,10 @@ const Pods = () => { - {item.running ? 'Running' : 'Stopped'} diff --git a/apps/ui/src/pages/Pods/PodsContent.tsx b/apps/ui/src/pages/Pods/PodsContent.tsx index e8931dd0..d89042c5 100644 --- a/apps/ui/src/pages/Pods/PodsContent.tsx +++ b/apps/ui/src/pages/Pods/PodsContent.tsx @@ -9,8 +9,9 @@ import Details from './Details' import FilterPods from './FilterPods' import Price from './Price' -import { chipStyles, borderBoxStyles } from './styles' +import { chipStyles, borderBoxStyles, buttonStyles } from './styles' import React from 'react'; +import Button from '@mui/material/Button' const Line = ({ label }: { label: string }) => { return ( @@ -51,7 +52,7 @@ const temp_data = { const PodsContent = () => { - const [selectPod, setSelectPod] = React.useState(1) + const [selectPod, setSelectPod] = React.useState(null) const data_keys = Object.keys(temp_data) return ( @@ -101,9 +102,23 @@ const PodsContent = () => { <>
+ + + + } + + ) From 27adc8002e0e1062419c4109f232538f9e4e0579 Mon Sep 17 00:00:00 2001 From: changelia Date: Fri, 31 May 2024 07:11:37 +0400 Subject: [PATCH 4/4] fix: pod detail --- apps/ui/src/pages/Pods/Details.tsx | 2 +- apps/ui/src/pages/Pods/PodsContent.tsx | 17 +---- apps/ui/src/pages/Pods/Price.tsx | 101 +++++++++++++++---------- 3 files changed, 64 insertions(+), 56 deletions(-) diff --git a/apps/ui/src/pages/Pods/Details.tsx b/apps/ui/src/pages/Pods/Details.tsx index 65bd6819..712661e7 100644 --- a/apps/ui/src/pages/Pods/Details.tsx +++ b/apps/ui/src/pages/Pods/Details.tsx @@ -24,7 +24,7 @@ const Details = () => { return ( { return ( @@ -60,7 +59,7 @@ const PodsContent = () => { { <>
- - - - } diff --git a/apps/ui/src/pages/Pods/Price.tsx b/apps/ui/src/pages/Pods/Price.tsx index eca50b40..44a5d965 100644 --- a/apps/ui/src/pages/Pods/Price.tsx +++ b/apps/ui/src/pages/Pods/Price.tsx @@ -1,56 +1,77 @@ import Box from '@mui/material/Box'; -import { borderBoxStyles } from './styles' +import { borderBoxStyles, buttonStyles } from './styles' import Typography from '@mui/material/Typography'; +import Button from '@mui/material/Button' const Price = () => { return ( - - - - - Pricing Summary - - - GPU Cost: $0.74 / hr - - - Running Disk Cost: $0.006 / hr - - - Exited Disk Cost: $0.006 / hr - + + + Pricing Summary + + + GPU Cost: $0.74 / hr + + + Running Disk Cost: $0.006 / hr + + + Exited Disk Cost: $0.006 / hr + + + + + Pricing Summary + + + GPU Cost: $0.74 / hr + + + Running Disk Cost: $0.006 / hr + + + Exited Disk Cost: $0.006 / hr + + + - - - Pricing Summary - - - GPU Cost: $0.74 / hr - - - Running Disk Cost: $0.006 / hr - - - Exited Disk Cost: $0.006 / hr - + + + + ) }