feat(ui): detailed per-pool block with type, capacity bar, scrub state
This commit is contained in:
parent
612091ff1e
commit
f05c20ed0b
2 changed files with 75 additions and 14 deletions
|
|
@ -17,9 +17,22 @@ defmodule ServerWeb.HostDetailLiveTest do
|
|||
%{
|
||||
"name" => "rpool",
|
||||
"health" => "ONLINE",
|
||||
"pool_type" => "mirror",
|
||||
"size_bytes" => 500_000_000_000,
|
||||
"allocated_bytes" => 200_000_000_000,
|
||||
"free_bytes" => 300_000_000_000,
|
||||
"capacity_percent" => 40,
|
||||
"fragmentation_percent" => 17,
|
||||
"error_count" => 0,
|
||||
"last_scrub_end" => "Sat Apr 19 02:00:00 2026"
|
||||
"vdev_count" => 1,
|
||||
"degraded_vdev_count" => 0,
|
||||
"scan_function" => "scrub",
|
||||
"scan_state" => "FINISHED",
|
||||
"last_scrub_end" => "Sat Apr 19 02:00:00 2026",
|
||||
"vdevs" => [
|
||||
%{"name" => "mirror-0", "type" => "mirror", "state" => "ONLINE",
|
||||
"read_errors" => 0, "write_errors" => 0, "checksum_errors" => 0}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
@ -75,6 +88,12 @@ defmodule ServerWeb.HostDetailLiveTest do
|
|||
assert html =~ "nginx"
|
||||
assert html =~ "rpool/data"
|
||||
assert html =~ "local"
|
||||
assert html =~ "mirror"
|
||||
assert html =~ "465.7 GB" # size_bytes formatted
|
||||
assert html =~ "186.3 GB" # allocated_bytes formatted
|
||||
assert html =~ "279.4 GB" # free_bytes formatted
|
||||
assert html =~ "capbar"
|
||||
assert html =~ "scrub"
|
||||
end
|
||||
|
||||
test "404 for unknown host", %{conn: conn} do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue