Merge pull request #400 from lucasun/dev_v2.5.0_fe

Dev v2.5.0 fe
This commit is contained in:
EricZeng
2021-11-30 15:01:49 +08:00
committed by GitHub
7 changed files with 39 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "logi-kafka", "name": "logi-kafka",
"version": "2.4.3", "version": "2.5.0",
"description": "", "description": "",
"scripts": { "scripts": {
"start": "webpack-dev-server", "start": "webpack-dev-server",
@@ -57,4 +57,4 @@
"dependencies": { "dependencies": {
"format-to-json": "^1.0.4" "format-to-json": "^1.0.4"
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View File

@@ -60,6 +60,22 @@ export class ChartWithDatePicker extends React.Component<IChartProps> {
public changeChartOptions(options: any) { public changeChartOptions(options: any) {
const noData = options.series.length ? false : true; const noData = options.series.length ? false : true;
this.setState({ noData }); this.setState({ noData });
options.tooltip.formatter = (params: any) => {
var res =
"<div style='margin-bottom:5px;padding:0 12px;width:100%;height:24px;line-height:24px;border-radius:3px;'><p>" +
params[0].data.time +
" </p></div>";
for (var i = 0; i < params.length; i++) {
res += `<div key=${params[i].seriesName} style="color: #fff;padding:0 12px;line-height: 24px">
<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;background-color:${[
params[i].color,
]};"></span>
${params[i].seriesName}
${params[i].data[params[i].seriesName]}
</div>`;
}
return res;
}
this.chart.setOption(options, true); this.chart.setOption(options, true);
} }
@@ -79,7 +95,7 @@ export class ChartWithDatePicker extends React.Component<IChartProps> {
public render() { public render() {
const { customerNode } = this.props; const { customerNode } = this.props;
return ( return (
<div className="status-box" style={{minWidth: '930px'}}> <div className="status-box" style={{ minWidth: '930px' }}>
<div className="status-graph"> <div className="status-graph">
<div className="k-toolbar"> <div className="k-toolbar">
{customerNode} {customerNode}

View File

@@ -7,7 +7,7 @@ import { urlPrefix } from 'constants/left-menu';
import { region, IRegionIdcs } from 'store/region'; import { region, IRegionIdcs } from 'store/region';
import logoUrl from '../../assets/image/kafka-logo.png'; import logoUrl from '../../assets/image/kafka-logo.png';
import userIcon from '../../assets/image/normal.png'; import userIcon from '../../assets/image/normal.png';
import weChat from '../../assets/image/wechat.jpeg'; import weChat from '../../assets/image/wechat.png';
import { users } from 'store/users'; import { users } from 'store/users';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
@@ -60,8 +60,8 @@ export const Header = observer((props: IHeader) => {
}); });
}; };
const content = ( const content = (
<div style={{ height: '250px', padding: '5px' }} className="kafka-avatar-img"> <div style={{ height: '200px', padding: '5px' }} className="kafka-avatar-img">
<img style={{ width: '190px', height: '246px' }} src={weChat} alt="" /> <img style={{ width: '190px', height: '190px' }} src={weChat} alt="" />
</div> </div>
); );
const helpCenter = ( const helpCenter = (
@@ -144,7 +144,7 @@ export const Header = observer((props: IHeader) => {
<div className="kafka-header-container"> <div className="kafka-header-container">
<div className="left-content"> <div className="left-content">
<img className="kafka-header-icon" src={logoUrl} alt="" /> <img className="kafka-header-icon" src={logoUrl} alt="" />
<span className="kafka-header-text">Kafka Manager</span> <span className="kafka-header-text">LogiKM</span>
<a className='kafka-header-version' href="https://github.com/didi/Logi-KafkaManager/releases" target='_blank'>v2.4.2</a> <a className='kafka-header-version' href="https://github.com/didi/Logi-KafkaManager/releases" target='_blank'>v2.4.2</a>
{/* 添加版本超链接 */} {/* 添加版本超链接 */}
</div> </div>

View File

@@ -115,11 +115,19 @@ export class OrderList extends SearchAndFilterContainer {
status, status,
{ {
title: '申请时间', title: '申请时间',
dataIndex: 'gmtTime', dataIndex: 'gmtCreate',
key: 'gmtTime', key: 'gmtCreate',
sorter: (a: IBaseOrder, b: IBaseOrder) => b.gmtTime - a.gmtTime, sorter: (a: IBaseOrder, b: IBaseOrder) => b.gmtCreate - a.gmtCreate,
render: (t: number) => moment(t).format(timeFormat), render: (t: number) => moment(t).format(timeFormat),
}, { },
{
title: '审批时间',
dataIndex: 'gmtHandle',
key: 'gmtHandle',
sorter: (a: IBaseOrder, b: IBaseOrder) => b.gmtHandle - a.gmtHandle,
render: (t: number) => moment(t).format(timeFormat),
},
{
title: '操作', title: '操作',
key: 'operation', key: 'operation',
dataIndex: 'operation', dataIndex: 'operation',

View File

@@ -1,12 +1,15 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2">
<title>KafkaManager</title> <title>LogiKM</title>
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<div id="modal"></div> <div id="modal"></div>
</body> </body>
</html> </html>