Commit 820d2914 authored by 邓晓峰's avatar 邓晓峰

feat: before push clear build folder

parents 930926f3 892c8db9
Pipeline #21420 passed with stages
in 23 minutes 5 seconds
...@@ -36,18 +36,8 @@ package: ...@@ -36,18 +36,8 @@ package:
only: only:
- master - master
when: manual when: manual
push_test:
variables:
GIT_STRATEGY: none
stage: push
script:
- bash push.sh TARGET_REPO_2021 TARGET_REPO_2020 TARGET_REPO_2019 CI_PROJECT_DIR GIT_ACCESS_USER GIT_ACCESS_PASSWORD
#- 'git push origin map'
only: push:
- master
when: manual
push_2021:
variables: variables:
GIT_STRATEGY: none GIT_STRATEGY: none
stage: push stage: push
...@@ -57,49 +47,39 @@ push_2021: ...@@ -57,49 +47,39 @@ push_2021:
- 'git clean -fd' - 'git clean -fd'
- 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"' - 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"'
- 'git pull origin map' - 'git pull origin map'
- 'git rm -rf "${TARGET_REPO_2021}/civmanage"'
- 'git commit -m "chore: clear folder civmanage"'
- 'git push origin map'
- 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2021}/civmanage" /S ; - 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2021}/civmanage" /S ;
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}' IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}'
- 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."' - 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."'
#- 'git push origin map' - 'git push origin map'
only:
- master
when: manual
push_2020:
variables:
GIT_STRATEGY: none
stage: push
script:
- 'cd "${TARGET_REPO_2020}"' - 'cd "${TARGET_REPO_2020}"'
- 'git reset --hard head' - 'git reset --hard head'
- 'git clean -fd' - 'git clean -fd'
- 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2020.git"' - 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2020.git"'
- 'git pull origin map' - 'git pull origin map'
- 'git rm -rf "${TARGET_REPO_2020}/civmanage"'
- 'git commit -m "chore: clear folder civmanage"'
- 'git push origin map'
- 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2020}/civmanage" /S ; - 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2020}/civmanage" /S ;
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}' IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}'
- 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."' - 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."'
#- 'git push origin map' - 'git push origin map'
only:
- master
when: manual
push_2019:
variables:
GIT_STRATEGY: none
stage: push
script:
- 'cd "${TARGET_REPO_2019}"' - 'cd "${TARGET_REPO_2019}"'
- 'git reset --hard head' - 'git reset --hard head'
- 'git clean -fd' - 'git clean -fd'
- 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish.git"' - 'git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish.git"'
- 'git pull origin map' - 'git pull origin map'
- 'git rm -rf "${TARGET_REPO_2019}/civmanage"'
- 'git commit -m "chore: clear folder civmanage"'
- 'git push origin map'
- 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2019}/civmanage" /S ; - 'robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2019}/civmanage" /S ;
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}' IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}'
- 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."' - 'git add . ; git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config ; git commit -m "auto package civmanage."'
#- 'git push origin map' - 'git push origin map'
only: only:
- master - master
when: manual when: manual
#!/usr/bin/env sh
set -e
TARGET_REPO_2021=$1
TARGET_REPO_2020=$2
TARGET_REPO_2019=$3
CI_PROJECT_DIR=$4
GIT_ACCESS_USER=$5
GIT_ACCESS_PASSWORD=$6
# 2021
echo "拉取CivPublish2021"
cd "${TARGET_REPO_2021}"
git reset --hard head
git clean -fd
git remote set-url origin "https://${GIT_ACCESS_USER}:${GIT_ACCESS_PASSWORD}@g.civnet.cn:8443/CivPublish/CivWebPublish2021.git"
git pull origin map
robocopy "${CI_PROJECT_DIR}/../CivWebPublish2021/civmanage" "${TARGET_REPO_2021}/civmanage" /S
IF ((${LASTEXITCODE} -le 8)) {cmd /c "exit /b 0"}
git add .
git reset HEAD Web.config CityInterface/Web.config CityWebFW/Web.config
git commit -m "auto package civmanage."
...@@ -16,7 +16,7 @@ import moment from 'moment'; ...@@ -16,7 +16,7 @@ import moment from 'moment';
import { post, PUBLISH_SERVICE } from '@/services/index'; import { post, PUBLISH_SERVICE } from '@/services/index';
import styles from './index.less'; import styles from './index.less';
const ServiceLog = () => { const LoginLog = () => {
const [loading, setLoading] = useState(false); // 源数据 const [loading, setLoading] = useState(false); // 源数据
const [data0, setData0] = useState([]); // 源数据 const [data0, setData0] = useState([]); // 源数据
const [LoginNameFilters, setLoginNameFilters] = useState([]); // 用户列筛选 const [LoginNameFilters, setLoginNameFilters] = useState([]); // 用户列筛选
...@@ -76,8 +76,6 @@ const ServiceLog = () => { ...@@ -76,8 +76,6 @@ const ServiceLog = () => {
}, [startTime, endTime]); }, [startTime, endTime]);
const getData = () => { const getData = () => {
post(`${PUBLISH_SERVICE}/LogCenter/GetLoginLog`, { post(`${PUBLISH_SERVICE}/LogCenter/GetLoginLog`, {
PageIndex: 1,
PageSize: 1000,
DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'), DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'),
DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'), DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'),
IP: '', IP: '',
...@@ -88,17 +86,17 @@ const ServiceLog = () => { ...@@ -88,17 +86,17 @@ const ServiceLog = () => {
}) })
.then(res => { .then(res => {
if (res.code === 0) { if (res.code === 0) {
setData0(res.data.list); setData0(res.data);
// 过滤LoginName // 过滤LoginName
let arr1 = res.data.list.map(item => item.LoginName); let arr1 = res.data.map(item => item.LoginName);
arr1 = arr1.filter((value, index) => arr1.indexOf(value) === index); arr1 = arr1.filter((value, index) => arr1.indexOf(value) === index);
setLoginNameFilters(arr1.map(item => ({ text: item, value: item }))); setLoginNameFilters(arr1.map(item => ({ text: item, value: item })));
// 过滤ShowName // 过滤ShowName
let arr2 = res.data.list.map(item => item.ShowName); let arr2 = res.data.map(item => item.ShowName);
arr2 = arr2.filter((value, index) => arr2.indexOf(value) === index); arr2 = arr2.filter((value, index) => arr2.indexOf(value) === index);
setShowNameFilters(arr2.map(item => ({ text: item, value: item }))); setShowNameFilters(arr2.map(item => ({ text: item, value: item })));
// 过滤系统类型SystemType // 过滤系统类型SystemType
let arr3 = res.data.list.map(item => item.SystemType); let arr3 = res.data.map(item => item.SystemType);
arr3 = arr3.filter((value, index) => arr3.indexOf(value) === index); arr3 = arr3.filter((value, index) => arr3.indexOf(value) === index);
setSystemTypeFilters(arr3.map(item => ({ text: item, value: item }))); setSystemTypeFilters(arr3.map(item => ({ text: item, value: item })));
} else { } else {
...@@ -114,30 +112,6 @@ const ServiceLog = () => { ...@@ -114,30 +112,6 @@ const ServiceLog = () => {
setLoading(false); setLoading(false);
}); });
}; };
// const dataTransforrm = data => {
// data.map((item, index) => {
// item.key = index;
// return item;
// });
// const dv1 = new DataSet.View().source(data);
// dv1
// .transform({
// type: 'aggregate', // 别名summary
// fields: ['IP'], // 统计字段集
// operations: ['count'], // 统计操作集
// as: ['计数'], // 存储字段集
// groupBy: ['IP'], // 分组字段集
// })
// .transform({
// type: 'sort-by',
// fields: ['计数'], // 根据指定的字段集进行排序,与lodash的sortBy行为一致
// order: 'DESC', // 默认为 ASC,DESC 则为逆序
// });
// console.log(dv1.rows);
// setIPCount(dv1.rows.slice(0, 20));
// };
// DatePicker改变点击确定时 // DatePicker改变点击确定时
const changeStartTime = time => { const changeStartTime = time => {
setStartTime(time); setStartTime(time);
...@@ -170,7 +144,7 @@ const ServiceLog = () => { ...@@ -170,7 +144,7 @@ const ServiceLog = () => {
onChange={changeStartTime} onChange={changeStartTime}
allowClear={false} allowClear={false}
/> />
<SwapRightOutlined style={{ lineHeight: 2 }} /> <SwapRightOutlined style={{ verticalAlign: '0.125em' }} />
<DatePicker <DatePicker
showTime showTime
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
...@@ -189,27 +163,6 @@ const ServiceLog = () => { ...@@ -189,27 +163,6 @@ const ServiceLog = () => {
</Col> </Col>
</Row> </Row>
<Spin spinning={loading} tip="loading"> <Spin spinning={loading} tip="loading">
{/* <Row className={styles.chart}>
<Col span={12}>
<Chart
height={316}
width={400}
autoFit
data={IPCount}
interactions={['active-region']}
padding="auto"
>
<Axis
name="IP"
label="null"
title={{ offset: 20, position: 'end' }}
/>
<Axis name="计数" title />
<Interval position="IP*计数" />
<Tooltip shared />
</Chart>
</Col>
</Row> */}
<div className={styles.table}> <div className={styles.table}>
<Table <Table
size="small" size="small"
...@@ -232,4 +185,4 @@ const ServiceLog = () => { ...@@ -232,4 +185,4 @@ const ServiceLog = () => {
</> </>
); );
}; };
export default ServiceLog; export default LoginLog;
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { import {
DatePicker, DatePicker,
Input,
Table, Table,
Row, Row,
Col, Col,
Button, Button,
Select,
Input,
notification, notification,
message, message,
Spin, Spin,
} from 'antd'; } from 'antd';
import { SwapRightOutlined } from '@ant-design/icons'; import { SwapRightOutlined } from '@ant-design/icons';
import { Chart, Interval, Line, Tooltip, Axis } from 'bizcharts';
// import { DataSet } from '@antv/data-set';
import moment from 'moment'; import moment from 'moment';
import { post, PUBLISH_SERVICE } from '@/services/index'; import { get, CITY_SERVICE } from '@/services/index';
import styles from './index.less'; import styles from './index.less';
const { Option } = Select;
const { Search } = Input;
const ServiceLog = () => { const OmsLog = () => {
const [loading, setLoading] = useState(false); // 源数据 const [loading, setLoading] = useState(false); // 源数据
const [dataTable, setDataTable] = useState([]); // 源数据 const [data, setData] = useState([]); // 源数据
const [visitedCount, setVisitedCount] = useState([]); // 访问量,统计数据 const [levelFilters, setLevelFilters] = useState([]); // 优先级筛选
const [pathCount, setPathCount] = useState([]); // 接口调用次数,统计数据 const [functionName, setFunctionName] = useState(''); // 接口名称筛选
const [reponseTime, setReponseTime] = useState([]); // 接口调用时长,统计数据 const [label, setLabel] = useState(''); // 标签筛选
const [timeInterval, setTimeInterval] = useState('3'); // 时间间隔,1/2/3/4(每分钟/5分钟/小时/天),默认每小时 const [startTime, setStartTime] = useState(moment().startOf('day')); // 默认值当天0点
// const [scale, setScale] = useState({}); // 坐标轴别名
// const [pageSize, setPageSize] = useState(100); // 分页大小
const [startTime, setStartTime] = useState(moment().startOf('day')); // 默认值,当天0点00:00:00
const [endTime, setEndTime] = useState( const [endTime, setEndTime] = useState(
moment(new Date(), 'YYYY-MM-DD HH:mm:ss'), // 默认值当前时间 moment(new Date(), 'YYYY-MM-DD HH:mm:ss'), // 默认值当前时间
); );
const [logType, setLogType] = useState(0); // 请求参数,日志类型,默认是正常,0:成功 -1:错误 9999:全部
const [searchWord, setSearchWord] = useState(''); // 关键字
// 计算时间间隔(分钟)
const start = new Date(startTime.format('YYYY-MM-DD HH:mm:ss')).getTime();
const end = new Date(endTime.format('YYYY-MM-DD HH:mm:ss')).getTime();
const minuteInterval = (end - start) / (60 * 1000); // 相隔多少分钟
if (minuteInterval <= 0) {
notification.error({
message: '时间设置有误',
description: '起始时间应该早于结束时间',
});
}
const countInterval = () => {
if (minuteInterval > 0 && minuteInterval <= 30) {
setTimeInterval('1');
} else if (minuteInterval > 30 && minuteInterval <= 120) {
setTimeInterval('2');
} else if (minuteInterval > 120 && minuteInterval <= 60 * 24) {
setTimeInterval('3');
} else {
setTimeInterval('4');
}
};
const columns = [ const columns = [
{ {
title: '接口名称', title: '操作时间',
dataIndex: 'Path', dataIndex: 'logTime',
key: 'Path', key: 'logTime',
fixed: 'left', // defaultSortOrder: 'descend',
}, sorter: (a, b) =>
{ new Date(b.logTime).getTime() - new Date(a.logTime).getTime(),
title: '调用时间',
dataIndex: 'CallTime',
key: 'CallTime',
}, },
{ {
title: 'IP', title: '接口名称',
dataIndex: 'DownstreamRequest', dataIndex: 'functionName',
key: 'DownstreamRequest', key: 'functionName',
}, // filters: functionNameFilters,
{ // onFilter: (value, record) => record.functionName === value,
title: '返回状态',
dataIndex: 'Result',
key: 'Result',
// render: record => {
// if (record === 0) {
// return '正常';
// }
// return '错误';
// },
},
{
title: '错误信息',
dataIndex: 'ErrorMsg',
key: 'ErrorMsg',
render: record => {
if (!record) {
return '-';
}
return record;
},
}, },
{ {
title: '请求方法', title: '标签',
dataIndex: 'Method', dataIndex: 'label',
key: 'Method', key: 'label',
width: 300,
}, },
// {
// title: '查询参数',
// dataIndex: 'QueryString',
// key: 'QueryString',
// },
// {
// title: '请求体',
// dataIndex: 'Body',
// key: 'Body',
// },
{ {
title: '耗时/ms', title: '优先级',
dataIndex: 'ConsumerTime', dataIndex: 'level',
key: 'ConsumerTime', key: 'level',
fixed: 'right', width: 100,
defaultSortOrder: 'descend', filters: levelFilters,
sorter: (a, b) => a.ConsumerTime - b.ConsumerTime, onFilter: (value, record) => record.level === value,
}, },
{ {
title: '返回体大小/byte', title: '详情',
dataIndex: 'ResponseSize', dataIndex: 'shortInfo',
key: 'ResponseSize', key: 'shortInfo',
fixed: 'right', ellipsis: 'true',
sorter: (a, b) => a.ResponseSize - b.ResponseSize, width: 300,
}, },
]; ];
// 在起止时间任意一个变化后获取数据,且起止时间应该早于结束时间 // 在起止时间任意一个变化后获取数据
useEffect(() => {
if (startTime && endTime && end - start > 0) {
countInterval(); // 根据起止时间计算时间间隔
}
}, [startTime, endTime]);
useEffect(() => {
if (startTime && endTime && end - start > 0) {
setLoading(true);
getData('/TrafficStatistics', setVisitedCount); // 访问量统计
}
}, [startTime, endTime, logType, timeInterval]);
useEffect(() => { useEffect(() => {
if (startTime && endTime && end - start > 0) { if (startTime && endTime) {
setLoading(true); setLoading(true);
getData('/TopCountList', setPathCount); // 接口调用频次统计 getData();
getData('/TopConsumeList', setReponseTime); // 接口平均耗时统计
getData('/GetOMSLog', setDataTable); // 接口调用记录
} }
}, [startTime, endTime, logType]); }, [startTime, endTime]);
const getData = () => {
// 封装接口请求,参数url/设置方法set get(`${CITY_SERVICE}/OMS.svc/S_GetOMSLog`, {
const getData = (url, set) => { _version: 9999,
post(`${PUBLISH_SERVICE}/LogCenter${url}`, { _dc: Date.now(),
// 获取日志表数据时PageSize设置为200,其他接口默认值20 logType: 'operationLog',
PageIndex: 1, startDate: startTime.format('YYYY-MM-DD'),
PageSize: url === '/GetOMSLog' ? 1000 : 20, endDate: endTime.format('YYYY-MM-DD'),
DateFrom: startTime.format('YYYY-MM-DD HH:mm:ss'), startTime: startTime.format('HH:mm'),
DateTo: endTime.format('YYYY-MM-DD HH:mm:ss'), endTime: endTime.format('HH:mm'),
IP: '', function: functionName,
Module: url === '/GetOMSLog' ? searchWord : '', label,
LogType: +logType,
Description: '',
LoginName: '',
UserName: '',
StaticsType: +timeInterval,
}) })
.then(res => { .then(res => {
if (res.code === 0) { if (res.success) {
if (!res.data) { if (!res.root) {
set([]); setData([]);
} else { } else {
const result = url === '/GetOMSLog' ? res.data.list : res.data; setData(res.root);
set( // 过滤优先级
result.map((item, index) => { let arr1 = res.root.map(item => item.level);
item.key = index; arr1 = arr1.filter((value, index) => arr1.indexOf(value) === index);
if (url === '/TrafficStatistics') { setLevelFilters(arr1.map(item => ({ text: item, value: item })));
item.StartTime = item.StartTime.replace(' ', '-');
}
return item;
}),
);
} }
} else { } else {
notification.error({ notification.error({
message: '数据获取失败', message: '数据获取失败',
description: res.msg, description: res.message,
}); });
} }
setLoading(false); setLoading(false);
...@@ -194,7 +107,6 @@ const ServiceLog = () => { ...@@ -194,7 +107,6 @@ const ServiceLog = () => {
setLoading(false); setLoading(false);
}); });
}; };
// DatePicker改变点击确定时 // DatePicker改变点击确定时
const changeStartTime = time => { const changeStartTime = time => {
setStartTime(time); setStartTime(time);
...@@ -202,37 +114,23 @@ const ServiceLog = () => { ...@@ -202,37 +114,23 @@ const ServiceLog = () => {
const changeEndTime = time => { const changeEndTime = time => {
setEndTime(time); setEndTime(time);
}; };
// 近1/6/12/24小时,同时设置对应的时间间隔 // 近1/6/12/24小时
const setTime = (time, value) => { const setTime = time => {
setTimeInterval(value);
setEndTime(moment(new Date(), 'YYYY-MM-DD HH:mm:ss')); setEndTime(moment(new Date(), 'YYYY-MM-DD HH:mm:ss'));
setStartTime( setStartTime(
moment( moment(
new Date(new Date().getTime() - time * 60 * 1000), new Date(new Date().getTime() - time * 60 * 60 * 1000),
'YYYY-MM-DD HH:mm:ss', 'YYYY-MM-DD HH:mm:ss',
), ),
); );
}; };
// 设置返回状态
const changeStatus = value => {
setLogType(value);
};
// 设置时间间隔
const selectChange = value => {
setTimeInterval(value);
};
// 获取搜索框的值
const handleSearch = e => {
setSearchWord(e.target.value);
// console.log(e.target.value);
};
return ( return (
<> <>
<div className={styles.serviceLog}> <div className={styles.omsLog}>
<Row className={styles.head}> <Row className={styles.head}>
<Col span={24}> <Col span={24}>
<span>时间:</span> <span style={{ lineHeight: 2 }}>时间:</span>
<DatePicker <DatePicker
showTime showTime
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm:ss"
...@@ -251,112 +149,44 @@ const ServiceLog = () => { ...@@ -251,112 +149,44 @@ const ServiceLog = () => {
style={{ marginRight: '10px' }} style={{ marginRight: '10px' }}
allowClear={false} allowClear={false}
/> />
<Button onClick={() => setTime(15, '1')}>15分钟</Button> <Button onClick={() => setTime(1)}>1小时</Button>
<Button onClick={() => setTime(60, '2')}>1小时</Button> {/* <Button onClick={() => setTime(6)}>近6小时</Button> */}
<Button onClick={() => setTime(12 * 60, '3')}>12小时</Button> <Button onClick={() => setTime(24)}>1</Button>
<Button onClick={() => setTime(24 * 60, '3')}>1</Button> <Button onClick={() => setTime(24 * 7)}>1</Button>
<Button onClick={() => setTime(24 * 7 * 60, '4')}>1</Button> <Button onClick={() => setTime(14 * 24)}>2</Button>
<span style={{ marginLeft: '20px' }}>返回状态:</span> {/* <Button onClick={() => setTime(30 * 24)}>近1月</Button> */}
<Select defaultValue="正常" onChange={changeStatus}> <span style={{ marginLeft: '10px' }}>接口查询:</span>
<Option value="9999">全部</Option> <Input
<Option value="0">正常</Option> style={{ width: '120px' }}
<Option value="-1">错误</Option>
</Select>
<Search
allowClear
style={{ width: 200, marginLeft: '20px' }}
placeholder="请输入接口名称" placeholder="请输入接口名称"
onSearch={() => { onChange={e => {
getData('/GetOMSLog', setDataTable); setFunctionName(e.target.value);
}} }}
onChange={e => handleSearch(e)}
enterButton
value={searchWord}
/> />
</Col> <span style={{ marginLeft: '10px' }}>标签查询:</span>
</Row> <Input
<Spin spinning={loading} tip="loading"> style={{ width: '120px' }}
<Row style={{ background: 'white' }}> placeholder="请输入标签"
<Col offset={6} style={{ paddingTop: '8px' }}> onChange={e => {
<span>间隔:</span> setLabel(e.target.value);
<Select
defaultValue="每小时"
value={timeInterval}
size="small"
onChange={selectChange}
>
<Option value="1">每分钟</Option>
<Option value="2">5分钟</Option>
<Option value="3">每小时</Option>
<Option value="4">每天</Option>
</Select>
</Col>
</Row>
<Row className={styles.chart}>
<Col span={8}>
<Chart
height={300}
autoFit
data={visitedCount}
interactions={['active-region']}
padding="auto"
renderer="svg"
scale={{
Count: { alias: '计数' },
StartTime: { alias: '访问量统计' },
}}
>
<Axis name="StartTime" label="" title={{ offset: 20 }} />
<Axis name="Count" title />
<Line shape="smooth" position="StartTime*Count" />
<Tooltip shared />
</Chart>
</Col>
<Col span={7} offset={1}>
<Chart
height={300}
autoFit
data={pathCount}
interactions={['active-region']}
padding="auto"
renderer="svg"
scale={{
Count: { alias: '计数' },
Path: { alias: '接口调用频次统计' },
}}
>
<Axis name="Path" label="" title={{ offset: 20 }} />
<Axis name="Count" title />
<Interval position="Path*Count" />
<Tooltip shared />
</Chart>
</Col>
<Col span={7} offset={1}>
<Chart
height={300}
autoFit
data={reponseTime}
interactions={['active-region']}
padding="auto"
renderer="svg"
scale={{
AvgTime: { alias: '响应时长/ms' },
Path: { alias: '接口平均耗时统计' },
}} }}
/>
<Button
type="primary"
style={{ marginLeft: '10px' }}
onClick={getData}
> >
<Axis name="Path" label="" title={{ offset: 20 }} /> 查询
<Axis name="AvgTime" title /> </Button>
<Interval position="Path*AvgTime" />
<Tooltip shared />
</Chart>
</Col> </Col>
</Row> </Row>
<Spin spinning={loading} tip="loading">
<div className={styles.table}> <div className={styles.table}>
<Table <Table
size="small" size="small"
bordered bordered
columns={columns} columns={columns}
dataSource={dataTable} dataSource={data}
scroll={{ x: 'max-content' }} scroll={{ x: 'max-content' }}
pagination={{ pagination={{
showTotal: (total, range) => showTotal: (total, range) =>
...@@ -373,4 +203,4 @@ const ServiceLog = () => { ...@@ -373,4 +203,4 @@ const ServiceLog = () => {
</> </>
); );
}; };
export default ServiceLog; export default OmsLog;
.serviceLog{ .omsLog{
.head{ .head{
padding: 10px; padding: 10px;
background: white; background: white;
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
min-width: 1030px; min-width: 1030px;
} }
.chart{ .chart{
padding: 10px; padding: 16px;
background: white; background: white;
} }
.table{ .table{
...@@ -17,9 +17,12 @@ ...@@ -17,9 +17,12 @@
color:rgba(0,0,0,0.85); color:rgba(0,0,0,0.85);
} }
.ant-table-content{ .ant-table-content{
height:calc(100vh - 520px); height:calc(100vh - 172px);
border-right: white; border-right: white;
overflow: auto !important; overflow: auto !important;
.ant-table-tbody{
overflow: scroll !important;
}
} }
.ant-pagination{ .ant-pagination{
z-index: 999; z-index: 999;
......
...@@ -265,7 +265,7 @@ const ServiceLog = () => { ...@@ -265,7 +265,7 @@ const ServiceLog = () => {
<Select defaultValue="异常" onChange={changeStatus}> <Select defaultValue="异常" onChange={changeStatus}>
<Option value="9999">全部</Option> <Option value="9999">全部</Option>
<Option value="0">正常</Option> <Option value="0">正常</Option>
<Option value="-1">错误</Option> <Option value="-1">异常</Option>
</Select> </Select>
<Search <Search
allowClear allowClear
......
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