From fc25fc5e5a8aee7479f50c14065364eeb34e4870 Mon Sep 17 00:00:00 2001 From: filesite Date: Sat, 20 Apr 2024 03:55:34 +0800 Subject: [PATCH] add cache time to api stats --- heroUnion.mjs | 1 + public/index.html | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/heroUnion.mjs b/heroUnion.mjs index 8f6d3ac..58af7d9 100644 --- a/heroUnion.mjs +++ b/heroUnion.mjs @@ -551,6 +551,7 @@ class HeroUnion { this.stats.taskNotifyStatus = this.taskNotifyStatus; this.stats.heroStatus = this.heroStatus; this.stats.run_seconds = common.getTimestampInSeconds() - this.stats.start_time; + this.stats.cache_time = this.task_cache_time; return this.stats; } diff --git a/public/index.html b/public/index.html index d0995c7..70f4ba3 100644 --- a/public/index.html +++ b/public/index.html @@ -49,7 +49,7 @@

https://git.filesite.io/filesite/machete_hero

HeroUnion联盟状态 - 已运行...

-

任务状态(最近 24 小时)

+

任务状态(最近...

... @@ -73,7 +73,7 @@
-

任务通知状态(最近 24 小时)

+

任务通知状态(最近...

... @@ -189,6 +189,7 @@ }).done(function(data) { $('#herounion_stats').text(JSON.stringify(data, null, 4)); $('.run_time').text( formatSeconds(data.run_seconds) ); + $('.cache_time').text( formatSeconds(data.cache_time) ); renderStats('taskStatus', data.taskStatus); renderStats('taskNotifyStatus', data.taskNotifyStatus); renderStats('heroStatus', data.heroStatus);