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 2012/01/30 15:57:11 UTC

svn commit: r1237693 - in /archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva: proxy-connectors.js templates/proxy-connectors.html

Author: olamy
Date: Mon Jan 30 14:57:11 2012
New Revision: 1237693

URL: http://svn.apache.org/viewvc?rev=1237693&view=rev
Log:
start work on proxy connector screen

Modified:
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js
    archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js?rev=1237693&r1=1237692&r2=1237693&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/proxy-connectors.js Mon Jan 30 14:57:11 2012
@@ -64,34 +64,30 @@ $(function() {
       //sourceRepoId
       for(i=0;i<self.proxyConnectors().length;i++){
         var curSrcRepo=self.proxyConnectors()[i].sourceRepoId();
+
         var curTarget=self.proxyConnectors()[i].targetRepoId();
-        $.log("curSrcRepo:"+curSrcRepo+",curTarget:"+curTarget);
         var sourceRepo = $.grep(sourcesRepos,
                                 function(srcRepo,idx){
-                                  $.log("grep:"+srcRepo.source);
-                                  $.log("sourcesRepos.length:"+sourcesRepos.length);
                                   for (j=0;j<sourcesRepos.length;j++){
-                                    if (srcRepo.source==curSrcRepo){
+                                    if (srcRepo.source==sourcesRepos[j].source){
                                       return true;
                                     }
                                   }
                                   return false;
                                 }
         );
-        $.log("isArray:"+$.isArray(sourceRepo)+",length:"+sourceRepo.length);
         if (sourceRepo.length>0){
-          $.log("sourceRepo!=null:"+sourceRepo[0]);
           sourceRepo[0].targetRepos.push(curTarget);
         } else {
           $.log("sourceRepo==null:"+curSrcRepo);
           sourcesRepos.push({source:curSrcRepo,targetRepos:[curTarget]});
+        if (sourceRepo!=null){
+          $.log("sourceRepoId:"+curSrcRepo);
+          sourcesRepos.push({source:curSrcRepo,targetRepos:[curTarget]});
+        } else {
+          sourceRepo.targetRepos.push(curTarget);
         }
       }
-
-      $.log("sourcesRepo.length:"+sourcesRepos.length);
-      for(i=0;i<sourcesRepos.length;i++){
-        $.log("sourcesRepos[i]:"+sourcesRepos[i].source+"="+sourcesRepos[i].targetRepos.join(":"));
-      }
     }
   }
 

Modified: archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html
URL: http://svn.apache.org/viewvc/archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html?rev=1237693&r1=1237692&r2=1237693&view=diff
==============================================================================
--- archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html (original)
+++ archiva/trunk/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/templates/proxy-connectors.html Mon Jan 30 14:57:11 2012
@@ -20,7 +20,6 @@
   <div class="page-header">
     <h2>${$.i18n.prop('proxy-connectors.list')}</h2>
   </div>
-
   <ul id="proxy-connector-view-tabs" class="tabs">
     <li id="network-proxies-view-tabs-li-grid" class="active">
       <a href="#network-proxies-view" id="network-proxies-view-tabs-a-network-proxies-grid">${$.i18n.prop('network-proxies.grid.tab.title')}</a>
@@ -31,12 +30,11 @@
   </ul>
   <div id="network-proxies-view-tabs-content" class="tab-content">
     <div id="network-proxies-view" class="active">
-        <table class="bordered-table zebra-striped" id="networkProxiesTable>
+        <table class="bordered-table zebra-striped" id="networkProxiesTable"
                data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'ko-network-proxies-grid',pageLinksId:'network-proxiesPagination'">
         </table>
         <div id="network-proxiesPagination"></div>
     </div>
     <div id="network-proxies-edit" data-bind='template: {name:"network-proxy-edit-tmpl"}'></div>
   </div>
-
 </script>
\ No newline at end of file