diff --git a/assets/sai.js b/assets/sai.js
index d305542..74ba59d 100644
--- a/assets/sai.js
+++ b/assets/sai.js
@@ -1710,7 +1710,7 @@ function ws_open_sai()
const diskBar = builderDiv.querySelector(".res-bar-disk");
if (cpuBar) {
- let cpu_percentage = (jso.cpu_percent / (jso.core_count * 1000)) * 100;
+ let cpu_percentage = jso.cpu_percent / 10;
if (cpu_percentage > 100) cpu_percentage = 100;
if (cpu_percentage < 0) cpu_percentage = 0;
let width_class = `w-${Math.round(cpu_percentage / 5) * 5}`;
@@ -1725,7 +1725,12 @@ function ws_open_sai()
}
if (ram_percentage > 100) ram_percentage = 100;
if (ram_percentage < 0) ram_percentage = 0;
- let width_class = `w-${Math.round(ram_percentage / 5) * 5}`;
+
+ let width = Math.round(ram_percentage / 5) * 5;
+ if (width === 0 && ram_percentage > 0)
+ width = 5;
+
+ let width_class = `w-${width}`;
ramBar.classList.forEach(c => { if (c.startsWith('w-')) ramBar.classList.remove(c); });
ramBar.classList.add(width_class);
@@ -1737,7 +1742,12 @@ function ws_open_sai()
}
if (disk_percentage > 100) disk_percentage = 100;
if (disk_percentage < 0) disk_percentage = 0;
- let width_class = `w-${Math.round(disk_percentage / 5) * 5}`;
+
+ let width = Math.round(disk_percentage / 5) * 5;
+ if (width === 0 && disk_percentage > 0)
+ width = 5;
+
+ let width_class = `w-${width}`;
diskBar.classList.forEach(c => { if (c.startsWith('w-')) diskBar.classList.remove(c); });
diskBar.classList.add(width_class);
diff --git a/src/server/s-task-helpers.c b/src/server/s-task-helpers.c
index a4776ea..81cd6ad 100644
--- a/src/server/s-task-helpers.c
+++ b/src/server/s-task-helpers.c
@@ -43,7 +43,7 @@ sais_get_task_metrics_estimates(struct vhd *vhd, sai_task_t *task)
if (!vhd->pdb_metrics)
return;
- if (!task->repo_name || !task->platform[0])
+ if (!task->repo_name || !task->platform[0] || !task->taskname[0])
return;
if (lws_genhash_init(&ctx, LWS_GENHASH_TYPE_SHA256) ||
diff --git a/src/server/s-webops.c b/src/server/s-webops.c
index 72ae57d..82bc57c 100644
--- a/src/server/s-webops.c
+++ b/src/server/s-webops.c
@@ -61,8 +61,8 @@ _sais_websrv_broadcast(struct lws_ss_handle *h, void *arg)
info->head_upstream = &m->bl_srv_to_web;
info->private_heads = m->private_heads;
- lwsl_ss_notice(h, "Queueing %u bytes, ridx %d, ff_flags: %u\n",
- (unsigned int)info->len, info->private_source_idx, info->ss_flags);
+ // lwsl_ss_notice(h, "Queueing %u bytes, ridx %d, ff_flags: %u\n",
+ // (unsigned int)info->len, info->private_source_idx, info->ss_flags);
*pi = info->ss_flags;