summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/pods/pods.html
blob: 8e66a9c2503f372fbb87453e162d23698fc30adb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<h3>Pods</h3>
<p>This page is used to create or query pods.<br>
    Querying pods is open to everybody.<br>
    But only login users are granted the privilege to create the new pod.
</p>
<div class="row" style="margin-bottom:24px;"></div>
<div cg-busy="{promise:ctrl.authRequest,message:'Loading'}"></div>
<div cg-busy="{promise:ctrl.podsRequest,message:'Loading'}"></div>
<br>
<div class="row podsTable" style="vertical-align:middle">
        <div class="col-sm-1 pull-right" ng-class="{ 'hidden': !auth.isAuthenticated }" >
                <button type="button" class="btn btn-danger" ng-click="ctrl.openBatchDeleteModal()">
                  <i class="fa fa-minus"></i> Delete</button>
        </div>
        <div class="col-sm-1 pull-right"  ng-class="{ 'hidden': !auth.isAuthenticated }">
            <button type="button" class="btn btn-success" ng-click="ctrl.openCreateModal()">
              <i class="fa fa-plus"></i> Create</button>
        </div>
        <div class="col-sm-1 pull-right">
            <button type="button" class="btn btn-success" ng-click="ctrl.listPods()">
              <i class="fa fa-search"></i> Filter</button>
        </div>
        <div class="col-sm-3 pull-right">
            <span style="margin-top:6px">Search:&nbsp;&nbsp;</span>
            <input type="text" class="form-control search" ng-enter="ctrl.listPods()"  ng-Model="ctrl.filterText" placeholder="Search String">
        </div>
</div>
<div class="col-md-12">
    <div ng-show="ctrl.showError" class="col-md-12 alert alert-danger" role="alert">
        <span class="pull-right">&nbsp;{{ctrl.error}}</span>
        <span class="glyphicon glyphicon-exclamation-sign pull-right" aria-hidden="true" >Error:</span>
    </div>
    <div ng-show="ctrl.showSuccess" class="col-md-12 alert alert-success" role="alert">
        <span class="pull-right">&nbsp;{{ctrl.success}}</span>
        <span class="glyphicon glyphicon-ok pull-right" aria-hidden="true"></span>
    </div>
</div>
<div class="col-md-12" style="padding-right:0px">
    <div class="table-responsive">
        <table class="table table-bordered table-hover"  ng-data="ctrl.data.pods">
        <thead>
        <tr style="
        text-align: center;">
            <th style="width:1%">Bulk Select</th>
            <th>Name
                <a class="text-danger"  ng-click="ctrl.sortBy('name')" ng-class="{ 'hidden': !ctrl.sorting['name'] }" >
                    <span class="glyphicon glyphicon-sort-by-alphabet pull-right" aria-hidden="true"></span>
                </a>
                <a class="text-danger"  ng-click="ctrl.sortBy('name')" ng-class="{ 'hidden': ctrl.sorting['name'] }" >
                    <span class="glyphicon glyphicon-sort-by-alphabet-alt pull-right" aria-hidden="true"></span>
                </a>
            </th>
            <th>Role
                <a class="text-danger"  ng-click="ctrl.sortBy('role')" ng-class="{ 'hidden': !ctrl.sorting['role']}" >
                    <span class="glyphicon glyphicon-sort-by-alphabet pull-right" aria-hidden="true"></span>
                </a>
                <a class="text-danger"  ng-click="ctrl.sortBy('role')" ng-class="{ 'hidden': ctrl.sorting['role']}" >
                    <span class="glyphicon glyphicon-sort-by-alphabet-alt pull-right" aria-hidden="true"></span>
                </a>
            </th>
            <th>Mode
                <a class="text-danger"  ng-click="ctrl.sortBy('mode')" ng-class="{ 'hidden': !ctrl.sorting['mode'] }" >
                    <span class="glyphicon glyphicon-sort-by-alphabet pull-right" aria-hidden="true"></span>
                </a>
                <a class="text-danger"  ng-click="ctrl.sortBy('mode')" ng-class="{ 'hidden': ctrl.sorting['mode'] }" >
                    <span class="glyphicon glyphicon-sort-by-alphabet-alt pull-right" aria-hidden="true"></span>
                </a>
            </th>
            <th ng-class="{ 'hidden': !auth.isAuthenticated }">Operation</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat-start="(index, pod) in ctrl.data.pods" style="padding:9px">
            <td>
            <div class="text-center">
                    <input type="checkbox" value="{{pod.name}}"  ng-model="ctrl.checkBox[index]" >
                </div>
            </td>
            <td><a class="text-info" ng-click="ctrl.viewPod(pod.name)">{{pod.name}}</a></td>
            <td>{{pod.role}}</td>
            <td>{{pod.mode}}</td>
            <td ng-class="{ 'hidden': !auth.isAuthenticated }">
                <span class="podsTable-col">
                    <a class="text-danger"  ng-click="ctrl.openDeleteModal(pod.name)" title="Delete" ng-class="{ 'hidden': !auth.isAuthenticated }">
                        <i class="fa fa-trash-o"></i></a>
                </span>
            </td>
        </tr>
        <tr ng-repeat-end=>
        </tr>
        </tbody>
        </table>
    </div>
    </div>
</div>