projects
/
valheim_web.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add world size
[valheim_web.git]
/
backend
/
src
/
main.rs
diff --git
a/backend/src/main.rs
b/backend/src/main.rs
index
88424da
..
f14592e
100644
(file)
--- a/
backend/src/main.rs
+++ b/
backend/src/main.rs
@@
-21,8
+21,9
@@
mod valheim_controller;
struct MainTemplate {
text_status: String,
memory: String,
struct MainTemplate {
text_status: String,
memory: String,
- cpu: String,
- uptime: String
+ load_average: String,
+ uptime: String,
+ world_size: String
}
#[derive(Deserialize)]
}
#[derive(Deserialize)]
@@
-41,12
+42,13
@@
async fn main_page(/*key_shared: web::Data<Mutex<String>>,*/ query: Query<Reques
MainTemplate {
text_status: String::from("Valheim server is up and running :)"),
memory: info.format_memory(),
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);
},
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(), uptim
e: 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_siz
e: value_unknown.clone() }
}
}
}
}