Skip to content

Commit

Permalink
Fixed device sorting in status.cgi
Browse files Browse the repository at this point in the history
Changed the sort method in status.cgi for vdev devices. This allows for correct sorting of devices in multiple vdevs.
  • Loading branch information
grunt009 authored Aug 11, 2017
1 parent 768d44f commit 390a3c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion status.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -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(["<a href='config-vdev.cgi?pool=".$status{0}{pool}.'&dev='.$key."'>".$status{$key}{name}."</a>", $status{$key}{state}, $status{$key}{read}, $status{$key}{write}, $status{$key}{cksum}]);
Expand Down

0 comments on commit 390a3c4

Please sign in to comment.