diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2011-07-20 15:35:49 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2011-07-20 15:35:56 +0200 |
commit | 677a46cbe3907fa6938c85a59a803d184f0ace7f (patch) | |
tree | 7b936654cb9a60e970d3eed432b8455c1cbbe115 /sonar-server | |
parent | d3ae752094a1192724e6d9970168b5613683ac16 (diff) | |
download | sonarqube-677a46cbe3907fa6938c85a59a803d184f0ace7f.tar.gz sonarqube-677a46cbe3907fa6938c85a59a803d184f0ace7f.zip |
Remote the column MANUAL_MEASURES.URL + improve IE7 rendering
Diffstat (limited to 'sonar-server')
5 files changed, 10 insertions, 14 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/manual_measures_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/manual_measures_controller.rb index 3bd9e29ef9c..7be0373987b 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/manual_measures_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/api/manual_measures_controller.rb @@ -66,7 +66,6 @@ class Api::ManualMeasuresController < Api::ApiController measure.value = value measure.text_value = params[:text] measure.description = params[:desc] - measure.url = params[:url] measure.save! respond_to do |format| @@ -105,7 +104,6 @@ class Api::ManualMeasuresController < Api::ApiController hash[:val]=manual_measure.value if manual_measure.value hash[:text]=manual_measure.text_value if manual_measure.text_value hash[:desc]=manual_measure.description if manual_measure.description - hash[:url]=manual_measure.url if manual_measure.url hash[:created_at]=format_datetime(manual_measure.created_at) hash[:updated_at]=format_datetime(manual_measure.updated_at) if manual_measure.updated_at if manual_measure.user diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/manual_measure.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/manual_measure.rb index 5907c95a9ab..7aefff51190 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/manual_measure.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/manual_measure.rb @@ -21,7 +21,6 @@ class ManualMeasure < ActiveRecord::Base belongs_to :resource, :class_name => 'Project' validates_uniqueness_of :metric_id, :scope => :resource_id validates_length_of :text_value, :maximum => 4000, :allow_nil => true, :allow_blank => true - validates_length_of :url, :maximum => 4000, :allow_nil => true, :allow_blank => true validates_length_of :description, :maximum => 4000, :allow_nil => true, :allow_blank => true validate :validate_metric diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb index 91bbef9068d..45bb9cad720 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/metric.rb @@ -100,17 +100,17 @@ class Metric < ActiveRecord::Base default_string = read_attribute(:short_name) return default_string unless translate - metric_name = read_attribute(:name) - return nil if metric_name.nil? + metric_key = read_attribute(:name) + return nil if metric_key.nil? - localeMap = Metric.i18n_short_name_cache[metric_name] + localeMap = Metric.i18n_short_name_cache[metric_key] locale = I18n.locale - return localeMap[locale] if not localeMap.nil? and localeMap.has_key?(locale) + return localeMap[locale] if localeMap && localeMap.has_key?(locale) - i18n_key = 'metric.' + metric_name + '.name' + i18n_key = 'metric.' + metric_key + '.name' result = Java::OrgSonarServerUi::JRubyFacade.getInstance().getI18nMessage(I18n.locale, i18n_key, default_string, [].to_java) - localeMap[locale] = result if not localeMap.nil? + localeMap[locale] = result if localeMap result end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb index ea9e0d94e7b..1f7c7b62f51 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/manual_measures/index.html.erb @@ -5,9 +5,9 @@ #manualMeasures td.pendingMeasure { background-color: orange; - width: 4px; - padding: 0; cursor: help; + padding: 3px; + width: 0; } </style> <div class="line-block marginbottom10"> @@ -22,7 +22,7 @@ <table class="width100 data sortable" id="manualMeasures"> <thead> <tr> - <th style="padding: 0; margin: 0; width: 4px" class="nosort"></th> + <th style="padding: 0; margin: 0" class="nosort"></th> <th class="thin nowrap sortfirstasc">Domain</th> <th class="thin nowrap">Metric</th> <th class="thin nowrap" style="text-align: right">Value</th> @@ -44,7 +44,7 @@ <% if measure.pending?(@snapshot) %> <td class="pendingMeasure" title="Pending. New value will be available during next project analysis."></td> <% else %> - <td></td> + <td style="padding: 0"></td> <% end %> <td class="thin nowrap"><%= measure.metric.domain -%></td> <td class="thin nowrap"><%= measure.metric.short_name -%></td> diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb index f0631c680c1..3f1e2ba687e 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/211_create_manual_measures.rb @@ -31,7 +31,6 @@ class CreateManualMeasures < ActiveRecord::Migration t.column 'text_value', :string, :null => true, :limit => 4000 t.column 'user_login', :string, :null => true, :limit => 40 t.column 'description', :string, :null => true, :limit => 4000 - t.column 'url', :string, :null => true, :limit => 4000 t.timestamps end alter_to_big_primary_key('manual_measures') |