Index: /trunk/ippMonitor/raw/czartool_labels.php
===================================================================
--- /trunk/ippMonitor/raw/czartool_labels.php	(revision 42921)
+++ /trunk/ippMonitor/raw/czartool_labels.php	(revision 42922)
@@ -1846,5 +1846,5 @@
     exec("neb-host |cut -b 17-30,86-", $hostnoteall);
 
-    $sql = "SELECT host, format(total, 2), format(available, 2), format(used, 2), writable, readable, format(used/total*100,3) as ratio FROM hosts where xattr <> 3 ";
+    $sql = "SELECT host, format(total, 2), format(available, 2), format(used, 2), writable, readable, format(used/total*100,3) as ratio FROM hosts where xattr <> 3 ORDER BY CASE WHEN ROUND(used/total*100,3) = 100 THEN 0 ELSE 1 END, CASE WHEN host LIKE '%\_bck.0' THEN 1 ELSE 0 END, host;";
     $qry = $db->query($sql);
 
@@ -1854,7 +1854,13 @@
     }
 
+    $sqlMax = "SELECT MAX(total) AS max_total FROM hosts WHERE xattr <> 3";
+    $qryMax = $db->query($sqlMax);
+    $maxUsed = 0;
+
+    if ($qryMax && $qryMax->fetchInto($rowMax)) {
+        $maxUsed = $rowMax[0];  // max_total value
+    }
+
     $dataRows = array();
-    $maxUsed = 0;   // initialize before the while loop
-
     while ($qry->fetchInto($row)) {
         // Access by index
@@ -1866,9 +1872,4 @@
         $readable  = $row[5]; // 1
         $ratio     = $row[6]; // 86.4939 %
-
-        // update maxUsed
-        if ($total > $maxUsed) {
-            $maxUsed = $total/2;
-        }
 
         // Match notes
@@ -1893,5 +1894,5 @@
         } elseif ($available < 1) {
             $used      = $maxUsed;
-            $available = $maxUsed;
+            $available = 0;
             $status    = "offline";
             $usedColor = "white";
Index: /trunk/ippMonitor/raw/storage.php
===================================================================
--- /trunk/ippMonitor/raw/storage.php	(revision 42921)
+++ /trunk/ippMonitor/raw/storage.php	(revision 42922)
@@ -50,15 +50,4 @@
     $start = microtime(true);
 
-    echo "<script type=\"text/javascript\" src=\"loader.js\"></script>";
-    echo "<br><div class=\"chartWithOverlay\" style=\"position: relative; width: 100%\">";
-    echo "  <div id=\"disk_div\" style=\"width:100%; height:5000px\"></div>";
-    echo "  <div class=\"overlay\" style=\"position: absolute; width: 100px; top: 50px; right: 20px;\">";
-    echo "    <div style=\"font-size: 12px; height: 14px; border: 1px solid; background-color: lightgreen\"><center>Free</div>";
-    echo "    <div style=\"font-size: 12px; height: 14px; border: 1px solid; background-color: yellow\"><center>Used</div>";
-    echo "    <div style=\"font-size: 12px; height: 14px; border: 1px solid; background-color: pink\"><center>> 97% limit</div>";
-    echo "    <div style=\"font-size: 12px; height: 14px; border: 1px solid; background-color: lightgrey\"><center>Down | Repair</div>";
-    echo "    <div style=\"font-size: 12px; height: 14px; border: 1px solid; background-color: white\"><center>Offline</div>";
-    echo "  </div>";
-    echo "</div>";
 
     // Set environment variables
@@ -69,5 +58,5 @@
     exec("neb-host |cut -b 17-30,86-", $hostnoteall);
 
-    $sql = "SELECT host, format(total, 2), format(available, 2), format(used, 2), writable, readable, format(used/total*100,3) as ratio FROM hosts where xattr <> 3 ";
+    $sql = "SELECT host, format(total, 2), format(available, 2), format(used, 2), writable, readable, format(used/total*100,3) as ratio FROM hosts where xattr <> 3 ORDER BY CASE WHEN ROUND(used/total*100,3) = 100 THEN 0 ELSE 1 END, CASE WHEN host LIKE '%\_bck.0' THEN 1 ELSE 0 END, host;";
     $qry = $db->query($sql);
 
@@ -77,7 +66,13 @@
     }
 
+    $sqlMax = "SELECT MAX(total) AS max_total FROM hosts WHERE xattr <> 3";
+    $qryMax = $db->query($sqlMax);
+    $maxUsed = 0;
+    
+    if ($qryMax && $qryMax->fetchInto($rowMax)) {
+        $maxUsed = $rowMax[0];  // max_total value
+    }
+
     $dataRows = array();
-    $maxUsed = 0;   // initialize before the while loop
-
     while ($qry->fetchInto($row)) {
         // Access by index
@@ -89,9 +84,4 @@
         $readable  = $row[5]; // 1
         $ratio     = $row[6]; // 86.4939 %
-
-        // update maxUsed
-        if ($total > $maxUsed) {
-            $maxUsed = $total/2;
-        }
 
         // Match notes
@@ -116,5 +106,5 @@
         } elseif ($available < 1) {
             $used      = $maxUsed;
-            $available = $maxUsed;
+            $available = 0;
             $status    = "offline";
             $usedColor = "white";
@@ -135,7 +125,8 @@
                            "</span>";
         } else {
-            $tooltipUsed = $host . ": " . round($ratio, 1) . "% of " . $total . " TB used<br>" . $hostnote;
+            $tooltipUsed = $host . ": " . round($ratio, 1) . "% of " . $total . " TB used<br>" . $hostnote ;
             $tooltipFree = $host . ": " . $available . " TB free";
         }
+
 
         // Build data row (manual string concatenation for old PHP)
@@ -177,4 +168,25 @@
             }
           </script>";
+
+echo "<script type='text/javascript' src='loader.js'></script>
+<br>
+<div class='chartWithOverlay' style='position: relative; width: 100%'>
+
+    <div id='disk_div' style='width:100%; height:5000px'></div>
+
+    <div class='overlay' style='position: absolute; width:160px; top:50px; right:30px; font-family:Arial, sans-serif;'>
+
+      <div style='font-size:15px; border:1px solid #888; background-color:lightgreen; color:black; text-align:center; margin-bottom:1px;'>Free</div>
+      <div style='font-size:15px; border:1px solid #888; background-color:yellow    ; color:black; text-align:center; margin-bottom:1px;'>Used</div>
+      <div style='font-size:15px; border:1px solid #888; background-color:pink      ; color:black; text-align:center; margin-bottom:1px;'>97% Usage</div>
+      <div style='font-size:15px; border:1px solid #888; background-color:lightgrey ; color:black; text-align:center; margin-bottom:1px;'>Down/Repair</div>
+      <div style='font-size:15px; border:1px solid #888; background-color:white     ; color:black; text-align:center; margin-bottom:1px;'>Offline</div>
+      <div style='font-size:15px; border:1px solid #888; background-color:#42a5f5   ; color:white; text-align:center; margin-bottom:1px;'>
+        <a href='https://atrcganglia.ifa.hawaii.edu/' target='_blank' style='text-decoration:none; color:white; font-weight:bold;'>ATRC ganglia</a>
+      </div>
+
+    </div>
+
+</div>";
 
     $total_time = round(microtime(true) - $start, 3);
