From: Olivier Lamy Date: Tue, 24 Jan 2012 18:23:38 +0000 (+0000) Subject: javascript logging optionnal too X-Git-Tag: archiva-1.4-M3~1482 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d30085c7b8f41da006113313370605ac260a57c2;p=archiva.git javascript logging optionnal too git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1235395 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/CommonServices.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/CommonServices.java index 98d30651b..f2869be86 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/CommonServices.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/services/CommonServices.java @@ -18,6 +18,7 @@ package org.apache.archiva.rest.api.services; * under the License. */ +import org.apache.archiva.rest.api.model.ArchivaRuntimeInfo; import org.codehaus.plexus.redback.authorization.RedbackAuthorization; import javax.ws.rs.GET; @@ -60,9 +61,9 @@ public interface CommonServices String getAllI18nResources( @QueryParam( "locale" ) String locale ) throws ArchivaRestServiceException; - @Path( "devMode" ) + @Path( "archivaRuntimeInfo" ) @GET - @Produces( { MediaType.TEXT_PLAIN } ) + @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } ) @RedbackAuthorization( noRestriction = true ) - Boolean devMode(); + ArchivaRuntimeInfo archivaRuntimeInfo(); } diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java index 4404593b3..c16440643 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultCommonServices.java @@ -18,6 +18,7 @@ package org.apache.archiva.rest.services; * under the License. */ +import org.apache.archiva.rest.api.model.ArchivaRuntimeInfo; import org.apache.archiva.rest.api.services.ArchivaRestServiceException; import org.apache.archiva.rest.api.services.CommonServices; import org.apache.commons.io.IOUtils; @@ -169,8 +170,8 @@ public class DefaultCommonServices } } - public Boolean devMode() + public ArchivaRuntimeInfo archivaRuntimeInfo() { - return Boolean.getBoolean( "archiva.devMode" ); + return new ArchivaRuntimeInfo(); } } diff --git a/archiva-modules/archiva-web/archiva-webapp-js/pom.xml b/archiva-modules/archiva-web/archiva-webapp-js/pom.xml index 3c48fbf88..a4a5840c8 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/pom.xml +++ b/archiva-modules/archiva-web/archiva-webapp-js/pom.xml @@ -35,6 +35,7 @@ 9091 /archiva true + true @@ -546,6 +547,7 @@ ${project.build.directory} ${project.build.directory}/appserver-base/conf/archiva.xml ${archiva.devMode} + ${archiva.javascriptLog} @@ -579,6 +581,7 @@ ${project.build.directory} ${project.build.directory}/appserver-base/conf/archiva.xml ${archiva.devMode} + ${archiva.javascriptLog} @@ -610,6 +613,7 @@ ${project.build.directory} ${project.build.directory}/appserver-base/conf/archiva.xml ${archiva.devMode} + ${archiva.javascriptLog} diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html index 14d602c7e..d0168dfea 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/index.html @@ -42,9 +42,11 @@