#load "../lib/app.uce" RENDER(Request& context) { starter_boot(context); context.var["starter"]["page_title"] = "Gauges"; starter_register_css("themes/common/css/gauges.css", context); DTree props; DTree item; <>

Gauge Components Demo

props["id"] = "horizontal_demo"; props["title"] = "Horizontal Progress Bar"; props["subtitle"] = "The original bar gauges, restyled to share the same card and token language as the new arc gauges."; props["layout"] = "horizontal"; props["style"] = "flex:1 1 24rem"; props["listen"].set_bool(true); item["value"] = "45"; item["min"] = "0"; item["max"] = "200"; item["label"] = "CPU"; item["tooltip"] = "CPU Usage"; props["items"]["cpu"] = item; item.clear(); item["value"] = "92"; item["min"] = "-50"; item["max"] = "100"; item["label"] = "Memory"; item["tooltip"] = "Memory Usage"; props["items"]["memory"] = item; item.clear(); item["value"] = "28"; item["min"] = "0"; item["max"] = "100"; item["label"] = "Disk I/O"; item["tooltip"] = "Disk I/O"; props["items"]["disk"] = item; print(component("../components/gauges/gauges:PROGRESSBAR", props, context)); props.clear(); props["id"] = "vertical_demo"; props["title"] = "Vertical Progress Bar"; props["subtitle"] = "Same abstraction, but stacked as compact KPI cards."; props["layout"] = "vertical"; props["style"] = "flex:1 1 24rem"; props["height"] = "350"; props["listen"].set_bool(true); item.clear(); item["value"] = "45"; item["min"] = "0"; item["max"] = "200"; item["label"] = "CPU"; props["items"]["cpu"] = item; item.clear(); item["value"] = "92"; item["min"] = "-50"; item["max"] = "100"; item["label"] = "RAM"; props["items"]["memory"] = item; item.clear(); item["value"] = "28"; item["min"] = "0"; item["max"] = "100"; item["label"] = "I/O"; props["items"]["disk"] = item; print(component("../components/gauges/gauges:PROGRESSBAR", props, context)); <>

Event Binding

props.clear(); props["id"] = "needle_demo"; props["title"] = "Needle Gauge"; props["subtitle"] = "The original analog gauge now uses the same elevated panels and theme-token palette as the arc gauges."; props["style"] = "flex:1 1 24rem"; props["listen"].set_bool(true); item.clear(); item["value"] = "45"; item["min"] = "0"; item["max"] = "200"; item["label"] = "CPU"; item["tooltip"] = "CPU Usage"; props["items"]["cpu"] = item; item.clear(); item["value"] = "92"; item["min"] = "-50"; item["max"] = "100"; item["label"] = "Memory"; item["tooltip"] = "Memory Usage"; props["items"]["memory"] = item; item.clear(); item["value"] = "28"; item["min"] = "0"; item["max"] = "100"; item["label"] = "Disk I/O"; item["tooltip"] = "Disk I/O"; props["items"]["disk"] = item; print(component("../components/gauges/gauges:NEEDLEGAUGE", props, context)); <>
props.clear(); props["id"] = "arc_demo"; props["title"] = "SVG Arc Gauges"; props["subtitle"] = "Backported from the llm2 overview as reusable KPI-style gauges."; props["style"] = "flex: 2 1 36rem"; props["listen"].set_bool(true); item.clear(); item["label"] = "System Load"; item["value"] = "1.8"; item["max"] = "8"; item["precision"] = "1"; item["caption"] = "LOAD 1M"; item["meta"] = "4 cores available"; props["items"]["load"] = item; item.clear(); item["label"] = "Memory"; item["value"] = "62"; item["max"] = "100"; item["precision"] = "0"; item["unit"] = "%"; item["caption"] = "MEMORY"; item["meta"] = "9.9 / 16 GB"; props["items"]["memory_arc"] = item; item.clear(); item["label"] = "Network"; item["value"] = "18"; item["max"] = "100"; item["precision"] = "0"; item["unit"] = " MB/s"; item["caption"] = "THROUGHPUT"; item["meta"] = "Inbound + outbound"; props["items"]["network"] = item; print(component("../components/gauges/gauges:ARCGAUGE", props, context)); <>

Arc Gauge Controls

}