blob: 5f6619ce5b6ddacc0373271e1bae66d08ea0a095 (
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
|
<div class="component-viewer-header-bar">
<div class="component-viewer-header-component">
{{#unless state.removed}}
{{#if component.projectName}}
<div class="component-viewer-header-component-project">
{{qualifierIcon 'TRK'}}
<a class="link-action" href="{{dashboardUrl component.project}}">{{component.projectName}}</a>
{{#if component.subProjectName}}
/ <a class="link-action" href="{{dashboardUrl component.subProject}}">{{component.subProjectName}}</a>
{{/if}}
</div>
{{/if}}
<div class="component-viewer-header-component-name">
{{qualifierIcon component.q}} {{default component.path component.longName}}
{{#if state.canMarkAsFavourite}}
<a class="js-favorite component-viewer-header-favorite"
title="{{#if component.fav}}{{t 'click_to_remove_from_favorites'}}{{else}}{{t 'click_to_add_to_favorites'}}{{/if}}">
<i class="{{#if component.fav}}icon-favorite{{else}}icon-not-favorite{{/if}}"></i>
</a>
{{/if}}
</div>
{{else}}
<div class="component-viewer-header-component-project removed">{{state.removedMessage}}</div>
{{/unless}}
</div>
{{#unless state.removed}}
<a class="js-actions component-viewer-header-actions" title="{{t 'component_viewer.more_actions'}}">
<i class="icon-list"></i>
</a>
<div class="component-viewer-header-measures">
{{#if component.isUnitTest}}
<div class="component-viewer-header-measures-scope">
<a data-scope="tests" class="component-viewer-header-measures-expand js-header-tab-tests">
<div class="component-viewer-header-measure">
<span class="component-viewer-header-measure-value">{{component.measures.fTests}}</span>
<span class="component-viewer-header-measure-label">{{t 'metric.tests.name'}}</span>
</div>
<i class="icon-dropdown"></i>
</a>
</div>
{{/if}}
{{#unless component.isUnitTest}}
<div class="component-viewer-header-measures-scope">
<span data-scope="basic" class="js-toggle-coverage component-viewer-header-measures-toggle-scope inactive"></span>
<a data-scope="basic" class="component-viewer-header-measures-expand js-header-tab-basic">
<div class="component-viewer-header-measure">
<span class="component-viewer-header-measure-value">{{default component.measures.fNcloc '–'}}</span>
<span class="component-viewer-header-measure-label">{{t 'metric.ncloc.name'}}</span>
</div>
<i class="icon-dropdown"></i>
</a>
</div>
{{/unless}}
<div class="component-viewer-header-measures-scope">
<a data-scope="issues" class="component-viewer-header-measures-expand js-header-tab-issues">
<div class="component-viewer-header-measure">
<span class="component-viewer-header-measure-value">{{default component.measures.fDebt '0'}}</span>
<span class="component-viewer-header-measure-label">{{t 'component_viewer.header.debt'}}</span>
</div>
{{#if component.measures.fIssues}}
<div class="component-viewer-header-measure">
<span class="component-viewer-header-measure-value">{{component.measures.fIssues}}</span>
<span class="component-viewer-header-measure-label">{{t 'metric.violations.name'}}</span>
</div>
{{/if}}
{{#if component.measures.fIssues}}
<div class="component-viewer-header-measure">
<div class="component-viewer-header-measure-issues">
<div class="component-viewer-header-measure-issue s-blocker"
style="width: {{percent component.measures.fBlockerIssues component.measures.maxIssues}};"></div>
<div class="component-viewer-header-measure-issue s-critical"
style="width: {{percent component.measures.fCriticalIssues component.measures.maxIssues}};"></div>
<div class="component-viewer-header-measure-issue s-major"
style="width: {{percent component.measures.fMajorIssues component.measures.maxIssues}};"></div>
<div class="component-viewer-header-measure-issue s-minor"
style="width: {{percent component.measures.fMinorIssues component.measures.maxIssues}};"></div>
<div class="component-viewer-header-measure-issue s-info"
style="width: {{percent component.measures.fInfoIssues component.measures.maxIssues}};"></div>
</div>
</div>
{{/if}}
<i class="icon-dropdown"></i>
</a>
<a data-scope="issues" title="{{t 'component_viewer.header.toggle_issues'}}"
class="js-toggle-issues component-viewer-header-measures-toggle-scope {{#if settings.issues}}active{{/if}}"></a>
</div>
{{#inArray state.tabs 'coverage'}}
<div class="component-viewer-header-measures-scope">
<a data-scope="coverage" class="component-viewer-header-measures-expand js-header-tab-coverage">
<div class="component-viewer-header-measure">
<span class="component-viewer-header-measure-value">{{default component.measures.fCoverage '–'}}</span>
<span class="component-viewer-header-measure-label">{{t 'metric.coverage.name'}}</span>
</div>
<i class="icon-dropdown"></i>
</a>
<a data-scope="coverage" title="{{t 'component_viewer.header.toggle_coverage'}}"
class="js-toggle-coverage component-viewer-header-measures-toggle-scope {{#if settings.coverage}}active{{/if}}"></a>
</div>
{{/inArray}}
{{#inArray state.tabs 'duplications'}}
<div class="component-viewer-header-measures-scope">
<a data-scope="duplications" class="component-viewer-header-measures-expand js-header-tab-duplications">
<div class="component-viewer-header-measure">
<span class="component-viewer-header-measure-value">{{default component.measures.fDuplicationDensity '–'}}</span>
<span class="component-viewer-header-measure-label">{{t 'metric.duplicated_lines_density.name'}}</span>
</div>
<i class="icon-dropdown"></i>
</a>
<a data-scope="duplications" title="{{t 'component_viewer.header.toggle_duplications'}}"
class="js-toggle-duplications component-viewer-header-measures-toggle-scope {{#if settings.duplications}}active{{/if}}"></a>
</div>
{{/inArray}}
{{#inArray state.tabs 'scm'}}
<div class="component-viewer-header-measures-scope">
<a data-scope="scm" class="component-viewer-header-measures-expand js-header-tab-scm">
<div class="component-viewer-header-measure">
<span class="component-viewer-header-measure-value"><i class="icon-calendar"></i></span>
<span class="component-viewer-header-measure-label">SCM</span>
</div>
<i class="icon-dropdown"></i>
</a>
<a data-scope="scm" title="{{t 'component_viewer.header.toggle_scm'}}"
class="js-toggle-scm component-viewer-header-measures-toggle-scope {{#if settings.scm}}active{{/if}}"></a>
</div>
{{/inArray}}
</div>
{{/unless}}
</div>
<div class="component-viewer-header-expanded-bar"></div>
|