Revision ff74a13a web_client/src/gr/grnet/pithos/web/client/Pithos.java
b/web_client/src/gr/grnet/pithos/web/client/Pithos.java | ||
---|---|---|
268 | 268 |
private List<SingleSelectionModel> selectionModels = new ArrayList<SingleSelectionModel>(); |
269 | 269 |
|
270 | 270 |
Button upload; |
271 |
|
|
272 |
private HTML totalFiles; |
|
273 |
|
|
274 |
private HTML usedBytes; |
|
275 |
|
|
276 |
private HTML totalBytes; |
|
277 |
|
|
278 |
private HTML usedPercent; |
|
271 | 279 |
|
272 | 280 |
@Override |
273 | 281 |
public void onModuleLoad() { |
... | ... | |
371 | 379 |
|
372 | 380 |
HorizontalPanel treeHeader = new HorizontalPanel(); |
373 | 381 |
treeHeader.addStyleName("pithos-treeHeader"); |
374 |
treeHeader.add(new HTML("Total Files: 6 | Used: 2.1 of 50 GB (4.2%)")); |
|
382 |
HorizontalPanel statistics = new HorizontalPanel(); |
|
383 |
statistics.add(new HTML("Total Files: ")); |
|
384 |
totalFiles = new HTML(); |
|
385 |
statistics.add(totalFiles); |
|
386 |
statistics.add(new HTML(" | Used: ")); |
|
387 |
usedBytes = new HTML(); |
|
388 |
statistics.add(usedBytes); |
|
389 |
statistics.add(new HTML(" of ")); |
|
390 |
totalBytes = new HTML(); |
|
391 |
statistics.add(totalBytes); |
|
392 |
statistics.add(new HTML(" (")); |
|
393 |
usedPercent = new HTML(); |
|
394 |
statistics.add(usedPercent); |
|
395 |
statistics.add(new HTML("%)")); |
|
396 |
treeHeader.add(statistics); |
|
375 | 397 |
trees.add(treeHeader); |
376 | 398 |
|
377 | 399 |
trees.add(folderTreeView); |
... | ... | |
534 | 556 |
} |
535 | 557 |
folderTreeViewModel.initialize(account); |
536 | 558 |
groupTreeViewModel.initialize(); |
559 |
updateStatistics(); |
|
537 | 560 |
} |
538 | 561 |
} |
539 | 562 |
|
... | ... | |
550 | 573 |
Scheduler.get().scheduleDeferred(getAccount); |
551 | 574 |
} |
552 | 575 |
|
553 |
protected void createHomeContainer(final AccountResource account) { |
|
576 |
protected void updateStatistics() { |
|
577 |
totalFiles.setHTML(String.valueOf(account.getNumberOfObjects())); |
|
578 |
usedBytes.setHTML(String.valueOf(account.getFileSizeAsString())); |
|
579 |
totalBytes.setHTML(String.valueOf(account.getQuotaAsString())); |
|
580 |
usedPercent.setHTML(String.valueOf(account.getUsedPercentage())); |
|
581 |
} |
|
582 |
|
|
583 |
protected void createHomeContainer(final AccountResource account) { |
|
554 | 584 |
String path = "/" + Pithos.HOME_CONTAINER; |
555 | 585 |
PutRequest createPithos = new PutRequest(getApiPath(), getUsername(), path) { |
556 | 586 |
@Override |
Also available in: Unified diff