Commit 5045466c authored by wanli's avatar wanli

🐞 fix(资源监视器): 修复一些变量为空的判断

parent 2c1deb48
''' '''
Author: your name Author: your name
Date: 2021-06-29 19:33:41 Date: 2021-06-29 19:33:41
LastEditTime: 2021-07-05 18:56:38 LastEditTime: 2021-07-21 11:12:31
LastEditors: Please set LastEditors LastEditors: Please set LastEditors
Description: In User Settings Edit Description: In User Settings Edit
FilePath: \evm-store\backend\view\monitor.py FilePath: \evm-store\backend\view\monitor.py
...@@ -240,7 +240,13 @@ class MainHandler(BaseHandler): ...@@ -240,7 +240,13 @@ class MainHandler(BaseHandler):
self.write(json.dumps({ "msg": "Hello, world" })) self.write(json.dumps({ "msg": "Hello, world" }))
def post(self): def post(self):
if not self.request.body:
return None
data = tornado.escape.json_decode(self.request.body) data = tornado.escape.json_decode(self.request.body)
logger.info(data)
self.write(json.dumps({ 'code': 100, 'data': data, 'msg': 'success' })) 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}]} 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}]}
......
...@@ -13,9 +13,6 @@ const seriesData = { ...@@ -13,9 +13,6 @@ const seriesData = {
free_size: [], free_size: [],
free_space_size: [], free_space_size: [],
used_space_size: [], used_space_size: [],
total_size: [],
used_cnt: [],
used_pct: [],
}; };
export default { export default {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment