Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bigDataSystem
Project
Project
Details
Activity
Releases
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
张伯涛
bigDataSystem
Commits
f73e9489
Commit
f73e9489
authored
Nov 30, 2024
by
罗林杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改API监控
parent
53b8aa6c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
26 deletions
+107
-26
ApiMonitor.data.ts
...iews/dataSharingAndExchange/ApiMonitor/ApiMonitor.data.ts
+38
-13
ApiMonitorData.ts
...views/dataSharingAndExchange/ApiMonitor/ApiMonitorData.ts
+37
-0
RightContent6.vue
...views/dataSharingAndExchange/ApiMonitor/RightContent6.vue
+32
-13
No files found.
src/views/dataSharingAndExchange/ApiMonitor/ApiMonitor.data.ts
View file @
f73e9489
import
{
getAllRoleList
}
from
'@/api/system/role/role'
;
import
{
getAllRoleList
}
from
'@/api/system/role/role'
;
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
import
{
BasicColumn
,
FormSchema
}
from
'@/components/Table'
;
import
{
h
}
from
"vue"
;
import
{
h
}
from
'vue'
;
import
{
Tag
}
from
"ant-design-vue"
;
import
{
Tag
,
Switch
}
from
'ant-design-vue'
;
import
{
Switch
}
from
'ant-design-vu
e'
;
import
{
useMessage
}
from
'@/hooks/web/useMessag
e'
;
import
{
useMessage
}
from
"@/hooks/web/useMessage"
;
import
{
changeFlagApi
}
from
'@/api/system/user/user'
;
import
{
changeFlagApi
}
from
"@/api/system/user/user"
;
// 引入开关组件
// 引入开关组件
type
CheckedType
=
boolean
|
string
|
number
;
type
CheckedType
=
boolean
|
string
|
number
;
export
const
columns1
:
BasicColumn
[]
=
[
export
const
columns1
:
BasicColumn
[]
=
[
{
{
title
:
'gateway'
,
title
:
'gateway'
,
...
@@ -40,12 +39,12 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -40,12 +39,12 @@ export const searchFormSchema: FormSchema[] = [
field
:
'callBy'
,
field
:
'callBy'
,
label
:
'调用者'
,
label
:
'调用者'
,
component
:
'Select'
,
component
:
'Select'
,
labelWidth
:
50
,
labelWidth
:
50
,
componentProps
:
{
componentProps
:
{
options
:[
options
:
[
{
{
label
:
'admin'
,
label
:
'admin'
,
value
:
'admin'
value
:
'admin'
,
},
},
],
],
placeholder
:
'请选择调用者'
,
placeholder
:
'请选择调用者'
,
...
@@ -55,9 +54,35 @@ export const searchFormSchema: FormSchema[] = [
...
@@ -55,9 +54,35 @@ export const searchFormSchema: FormSchema[] = [
{
{
field
:
'callTime'
,
field
:
'callTime'
,
label
:
' 调用时间'
,
label
:
' 调用时间'
,
labelWidth
:
100
,
labelWidth
:
100
,
component
:
'DatePicker'
,
component
:
'DatePicker'
,
colProps
:
{
lg
:
7
,
md
:
24
},
colProps
:
{
lg
:
7
,
md
:
24
},
},
},
];
];
export
const
partitionColumns
:
BasicColumn
[]
=
[
{
title
:
'调用时间'
,
dataIndex
:
'date'
,
width
:
120
,
},
{
title
:
'调用时长'
,
dataIndex
:
'time'
,
width
:
120
,
},
{
title
:
'Http错误码'
,
dataIndex
:
'code'
,
width
:
120
,
},
{
title
:
'业务错误码'
,
dataIndex
:
'bizCode'
,
width
:
120
,
},
{
title
:
'调用者'
,
dataIndex
:
'user'
,
width
:
120
,
},
];
src/views/dataSharingAndExchange/ApiMonitor/ApiMonitorData.ts
View file @
f73e9489
...
@@ -311,3 +311,40 @@ export const second4Data = [
...
@@ -311,3 +311,40 @@ export const second4Data = [
{
date
:
'10/06'
,
value
:
333
},
{
date
:
'10/06'
,
value
:
333
},
{
date
:
'10/07'
,
value
:
223
},
{
date
:
'10/07'
,
value
:
223
},
];
];
export
const
partitionData
:
any
[]
=
[
{
date
:
'2024-11-30 08:00'
,
time
:
'0.25s'
,
code
:
200
,
bizCode
:
0
,
user
:
'user1'
,
},
{
date
:
'2024-11-30 09:15'
,
time
:
'1.50s'
,
code
:
404
,
bizCode
:
1001
,
user
:
'user2'
,
},
{
date
:
'2024-11-30 10:30'
,
time
:
'0.75s'
,
code
:
500
,
bizCode
:
1002
,
user
:
'user3'
,
},
{
date
:
'2024-11-30 11:45'
,
time
:
'0.10s'
,
code
:
200
,
bizCode
:
0
,
user
:
'user4'
,
},
{
date
:
'2024-11-30 13:00'
,
time
:
'2.00s'
,
code
:
400
,
bizCode
:
1003
,
user
:
'user5'
,
},
];
src/views/dataSharingAndExchange/ApiMonitor/RightContent6.vue
View file @
f73e9489
<
template
>
<
template
>
<Card
:loading=
"loading"
>
<BasicTable
@
register=
"registerPartitionTable"
>
666
<template
#
bodyCell=
"
{ column }">
</Card>
<template
v-if=
"column.key === 'action'"
>
<TableAction
:actions=
"[
{
label: '查看日志',
},
]"
/>
</
template
>
</template>
</BasicTable>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
;
import
{
BasicTable
,
TableAction
,
useTable
}
from
'@/components/Table'
;
import
{
Tag
,
Card
,
Select
}
from
'ant-design-vue'
;
import
{
partitionColumns
}
from
'@/views/dataSharingAndExchange/ApiMonitor/ApiMonitor.data'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
partitionData
}
from
'@/views/dataSharingAndExchange/ApiMonitor/ApiMonitorData'
;
import
{}
from
"./ApiMonitor.data"
;
import
{}
from
"./ApiMonitorData"
;
import
Icon
from
'@/components/Icon/Icon.vue'
;
const
[
registerPartitionTable
]
=
useTable
({
title
:
'调用失败记录'
,
dataSource
:
partitionData
,
columns
:
partitionColumns
,
pagination
:
false
,
showIndexColumn
:
false
,
pagination
:
true
,
actionColumn
:
{
width
:
120
,
title
:
'操作'
,
dataIndex
:
'action'
,
fixed
:
'right'
,
},
scroll
:
{
y
:
300
},
});
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
></
style
>
</
style
>
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