Skip to content

Commit d8755cf

Browse files
committed
fix: 修了点东西
1 parent bc51493 commit d8755cf

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

assets/js/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,10 @@ async function load() {
10971097
}, 10000)
10981098
$dashboard_locals.basic_task_system_info = Tools.runTask(setInterval, async () => {
10991099
var resp = await $channel.send("systeminfo")
1100-
console.log(resp)
1100+
$dashboard_locals.system_info_connection.value = resp.connection.tcp + resp.connection.udp
1101+
$dashboard_locals.system_info_memory.value = Tools.formatBytes(resp.memory)
1102+
$dashboard_locals.system_info_cpu.value = resp.cpu.toFixed(1) + "%"
1103+
$dashboard_locals.system_info_cpu_load.value = resp.loads.toFixed(1) + "%"
11011104
}, 1000)
11021105

11031106
} else {

core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def measure_storage(self) -> bool:
161161

162162
const = Const()
163163

164-
VERSION = "3.2.3"
164+
VERSION = "3.2.4"
165165
API_VERSION = "1.13.1"
166166
USER_AGENT = f"openbmclapi/{API_VERSION} python-openbmclapi/{VERSION}"
167167
PYTHON_VERSION = ".".join(map(str, (sys.version_info.major, sys.version_info.minor, sys.version_info.micro)))

core/dashboard.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,7 @@ async def handle_api(
378378
"loads": 0
379379
}
380380
if val is not None:
381-
CounterSystemInfo(
382-
val._,
383-
val.value.cpu_usage,
384-
val.value.memory_usage,
385-
val.value.connection
386-
)
381+
ret_data["cpu"] = val.value.cpu_usage
387382
ret_data["memory"] = val.value.memory_usage
388383
ret_data["connection"]["tcp"] = val.value.connection.tcp
389384
ret_data["connection"]["udp"] = val.value.connection.udp

0 commit comments

Comments
 (0)