Improve NVMe serial parsing and restructure MergerFS display
All checks were successful
Build and Release / build-and-release (push) Successful in 1m25s
All checks were successful
Build and Release / build-and-release (push) Successful in 1m25s
- Fix NVMe serial number parsing to handle whitespace variations - Move mount point to MergerFS header, remove drive count - Restructure data drives to same level as parity with Data_1, Data_2 labels - Remove "Total:" label from pool usage line - Update parity to use closing tree symbol as last item
This commit is contained in:
@@ -457,11 +457,15 @@ impl DiskCollector {
|
||||
}
|
||||
}
|
||||
|
||||
// Serial number parsing
|
||||
if line.starts_with("Serial Number:") {
|
||||
// Serial number parsing (both SATA and NVMe)
|
||||
if line.contains("Serial Number:") {
|
||||
if let Some(serial_part) = line.split("Serial Number:").nth(1) {
|
||||
if let Some(serial_str) = serial_part.split_whitespace().next() {
|
||||
serial_number = Some(serial_str.to_string());
|
||||
let serial_str = serial_part.trim();
|
||||
if !serial_str.is_empty() {
|
||||
// Take first whitespace-separated token
|
||||
if let Some(serial) = serial_str.split_whitespace().next() {
|
||||
serial_number = Some(serial.to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user