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
This commit is contained in:
@@ -2165,7 +2165,7 @@
|
|||||||
document.getElementById('cpu-overcommit').textContent = `${data.overcommit.cpu_overcommit_percent || 0}%`;
|
document.getElementById('cpu-overcommit').textContent = `${data.overcommit.cpu_overcommit_percent || 0}%`;
|
||||||
document.getElementById('memory-overcommit').textContent = `${data.overcommit.memory_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('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
|
// Store overcommit data for modal display
|
||||||
window.overcommitData = data.overcommit;
|
window.overcommitData = data.overcommit;
|
||||||
@@ -2640,7 +2640,7 @@
|
|||||||
<strong>Formula:</strong> (Total Usage ÷ Total Requests) × 100
|
<strong>Formula:</strong> (Total Usage ÷ Total Requests) × 100
|
||||||
</div>
|
</div>
|
||||||
<div class="metric-detail">
|
<div class="metric-detail">
|
||||||
<strong>Current Value:</strong> ${window.overcommitData?.resource_utilization || 0}% (real-time data from Prometheus)
|
<strong>Current Value:</strong> ${(window.overcommitData?.resource_utilization || 0).toFixed(1)}% (real-time data from Prometheus)
|
||||||
</div>
|
</div>
|
||||||
<div class="metric-detail">
|
<div class="metric-detail">
|
||||||
<strong>Data Source:</strong>
|
<strong>Data Source:</strong>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ metadata:
|
|||||||
haproxy.router.openshift.io/timeout: "300s"
|
haproxy.router.openshift.io/timeout: "300s"
|
||||||
haproxy.router.openshift.io/rate-limit: "100"
|
haproxy.router.openshift.io/rate-limit: "100"
|
||||||
spec:
|
spec:
|
||||||
|
host: oru.apps.shrocp4upi419ovn.lab.upshift.rdu2.redhat.com
|
||||||
to:
|
to:
|
||||||
kind: Service
|
kind: Service
|
||||||
name: resource-governance-service
|
name: resource-governance-service
|
||||||
|
|||||||
Reference in New Issue
Block a user