From 2e9ed3e7b35e070f337e8777fbb96f64650429a8 Mon Sep 17 00:00:00 2001 From: andersonid Date: Fri, 3 Oct 2025 07:18:45 -0300 Subject: [PATCH] fix: format Resource Utilization to show only 1 decimal place - Update resource utilization display to use .toFixed(1) for better readability - Apply formatting to both main dashboard and modal details - Change from 266.04049998033537% to 266.0% for human readability - Improve user experience with cleaner number formatting --- app/static/index.html | 4 ++-- k8s/route.yaml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/static/index.html b/app/static/index.html index 7656693..7595341 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -2165,7 +2165,7 @@ document.getElementById('cpu-overcommit').textContent = `${data.overcommit.cpu_overcommit_percent || 0}%`; document.getElementById('memory-overcommit').textContent = `${data.overcommit.memory_overcommit_percent || 0}%`; document.getElementById('namespaces-in-overcommit').textContent = data.overcommit.namespaces_in_overcommit || 0; - document.getElementById('resource-utilization').textContent = `${data.overcommit.resource_utilization || 0}%`; + document.getElementById('resource-utilization').textContent = `${(data.overcommit.resource_utilization || 0).toFixed(1)}%`; // Store overcommit data for modal display window.overcommitData = data.overcommit; @@ -2640,7 +2640,7 @@ Formula: (Total Usage ÷ Total Requests) × 100
- Current Value: ${window.overcommitData?.resource_utilization || 0}% (real-time data from Prometheus) + Current Value: ${(window.overcommitData?.resource_utilization || 0).toFixed(1)}% (real-time data from Prometheus)
Data Source: diff --git a/k8s/route.yaml b/k8s/route.yaml index c637038..21bbcb5 100644 --- a/k8s/route.yaml +++ b/k8s/route.yaml @@ -10,6 +10,7 @@ metadata: haproxy.router.openshift.io/timeout: "300s" haproxy.router.openshift.io/rate-limit: "100" spec: + host: oru.apps.shrocp4upi419ovn.lab.upshift.rdu2.redhat.com to: kind: Service name: resource-governance-service