{
    global $config;
    array_sort_key($config['zfs']['pools']['pool'], "name");
    array_sort_key($config['zfs']['vdevices']['vdevice'], "name");
    $a_pool = $config['zfs']['pools']['pool'];
    $a_vdevice = $config['zfs']['vdevices']['vdevice'];
    // Get zpool status informations
    $cmd = "zpool status -v";
    if (isset($_GET['pool'])) {
        $cmd .= " {$_GET['pool']}";
    }
    mwexec2($cmd, $rawdata);
    return implode("\n", $rawdata);
}
if (is_ajax()) {
    $status = zfs_zpool_get_status();
    render_ajax($status);
}
include "fbegin.inc";
?>
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
	var gui = new GUI;
	gui.recall(0, 5000, 'disks_zfs_zpool_info.php', null, function(data) {
		$('#zfs_zpool_status').text(data.data);
	});
});
//]]>
</script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
"><span><?php 
echo gettext("Information");
?>
</span></a></li>
				<li class="tabinact"><a href="disks_zfs_zpool_io.php"><span><?php 
echo gettext("I/O statistics");
?>
</span></a></li>
			</ul>
		</td>
	</tr>
	<tr>
		<td class="tabcont">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<?php 
html_titleline(gettext("Pool information and status"));
?>
				<tr>
					<td class="listt">
						<pre><span id="zfs_zpool_status"><?php 
echo zfs_zpool_get_status();
?>
</span></pre>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<?php 
include "fend.inc";