fix(style): layout content padding
This commit is contained in:
@@ -291,6 +291,10 @@ export default (props: any) => {
|
|||||||
title={userConfig.title}
|
title={userConfig.title}
|
||||||
navTheme="light"
|
navTheme="light"
|
||||||
layout="side"
|
layout="side"
|
||||||
|
contentStyle={{
|
||||||
|
paddingBlock: 0,
|
||||||
|
paddingInline: 0
|
||||||
|
}}
|
||||||
openKeys={false}
|
openKeys={false}
|
||||||
disableMobile={true}
|
disableMobile={true}
|
||||||
header={{
|
header={{
|
||||||
|
|||||||
@@ -8,7 +8,10 @@ const AccessPage: React.FC = () => {
|
|||||||
<PageContainer
|
<PageContainer
|
||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: 'permission example'
|
title: 'permission example',
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Access accessible={access.canSeeAdmin}>
|
<Access accessible={access.canSeeAdmin}>
|
||||||
|
|||||||
@@ -182,7 +182,10 @@ const APIKeys: React.FC = () => {
|
|||||||
<PageContainer
|
<PageContainer
|
||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: intl.formatMessage({ id: 'apikeys.title' })
|
title: intl.formatMessage({ id: 'apikeys.title' }),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
extra={[]}
|
extra={[]}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -8,7 +8,15 @@ const Dashboard: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageContainer ghost extra={[]}>
|
<PageContainer
|
||||||
|
ghost
|
||||||
|
extra={[]}
|
||||||
|
header={{
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
<DashboardInner setLoading={setLoading} />
|
<DashboardInner setLoading={setLoading} />
|
||||||
</Spin>
|
</Spin>
|
||||||
|
|||||||
@@ -208,6 +208,9 @@ const Catalog: React.FC = () => {
|
|||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: intl.formatMessage({ id: 'menu.modelCatalog' }),
|
title: intl.formatMessage({ id: 'menu.modelCatalog' }),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
},
|
||||||
breadcrumb: {}
|
breadcrumb: {}
|
||||||
}}
|
}}
|
||||||
extra={[]}
|
extra={[]}
|
||||||
|
|||||||
@@ -75,6 +75,24 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
|||||||
}) => {
|
}) => {
|
||||||
const intl = useIntl();
|
const intl = useIntl();
|
||||||
|
|
||||||
|
const distributeCols = [
|
||||||
|
{
|
||||||
|
title: 'Worker',
|
||||||
|
key: 'worker_name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'IP',
|
||||||
|
key: 'worker_ip',
|
||||||
|
render: ({ row }: { row: ModelInstanceListItem }) => {
|
||||||
|
return row.port ? `${row.worker_ip}:${row.port}` : row.worker_ip;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: intl.formatMessage({ id: 'models.table.gpuindex' }),
|
||||||
|
key: 'gpu_index'
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
const renderWorkerInfo = (item: ModelInstanceListItem) => {
|
const renderWorkerInfo = (item: ModelInstanceListItem) => {
|
||||||
let workerIp = '-';
|
let workerIp = '-';
|
||||||
if (item.worker_ip) {
|
if (item.worker_ip) {
|
||||||
|
|||||||
@@ -835,6 +835,9 @@ const Models: React.FC<ModelsProps> = ({
|
|||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: intl.formatMessage({ id: 'models.title' }),
|
title: intl.formatMessage({ id: 'models.title' }),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
},
|
||||||
breadcrumb: {}
|
breadcrumb: {}
|
||||||
}}
|
}}
|
||||||
extra={[]}
|
extra={[]}
|
||||||
|
|||||||
@@ -280,6 +280,7 @@ const Models: React.FC = () => {
|
|||||||
setCatalogList(resultList || []);
|
setCatalogList(resultList || []);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// ignore
|
// ignore
|
||||||
|
setCatalogList([]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getCataLogList();
|
getCataLogList();
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ const PlaygroundEmbedding: React.FC = () => {
|
|||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: intl.formatMessage({ id: 'menu.playground.embedding' }),
|
title: intl.formatMessage({ id: 'menu.playground.embedding' }),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
},
|
||||||
breadcrumb: {}
|
breadcrumb: {}
|
||||||
}}
|
}}
|
||||||
extra={renderExtra()}
|
extra={renderExtra()}
|
||||||
|
|||||||
@@ -168,6 +168,9 @@ const TextToImages: React.FC = () => {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
},
|
||||||
breadcrumb: {}
|
breadcrumb: {}
|
||||||
}}
|
}}
|
||||||
extra={renderExtra()}
|
extra={renderExtra()}
|
||||||
|
|||||||
@@ -165,6 +165,9 @@ const Playground: React.FC = () => {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
},
|
||||||
breadcrumb: {}
|
breadcrumb: {}
|
||||||
}}
|
}}
|
||||||
extra={renderExtra()}
|
extra={renderExtra()}
|
||||||
|
|||||||
@@ -102,6 +102,9 @@ const PlaygroundRerank: React.FC = () => {
|
|||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: intl.formatMessage({ id: 'menu.playground.rerank' }),
|
title: intl.formatMessage({ id: 'menu.playground.rerank' }),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
},
|
||||||
breadcrumb: {}
|
breadcrumb: {}
|
||||||
}}
|
}}
|
||||||
extra={renderExtra()}
|
extra={renderExtra()}
|
||||||
|
|||||||
@@ -211,6 +211,9 @@ const Playground: React.FC = () => {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
},
|
||||||
breadcrumb: {}
|
breadcrumb: {}
|
||||||
}}
|
}}
|
||||||
extra={renderExtra()}
|
extra={renderExtra()}
|
||||||
|
|||||||
@@ -37,7 +37,10 @@ const Profile: React.FC = () => {
|
|||||||
<PageContainer
|
<PageContainer
|
||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: intl.formatMessage({ id: 'users.form.updatepassword' })
|
title: intl.formatMessage({ id: 'users.form.updatepassword' }),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
extra={[]}
|
extra={[]}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { PageContainer } from '@ant-design/pro-components';
|
import { PageContainer } from '@ant-design/pro-components';
|
||||||
import { useIntl } from '@umijs/max';
|
import { useIntl } from '@umijs/max';
|
||||||
import type { TabsProps } from 'antd';
|
import type { TabsProps } from 'antd';
|
||||||
import { Tabs } from 'antd';
|
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
import GPUs from './components/gpus';
|
import GPUs from './components/gpus';
|
||||||
import Workers from './components/workers';
|
import Workers from './components/workers';
|
||||||
@@ -32,20 +31,22 @@ const Resources = () => {
|
|||||||
<PageContainer
|
<PageContainer
|
||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: intl.formatMessage({ id: 'resources.title' })
|
title: intl.formatMessage({ id: 'resources.title' }),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
tabList={items}
|
||||||
|
onTabChange={handleChangeTab}
|
||||||
|
tabActiveKey={activeKey}
|
||||||
|
tabProps={{
|
||||||
|
type: 'card',
|
||||||
|
style: {
|
||||||
|
marginTop: 78
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
extra={[]}
|
extra={[]}
|
||||||
>
|
></PageContainer>
|
||||||
<div style={{ marginTop: 30 }}>
|
|
||||||
<Tabs
|
|
||||||
type="card"
|
|
||||||
defaultActiveKey="workers"
|
|
||||||
items={items}
|
|
||||||
accessKey={activeKey}
|
|
||||||
onChange={handleChangeTab}
|
|
||||||
></Tabs>
|
|
||||||
</div>
|
|
||||||
</PageContainer>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,15 @@ const Dashboard: React.FC = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PageContainer ghost extra={[]}>
|
<PageContainer
|
||||||
|
ghost
|
||||||
|
extra={[]}
|
||||||
|
header={{
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Spin spinning={loading}>
|
<Spin spinning={loading}>
|
||||||
<DashboardInner setLoading={setLoading} />
|
<DashboardInner setLoading={setLoading} />
|
||||||
</Spin>
|
</Spin>
|
||||||
|
|||||||
@@ -242,7 +242,10 @@ const Users: React.FC = () => {
|
|||||||
<PageContainer
|
<PageContainer
|
||||||
ghost
|
ghost
|
||||||
header={{
|
header={{
|
||||||
title: intl.formatMessage({ id: 'users.title' })
|
title: intl.formatMessage({ id: 'users.title' }),
|
||||||
|
style: {
|
||||||
|
paddingInline: 'var(--layout-content-inlinepadding)'
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
extra={[]}
|
extra={[]}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user