use rocket::serde; use handlebars::Handlebars; // use rocket::serde::__private::de::TagContentOtherField::Content; use urlencoding::encode; mod installation; mod vrm_account; struct InstallationToHtmlInterface<'a> { Name: &'a str, Ip: i64, Vrm: &'a str, Identifier: &'a str, Serial: &'a str, EscapedName: &'a str, Online: &'a str, LastSeen: &'a str, NumBatteries: &'a str, BatteryVersion: &'a str, ServerIp : &'a str, FirmwareVersion: &'a str, } // impl Default for InstallationToHtmlInterface{ // fn default() -> Self { // Self{ // Name: "", // Ip: 0, // Vrm: "", // Identifier: "", // Serial: "", // EscapedName: "", // Online: "", // LastSeen: "", // NumBatteries: "", // BatteryVersion: "", // ServerIp : "10.2.0.1", // FirmwareVersion: "AF09", // } // } // } #[macro_use] extern crate rocket; #[get("/")] async fn index() -> String{ let res = vrm_account::all_installations_request().await; let json = rocket::serde::Deserialize(res.unwrap().text().await.unwrap()); let source = "
Name | Gui | VRM | Grafana | Identifier | Last Seen | Serial | #Batteries | Firmware-Version | Update |
---|