aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@sonarsource.com>2014-10-09 15:05:37 +0200
committerJulien Lancelot <julien.lancelot@sonarsource.com>2014-10-09 15:05:37 +0200
commit393f9888e69e209b2755aebaed3709a167399b29 (patch)
treea92d790a9cc7ad42691250de7a4fe4c52346f75b /server/sonar-web/src/main
parent03970eafff028da26540ef814619a02168a57618 (diff)
parentb0903c3790a72643840e147501a739604e3083de (diff)
downloadsonarqube-393f9888e69e209b2755aebaed3709a167399b29.tar.gz
sonarqube-393f9888e69e209b2755aebaed3709a167399b29.zip
Fix merge with 4.5
Diffstat (limited to 'server/sonar-web/src/main')
-rw-r--r--server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee6
-rw-r--r--server/sonar-web/src/main/js/widgets/timeline.js14
-rw-r--r--server/sonar-web/src/main/less/style.less11
-rw-r--r--server/sonar-web/src/main/less/ui.less2
-rw-r--r--server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb30
5 files changed, 54 insertions, 9 deletions
diff --git a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee
index 810f4ccfd89..4728cb45e5b 100644
--- a/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee
+++ b/server/sonar-web/src/main/coffee/coding-rules/views/coding-rules-custom-rule-creation-view.coffee
@@ -68,7 +68,11 @@ define [
postData.prevent_reactivation = true
params = @ui.customRuleCreationParameters.map(->
- key: jQuery(@).prop('name'), value: jQuery(@).val() || jQuery(@).prop('placeholder') || '').get()
+ node = jQuery(@)
+ value = node.val()
+ if !value and action == 'create'
+ value = node.prop('placeholder') || ''
+ key: node.prop('name'), value: value).get()
postData.params = (params.map (param) -> param.key + '=' + param.value).join(';')
@sendRequest(action, postData)
diff --git a/server/sonar-web/src/main/js/widgets/timeline.js b/server/sonar-web/src/main/js/widgets/timeline.js
index 23ab743cd23..3718852e1bd 100644
--- a/server/sonar-web/src/main/js/widgets/timeline.js
+++ b/server/sonar-web/src/main/js/widgets/timeline.js
@@ -153,6 +153,9 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
.ticks(5);
+ this.showLimitHistoryMessage();
+
+
// Configure lines and points
this.lines = [];
this.glines = [];
@@ -281,6 +284,17 @@ window.SonarWidgets = window.SonarWidgets == null ? {} : window.SonarWidgets;
};
+ window.SonarWidgets.Timeline.prototype.showLimitHistoryMessage = function () {
+ var minEvent = d3.min(this.events(), function (d) {
+ return d.d;
+ }),
+ minData = this.time.domain()[0];
+ if (minEvent < minData) {
+ var maxResultsReachedLabel = this.container.append('div').text(this.limitedHistoricalData);
+ maxResultsReachedLabel.classed('max-results-reached-message', true);
+ }
+ };
+
window.SonarWidgets.Timeline.prototype.update = function() {
var widget = this,
diff --git a/server/sonar-web/src/main/less/style.less b/server/sonar-web/src/main/less/style.less
index 72388c0ba34..a0c6ec7f7ba 100644
--- a/server/sonar-web/src/main/less/style.less
+++ b/server/sonar-web/src/main/less/style.less
@@ -2579,17 +2579,17 @@ div.rule-title {
}
}
-.sonar-d3 .max-results-reached-message {
+.max-results-reached-message {
font-size: 12px;
}
-.sonar-d3 div.max-results-reached-message {
+div.max-results-reached-message {
margin-top: 10px;
color: #777;
text-align: center;
}
-.sonar-d3 text.max-results-reached-message {
+text.max-results-reached-message {
fill: #777;
}
@@ -2607,11 +2607,6 @@ div.rule-title {
.sonar-d3 .treemap-cell-drilldown {
cursor: pointer;
- .trans;
-
- &:hover .treemap-inner {
- text-decoration: underline;
- }
}
.sonar-d3 .treemap-inner {
diff --git a/server/sonar-web/src/main/less/ui.less b/server/sonar-web/src/main/less/ui.less
index 710a9157cef..89ecef1598b 100644
--- a/server/sonar-web/src/main/less/ui.less
+++ b/server/sonar-web/src/main/less/ui.less
@@ -339,6 +339,8 @@ input[type=button] {
font-weight: 500;
text-transform: uppercase;
}
+
+ td { padding: 0 5px; }
}
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb
new file mode 100644
index 00000000000..55d04675c93
--- /dev/null
+++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/601_add_missing_custom_rule_parameters.rb
@@ -0,0 +1,30 @@
+#
+# SonarQube, open source software quality management tool.
+# Copyright (C) 2008-2014 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# SonarQube is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# SonarQube is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+
+#
+# SonarQube 4.5.1
+# SONAR-5575
+#
+class AddMissingCustomRuleParameters < ActiveRecord::Migration
+
+ def self.up
+ execute_java_migration 'org.sonar.server.db.migrations.v45.AddMissingCustomRuleParametersMigration'
+ end
+end