aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2017-01-18 16:36:50 +0100
committerStas Vilchik <vilchiks@gmail.com>2017-01-24 18:14:41 +0100
commitd02bc697f9d3153e809856ed59e9f99403f0bb08 (patch)
tree169378f093b22730e5f00823cd4bcdfca309409d /server/sonar-web/src/main/js
parentbe36f35e637ace99705b843c7d4ef31d2eb9d59f (diff)
downloadsonarqube-d02bc697f9d3153e809856ed59e9f99403f0bb08.tar.gz
sonarqube-d02bc697f9d3153e809856ed59e9f99403f0bb08.zip
SONAR-8643 Make the color palette consistent
Diffstat (limited to 'server/sonar-web/src/main/js')
-rw-r--r--server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemap.js8
-rw-r--r--server/sonar-web/src/main/js/apps/overview/styles.css4
-rw-r--r--server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-coverage.hbs2
-rw-r--r--server/sonar-web/src/main/js/components/ui/CoverageRating.js6
-rw-r--r--server/sonar-web/src/main/js/components/ui/DuplicationsRating.css19
-rw-r--r--server/sonar-web/src/main/js/components/ui/Level.css4
-rw-r--r--server/sonar-web/src/main/js/components/ui/Rating.css18
-rw-r--r--server/sonar-web/src/main/js/helpers/constants.js4
8 files changed, 36 insertions, 29 deletions
diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemap.js b/server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemap.js
index 12060645ba4..5cd860c9ab5 100644
--- a/server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemap.js
+++ b/server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemap.js
@@ -101,21 +101,21 @@ export default class MeasureTreemap extends React.Component {
getPercentColorScale (metric) {
const color = d3.scale.linear().domain([0, 25, 50, 75, 100]);
color.range(metric.direction === 1 ?
- ['#ee0000', '#f77700', '#ffee00', '#80cc00', '#00aa00'] :
- ['#00aa00', '#80cc00', '#ffee00', '#f77700', '#ee0000']);
+ ['#d4333f', '#ed7d20', '#eabe06', '#b0d513', '#00aa00'] :
+ ['#00aa00', '#b0d513', '#eabe06', '#ed7d20', '#d4333f']);
return color;
}
getRatingColorScale () {
return d3.scale.linear()
.domain([1, 2, 3, 4, 5])
- .range(['#00aa00', '#80cc00', '#ffee00', '#f77700', '#ee0000']);
+ .range(['#00aa00', '#b0d513', '#eabe06', '#ed7d20', '#d4333f']);
}
getLevelColorScale () {
return d3.scale.ordinal()
.domain(['ERROR', 'WARN', 'OK', 'NONE'])
- .range(['#d4333f', '#ff9900', '#85bb43', '##b4b4b4']);
+ .range(['#d4333f', '#ed7d20', '#00aa00', '#b4b4b4']);
}
getScale () {
diff --git a/server/sonar-web/src/main/js/apps/overview/styles.css b/server/sonar-web/src/main/js/apps/overview/styles.css
index 5778a0ceaef..609305faa34 100644
--- a/server/sonar-web/src/main/js/apps/overview/styles.css
+++ b/server/sonar-web/src/main/js/apps/overview/styles.css
@@ -110,7 +110,7 @@
}
.overview-quality-gate-condition-warn {
- border-color: #f90;
+ border-color: #ed7d20;
}
.overview-quality-gate-condition-error .overview-quality-gate-threshold {
@@ -118,7 +118,7 @@
}
.overview-quality-gate-condition-warn .overview-quality-gate-threshold {
- color: #f90;
+ color: #ed7d20;
}
diff --git a/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-coverage.hbs b/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-coverage.hbs
index 7258237382a..2598e962d77 100644
--- a/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-coverage.hbs
+++ b/server/sonar-web/src/main/js/components/source-viewer/templates/measures/_source-viewer-measures-coverage.hbs
@@ -4,7 +4,7 @@
<span class="js-pie-chart"
data-value="{{measures.coverage_raw}}"
data-max="100"
- data-color="#85bb43"
+ data-color="#00aa00"
data-base-color="#d4333f"
data-size="47"></span>
</div>
diff --git a/server/sonar-web/src/main/js/components/ui/CoverageRating.js b/server/sonar-web/src/main/js/components/ui/CoverageRating.js
index bb65d33d7c3..177bc35673d 100644
--- a/server/sonar-web/src/main/js/components/ui/CoverageRating.js
+++ b/server/sonar-web/src/main/js/components/ui/CoverageRating.js
@@ -30,7 +30,7 @@ const SIZE_TO_WIDTH_MAPPING = {
const SIZE_TO_THICKNESS_MAPPING = {
'small': 2,
'normal': 3,
- 'big': 4
+ 'big': 3
};
export default class CoverageRating extends React.Component {
@@ -51,8 +51,8 @@ export default class CoverageRating extends React.Component {
if (this.props.value != null) {
const value = Number(this.props.value);
data = [
- { value, fill: this.props.muted ? '#bdbdbd' : '#85bb43' },
- { value: 100 - value, fill: this.props.muted ? '#f3f3f3' : '#d4333f' }
+ { value, fill: this.props.muted ? '#bdbdbd' : '#00aa00' },
+ { value: 100 - value, fill: '#d4333f' }
];
}
diff --git a/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css
index 6e9842abc77..f8b14c03087 100644
--- a/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css
+++ b/server/sonar-web/src/main/js/components/ui/DuplicationsRating.css
@@ -6,7 +6,7 @@
align-items: center;
width: 24px;
height: 24px;
- border: 3px solid #f3ca8e;
+ border: 3px solid #ed7d20;
border-radius: 24px;
box-sizing: border-box;
}
@@ -33,21 +33,25 @@
.duplications-rating:after {
border-radius: 24px;
- background-color: #f3ca8e;
content: "";
}
.duplications-rating-A {
- border-color: #85bb43;
+ border-color: #00aa00;
}
.duplications-rating-A:after {
display: none;
}
+.duplications-rating-B {
+ border-color: #b0d513;
+}
+
.duplications-rating-B:after {
width: 6px;
height: 6px;
+ background-color: #b0d513;
}
.duplications-rating-small.duplications-rating-B:after {
@@ -60,9 +64,14 @@
height: 12px;
}
+.duplications-rating-C {
+ border-color: #eabe06;
+}
+
.duplications-rating-C:after {
width: 8px;
height: 8px;
+ background-color: #eabe06;
}
.duplications-rating-small.duplications-rating-C:after {
@@ -76,13 +85,13 @@
}
.duplications-rating-D {
- border-color: #d4333f;
+ border-color: #ed7d20;
}
.duplications-rating-D:after {
width: 12px;
height: 12px;
- background-color: #d4333f;
+ background-color: #ed7d20;
}
.duplications-rating-small.duplications-rating-D:after {
diff --git a/server/sonar-web/src/main/js/components/ui/Level.css b/server/sonar-web/src/main/js/components/ui/Level.css
index 0d2a90de193..e48587f6e8a 100644
--- a/server/sonar-web/src/main/js/components/ui/Level.css
+++ b/server/sonar-web/src/main/js/components/ui/Level.css
@@ -37,11 +37,11 @@ a > .level:hover {
}
.level-OK {
- background-color: #85bb43;
+ background-color: #00aa00;
}
.level-WARN {
- background-color: #f90;
+ background-color: #ed7d20;
}
.level-ERROR {
diff --git a/server/sonar-web/src/main/js/components/ui/Rating.css b/server/sonar-web/src/main/js/components/ui/Rating.css
index f2bffe4ea81..e4702058302 100644
--- a/server/sonar-web/src/main/js/components/ui/Rating.css
+++ b/server/sonar-web/src/main/js/components/ui/Rating.css
@@ -38,32 +38,30 @@ a > .rating:hover {
}
.rating-A {
- background-color: #0a0;
+ background-color: #00aa00;
}
a > .rating-A {
- border-bottom-color: #0a0;
+ border-bottom-color: #00aa00;
}
.rating-B {
- background-color: #80cc00;
+ background-color: #b0d513;
}
-a .rating-B { border-bottom-color: #80cc00; }
+a .rating-B { border-bottom-color: #b0d513; }
.rating-C {
- background-color: #fe0;
- color: #444;
- text-shadow: none;
+ background-color: #eabe06;
}
-a .rating-C { border-bottom-color: #fe0; }
+a .rating-C { border-bottom-color: #eabe06; }
.rating-D {
- background-color: #f77700;
+ background-color: #ed7d20;
}
-a .rating-D { border-bottom-color: #f77700; }
+a .rating-D { border-bottom-color: #ed7d20; }
.rating-E {
background-color: #e00;
diff --git a/server/sonar-web/src/main/js/helpers/constants.js b/server/sonar-web/src/main/js/helpers/constants.js
index 14d5a2f3b42..802a12c2327 100644
--- a/server/sonar-web/src/main/js/helpers/constants.js
+++ b/server/sonar-web/src/main/js/helpers/constants.js
@@ -20,5 +20,5 @@
export const SEVERITIES = ['BLOCKER', 'CRITICAL', 'MAJOR', 'MINOR', 'INFO'];
export const STATUSES = ['OPEN', 'REOPENED', 'CONFIRMED', 'RESOLVED', 'CLOSED'];
-export const CHART_COLORS_RANGE_PERCENT = ['#00aa00', '#80cc00', '#ffee00', '#f77700', '#ee0000'];
-export const CHART_REVERSED_COLORS_RANGE_PERCENT = ['#ee0000', '#f77700', '#ffee00', '#80cc00', '#00aa00'];
+export const CHART_COLORS_RANGE_PERCENT = ['#00aa00', '#b0d513', '#eabe06', '#ed7d20', '#d4333f'];
+export const CHART_REVERSED_COLORS_RANGE_PERCENT = ['#d4333f', '#ed7d20', '#eabe06', '#b0d513', '#00aa00'];