diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-28 13:50:57 -0400 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2017-05-28 13:50:57 -0400 |
commit | a2395baef35d3daedb66268d6e7bbcdad7b4cbe9 (patch) | |
tree | 445794b23e21040b49cbb0a25341e5a9a28372a9 /src/main.rs | |
parent | 5545fc8938f7e609c45d8dfef346ba50d7c681f9 (diff) |
unit_status: Render as html.
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 710fbda..36463a6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -104,10 +104,11 @@ fn unit_status(r: &mut Request) -> IronResult<Response> { format!("Unit ({}) does not match {}", unit_name, re)))); } - let unit = unit::get_units(unit_name); + let ref unit = itry!(unit::get_units(unit_name))[0]; let log = itry!(journal::get_log(unit_name, 15)); Ok(Response::with((status::Ok, - format!("{:?}\n{}", unit, log)))) + Header(ContentType::html()), + render::unit_status(&unit, &log)))) } fn main() { |