You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2013/12/22 13:26:21 UTC

svn commit: r1552985 - in /archiva/trunk/archiva-modules/archiva-web: archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/ archiva-web-common/src/main/resources/org/apache/archiva/i18n/ archiva-webapp/src/main/webapp/js/ar...

Author: olamy
Date: Sun Dec 22 12:26:20 2013
New Revision: 1552985

URL: http://svn.apache.org/r1552985
Log:
fix timeout

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java
    archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java?rev=1552985&r1=1552984&r2=1552985&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRemoteRepositoriesService.java Sun Dec 22 12:26:20 2013
@@ -171,15 +171,16 @@ public class DefaultRemoteRepositoriesSe
                 new WagonFactoryRequest( wagonProtocol, remoteRepository.getExtraHeaders() ).networkProxy(
                     networkProxy ) );
 
-            wagon.setReadTimeout( remoteRepository.getRemoteDownloadTimeout() * 1000 );
-            wagon.setTimeout( remoteRepository.getTimeout() * 1000 );
-            HttpWagon foo;
+            // hardcoded value as it's a check of the remote repo connectivity
+            wagon.setReadTimeout( 4000 );
+            wagon.setTimeout( 3000 );
+
             if ( wagon instanceof AbstractHttpClientWagon )
             {
                 HttpConfiguration httpConfiguration = new HttpConfiguration();
                 HttpMethodConfiguration httpMethodConfiguration = new HttpMethodConfiguration();
                 httpMethodConfiguration.setUsePreemptive( true );
-                httpMethodConfiguration.setReadTimeout( remoteRepository.getRemoteDownloadTimeout() * 1000 );
+                httpMethodConfiguration.setReadTimeout( 4000 );
                 httpConfiguration.setGet( httpMethodConfiguration );
                 AbstractHttpClientWagon.class.cast( wagon ).setHttpConfiguration( httpConfiguration );
             }

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties?rev=1552985&r1=1552984&r2=1552985&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties Sun Dec 22 12:26:20 2013
@@ -196,7 +196,7 @@ remoteRepository.extraParametersEntries.
 remoteRepository.extraParametersEntries.help.content=Key/Value pair you want to add to the url when asking the remote repository.
 remoteRepository.extraHeadersEntries.help.title=Extra HTTP Headers
 remoteRepository.extraHeadersEntries.help.content=Key/Value pair HTTP headers you want to add when asking the remote repository.
-
+remoterepository.remotecheck=Remote Check
 
 
 

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js?rev=1552985&r1=1552984&r2=1552985&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/repositories.js Sun Dec 22 12:26:20 2013
@@ -1224,16 +1224,18 @@ function(jquery,i18n,jqueryTmpl,bootstra
                   var repoId = $( this ).attr("id");
                   console.log( index + ": " + repoId);
                   $.ajax({
-                           url: "restServices/archivaServices/remoteRepositoriesService/checkRemoteConnectivity/"+repoId.substringAfterFirst("remote-check-"),
-                           type: "GET",
-                           success: function(result){
-                             if(result="true"){
-                               mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-clear.png" )
-                             } else {
-                               mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-severe-alert-16-16.png" )
-                             }
-                           }
-                         })
+                    url: "restServices/archivaServices/remoteRepositoriesService/checkRemoteConnectivity/"+repoId.substringAfterFirst("remote-check-"),
+                    type: "GET",
+                    dataType: 'text',
+                    success: function(result){
+                      $.log("result:"+result);
+                      if(result=="true"){
+                        mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-clear.png" )
+                      } else {
+                        mainContent.find("img[id='"+repoId+"']").attr("src", "images/weather-severe-alert-16-16.png" )
+                      }
+                    }
+                  });
                 });
 
 

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html?rev=1552985&r1=1552984&r2=1552985&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/repositories.html Sun Dec 22 12:26:20 2013
@@ -534,8 +534,6 @@
     </td>
     <td>
       <img class="remote-check" id="remote-check-${row.id()}" src="images/small-spinner.gif"/>
-      weather-severe-alert-16-16.png
-
     </td>
   </tr>
   {{/each}}