Changeset 3457


Ignore:
Timestamp:
Jun 7, 2007, 8:51:50 AM (16 years ago)
Author:
Martin Svensson
Message:

Fixes #610 Offline files are counted in the total quota in disk usage overview

Location:
branches/2.3.1/www/admin/diskusage
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.3.1/www/admin/diskusage/details/view_details.jsp

    r3447 r3457  
    8181    locations.add(String.valueOf(Location.PRIMARY.getValue()), Location.PRIMARY.toString());
    8282    locations.add(String.valueOf(Location.SECONDARY.getValue()), Location.SECONDARY.toString());
     83    locations.add(String.valueOf(Location.OFFLINE.getValue()), Location.OFFLINE.toString());   
    8384  }
    8485%>
     
    270271        <th style="text-align: right;">&nbsp;&nbsp;Primary</th>
    271272        <th style="text-align: right;">&nbsp;&nbsp;Secondary</th>
     273        <th style="text-align: right;">&nbsp;&nbsp;Offline</th>       
    272274      </tr>
    273275      <tr>
     
    279281        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.PRIMARY))%></td>
    280282        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.SECONDARY))%></td>
     283        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.OFFLINE))%></td>
    281284      </tr>
    282285      <tr>
     
    292295          <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(qt, Location.PRIMARY))%></td>
    293296          <td style="text-align: right;"><%=qt.hasSecondaryLocation() ? Values.formatBytes(summary.getTotal(qt, Location.SECONDARY)) : "n/a"%></td>
     297          <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(qt, Location.OFFLINE))%></td>         
    294298        </tr>
    295299        <%
  • branches/2.3.1/www/admin/diskusage/list_groups.jsp

    r3190 r3457  
    9494  {
    9595    final ItemQuery<Group> query = Base.getConfiguredQuery(cc, true, Group.getQuery(), mode);
     96    query.restrict(
     97        Restrictions.neq(
     98          Hql.property("quota"), null));
    9699    groups = query.iterate(dc);
    97100  }
     
    351354                        <td style="text-align: right;">&nbsp;&nbsp;Primary</td>
    352355                        <td style="text-align: right;">&nbsp;&nbsp;Secondary</td>
     356                        <td style="text-align: right;">&nbsp;&nbsp;Offline</td>                       
    353357                      </tr>
    354358                      <%
     
    356360                    %>
    357361                    <tr>
    358                       <td colspan="4" style="border-bottom: 1px dotted #999999"></td>
     362                      <td colspan="5" style="border-bottom: 1px dotted #999999"></td>
    359363                    </tr>   
    360364                    <tr style="background: #E0E0E0;">
     
    374378                        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.PRIMARY))%></td>
    375379                        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.SECONDARY))%></td>
     380                        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.OFFLINE))%></td>                       
    376381                        <%
    377382                      }
     
    379384                    </tr>
    380385                    <tr>
    381                       <td colspan="4" style="border-top: 1px dotted #999999"></td>
     386                      <td colspan="5" style="border-top: 1px dotted #999999"></td>
    382387                    </tr>   
    383388                    <%
     
    396401                            <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(qt, Location.PRIMARY))%></td>
    397402                            <td style="text-align: right;"><%=qt.hasSecondaryLocation() ? Values.formatBytes(summary.getTotal(qt, Location.SECONDARY)) : "n/a"%></td>
     403                            <td style="text-align: right;"><%=qt.getSystemId().equals(QuotaType.FILE) ? Values.formatBytes(summary.getTotal(qt, Location.OFFLINE)) : "n/a"%></td>
    398404                            <%
    399405                          }
  • branches/2.3.1/www/admin/diskusage/list_users.jsp

    r3190 r3457  
    488488                        <td style="text-align: right;">&nbsp;&nbsp;Primary</td>
    489489                        <td style="text-align: right;">&nbsp;&nbsp;Secondary</td>
     490                        <td style="text-align: right;">&nbsp;&nbsp;Offline</td>                       
    490491                      </tr>
    491492                      <%
     
    493494                    %>
    494495                    <tr>
    495                       <td colspan="4" style="border-bottom: 1px dotted #999999"></td>
     496                      <td colspan="5" style="border-bottom: 1px dotted #999999"></td>
    496497                    </tr>   
    497498                    <tr style="background: #E0E0E0;">
     
    511512                        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.PRIMARY))%></td>
    512513                        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.SECONDARY))%></td>
     514                        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.OFFLINE))%></td>                       
    513515                        <%
    514516                      }
     
    516518                    </tr>
    517519                    <tr>
    518                       <td colspan="4" style="border-top: 1px dotted #999999"></td>
     520                      <td colspan="5" style="border-top: 1px dotted #999999"></td>
    519521                    </tr>   
    520522                    <%
     
    533535                            <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(qt, Location.PRIMARY))%></td>
    534536                            <td style="text-align: right;"><%=qt.hasSecondaryLocation() ? Values.formatBytes(summary.getTotal(qt, Location.SECONDARY)) : "n/a"%></td>
     537                            <td style="text-align: right;"><%=qt.getSystemId().equals(QuotaType.FILE) ? Values.formatBytes(summary.getTotal(qt, Location.OFFLINE)) : "n/a"%></td>
    535538                            <%
    536539                          }
  • branches/2.3.1/www/admin/diskusage/overview.jsp

    r2978 r3457  
    107107      <th style="text-align: right;">&nbsp;&nbsp;Primary location</th>
    108108      <th style="text-align: right;">&nbsp;&nbsp;Secondary location</th>
     109      <th style="text-align: right;">&nbsp;&nbsp;Moved offline</th>     
    109110    </tr>
    110111    <tr>
    111       <td colspan="4" style="border-bottom: 1px dotted #999999"></td>
     112      <td colspan="5" style="border-bottom: 1px dotted #999999"></td>
    112113    </tr>   
    113114    <tr style="background: #E0E0E0;">
     
    116117      <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.PRIMARY))%></td>
    117118      <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.SECONDARY))%></td>
     119      <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(Location.OFFLINE))%></td>     
    118120    </tr>
    119121    <tr>
    120       <td colspan="4" style="border-top: 1px dotted #999999"></td>
     122      <td colspan="5" style="border-top: 1px dotted #999999"></td>
    121123    </tr>   
    122124    <%
     
    129131        <td style="text-align: right;"><%=Values.formatBytes(summary.getTotal(qt, Location.PRIMARY))%></td>
    130132        <td style="text-align: right;"><%=qt.hasSecondaryLocation() ? Values.formatBytes(summary.getTotal(qt, Location.SECONDARY)) : "n/a"%></td>
     133        <td style="text-align: right;"><%=qt.getSystemId().equals(QuotaType.FILE) ? Values.formatBytes(summary.getTotal(qt, Location.OFFLINE)) : "n/a"%></td>
    131134      </tr>
    132135      <%
Note: See TracChangeset for help on using the changeset viewer.