diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-24 22:56:30 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-24 22:56:30 -0400 |
commit | 192c187ebcaf20d2fc76c7a6e0a259f53dfe3404 (patch) | |
tree | df5a6ea3815f1708176fddb3a39a53a3671a2160 /src/render | |
parent | 813996dd52a40124b453dfb35617036d1e88357b (diff) |
system_status: Rendering the front page by section
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/mod.rs | 44 |
1 files changed, 0 insertions, 44 deletions
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("<!DOCTYPE html>"); - 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() -} |