Index: mythtv/programs/mythbackend/httpstatus.cpp
===================================================================
--- mythtv.orig/programs/mythbackend/httpstatus.cpp	2009-05-29 15:35:26.000000000 -0400
+++ mythtv/programs/mythbackend/httpstatus.cpp	2009-05-29 17:37:28.000000000 -0400
@@ -1111,7 +1111,60 @@
     QDomElement storage = node.toElement();
     node = storage.firstChild();
 
-    os << "      Disk Usage:<br />\r\n";
+    // Loop once until we find id == "total".  This should be first, but a loop
+    // separate from the per-filesystem details loop ensures total is first,
+    // regardless.
+    while (!node.isNull())
+    {
+        QDomElement g = node.toElement();
+
+        if (!g.isNull() && g.tagName() == "Group")
+        {
+            QString id   = g.attribute("id", "" );
+
+            if (id == "total")
+            {
+                int nFree    = g.attribute("free" , "0" ).toInt();
+                int nTotal   = g.attribute("total", "0" ).toInt();
+                int nUsed    = g.attribute("used" , "0" ).toInt();
+                QString nDir = g.attribute("dir"  , "" );
+
+                nDir.replace(QRegExp(","), ", ");
+
+                os << "      Disk Usage Summary:<br />\r\n";
+                os << "      <ul>\r\n";
+
+                os << "        <li>Total Disk Space:</li>\r\n"
+                << "          <ul>\r\n";
+                QLocale c(QLocale::C);
+
+                os << "            <li>Total Space: ";
+                sRep = c.toString(nTotal) + " MB";
+                os << sRep << "</li>\r\n";
+
+                os << "            <li>Space Used: ";
+                sRep = c.toString(nUsed) + " MB";
+                os << sRep << "</li>\r\n";
+
+                os << "            <li>Space Free: ";
+                sRep = c.toString(nFree) + " MB";
+                os << sRep << "</li>\r\n";
+
+                os << "          </ul>\r\n"
+                << "        </li>\r\n";
+
+                os << "      </ul>\r\n";
+                break;
+            }
+        }
+
+        node = node.nextSibling();
+    }
+
+    // Loop again to handle per-filesystem details.
+    node = storage.firstChild();
+
+    os << "      Disk Usage Details:<br />\r\n";
     os << "      <ul>\r\n";
 
 
@@ -1130,13 +1183,9 @@
             nDir.replace(QRegExp(","), ", ");
 
 
-            if (id == "total")
-            {
-                os << "        <li>Total Disk Space:</li>\r\n"
-                << "          <ul>\r\n";
-            }
-            else
+            if (id != "total")
             {
+
                 os << "        <li>MythTV Drive #" << id << ":"
                 << "</li>\r\n"
                 << "          <ul>\r\n";
@@ -1147,24 +1196,24 @@
                     os << "            <li>Directory: ";
 
                 os << nDir << "</li>\r\n";
-            }
 
-            QLocale c(QLocale::C);
+                QLocale c(QLocale::C);
 
-            os << "            <li>Total Space: ";
-            sRep = c.toString(nTotal) + " MB";
-            os << sRep << "</li>\r\n";
-
-            os << "            <li>Space Used: ";
-            sRep = c.toString(nUsed) + " MB";
-            os << sRep << "</li>\r\n";
-
-            os << "            <li>Space Free: ";
-            sRep = c.toString(nFree) + " MB";
-            os << sRep << "</li>\r\n";
+                os << "            <li>Total Space: ";
+                sRep = c.toString(nTotal) + " MB";
+                os << sRep << "</li>\r\n";
+
+                os << "            <li>Space Used: ";
+                sRep = c.toString(nUsed) + " MB";
+                os << sRep << "</li>\r\n";
+
+                os << "            <li>Space Free: ";
+                sRep = c.toString(nFree) + " MB";
+                os << sRep << "</li>\r\n";
 
-            os << "          </ul>\r\n"
-            << "        </li>\r\n";
+                os << "          </ul>\r\n"
+                << "        </li>\r\n";
+            }
 
         }
 

