Spaces:
Running
Running
AJAY KASU commited on
Commit ·
02fc6bc
1
Parent(s): c3aab0c
Fix: UI Constraint Visualization
Browse files- api/static/index.html +10 -1
api/static/index.html
CHANGED
|
@@ -493,7 +493,16 @@
|
|
| 493 |
function displayData(data, excluded) {
|
| 494 |
// Metrics
|
| 495 |
document.getElementById('teMetric').innerText = (data.tracking_error * 100).toFixed(4) + "%";
|
| 496 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 497 |
|
| 498 |
// AI Text - Markdown clean
|
| 499 |
// Simple replace of **bold** with <b>
|
|
|
|
| 493 |
function displayData(data, excluded) {
|
| 494 |
// Metrics
|
| 495 |
document.getElementById('teMetric').innerText = (data.tracking_error * 100).toFixed(4) + "%";
|
| 496 |
+
|
| 497 |
+
let constraintText = excluded.length > 0 ? "Excl: " + excluded.join(", ") : "None";
|
| 498 |
+
if (data.max_weight_applied) {
|
| 499 |
+
constraintText += ` | Max Wgt: ${(data.max_weight_applied * 100).toFixed(1)}%`;
|
| 500 |
+
} else if (payload.max_weight) {
|
| 501 |
+
// Determine if backend ignored it or if we just want to show what we sent
|
| 502 |
+
constraintText += ` | Max Wgt: ${(payload.max_weight * 100).toFixed(1)}% (Requested)`;
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
document.getElementById('excludedMetric').innerText = constraintText;
|
| 506 |
|
| 507 |
// AI Text - Markdown clean
|
| 508 |
// Simple replace of **bold** with <b>
|