<div class="content">
  <project-page>
    <breadcrumbs breadcrumbs="breadcrumbs"></breadcrumbs>
    <alerts alerts="alerts"></alerts>
    <div ng-if="!loaded">Loading...</div>
    <div ng-if="pvc">
      <div class="row">
        <div class="col-md-12">
          <div class="tile">
            <h1>
              {{pvc.metadata.name}}
              <small class="meta" ng-if="!pvc.spec.volumeName">
                  <span ng-if="pvc.spec.resources.requests['storage']">
                    waiting for {{pvc.spec.resources.requests['storage'] | usageWithUnits: 'storage'}} allocation,
                  </span>
                  <span ng-if="!pvc.spec.resources.requests['storage']">waiting for allocation,</span>
              </small>
              <small class="meta">created <relative-timestamp timestamp="pvc.metadata.creationTimestamp"></relative-timestamp></small>
              <div class="pull-right dropdown">
                <a href="" class="dropdown-toggle resource-actions-dropdown" data-toggle="dropdown"><i class="fa fa-ellipsis-v"></i><span class="sr-only">Actions</span></a>
                <ul class="dropdown-menu actions action-button">
                  <li>
                    <edit-link
                      resource="pvc"
                      kind="persistentvolumeclaims"
                      alerts="alerts">
                    </edit-link>
                  </li>
                  <li>
                    <delete-link
                      resource-type="persistentvolumeclaim"
                      type-display-name="Persistent Volume Claim"
                      resource-name="{{pvc.metadata.name}}"
                      project-name="{{pvc.metadata.namespace}}"
                      alerts="alerts">
                    </delete-link>
                  </li>
                </ul>
              </div>
            </h1>
            <div class="resource-details">
              <dl class="dl-horizontal left">
                <dt>Status:</dt>
                <dd>
                  <status-icon status="pvc.status.phase" disable-animation></status-icon>
                  {{pvc.status.phase}}
                  <span ng-if="pvc.spec.volumeName">to volume <strong>{{pvc.spec.volumeName}}</strong></span>
                </dd>
                <dt ng-if="pvc.spec.volumeName">Capacity:</dt>
                <dd ng-if="pvc.spec.volumeName">
                  <span ng-if="pvc.status.capacity['storage']">
                    allocated {{pvc.status.capacity['storage'] | usageWithUnits: 'storage'}}
                  </span>
                  <span ng-if="!pvc.status.capacity['storage']">allocated unknown size</span>
                </dd>
                <dt>Requested Capacity:</dt>
                <dd>
                  <span ng-if="pvc.spec.resources.requests['storage']">
                    {{pvc.spec.resources.requests['storage'] | usageWithUnits: 'storage'}}
                  </span>
                  <span ng-if="!pvc.spec.resources.requests['storage']"><em>none</em></span>
                </dd>
                <dt>Access Modes:</dt>
                <dd>{{pvc.spec.accessModes | accessModes:'long' | join}}</dd>
              </dl>
            </div>
          </div> <!-- /tile -->
        </div> <!-- /col -->
      </div> <!-- /row -->
    </div>
  </project-page>
</div>
