diff --git a/src/assets/images/bg-5.png b/src/assets/images/bg-5.png
new file mode 100644
index 00000000..a494136a
Binary files /dev/null and b/src/assets/images/bg-5.png differ
diff --git a/src/assets/images/bg-6.png b/src/assets/images/bg-6.png
new file mode 100644
index 00000000..b5c82747
Binary files /dev/null and b/src/assets/images/bg-6.png differ
diff --git a/src/assets/images/bg-7.png b/src/assets/images/bg-7.png
new file mode 100644
index 00000000..03367dac
Binary files /dev/null and b/src/assets/images/bg-7.png differ
diff --git a/src/assets/images/bg-8.png b/src/assets/images/bg-8.png
new file mode 100644
index 00000000..09d62af9
Binary files /dev/null and b/src/assets/images/bg-8.png differ
diff --git a/src/assets/images/bg.png b/src/assets/images/bg.png
new file mode 100644
index 00000000..de7f0623
Binary files /dev/null and b/src/assets/images/bg.png differ
diff --git a/src/components/card-wrapper/index.less b/src/components/card-wrapper/index.less
new file mode 100644
index 00000000..1f8a2457
--- /dev/null
+++ b/src/components/card-wrapper/index.less
@@ -0,0 +1,5 @@
+.cardWrapper {
+ border-radius: 20px;
+ background-color: var(--color-white-1);
+ box-shadow: var(--box-shadow-base);
+}
diff --git a/src/components/card-wrapper/index.tsx b/src/components/card-wrapper/index.tsx
new file mode 100644
index 00000000..ba65db47
--- /dev/null
+++ b/src/components/card-wrapper/index.tsx
@@ -0,0 +1,8 @@
+import styles from './index.less';
+
+const CardWrapper = (props: any) => {
+ const { children } = props;
+ return
{children}
;
+};
+
+export default CardWrapper;
diff --git a/src/components/charts/column-bar.tsx b/src/components/charts/column-bar.tsx
index cee60d98..2f1a4d2d 100644
--- a/src/components/charts/column-bar.tsx
+++ b/src/components/charts/column-bar.tsx
@@ -17,6 +17,12 @@ const BarChart: React.FC = (props) => {
direction: 'vertical',
height,
group: true,
+ scale: {
+ x: {
+ type: 'band',
+ padding: 0.5
+ }
+ },
legend: {
color: {
position: 'top',
@@ -27,7 +33,11 @@ const BarChart: React.FC = (props) => {
},
axis: {
x: {
- xAxis: true
+ xAxis: true,
+ tick: false
+ },
+ y: {
+ tick: false
}
},
title: {
@@ -48,9 +58,10 @@ const BarChart: React.FC = (props) => {
},
style: {
- fill: '#54cc98',
- radiusTopLeft: 8,
- radiusTopRight: 8,
+ fill: 'linear-gradient(90deg,rgba(84, 204, 152,0.8) 0%,rgb(0, 168, 143,.7) 100%)',
+ radiusTopLeft: 12,
+ radiusTopRight: 12,
+ align: 'center',
width: 30
}
};
diff --git a/src/components/charts/gauge.tsx b/src/components/charts/gauge.tsx
index 1b6cca2e..817e06ae 100644
--- a/src/components/charts/gauge.tsx
+++ b/src/components/charts/gauge.tsx
@@ -16,6 +16,19 @@ const GaugeChart: React.FC = (props) => {
const config = {
width,
height,
+ box: {
+ padding: [0, 0, 0, 0],
+ style: {
+ padding: [0, 0, 0, 0]
+ }
+ },
+ guide: {
+ arc: {
+ style: {
+ lineWidth: 30
+ }
+ }
+ },
autoFit: true,
data: {
target,
diff --git a/src/components/charts/h-bar.tsx b/src/components/charts/h-bar.tsx
index 12edd9fc..11f17159 100644
--- a/src/components/charts/h-bar.tsx
+++ b/src/components/charts/h-bar.tsx
@@ -8,7 +8,7 @@ interface BarChartProps {
height?: number;
}
const BarChart: React.FC = (props) => {
- const { data, xField, yField, title, height = 300 } = props;
+ const { data, xField, yField, title, height } = props;
const config = {
data,
xField,
@@ -25,9 +25,19 @@ const BarChart: React.FC = (props) => {
}
}
},
+ scale: {
+ x: {
+ type: 'band',
+ padding: 0.5
+ }
+ },
axis: {
x: {
- xAxis: true
+ xAxis: true,
+ tick: false
+ },
+ y: {
+ tick: false
}
},
title: {
@@ -39,18 +49,16 @@ const BarChart: React.FC = (props) => {
split: {
type: 'line',
line: {
- color: 'red',
style: {
- color: 'red',
lineDash: [4, 5]
}
}
},
-
+ markBackground: {},
style: {
- fill: '#54cc98',
- radiusTopLeft: 8,
- radiusTopRight: 8,
+ fill: 'linear-gradient(180deg,rgba(84, 204, 152,0.8) 0%,rgb(0, 168, 143,.7) 100%)',
+ radiusTopLeft: 12,
+ radiusTopRight: 12,
height: 30
}
};
diff --git a/src/components/charts/line-chart.tsx b/src/components/charts/line-chart.tsx
index aea2ec27..0020ef36 100644
--- a/src/components/charts/line-chart.tsx
+++ b/src/components/charts/line-chart.tsx
@@ -16,7 +16,7 @@ const LineChart: React.FC = (props) => {
height,
xField: xField || 'time',
yField: yField || 'value',
- color: color || ['red', 'blue', 'green'],
+ color: color || ['red', 'blue', 'green', 'yellow'],
colorField: 'type',
autoFit: true,
slider,
@@ -26,12 +26,15 @@ const LineChart: React.FC = (props) => {
textStyle: {
autoRoate: true
}
+ },
+ y: {
+ tick: false
}
},
- point: {
- shapeField: 'circle',
- sizeField: 2
- },
+ // point: {
+ // shapeField: 'circle',
+ // sizeField: 2
+ // },
style: {
lineWidth: 1.5
},
diff --git a/src/components/glass-bg/index.less b/src/components/glass-bg/index.less
new file mode 100644
index 00000000..5b338e4a
--- /dev/null
+++ b/src/components/glass-bg/index.less
@@ -0,0 +1,39 @@
+.g-polygon {
+ position: absolute;
+ opacity: 0.5;
+}
+
+.g-polygon-1 {
+ // 定位代码,容器高宽随意
+ background: #fe5;
+ clip-path: polygon(0 10%, 30% 0, 100% 40%, 70% 100%, 20% 90%);
+ width: 50%;
+ height: 50%;
+}
+
+.g-polygon-2 {
+ // 定位代码,容器高宽随意
+ background: #e950d1;
+ clip-path: polygon(10% 0, 100% 70%, 100% 100%, 20% 90%);
+ width: 50%;
+ height: 50%;
+}
+
+.g-polygon-3 {
+ // 定位代码,容器高宽随意
+ background: rgba(87, 80, 233);
+ clip-path: polygon(80% 0, 100% 70%, 100% 100%, 20% 90%);
+ width: 50%;
+ height: 50%;
+}
+
+.g-bg::before {
+ content: '';
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ backdrop-filter: blur(150px);
+ z-index: 1;
+}
diff --git a/src/components/glass-bg/index.tsx b/src/components/glass-bg/index.tsx
new file mode 100644
index 00000000..0dd4374e
--- /dev/null
+++ b/src/components/glass-bg/index.tsx
@@ -0,0 +1,13 @@
+import './index.less';
+
+const GlassBg = () => {
+ return (
+
+ );
+};
+
+export default GlassBg;
diff --git a/src/global.less b/src/global.less
index 872239da..141cff53 100644
--- a/src/global.less
+++ b/src/global.less
@@ -7,10 +7,11 @@ html {
// --color-fill-1: #f3f6fa;
--color-fill-2: #fff;
--color-fill-3: #f3f6fa;
- --menu-border-radius-base: 32px;
+ --menu-border-radius-base: 20px;
--border-radius-base: 16px;
+ --border-radius-middle: 20px;
--border-radius-small: 8px;
- --color-white-1: #fff;
+ --color-white-1: rgba(255, 255, 255, 75%);
--font-weight-normal: 500;
--font-weight-bold: 700;
--color-text-1: var(--ant-color-text);
@@ -19,7 +20,7 @@ html {
--font-size-large: 16px;
--font-size-middle: 14px;
--ant-color-fill-secondary: rgba(0, 0, 0, 6%);
- --table-td-radius: 24px;
+ --table-td-radius: 20px;
--checkbox-border-radius: 4px;
--ant-table-cell-padding-inline: 16px;
--ant-table-cell-padding-block: 16px;
@@ -36,6 +37,7 @@ html {
--ant-input-active-shadow: 0 0 0 2px rgba(5, 255, 105, 6%);
--ant-input-active-border-color: #2fbf85;
--ant-input-hover-border-color: #54cc98;
+ --box-shadow-base: 0 4px 12px rgb(227, 232, 240);
.css-var-rf {
--ant-font-size: var(--font-size-base);
@@ -67,6 +69,7 @@ html {
--ant-border-radius-lg: 16px;
--ant-color-error: #ff4d4f;
--ant-color-bg-mask: rgba(0, 0, 0, 35%);
+ --ant-color-border: rgb(217 217 217 / 50%);
&.ant-popover {
--ant-popover-inner-padding: 26px;
@@ -222,12 +225,43 @@ body {
font-size: 16px;
}
}
+
+ // ============== new theme style start ===============
+ .ant-pro-layout {
+ background-color: var(--color-fill-1);
+ height: 100%;
+
+ .ant-pro-sider .ant-layout-sider-children {
+ background-color: var(--color-white-1);
+ box-shadow: var(--box-shadow-base);
+ }
+ }
+
+ .ant-table-wrapper .ant-table {
+ background-color: unset;
+ }
+
+ .ant-table-content table {
+ .ant-table-thead > tr > th {
+ background-color: unset;
+ }
+
+ .ant-table-tbody {
+ .ant-table-row {
+ border-radius: var(--table-td-radius);
+ background-color: var(--color-white-1);
+ box-shadow: var(--box-shadow-base);
+
+ > td {
+ background-color: unset;
+ }
+ }
+ }
+ }
+
+ // ============== new theme style end =================
}
-// ======== basic layout style start============
-
-// ======== basic layout style end ============
-
// ======== menu style start ============
.ant-pro-sider-collapsed-button {
display: none;
@@ -250,7 +284,7 @@ body {
}
.ant-pro-layout-container {
- background-color: var(--color-fill-2);
+ // background-color: var(--color-fill-2);
}
.ant-pro-sider {
@@ -275,20 +309,35 @@ body {
.monaco-editor {
border-radius: 16px;
}
-// .background {
-// position: fixed;
-// top: 0;
-// left: 0;
-// bottom: 0;
-// right: 0;
-// background: radial-gradient(
-// circle,
-// rgba(47, 191, 133, 0.02),
-// rgba(55, 125, 184, 0.2)
-// );
-// filter: blur(100px);
-// height: 100%;
-// }
+
+.background {
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ // background: radial-gradient(
+ // circle,
+ // rgba(47, 191, 133, 0.02),
+ // rgba(55, 125, 184, 0.2)
+ // );
+ background: url('./assets/images/bg.png') center center no-repeat;
+ background-size: cover;
+
+ &::after {
+ content: '';
+ position: fixed;
+ top: 0;
+ left: 0;
+ bottom: 0;
+ right: 0;
+ z-index: 1;
+ backdrop-filter: blur(100px);
+ filter: blur(100px);
+ height: 100%;
+ }
+}
+
.ant-pro-page-container {
background: transparent;
}
diff --git a/src/pages/dashboard/components/active-table.tsx b/src/pages/dashboard/components/active-table.tsx
index 6c4b40e6..f3f40693 100644
--- a/src/pages/dashboard/components/active-table.tsx
+++ b/src/pages/dashboard/components/active-table.tsx
@@ -1,4 +1,4 @@
-import ContentWrapper from '@/components/content-wrapper';
+// import div from '@/components/content-wrapper';
import PageTools from '@/components/page-tools';
import { Col, Row, Table } from 'antd';
@@ -131,7 +131,7 @@ const projectData = [
];
const ActiveTable = () => {
return (
-
+
{
}
right={false}
/>
-
+
{
}
right={false}
/>
-
+
);
diff --git a/src/pages/dashboard/components/over-view.less b/src/pages/dashboard/components/over-view.less
index 67bdaae2..b0fe020e 100644
--- a/src/pages/dashboard/components/over-view.less
+++ b/src/pages/dashboard/components/over-view.less
@@ -3,6 +3,8 @@
height: 110px;
display: flex;
justify-content: space-around;
+ box-shadow: var(--box-shadow-base);
+ border-radius: var(--ant-border-radius-lg);
}
}
diff --git a/src/pages/dashboard/components/over-view.tsx b/src/pages/dashboard/components/over-view.tsx
index ddd22dec..22d2d833 100644
--- a/src/pages/dashboard/components/over-view.tsx
+++ b/src/pages/dashboard/components/over-view.tsx
@@ -1,4 +1,3 @@
-import ContentWrapper from '@/components/content-wrapper';
import { Card, Col, Row, Space } from 'antd';
import React from 'react';
import { overviewConfigs } from '../config';
@@ -63,7 +62,7 @@ const Overview: React.FC = (props) => {
);
};
return (
-
+
{overviewConfigs.map((config, index) => (
@@ -75,7 +74,7 @@ const Overview: React.FC = (props) => {
))}
-
+
);
};
diff --git a/src/pages/dashboard/components/resource-utilization.tsx b/src/pages/dashboard/components/resource-utilization.tsx
index 3b7c94b2..39fc7ade 100644
--- a/src/pages/dashboard/components/resource-utilization.tsx
+++ b/src/pages/dashboard/components/resource-utilization.tsx
@@ -52,6 +52,7 @@ const UtilizationOvertime: React.FC = () => {
data.push({
time: timeList[i],
type: typeList[j],
+ color: 'red',
value: _.get(mockData, typeList[j])[i]
});
}
diff --git a/src/pages/dashboard/components/system-load.tsx b/src/pages/dashboard/components/system-load.tsx
index d93a9481..bcec3c96 100644
--- a/src/pages/dashboard/components/system-load.tsx
+++ b/src/pages/dashboard/components/system-load.tsx
@@ -1,20 +1,24 @@
+import CardWrapper from '@/components/card-wrapper';
import GaugeChart from '@/components/charts/gauge';
import PageTools from '@/components/page-tools';
-import { PageContainer } from '@ant-design/pro-components';
import { Col, DatePicker, Row } from 'antd';
import ResourceUtilization from './resource-utilization';
const SystemLoad = () => {
+ const colors = [
+ 'rgba(84, 204, 152,.8)',
+ 'rgba(255, 214, 102,.8)',
+ 'rgba(255, 120, 117,.8)'
+ ];
const handleSelectDate = (date: string) => {
console.log('dateString============', date);
};
return (
-
+
System Load
@@ -24,51 +28,61 @@ const SystemLoad = () => {
}
/>
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
-
+
+
+
+
-
+
);
};
diff --git a/src/pages/dashboard/components/usage.tsx b/src/pages/dashboard/components/usage.tsx
index 7a89476e..d7580e69 100644
--- a/src/pages/dashboard/components/usage.tsx
+++ b/src/pages/dashboard/components/usage.tsx
@@ -1,6 +1,6 @@
+import CardWrapper from '@/components/card-wrapper';
import ColumnBar from '@/components/charts/column-bar';
import HBar from '@/components/charts/h-bar';
-import ContentWrapper from '@/components/content-wrapper';
import PageTools from '@/components/page-tools';
import { generateRandomArray } from '@/utils';
import { Col, DatePicker, Row } from 'antd';
@@ -86,9 +86,11 @@ const tokenUsage = TokensData.map((val, i) => {
});
const Usage = () => {
+ const bgColor = '#fff';
const handleSelectDate = (dateString: string) => {
console.log('dateString============', dateString);
};
+
return (
<>
{
}
/>
-
-
-
+
+
+
{
yField="value"
height={360}
>
-
+
-
+
{
yField="value"
height={360}
>
-
+
-
-
-
+
+
+
-
+
-
+
-
+
>
diff --git a/src/pages/dashboard/config/index.ts b/src/pages/dashboard/config/index.ts
index b524fc4a..790e5e04 100644
--- a/src/pages/dashboard/config/index.ts
+++ b/src/pages/dashboard/config/index.ts
@@ -2,31 +2,31 @@ export const overviewConfigs = [
{
key: 'workers',
label: 'Workers',
- backgroundColor:
- 'linear-gradient(180deg, rgb(0 139 188 / 20%) 0%, rgba(40,207,181,.2) 100%)'
+ // backgroundColor: 'linear-gradient(135deg, #ffffff, rgb(232 249 240 / 60%))'
+ backgroundColor: 'var(--color-white-1)'
},
{
key: 'gpus',
label: 'Total GPUs',
- backgroundColor:
- 'linear-gradient(180deg, rgb(0 139 188 / 20%) 0%, rgba(40,207,181,.2) 100%)'
+ backgroundColor: 'var(--color-white-1)'
+ // backgroundColor: 'linear-gradient(135deg, #ffffff, rgb(232 249 240 / 60%))'
},
{
key: 'allocatedGpus',
label: 'Allocated GPUs',
- backgroundColor:
- 'linear-gradient(180deg, rgb(0 139 188 / 20%) 0%, rgba(40,207,181,.2) 100%)'
+ backgroundColor: 'var(--color-white-1)'
+ // backgroundColor: 'linear-gradient(135deg, #ffffff, rgb(232 249 240 / 60%))'
},
{
key: 'models',
label: 'Models',
- backgroundColor:
- 'linear-gradient(180deg, rgb(0 139 188 / 20%) 0%, rgba(40,207,181,.2) 100%)'
+ backgroundColor: 'var(--color-white-1)'
+ // backgroundColor: 'linear-gradient(135deg, #ffffff, rgb(232 249 240 / 60%))'
},
{
key: 'instances',
label: 'Instances',
- backgroundColor:
- 'linear-gradient(180deg, rgb(0 139 188 / 20%) 0%, rgba(40,207,181,.2) 100%)'
+ backgroundColor: 'var(--color-white-1)'
+ // backgroundColor: 'linear-gradient(135deg, #ffffff, rgb(232 249 240 / 60%))'
}
];
diff --git a/src/pages/dashboard/index.tsx b/src/pages/dashboard/index.tsx
index 6ebc44ce..03c17a3e 100644
--- a/src/pages/dashboard/index.tsx
+++ b/src/pages/dashboard/index.tsx
@@ -1,4 +1,3 @@
-import DividerLine from '@/components/divider-line';
import ActiveTable from './components/active-table';
import Overview from './components/over-view';
import SystemLoad from './components/system-load';
@@ -8,11 +7,11 @@ const Dashboard: React.FC = () => {
return (
<>
-
+ {/* */}
-
+ {/* */}
-
+ {/* */}
>
);
diff --git a/src/pages/playground/index.tsx b/src/pages/playground/index.tsx
index 52605e12..35bf7161 100644
--- a/src/pages/playground/index.tsx
+++ b/src/pages/playground/index.tsx
@@ -1,5 +1,4 @@
import { useSearchParams } from '@umijs/max';
-import { Divider } from 'antd';
import { useState } from 'react';
import GroundLeft from './components/ground-left';
import ParamsSettings from './components/params-settings';
@@ -30,9 +29,7 @@ const Playground: React.FC = () => {
-
+