diff --git a/CONTROL/control b/CONTROL/control
index 35f1c96..e9282c4 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
-Version: 1.0.17-3
+Version: 1.0.17-5
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.13),lighttpd(>=1.4.35-2),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),service-control(>=1.2),busybox(>=1.20.2-1),lsof(>=4.87),epg(>=1.0.13),hmt(>=1.1.21),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2-1),stripts(>=1.2.5-3),smartmontools,tmenu(>=1.08),ffmpeg,id3v2,multienv(>=1.6),tcpping(>=1.1),mongoose
diff --git a/webif/html/css/style.css b/webif/html/css/style.css
index 3f3c422..29fa0af 100644
--- a/webif/html/css/style.css
+++ b/webif/html/css/style.css
@@ -394,6 +394,11 @@ div.toolbar
padding: 6px;
}
+#status
+{
+ width: 60%;
+}
+
span.toolbarcell
{
float: left;
@@ -501,3 +506,17 @@ span.foldernum
padding-top: 1.2em;
}
+#tbdiskpie
+{
+ float: right;
+ width: 150px;
+ height: 150px;
+ margin-left: 10px;
+}
+
+.tbdiskpie
+{
+ top: -10px !important;
+}
+
+
diff --git a/webif/html/diskspace/diskspace.jim b/webif/html/diskspace/diskspace.jim
new file mode 100755
index 0000000..fade8e6
--- /dev/null
+++ b/webif/html/diskspace/diskspace.jim
@@ -0,0 +1,71 @@
+#!/mod/bin/jimsh
+
+source /mod/webif/lib/setup
+require system.class pretty_size
+
+lassign [system diskspace 1] size used perc free fperc tsrbuf tsrused
+
+# Calculate the TSR reserve
+set tsrreserve $($tsrbuf - $tsrused)
+# Adjust values to account for the TSR reserve
+set free $($free - $tsrreserve)
+set used $($size - $free)
+
+set dbs 0
+if {[system pkginst undelete]} {
+ set dbs [system dustbinsize]
+ set used $($used - $dbs)
+}
+
+set uperc $($used * 100 / $size)
+set dperc $($dbs * 100 / $size)
+set fperc $(100 - $uperc - $dperc)
+
+set usedstr [pretty_size $used]
+set freestr [pretty_size $free]
+set dbsstr [pretty_size $dbs]
+
+puts "
+
+
+"
+
+puts "
+
+ Total space: [pretty_size $size]
+
+ Used: $usedstr ($uperc%)
+
+ Free: $freestr ($fperc%)
+"
+if {$dbs} {
+ puts "
+
+ Dustbin: $dbsstr ($dperc%)"
+}
+puts "
+
+
+"
+
diff --git a/webif/html/diskspace/diskspace.js b/webif/html/diskspace/diskspace.js
new file mode 100644
index 0000000..2eeed16
--- /dev/null
+++ b/webif/html/diskspace/diskspace.js
@@ -0,0 +1,59 @@
+//$(function () {
+
+$('#tbdiskpie')
+ .hover(function(e) { e.stopPropagation(); $(this).stop(true, true); })
+ .highcharts({
+ chart: {
+ plotBackgroundColor: null,
+ plotBorderWidth: null,
+ backgroundColor: 'transparent',
+ plotShadow: false,
+ spacing: [0, 0, 0, 0],
+ className: 'tbdiskpie',
+// height: 150, width: 150,
+ events: {
+ click: function(e) {
+ window.location = '/diag/dspace/index.jim';
+ }
+ }
+ },
+ colors:
+ Highcharts.map(['#7cb5ec', '#e4d354', '#cccccc'], function(color) {
+ return {
+ radialGradient: { cx: 0.5, cy: 0.3, r: 0.7 },
+ stops: [
+ [0, color],
+ [1, Highcharts.Color(color).brighten(-0.3).get('rgb')]
+ ]
+ };
+ }),
+ title: { text: '' },
+ credits: false,
+ plotOptions: {
+ pie: {
+ animation: { duration: 300 },
+ allowPointSelect: false,
+ cursor: 'pointer',
+ dataLabels: {
+ enabled: false
+ },
+ shadow: false,
+ borderWidth: 0,
+ states: { hover: false }
+ }
+ },
+ tooltip: {
+ enabled: true,
+ formatter: function() {
+ return this.point.name + ': ' + this.point.pretty;
+ }
+ },
+ series: [{
+ type: 'pie',
+ name: 'Disk Space',
+ data: diskspace_data
+ }]
+ });
+
+//});
+
diff --git a/webif/html/img/pie-blue.png b/webif/html/img/pie-blue.png
new file mode 100644
index 0000000..cdd62de
Binary files /dev/null and b/webif/html/img/pie-blue.png differ
diff --git a/webif/html/img/pie-grey.png b/webif/html/img/pie-grey.png
new file mode 100644
index 0000000..1dbd32b
Binary files /dev/null and b/webif/html/img/pie-grey.png differ
diff --git a/webif/html/img/pie-yellow.png b/webif/html/img/pie-yellow.png
new file mode 100644
index 0000000..9b9b9ee
Binary files /dev/null and b/webif/html/img/pie-yellow.png differ
diff --git a/webif/html/lib/header.jim b/webif/html/lib/header.jim
index 41d6631..4d0f17c 100755
--- a/webif/html/lib/header.jim
+++ b/webif/html/lib/header.jim
@@ -24,6 +24,7 @@ puts {
+
}
if {[info exists _mws_js]} {
foreach js $::_mws_js {
diff --git a/webif/html/lib/topbar.jim b/webif/html/lib/topbar.jim
index b8a4b74..048aac7 100644
--- a/webif/html/lib/topbar.jim
+++ b/webif/html/lib/topbar.jim
@@ -8,7 +8,8 @@ puts {