diff options
Diffstat (limited to 'sonar-server/src/main/webapp/WEB-INF/app')
2 files changed, 7 insertions, 2 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/new_rules_configuration/_rule_param.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/new_rules_configuration/_rule_param.html.erb index 0fa93e21b12..d7f639afd95 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/new_rules_configuration/_rule_param.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/new_rules_configuration/_rule_param.html.erb @@ -1,6 +1,9 @@ <% # locals = rule, profile, parameter + # Display default value only for inactive rules param_id = "#{rule.id}#{parameter.key}" - param_value = parameter.value || '' + # Display default value only for inactive rules + param_value = parameter.default_value if !rule.activeRuleId + param_value = parameter.value if !param_value active_rule_id = rule.activeRuleId read_only = rule.activeRuleId.nil? || !profiles_administrator? %> diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb index a44e972bf74..bd034cc8a24 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/rules_configuration/_rule_param.html.erb @@ -1,5 +1,7 @@ <% - param_value = active_parameter.value if active_parameter + # Display default value only for inactive rules + param_value = parameter.default_value if !active_rule + param_value = active_parameter.value if !param_value && active_parameter active_param_id = active_parameter.id if active_parameter active_rule_id = active_rule.id if active_rule read_only = !active_rule || !profiles_administrator? |