Skip to content
Snippets Groups Projects
Commit 9b873788 authored by Chris Jones's avatar Chris Jones
Browse files

this is an realy ugly hack, someone should fix this properly

parent e6165230
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
$o.="\t<tr><td align=\"center\">$user</td><td align=\"center\">${size}B</td></tr>\n"; $o.="\t<tr><td align=\"center\">$user</td><td align=\"center\">${size}B</td></tr>\n";
} }
exec("df -m /home",$dfraw); exec("df -m /home",$dfraw);
$dfout=explode(" ",$dfraw[1]); $dfout=explode(" ",$dfraw[1]);
$o.="\t<tr><td align=\"center\" colspan=\"2\">".floor($dfout[8]/1024)."GB used of ".floor($dfout[7]/1024). "GB (".floor($dfout[10]/1024)."GB available)</td></tr>\n"; $o.="\t<tr><td align=\"center\" colspan=\"2\">".floor($dfout[9]/1024)."GB used of ".floor($dfout[8]/1024). "GB (".floor($dfout[13]/1024)."GB available)</td></tr>\n";
$o.="</table>\n"; $o.="</table>\n";
$o.=$Shame[count($Shame) - 1]; $o.=$Shame[count($Shame) - 1];
$o.="<br />\n"; $o.="<br />\n";
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
list($u,$d)=parseLine($Shame[$i+1]); list($u,$d)=parseLine($Shame[$i+1]);
$others+=$d; $others+=$d;
} }
$out.="data.setValue(0, 0, 'Free Space');\ndata.setValue(0,1,".$dfout[10]." );\n"; $out.="data.setValue(0, 0, 'Free Space');\ndata.setValue(0,1,".$dfout[13]." );\n";
$out.="\t\tvar chart = new google.visualization.PieChart(document.getElementById('chart_div')); $out.="\t\tvar chart = new google.visualization.PieChart(document.getElementById('chart_div'));
chart.draw(data, {width: 500, height: 360, backgroundColor: 'none', is3D: true, title: 'Disk Usage',sliceVisibilityThreshold: 1/180}); chart.draw(data, {width: 500, height: 360, backgroundColor: 'none', is3D: true, title: 'Disk Usage',sliceVisibilityThreshold: 1/180});
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment