Changeset 2927
- Timestamp:
- Nov 16, 2006, 1:28:58 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/common-queries.xml
r2899 r2927 551 551 </query> 552 552 553 <query id="GET_TOTAL_DISKUSAGE_SUMMARY" type="HQL"> 554 <sql> 555 SELECT SUM(du.bytes), du.location, du.quotaType.systemId 556 FROM DiskUsageData du 557 GROUP BY du.location, du.quotaType.systemId 558 </sql> 559 <description> 560 A Hibernate query that returns the total disk usage grouped 561 by location and quota type system id. 562 </description> 563 </query> 564 565 <query id="GET_DISKUSAGE_SUMMARY_FOR_USER" type="HQL"> 566 <sql> 567 SELECT SUM(du.bytes), du.location, du.quotaType.systemId 568 FROM DiskUsageData du 569 WHERE du.user = :user 570 GROUP BY du.location, du.quotaType.systemId 571 </sql> 572 <description> 573 A Hibernate query that returns the disk usage for a user grouped 574 by location and quota type system id. 575 </description> 576 </query> 577 578 <query id="GET_DISKUSAGE_SUMMARY_FOR_GROUP" type="HQL"> 579 <sql> 580 SELECT SUM(du.bytes), du.location, du.quotaType.systemId 581 FROM DiskUsageData du 582 WHERE du.group = :group 583 GROUP BY du.location, du.quotaType.systemId 584 </sql> 585 <description> 586 A Hibernate query that returns the disk usage for a group grouped 587 by location and quota type system id. 588 </description> 589 </query> 590 553 591 <query id="GET_FILES_IN_DIRECTORY" type="HQL"> 554 592 <sql> -
trunk/src/core/net/sf/basedb/core/DiskUsage.java
r2898 r2927 82 82 } 83 83 84 public static DiskUsageStatistics getStatistics(DbControl dc) 85 { 86 return new DiskUsageStatistics(dc); 87 } 88 84 89 /** 85 90 Create a new <code>DiskUsage</code> item. -
trunk/www/include/menu.jsp
r2912 r2927 642 642 final boolean hasClients = sc.hasPermission(Permission.READ, Item.CLIENT); 643 643 final boolean hasNews = sc.hasPermission(Permission.READ, Item.NEWS); 644 Client currentClient = Client.getById(dc, sc.getClientId()); 644 final boolean hasDiskUsage = sc.hasPermission(Permission.READ, Item.DISKUSAGE); 645 final Client currentClient = Client.getById(dc, sc.getClientId()); 645 646 final boolean hasServer = currentClient.hasPermission(Permission.WRITE); 646 647 647 648 final boolean hasAdministrate = 648 649 hasUsers || hasGroups || hasRoles || hasQuota || hasTypes || hasPlugins || 649 hasSoftware || hasHardware || hasProtocols || hasClients || hasNews || hasServer; 650 hasSoftware || hasHardware || hasProtocols || hasClients || hasNews || 651 hasDiskUsage || hasServer; 650 652 651 653 if (hasAdministrate) … … 726 728 /> 727 729 <m:menuseparator /> 730 <m:menuitem 731 title="Disk usage" 732 onclick="<%="Menu.openUrl('"+root+"admin/diskusage/index.jsp?ID="+ID+"')"%>" 733 tooltip="<%=hasDiskUsage ? "Check disk usage" : "You do not have permission to check disk usage"%>" 734 enabled="<%=hasDiskUsage%>" 735 /> 728 736 <m:menuitem 729 737 title="Server settings…"
Note: See TracChangeset
for help on using the changeset viewer.