Changed Rocket.toml to be example and fixed HDD bars
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
[default]
|
[default]
|
||||||
template_dir = "templates"
|
template_dir = "templates"
|
||||||
address = "0.0.0.0"
|
#address = "0.0.0.0"
|
||||||
@@ -26,6 +26,7 @@ struct DiskInfo {
|
|||||||
total_space_bytes: u64,
|
total_space_bytes: u64,
|
||||||
available_space: String,
|
available_space: String,
|
||||||
available_space_bytes: u64,
|
available_space_bytes: u64,
|
||||||
|
consumed_space_bytes: u64,
|
||||||
mount_point: String,
|
mount_point: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,6 +79,7 @@ fn get_system_info() -> SysInfo {
|
|||||||
total_space_bytes: ts,
|
total_space_bytes: ts,
|
||||||
available_space: Byte::from(ass).to_string(),
|
available_space: Byte::from(ass).to_string(),
|
||||||
available_space_bytes: ass,
|
available_space_bytes: ass,
|
||||||
|
consumed_space_bytes: ts - ass,
|
||||||
mount_point: disk.mount_point().display().to_string(),
|
mount_point: disk.mount_point().display().to_string(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<h3 class="node_data">{{disk.name}}</h3>
|
<h3 class="node_data">{{disk.name}}</h3>
|
||||||
<p class="subheading">Mounted at: <span class="node_data">{{disk.mount_point}}</span></p>
|
<p class="subheading">Mounted at: <span class="node_data">{{disk.mount_point}}</span></p>
|
||||||
<p><span class="node_data">{{disk.available_space}}</span> of <span class="node_data">{{disk.total_space}}</span> available</p>
|
<p><span class="node_data">{{disk.available_space}}</span> of <span class="node_data">{{disk.total_space}}</span> available</p>
|
||||||
<progress class="diskspace" max="{{disk.total_space_bytes}}" value="{{disk.available_space_bytes}}"></progress>
|
<progress class="diskspace" max="{{disk.total_space_bytes}}" value="{{disk.consumed_space_bytes}}"></progress>
|
||||||
{% if not loop.last %}
|
{% if not loop.last %}
|
||||||
<hr>
|
<hr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user