Esempio n. 1
0
<?php

namespace CurrantPi;

include 'content/storage/StorageData.php';
$storage = new StorageData();
$storage_data = $storage->getData();
?>

<h4><i class="demo-icon icon-database"></i> Storage</h4>

<table class="table table-striped table-hover">
  <thead>
    <tr>
      <th><p>Filesystem</p></th>
      <th><p class='text-center'>Size</p></th>
      <th><p class='text-center'>Available</p></th>
      <th><p id='storage_pct_bars' class='text-center'>%&nbsp;Used</p></th>
      <th><p class='text-right'>Mounted</p></th>
    </tr>
  </thead>
  <tbody>
     <?php 
foreach ($storage_data->storage as $row) {
    echo '<tr>';
    $col_count = 0;
    foreach ($row as $item) {
        switch ($col_count) {
            // First Column - The file system. Should be left aligned.
            case 0:
                echo "<td><p>{$item}</p></td>";