]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5209 Feedback applied
authorStas Vilchik <vilchiks@gmail.com>
Mon, 16 Jun 2014 05:27:20 +0000 (11:27 +0600)
committerStas Vilchik <vilchiks@gmail.com>
Mon, 16 Jun 2014 05:27:20 +0000 (11:27 +0600)
sonar-core/src/main/resources/org/sonar/l10n/core.properties
sonar-server/src/main/hbs/component-viewer/header/covered-files-popup.hbs
sonar-server/src/main/hbs/component-viewer/header/tests-header.hbs
sonar-server/src/main/hbs/component-viewer/workspace.hbs
sonar-server/src/main/less/component-viewer.less

index 883ab7527c7db3139323eedc01229186d284446b..ccbe1ba78a50e24998528ea88e71e47abca069c1 100644 (file)
@@ -2121,10 +2121,12 @@ metric.tests.description=Number of unit tests
 metric.tests.abbreviation=UTs
 
 metric.test_execution_time.name=Unit tests duration
+metric.test_execution_time.short_name=Duration
 metric.test_execution_time.description=Execution duration of unit tests
 metric.test_execution_time.abbreviation=UTs dur.
 
 metric.test_errors.name=Unit tests errors
+metric.test_errors.short_name=Errors
 metric.test_errors.description=Number of unit test errors
 metric.test_errors.abbreviation=UTs errors
 
@@ -2133,10 +2135,12 @@ metric.skipped_tests.description=Number of skipped unit tests
 metric.skipped_tests.abbreviation=Skipped UTs
 
 metric.test_failures.name=Unit tests failures
+metric.test_failures.short_name=Failures
 metric.test_failures.description=Number of unit test failures
 metric.test_failures.abbreviation=UTs failures
 
 metric.test_success_density.name=Unit tests success (%)
+metric.test_success_density.short_name=Success
 metric.test_success_density.description=Density of successful unit tests
 metric.test_success_density.abbreviation=UTs success
 
@@ -2657,6 +2661,8 @@ component_viewer.measure_section.rules=Rules
 component_viewer.measure_section.issues=Issues
 component_viewer.measure_section.sqale=SQALE
 component_viewer.measure_section.unit_tests=Unit Tests
+component_viewer.measure_section.tests=Tests
+component_viewer.measure_section.test_names=Test Names
 component_viewer.measure_section.integration_tests=Integration Tests
 
 component_viewer.issues.current_issue=Current Issue
@@ -2675,6 +2681,9 @@ component_viewer.transition.covers=Covers
 component_viewer.transition.duplication=Duplicated By
 
 component_viewer.x_lines_are_covered={0} lines are covered
+component_viewer.details=Details
 
 component_viewer.workspace=Workspace
 component_viewer.workspace.tooltip=Keeps track of history of navigation
+component_viewer.workspace.show_workspace=Show workspace
+component_viewer.workspace.hide_workspace=Hide workspace
index e0a4d5f400217976a9240ed98cb0638e655779cf..f4cd043fe03e5c03a1de6e3400a0fe094c5883d5 100644 (file)
@@ -1,26 +1,26 @@
 <div class="component-viewer-popup-container">
 
-{{#notEq test.status 'OK'}}
-  {{#if test.message}}
-      <div class="component-viewer-popup-title">{{test.message}}</div>
-  {{/if}}
-    <pre>{{test.stackTrace}}</pre>
-{{/notEq}}
-
-{{#notEq test.status 'ERROR'}}
-  <div class="component-viewer-popup-title">{{t 'component_viewer.transition.covers'}}</div>
+  {{#notEq test.status 'ERROR'}}
+    <div class="component-viewer-popup-title">{{t 'component_viewer.transition.covers'}}</div>
+    {{#each items}}
+      <div class="component-viewer-popup-section">
+        <a class="component-viewer-popup-test-file link-action" data-key="{{key}}" title="{{name}}">{{name}}</a>
+        <span class="subtitle">{{tp 'component_viewer.x_lines_are_covered' coveredLines}}</span>
+        <br><span class="subtitle" title="{{dir}}">{{dir}}</span>
+      </div>
+    {{else}}
+      {{t 'none'}}
+    {{/each}}
+  {{/notEq}}
 
-  {{#each items}}
-    <div class="component-viewer-popup-section">
-      <a class="component-viewer-popup-test-file link-action" data-key="{{key}}" title="{{name}}">{{name}}</a>
-      <span class="subtitle">{{tp 'component_viewer.x_lines_are_covered' coveredLines}}</span>
-      <br><span class="subtitle" title="{{dir}}">{{dir}}</span>
-    </div>
-  {{else}}
-    {{t 'none'}}
-  {{/each}}
+  {{#notEq test.status 'OK'}}
+    <div class="component-viewer-popup-title">{{t 'component_viewer.details'}}</div>
+    {{#if test.message}}
+      <pre>{{test.message}}</pre>
+    {{/if}}
+    <pre>{{test.stackTrace}}</pre>
+  {{/notEq}}
 
-  </div>
-{{/notEq}}
+</div>
 
 <div class="component-viewer-popup-arrow"></div>
\ No newline at end of file
index abda962f430317f0a0598a3046c8366a76bbdca0..9f331fe629ea3c3674b130d65f2e6e53acaf5bbd 100644 (file)
@@ -3,13 +3,33 @@
     {{#any test_success_density test_failures test_errors test_execution_time}}
       <div class="component-viewer-header-expanded-bar-section">
         <div class="component-viewer-header-expanded-bar-section-title">
-          {{t 'component_viewer.measure_section.unit_tests'}}
+          {{t 'component_viewer.measure_section.tests'}}
         </div>
         <ul class="component-viewer-header-expanded-bar-section-list">
-          {{{componentViewerHeaderItem test_success_density 'test_success_density'}}}
-          {{{componentViewerHeaderItem test_failures 'test_failures'}}}
-          {{{componentViewerHeaderItem test_errors 'test_errors'}}}
-          {{{componentViewerHeaderItem test_execution_time 'test_execution_time'}}}
+          {{#if test_success_density}}
+            <li><span class="item">
+              <span class="label">{{t 'metric.test_success_density.short_name'}}</span>
+              <span class="number">{{test_success_density}}</span>
+            </span></li>
+          {{/if}}
+          {{#if test_failures}}
+            <li><span class="item">
+              <span class="label">{{t 'metric.test_failures.short_name'}}</span>
+              <span class="number">{{test_failures}}</span>
+            </span></li>
+          {{/if}}
+          {{#if test_errors}}
+            <li><span class="item">
+              <span class="label">{{t 'metric.test_errors.short_name'}}</span>
+              <span class="number">{{test_errors}}</span>
+            </span></li>
+          {{/if}}
+          {{#if test_execution_time}}
+            <li><span class="item">
+              <span class="label">{{t 'metric.test_execution_time.short_name'}}</span>
+              <span class="number">{{test_execution_time}}</span>
+            </span></li>
+          {{/if}}
         </ul>
       </div>
     {{/any}}
@@ -18,7 +38,7 @@
 
 <div class="component-viewer-header-expanded-bar-section large">
   <div class="component-viewer-header-expanded-bar-section-title justify">
-    <span class="ib">{{t 'component_viewer.measure_section.unit_tests'}}</span>
+    <span class="ib">{{t 'component_viewer.measure_section.test_names'}}</span>
     <span class="ib">Covered Lines</span>
   </div>
   <ul class="component-viewer-header-expanded-bar-section-list">
index 54a134528b05a3af232c6cdf462352cab57c8595..32d2e674e366ebac936fc02a35d1a0c6960fc779 100644 (file)
@@ -1,7 +1,8 @@
 <div class="component-viewer-workspace-header">
   <div class="component-viewer-workspace-title"
        title="{{t 'component_viewer.workspace.tooltip'}}">{{t 'component_viewer.workspace'}}</div>
-  <button class="button-clean component-viewer-workspace-toggle js-toggle-workspace">
+  <button class="button-clean component-viewer-workspace-toggle js-toggle-workspace"
+          title="{{#if settings.workspace}}{{t 'component_viewer.workspace.hide_workspace'}}{{else}}{{t 'component_viewer.workspace.show_workspace'}}{{/if}}">
     {{#if settings.workspace}}
       <i class="icon-double-chevron-left"></i>
     {{else}}
index 4879fdd64bd2335d6f8460c5967f542cbc43dd4d..bc4d3aacc4bb50c88ab43a472e8a0305686c5e45 100644 (file)
@@ -13,7 +13,8 @@
 }
 
 .component-viewer-workspace-enabled {
-  .component-viewer-workspace .component-viewer-workspace-list { display: block; }
+  .component-viewer-workspace .component-viewer-workspace-list,
+  .component-viewer-workspace .component-viewer-workspace-title { display: block; }
 }
 
 
@@ -44,6 +45,7 @@
 }
 
 .component-viewer-workspace-title {
+  display: none;
   padding: 0 30px 0 10px;
   line-height: 30px;
   text-transform: uppercase;
 }
 
 .component-viewer-popup-container {
-  min-width: 560px;
+  max-width: 560px;
   max-height: 300px;
   overflow: auto;
 }
   white-space: nowrap;
 }
 
-.component-viewer-popup-section + .component-viewer-popup-section {
+.component-viewer-popup-section + .component-viewer-popup-section,
+.component-viewer-popup-section + .component-viewer-popup-title {
   margin-top: 10px;
 }