From 8a1cb00e94e9fbd3bc28ef47cc0b1c7e1c40d768 Mon Sep 17 00:00:00 2001 From: XDL163 <1056102915@qq.com> Date: Wed, 18 Dec 2024 10:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Computer_status_get.py | 2 ++ apps.py | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 Computer_status_get.py create mode 100644 apps.py diff --git a/Computer_status_get.py b/Computer_status_get.py new file mode 100644 index 0000000..4e36a6b --- /dev/null +++ b/Computer_status_get.py @@ -0,0 +1,2 @@ +#每隔一秒,读取电脑状态,打包成Computer_status对象,调用Computer_status.write_data +#每隔1天,调用Computer_status.delete_data,删除30天之前的数据 diff --git a/apps.py b/apps.py new file mode 100644 index 0000000..f8a70b9 --- /dev/null +++ b/apps.py @@ -0,0 +1,6 @@ +#展示Computer_status对象中的状态,以时间为轴,绘制折线图 +# +# 可以选择实时展示,每隔1s发送请求,服务器调用Computer_status.get_data_json_30s,返回json +# +# 可以选择查看指定时间端的历史信息,发送请求,包含开始时间和结束时间,服务器调用Computer_status.get_data_json,返回json + -- 2.43.0