Skip to content

Commit

Permalink
Show message in web interface if no ffat partition could be found.
Browse files Browse the repository at this point in the history
Fixes #39
Fixes #40
  • Loading branch information
CelliesProjects committed Feb 9, 2020
1 parent 74db9b3 commit 6551742
Show file tree
Hide file tree
Showing 4 changed files with 339 additions and 320 deletions.
9 changes: 6 additions & 3 deletions webif/fileman.htm
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,12 @@
$.get("/api/getdevice?diskspace=")
.done(function(data){
var tmp=data.split(',');
diskSpace=parseInt(tmp[0]);diskSize=parseInt(tmp[1]);
$('#progressBar').attr({value:diskSize-diskSpace,max:diskSize});
$('#diskSpace').html(formatBytes(diskSpace,1)+' free / '+formatBytes(diskSize,1)+' total');
if(0==parseInt(tmp[1]))$('#diskSpace').html("No ffat partition found");
else{
diskSpace=parseInt(tmp[0]);diskSize=parseInt(tmp[1]);
$('#progressBar').attr({value:diskSize-diskSpace,max:diskSize});
$('#diskSpace').html(formatBytes(diskSpace,1)+' free / '+formatBytes(diskSize,1)+' total');
}
})
.fail(function(){$('#diskSpace').html('<p class="sysMessage">ERROR GETTING DISKSPACE</p>');});
}
Expand Down
Loading

0 comments on commit 6551742

Please sign in to comment.