Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
ocrCloudPlatformAdmin
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ocr-cloud-platform
ocrCloudPlatformAdmin
Commits
76183631
Commit
76183631
authored
Jul 24, 2024
by
杨琪琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ocr调用统计-折线图添加超量显示;授权管理-添加折线图;
parent
aef9242c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
18 deletions
+47
-18
src/main/resources/static/js/callSupervision/callChartOptions.js
+2
-1
src/main/resources/templates/authorization/list.html
+0
-0
src/main/resources/templates/callSupervision/index.html
+45
-17
No files found.
src/main/resources/static/js/callSupervision/callChartOptions.js
View file @
76183631
...
...
@@ -20,7 +20,7 @@ var defaultLineOptions = {
legend
:
{
data
:
[],
textStyle
:
{
color
:
"#fff"
,
//
color: "#fff",
fontSize
:
13
,
},
type
:
'scroll'
,
...
...
@@ -57,6 +57,7 @@ var defaultLineOptions = {
end
:
100
}
],
visualMap
:
null
,
series
:
[]
}
var
defaultXBarOptions
=
{
...
...
src/main/resources/templates/authorization/list.html
View file @
76183631
This diff is collapsed.
Click to expand it.
src/main/resources/templates/callSupervision/index.html
View file @
76183631
...
...
@@ -21,7 +21,7 @@
</style>
</head>
<body>
<div
class=
"layui-layout"
>
<div
class=
"layui-layout"
id=
"charts-content"
>
<div
class=
"layui-row layui-col-space5"
style=
"height: 60vh"
>
<div
class=
"layui-col-xs8"
style=
"height: 100%"
>
<div
class=
"content-box box-border"
style=
"width: calc(100% - 20px);height: calc(65% - 20px)"
>
...
...
@@ -165,7 +165,6 @@
<script
src=
"js/utils/dateformat.js"
></script>
<script
src=
"js/utils/fileDownload.js"
></script>
<script
th:inline=
"javascript"
>
var
gatewayUrl
=
[[
$
{
gatewayUrl
}]];
</script>
...
...
@@ -348,12 +347,12 @@
page
:
false
,
cols
:
[
[
{
field
:
'name'
,
title
:
'服务器资源池'
,
align
:
'center'
,
style
:
'color: #3e63cc'
,
minWidth
:
"200"
},
{
field
:
'name'
,
title
:
'服务器资源池'
,
align
:
'center'
,
style
:
'color: #3e63cc'
,
minWidth
:
"200"
},
{
field
:
'active'
,
title
:
'活跃状态'
,
align
:
'center'
,
width
:
'100'
,
width
:
'100'
,
style
:
'color: #3e63cc'
,
templet
:
function
(
data
)
{
if
(
data
.
active
)
{
...
...
@@ -416,16 +415,16 @@
var
option
=
{};
switch
(
type
)
{
case
'line'
:
option
=
defaultLineOptions
;
option
=
JSON
.
parse
(
JSON
.
stringify
(
defaultLineOptions
))
;
break
;
case
'Xbar'
:
option
=
defaultXBarOptions
;
option
=
JSON
.
parse
(
JSON
.
stringify
(
defaultXBarOptions
))
;
break
;
case
'Ybar'
:
option
=
defaultYBarOptions
;
option
=
JSON
.
parse
(
JSON
.
stringify
(
defaultYBarOptions
))
;
break
;
case
'gauge'
:
option
=
defaultGaugeOptions
;
option
=
JSON
.
parse
(
JSON
.
stringify
(
defaultGaugeOptions
))
;
break
;
default
:
break
;
...
...
@@ -482,9 +481,10 @@
})
let
option
=
{};
if
(
isNotMerge
)
{
option
=
defaultLineOptions
;
option
=
JSON
.
parse
(
JSON
.
stringify
(
defaultLineOptions
))
;
if
(
showLegend
)
{
option
.
legend
.
data
=
legendData
;
option
.
legend
.
textStyle
.
color
=
'#fff'
;
}
else
{
option
.
legend
.
data
=
[];
}
...
...
@@ -498,6 +498,29 @@
option
.
xAxis
.
minInterval
=
1000
*
60
;
break
case
'second'
:
option
.
visualMap
=
[{
show
:
true
,
top
:
30
,
right
:
10
,
pieces
:
[
{
gt
:
0
,
lt
:
195
,
color
:
'#5470c6'
},
{
gte
:
195
,
color
:
'#AC3B2A'
}
],
outOfRange
:
{
color
:
'#999'
},
orient
:
"horizontal"
,
textStyle
:
{
color
:
"#fff"
}
}]
option
.
xAxis
.
minInterval
=
1000
;
break
default
:
...
...
@@ -525,6 +548,7 @@
}
else
{
// 替换合并
timeLineChart
.
setOption
(
option
,
{
notMerge
:
false
,
replaceMerge
:
[
'dataZoom'
,
'series'
]});
let
op
=
timeLineChart
.
getOption
();
}
}
...
...
@@ -908,7 +932,7 @@
datazoom_end_n
=
event
.
end
}
})
let
option
=
defaultYBarOptions
;
let
option
=
JSON
.
parse
(
JSON
.
stringify
(
defaultYBarOptions
))
;
option
.
dataZoom
[
0
].
start
=
datazoom_start_n
;
option
.
dataZoom
[
0
].
end
=
datazoom_end_n
;
option
.
dataZoom
[
1
].
start
=
datazoom_start_n
;
...
...
@@ -949,12 +973,12 @@
method
:
'get'
,
}).
then
(
function
(
res
)
{
if
(
res
.
success
)
{
let
{
cpu
,
disk
,
gpu
,
load
,
memory
}
=
res
.
data
updateGauge
(
'cpuGaugeChart'
,
cpu
);
updateGauge
(
'hardDiskGaugeChart'
,
disk
);
updateGauge
(
'gpuGaugeChart'
,
gpu
);
updateGauge
(
'sysLoadGaugeChart'
,
load
);
updateGauge
(
'memoryGaugeChart'
,
memory
);
let
{
cpu
,
disk
,
gpu
,
load
,
memory
}
=
res
.
data
updateGauge
(
'cpuGaugeChart'
,
cpu
);
updateGauge
(
'hardDiskGaugeChart'
,
disk
);
updateGauge
(
'gpuGaugeChart'
,
gpu
);
updateGauge
(
'sysLoadGaugeChart'
,
load
);
updateGauge
(
'memoryGaugeChart'
,
memory
);
}
else
{
console
.
log
(
' --- 获取服务器总资源实时监控数据失败 --- '
,
res
)
}
...
...
@@ -963,7 +987,7 @@
})
}
function
updateGauge
(
key
,
value
)
{
function
updateGauge
(
key
,
value
)
{
let
option
=
window
[
key
].
getOption
();
option
.
series
[
1
].
data
[
0
]
=
value
;
let
color
=
"#58D9F9"
;
...
...
@@ -1003,6 +1027,9 @@
if
(
gaugeInterval
)
{
clearInterval
(
gaugeInterval
)
}
if
(
tableInterval
)
{
clearInterval
(
tableInterval
)
}
}
// 移除监听器
...
...
@@ -1051,6 +1078,7 @@
// 页面销毁前
$
(
window
).
on
(
'beforeunload'
,
function
()
{
console
.
log
(
' --- 页面即将销毁 --- '
)
stopInterval
();
chartsDestroy
();
stopListener
();
...
...
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