<div class="controller-section" ng-controller="Fabric.MigrateContainersController">

  <div class="row-fluid">
    <div class="pull-left">
      <a class='btn' ng-href="#/fabric/containers"><i class='icon-remove'></i> Cancel</a>
    </div>
    <div class="pull-right">
      <a ng-disabled="canApply()" class="btn btn-danger" href="" ng-click="showApply = true"><i class="icon-cogs"></i> Apply Changes</a>
    </div>
  </div>

  <div class="row-fluid">
    <div class="span4 offset2">
      <p>1. Select the target version: </p>
      <input class="search-query column-filter" type="text" ng-model="versionGridOptions.filterOptions.filterText" placeholder="Filter...">
      <div class="gridStyle" ng-grid="versionGridOptions"></div>
    </div>
    <div class="span4">
      <p ng-show="selectedVersion.length == 0">2. Select the containers that should be migrated: </p>
      <p ng-show="selectedVersion.length > 0">2. Select the containers that should be migrated to {{selectedVersion[0].id}}: </p>
      <input class="search-query column-filter" type="text" ng-model="containerGridOptions.filterOptions.filterText" placeholder="Filter...">
      <div class="gridStyle" ng-grid="containerGridOptions"></div>
    </div>
  </div>

  <div hawtio-confirm-dialog="showApply" ok-button-text="Yes" cancel-button-text="No" on-ok="migrateContainers()" title="Migrate Containers?">
    <div class="dialog-body">
      <p>Are you sure you want to migrate {{selectedContainers.length}} containers to version {{selectedVersion[0].id}}?</p>
    </div>
  </div>


</div>
