From 192c187ebcaf20d2fc76c7a6e0a259f53dfe3404 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Wed, 24 May 2017 22:56:30 -0400 Subject: system_status: Rendering the front page by section --- src/render/mod.rs | 44 -------------------------------------------- 1 file changed, 44 deletions(-) (limited to 'src/render') diff --git a/src/render/mod.rs b/src/render/mod.rs index d391b6e..49c3086 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -63,47 +63,3 @@ pub fn system_status(sections: &[(String, Vec<&unit::Unit>)]) -> String { }; render_in_page(b) } - -pub fn render_message(message: &str, units: &[unit::Unit]) -> String { - (html!{ - : Raw(""); - html { - head { - title: "Title"; - link(rel="stylesheet", type="text/css", href="static/main.css"); - } - body { - p { - : message - } - h1 { - : "Units" - } - table { - tr { - th { - : "Unit" - } - th { - : "Active" - } - } - @ for unit in units { - tr { - td { - : &unit.name - } - td { - : format_args!("{} ({})", - &unit.active_state, - &unit.sub_state) - } - } - } - } - } - } - }) - .into_string() - .unwrap() -} -- cgit v1.2.3