45 lines
1.4 KiB
PHP
Raw Normal View History

<?php
$graph_type = "storage_usage";
echo $vars['view'];
?>
<div class="table-responsive">
<table id="storage" class="table table-hover table-condensed storage">
<thead>
<tr>
<th data-column-id="device_id">Device</th>
<th data-column-id="storage_descr">Storage</th>
<th data-column-id="graph" data-sortable="false"></th>
<th data-column-id="usage">Usage</th>
<th data-column-id="storage_used">Used</th>
</tr>
</thead>
</table>
</div>
<script>
var grid = $("#storage").bootgrid({
ajax: true,
post: function ()
{
return {
id: "storage",
view: '<?php echo $vars['view']; ?>'
};
},
url: "/ajax_table.php",
formatters: {
"status": function(column,row) {
return "<h4><span class='label label-"+row.extra+" threeqtr-width'>" + row.msg + "</span></h4>";
},
"ack": function(column,row) {
return "<button type='button' class='btn btn-"+row.ack_col+" btn-sm command-ack-alert' data-target='#ack-alert' data-state='"+row.state+"' data-alert_id='"+row.alert_id+"' name='ack-alert' id='ack-alert' data-extra='"+row.extra+"'><span class='glyphicon glyphicon-"+row.ack_ico+"'aria-hidden='true'></span></button>";
}
},
templates: {
}
});
</script>