New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing free drive space issue in webadmin, close #11570 #1695
Conversation
@@ -42,6 +42,7 @@ | |||
$(this).css('visibility', 'hidden'); | |||
}); | |||
}); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line here necessary? It's not a big issue but seems very odd...
All works as expected - free space reported for both a normal user and an admin is in the same units. Looks good to merge. |
} else if (bytes < (1024*1024*1024*1024*1024*1024)) { | ||
return (bytes / (1024*1024*1024*1024*1024)).toFixed(2) + ' PB'; | ||
} else { | ||
return bytes + ' B'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last question: is there any reason to fall back to B
rather than leaving really big sizes PB
? i.e. remove the final } else {
clause and simply let big things be in petabytes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that the web gateway isn't a place where we can simply use Django's filesizeformat
builtin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't use filesizeformat as this is JavaScript. It is loaded after template is rendered
@joshmoore like that? |
@aleksandra-tarkowska : exactly. Thanks. (I wonder how we're going to test it :) ) |
I do not know any better way then http://jsfiddle.net/aleksandratarkowska/LEUU8/ |
@bpindelski done |
@aleksandra-tarkowska Thanks. Looks good to merge now (unless @joshmoore says otherwise). |
That's a great way to test it. Thanks again, @aleksandra-tarkowska! Changing the value to:
however, makes the display disappear. You'll need to change the final |
I updated the link, sorry are you sure you used http://jsfiddle.net/aleksandratarkowska/LEUU8/ ? there is definitely else only |
Got it now. Sorry, there's no notification on a comment modification, so I didn't realize there was a new one. 👍 |
@aleksandra-tarkowska: one small thing. The date in header needs to be modified |
Fixing free drive space issue in webadmin, close #11570
too late |
@jburel I will review all files in the another PR |
--no-rebase |
Fixing https://trac.openmicroscopy.org.uk/ome/ticket/11570
Testing:
Log in as root to webadmin and in Statistics check Free space just under the pie-chart
Log in again as a user, go to User settings and check if in Statistics is exactly the same value
Previously, mismatch example: