From d215c4570de138cc9565e02256b56a61a6326d7a Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 12 Aug 2011 16:53:51 +0200 Subject: [PATCH] SONAR-2700 Add the server startup date/time to the System Info page --- .../main/webapp/WEB-INF/app/models/server.rb | 1 + .../WEB-INF/app/views/system/index.html.erb | 51 ++++++++++--------- 2 files changed, 27 insertions(+), 25 deletions(-) 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

+ -- 2.39.5