<div class='resource-details'>
  <div class="row">
    <div class="col-lg-6">
      <h3>Status</h3>
      <dl class="dl-horizontal left">
        <dt>Status:</dt>
        <dd>
          <status-icon status="build.status.phase"></status-icon>
          {{build.status.phase}}
        </dd>
        <dt>Started:</dt>
        <dd>
          <span ng-if="build.status.startTimestamp">
            <relative-timestamp timestamp="build.status.startTimestamp"></relative-timestamp>
            <span>- {{build.status.startTimestamp | date : 'short'}}</span>
          </span>
          <span ng-if="!build.status.startTimestamp"><em>not started</em></span>
        </dd>
        <dt>Duration:</dt>
        <dd>
          <span ng-switch="build.status.phase" class="hide-ng-leave">
            <span ng-switch-when="Complete">{{(build.status.startTimestamp || build.metadata.creationTimestamp) | duration : build.status.completionTimestamp}}</span>
            <span ng-switch-when="Failed">{{build.status.startTimestamp | duration : build.status.completionTimestamp}}</span>
            <span ng-switch-when="Running">running for <duration-until-now timestamp="build.status.startTimestamp"></duration-until-now></span>
            <span ng-switch-when="New">waiting for <duration-until-now timestamp="build.metadata.creationTimestamp"></duration-until-now></span>
            <span ng-switch-when="Pending">waiting for <duration-until-now timestamp="build.metadata.creationTimestamp"></duration-until-now></span>
            <span ng-switch-default>
              <span ng-if="build.status.startTimestamp">{{build.status.startTimestamp | duration : build.status.completionTimestamp}}</span>
              <span ng-if="!build.status.startTimestamp">waited for {{build.metadata.creationTimestamp | duration : build.status.completionTimestamp}}</span>
            </span>
          </span>
        </dd>
      </dl>
      <h3>Configuration <span class="small" ng-if="buildConfigName">created from <a href="{{buildConfigName | navigateResourceURL : 'BuildConfig' : build.metadata.namespace}}">{{buildConfigName}}</a></span></h3>
      <dl class="dl-horizontal left">
        <dt>Build strategy:</dt>
        <dd>{{build.spec.strategy.type}}</dd>
        <dt>Builder image:</dt>
        <dd class="truncate">{{(build | buildStrategy).from | imageObjectRef : build.metadata.namespace}}<span ng-if="!(build | buildStrategy).from"><em>none</em></span></dd>
        <dt>Source type:</dt>
        <dd>{{build.spec.source.type}}</dd>
        <dt ng-if-start="build.spec.source.git.uri">Source repo:</dt>
        <dd ng-if-end><span ng-bind-html='build.spec.source.git.uri | githubLink : build.spec.source.git.ref : build.spec.source.contextDir | linky'></span></dd>
        <dt ng-if-start="build.spec.source.git.ref">Source ref:</dt>
        <dd ng-if-end>{{build.spec.source.git.ref}}</dd>
        <dt ng-if-start="build.spec.source.contextDir">Source context dir:</dt>
        <dd ng-if-end>{{build.spec.source.contextDir}}</dd>
        <dt ng-if-start="build.spec.output.to">Output image:</dt>
        <dd ng-if-end>{{build.spec.output.to | imageObjectRef : build.metadata.namespace}}</dd>
        <dt ng-if-start="build.spec.output.pushSecret.name">Push secret:</dt>
        <dd ng-if-end>{{build.spec.output.pushSecret.name}}</dd>
      </dl>
    </div>
  </div>
  <annotations annotations="build.metadata.annotations"></annotations>
</div>
