From: Simon Brandhof Date: Fri, 12 Aug 2011 14:53:51 +0000 (+0200) Subject: SONAR-2700 Add the server startup date/time to the System Info page X-Git-Tag: 2.11^2~162 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d215c4570de138cc9565e02256b56a61a6326d7a;p=sonarqube.git SONAR-2700 Add the server startup date/time to the System Info page --- diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb index b56d0afe72e..bea432fd4bf 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/server.rb @@ -61,6 +61,7 @@ class Server sonar_info=[] add_property(sonar_info, 'Server Key') {org.sonar.server.platform.Platform.getServer().getKey()} add_property(sonar_info, 'Version') {org.sonar.server.platform.Platform.getServer().getVersion()} + add_property(sonar_info, 'Started at') {org.sonar.server.platform.Platform.getServer().getStartedAt()} add_property(sonar_info, 'Database') {"#{jdbc_metadata. getDatabaseProductName()} #{jdbc_metadata. getDatabaseProductVersion()}"} add_property(sonar_info, 'Database URL') {sonar_property('sonar.jdbc.url')} add_property(sonar_info, 'Database Login') {sonar_property('sonar.jdbc.username')} diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/system/index.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/system/index.html.erb index 8d99bb71e55..f946a8d84a6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/system/index.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/system/index.html.erb @@ -4,73 +4,74 @@ - +
- + - <% @server.system_info.each do |data| %> - <%= render :partial => 'row', :locals => {:title => data[0], :value => data[1], :name => 'system' } %> + <% @server.sonar_info.each do |data| %> + <%= render :partial => 'row', :locals => {:title => data[0], :value => data[1], :name => 'sonar' } %> <% end %>

System Info

Sonar Info


- +
- + - <% @server.sonar_info.each do |data| %> - <%= render :partial => 'row', :locals => {:title => data[0], :value => data[1], :name => 'sonar' } %> - <% end %> + <% + user_plugins=@server.sonar_plugins + if user_plugins.empty? + %> + + <% else %> + <% user_plugins.each do |data| %> + <%= render :partial => 'row', :locals => {:title => data[0], :value => data[1], :name => 'plugins' } %> + <% end %> + <% end %>

Sonar Info

Sonar Plugins

None

- +
- + - <% @server.system_statistics.each do |data| %> - <%= render :partial => 'row', :locals => {:title => data[0], :value => data[1], :name => 'memory' } %> + <% @server.system_info.each do |data| %> + <%= render :partial => 'row', :locals => {:title => data[0], :value => data[1], :name => 'system' } %> <% end %>

Java VM Statistics

System Info


- +
- + - <% - user_plugins=@server.sonar_plugins - if user_plugins.empty? - %> - - <% else %> - <% user_plugins.each do |data| %> - <%= render :partial => 'row', :locals => {:title => data[0], :value => data[1], :name => 'plugins' } %> - <% end %> - <% end %> + <% @server.system_statistics.each do |data| %> + <%= render :partial => 'row', :locals => {:title => data[0], :value => data[1], :name => 'memory' } %> + <% end %>

Sonar Plugins

Java VM Statistics

None

+