diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java index 67b7c86..4f2bbfb 100644 --- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java +++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/client/StatisticsPanel.java @@ -196,20 +196,6 @@ public class StatisticsPanel extends Composite { else userImage.addStyleName("user-image-margin-right-vre"); - // set url to change avatar - final String urlAccount = information.getAccountURL(); - - if(urlAccount != null){ - userImage.addClickHandler(new ClickHandler() { - @Override - public void onClick(ClickEvent ev) { - Window.Location.assign(urlAccount); - } - }); - userImage.setTitle("Edit your avatar"); - userImage.addStyleName("user-image-editable"); - } - // add image to mainPanel mainPanel.add(userImage); diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java index 6be53ba..2ab35ad 100644 --- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java +++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/server/UserStatisticsServiceImpl.java @@ -118,7 +118,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U */ public String getDevelopmentUser() { String user = userid; -// user = "massimiliano.assante"; + // user = "massimiliano.assante"; return user; } @@ -140,19 +140,19 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U _log.debug("Found " + userName + " returning nothing"); return null; - + }else{ _log.debug("Getting " + userName + " amount of workspace in use."); try{ - + long init = System.currentTimeMillis(); - + Workspace workspace = HomeLibrary.getUserWorkspace(userName); long storage = workspace.getDiskUsage(); storageInUse = formatFileSize(storage); - + long end = System.currentTimeMillis(); _log.debug("[USER-STATISTICS] time taken to retrieve user space is " + (end - init) + "ms"); @@ -193,10 +193,10 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U boolean avatarPresent = session.getUserAvatarId() != null; long init = System.currentTimeMillis(); - + User user = UserLocalServiceUtil.getUserByScreenName(SiteManagerUtil.getCompany().getCompanyId(), session.getUsername()); profileStrenght = evaluateProfileStrenght(user, avatarPresent); - + long end = System.currentTimeMillis(); _log.debug("[USER-STATISTICS] time taken to evaluate user profile strenght is " + (end - init) + "ms"); @@ -247,19 +247,15 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U } - // url account to change the avatar - String accountURL = null; - _log.debug("Account url for " + userName + " is " + accountURL); - - return new UserInformation(isInfrastructure, thumbnailURL, userName, actualVre, accountURL); + return new UserInformation(isInfrastructure, thumbnailURL, userName, actualVre); } - else return new UserInformation(false, null, userName, vreID, null); + else return new UserInformation(false, null, userName, vreID); } @SuppressWarnings("deprecation") @Override public PostsStatsBean getPostsStats(){ - + // get the session ASLSession session = getASLSession(); @@ -314,7 +310,7 @@ public class UserStatisticsServiceImpl extends RemoteServiceServlet implements U } long end = System.currentTimeMillis(); - + _log.debug("[USER-STATISTICS] time taken to retrieve and filter user feeds, get likes and replies got is " + (end - init) + "ms"); _log.debug("Total number of feeds (after time filtering) of " + userName + " is " + totalFeeds); _log.debug("Total number of likes (after time filtering) for " + userName + " is " + totalLikes); diff --git a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/shared/UserInformation.java b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/shared/UserInformation.java index dee931b..c0a919a 100644 --- a/src/main/java/org/gcube/portlet/user/userstatisticsportlet/shared/UserInformation.java +++ b/src/main/java/org/gcube/portlet/user/userstatisticsportlet/shared/UserInformation.java @@ -18,20 +18,18 @@ public class UserInformation implements Serializable { private String urlAvatar; private String displayName; private String actualVre; - private String accountURL; public UserInformation(){ super(); } public UserInformation(boolean isRoot, String urlAvatar, - String displayName, String actualVre, String accountURL) { + String displayName, String actualVre) { super(); this.isRoot = isRoot; this.urlAvatar = urlAvatar; this.displayName = displayName; this.actualVre = actualVre; - this.accountURL = accountURL; } @@ -73,26 +71,12 @@ public class UserInformation implements Serializable { public void setActualVre(String actualVre) { this.actualVre = actualVre; } - - - - public String getAccountURL() { - return accountURL; - } - - - - public void setAccountURL(String accountURL) { - this.accountURL = accountURL; - } - - - + @Override public String toString() { return "UserInformation [isRoot=" + isRoot + ", urlAvatar=" + urlAvatar + ", displayName=" + displayName + ", actualVre=" + actualVre - + ", accountURL=" + accountURL + "]"; + + "]"; } }