From d31b9336e988b1264367d580f5965dfeeba600a4 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Fri, 21 Sep 2012 16:37:41 +0200 Subject: [PATCH] SONAR-3754 Better look for special settings pages --- .../resources/org/sonar/l10n/core.properties | 5 +- .../views/email_configuration/index.html.erb | 3 +- .../generate_secret_form.html.erb | 43 ++++++-- .../encryption_configuration/index.html.erb | 51 ++++++--- .../server_id_configuration/index.html.erb | 103 +++++++++--------- 5 files changed, 120 insertions(+), 85 deletions(-) diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties index f9088055607..1fa003ce918 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/l10n/core.properties @@ -322,7 +322,6 @@ my_profile.page=My Profile roles.page=Roles project_settings.page=Settings project_links.page=Links -project_exclusions.page=Exclusions project_history.page=History quality_profiles.page=Quality Profiles reviews.page=Reviews @@ -578,8 +577,8 @@ property.category.duplications=Duplications property.category.localization=Localization property.category.server_id=Server ID property.category.exclusions=Exclusions -property.sonar.exclusions.name=Exclusions -property.sonar.exclusions.description=Exclude sources from code analysis. Changes will be applied during next code analysis. +property.sonar.exclusions.name=Exclude sources from code analysis +property.sonar.exclusions.description=Changes will be applied during next code analysis. property.sonar.exclusions.help=

Wildcards

\

Following rules are applied:

\ \ diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb index afd4ebe9269..dbbe4155ff0 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/email_configuration/index.html.erb @@ -1,8 +1,9 @@ + <% form_tag({:action => 'save'}) do -%>
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb index b3236d737b6..bd38e1cd7c6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/encryption_configuration/generate_secret_form.html.erb @@ -1,11 +1,32 @@ -

Encryption

-

Secret key is required to be able to encrypt properties. More information.

-
- <%= button_to_remote 'Generate secret key', - {:url => {:action => 'generate_secret'}, - :update => {:success => 'secret_content', :failure => 'secret_error'}, - :failure => "$('secret_error').show()", - :method => 'POST'}, - {:id => 'submit_generate_secret'} -%> - -
\ No newline at end of file + + +
+ + + + + + + + + + +
Encryption
+

Secret key is required to be able to encrypt properties. + More + information.

+ +
+ <%= button_to_remote 'Generate secret key', + {:url => {:action => 'generate_secret'}, + :update => {:success => 'secret_content', :failure => 'secret_error'}, + :failure => "$('secret_error').show()", + :method => 'POST'}, + {:id => 'submit_generate_secret'} -%> + +
+
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb index ff021a225ac..8c479ad480a 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/encryption_configuration/index.html.erb @@ -1,20 +1,39 @@ -

Encryption

-

Secret key is registered. You can encrypt any property value with the following form :

+ -<%= form_remote_tag :url => {:action => 'encrypt'}, - :update => {:success => 'encrypted_section', :failure => 'encryption_error'}, - :success => "$('encrypted_section').show();$('encryption_error').hide();", - :failure => "$('encryption_error').show()", - :html => {:class => 'spacer-bottom'} -%> - - - + + + + + + + + + + + +
Encryption
+

Secret key is registered. You can encrypt any property value with the following form :

- - + <%= form_remote_tag :url => {:action => 'encrypt'}, + :update => {:success => 'encrypted_section', :failure => 'encryption_error'}, + :success => "$('encrypted_section').show();$('encryption_error').hide();", + :failure => "$('encryption_error').show()", + :html => {:class => 'spacer-bottom'} -%> + + + + + + + +

Note that the <%= link_to 'secret key can be changed', {:action => 'generate_secret_form'}, :class => 'link-action', :id => 'link-generate-key' %> + but all the encrypted properties will have to be updated. More information.

+
-

Note that the <%= link_to 'secret key can be changed', {:action => 'generate_secret_form'}, :class => 'link-action', :id => 'link-generate-key' %> - but all the encrypted properties will have to be updated. More information.

\ No newline at end of file + $j('#clear_text').focus(); + diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb index 7ffc9c9099e..8d1ed4cdb23 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/server_id_configuration/index.html.erb @@ -1,60 +1,55 @@ -

<%= message('server_id_configuration.page') -%>

+ -<% if @server_id %> -

- <%= @server_id -%> - <% if @bad_id %> - <%= message('server_id_configuration.bad_id') -%> - <% end %> -

-
-<% end %> + + + + + + + + + + + + - - - - - -
<%= message('server_id_configuration.page') -%>
+

<%= message('server_id_configuration.information') -%>

-

- <%= message('server_id_configuration.information') -%> -

+ <% if @server_id %> + <%= @server_id -%> + <% if @bad_id %> + <%= message('server_id_configuration.bad_id') -%> + <% end %> +
+ <% end %> +
+

<%= message('server_id_configuration.organisation.title') -%>

-<% form_tag :action => 'generate' do %> - - - - - - - - - - - - - - + + + + + +
- <%= submit_tag message('server_id_configuration.generate_button'), :disable_with => message('server_id_configuration.generating_button'), :id => 'generate-button' -%> -
-

<%= message('server_id_configuration.organisation.title') -%>

+

<%= message('server_id_configuration.organisation.desc') -%>

+ +
+

<%= message('server_id_configuration.ip.title') -%>

+ +

<%= message('server_id_configuration.ip.desc') -%>

+
    + <% @valid_addresses.each_with_index do |ip_address, index| %> +
  • <%= ip_address.getHostAddress() -%>
  • + <% end %> +
+ +
-

<%= message('server_id_configuration.organisation.desc') -%>

+<% form_tag :action => 'generate' do %> + <%= submit_tag message('server_id_configuration.generate_button'), :disable_with => message('server_id_configuration.generating_button'), :id => 'generate-button' -%> +<% end %> -

- -

-
-

<%= message('server_id_configuration.ip.title') -%>

-

<%= message('server_id_configuration.ip.desc') -%>

-
    - <% @valid_addresses.each_with_index do |ip_address, index| %> -
  • <%= ip_address.getHostAddress() -%>
  • - <% end %> -
-

- -

-
-<% end %> \ No newline at end of file -- 2.39.5