blob: 5d6979dade7432daadda561a9f0568c62c0dddf5 (
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
|
<h3>{{ctrl.pageHeader}}</h3>
<p>{{ctrl.pageParagraph}}</p>
<form class="form-inline" ng-show="ctrl.isUserResults">
<h4>Upload Results<i class="glyphicon glyphicon-question-sign opnfv-blue" uib-tooltip="results file is logs.xxx.tar.gz under your dovetail installation path"></i></h4>
<div class="form-group col-m-3">
<input class="form-contrl nectar-button medium accent-color regular-button" type = "file" file-model = "resultFile"/>
</div>
<div class="form-group col-m-3">
<a class="nectar-button medium accent-color regular-button" ng-click="ctrl.uploadFile()"><span>upload result</span></a>
</div>
<div>
<lable>{{ctrl.uploadState}}</label>
</div>
</form>
<div class="row" style="margin-bottom:24px;"></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.result" ng-show="ctrl.data" class="table table-striped table-hover">
<thead>
<tr>
<th>Upload Date</th>
<th>Test ID</th>
<th>Status</th>
<th>Log</th>
<th class="col-md-2">Operation</th>
<th class="col-md-2">Share List</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(index, result) in ctrl.data.tests">
<td>{{ result.upload_date }}</td>
<td><a ng-click="ctrl.gotoResultDetail(result.id, result._id)">{{ result.id }}</a></td>
<td>{{ result.status }}</td>
<td><a ng-click="ctrl.downloadLogs(result.id)">logs</a></td>
<td>
<div class="btn-group" uib-dropdown>
<a id="single-button" type="button" class="nectar-button medium accent-color regular-button" uib-dropdown-toggle>
Operation<span class="caret"></span>
</a>
<ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">
<li role="menuitem" ng-if="auth.currentUser.role == 'user'" class="menu-item menu-item-type-post_type menu-item-object-page"><a ng-class="{'hide': result.status != 'review'}" ng-click="ctrl.toPrivate(result, 'private')">withdraw submit</a></li>
<li role="menuitem" ng-if="auth.currentUser.role == 'user'" class="menu-item menu-item-type-post_type menu-item-object-page"><a ng-class="{'hide': result.status != 'private'}" ng-click="ctrl.toReview(result, 'review')">submit to review</a></li>
<li role="menuitem" ng-if="auth.currentUser.role.indexOf('reviewer') != -1" class="menu-item menu-item-type-post_type menu-item-object-page"><a ng-class="{'hide': result.status == 'approved'}" ng-click="ctrl.toggleCheck(result, 'status', 'approve')">approve</a></li>
<li role="menuitem" ng-if="auth.currentUser.role.indexOf('reviewer') != -1" class="menu-item menu-item-type-post_type menu-item-object-page"><a ng-class="{'hide': result.status == 'not approved'}" ng-click="ctrl.toggleCheck(result, 'status', 'not approve')">not approve</a></li>
<li role="menuitem" class="menu-item menu-item-type-post_type menu-item-object-page"><a ng-click="ctrl.openSharedModal(result)">share with</a></li>
<li role="menuitem" ng-if="auth.currentUser.openid == result.owner" class="menu-item menu-item-type-post_type menu-item-object-page"><a ng-click="ctrl.deleteTest(result._id)">delete</a></li>
</ul>
</div>
</td>
<td>
<div class="btn-group" uib-dropdown>
<a id="single-button" type="button" class="nectar-button medium accent-color regular-button" style="width:130px" uib-dropdown-toggle>
Share List<span class="caret"></span>
</a>
<ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button" style="min-width:200%">
<li class="menu-item menu-item-type-post_type menu-item-object-page" role="menuitem" ng-repeat="share in result.shared track by $index"><span>{{ share }}<i class="pull-right glyphicon glyphicon-remove" ng-click="ctrl.removeSharedUser(result, share)"></i></span></li>
</ul>
</div>
</td>
</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.update()">
</uib-pagination>
</div>
</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>
<style>
.button-disabled {
pointer-events:none;
}
|