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
8bd856c3
Commit
8bd856c3
authored
Jul 24, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix(修改资源监控模块): 用户先设备上线,用户也可以接收到消息
parent
0587447b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
11 deletions
+9
-11
backend/app/__init__.py
backend/app/__init__.py
+3
-3
backend/view/monitor.py
backend/view/monitor.py
+3
-5
frontend/src/views/system/monitor.vue
frontend/src/views/system/monitor.vue
+2
-2
tools/build_out/tests/http_interval.py
tools/build_out/tests/http_interval.py
+1
-1
No files found.
backend/app/__init__.py
View file @
8bd856c3
...
...
@@ -3,12 +3,12 @@
import
os
import
json
from
.signal_manager
import
signalManager
from
.setting
import
config
import
logging
from
.setting
import
config
from
.signal_manager
import
signalManager
from
controller
import
initConnect
logger
=
logging
.
getLogger
(
"ApplicationManager"
)
logger
=
logging
.
getLogger
(
__name__
)
def
loadSettings
(
path
=
None
):
global
config
...
...
backend/view/monitor.py
View file @
8bd856c3
'''
Author: your name
Date: 2021-06-29 19:33:41
LastEditTime: 2021-07-24 0
1:18:54
LastEditTime: 2021-07-24 0
9:49:30
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\b
ackend
\v
iew
\
monitor.py
...
...
@@ -167,9 +167,9 @@ class NotifyHandler(BaseWebsocket):
className
=
self
.
__class__
.
__name__
message
=
json
.
loads
(
message
)
# 判断消息类型
if
message
.
get
(
"type"
):
if
message
.
get
(
"type"
)
and
message
.
get
(
"token"
)
:
# 获取token值,检验正确与否,获取uuid
payload
=
jwt
.
decode
(
message
.
get
(
"token"
),
config
[
'SECRET_KEY'
],
verify
=
True
,
algorithms
=
[
'HS256'
],
options
=
{
'require'
:
[
'exp'
,
'iss'
,
'sub'
,
'aud'
,
'iat'
,
'data'
]},
audience
=
"bytecode"
)
payload
=
jwt
.
decode
(
message
.
get
(
"token"
),
config
[
'SECRET_KEY'
],
verify
=
True
,
algorithms
=
[
'HS256'
],
options
=
{
'verify_aud'
:
False
}
)
# 认证包,认证不通过,则剔除该连接
if
message
.
get
(
"type"
)
==
"auth"
:
...
...
@@ -245,9 +245,7 @@ class MainHandler(BaseHandler):
try
:
data
=
tornado
.
escape
.
json_decode
(
self
.
request
.
body
)
logger
.
info
(
data
)
self
.
write
(
json
.
dumps
({
'code'
:
100
,
'data'
:
data
,
'msg'
:
'success'
}))
message
=
{
'imei'
:
'12345678900005'
,
'type'
:
'report'
,
'system'
:
{
'free_size'
:
0
},
'lvgl'
:
{
'total_size'
:
5242880
,
'free_cnt'
:
31
,
'free_size'
:
1279664
,
'free_biggest_size'
:
1205448
,
'used_cnt'
:
832
,
'used_pct'
:
76
,
'frag_pct'
:
6
},
'evm'
:
{
'total_size'
:
2097152
,
'free_size'
:
0
,
'gc_usage'
:
50
},
'image'
:
[{
'uri'
:
'evue_launcher'
,
'length'
:
1043
,
'png_total_count'
:
0
,
'png_uncompressed_size'
:
0
,
'png_file_size'
:
0
},
{
'uri'
:
'kdgs_1_storyList'
,
'length'
:
9608
,
'png_total_count'
:
193
,
'png_uncompressed_size'
:
370884
,
'png_file_size'
:
209807
}]}
...
...
frontend/src/views/system/monitor.vue
View file @
8bd856c3
...
...
@@ -612,7 +612,7 @@ export default {
// this.systemHistory = systemList;
// this.evmHistory = evmList;
// this.lvglHistory = lvglList;
// 清空图
标
数据
// 清空图
表
数据
})
.
catch
((
err
)
=>
{
console
.
log
(
err
);
...
...
@@ -683,7 +683,7 @@ export default {
mounted
()
{},
destroyed
()
{
// 页面关闭则销毁该数据库
//
monitor.deleteDB()
monitor
.
deleteDB
()
},
created
()
{
monitor
...
...
tools/build_out/tests/http_interval.py
View file @
8bd856c3
'''
Author: your name
Date: 2021-07-22 19:01:41
LastEditTime: 2021-07-24 0
0:27:21
LastEditTime: 2021-07-24 0
9:48:09
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\t
ools
\b
uild_out
\t
ests
\
http_interval.py
...
...
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