<!DOCTYPE html>
<html ng-app="imageApp">
<head>
    <meta charset="UTF-8"/>
    <script src="scripts/angular/angular.min.js"></script>
    <script src="scripts/angular/angular-route.min.js"></script>
    <script src="scripts/angular/angular-sanitize.min.js"></script>
    <script src="scripts/angular-misc/ng-table.min.js"></script>
    <script src="scripts/angular-misc/angular-commons.js"></script>
    <script src="scripts/angular-misc/ui-bootstrap-tpls-0.10.0.min.js"></script>
    <script src="scripts/angular-misc/dialogs.v2.min.js"></script>
    <script src="scripts/imagesApp.js"></script>
    <script src="scripts/jquery.min.js"></script>
    <script src="scripts/bootstrap.min.js"></script>
    <link rel="stylesheet" href="css/tooltip.css"/>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/testAdmin.css">
    <link rel="stylesheet" href="scripts/angular-misc/ng-table.min.css">
    <title>Block device images</title>
</head>

<body ng-controller="ListCtrl" onresize="resizeBlocks(['#list','#control'])">
<header ng-include src="'partials/header.html'" ng-init="pageTitle='Block device images'"></header>

<div>
    <div id="datePanel">Date : {{date | date:'HH:mm:ss'}}  <span class="text-warning" ng-show="status != 200"><i class="icon-warning-sign"></i> {{status}}</span></div>
    <div id="list">
        <table>
            <tr>
                <th><input type="text" ng-model="search" class="search-query" placeholder="Search"></th>
                <th>&nbsp; &nbsp; </th>
                <th ng-show="hasRole('admin_rbd')">new image <a href="#/new"><i class="icon-plus-sign" alt="add a new image" title="add a new image"></i></a></th>
                <th>&nbsp; &nbsp; </th>
            </tr>
            <tr>
                <th>&nbsp; &nbsp; </th>
                <th>&nbsp; &nbsp; </th>
                <th>View snapshots <input type="checkbox" ng-value="true" ng-model="viewSnapshot"> </th>
            </tr>
        </table>
        <br>
        <table ng-table="tableParams" class="table table-condensed table-hover clickable">
            <tr ng-repeat="pool_image in orderedData | filter:search"
                ng-hide="!viewSnapshot && pool_image.image.snapshot">
                <td ng-click="showDetail(pool_image)" data-title="'Pool'" sortable="'pool'">{{pool_image.pool}}</td>
                <td ng-click="showDetail(pool_image)" data-title="'Image'" sortable="'image'">{{pool_image.image.image}}</td>
                <td  ng-click="showSnapshotDetail(pool_image,pool_image.image.snapshot)" ng-show="viewSnapshot" data-title="'Snapshot'" sortable="'snapshot'">{{pool_image.image.snapshot}}</td>
            </tr>
        </table>
    </div>
</div>
<div ng-view id="control" ></div>

<script>resizeBlocks(['#list','#control']);</script>
</body>
</html>

