From 8eab0130f542c6382f04df8768ad3c9699ad1531 Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Wed, 21 Feb 2024 15:48:15 -0500 Subject: [PATCH] ui: better layout for the filter selections --- src/routes.rs | 2 +- static/lib.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/routes.rs b/src/routes.rs index 47dbb22..0ca1186 100644 --- a/src/routes.rs +++ b/src/routes.rs @@ -115,7 +115,7 @@ pub async fn dash_ui(State(config): State, Path(dash_idx): Path) .collect::>(); html!( h1 { (dash.title) } - span-selector {} + span-selector class="row-flex" {} @for (idx, graph) in &graph_iter { (graph_component(dash_idx, *idx, *graph)) } diff --git a/static/lib.js b/static/lib.js index b97168f..5c9d4ec 100644 --- a/static/lib.js +++ b/static/lib.js @@ -33,6 +33,9 @@ class TimeseriesGraph extends HTMLElement { this.#height = 600; this.#pollSeconds = 30; this.#menuContainer = this.appendChild(document.createElement('div')); + // TODO(jwall): These should probably be done as template clones so we have less places + // to look for class attributes. + this.#menuContainer.setAttribute("class", "row-flex"); this.#targetNode = this.appendChild(document.createElement("div")); }