<h3>Bucket details for {{detailedBucket.bucket}}</h3>
<br />

<table  class="table table-condensed table-nohead">
    <tbody>
    <tr><td width="100px">Name</td> <td> {{ detailedBucket.bucket }} </td></tr>
    <tr><td>Id</td> <td> {{ detailedBucket.id }} </td></tr>
    <tr><td>Owner</td> <td> {{ detailedBucket.owner }} </td></tr>
    <tr><td>Pool</td> <td> {{ detailedBucket.pool }} </td></tr>
    <tr><td>Version</td> <td> {{ detailedBucket.ver }} </td></tr>
    <tr><td>Master version</td> <td> {{ detailedBucket.master_ver }} </td></tr>
    <tr><td>Marker</td> <td> {{ detailedBucket.marker }} </td></tr>
    <tr><td>Max marker</td> <td> {{ detailedBucket.max_marker }} </td></tr>
    <tr><td>Modification time</td> <td> {{ detailedBucket.mtime *1000 | date:'medium' }} </td></tr>
    <tr><td>Index pool</td> <td> {{ detailedBucket.index_pool }} </td></tr>
    <tr>
        <td>Bucket quota</td>
        <td ng-show="detailedUser.bucket_quota.enabled">
             <div ng-show="detailedUser.bucket_quota.max_objects>-1">
                max objects :{{detailedUser.bucket_quota.max_objects}}
            </div>
            <div ng-show="detailedUser.bucket_quota.max_size_kb >-1">
                max size: {{detailedUser.bucket_quota.max_size_kb*1024|bytes}}
            </div>
        </td>
        <td ng-hide="detailedUser.bucket_quota.enabled">
            disabled
        </td>
    </tr>
    <tr><td>Usage</td>
        <td>
            <table  class="table table-condensed table-nohead">
                <tr ng-repeat="(key, value) in detailedBucket.usage">
                    <td width="150px"> {{key.replace('_',' ', 'gi')}} </td>
                    <td> <table  class="table table-condensed table-nohead">
                        <tr ng-repeat="(key, value) in value">
                            <td width="150px"> {{key.replace('_',' ', 'gi')}} </td>
                            <td> {{ value }} </td>
                        </tr>
                    </table> </td>
                </tr>
            </table>
        </td>
    </tr>
    </tbody>
</table>

<div class="button-bar" ng-show="hasRole('admin_rgw')">
    <!--a href="#/enableVersioning/{{ detailedBucket.bucket }}" class="btn btn-default">Enable versioning</a>
    <a href="#/suspendVersioning/{{ detailedBucket.bucket }}" class="btn btn-default">Suspend versioning</a-->
    <a href="#/detail/{{detailedBucket.bucket}}/acl" class="btn btn-default">Show ACL</a>
    <a href="#/changeOwner/{{ detailedBucket.bucket }}/{{ detailedBucket.owner }}" class="btn btn-success">Change owner</a>
    <a href="#/delete/{{ detailedBucket.bucket }}" class="btn btn-danger">Delete</a>
    <a href="#/" class="btn btn-default">Close</a>
</div>
