From: Olivier Lamy Date: Wed, 7 Mar 2012 23:23:09 +0000 (+0000) Subject: [MRM-1579] rewrite repositories scanning admin page X-Git-Tag: archiva-1.4-M3~1098 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8168443761f5fa182d80a233d883cd7f5393bb74;p=archiva.git [MRM-1579] rewrite repositories scanning admin page fileTypes pattern implemented. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1298205 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js index 1a6cfcc51..54897bfe4 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js @@ -322,13 +322,114 @@ $(function() { return []; } + AdminRepositoryConsumer=function(enabled,id,description){ + //private boolean enabled = false; + this.enabled=ko.observable(enabled); + + //private String id; + this.id=ko.observable(id) + + //private String description; + this.description=ko.observable(description); + } + + mapAdminRepositoryConsumer=function(data){ + return new AdminRepositoryConsumer(data.enabled,data.id,data.description); + } + + mapAdminRepositoryConsumers=function(data){ + if (data!=null){ + return $.isArray(data)? $.map(data,function(item){ + return mapAdminRepositoryConsumer(item) + }):[mapAdminRepositoryConsumer(data)]; + } + return []; + } + + + + RepositoryScanningViewModel=function(){ + var self=this; + this.fileTypes=ko.observableArray([]); + + this.findFileType=function(id){ + var fileType=null; + for (var i=0;i + + + +