Unverified Commit 9ef3527d authored by zhu-mingye's avatar zhu-mingye Committed by GitHub

[Refactor][web] refactor some layout (#2022)

* refactor about page * refactor about page * refactor some layout
parent 268f085b
......@@ -76,25 +76,6 @@ export default [
},
],
},
//todo: data center will be merge to the registration center's datasource module , it will be removed in the future
// {
// path: '/datacenter',
// name: 'datacenter',
// icon: 'DatabaseOutlined',
// routes: [
// {
// path: '/datacenter',
// redirect: '/datacenter/metadata',
// },
// {
// path: '/datacenter/metadata',
// name: 'metadata',
// icon: 'DatabaseOutlined',
// // component: './DataCenter/MetaData',
// },
// ],
// },
{
path: '/registration',
name: 'registration',
......@@ -234,7 +215,7 @@ export default [
path: '/settings/systemlog',
name: 'systemlog',
icon: 'InfoCircleOutlined',
component: './SettingCenter/SystemInfo',
component: './SettingCenter/SystemLogs',
},
{
path: '/settings/process',
......@@ -260,7 +241,6 @@ export default [
},
{
path: '*',
layout: false,
component: './Other/404',
},
];
......@@ -215,8 +215,9 @@ ol {
height: 100%;
overflow-x: auto;
overflow-y: auto;
max-height: 70vh;
min-height: 70vh;
max-height: 82vh;
min-height: 82vh;
.ant-tree {
min-width: max-content;
......@@ -231,9 +232,14 @@ ol {
}
}
.gitCodeTree{
max-height: 70vh;
min-height: 70vh;
}
.schemaTree{
max-height: 90vh;
min-height: 90vh;
max-height: 89vh;
min-height: 89vh;
}
.code-content-empty {
......
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Alert, Typography} from 'antd';
import {l} from '@/utils/intl';
import React from 'react';
import {AlertRestProps, TypographyRestProps} from '@/pages/Other/About';
export const CommunityRules = () => {
return <>
<Alert
message={l('about.communityRules')}
type="success"
{...AlertRestProps}
/>
<Typography.Text {...TypographyRestProps}>
<ul>
<li>{l('about.communityRules.1')}</li>
<li>{l('about.communityRules.2')}</li>
<li>{l('about.communityRules.3')}</li>
<li>{l('about.communityRules.4')}</li>
<li>
<a href={'https://github.com/DataLinkDC/dinky/issues/66'} target={'_blank'} rel="noreferrer">
Issue
</a>
{l('about.communityRules.5')}
</li>
</ul>
</Typography.Text>
</>
}
......@@ -15,25 +15,19 @@
* limitations under the License.
*/
import {Tabs} from "antd";
import RootLogs from "@/pages/SettingCenter/SystemInfo/TagInfo/RootLogs";
import LogList from "@/pages/SettingCenter/SystemInfo/TagInfo/LogList";
const {TabPane} = Tabs;
const TagInfo = () => {
import {l} from '@/utils/intl';
import {Alert} from 'antd';
import React from 'react';
import {AlertRestProps} from '@/pages/Other/About';
export const Precautions = () => {
return <>
<Tabs >
<TabPane tab={" Root Logs "} key="logs">
<RootLogs/>
</TabPane>
<TabPane tab={" Log List "} key="logList">
<LogList/>
</TabPane>
</Tabs>
<Alert
message={l('about.precautions')}
description={l('about.wechatApply')}
type="warning"
{...AlertRestProps}
/>
</>;
};
export default TagInfo;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Alert, Image, Typography} from 'antd';
import {l} from '@/utils/intl';
import {VERSION} from '@/services/constants';
import {SmileOutlined} from '@ant-design/icons';
import React from 'react';
import {AlertRestProps, ImageRestProps, TypographyRestProps} from '@/pages/Other/About';
const { Paragraph } = Typography;
export const QRCode = () => {
return <>
<Alert
message={l('about.Community', '', { version: VERSION })}
type="success"
icon={<SmileOutlined />}
{...AlertRestProps}
/>
<Paragraph>
<Typography.Text
title={l('about.QQcode')}
{...TypographyRestProps}
>
<Image
title={l('about.QQcode')}
{...ImageRestProps}
src="community/qq.png"
/>
</Typography.Text>
<Typography.Text {...TypographyRestProps}>
<Image
title={l('about.wechatCode')}
{...ImageRestProps}
src="community/wechat.jpg"
/>
</Typography.Text>
<Typography.Text {...TypographyRestProps}>
<Image
title={l('about.dingTalkCode')}
{...ImageRestProps}
src="community/dingtalk.jpg"
/>
</Typography.Text>
</Paragraph>
</>
}
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Alert, Typography} from 'antd';
import {l} from '@/utils/intl';
import {LinkOutlined, SmileOutlined} from '@ant-design/icons';
import React from 'react';
import {AlertRestProps, TypographyRestProps} from '@/pages/Other/About';
const { Paragraph } = Typography;
export const UsingHelp = () => {
return <>
<Alert
message={l('about.usingHelp')}
icon={<SmileOutlined />}
type="info"
{...AlertRestProps}
/>
<Paragraph >
<Typography.Text {...TypographyRestProps}>
<LinkOutlined /> GitHub:
<a href={'https://github.com/DataLinkDC/dinky'} target={'_blank'} rel="noreferrer">
https://github.com/DataLinkDC/dinky
</a>
</Typography.Text>
<br />
<Typography.Text {...TypographyRestProps}>
<LinkOutlined /> Gitee:{' '}
<a href={'https://gitee.com/DataLinkDC/Dinky'} target={'_blank'} rel="noreferrer">
https://gitee.com/DataLinkDC/Dinky
</a>
</Typography.Text>
<br />
<Typography.Text {...TypographyRestProps}>
<LinkOutlined /> Document:{' '}
<a href={'http://www.dlink.top'} target={'_blank'} rel="noreferrer">
http://www.dlink.top
</a>
</Typography.Text>
<br />
<Typography.Text {...TypographyRestProps}>
<LinkOutlined /> bilibili:{' '}
<a href={'https://space.bilibili.com/366484959/video'} target={'_blank'} rel="noreferrer">
https://space.bilibili.com/366484959/video
</a>
</Typography.Text>
</Paragraph>
</>
}
......@@ -15,148 +15,64 @@
* limitations under the License.
*/
import { VERSION } from '@/services/constants';
import { l } from '@/utils/intl';
import { HeartOutlined, LinkOutlined, SmileOutlined } from '@ant-design/icons';
import { PageContainer } from '@ant-design/pro-components';
import { Alert, Card, Image, Typography } from 'antd';
import {PageContainer, ProCard} from '@ant-design/pro-components';
import React from 'react';
import {QRCode} from '@/pages/Other/About/components/QRCode';
import {UsingHelp} from '@/pages/Other/About/components/UsingHelp';
import {CommunityRules} from '@/pages/Other/About/components/CommunityRules';
import {Precautions} from './components/Precautions';
export const AlertRestProps = {
banner: true,
showIcon: true,
style: {
margin: -12,
marginBottom: 24,
}
};
export const ImageRestProps = {
height: 300,
width: 250,
};
export const TypographyRestProps = {
ellipsis: true,
strong: true,
style: {
marginRight: '2vw',
}
};
const { Paragraph } = Typography;
const About: React.FC = () => {
return (
return <>
<PageContainer title={false}>
<Card>
<Alert
message={l('about.Community', '', { version: VERSION })}
type="success"
icon={<SmileOutlined height={30} width={30} />}
showIcon
banner
style={{
margin: -12,
marginBottom: 24,
}}
/>
<Paragraph style={{ marginRight: 30 }}>
<Typography.Text
title={l('about.QQcode')}
style={{ marginRight: 80 }}
strong
ellipsis={true}
>
<Image
title={l('about.QQcode')}
height={300}
width={250}
src="community/qq.png"
/>
</Typography.Text>
<ProCard ghost split="vertical">
<ProCard wrap ghost colSpan="55%">
<ProCard>
<QRCode/>
</ProCard>
<ProCard>
<Precautions/>
</ProCard>
</ProCard>
<Typography.Text style={{ marginRight: 80 }} strong ellipsis={true}>
<Image
title={l('about.wechatCode')}
height={300}
width={250}
src="community/wechat.jpg"
/>
</Typography.Text>
<ProCard wrap ghost>
<ProCard>
<UsingHelp/>
</ProCard>
<Typography.Text strong ellipsis={true}>
<Image
title={l('about.dingTalkCode')}
height={300}
width={250}
src="community/dingtalk.jpg"
/>
</Typography.Text>
</Paragraph>
<br />
<ProCard>
<CommunityRules/>
</ProCard>
</ProCard>
</ProCard>
<Alert
message={l('about.precautions')}
description={l('about.wechatApply')}
type="warning"
showIcon
banner
style={{
margin: -12,
marginBottom: 24,
}}
/>
<br />
<br />
<Typography.Text strong>
<Alert
message={l('about.usingHelp')}
icon={<SmileOutlined />}
type="info"
showIcon
banner
style={{
margin: -12,
marginBottom: 24,
}}
/>
<Paragraph style={{ marginRight: 30 }}>
<Typography.Text ellipsis strong>
<LinkOutlined /> GitHub:
<a href={'https://github.com/DataLinkDC/dinky'} target={'_blank'}>
https://github.com/DataLinkDC/dinky
</a>
</Typography.Text>
<br />
<Typography.Text ellipsis strong>
<LinkOutlined /> Gitee:{' '}
<a href={'https://gitee.com/DataLinkDC/Dinky'} target={'_blank'}>
https://gitee.com/DataLinkDC/Dinky
</a>
</Typography.Text>
<br />
<Typography.Text ellipsis strong>
<LinkOutlined /> Document:{' '}
<a href={'http://www.dlink.top'} target={'_blank'}>
http://www.dlink.top
</a>
</Typography.Text>
<br />
<Typography.Text ellipsis strong>
<LinkOutlined /> bilibili:{' '}
<a href={'https://space.bilibili.com/366484959/video'} target={'_blank'}>
https://space.bilibili.com/366484959/video
</a>
</Typography.Text>
</Paragraph>
<br />
<Alert
message={l('about.communityRules')}
type="success"
showIcon
icon={<HeartOutlined style={{ color: 'red' }} />}
banner
style={{
margin: -12,
marginBottom: 24,
}}
/>
<ul>
<li>{l('about.communityRules.1')}</li>
<li>{l('about.communityRules.2')}</li>
<li>{l('about.communityRules.3')}</li>
<li>{l('about.communityRules.4')}</li>
<li>
<a href={'https://github.com/DataLinkDC/dinky/issues/66'} target={'_blank'}>
Issue
</a>
{l('about.communityRules.5')}
</li>
</ul>
</Typography.Text>
</Card>
</PageContainer>
);
</>;
};
export default About;
......@@ -67,7 +67,7 @@ export const CodeTreeShow: React.FC<CodeTreeShowProps> = (props) => {
*/
useEffect(() => {
queryCodeTree();
}, []);
}, [values.id]);
/**
......@@ -87,7 +87,7 @@ export const CodeTreeShow: React.FC<CodeTreeShowProps> = (props) => {
*/
return <>
<Row>
<Col span={6} className={"siderTree"}>
<Col span={6} className={"siderTree gitCodeTree"}>
{/* tree */}
<SiderTree treeData={treeData} onNodeClick={(info: any) => handleNodeClick(info)} loading={loading}/>
</Col>
......
......@@ -21,7 +21,7 @@ import {l} from "@/utils/intl";
import {Empty} from "antd";
const CodeEditProps = {
height: "70vh",
height: "82vh",
width: "100%",
lineNumbers: "on",
language: "java",
......
......@@ -18,7 +18,6 @@
import React from "react";
import {Empty, Tree} from "antd";
import {PageLoading} from "@ant-design/pro-components";
import {buildTreeData} from "@/utils/function";
type LogsTreeProps = {
......
......@@ -16,16 +16,17 @@
*/
import {Col, Row} from "antd";
import React, {useEffect, useState} from "react";
import LogsTree from "@/pages/SettingCenter/SystemInfo/TagInfo/LogList/LogsTree";
import LogsShow from "@/pages/SettingCenter/SystemInfo/TagInfo/LogList/LogsShow";
import {queryDataByParams} from "@/services/BusinessCrud";
import {API_CONSTANTS} from "@/services/constants";
import {Col, Row} from 'antd';
import React, {useEffect, useState} from 'react';
import LogsTree from '@/pages/SettingCenter/SystemLogs/TagInfo/LogList/LogsTree';
import LogsShow from '@/pages/SettingCenter/SystemLogs/TagInfo/LogList/LogsShow';
import {queryDataByParams} from '@/services/BusinessCrud';
import {API_CONSTANTS} from '@/services/constants';
import {ProCard} from '@ant-design/pro-components';
const LogList = () => {
const [treeData, setTreeData] = useState<Partial<any>[]>([]);
const [log, setLog] = useState<string>("");
const [log, setLog] = useState<string>('');
const [clickFileName, setClickFileName] = useState<any>();
const queryLogList = async () => {
......@@ -61,18 +62,14 @@ const LogList = () => {
return <>
<Row>
<Col span={4} className={"siderTree"}>
{/* tree */}
<ProCard ghost>
<ProCard ghost colSpan={'18%'} className={"siderTree"} >
<LogsTree treeData={treeData} onNodeClick={(info: any) => handleNodeClick(info)}/>
{/*<SiderTree treeData={treeData} onNodeClick={(info: any) => handleNodeClick(info)} loading={loading}/>*/}
</Col>
<Col span={20}>
{/* code */}
</ProCard>
<ProCard ghost >
<LogsShow code={log} refreshLogCallback={() => refreshLogByClickNode()}/>
{/*<CodeContent code={codeValue} current={currentGitProjectTreeNode}/>*/}
</Col>
</Row>
</ProCard>
</ProCard>
</>;
};
......
......@@ -26,7 +26,7 @@ import {API_CONSTANTS} from "@/services/constants";
* code edit props
*/
const CodeEditProps = {
height: "75vh",
height: "82vh",
width: "100%",
lineNumbers: "on",
language: "java",
......
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {Space} from 'antd';
import RootLogs from "@/pages/SettingCenter/SystemLogs/TagInfo/RootLogs";
import LogList from "@/pages/SettingCenter/SystemLogs/TagInfo/LogList";
import React, {useState} from 'react';
import {ProCard} from '@ant-design/pro-components';
import {LogSvg} from '@/components/Icons/CodeLanguageIcon';
const TagInfo = () => {
const [activeKey, setActiveKey] = useState('logs');
// tab list
const tabList = [
{
key: 'logs',
label: <Space><LogSvg/>{'Root Logs'}</Space>,
children: <RootLogs/>,
},
{
key: 'logList',
label: <Space><LogSvg/>{'Log List'}</Space>,
children: <LogList/>,
},
];
// tab props
const restTabProps = {
activeKey: activeKey,
type: 'card',
animated: true,
onChange: (key: string) => setActiveKey(key),
items: tabList,
};
/**
* render
*/
return <>
<ProCard ghost className={'schemaTree'} size="small" bordered tabs={{...restTabProps}}/>
</>;
};
export default TagInfo;
......@@ -16,7 +16,7 @@
*/
import {PageContainer} from "@ant-design/pro-components";
import TagInfo from "@/pages/SettingCenter/SystemInfo/TagInfo";
import TagInfo from "@/pages/SettingCenter/SystemLogs/TagInfo";
export default () => {
return <PageContainer title={false}>
......
......@@ -18,7 +18,6 @@
import {l} from "@/utils/intl";
import {ModalFormProps} from "@ant-design/pro-form/es/layouts/ModalForm";
import {ProTableProps} from "@ant-design/pro-table";
/**
* the interface api constants
......@@ -320,7 +319,6 @@ export const PROTABLE_OPTIONS_PUBLIC : any = {
y: "auto",
},
search: {
ghost: false,
labelWidth: 80, // must be number
span: 4,
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment