]> source.dussan.org Git - archiva.git/commitdiff
fix regression in json/boolean due to parameter to fix transformation of 2.0 to 2
authorOlivier Lamy <olamy@apache.org>
Tue, 28 Feb 2012 00:04:05 +0000 (00:04 +0000)
committerOlivier Lamy <olamy@apache.org>
Tue, 28 Feb 2012 00:04:05 +0000 (00:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1294407 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/resources/META-INF/spring-context.xml
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/repositories.js

index d19fef386f2b08c5c9a43a2e226aa5250fe45b7d..b0aace80812d0c7ec7d2d92d7d0bed8b366f8fb3 100644 (file)
@@ -42,6 +42,7 @@
 
   <bean id="jsonProvider" class="org.apache.cxf.jaxrs.provider.JSONProvider">
     <!-- without that String 2.0 are transformed to 2 which is not correct for versions -->
+    <!-- side effect json boolean are string rather than boolean -->
     <property name="convertTypesToStrings" value="true"/>
     <!--property name="serializeAsArray" value="true"/--> 
 
index 531aa7305e737143a303da2f39524f6de2f15ffb..2c4159f3ed9e178f6635d9aae640bdfec2b641cc 100644 (file)
@@ -149,9 +149,11 @@ $(function() {
     if (data==null){
       return null;
     }
-    return new ManagedRepository(data.id,data.name,data.layout,data.indexDirectory,data.location,data.snapshots,data.releases,
-                                 data.blockRedeployments,data.cronExpression,
-                                 data.scanned,data.daysOlder,data.retentionCount,data.deleteReleasedSnapshots,data.stageRepoNeeded);
+    return new ManagedRepository(data.id,data.name,data.layout,data.indexDirectory,data.location,data.snapshots=='true'
+                                 ,data.releases=='true',
+                                 data.blockRedeployments=='true',data.cronExpression,
+                                 data.scanned=='true',data.daysOlder,data.retentionCount,data.deleteReleasedSnapshots=='true',
+                                 data.stageRepoNeeded=='true');
   }
 
   mapArchivaRepositoryStatistics=function(data){
@@ -591,8 +593,8 @@ $(function() {
       return null;
     }
     return new RemoteRepository(data.id,data.name,data.layout,data.indexDirectory,data.url,data.userName,data.password,
-                                data.timeout,data.downloadRemoteIndex,data.remoteIndexUrl,data.remoteDownloadNetworkProxyId,
-                                data.cronExpression,data.remoteDownloadTimeout,data.downloadRemoteIndexOnStartup);
+                                data.timeout,data.downloadRemoteIndex=='true',data.remoteIndexUrl,data.remoteDownloadNetworkProxyId,
+                                data.cronExpression,data.remoteDownloadTimeout,data.downloadRemoteIndexOnStartup=='true');
   }
 
   mapRemoteRepositories=function(data){