aboutsummaryrefslogtreecommitdiffstats
path: root/3rd_party/static/onap-ui/components/results-report/partials/reportDetails.html
blob: 20295aba792b94946d904e6c2ece59d15f116e4b (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
<!--
 Copyright (c) 2019 opnfv.

 All rights reserved. This program and the accompanying materials
 are made available under the terms of the Apache License, Version 2.0
 which accompanies this distribution, and is available at
 http://www.apache.org/licenses/LICENSE-2.0
-->

<!--
HTML for each accordion group that separates the status types on the results
report page.
-->

Test Filters:<br>
<div class="btn-toolbar" role="toolbar">
  <div class="btn-group button-margin" data-toggle="buttons">
    <label class="btn btn-default" ng-click="ctrl.changeStatus('total')"
           ng-class="{'active': ctrl.testStatus === 'total'}">
      <input type="radio" ng-model="ctrl.testStatus" value="total" name="total">
      <span class="text-primary">All</span>
    </label>
    <label class="btn btn-default" ng-click="ctrl.changeStatus('passed')"
           ng-class="{'active': ctrl.testStatus === 'passed'}">
      <input type="radio" ng-model="ctrl.testStatus" value="passed" name="passed">
      <span class="text-success">Passed</span>
    </label>
    <label class="btn btn-default" ng-click="ctrl.changeStatus('not passed')"
           ng-class="{'active': ctrl.testStatus === 'not passed'}">
      <input type="radio" ng-model="ctrl.testStatus" value="not passed" name="not passed">
      <span class="text-danger">Not Passed</span>
    </label>
  </div>
  <div class="btn-group button-margin" style="float: right;">
    <button type="button" class="btn btn-default" ng-click="ctrl.openAll()">Expand</button>
    <button type="button" class="btn btn-default" ng-click="ctrl.folderAll()">Collapse</button>
  </div>
</div>

<uib-accordion-group ng-repeat="(type,data) in ctrl.data" is-open="isOpen">
  <uib-accordion-heading>
    {{ type }}: {{ ctrl.statistics[type].total }} tests
    <i class="pull-right glyphicon"
       ng-class="{'glyphicon-chevron-down': isOpen, 'glyphicon-chevron-right': !isOpen}"></i>
  </uib-accordion-heading>
  <ol class="capabilities">
    <li ng-repeat="(area, value) in data"
        ng-show="(ctrl.testStatus == 'passed' && value.pass != 0) || (ctrl.testStatus == 'not passed' && value.fail != 0) || ctrl.testStatus == 'total'">
      <a ng-click="value.folder = !value.folder">
        {{ area }}
        <span ng-if="ctrl.testStatus == 'total'"
              ng-class="{'text-success': value.total == value.pass, 'text-warning': (value.pass < value.total && value.pass > 0), 'text-danger': value.pass == 0}">
          [{{ value.pass }}/{{ value.total }}]
        </span>
        <span ng-if="ctrl.testStatus == 'passed'" class="text-success">[{{ value.pass }}]</span>
        <span ng-if="ctrl.testStatus == 'not passed'" class="text-danger">[{{ value.fail }}]</span>
      </a>
      <a uib-tooltip="view log" ng-click="ctrl.gotoResultLog(area)"><span class="glyphicon glyphicon-cog"></span></a>
      <ul class="list-unstyled" uib-collapse="value.folder">
        <li ng-repeat="case in value.cases"
            ng-if="(ctrl.testStatus=='passed' && ctrl.case_list.indexOf(case) > -1) || (ctrl.testStatus=='not passed' && ctrl.case_list.indexOf(case) == -1) || ctrl.testStatus=='total'">
          <span ng-class="{'glyphicon glyphicon-ok text-success':ctrl.case_list.indexOf(case) > -1, 'glyphicon glyphicon-remove text-warning':ctrl.case_list.indexOf(case) == -1}"
                aria-hidden="true"></span>
          <a ng-click="ctrl.gotoDoc(case)">{{ case }}</a>
        </li>
      </ul>
    </li>
  </ol>
</uib-accordion-group>