<div class="content">
  <project-page>
    <breadcrumbs breadcrumbs="breadcrumbs"></breadcrumbs>
    <alerts alerts="alerts"></alerts>
    <div ng-if="!loaded">Loading...</div>
    <div ng-if="build">
      <div class="row">
        <div class="col-md-12">
          <div class="tile">
            <h1>
              {{build.metadata.name}}
              <span ng-if="build.status.message" class="pficon pficon-warning-triangle-o" style="cursor: help;" data-toggle="popover" data-placement="right" data-trigger="hover" dynamic-content="{{build.status.message}}"></span>
              <small class="meta">created <relative-timestamp timestamp="build.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="build"
                      kind="builds"
                      alerts="alerts">
                    </edit-link>
                  </li>
                  <li>
                    <delete-link
                      resource-type="build"
                      resource-name="{{build.metadata.name}}"
                      project-name="{{build.metadata.namespace}}"
                      alerts="alerts">
                    </delete-link>
                  </li>
                </ul>
              </div>
            </h1>
            <labels ng-if="buildConfigName" labels="build.metadata.labels" clickable="true" kind="builds" title-kind="builds for build config {{buildConfigName}}" project-name="{{build.metadata.namespace}}" limit="3" navigate-url="project/{{build.metadata.namespace}}/browse/builds/{{buildConfigName}}"></labels>
            <labels ng-if="!buildConfigName" labels="build.metadata.labels" limit="3"></labels>

            <tabset>
              <tab active="selectedTab.details">
                <tab-heading>Details</tab-heading>
                <ng-include src=" 'views/browse/_build-details.html' "></ng-include>
              </tab>

              <tab active="selectedTab.logs">
                <tab-heading>Logs</tab-heading>
                <log-viewer
                  ng-if="selectedTab.logs"
                  kind="builds/log"
                  name="build.metadata.name"
                  context="logContext"
                  status="build.status.phase"
                  start="build.status.startTimestamp | date : 'short'"
                  end="build.status.completionTimestamp | date : 'short'">
                </log-viewer>
              </tab>
            </tabset>
          </div>
        </div>
      </div><!-- /.row -->
    </div><!-- /build -->
  </project-page>
</div>
