def index
@server=Server.new
-
+
+ filename = 'SystemInfo'
+ server_id = @server.sonar_property(ServerIdConfigurationController::PROPERTY_SERVER_ID)
+ filename += '-' + server_id.to_s if server_id
+
respond_to do |format|
format.html
format.csv {
- send_data(to_csv, :type => 'text/csv; charset=utf-8', :disposition => 'attachment; filename=sonar_system_info.csv')
+ send_data(to_csv, :type => 'text/csv; charset=utf-8', :disposition => "attachment; filename=#{filename}.csv")
}
end
end
class Server
def info
- system_info + sonar_info + system_statistics + sonar_plugins + system_properties + search_info
+ system_info + sonar_info + system_statistics + sonar_plugins + system_properties + cluster_info + nodes_info
end
def system_info
system_properties
end
+ def sonar_property(key)
+ Java::OrgSonarServerUi::JRubyFacade.getInstance().getContainer().getComponentByType(Java::OrgApacheCommonsConfiguration::Configuration.java_class).getProperty(key)
+ end
private
java.text.SimpleDateFormat.new("yyyy-MM-dd'T'HH:mm:ss.SSSZ").format(date)
end
- def sonar_property(key)
- Java::OrgSonarServerUi::JRubyFacade.getInstance().getContainer().getComponentByType(Java::OrgApacheCommonsConfiguration::Configuration.java_class).getProperty(key)
- end
-
def realm_name
realm_factory = Api::Utils.java_facade.getCoreComponentByClassname('org.sonar.server.user.SecurityRealmFactory')
if realm_factory && realm_factory.getRealm()