-<div class="source-viewer-measures-section source-viewer-measures-section-big">
- {{#eachEven measuresToDisplay}}
- <div class="source-viewer-measures-card">
- <div class="measures">
- <div class="measures-list">
- <div class="measure measure-one-line measure-big">
- <span class="measure-name">{{name}}</span>
+{{#notEmpty measuresToDisplay}}
+ <div class="source-viewer-measures-section source-viewer-measures-section-big">
+ {{#eachEven measuresToDisplay}}
+ <div class="source-viewer-measures-card">
+ <div class="measures">
+ <div class="measures-list">
+ <div class="measure measure-one-line measure-big">
+ <span class="measure-name">{{name}}</span>
+ </div>
+ {{#each metrics}}
+ <div class="measure measure-one-line" data-metric="{{key}}">
+ <span class="measure-name">{{name}}</span>
+ <span class="measure-value"> {{value}}</span>
+ </div>
+ {{/each}}
</div>
- {{#each metrics}}
- <div class="measure measure-one-line" data-metric="{{key}}">
- <span class="measure-name">{{name}}</span>
- <span class="measure-value"> {{value}}</span>
- </div>
- {{/each}}
</div>
</div>
- </div>
- {{/eachEven}}
-</div>
+ {{/eachEven}}
+ </div>
-<div class="source-viewer-measures-section source-viewer-measures-section-big">
- {{#eachOdd measuresToDisplay}}
- <div class="source-viewer-measures-card">
- <div class="measures">
- <div class="measures-list">
- <div class="measure measure-one-line measure-big">
- <span class="measure-name">{{name}}</span>
- </div>
- {{#each metrics}}
- <div class="measure measure-one-line" data-metric="{{key}}">
+ <div class="source-viewer-measures-section source-viewer-measures-section-big">
+ {{#eachOdd measuresToDisplay}}
+ <div class="source-viewer-measures-card">
+ <div class="measures">
+ <div class="measures-list">
+ <div class="measure measure-one-line measure-big">
<span class="measure-name">{{name}}</span>
- <span class="measure-value"> {{value}}</span>
</div>
- {{/each}}
+ {{#each metrics}}
+ <div class="measure measure-one-line" data-metric="{{key}}">
+ <span class="measure-name">{{name}}</span>
+ <span class="measure-value"> {{value}}</span>
+ </div>
+ {{/each}}
+ </div>
</div>
</div>
- </div>
- {{/eachOdd}}
-</div>
+ {{/eachOdd}}
+ </div>
+{{/notEmpty}}
data-value="{{default measures.overall_coverage_raw measures.coverage_raw measures.it_coverage_raw}}"
data-max="100"
data-color="#85bb43"
+ data-base-color="#d4333f"
data-size="47"></span>
</div>
<div class="measure measure-big">
<div class="source-viewer-measures-section source-viewer-measures-section-big">
- <div class="source-viewer-measures-card">
+ <div class="source-viewer-measures-card source-viewer-measures-card-fixed-height js-test-list">
<div class="measures">
<table class="source-viewer-tests-list">
<tr>
</div>
{{#if selectedTest}}
- <div class="source-viewer-measures-section source-viewer-measures-section-full js-selected-test">
- <div class="source-viewer-measures-card source-viewer-measures-card-overflow">
+ <div class="source-viewer-measures-section source-viewer-measures-section-big js-selected-test">
+ <div class="source-viewer-measures-card source-viewer-measures-card-fixed-height">
{{#notEq selectedTest.status 'ERROR'}}
{{#notEq selectedTest.status 'FAILURE'}}
<div class="bubble-popup-title">{{t 'component_viewer.transition.covers'}}</div>
{{#notNull measures.issues}}
<div class="source-viewer-header-measure">
<span class="source-viewer-header-measure-value">
- <a target="_blank" href="{{link '/issues/search#resolved=false|componentUuids=' uuid}}">{{measures.issues}}</a>
+ <a class="source-viewer-header-external-link" target="_blank"
+ href="{{link '/issues/search#resolved=false|componentUuids=' uuid}}">
+ {{measures.issues}} <i class="icon-detach"></i>
+ </a>
</span>
<span class="source-viewer-header-measure-label">{{t 'metric.violations.name'}}</span>
</div>
{{/unless}}
</div>
- <div class="source-viewer-measures">
- {{#unless isUnitTest}}
+ {{#unless isUnitTest}}
+ <div class="source-viewer-measures">
<div class="source-viewer-measures-section">
<div class="source-viewer-measures-card">
{{> '_source-viewer-measures-lines'}}
<div class="source-viewer-measures-section">
{{> '_source-viewer-measures-duplications'}}
</div>
- {{else}}
+ </div>
+ {{else}}
+ <div class="source-viewer-measures">
<div class="source-viewer-measures-section">
{{> '_source-viewer-measures-tests'}}
</div>
+ </div>
+ <div class="source-viewer-measures">
{{> '_source-viewer-measures-test-cases'}}
- {{/unless}}
- </div>
+ </div>
+ {{/unless}}
+
<a class="js-show-all-measures">{{t 'component_viewer.show_all_measures'}}</a>
if (this.model.get('isUnitTest')) {
requests.push(this.requestTests());
}
+ this.testsScroll = 0;
$.when.apply($, requests).done(function () {
that.render();
window.process.finishBackgroundProcess(p);
onRender: function () {
ModalView.prototype.onRender.apply(this, arguments);
this.$('.js-pie-chart').pieChart();
- if (this.selectedTest != null) {
- this.scrollToTest();
- }
- },
-
- scrollToTest: function () {
- var position = this.$('.js-selected-test').offset().top - this.$el.offset().top - 50;
- this.$el.scrollTop(position);
+ this.$('.js-test-list').scrollTop(this.testsScroll);
},
getMetrics: function () {
key: this.model.key(),
test: name
};
+ this.testsScroll = $(e.currentTarget).scrollParent().scrollTop();
return $.get(url, options).done(function (data) {
that.coveredFiles = data.files;
that.selectedTest = _.findWhere(that.model.get('tests'), { name: name });
opacity: 0.4;
.source-meta {
- border-color: transparent !important;
+ border-color: #f9f9f9 !important;
}
}
.source-meta {
vertical-align: top;
width: 1px;
+ background-clip: padding-box;
.user-select(none);
}
font-weight: 300;
}
-.source-viewer-header-measure-issues {
- width: 45px;
-}
-
-.source-viewer-header-measure-issue {
- min-width: 1px;
- height: 6px;
-
- &.s-blocker { background-color: @severityBlockerColor; }
- &.s-critical { background-color: @severityCriticalColor; }
- &.s-major { background-color: @severityMajorColor; }
- &.s-minor { background-color: @severityMinorColor; }
- &.s-info { background-color: @severityInfoColor; }
-}
+.source-viewer-header-external-link {
+ .link-no-underline;
-.source-viewer-header-measure-issue + .source-viewer-header-measure-issue {
- margin-top: 1px;
+ i {
+ position: relative;
+ top: -4px;
+ }
}
.source-viewer-header-actions {
overflow: auto;
}
+.source-viewer-measures-card-fixed-height {
+ max-height: 50vh;
+ overflow-y: scroll;
+}
+
+
//.source-viewer-measures-section + .source-viewer-measures-section {
// border-left: 1px solid @barBorderColor;
//}