minor label fix for the space used information and fix for the username whose quota must be retrieved when profile page is shown
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@142496 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
57baa7a957
commit
51fdce6b35
|
@ -376,7 +376,7 @@ public class StatisticsPanel extends Composite {
|
|||
Button quotaStorageValue = new Button();
|
||||
quotaStorageValue.setType(ButtonType.LINK);
|
||||
quotaStorageValue.setText(decimalFormat + "%");
|
||||
quotaStorageValue.setTitle("You are currently using " + NumberFormat.getFormat("#.##").format(current) + "MB out of " + max + "MB in the Infrastructure Storage");
|
||||
quotaStorageValue.setTitle("Currently using " + NumberFormat.getFormat("#.##").format(current) + "MB of " + max + "MB assigned in the Infrastructure Storage");
|
||||
storage.appendToPanel(quotaStorageValue);
|
||||
}
|
||||
|
||||
|
|
|
@ -85,23 +85,20 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U
|
|||
if(quotaServiceBaseUrl != null){
|
||||
|
||||
userName = ServerUtils.getCurrentUser(this.getThreadLocalRequest()).getUsername();
|
||||
|
||||
// do not show quota info to other users
|
||||
quotaOfUser = userName;
|
||||
|
||||
// check the user's quota to be shown
|
||||
if(userid != null && !userid.equals(userName))
|
||||
quotaOfUser = userid;
|
||||
|
||||
quotaOfUser = userName;
|
||||
logger.debug("Fetching info for quota of user " + quotaOfUser);
|
||||
|
||||
try{
|
||||
|
||||
UserInfrastructureQuotaStorageCache cache = UserInfrastructureQuotaStorageCache.getCacheInstance();
|
||||
|
||||
if(cache.get(quotaOfUser) != null)
|
||||
toReturn = cache.get(quotaOfUser);
|
||||
else{
|
||||
|
||||
// ask the service ...
|
||||
PortalContext pContext = PortalContext.getConfiguration();
|
||||
String rootContextToken = pContext.getCurrentUserToken("/" + pContext.getInfrastructureName(), quotaOfUser);
|
||||
URL request = new URL(quotaServiceBaseUrl + "?timeinterval=FOREVER&gcube-token=" + rootContextToken);
|
||||
|
|
Loading…
Reference in New Issue