Skip to content
This repository has been archived by the owner on Aug 27, 2018. It is now read-only.

NaN displayed instead of TB unit in MyApps view #839

Closed
Wenzel opened this issue Jan 31, 2017 · 6 comments
Closed

NaN displayed instead of TB unit in MyApps view #839

Wenzel opened this issue Jan 31, 2017 · 6 comments
Labels

Comments

@Wenzel
Copy link

Wenzel commented Jan 31, 2017

Hi !
I'm not if this is the right subproject to report this issue.
Feel free to move it if necessary.

I just installed my CozyCloud instance on a VPS with 2TB of disk space.

However, when i check how much free space i have left, Cozy is displaying NaN instead of 1.2TB

Please see the screenshot
nan

Thanks !

@clochix
Copy link
Contributor

clochix commented Feb 1, 2017

Thanks for reporting @Wenzel.

To get this information, we try to parse the output of df -h. Would you mind give us what this command displays on your server (either on this ticket or by email at contact at cozycloud.cc)? Thanks!

@clochix clochix added the bug label Feb 1, 2017
@Wenzel
Copy link
Author

Wenzel commented Feb 1, 2017

Hi @clochix ,

This is the line from the output of df -h corresponding to my /data partition:
/dev/sda6 1,8T 442G 1,2T 27% /data
I suppose you are either not parsing the ,comma or the T unit.

@clochix
Copy link
Contributor

clochix commented Feb 1, 2017

I think we handle the T unit but are unable to recognize 1,2 as a valid number.
Could you, from your server console, run curl https://localhost:9103/api/sys-data and give use the output?

@Wenzel
Copy link
Author

Wenzel commented Feb 1, 2017

here you go:

{
  "totalDiskSpace": "1,8",
  "freeDiskSpace": "1,2",
  "usedDiskSpace": "442",
  "totalUnit": "T",
  "usedUnit": "G",
  "freeUnit": "T",
  "dir": "/data/cozy",
  "mount": "/data",
  "totalMem": 4041248,
  "freeMem": "2650192"
}

@clochix
Copy link
Contributor

clochix commented Feb 2, 2017

Thanks, got it.
I just pushed a fix.
I'm not sure this fix will be published anytime soon, I doubt we'll publish a new version for such a tiny patch.

@Wenzel
Copy link
Author

Wenzel commented Feb 2, 2017

Thanks for the fix.
It's a minor issue, i don't need a new version for that.
I'm glad it's fixed :)
Thanks !

@Wenzel Wenzel closed this as completed Feb 2, 2017
nono added a commit that referenced this issue Feb 7, 2017
Fix display of disk use, refs #839
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants