aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/debt_overview.erb28
-rw-r--r--server/sonar-server/src/main/less/ui.less30
2 files changed, 31 insertions, 27 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/debt_overview.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/debt_overview.erb
index 77db77beb22..d17b3d12519 100644
--- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/debt_overview.erb
+++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/debt_overview.erb
@@ -3,32 +3,6 @@
sqale_debt_ratio = @snapshot.measure('sqale_debt_ratio')
if sqale_rating && sqale_rating.text_value && sqale_debt_ratio
%>
- <style>
- .debt_overview .rating {
- padding: 2px 5px;
- color: #fff;
- }
-
- .debt_overview .A {
- background-color: #00AA00;
- }
-
- .debt_overview .B {
- background-color: #80CC00;
- }
-
- .debt_overview .C {
- background-color: #FFEE00;
- }
-
- .debt_overview .D {
- background-color: #F77700;
- }
-
- .debt_overview .E {
- background-color: #EE0000;
- }
- </style>
<% if sqale_rating && sqale_rating.text_value %>
<div class="widget-row">
<div class="widget-span widget-span-6">
@@ -37,7 +11,7 @@
<span class="widget-label"><%= message('metric.sqale_rating.name') -%></span>
<span class="nowrap">
<a href="<%= url_for_drilldown('sqale_rating') -%>" class="widget-link">
- <span class="rating <%= sqale_rating.text_value -%>"><%= sqale_rating.text_value -%></span>
+ <span class="rating rating-<%= sqale_rating.text_value -%>"><%= sqale_rating.text_value -%></span>
</a>
<% unless dashboard_configuration.selected_period? %>
<%= trend_icon(sqale_rating) -%>
diff --git a/server/sonar-server/src/main/less/ui.less b/server/sonar-server/src/main/less/ui.less
index cc627fa577c..eeb002fdde4 100644
--- a/server/sonar-server/src/main/less/ui.less
+++ b/server/sonar-server/src/main/less/ui.less
@@ -312,3 +312,33 @@ input[type=button] {
.markdown {
a { .underlined-link; }
}
+
+
+/*
+ * Display SQALE Rating (also used by the SQALE plugin)
+ */
+
+.rating {
+ padding: 2px 5px;
+ color: #fff;
+}
+
+.rating-A {
+ background-color: #00AA00;
+}
+
+.rating-B {
+ background-color: #80CC00;
+}
+
+.rating-C {
+ background-color: #FFEE00;
+}
+
+.rating-D {
+ background-color: #F77700;
+}
+
+.rating-E {
+ background-color: #EE0000;
+}