From 390a3c4a784a5350d7b3fc64246a9f338f3b50f9 Mon Sep 17 00:00:00 2001 From: grunt009 Date: Fri, 11 Aug 2017 10:50:02 -0400 Subject: [PATCH] Fixed device sorting in status.cgi Changed the sort method in status.cgi for vdev devices. This allows for correct sorting of devices in multiple vdevs. --- status.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/status.cgi b/status.cgi index 61a7c35..db5d8ce 100755 --- a/status.cgi +++ b/status.cgi @@ -26,7 +26,7 @@ my %status = zpool_status($in{'pool'}); #print "Config:"; print ui_columns_start([ "Virtual Device", "State", "Read", "Write", "Cksum" ]); #@devs = ( values %status{}{devs} ); -foreach $key (sort keys %status) +foreach $key (sort {$a <=> $b} (keys %status)) { if (($status{$key}{parent} =~ /pool/) && ($key != 0)) { print ui_columns_row(["".$status{$key}{name}."", $status{$key}{state}, $status{$key}{read}, $status{$key}{write}, $status{$key}{cksum}]);