|
@@ -218,19 +218,27 @@
|
|
//There are something to load. Load the vroot properties
|
|
//There are something to load. Load the vroot properties
|
|
if (window.location.hash.length > 0 && typeof(files) != null){
|
|
if (window.location.hash.length > 0 && typeof(files) != null){
|
|
var rootName = files[0].split("/")[0];
|
|
var rootName = files[0].split("/")[0];
|
|
|
|
+ var NALocaleString = applocale.getString("error/na", "[Not Available]");
|
|
$("#vrootName").val(rootName + "/");
|
|
$("#vrootName").val(rootName + "/");
|
|
|
|
|
|
getDiskProp(files[0], function(data){
|
|
getDiskProp(files[0], function(data){
|
|
if (data.error !== undefined){
|
|
if (data.error !== undefined){
|
|
$("#phydisk").text("Unknown");
|
|
$("#phydisk").text("Unknown");
|
|
$("#hierarchy").text("Unknown");
|
|
$("#hierarchy").text("Unknown");
|
|
- $("#usedSpaceInBytes").text("Not Available");
|
|
|
|
- $("#usableSpaceInBytes").text("Not Available");
|
|
|
|
- $("#totalSpaceInBytes").text("Not Available");
|
|
|
|
|
|
+ $("#usedSpaceInBytes").text(NALocaleString);
|
|
|
|
+ $("#usableSpaceInBytes").text(NALocaleString);
|
|
|
|
+ $("#totalSpaceInBytes").text(NALocaleString);
|
|
console.log(data.error);
|
|
console.log(data.error);
|
|
}else{
|
|
}else{
|
|
- $("#usedSpaceInBytes").text(new Intl.NumberFormat('en-US').format(data.Used));
|
|
|
|
- $("#usedSpaceInHumanReadableFormat").text(bytesToSize(data.Used));
|
|
|
|
|
|
+ if (data.Used == 0){
|
|
|
|
+ //Network drive
|
|
|
|
+ $("#usedSpaceInBytes").text(NALocaleString);
|
|
|
|
+ $("#usedSpaceInHumanReadableFormat").text("");
|
|
|
|
+ }else{
|
|
|
|
+ $("#usedSpaceInBytes").text(new Intl.NumberFormat('en-US').format(data.Used));
|
|
|
|
+ $("#usedSpaceInHumanReadableFormat").text(bytesToSize(data.Used));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
$("#usableSpaceInBytes").text(new Intl.NumberFormat('en-US').format(data.Available));
|
|
$("#usableSpaceInBytes").text(new Intl.NumberFormat('en-US').format(data.Available));
|
|
$("#usableSpaceInHumanReadableFormat").text(bytesToSize(data.Available));
|
|
$("#usableSpaceInHumanReadableFormat").text(bytesToSize(data.Available));
|
|
@@ -253,14 +261,17 @@
|
|
$("#usedVirtualSpaceInHumanReadableFormat").text(bytesToSize(folderdata.Filesize));
|
|
$("#usedVirtualSpaceInHumanReadableFormat").text(bytesToSize(folderdata.Filesize));
|
|
|
|
|
|
}else{
|
|
}else{
|
|
- $("#usedVirtualSpaceInByte").text("Not Available");
|
|
|
|
|
|
+ $("#usedVirtualSpaceInByte").text(NALocaleString);
|
|
$("#usedVirtualSpaceInHumanReadableFormat").text("");
|
|
$("#usedVirtualSpaceInHumanReadableFormat").text("");
|
|
}
|
|
}
|
|
|
|
|
|
- if (diskInfo.Used == 0){
|
|
|
|
|
|
+ if (diskInfo.Used == 0 && folderdata.Filesize >= 0){
|
|
//Network or special drive. Use user space as usedSpace
|
|
//Network or special drive. Use user space as usedSpace
|
|
$("#usedSpaceInBytes").text(new Intl.NumberFormat('en-US').format(folderdata.Filesize));
|
|
$("#usedSpaceInBytes").text(new Intl.NumberFormat('en-US').format(folderdata.Filesize));
|
|
$("#usedSpaceInHumanReadableFormat").text(bytesToSize(folderdata.Filesize));
|
|
$("#usedSpaceInHumanReadableFormat").text(bytesToSize(folderdata.Filesize));
|
|
|
|
+ }else if (diskInfo.Used == 0){
|
|
|
|
+ $("#usedSpaceInBytes").text(NALocaleString);
|
|
|
|
+ $("#usedSpaceInHumanReadableFormat").text("");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|