struct MainTemplate {
text_status: String,
memory: String,
- cpu: String,
- uptime: String
+ load_average: String,
+ uptime: String,
+ world_size: String
}
#[derive(Deserialize)]
MainTemplate {
text_status: String::from("Valheim server is up and running :)"),
memory: info.format_memory(),
- cpu: info.format_cpu_usage(),
- uptime: info.format_uptime()
+ load_average: info.format_load_average(),
+ uptime: info.format_uptime(),
+ world_size: info.format_world_size()
},
None => {
let value_unknown = String::from(VALUE_UNKNOWN);
- MainTemplate { text_status: String::from("Valheim server is down :("), memory: value_unknown.clone(), cpu: value_unknown.clone(), uptime: value_unknown.clone() }
+ MainTemplate { text_status: String::from("Valheim server is down :("), memory: value_unknown.clone(), load_average: value_unknown.clone(), uptime: value_unknown.clone(), world_size: value_unknown.clone() }
}
}