tooltip is different for storage when quota is available
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/user/user-statistics@144262 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d69f0d078a
commit
6a6dce6942
|
@ -76,6 +76,8 @@ public class StatisticsPanel extends Composite {
|
||||||
/**
|
/**
|
||||||
* Some tooltips
|
* Some tooltips
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
private final static String QUOTA_TOOLTIP = "Percentage of your used space in the infrastructure storage";
|
||||||
private final static String TOOLTIP_ACTIVITY_ROOT_PROFILE = "Posts, likes, replies done during the last year";
|
private final static String TOOLTIP_ACTIVITY_ROOT_PROFILE = "Posts, likes, replies done during the last year";
|
||||||
private final static String TOOLTIP_ACTIVITY_VRE = "Posts, likes, replies done in the last year in this VRE";
|
private final static String TOOLTIP_ACTIVITY_VRE = "Posts, likes, replies done in the last year in this VRE";
|
||||||
private final static String TOOLTIP_GOT_ROOT_PROFILE = "Likes and post replies got during the last year";
|
private final static String TOOLTIP_GOT_ROOT_PROFILE = "Likes and post replies got during the last year";
|
||||||
|
@ -345,6 +347,7 @@ public class StatisticsPanel extends Composite {
|
||||||
public void onSuccess(QuotaInfo quota) {
|
public void onSuccess(QuotaInfo quota) {
|
||||||
|
|
||||||
if(quota == null){
|
if(quota == null){
|
||||||
|
|
||||||
// ask for partial value
|
// ask for partial value
|
||||||
statisticsService.getTotalSpaceInUse(userid, new AsyncCallback<String>() {
|
statisticsService.getTotalSpaceInUse(userid, new AsyncCallback<String>() {
|
||||||
|
|
||||||
|
@ -377,6 +380,7 @@ public class StatisticsPanel extends Composite {
|
||||||
quotaStorageValue.setType(ButtonType.LINK);
|
quotaStorageValue.setType(ButtonType.LINK);
|
||||||
quotaStorageValue.setText(decimalFormat + "%");
|
quotaStorageValue.setText(decimalFormat + "%");
|
||||||
quotaStorageValue.setTitle("Currently using " + NumberFormat.getFormat("#.##").format(current) + "MB of " + max + "MB assigned in the Infrastructure Storage");
|
quotaStorageValue.setTitle("Currently using " + NumberFormat.getFormat("#.##").format(current) + "MB of " + max + "MB assigned in the Infrastructure Storage");
|
||||||
|
storage.setToolTip(QUOTA_TOOLTIP);
|
||||||
storage.appendToPanel(quotaStorageValue);
|
storage.appendToPanel(quotaStorageValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,9 @@ public class StatisticWidget extends Composite{
|
||||||
|
|
||||||
public void setToolTip(String tooltip){
|
public void setToolTip(String tooltip){
|
||||||
|
|
||||||
|
// change popover text content
|
||||||
|
popover.setText(tooltip);
|
||||||
|
|
||||||
HTML headerHtml = new HTML(
|
HTML headerHtml = new HTML(
|
||||||
"<span style=\"font-size:14px; font-weight:bold\">"+headerTitle+"</span>"
|
"<span style=\"font-size:14px; font-weight:bold\">"+headerTitle+"</span>"
|
||||||
);
|
);
|
||||||
|
@ -77,5 +80,6 @@ public class StatisticWidget extends Composite{
|
||||||
// set html
|
// set html
|
||||||
popover.setHtml(true);
|
popover.setHtml(true);
|
||||||
|
|
||||||
|
popover.reconfigure();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue