Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
wanli
evm-store
Commits
083183e7
Commit
083183e7
authored
Sep 02, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat: 资源监视器新增字段以及修改样式
parent
43b4c2f6
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
208 additions
and
689 deletions
+208
-689
frontend/src/views/system/components/EvmChart.vue
frontend/src/views/system/components/EvmChart.vue
+25
-49
frontend/src/views/system/components/EvmHistoryChart.vue
frontend/src/views/system/components/EvmHistoryChart.vue
+0
-223
frontend/src/views/system/components/LvglHistoryChart.vue
frontend/src/views/system/components/LvglHistoryChart.vue
+0
-222
frontend/src/views/system/monitor.vue
frontend/src/views/system/monitor.vue
+182
-194
tools/build_out/views/menu.py
tools/build_out/views/menu.py
+1
-1
No files found.
frontend/src/views/system/components/EvmChart.vue
View file @
083183e7
...
...
@@ -34,10 +34,15 @@ import { wsNotify } from "@/utils/eventBus.js";
let
chart
=
null
;
const
seriesData
=
{
evue_free_size
:
[],
evue_total_size
:
[],
evue_used_size
:
[],
ext_total_size
:
[],
ext_used_size
:
[],
heap_total_size
:
[],
heap_used_size
:
[],
stack_total_size
:
[],
stack_used_size
:
[]
,
stack_used_size
:
[]
};
export
default
{
...
...
@@ -68,53 +73,7 @@ export default {
return
{
loading
:
null
,
timer
:
null
,
series
:
[
{
name
:
"
heap_total_size
"
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
scale
:
false
,
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
seriesData
.
heap_total_size
,
},
{
name
:
"
heap_used_size
"
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
seriesData
.
heap_used_size
,
},
{
name
:
"
stack_total_size
"
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
seriesData
.
stack_total_size
,
},
{
name
:
"
stack_used_size
"
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
seriesData
.
stack_used_size
,
},
],
series
:
[],
legendData
:
Object
.
keys
(
seriesData
),
};
},
...
...
@@ -127,6 +86,22 @@ export default {
},
},
mounted
()
{
let
array
=
[]
Object
.
keys
(
seriesData
).
forEach
(
k
=>
{
array
.
push
({
name
:
k
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
seriesData
[
k
],
});
});
this
.
series
=
array
;
this
.
$nextTick
(()
=>
{
this
.
initChart
();
});
...
...
@@ -254,9 +229,10 @@ export default {
legend
:
{
data
:
this
.
legendData
,
selected
:
{
evue_total_size
:
false
,
ext_total_size
:
false
,
heap_total_size
:
false
,
stack_total_size
:
false
,
stack_used_size
:
false
,
},
},
series
:
this
.
series
,
...
...
frontend/src/views/system/components/EvmHistoryChart.vue
deleted
100644 → 0
View file @
43b4c2f6
<
template
>
<div
:class=
"className"
:style=
"
{ height: height, width: width }" />
</
template
>
<
script
>
import
*
as
echarts
from
"
echarts
"
;
require
(
"
echarts/theme/macarons
"
);
import
resize
from
"
./mixins/resize
"
;
let
chart
=
null
const
seriesData
=
{
heap_total_size
:
[],
heap_used_size
:
[],
stack_total_size
:
[],
stack_used_size
:
[],
};
export
default
{
mixins
:
[
resize
],
props
:
{
className
:
{
type
:
String
,
default
:
"
chart
"
,
},
width
:
{
type
:
String
,
default
:
"
100%
"
,
},
height
:
{
type
:
String
,
default
:
"
350px
"
,
},
autoResize
:
{
type
:
Boolean
,
default
:
true
,
},
dataList
:
{
type
:
Array
,
required
:
false
,
default
:
()
=>
[],
},
},
data
()
{
return
{
loading
:
null
,
series
:
[
{
name
:
"
heap_total_size
"
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
scale
:
false
,
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
heap_used_size
"
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
stack_total_size
"
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
stack_used_size
"
,
type
:
"
line
"
,
max
:
"
dataMax
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
],
legendData
:
Object
.
keys
(
seriesData
),
};
},
watch
:
{
dataList
:
{
deep
:
true
,
handler
(
val
)
{
if
(
val
.
length
>
0
)
this
.
handleData
(
val
);
},
},
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
initChart
();
});
},
beforeDestroy
()
{
if
(
!
chart
)
{
return
;
}
chart
.
clear
();
chart
.
dispose
();
},
methods
:
{
handleData
(
data
)
{
Object
.
keys
(
seriesData
).
forEach
((
key
)
=>
{
seriesData
[
key
]
=
[];
});
this
.
series
.
forEach
((
item
)
=>
{
item
.
data
=
[];
});
// chart.setOption({ series: this.series });
data
.
forEach
((
item
)
=>
{
this
.
handleMessage
(
item
);
});
let
temp
=
Object
.
assign
(
this
.
series
);
temp
.
forEach
(
item
=>
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
seriesData
,
item
.
name
))
{
item
.
data
=
seriesData
[
item
.
name
]
}
});
this
.
series
=
temp
;
this
.
$nextTick
(()
=>
{
chart
&&
chart
.
setOption
({
series
:
this
.
series
,
});
});
},
handleMessage
(
data
)
{
Object
.
keys
(
data
).
forEach
((
k
)
=>
{
if
(
this
.
legendData
.
includes
(
k
))
{
seriesData
[
k
].
push
({
name
:
k
,
value
:
[
data
.
timestamp
,
data
[
k
]],
});
}
});
},
initChart
()
{
chart
=
echarts
.
init
(
this
.
$el
,
"
macarons
"
);
this
.
setOptions
();
},
setOptions
()
{
chart
.
setOption
({
title
:
{
text
:
"
EVM
"
,
},
xAxis
:
{
type
:
"
time
"
,
splitLine
:
{
show
:
false
,
},
// data: xAxisTitle,
// boundaryGap: false,
// axisTick: {
// show: false,
// },
axisLabel
:
{
formatter
:
"
{HH}:{mm}:{ss}
"
,
},
},
yAxis
:
{
type
:
"
value
"
,
scale
:
true
,
splitLine
:
{
show
:
false
,
},
},
// grid: {
// left: 10,
// right: 10,
// bottom: 20,
// top: 30,
// containLabel: true,
// },
tooltip
:
{
trigger
:
"
axis
"
,
axisPointer
:
{
type
:
"
cross
"
,
animation
:
false
,
},
// formatter: function (params) {
// params = params[0];
// console.log(params);
// var date = new Date(params.name);
// return (
// date.getDate() +
// "/" +
// (date.getMonth() + 1) +
// "/" +
// date.getFullYear() +
// " : " +
// params.value[1]
// );
// },
padding
:
[
5
,
10
],
},
legend
:
{
data
:
this
.
legendData
,
},
series
:
this
.
series
,
});
},
},
};
</
script
>
frontend/src/views/system/components/LvglHistoryChart.vue
deleted
100644 → 0
View file @
43b4c2f6
<
template
>
<div
:class=
"className"
:style=
"
{ height: height, width: width }" />
</
template
>
<
script
>
import
*
as
echarts
from
"
echarts
"
;
require
(
"
echarts/theme/macarons
"
);
import
resize
from
"
./mixins/resize
"
;
const
seriesData
=
{
frag_pct
:
[],
free_biggest_size
:
[],
free_cnt
:
[],
free_size
:
[],
total_size
:
[],
used_cnt
:
[],
used_pct
:
[],
};
export
default
{
mixins
:
[
resize
],
props
:
{
className
:
{
type
:
String
,
default
:
"
chart
"
,
},
width
:
{
type
:
String
,
default
:
"
100%
"
,
},
height
:
{
type
:
String
,
default
:
"
350px
"
,
},
autoResize
:
{
type
:
Boolean
,
default
:
true
,
},
dataList
:
{
type
:
Array
,
required
:
false
,
default
:
()
=>
[],
},
},
data
()
{
return
{
chart
:
null
,
series
:
[
{
name
:
"
frag_pct
"
,
type
:
"
line
"
,
showSymbol
:
false
,
emphasis
:
{
scale
:
false
,
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
free_biggest_size
"
,
type
:
"
line
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
free_cnt
"
,
type
:
"
line
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
free_size
"
,
type
:
"
line
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
total_size
"
,
type
:
"
line
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
used_cnt
"
,
type
:
"
line
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
{
name
:
"
used_pct
"
,
type
:
"
line
"
,
showSymbol
:
false
,
emphasis
:
{
focus
:
"
series
"
,
blurScope
:
"
coordinateSystem
"
,
},
data
:
[],
},
],
legendData
:
Object
.
keys
(
seriesData
),
};
},
watch
:
{
dataList
:
{
deep
:
true
,
handler
(
val
)
{
if
(
val
.
length
>
0
)
this
.
handleData
(
val
);
},
},
},
mounted
()
{
this
.
$nextTick
(()
=>
{
this
.
initChart
();
});
},
beforeDestroy
()
{
if
(
!
this
.
chart
)
{
return
;
}
this
.
chart
.
dispose
();
this
.
chart
=
null
;
},
methods
:
{
handleData
(
data
)
{
Object
.
keys
(
seriesData
).
forEach
(
key
=>
{
seriesData
[
key
]
=
[]
});
this
.
series
.
forEach
(
item
=>
{
item
.
data
=
[]
});
// this.chart.setOption({ series: this.series });
data
.
forEach
((
item
)
=>
{
this
.
handleMessage
(
item
);
});
let
temp
=
Object
.
assign
(
this
.
series
);
temp
.
forEach
(
item
=>
{
if
(
Object
.
prototype
.
hasOwnProperty
.
call
(
seriesData
,
item
.
name
))
{
item
.
data
=
seriesData
[
item
.
name
]
}
});
this
.
series
=
temp
;
this
.
$nextTick
(()
=>
{
this
.
chart
&&
this
.
chart
.
setOption
({
series
:
this
.
series
,
});
});
},
handleMessage
(
data
)
{
Object
.
keys
(
data
).
forEach
((
k
)
=>
{
if
(
this
.
legendData
.
includes
(
k
))
seriesData
[
k
].
push
({
name
:
k
,
value
:
[
data
.
timestamp
,
data
[
k
]],
});
});
},
initChart
()
{
this
.
chart
=
echarts
.
init
(
this
.
$el
,
"
macarons
"
);
this
.
setOptions
();
},
setOptions
()
{
this
.
chart
.
setOption
({
title
:
{
text
:
"
LVGL
"
,
},
xAxis
:
{
type
:
"
time
"
,
splitLine
:
{
show
:
false
,
},
axisLabel
:
{
formatter
:
"
{HH}:{mm}:{ss}
"
,
},
},
yAxis
:
{
type
:
"
value
"
,
splitLine
:
{
show
:
false
,
},
},
tooltip
:
{
trigger
:
"
axis
"
,
axisPointer
:
{
type
:
"
cross
"
,
animation
:
false
,
},
padding
:
[
5
,
10
],
},
legend
:
{
data
:
this
.
legendData
,
},
series
:
this
.
series
,
});
},
},
};
</
script
>
frontend/src/views/system/monitor.vue
View file @
083183e7
This diff is collapsed.
Click to expand it.
tools/build_out/views/menu.py
View file @
083183e7
...
...
@@ -244,7 +244,7 @@ class Create(Resource):
try
:
print
(
"========>"
,
args
)
result
,
message
=
signalManager
.
actionMenuCreate
.
emit
(
args
)
result
,
message
=
signalManager
.
actionMenuCreate
.
emit
(
args
,
jwt
=
{
"uuid"
:
"551EDA6E032F16FE000847ABA4048B56"
}
)
return
response_result
(
message
,
data
=
result
)
except
Exception
as
e
:
# traceback.print_exc()
...
...
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