|
1 | 1 | <style type="text/css"> |
2 | 2 |
|
3 | | - div.sonar-content, div.sonar-content h1, div.sonar-content h4 { |
| 3 | + div.sonar-content, div.sonar-content h1, div.sonar-content h5 a{ |
4 | 4 | text-align: right; |
5 | 5 | color: white; |
6 | 6 | } |
7 | 7 |
|
8 | | - .statusQualitygate { |
9 | | - border-radius: 8px; |
10 | | - margin-bottom: 2%; |
| 8 | + h4#headline{ |
| 9 | + color: white; |
| 10 | + border: 2px solid white; |
| 11 | + padding: 8px; |
| 12 | + text-align: center; |
11 | 13 | } |
12 | 14 |
|
13 | | - .codeCoverage { |
14 | | - border-radius: 8px; |
15 | | - background-color: #fcc700; |
| 15 | + |
| 16 | + div.sonar-content .statusQualitygate,div.sonar-content > .codeCoverage, |
| 17 | + div.sonar-content > .blockerIssues,div.sonar-content >.technicalDept,div.sonar-content >.vulnerabilities { |
| 18 | + border: 2px solid white; |
16 | 19 | margin-bottom: 2%; |
17 | 20 | } |
18 | 21 |
|
19 | | - .blockerIssues { |
20 | | - border-radius: 8px; |
| 22 | + div.sonar-content >.codeCoverage,div.sonar-content >.technicalDept,div.sonar-content >.blockerIssues, |
| 23 | + div.sonar-content >.vulnerabilities, div.sonar-content>h4{ |
21 | 24 | background-color: #1B7DAA; |
22 | 25 | } |
23 | 26 |
|
| 27 | + |
24 | 28 | .glyphiconStyle { |
25 | 29 | float: left; |
26 | | - font-size: 3em; |
| 30 | + font-size: 2.5em; |
27 | 31 | margin-top: 25px; |
28 | 32 | } |
29 | 33 |
|
|
45 | 49 | </style> |
46 | 50 |
|
47 | 51 |
|
48 | | -<div class="alert alert-info" ng-if="!vm.name"> |
| 52 | +<div class="alert alert-info" ng-if="!vm.project"> |
49 | 53 | Please configure the widget |
50 | 54 | </div> |
51 | 55 |
|
52 | | -<div class="sonar-content col-md-12" ng-if="vm.name"> |
53 | | - |
| 56 | +<div class="sonar-content col-md-12" ng-if="vm.project"> |
| 57 | + <h4 id="headline">{{vm.project}}</h4> |
54 | 58 | <div ng-switch on="vm.qualityGateStatus"> |
55 | 59 | <div ng-switch-when="OK"> |
56 | | - <div class="ok col-md-12 statusQualitygate"> |
57 | | - <span class="glyphicon glyphicon-ok glyphiconStyle"></span> |
58 | | - <h1>Passed</h1> |
59 | | - <h4>Quality Gate</h4> |
| 60 | + <div class="ok col-md-6 statusQualitygate"> |
| 61 | + <span class="glyphicon glyphicon-ok-sign glyphiconStyle"></span> |
| 62 | + <h1>OK</h1> |
| 63 | + <h5><a href="{{vm.url}}/quality_gates">Quality Gate</a></h5> |
60 | 64 | </div> |
61 | 65 | </div> |
62 | 66 | <div ng-switch-when="ERROR"> |
63 | | - <div class="error col-md-12 statusQualitygate"> |
64 | | - <span class="glyphicon glyphicon-remove glyphiconStyle"></span> |
65 | | - <h1>Failed</h1> |
66 | | - <h4>Quality Gate</h4> |
| 67 | + <div class="error col-md-6 statusQualitygate"> |
| 68 | + <h2>Failed</h2> |
| 69 | + <h5><a href="{{vm.url}}/quality_gates">Quality Gate</a></h5> |
67 | 70 | </div> |
68 | 71 | </div> |
69 | 72 | <div ng-switch-when="WARNING"> |
70 | | - <div class="warning col-md-12 statusQualitygate"> |
71 | | - <span class="glyphicon glyphicon-info-sign glyphiconStyle"></span> |
72 | | - <h1>Warning</h1> |
73 | | - <h4>Quality Gate</h4> |
| 73 | + <div class="warning col-md-6 statusQualitygate"> |
| 74 | + <h2>Warning</h2> |
| 75 | + <h5><a href="{{vm.url}}/quality_gates">Quality Gate</a></h5> |
74 | 76 | </div> |
75 | 77 | </div> |
76 | 78 |
|
77 | 79 | <div ng-switch-default> |
78 | | - <div class="unknown col-md-12 statusQualitygate"> |
79 | | - <span class="glyphicon glyphicon-question-sign glyphiconStyle"></span> |
80 | | - <h1>unknown</h1> |
81 | | - <h4>Quality Gate</h4> |
| 80 | + <div class="unknown col-md-6 statusQualitygate"> |
| 81 | + <h2>unknown</h2> |
| 82 | + <h5><a href="{{vm.url}}/quality_gates">Quality Gate</a></h5> |
82 | 83 | </div> |
83 | 84 | </div> |
84 | 85 | </div> |
85 | 86 |
|
86 | | - <div class="col-md-12 codeCoverage"> |
| 87 | + |
| 88 | + <div class="col-md-6 vulnerabilities"> |
| 89 | + <span class="glyphicon glyphicon glyphicon-lock glyphiconStyle"></span> |
| 90 | + <h1>{{vm.vulnerabilities}}</h1> |
| 91 | + <h5>Vulnerabilities</a></h5> |
| 92 | + </div> |
| 93 | + |
| 94 | + |
| 95 | + <div class="col-md-6 codeCoverage"> |
87 | 96 | <span class="glyphicon glyphicon-tasks glyphiconStyle"></span> |
88 | | - <h1>{{vm.coverage||"unknown"}}</h1> |
89 | | - <h4>Code Coverage</h4> |
| 97 | + <h1>{{vm.coverage||"/"}}</h1> |
| 98 | + <h5>Code Coverage</a></h5> |
90 | 99 | </div> |
91 | | - <div class="col-md-12 blockerIssues"> |
| 100 | + <div class="col-md-6 blockerIssues"> |
92 | 101 | <span class="glyphicon glyphicon-exclamation-sign glyphiconStyle"></span> |
93 | | - <h1>{{vm.blocker||"unknown"}}</h1> |
94 | | - <h4>Blocker Issues</h4> |
| 102 | + <h1>{{vm.blocker||"/"}}</h1> |
| 103 | + <h5>Blocker Issues</a></h5> |
95 | 104 | </div> |
96 | | - |
| 105 | + <div class="col-md-12 technicalDept"> |
| 106 | + <span class="glyphicon glyphicon-time glyphiconStyle"></span> |
| 107 | + <h1>{{vm.technicalDept+" days" ||"/"}}</h1> |
| 108 | + <h5>Technical Dept</a></h5> |
| 109 | + </div> |
| 110 | + <a href="https://docs.sonarqube.org/latest/user-guide/metric-definitions/" class="pull-right">about metrics</a> |
97 | 111 | </div> |
98 | 112 |
|
0 commit comments