summaryrefslogtreecommitdiffstats
path: root/utils/test/testapi/opnfv_testapi/ui/results-report/resultsReport.html
blob: 5527121ba27e65732198da70683befa7cd7acaa0 (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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<h3>Test Run Results</h3>

<div ng-show="ctrl.resultsData"  class="container-fluid">
    <div class="row">
        <div class="pull-left">
            <div class="test-report">
                <strong>Test ID:</strong> {{ctrl.testId}}<br />
                <div ng-if="ctrl.isResultAdmin()"><strong>Cloud ID:</strong> {{ctrl.resultsData.cpid}}<br /></div>
                <strong>Upload Date:</strong> {{ctrl.resultsData.created_at}} UTC<br />
                <strong>Duration:</strong> {{ctrl.resultsData.duration_seconds}} seconds<br />
                <strong>Total Number of Passed Tests:</strong>
                <a title="See all passed tests" ng-click="ctrl.openFullTestListModal()">
                    {{ctrl.resultsData.results.length}}
                </a>
            </div>
            <hr>
            <div ng-show="ctrl.isResultAdmin()">
                <strong>Publicly Shared:</strong>
                <span ng-if="ctrl.resultsData.meta.shared">Yes</span>
                <span ng-if="!ctrl.resultsData.meta.shared">No</span>
                <br />
            </div>
            <div ng-show="ctrl.resultsData.product_version">
                <strong>Product:</strong>
                {{ctrl.resultsData.product_version.product_info.name}}
                <span ng-if="ctrl.resultsData.product_version.version">
                    ({{ctrl.resultsData.product_version.version}})
                </span><br />
            </div>
            <div ng-show="ctrl.resultsData.meta.guideline">
                <strong>Associated Guideline:</strong>
                {{ctrl.resultsData.meta.guideline.slice(0, -5)}}
            </div>
            <div ng-show="ctrl.resultsData.meta.target">
                <strong>Associated Target Program:</strong>
                {{ctrl.targetMappings[ctrl.resultsData.meta.target]}}
            </div>
            <div ng-show="ctrl.resultsData.verification_status">
                <strong>Verified:</strong>
                <span class="yes">YES</span>
            </div>
            <hr>
        </div>

        <div class="pull-right">
            <div ng-show="ctrl.isResultAdmin() && !ctrl.resultsData.verification_status">
                <button class="btn btn-info" ng-click="ctrl.openEditTestModal()">Edit</button>
                <button type="button" class="btn btn-danger" ng-click="ctrl.deleteTestRun()" confirm="Are you sure you want to delete these test run results?">Delete</button>
            </div>
            <div ng-show="ctrl.resultsData.user_role === 'foundation'">
                <hr>
                <div class="checkbox checkbox-verified">
                    <label><input type="checkbox"
                                  ng-model="ctrl.isVerified"
                                  ng-change="ctrl.updateVerificationStatus()"
                                  ng-true-value="1"
                                  ng-false-value="0">
                                  <strong>Verified</strong>
                    </label>
                </div>
            </div>
        </div>
    </div>
</div>

<div ng-show="ctrl.resultsData">
    <p>See how these results stack up against Interop Working Group capabilities and OpenStack
        <a target="_blank" href="http://www.openstack.org/brand/interop/">target marketing programs.</a>
    </p>

    <!-- User Options -->
    <div class="row">
        <div class="col-md-3">
            <strong>Guideline Version:</strong>
            <!-- Slicing the version file name here gets rid of the '.json' file extension -->
            <select ng-model="ctrl.version"
                    ng-change="ctrl.updateGuidelines()"
                    class="form-control"
                    ng-options="versionFile.slice(0,-5) for versionFile in ctrl.versionList">
            </select>
        </div>
        <div class="col-md-4">
            <strong>Target Program:</strong>
            <select ng-model="ctrl.target" class="form-control" ng-change="ctrl.buildCapabilitiesObject()">
                <option value="platform">OpenStack Powered Platform</option>
                <option value="compute">OpenStack Powered Compute</option>
                <option value="object">OpenStack Powered Object Storage</option>
            </select>
        </div>
    </div>
    <!-- End User Options -->

    <br />
    <div ng-if="ctrl.guidelineData">
        <strong>Guideline Status:</strong>
        {{ctrl.guidelineData.status | capitalize}}
    </div>

    <strong>Corresponding OpenStack Releases:</strong>
    <ul class="list-inline">
        <li ng-repeat="release in ctrl.guidelineData.releases">
            {{release | capitalize}}
        </li>
    </ul>
    <hr >

    <div ng-show="ctrl.guidelineData">
        <strong>Status:</strong>
        <p>This cloud passes <strong>{{ctrl.requiredPassPercent | number:1}}% </strong>
           ({{ctrl.caps.required.passedCount}}/{{ctrl.caps.required.count}})
           of the tests in the <strong>{{ctrl.version.slice(0, -5)}}</strong> <em>required</em> capabilities for the
           <strong>{{ctrl.targetMappings[target]}}</strong> program. <br />
           Excluding flagged tests, this cloud passes
           <strong>{{ctrl.nonFlagRequiredPassPercent | number:1}}%</strong>
           ({{ctrl.nonFlagPassCount}}/{{ctrl.totalNonFlagCount}})
           of the <em>required</em> tests.
        </p>

        <p>Compliance with <strong>{{ctrl.version.slice(0, -5)}}</strong>:
            <strong>
                <span ng-if="ctrl.nonFlagPassCount === ctrl.totalNonFlagCount" class="yes">YES</span>
                <span ng-if="ctrl.nonFlagPassCount !== ctrl.totalNonFlagCount" class="no">NO</span>
            </strong>
        </p>

        <hr>
        <h4>Capability Overview</h4>

        Test Filters:<br />
        <div class="btn-group button-margin" data-toggle="buttons">
            <label class="btn btn-default" ng-class="{'active': ctrl.testStatus === 'total'}">
                <input type="radio" ng-model="ctrl.testStatus" value="total">
                <span class="text-primary">All</span>
            </label>
            <label class="btn btn-default" ng-class="{'active': ctrl.testStatus === 'passed'}">
                <input type="radio" ng-model="ctrl.testStatus" value="passed">
                <span class="text-success">Passed</span>
            </label>
            <label class="btn btn-default" ng-class="{'active': ctrl.testStatus === 'not passed'}">
                <input type="radio" ng-model="ctrl.testStatus" value="not passed">
                <span class="text-danger">Not Passed</span>
            </label>
            <label class="btn btn-default" ng-class="{'active': ctrl.testStatus === 'flagged'}">
                <input type="radio" ng-model="ctrl.testStatus" value="flagged">
                <span class="text-warning">Flagged</span>
            </label>
        </div>

        <uib-accordion close-others=false>
            <!-- The ng-repeat is used to pass in a local variable to the template. -->
            <ng-include
                ng-repeat="status in ['required']"
                src="ctrl.detailsTemplate"
                onload="isOpen = true">
            </ng-include>
            <br />
            <ng-include
                ng-repeat="status in ['advisory']"
                src="ctrl.detailsTemplate">
            </ng-include>
            <br />
            <ng-include
                ng-repeat="status in ['deprecated']"
                src="ctrl.detailsTemplate">
            </ng-include>
            <br />
            <ng-include
                ng-repeat="status in ['removed']"
                src="ctrl.detailsTemplate">
            </ng-include>
        </uib-accordion>
    </div>
</div>

<div class="loading">
    <div cg-busy="{promise:versionsRequest,message:'Loading versions'}"></div>
    <div cg-busy="{promise:capsRequest,message:'Loading capabilities'}"></div>
    <div cg-busy="{promise:resultsRequest,message:'Loading results'}"></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>