summaryrefslogtreecommitdiffstats
path: root/testapi/opnfv_testapi/ui/components/deploy-results/deployResults.html
blob: 6fbaaeae92cae763a6cb2ff7aebfcd46993f1f36 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<h3>{{ctrl.pageHeader}}</h3>
<p>{{ctrl.pageParagraph}}</p>
<div class="row" style="margin-bottom:24px;"></div>
<div class="result-filters" style="border-top: none;">
    <div class="row podTable" style="vertical-align:middle">
            <div class="col-sm-1 pull-right">
                    <button type="button" class="btn btn-danger" ng-click="ctrl.clearFilters()">
                      <i class="fa fa-search"></i> Clear
                    </button>
            </div>
        <div class="col-sm-1 pull-right">
            <button type="button" class="btn btn-success" ng-click="ctrl.filterList()">
              <i class="fa fa-search"></i> Filter</button>
        </div>
        <div class="col-sm-2 pull-right" ng-class="{'hidden': ctrl.filter=='start_date' || ctrl.filter=='end_date'}">
            <span style="margin-top:6px">Search:&nbsp;&nbsp;</span>
            <input list="filter" name="filter" class="form-control search" style="display:inline;width:105px;padding-left:6px;"
                ng-Model="ctrl.filterText" placeholder="Search String">
                <datalist id="filter" ng-class="{ 'hidden' : ctrl.filterOption.length<0}">
                    <option ng-repeat="(index, filterValue) in ctrl.filterOption " value="{{filterValue}}">{{filterValue}}</option>
                </datalist>
        </div>
        <div class="col-sm-3 pull-right" style="width:20%" ng-class="{'hidden': ctrl.filter!='start_date'}">
            <span style="margin-top:6px">Start&nbsp;Date:&nbsp;&nbsp;</span>
            <p class="input-group" style="width:48%;display:inline-flex;">
                <input type="text" class="form-control"
                    uib-datepicker-popup="{{ctrl.format}}"
                    ng-model="ctrl.filterText" is-open="ctrl.startOpen"
                    close-text="Close" />
                <span class="input-group-btn">
                    <button type="button" class="btn btn-default" ng-click="ctrl.open($event, 'startOpen')">
                        <i class="glyphicon glyphicon-calendar"></i>
                    </button>
                </span>
            </p>
        </div>
        <div class="col-sm-3 pull-right" style="width:20%" ng-class="{'hidden': ctrl.filter!='end_date'}">
            <span style="margin-top:6px">End&nbsp;Date:&nbsp;&nbsp;</span>
            <p class="input-group" style="width:48%;display:inline-flex;">
                <input type="text" class="form-control"
                    uib-datepicker-popup="{{ctrl.format}}"
                    ng-model="ctrl.filterText" is-open="ctrl.endOpen"
                    close-text="Close" />
                <span class="input-group-btn">
                    <button type="button" class="btn btn-default" ng-click="ctrl.open($event, 'endOpen')">
                        <i class="glyphicon glyphicon-calendar"></i>
                    </button>
                </span>
            </p>
        </div>
        <div class="col-md-2 row pull-right" style="width: 20%;">
            <span style="margin-top:6px">Filter:&nbsp;&nbsp;</span>
            <select ng-model="ctrl.filter" ng-change="ctrl.encodeFilter()" class="form-control" style="display:inline; width:150px;">
                    <option value="pod" ng-disabled="ctrl.testFilter('pod')" >Pod Name</option>
                    <option value="job_name" ng-disabled="ctrl.testFilter('job_name')" >Job Name</option>
                    <option value="installer" ng-disabled="ctrl.testFilter('installer')">Installer</option>
                    <option value="version" ng-disabled="ctrl.testFilter('version')">Version</option>
                    <option value="scenario" ng-disabled="ctrl.testFilter('scenario')">Scenario</option>
                    <option value="build_id" ng-disabled="ctrl.testFilter('build_id')">Build ID</option>
                    <option value="criteria" ng-disabled="ctrl.testFilter('criteria')">Criteria</option>
                    <option value="start_date" ng-disabled="ctrl.testFilter('start_date')">Start Date</option>
                    <option value="end_date" ng-disabled="ctrl.testFilter('end_date')">End Date</option>
            </select>
        </div>
        <div class='filter-box'>
            <div class='filter-tag col-md-1' ng-repeat="(key, tag) in ctrl.tagArray" style="background-color: #f5f5f5;border: 1px solid #e3e3e3;/* border:  1px; */margin-top: 3px;padding: 4px;margin-left: 15px;width: 13%;">
                {{key}}&nbsp:&nbsp{{tag}}
                <div class='delete-tag btn btn-danger btn-xs' ng-click='ctrl.deleteTag(key)'>
                    &times;
                </div>
            </div>
        </div>
    </div>
</div>

<div cg-busy="{promise:ctrl.authRequest,message:'Loading'}"></div>
<div cg-busy="{promise:ctrl.resultsRequest,message:'Loading'}"></div>
<div ng-show="ctrl.data" class="results-table">
    <table ng-data="ctrl.data.deployresults" ng-show="ctrl.data" class="table table-striped table-hover">
        <thead>
            <tr>
                <th>ID</th>
                <th>Installer</th>
                <th>Scenario</th>
                <th>Pod</th>
                <th>Criteria</th>
                <th>Start&nbsp;Date</th>
                <th>Stop&nbsp;Date</th>
            </tr>
        </thead>

        <tbody>
            <tr ng-repeat-start="(index, result) in ctrl.data.deployresults">
                <td><a ng-click="ctrl.viewDeployResult(result._id)">{{ result._id.substr(-8) }}</a></td>
                <td>{{ result.installer }}</td>
                <td>{{ result.scenario }}</td>
                <td>{{ result.pod_name }}</td>
                <td>{{ result.criteria }}</td>
                <td>{{ result.start_date }}</td>
                <td>{{ result.stop_date }}</td>
            </tr>
            <tr ng-repeat-end=>
            </tr>
        </tbody>
    </table>

    <div class="pages">
        <uib-pagination
            total-items="ctrl.totalItems"
            ng-model="ctrl.currentPage"
            items-per-page="ctrl.itemsPerPage"
            max-size="ctrl.maxSize"
            class="pagination-sm"
            boundary-links="true"
            rotate="false"
            num-pages="ctrl.numPages"
            ng-change="ctrl.filterList()">
        </uib-pagination>
    </div>
</div>

<div ng-show="ctrl.showError" class="alert alert-danger" role="alert">
    <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
    <span class="sr-only">Error:</span>
    {{ctrl.error}}
</div>