Skip to content

Commit

Permalink
优化主题
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyofx committed Sep 21, 2023
1 parent f680f50 commit 12f8a5a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ export default defineConfig({
nodeModulesTransform: {
type: 'none',
},
mfsu: {},
// mfsu: {},
webpack5: {},
exportStatic: {},
define: {
Expand Down
9 changes: 4 additions & 5 deletions src/config/defaultSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,21 @@ const Settings: LayoutSettings & {
pwa?: boolean;
logo?: string;
} = {
navTheme: 'dark',
primaryColor: '#722ED1',
navTheme: 'realDark',
primaryColor: '#FAAD14',
layout: 'mix',
contentWidth: 'Fluid',
fixedHeader: false,
fixedHeader: true,
fixSiderbar: true,
colorWeak: false,
headerHeight:36,
headerHeight:43,
title: 'KubeLilin',
pwa: false,
logo: '/icon.svg',
iconfontUrl: '',
menu: {
locale: false,
defaultOpenAll: true,

}
};

Expand Down
2 changes: 1 addition & 1 deletion src/src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"short_name": "Ant Design Pro",
"display": "standalone",
"start_url": "./?utm_source=homescreen",
"theme_color": "#002140",
"theme_color": "#FAAD14",
"background_color": "#001529",
"icons": [
{
Expand Down
20 changes: 10 additions & 10 deletions src/src/pages/applications/apps/apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ const Apps: React.FC = () => {
const [appName, appNamehandler] = useState<string>("");
const [repoOptions, repoOptionsHandler] = useState<any>([{ label: '公开', value: 0 }]);
const columns: ProColumns<ApplicationItem>[] = [
{
title: 'id',
dataIndex: 'id',
width: 48,
hideInForm: true,
hideInSearch: true
},
// {
// title: 'id',
// dataIndex: 'id',
// width: 48,
// hideInForm: true,
// hideInSearch: true
// },
{
title: '应用名称',
dataIndex: 'name',
Expand All @@ -49,7 +49,7 @@ const Apps: React.FC = () => {
hideInSearch: true
},
{
title: "部署环境",
title: "部署",
dataIndex: 'deployCount',
},
{
Expand All @@ -59,7 +59,7 @@ const Apps: React.FC = () => {
let arr = record.labels.split(" ");
let tagList=[]
for (let item of arr) {
tagList.push(<Tag color='#87d068' >{item}</Tag>)
tagList.push(<Tag >{item}</Tag>)
}
return tagList;
}
Expand Down Expand Up @@ -104,7 +104,7 @@ const Apps: React.FC = () => {
title: '操作',
valueType: 'option',
render: (text, record, _, action) => [
<Link key={"link-id" + record.id} to={'/applications/info?id=' + record.id + '&name=' + record.name}>进入应用</Link>,
// <Link key={"link-id" + record.id} to={'/applications/info?id=' + record.id + '&name=' + record.name}>进入应用</Link>,
<Button key={"edit" + record.id} onClick={() => {
formVisibleHandler(true)
editHandler(true)
Expand Down
5 changes: 3 additions & 2 deletions src/src/pages/resources/pods/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const Pods: React.FC = (props) => {
},
{
title: 'CPU资源',
width: 200,
width: 150,
search: false,
render: (_, row) => {
const cpuUsage = row.usage.cpu
Expand All @@ -166,6 +166,7 @@ const Pods: React.FC = (props) => {
})

let cpuUsagePercentage =(cpuUsage / cpuLimits) * 100
cpuUsagePercentage = Math.round(cpuUsagePercentage * 100) / 100
// return <span style={{color:'green'}}>CPU:{(row.usage.cpu * 1000).toFixed(1)}m / 内存:{(row.usage.memory / 1024/1024).toFixed(1)} Mi</span>
return <Tooltip title={`CPU Usage: ${cpuUsage} Core / Request: ${cpuRequests} Core / Limit: ${cpuLimits} Core `}>
<Progress percent={cpuUsagePercentage} />
Expand All @@ -175,7 +176,7 @@ const Pods: React.FC = (props) => {
{
title: '内存资源',
search: false,
width: 200,
width: 150,
render: (_, row) => {
const memoryUsage = row.usage.memory

Expand Down

0 comments on commit 12f8a5a

Please sign in to comment.