<div dashboard-header></div>
<div class="dashboard">
<div ng-controller="ReplicationControllerCtrl" layout="column" class="body-wrapper">

  <div class="detail">

      <div class="back">
        <md-button class="md-default-theme" ng-click="doTheBack()">‹ BACK</md-button>
      </div>

      <div class="heading">
        <span class="label">Replication Controller: </span>
        <span>{{replicationController.metadata.name}}</span>
      </div>


      <table class="align-top">
        <tbody>
          <tr>
            <td class="name">Created</td>
            <td class="value">
              {{replicationController.metadata.creationTimestamp | date:'medium'}}
            </td>
          </tr>

          <tr>
            <td class="name">Desired Replicas</td>
            <td class="value">
              {{replicationController.spec.replicas}}
            </td>
          </tr>

          <tr>
            <td class="name">Current Replicas</td>
            <td class="value">
              {{replicationController.status.replicas}}
            </td>
          </tr>

          <tr ng-show="replicationController.spec.selector">
            <td class="name">Selector</td>
            <td class="value">
              <span ng-repeat="(label, value) in replicationController.spec.selector">
                {{label}}={{value}}{{$last ? '' : ', '}}
              </span>
            </td>
          </tr>

          <tr>
            <td class="name">Labels</td>
            <td class="value">
              <div ng-repeat="(label, value) in replicationController.metadata.labels">
                  {{label}}: {{value}}
              </div>
            </td>
          </tr>

          <tr>
            <td class="name">Related Pods</td>
            <td class="value">
              <div ng-show="replicationController.spec.selector && Object.keys(replicationController.spec.selector).length > 1">
                <a ng-href="#/dashboard/groups/type/selector/{{getSelectorUrlFragment(replicationController.spec.selector)}},type=pod">{{getSelectorUrlFragment(replicationController.spec.selector)}}</a>
              </div>

              <div ng-repeat="(label, value) in replicationController.spec.selector">
                <a ng-href="#/dashboard/groups/type/selector/{{label}}={{value}},type=pod">{{label}}: {{value}}</a>
              </div>
            </td>
          </tr>


          <tr>
            <td class="name">Related Services</td>
            <td class="value">
              <div ng-show="replicationController.spec.selector && Object.keys(replicationController.spec.selector).length > 1">

                <a ng-href="#/dashboard/groups/type/selector/{{getSelectorUrlFragment(replicationController.spec.selector)}},type=pod">{{getSelectorUrlFragment(replicationController.spec.selector)}}</a>
              </div>

              <div ng-repeat="(label, value) in replicationController.spec.selector">
                  <a ng-href="#/dashboard/groups/type/selector/{{label}}={{value}},type=service">{{label}}={{value}}</a>
                </div>
            </td>
          </tr>




        </tbody>
      </table>



    </div>



  </div>
</div>
<div dashboard-footer></div>
