<script type="text/ng-template" id="idTemplate.html">
  <div class="ngCellText" ng-controller="Kubernetes.IDSelector">
    <a href="" 
       title="View details for {{row.entity.id}}"
       ng-click="select(row.entity.id)">{{row.entity.id}}</a>
  </div>
</script>
<script type="text/ng-template" id="selectorTemplate.html">
  <div class="ngCellText">
    <span ng-repeat="(name, value) in row.entity.selector track by $index">
      <strong>{{name}}</strong>: {{value}}
    </span>
  </div>
</script>
<script type="text/ng-template" id="labelTemplate.html">
  <div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.Labels">
    <p ng-show="data"><strong>Labels</strong></p>
    <span ng-repeat="label in labels track by $index"
          class="pod-label badge"
          ng-class="labelClass(label.key)"
          ng-click="handleClick(entity, label.key, label)"
          title="{{label.key}}">{{label.title}}</span>
  </div>
</script>
<script type="text/ng-template" id="portalAddress.html">
  <div class="ngCellText">
    <a target="openService" href="http://{{row.entity.portalIP}}:{{row.entity.port}}/"
       ng-show="row.entity.portalIP" title="Protocol {{row.entity.protocol}}">
      {{row.entity.portalIP}}:{{row.entity.port}}
    </a>
  </div>
</script>
<script type="text/ng-template" id="replicationControllerIconTemplate.html">
  <div ng-init="entity = entity" ng-controller="Kubernetes.ReplicationControllerIcon">
    <img class="icon-replication-controller" ng-src="{{iconUrl}}">
  </div>
</script>
<script type="text/ng-template" id="statusTemplate.html">
  <div class="ngCellText" ng-init="entity=row.entity" ng-controller="Kubernetes.PodStatus" title="Pod {{entity.id}} is {{entity.currentState.status}}">
    <!-- in detail view -->
    <p ng-show="data"><strong>Status: </strong></p>
    <i ng-class="statusMapping(entity.currentState.status)"></i>
    <span ng-show="data">{{data}}</span>
    <!-- in table -->
    <span ng-show="entity.$jolokiaUrl">
      <a class="clickable"
         href=""
         ng-click="entity.$connect.doConnect(row.entity)"
         title="Open a new window and connect to this container">
        <i class="icon-signin"></i>
      </a>
    </span>
  </div>
</script>
<div class="row-fluid" ng-controller="Kubernetes.TopLevel">
  <div class="span12">
    <ul class="nav nav-tabs connected">
      <li ng-class='{active : isActive("#/kubernetes/overview")}'
          title="View an overview of the system">
        <a ng-href="#/kubernetes/overview">Overview</a>
      </li>
      <li ng-class='{active : isActive("#/kubernetes/services")}'
          title="View kubernetes services and their status">
        <a ng-href="#/kubernetes/services">Services</a>
      </li>
      <li ng-class='{active : isActive("#/kubernetes/replicationControllers")}'
          title="View kubernetes replication controllers and their status">
        <a ng-href="#/kubernetes/replicationControllers">Controllers</a>
      </li>
      <li ng-class='{active : isActive("#/kubernetes/pods")}'
          title="View kubernetes pods and their status">
        <a ng-href="#/kubernetes/pods">Pods</a>
      </li>
      <li class=pull-right>
        <span ng-show="version">Kubernetes version: {{version.major}}.{{version.minor}}</span>
      <li>
    </ul>
    <div class="wiki-icon-view" ng-controller="Kubernetes.FileDropController" nv-file-drop nv-file-over uploader="uploader" over-class="ready-drop">
      <div class="row-fluid" ng-view>
      </div>
    </div>
  </div>
</div>

