Module nri::web [-] [+] [src]

Web interface to view and control running services

Uses the Iron web framework, Handlebars templates, and Twitter Boostrap.

Reexports

extern crate iron;
extern crate "handlebars_iron" as hbs;
extern crate staticfile;
extern crate mount;
extern crate router;
extern crate hyper;
extern crate "rustc_serialize" as serialize;
extern crate websocket;
use std::prelude::v1::*;
use std::io::Write;
use std::path::Path;
use std::sync::{Arc, Mutex};
use std::sync::mpsc::{channel, Sender};
use std::collections::BTreeMap;
use super::comms::{Controllable, CmdFrom};
use self::iron::prelude::*;
use self::iron::{status, typemap};
use self::iron::middleware::Handler;
use self::hbs::{Template, HandlebarsEngine, Watchable};
use self::serialize::json::{ToJson, Json};
use self::staticfile::Static;
use self::mount::Mount;
use self::router::Router;
use self::hyper::server::Listening;
use self::websocket::Server;

Structs

Service

Service descriptor

Web

Controllable struct for the web server

Functions

control

Handler for starting/stopping a service

index

Handler for the main page of the web interface

relpath

Make a path relative to the current file's directory