Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
892c8db9
Commit
892c8db9
authored
Dec 29, 2020
by
陈前坚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 运维痕迹
parent
78090608
Pipeline
#21405
skipped with stages
Changes
4
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
58 deletions
+14
-58
index.js
src/pages/log/loginLog/index.js
+7
-54
index.js
src/pages/log/omsLog/index.js
+0
-0
index.less
src/pages/log/omsLog/index.less
+6
-3
index.js
src/pages/log/serviceLog/index.js
+1
-1
No files found.
src/pages/log/loginLog/index.js
View file @
892c8db9
...
...
@@ -16,7 +16,7 @@ import moment from 'moment';
import
{
post
,
PUBLISH_SERVICE
}
from
'@/services/index'
;
import
styles
from
'./index.less'
;
const
Service
Log
=
()
=>
{
const
Login
Log
=
()
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 源数据
const
[
data0
,
setData0
]
=
useState
([]);
// 源数据
const
[
LoginNameFilters
,
setLoginNameFilters
]
=
useState
([]);
// 用户列筛选
...
...
@@ -76,8 +76,6 @@ const ServiceLog = () => {
},
[
startTime
,
endTime
]);
const
getData
=
()
=>
{
post
(
`
${
PUBLISH_SERVICE
}
/LogCenter/GetLoginLog`
,
{
PageIndex
:
1
,
PageSize
:
1000
,
DateFrom
:
startTime
.
format
(
'YYYY-MM-DD HH:mm:ss'
),
DateTo
:
endTime
.
format
(
'YYYY-MM-DD HH:mm:ss'
),
IP
:
''
,
...
...
@@ -88,17 +86,17 @@ const ServiceLog = () => {
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setData0
(
res
.
data
.
list
);
setData0
(
res
.
data
);
// 过滤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
);
setLoginNameFilters
(
arr1
.
map
(
item
=>
({
text
:
item
,
value
:
item
})));
// 过滤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
);
setShowNameFilters
(
arr2
.
map
(
item
=>
({
text
:
item
,
value
:
item
})));
// 过滤系统类型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
);
setSystemTypeFilters
(
arr3
.
map
(
item
=>
({
text
:
item
,
value
:
item
})));
}
else
{
...
...
@@ -114,30 +112,6 @@ const ServiceLog = () => {
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改变点击确定时
const
changeStartTime
=
time
=>
{
setStartTime
(
time
);
...
...
@@ -170,7 +144,7 @@ const ServiceLog = () => {
onChange
=
{
changeStartTime
}
allowClear
=
{
false
}
/
>
<
SwapRightOutlined
style
=
{{
lineHeight
:
2
}}
/
>
<
SwapRightOutlined
style
=
{{
verticalAlign
:
'0.125em'
}}
/
>
<
DatePicker
showTime
format
=
"YYYY-MM-DD HH:mm:ss"
...
...
@@ -189,27 +163,6 @@ const ServiceLog = () => {
<
/Col
>
<
/Row
>
<
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
}
>
<
Table
size
=
"small"
...
...
@@ -232,4 +185,4 @@ const ServiceLog = () => {
<
/
>
);
};
export
default
Service
Log
;
export
default
Login
Log
;
src/pages/log/omsLog/index.js
View file @
892c8db9
This diff is collapsed.
Click to expand it.
src/pages/log/omsLog/index.less
View file @
892c8db9
.
service
Log{
.
oms
Log{
.head{
padding: 10px;
background: white;
...
...
@@ -6,7 +6,7 @@
min-width: 1030px;
}
.chart{
padding: 1
0
px;
padding: 1
6
px;
background: white;
}
.table{
...
...
@@ -17,9 +17,12 @@
color:rgba(0,0,0,0.85);
}
.ant-table-content{
height:calc(100vh -
520
px);
height:calc(100vh -
172
px);
border-right: white;
overflow: auto !important;
.ant-table-tbody{
overflow: scroll !important;
}
}
.ant-pagination{
z-index: 999;
...
...
src/pages/log/serviceLog/index.js
View file @
892c8db9
...
...
@@ -265,7 +265,7 @@ const ServiceLog = () => {
<
Select
defaultValue
=
"异常"
onChange
=
{
changeStatus
}
>
<
Option
value
=
"9999"
>
全部
<
/Option
>
<
Option
value
=
"0"
>
正常
<
/Option
>
<
Option
value
=
"-1"
>
错误
<
/Option
>
<
Option
value
=
"-1"
>
异常
<
/Option
>
<
/Select
>
<
Search
allowClear
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment