You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by sk...@apache.org on 2013/05/25 17:43:05 UTC
svn commit: r1486339 [2/4] - in
/archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp:
./ src/main/webapp/ src/main/webapp/js/ src/main/webapp/js/archiva/
src/main/webapp/js/archiva/admin/features/10networkproxies/ src/main/weba...
Added: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/networkproxies/main.js
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/networkproxies/main.js?rev=1486339&view=auto
==============================================================================
--- archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/networkproxies/main.js (added)
+++ archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/networkproxies/main.js Sat May 25 15:43:04 2013
@@ -0,0 +1,328 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define("archiva/admin/features/networkproxies/main",["jquery","i18n","jquery.tmpl","bootstrap","jquery.validate","knockout"
+ ,"knockout.simpleGrid"], function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
+
+ showMenu = function(administrationMenuItems) {
+ administrationMenuItems.push(
+ { text : $.i18n.prop('menu.network-proxies') ,order:1000, id: "menu-network-proxies-list-a" , href: "#networkproxies" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayNetworkProxies()}}
+ );
+ }
+
+ NetworkProxy=function(id,protocol,host,port,username,password,useNtlm){
+ var self=this;
+ //private String id;
+ this.id = ko.observable(id);
+ this.id.subscribe(function(newValue){self.modified(true)});
+
+ //private String protocol = "http";
+ this.protocol=ko.observable(protocol);
+ this.protocol.subscribe(function(newValue){self.modified(true)});
+
+ //private String host;
+ this.host=ko.observable(host);
+ this.host.subscribe(function(newValue){self.modified(true)});
+
+ //private int port = 8080;
+ this.port=ko.observable(port);
+ this.port.subscribe(function(newValue){self.modified(true)});
+
+ //private String username;
+ this.username=ko.observable(username?username:"");
+ this.username.subscribe(function(newValue){self.modified(true)});
+
+ //private String password;
+ this.password=ko.observable(password?password:"");
+ this.password.subscribe(function(newValue){self.modified(true)});
+
+ //use NTLM proxy
+ this.useNtlm=ko.observable(useNtlm?useNtlm:false);
+ this.useNtlm.subscribe(function(newValue){self.modified(true)});
+
+ this.modified=ko.observable(false);
+ }
+
+ NetworkProxyViewModel=function(networkProxy, update, networkProxiesViewModel,bulkMode){
+ this.update=update;
+ this.networkProxy=networkProxy;
+ this.networkProxiesViewModel=networkProxiesViewModel;
+ var self=this;
+ this.bulkMode=false || bulkMode;
+
+ this.save=function(){
+ if (!$("#main-content" ).find("#network-proxy-edit-form").valid()){
+ return;
+ }
+ if (!this.bulkMode){
+ clearUserMessages();
+ }
+ if (update){
+ $.ajax("restServices/archivaServices/networkProxyService/updateNetworkProxy",
+ {
+ type: "POST",
+ contentType: 'application/json',
+ data: ko.toJSON(networkProxy),
+ dataType: 'json',
+ success: function(data) {
+ $.log("update proxy id:"+self.networkProxy.id());
+ var message=$.i18n.prop('networkproxy.updated',self.networkProxy.id());
+ displaySuccessMessage(message);
+ self.networkProxy.modified(false);
+ if (!this.bulkMode){
+ activateNetworkProxiesGridTab();
+ }
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ }
+ }
+ );
+ } else {
+
+ $.ajax("restServices/archivaServices/networkProxyService/addNetworkProxy",
+ {
+ type: "POST",
+ contentType: 'application/json',
+ data: ko.toJSON(networkProxy),
+ dataType: 'json',
+ success: function(data) {
+ self.networkProxy.modified(false);
+ self.networkProxiesViewModel.networkProxies.push(self.networkProxy);
+ displaySuccessMessage($.i18n.prop('networkproxy.added',self.networkProxy.id()));
+ activateNetworkProxiesGridTab();
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ }
+ }
+ );
+
+ }
+ }
+
+ displayGrid=function(){
+ activateNetworkProxiesGridTab();
+ }
+ }
+
+ NetworkProxiesViewModel=function(){
+ this.networkProxies=ko.observableArray([]);
+
+ var self=this;
+
+ this.gridViewModel = null;
+
+ editNetworkProxy=function(networkProxy){
+ clearUserMessages();
+ $.log("editNetworkProxy");
+ var mainContent = $("#main-content");
+ mainContent.find("#network-proxies-view-tabs-li-edit a").html($.i18n.prop("edit"));
+ var viewModel = new NetworkProxyViewModel(networkProxy,true,self);
+ ko.applyBindings(viewModel,mainContent.find("#network-proxies-edit").get(0));
+ activateNetworkProxyFormValidation();
+ activateNetworkProxyEditTab();
+ mainContent.find("#network-proxy-btn-save").attr("disabled","true");
+ mainContent.find("#network-proxy-btn-save").button('toggle');
+ }
+
+ this.bulkSave=function(){
+ return getModifiedNetworkProxies().length>0;
+ }
+
+ getModifiedNetworkProxies=function(){
+ var prx = $.grep(self.networkProxies(),
+ function (networkProxy,i) {
+ return networkProxy.modified();
+ });
+ return prx;
+ }
+
+
+ updateModifiedNetworkProxies=function(){
+ var modifiedNetworkProxies = getModifiedNetworkProxies();
+
+ openDialogConfirm(function(){
+ for(var i=0;i<modifiedNetworkProxies.length;i++){
+ var viewModel = new NetworkProxyViewModel(modifiedNetworkProxies[i],true,self,false);
+ viewModel.save();
+ }
+ closeDialogConfirm();
+ },
+ $.i18n.prop('ok'),
+ $.i18n.prop('cancel'),
+ $.i18n.prop('networkproxy.bulk.save.confirm.title'),
+ $.i18n.prop('networkproxy.bulk.save.confirm',modifiedNetworkProxies.length));
+
+
+ }
+
+ updateNetworkProxy=function(networkProxy){
+ var viewModel = new NetworkProxyViewModel(networkProxy,true,self,false);
+ viewModel.save();
+ }
+
+ removeNetworkProxy=function(networkProxy){
+ openDialogConfirm(
+ function(){
+ $.ajax("restServices/archivaServices/networkProxyService/deleteNetworkProxy/"+encodeURIComponent(networkProxy.id()),
+ {
+ type: "get",
+ success: function(data) {
+ self.networkProxies.remove(networkProxy);
+ clearUserMessages();
+ displaySuccessMessage($.i18n.prop('networkproxy.deleted',networkProxy.id()));
+ activateNetworkProxiesGridTab();
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ },
+ complete: function(){
+ closeDialogConfirm();
+ }
+ }
+ )}, $.i18n.prop('ok'), $.i18n.prop('cancel'), $.i18n.prop('networkproxy.delete.confirm',networkProxy.id()),
+ $("#network-proxy-delete-warning-tmpl" ).tmpl(networkProxy));
+ }
+ }
+
+
+ displayNetworkProxies=function(){
+ screenChange();
+ var mainContent = $("#main-content");
+ mainContent.html(mediumSpinnerImg());
+
+
+
+ loadNetworkProxies( function(data) {
+ var networkProxiesViewModel = new NetworkProxiesViewModel();
+ mainContent.html($("#networkProxiesMain").tmpl());
+ mainContent.find("#network-proxies-view-tabs a:first").tab('show');
+
+ mainContent.find("#network-proxies-view-tabs").on('show', function (e) {
+ if ($(e.target).attr("href")=="#network-proxies-edit") {
+ var viewModel = new NetworkProxyViewModel(new NetworkProxy(),false,networkProxiesViewModel);
+ ko.applyBindings(viewModel,$("#main-content" ).find("#network-proxies-edit").get(0));
+ activateNetworkProxyFormValidation();
+ clearUserMessages();
+ }
+ if ($(e.target).attr("href")=="#network-proxies-view") {
+ $("#main-content" ).find("#network-proxies-view-tabs-li-edit a").html($.i18n.prop("add"));
+ clearUserMessages();
+ }
+
+ });
+ networkProxiesViewModel.networkProxies(mapNetworkProxies(data));
+ networkProxiesViewModel.gridViewModel = new ko.simpleGrid.viewModel({
+ data: networkProxiesViewModel.networkProxies,
+ columns: [
+ {
+ headerText: $.i18n.prop('identifier'),
+ rowText: "id"
+ },
+ {
+ headerText: $.i18n.prop('protocol'),
+ rowText: "protocol"
+ },
+ {
+ headerText: $.i18n.prop('host'),
+ rowText: "host"
+ },
+ {
+ headerText: $.i18n.prop('port'),
+ rowText: "port"
+ },
+ {
+ headerText: $.i18n.prop('username'),
+ rowText: "username"
+ }
+ ],
+ pageSize: 5,
+ gridUpdateCallBack: function(networkProxy){
+ $("#main-content" ).find("#networkProxiesTable [title]").tooltip();
+ }
+ });
+ ko.applyBindings(networkProxiesViewModel,$("#main-content" ).find("#network-proxies-view").get(0));
+ }
+ )
+ }
+
+ loadNetworkProxies=function(successCallbackFn, errorCallbackFn){
+ $.ajax("restServices/archivaServices/networkProxyService/getNetworkProxies", {
+ type: "GET",
+ dataType: 'json',
+ success: successCallbackFn,
+ error: errorCallbackFn
+ });
+ }
+
+ activateNetworkProxyFormValidation=function(){
+ var editForm=$("#main-content" ).find("#network-proxy-edit-form");
+ var validator = editForm.validate({
+ rules: {id: {
+ required: true,
+ remote: {
+ url: "restServices/archivaUiServices/dataValidatorService/networkProxyIdNotExists",
+ type: "get"
+ }
+ }},
+ showErrors: function(validator, errorMap, errorList) {
+ customShowError(editForm,validator,errorMap,errorMap);
+ }
+ });
+ validator.settings.messages["id"]=$.i18n.prop("id.required.or.alreadyexists");
+ }
+
+ activateNetworkProxiesGridTab=function(){
+ var mainContent = $("#main-content");
+ mainContent.find("#network-proxies-view-tabs-li-edit").removeClass("active");
+ mainContent.find("#network-proxies-edit").removeClass("active");
+
+ mainContent.find("#network-proxies-view-tabs-li-grid").addClass("active");
+ mainContent.find("#network-proxies-view").addClass("active");
+ mainContent.find("#network-proxies-view-tabs-li-edit a").html($.i18n.prop("add"));
+
+ }
+
+ activateNetworkProxyEditTab=function(){
+ var mainContent = $("#main-content");
+ mainContent.find("#network-proxies-view-tabs-li-grid").removeClass("active");
+ mainContent.find("#network-proxies-view").removeClass("active");
+
+ mainContent.find("#network-proxies-view-tabs-li-edit").addClass("active");
+ mainContent.find("#network-proxies-edit").addClass("active");
+ }
+
+ mapNetworkProxy=function(data){
+ if (data==null){
+ return null;
+ }
+ return new NetworkProxy(data.id,data.protocol,data.host,data.port,data.username,data.password,data.useNtlm);
+ }
+
+ mapNetworkProxies=function(data){
+ var mappedNetworkProxies = $.map(data, function(item) {
+ return mapNetworkProxy(item);
+ });
+ return mappedNetworkProxies;
+ }
+
+});
\ No newline at end of file
Propchange: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/networkproxies/main.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/legacy/main.js
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/legacy/main.js?rev=1486339&view=auto
==============================================================================
--- archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/legacy/main.js (added)
+++ archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/legacy/main.js Sat May 25 15:43:04 2013
@@ -0,0 +1,318 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define("archiva/admin/repository/legacy/main", ["jquery", 'i18n','knockout'],
+ function(jquery,i18n,ko) {
+
+ showMenu = function(administrationMenuItems) {
+ administrationMenuItems.push(
+ {
+ text: $.i18n.prop('menu.legacy-artifact-support'),
+ order:600,
+ id: "menu-legacy-support-list-a",
+ href: "#legacy",
+ redback: "{permissions: ['archiva-manage-configuration']}",
+ func: function() {
+ displayLegacyArtifactPathSupport();
+ }
+ });
+ };
+
+
+ //-------------------------
+ // legacy path part
+ //-------------------------
+
+ LegacyArtifactPath = function(path, groupId, artifactId, version, classifier, type, update) {
+ //private String path;
+ this.path = ko.observable(path);
+
+ /**
+ * The artifact reference, as " [groupId] :
+ * [artifactId] : [version] : [classifier] : [type] ".
+ */
+ //private String artifact;
+ //this.artifact=ko.observable(artifact);
+ this.update = update;
+ //private String groupId;
+ this.groupId = ko.observable(groupId);
+
+ //private String artifactId;
+ this.artifactId = ko.observable(artifactId);
+
+ //private String version;
+ this.version = ko.observable(version);
+
+ //private String classifier;
+ this.classifier = ko.observable(classifier);
+
+ //private String type;
+ this.type = ko.observable(type);
+
+ this.modified = ko.observable();
+
+ this.artifact = ko.computed(function() {
+ var artifactValue = "";
+ if (this.groupId()) {
+ artifactValue += this.groupId();
+ }
+ if (this.artifactId()) {
+ artifactValue += ":" + this.artifactId();
+ }
+ if (this.version()) {
+ artifactValue += ":" + this.version();
+ }
+ if (this.classifier()) {
+ artifactValue += ":" + this.classifier();
+ }
+ if (this.type()) {
+ artifactValue += ":" + this.type();
+ }
+ return artifactValue;
+ }, this);
+ };
+
+ mapLegacyArtifactPaths = function(data) {
+ if (data) {
+ return $.isArray(data) ? $.map(data, function(item) {
+ return mapLegacyArtifactPath(item);
+ }) : [mapLegacyArtifactPath(data)];
+ }
+ return [];
+ };
+
+ mapLegacyArtifactPath = function(data) {
+ return data ? new LegacyArtifactPath(data.path, data.groupId, data.artifactId, data.version, data.classifier, data.type) : null;
+ };
+
+ activateLegacyArtifactPathFormValidation = function() {
+ var theForm = $("#main-content").find("#legacy-artifact-paths-edit-form");
+ var validator = theForm.validate({
+ showErrors: function(validator, errorMap, errorList) {
+ customShowError("#main-content #legacy-artifact-paths-edit-form", validator, errorMap, errorMap);
+ }
+ });
+ };
+
+ LegacyArtifactPathViewModel = function(legacyArtifactPath, update, legacyArtifactPathsViewModel) {
+ var self = this;
+ this.update = update;
+ this.legacyArtifactPath = legacyArtifactPath;
+ this.legacyArtifactPathsViewModel = legacyArtifactPathsViewModel;
+
+ this.display = function() {
+ var mainContent = $("#main-content");
+ ko.applyBindings(self, mainContent.find("#legacy-artifact-paths-edit").get(0));
+ mainContent.find("#legacy-artifact-paths-view-tabs-li-edit a").html($.i18n.prop("edit"));
+ activateLegacyArtifactPathFormValidation();
+ activateLegacyArtifactPathsEditTab();
+ };
+
+ displayGrid = function() {
+ activateLegacyArtifactPathsGridTab();
+ };
+
+ calculatePath = function() {
+ var path = "";
+ if (self.legacyArtifactPath.groupId()) {
+ path += self.legacyArtifactPath.groupId() + "/jars/";
+ }
+ if (self.legacyArtifactPath.artifactId()) {
+ path += self.legacyArtifactPath.artifactId();
+ }
+ if (self.legacyArtifactPath.version()) {
+ path += "-" + self.legacyArtifactPath.version();
+ }
+ if (self.legacyArtifactPath.classifier()) {
+ path += "-" + self.legacyArtifactPath.classifier();
+ }
+ if (self.legacyArtifactPath.type()) {
+ path += "." + self.legacyArtifactPath.type();
+ }
+ self.legacyArtifactPath.path(path);
+ };
+
+ this.save = function() {
+ var theForm = $("#main-content").find("#legacy-artifact-paths-edit-form");
+ if (!theForm.valid()) {
+ return;
+ }
+ // do that on server side
+ /*if (theForm.find("#artifact" ).val()
+ !=theForm.find("#path" ).val()){
+ var errorList=[{
+ message: $.i18n.prop("path must match artifact"),
+ element: theForm.find("#path" ).get(0)
+ }];
+ customShowError("#main-content #legacy-artifact-paths-edit-form", null, null, errorList);
+ return;
+ }*/
+ // TODO call id exists if add ?
+ clearUserMessages();
+ $.log("save ok");
+ if (self.update) {
+ $.log("update");
+ } else {
+ $.ajax("restServices/archivaServices/archivaAdministrationService/addLegacyArtifactPath",
+ {
+ type: "POST",
+ contentType: 'application/json',
+ data: ko.toJSON(self.legacyArtifactPath),
+ dataType: 'json',
+ success: function(data) {
+ self.legacyArtifactPath.modified(false);
+ self.legacyArtifactPathsViewModel.legacyArtifactPaths.push(self.legacyArtifactPath);
+ displaySuccessMessage($.i18n.prop('legacy-artifact-path.added', self.legacyArtifactPath.path()));
+ activateLegacyArtifactPathsGridTab();
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ }
+ }
+ );
+ }
+ };
+ };
+
+ LegacyArtifactPathsViewModel = function() {
+ var self = this;
+ this.legacyArtifactPaths = ko.observableArray([]);
+
+ this.gridViewModel = new ko.simpleGrid.viewModel({
+ data: self.legacyArtifactPaths,
+ columns: [
+ {
+ headerText: $.i18n.prop('legacy-artifact-paths.path'),
+ rowText: "path"
+ },
+ {
+ headerText: $.i18n.prop('legacy-artifact-paths.artifact'),
+ rowText: "artifact"
+ }
+ ],
+ pageSize: 5,
+ gridUpdateCallBack: function(networkProxy) {
+ $("#main-content").find("#legacy-artifact-paths-table").find("[title]").tooltip();
+ }
+ });
+
+
+ editLegacyArtifactPath = function(legacyArtifactPath) {
+ var legacyArtifactPathViewModel = new LegacyArtifactPathViewModel(legacyArtifactPath, true);
+ legacyArtifactPathViewModel.display();
+ };
+
+ removeLegacyArtifactPath = function(legacyArtifactPath) {
+
+ openDialogConfirm(
+ function() {
+
+ $.ajax("restServices/archivaServices/archivaAdministrationService/deleteLegacyArtifactPath?path=" + encodeURIComponent(legacyArtifactPath.path()),
+ {
+ type: "GET",
+ dataType: 'json',
+ success: function(data) {
+ self.legacyArtifactPaths.remove(legacyArtifactPath);
+ displaySuccessMessage($.i18n.prop('legacy-artifact-path.removed', legacyArtifactPath.path()));
+ activateLegacyArtifactPathsGridTab();
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ },
+ complete: function() {
+ closeDialogConfirm();
+ }
+ }
+ );
+ }, $.i18n.prop('ok'), $.i18n.prop('cancel'), $.i18n.prop('legacy-artifact-path.delete.confirm', legacyArtifactPath.path()),
+ $("#legacy-artifact-path-delete-warning-tmpl").tmpl(legacyArtifactPath));
+
+ };
+
+ updateLegacyArtifactPath = function(legacyArtifactPath) {
+
+ };
+
+ };
+
+ displayLegacyArtifactPathSupport = function() {
+ screenChange();
+ var mainContent = $("#main-content");
+ mainContent.html(mediumSpinnerImg());
+
+ $.ajax("restServices/archivaServices/archivaAdministrationService/getLegacyArtifactPaths", {
+ type: "GET",
+ dataType: 'json',
+ success: function(data) {
+ mainContent.html($("#legacy-artifact-path-main").tmpl());
+ var legacyArtifactPathsViewModel = new LegacyArtifactPathsViewModel();
+ var legacyPaths = mapLegacyArtifactPaths(data);
+ $.log("legacyPaths:" + legacyPaths.length);
+ legacyArtifactPathsViewModel.legacyArtifactPaths(legacyPaths);
+ ko.applyBindings(legacyArtifactPathsViewModel, mainContent.find("#legacy-artifact-paths-view").get(0));
+
+ mainContent.find("#legacy-artifact-paths-view-tabs").on('show', function(e) {
+ if ($(e.target).attr("href") == "#legacy-artifact-paths-edit") {
+ var viewModel = new LegacyArtifactPathViewModel(new LegacyArtifactPath(), false, legacyArtifactPathsViewModel);
+ viewModel.display();
+ activateLegacyArtifactPathFormValidation();
+ clearUserMessages();
+ }
+ if ($(e.target).attr("href") == "#legacy-artifact-paths-view") {
+ mainContent.find("#legacy-artifact-paths-view-tabs-li-edit a").html($.i18n.prop("add"));
+ clearUserMessages();
+ }
+
+ });
+
+
+ activateLegacyArtifactPathsGridTab();
+ }
+ });
+
+
+ };
+
+
+ activateLegacyArtifactPathsGridTab = function() {
+ var mainContent = $("#main-content");
+ mainContent.find("#legacy-artifact-paths-view-tabs-li-edit").removeClass("active");
+ mainContent.find("#legacy-artifact-paths-edit").removeClass("active");
+
+ mainContent.find("#legacy-artifact-paths-view-tabs-li-grid").addClass("active");
+ mainContent.find("#legacy-artifact-paths-view").addClass("active");
+ mainContent.find("#legacy-artifact-paths-view-tabs-li-edit a").html($.i18n.prop("add"));
+
+ };
+
+ activateLegacyArtifactPathsEditTab = function() {
+ var mainContent = $("#main-content");
+ mainContent.find("#legacy-artifact-paths-view-tabs-li-grid").removeClass("active");
+ mainContent.find("#legacy-artifact-paths-view").removeClass("active");
+
+ mainContent.find("#legacy-artifact-paths-view-tabs-li-edit").addClass("active");
+ mainContent.find("#legacy-artifact-paths-edit").addClass("active");
+ };
+
+
+
+
+ }
+);
Propchange: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/legacy/main.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/main.js
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/main.js?rev=1486339&view=auto
==============================================================================
--- archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/main.js (added)
+++ archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/main.js Sat May 25 15:43:04 2013
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define("archiva/admin/repository/maven2/main",["jquery",'i18n',"archiva/admin/repository/maven2/repository-groups","archiva/admin/repository/maven2/proxy-connectors-rules","archiva/admin/repository/maven2/proxy-connectors"],
+ function() {
+ showMenu = function(administrationMenuItems) {
+ administrationMenuItems.push(
+ {text: $.i18n.prop('menu.repository.groups'),
+ order:500,
+ id: "menu-repository-groups-list-a",
+ href: "#repositorygroup",
+ redback: "{permissions: ['archiva-manage-configuration']}",
+ func: function() {
+ displayRepositoryGroups();
+ }
+ });
+ administrationMenuItems.push({text: $.i18n.prop('menu.repositories'), order:510, id: "menu-repositories-list-a", href: "#repositorylist", redback: "{permissions: ['archiva-manage-configuration']}", func: function() {
+ displayRepositoriesGrid();
+ }});
+ administrationMenuItems.push({text: $.i18n.prop('menu.proxy-connectors'), order:520, id: "menu-proxy-connectors-list-a", href: "#proxyconnectors", redback: "{permissions: ['archiva-manage-configuration']}", func: function() {
+ displayProxyConnectors();
+ }});
+ administrationMenuItems.push({text: $.i18n.prop('menu.proxy-connectors-rules'), order:530, id: "menu.proxy-connectors-rules-list-a", href: "#proxyconnectorsrules", redback: "{permissions: ['archiva-manage-configuration']}", func: function() {
+ displayProxyConnectorsRules();
+ }});
+
+ };
+ }
+
+);
\ No newline at end of file
Propchange: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/main.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors-rules.js
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors-rules.js?rev=1486339&view=auto
==============================================================================
--- archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors-rules.js (added)
+++ archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors-rules.js Sat May 25 15:43:04 2013
@@ -0,0 +1,376 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define("archiva/admin/repository/maven2/proxy-connectors-rules",["jquery","i18n","jquery.tmpl","bootstrap","jquery.ui","knockout"
+ ,"knockout.simpleGrid","knockout.sortable","archiva/admin/repository/maven2/proxy-connectors"],
+ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryUi,ko) {
+
+ ProxyConnectorRulesViewModel=function(proxyConnectorRules,proxyConnectors){
+ var self=this;
+ self.proxyConnectorRules=ko.observableArray(proxyConnectorRules?proxyConnectorRules:[]);
+ self.proxyConnectors=ko.observableArray(proxyConnectors);
+ self.proxyConnectors.id="select";
+
+ // FIXME get that from a REST service
+ // FIXME i18n
+ this.ruleTypes=[new RuleType("BLACK_LIST","Black list","images/red-22-22.png"),new RuleType("WHITE_LIST","White list","images/green-22-22.png")];
+
+ this.findRuleType=function(proxyConnectorRule){
+ var ruleType;
+ $.each(self.ruleTypes, function(index, value) {
+ if(value.type==proxyConnectorRule.proxyConnectorRuleType()){
+ ruleType=value;
+ }
+ });
+ return ruleType;
+ }
+
+ this.findProxyConnector=function(sourceRepoId,targetRepoId){
+ for(var i=0;i<self.proxyConnectors().length;i++){
+ var proxyConnector=self.proxyConnectors()[i];
+ if(proxyConnector.sourceRepoId()==sourceRepoId && proxyConnector.targetRepoId()==targetRepoId){
+ return proxyConnector;
+ }
+ }
+ }
+
+ this.displayGrid=function(){
+ var mainContent = $("#main-content");
+
+ $.each(self.proxyConnectorRules(), function(index, value) {
+ value.ruleType=self.findRuleType(value);
+ });
+
+ this.gridViewModel = new ko.simpleGrid.viewModel({
+ data: self.proxyConnectorRules,
+ pageSize: 5,
+ gridUpdateCallBack: function(){
+ //$("#main-content" ).find("#proxy-connectors-rules-view-tabsTable" ).find("[title]").tooltip();
+ }
+ });
+
+ ko.applyBindings(self,mainContent.find("#proxy-connector-rules-view").get(0));
+
+ removeSmallSpinnerImg(mainContent);
+
+ mainContent.find("#proxy-connectors-rules-view-tabs").on('show', function (e) {
+ $.log("on show:"+$(e.target).attr("href"));
+ if ($(e.target).attr("href")=="#proxy-connector-rules-edit") {
+ var proxyConnectorRuleViewModel = new ProxyConnectorRuleViewModel(new ProxyConnectorRule(),self,false);
+ ko.applyBindings(proxyConnectorRuleViewModel,mainContent.find("#proxy-connector-rules-edit" ).get(0));
+ activateProxyConnectorRulesEditTab();
+ }
+ });
+ }
+ addProxyConnectorRule=function(proxyConnectorRule){
+ $("#proxy-connector-rule-add-btn" ).button("loading");
+ $.log("addProxyConnectorRule");
+ self.saveProxyConnectorRule(proxyConnectorRule,"restServices/archivaServices/proxyConnectorRuleService/proxyConnectorRule",true,
+ function(){
+ $("#proxy-connector-rule-add-btn" ).button("reset");
+ });
+ }
+
+ this.saveProxyConnectorRule=function(proxyConnectorRule,url,add,completeFnCallback){
+ $.log("saveProxyConnectorRule:"+url);
+ var userMessages=$("#user-messages");
+ userMessages.html(mediumSpinnerImg());
+ $.ajax(url,
+ {
+ type: "POST",
+ contentType: 'application/json',
+ data: ko.toJSON(proxyConnectorRule),
+ dataType: 'json',
+ success: function(data) {
+ $.log("save proxyConnectorRule pattern:"+proxyConnectorRule.pattern());
+ var message=$.i18n.prop(add?'proxy-connector-rule.added':'proxy-connector-rule.updated',proxyConnectorRule.pattern());
+ displaySuccessMessage(message);
+ proxyConnectorRule.modified(false);
+ if(add){
+ // add rule type for image
+ proxyConnectorRule.ruleType=self.findRuleType(proxyConnectorRule);
+ self.proxyConnectorRules.push(proxyConnectorRule);
+ }
+ activateProxyConnectorRulesGridTab();
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ },
+ complete:function(data){
+ removeMediumSpinnerImg(userMessages);
+ if(completeFnCallback){
+ completeFnCallback();
+ }
+ }
+ }
+ );
+ }
+
+ updateProxyConnectorRule=function(proxyConnectorRule){
+ $.log("updateProxyConnectorRule");
+ $("#main-content" ).find("#proxy-connectors-rules-edit-div").find("#proxy-connector-rule-update-btn").button("loading");
+ self.saveProxyConnectorRule(proxyConnectorRule,"restServices/archivaServices/proxyConnectorRuleService/updateProxyConnectorRule",
+ false,
+ function(){
+ $("#proxy-connector-rule-update-btn" ).button("reset");
+ }
+ );
+ }
+
+ this.deleteProxyConnectorRule=function(proxyConnectorRule){
+ $("#main-content" ).find("proxy-connectors-rules-view-tabsTable").find(".btn").button("loading");
+ var userMessages=$("#user-messages");
+ userMessages.html(mediumSpinnerImg());
+ $.ajax("restServices/archivaServices/proxyConnectorRuleService/deleteProxyConnectorRule",
+ {
+ type:"POST",
+ contentType: 'application/json',
+ data: ko.toJSON(proxyConnectorRule),
+ dataType: 'json',
+ success:function(data){
+ var message=$.i18n.prop('proxy-connector-rule.deleted',proxyConnectorRule.pattern());
+ self.proxyConnectorRules.remove(proxyConnectorRule);
+ displaySuccessMessage(message);
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ },
+ complete:function(data){
+ removeMediumSpinnerImg(userMessages);
+ $("#main-content" ).find("proxy-connectors-rules-view-tabsTable").find(".btn").button("reset");
+ }
+ }
+ );
+ }
+
+ removeProxyConnectorRule=function(proxyConnectorRule){
+
+ openDialogConfirm(
+ function(){self.deleteProxyConnectorRule(proxyConnectorRule);window.modalConfirmDialog.modal('hide')},
+ $.i18n.prop('ok'), $.i18n.prop('cancel'),
+ $.i18n.prop('proxy-connector-rule.delete.confirm',proxyConnectorRule.pattern()),"");
+
+ }
+
+ editProxyConnectorRule=function(proxyConnectorRule){
+ var proxyConnectorRuleViewModel=new ProxyConnectorRuleViewModel(proxyConnectorRule,self,true);
+ ko.applyBindings(proxyConnectorRuleViewModel,$("#main-content").find("#proxy-connector-rules-edit" ).get(0));
+ activateProxyConnectorRulesEditTab();
+ proxyConnectorRuleViewModel.activateRemoveChoosen(self);
+ proxyConnectorRuleViewModel.activateRemoveAvailable(self);
+ }
+
+ remove=function(){
+ $.log("remove");
+ }
+
+ }
+
+ ProxyConnectorRuleViewModel=function(proxyConnectorRule,proxyConnectorRulesViewModel,update){
+ var self=this;
+ this.proxyConnectorRule=proxyConnectorRule;
+ this.proxyConnectorRulesViewModel=proxyConnectorRulesViewModel;
+ this.availableProxyConnectors=ko.observableArray([]);
+ this.availableProxyConnectors.id="availableProxyConnectors";
+ this.update=update;
+
+ $.each(this.proxyConnectorRulesViewModel.proxyConnectors(), function(idx, value) {
+ //$.log(idx + ': ' + value.sourceRepoId() +":"+value.targetRepoId());
+ var available=true;
+ // is it in proxyConnectorRule.proxyConnectors
+ $.each(self.proxyConnectorRule.proxyConnectors(),function(index,proxyConnector){
+ if(value.sourceRepoId()==proxyConnector.sourceRepoId() && value.targetRepoId()==proxyConnector.targetRepoId()){
+ available=false;
+ }
+ });
+ if(available==true){
+ self.availableProxyConnectors.push(value);
+ }
+ });
+
+ proxyConnectorMoved=function(arg){
+ $.log("repositoryMoved:"+arg.sourceIndex+" to " + arg.targetIndex);
+ self.proxyConnectorRule.modified(true);
+ self.activateRemoveChoosen(self.proxyConnectorRulesViewModel);
+ self.activateRemoveAvailable(self.proxyConnectorRulesViewModel);
+ }
+
+ saveProxyConnectorRule=function(){
+ self.proxyConnectorRulesViewModel.saveProxyConnectorRule(self.proxyConnectorRule)
+ }
+
+ this.removeChoosen=function(proxyConnectorRulesViewModel,sourceRepoId,targetRepoId){
+ $.log("removeChoosen:"+sourceRepoId+":"+targetRepoId);
+
+ $.log("size before:"+self.proxyConnectorRule.proxyConnectors().length);
+ var proxyConnectorToRemove=null;
+ for(var i=0;i<self.proxyConnectorRule.proxyConnectors().length;i++){
+ if(self.proxyConnectorRule.proxyConnectors()[i].sourceRepoId()==sourceRepoId &&
+ self.proxyConnectorRule.proxyConnectors()[i].targetRepoId()==targetRepoId){
+ proxyConnectorToRemove=self.proxyConnectorRule.proxyConnectors()[i];
+ }
+ }
+ self.proxyConnectorRule.proxyConnectors.remove(proxyConnectorToRemove);
+ self.availableProxyConnectors.push(proxyConnectorToRemove);
+ $.log("size after:"+self.proxyConnectorRule.proxyConnectors().length);
+ var mainContent=$("#main-content");
+ mainContent.find("#proxy-connectors-rules-available-proxy-connectors" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).on("click", function(){
+ self.removeAvailable(proxyConnectorRulesViewModel,$(this).attr("data-source-repoId"),$(this).attr("data-target-repoId"));
+ });
+ mainContent.find("#proxy-connectors-rules-edit-order-div" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).off("click");
+ }
+
+ this.activateRemoveChoosen=function(proxyConnectorRulesViewModel){
+ $("#main-content" ).find("#proxy-connectors-rules-edit-order-div" ).find(".icon-minus-sign" ).on("click", function(){
+ self.removeChoosen(proxyConnectorRulesViewModel,$(this).attr("data-source-repoId"),$(this).attr("data-target-repoId"));
+ });
+ }
+
+ this.removeAvailable=function(proxyConnectorRulesViewModel,sourceRepoId,targetRepoId){
+ $.log("removeAvailable:"+sourceRepoId+":"+targetRepoId);
+
+ $.log("size before:"+self.availableProxyConnectors().length);
+ var proxyConnectorToAdd=null;
+ for(var i=0;i<self.availableProxyConnectors().length;i++){
+ if(self.availableProxyConnectors()[i].sourceRepoId()==sourceRepoId &&
+ self.availableProxyConnectors()[i].targetRepoId()==targetRepoId){
+ $.log("found");
+ proxyConnectorToAdd=self.availableProxyConnectors()[i];
+ }
+ }
+ self.proxyConnectorRule.proxyConnectors.push(proxyConnectorToAdd);
+ self.availableProxyConnectors.remove(proxyConnectorToAdd);
+ $.log("size after:"+self.availableProxyConnectors().length);
+ var mainContent=$("#main-content");
+ mainContent.find("#proxy-connectors-rules-edit-order-div" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).on("click", function(){
+ self.removeChoosen(proxyConnectorRulesViewModel,$(this).attr("data-source-repoId"),$(this).attr("data-target-repoId"));
+ });
+ mainContent.find("#proxy-connectors-rules-available-proxy-connectors" ).find("[data-source-repoId="+sourceRepoId+"][data-target-repoId="+targetRepoId+"]" ).off("click");
+ }
+
+ this.activateRemoveAvailable=function(proxyConnectorRulesViewModel){
+ $("#main-content" ).find("#proxy-connectors-rules-available-proxy-connectors" ).find(".icon-plus-sign" ).on("click", function(){
+ self.removeAvailable(proxyConnectorRulesViewModel,$(this).attr("data-source-repoId"),$(this).attr("data-target-repoId"));
+ });
+ }
+
+ }
+
+
+ displayProxyConnectorsRules=function(){
+ $.log("displayProxyConnectorsRules");
+ screenChange();
+ var mainContent = $("#main-content");
+ mainContent.html($("#proxyConnectorsRulesMain").tmpl());
+ var userMessages=$("#user-messages");
+ userMessages.html(mediumSpinnerImg());
+ loadAllProxyConnectors(function(data){
+ var proxyConnectors = mapProxyConnectors(data);
+
+ $.ajax("restServices/archivaServices/proxyConnectorRuleService/proxyConnectorRules", {
+ type: "GET",
+ dataType: 'json',
+ success: function (data){
+ var proxyConnectorRules=mapProxyConnectorRules(data);
+ var proxyConnectorRulesViewModel = new ProxyConnectorRulesViewModel(proxyConnectorRules,proxyConnectors);
+ proxyConnectorRulesViewModel.displayGrid();
+ activateProxyConnectorRulesGridTab();
+ },
+ complete: function(data){
+ removeMediumSpinnerImg(userMessages);
+ }
+
+ });
+
+ });
+ }
+
+ ProxyConnectorRule=function(pattern,proxyConnectorRuleType,proxyConnectors){
+ //private String pattern;
+ var self=this;
+
+ this.modified=ko.observable(false);
+
+ //private String sourceRepoId;
+ this.pattern=ko.observable(pattern);
+ this.pattern.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ this.ruleType=null;
+
+ //private ProxyConnectorRuleType proxyConnectorRuleType;
+ this.proxyConnectorRuleType=ko.observable(proxyConnectorRuleType);
+ this.proxyConnectorRuleType.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ //private List<ProxyConnector> proxyConnectors;
+ this.proxyConnectors=ko.observableArray(proxyConnectors?proxyConnectors:[]);
+ this.proxyConnectors.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ this.ruleType=null;
+ }
+
+ mapProxyConnectorRule=function(data){
+ if (data==null){
+ return null;
+ }
+ return new ProxyConnectorRule(data.pattern, data.proxyConnectorRuleType, mapProxyConnectors(data.proxyConnectors));
+ }
+
+ mapProxyConnectorRules=function(data){
+ var mappedProxyConnectorRules = $.map(data, function(item) {
+ return mapProxyConnectorRule(item);
+ });
+ return mappedProxyConnectorRules;
+ }
+
+
+ activateProxyConnectorRulesGridTab=function(){
+ var mainContent = $("#main-content");
+ mainContent.find("#proxy-connectors-rules-view-tabs-content div[class*='tab-pane']").removeClass("active");
+ mainContent.find("#proxy-connectors-rules-view-tabs li").removeClass("active");
+
+ mainContent.find("#proxy-connector-rules-view").addClass("active");
+ mainContent.find("#proxy-connectors-rules-view-tabs-li-grid").addClass("active");
+ mainContent.find("#proxy-connectors-rules-view-tabs-a-edit").html($.i18n.prop("add"));
+
+ }
+
+ activateProxyConnectorRulesEditTab=function(){
+ var mainContent = $("#main-content");
+
+ mainContent.find("#proxy-connectors-rules-view-tabs-content div[class*='tab-pane']").removeClass("active");
+ mainContent.find("#proxy-connectors-rules-view-tabs > li").removeClass("active");
+
+ mainContent.find("#proxy-connector-rules-edit").addClass("active");
+ mainContent.find("#proxy-connectors-rules-view-tabs-edit").addClass("active");
+ }
+
+ RuleType=function(type,label,image){
+ this.type=type;
+ this.label=label;
+ this.image=image;
+ }
+
+});
Propchange: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors-rules.js
------------------------------------------------------------------------------
svn:eol-style = native
Added: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors.js
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors.js?rev=1486339&view=auto
==============================================================================
--- archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors.js (added)
+++ archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors.js Sat May 25 15:43:04 2013
@@ -0,0 +1,673 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+define("archiva/admin/repository/maven2/proxy-connectors",["jquery","i18n","jquery.tmpl","bootstrap","jquery.validate","knockout"
+ ,"knockout.simpleGrid","knockout.sortable","select2"],
+ function(jquery,i18n,jqueryTmpl,bootstrap,jqueryValidate,ko) {
+
+ ProxyConnector=function(sourceRepoId,targetRepoId,proxyId,blackListPatterns,whiteListPatterns,policiesEntries,propertiesEntries,
+ disabled,order){
+ var self=this;
+
+ this.modified=ko.observable(false);
+
+ //private String sourceRepoId;
+ this.sourceRepoId=ko.observable(sourceRepoId);
+ this.sourceRepoId.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ //private String targetRepoId;
+ this.targetRepoId=ko.observable(targetRepoId);
+ this.targetRepoId.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ this.previousProxyId=proxyId;
+
+ //private String proxyId;
+ this.proxyId=ko.observable(proxyId);
+ this.proxyId.subscribe(function(newValue){
+ if(newValue!=self.previousProxyId){
+ $.log("proxyId modified:"+newValue+",previous:"+self.previousProxyId);
+ self.previousProxyId=newValue;
+ self.modified(true);
+ }
+ });
+
+ //private List<String> blackListPatterns;
+ this.blackListPatterns=ko.observableArray(blackListPatterns==null?[]:blackListPatterns);
+ this.blackListPatterns.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ //private List<String> whiteListPatterns;
+ this.whiteListPatterns=ko.observableArray(whiteListPatterns==null?[]:whiteListPatterns);
+ this.whiteListPatterns.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ //private List<PropertyEntry> policiesEntries;
+ this.policiesEntries=ko.observableArray(policiesEntries==null?new Array():policiesEntries);
+ this.policiesEntries.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ //private List<PropertyEntry> properties;
+ this.propertiesEntries=ko.observableArray(propertiesEntries==null?new Array():propertiesEntries);
+ this.propertiesEntries.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ //private boolean disabled = false;
+ this.disabled=ko.observable(disabled);
+ this.disabled.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+ //private int order = 0;
+ this.order=ko.observable(order?order:0);
+ this.order.subscribe(function(newValue){
+ self.modified(true);
+ });
+
+
+
+ this.updatePolicyEntry=function(key,value){
+ $.log("updatePolicyEntry:"+key+":"+value);
+ var found=false;
+ for(var i=0;i<self.policiesEntries().length;i++){
+ if (self.policiesEntries()[i].key==key){
+ self.policiesEntries()[i].value=value;
+ found=true;
+ self.modified(true);
+ }
+ }
+ if(!found){
+ self.policiesEntries().push(new Entry(key,value));
+ }
+ }
+
+ }
+
+ PolicyInformation=function(options,defaultOption,id,name){
+
+ var self=this;
+ this.modified=ko.observable(false);
+
+ //private List<String> options;
+ this.options=ko.observableArray(options);
+ this.options.subscribe(function(newValue){self.modified(true)});
+
+ //private String defaultOption;
+ this.defaultOption=ko.observable(defaultOption);
+ this.defaultOption.subscribe(function(newValue){self.modified(true)});
+
+ //private String id;
+ this.id=ko.observable(id);
+ this.id.subscribe(function(newValue){self.modified(true)});
+
+ //private String name;
+ this.name=ko.observable(name);
+ this.name.subscribe(function(newValue){self.modified(true)});
+
+ }
+
+ ProxyConnectorViewModel=function(proxyConnector,update,proxyConnectorsViewModel){
+ var self=this;
+ this.proxyConnector=proxyConnector;
+ this.proxyConnectorsViewModel=proxyConnectorsViewModel;
+ this.update=update;
+ this.modified=ko.observable(false);
+
+ isUpdate=function(){
+ return self.update;
+ }
+
+ getSelectedPolicyOption=function(id){
+ var policiesEntries=self.proxyConnector.policiesEntries();
+ if (policiesEntries!=null){
+ for (i=0;i<policiesEntries.length;i++){
+ var curKey = $.isFunction(policiesEntries[i].key)? policiesEntries[i].key():policiesEntries[i].key;
+ if (id==curKey){
+ return $.isFunction(policiesEntries[i].value)? policiesEntries[i].value():policiesEntries[i].value;
+ }
+ }
+ }
+ return "";
+ }
+
+ changePolicyOption=function(id){
+ var selectedOption=$("#main-content").find("#policy-"+id ).find("option:selected");
+ if (selectedOption.length>0){
+ var value = selectedOption.val();
+ $.log("changePolicyOption:"+id+":"+value);
+ self.proxyConnector.updatePolicyEntry(id,value);
+
+ }
+ }
+
+
+ getPolicyOptions=function(id){
+ var policyInformations=self.proxyConnectorsViewModel.policyInformations();
+ for(var i=0;i<policyInformations.length;i++){
+ if (policyInformations[i].id()==id){
+ return policyInformations[i].options();
+ }
+ }
+ }
+
+
+
+ addBlacklistPattern=function(){
+ var pattern = $("#main-content").find("#blacklist-value").val();
+ var tab = self.proxyConnector.blackListPatterns();
+ tab.push(pattern);
+ self.proxyConnector.blackListPatterns(tab);
+ self.proxyConnector.modified(true);
+ }
+
+ removeBlacklistPattern=function(pattern){
+ self.proxyConnector.blackListPatterns.remove(pattern);
+ self.proxyConnector.modified(true);
+ }
+
+ addWhitelistPattern=function(){
+ var pattern = $("#main-content" ).find("#whitelist-value").val();
+ var tab = self.proxyConnector.whiteListPatterns();
+ tab.push(pattern);
+ self.proxyConnector.whiteListPatterns(tab);
+ self.proxyConnector.modified(true);
+
+ }
+
+ removeWhitelistPattern=function(pattern){
+ self.proxyConnector.whiteListPatterns.remove(pattern);
+ self.proxyConnector.modified(true);
+ }
+
+ this.save=function(){
+ //FIXME data controls !!!
+ clearUserMessages();
+ var userMessages=$("#user-messages");
+ userMessages.html(mediumSpinnerImg());
+ $("#proxy-connector-btn-save" ).button("loading");
+ // update is delete then add
+ if (this.update){
+ $.ajax("restServices/archivaServices/proxyConnectorService/updateProxyConnector",
+ {
+ type: "POST",
+ data: ko.toJSON(self.proxyConnector),
+ contentType: 'application/json',
+ dataType: 'json',
+ success: function(data) {
+ displaySuccessMessage($.i18n.prop('proxyconnector.updated'));
+ activateProxyConnectorsGridTab();
+ self.proxyConnector.modified(false);
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ },
+ complete: function(){
+ removeMediumSpinnerImg(userMessages);
+ $("#proxy-connector-btn-save" ).button("reset");
+ }
+ }
+ );
+ } else {
+
+ $.ajax("restServices/archivaServices/proxyConnectorService/addProxyConnector",
+ {
+ type: "POST",
+ data: ko.toJSON(self.proxyConnector),
+ contentType: 'application/json',
+ dataType: 'json',
+ success: function(data) {
+ displaySuccessMessage($.i18n.prop('proxyconnector.added'));
+ activateProxyConnectorsGridTab();
+ self.proxyConnector.modified(false);
+ self.proxyConnectorsViewModel.proxyConnectors.push(self.proxyConnector);
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ },
+ complete: function(){
+ removeMediumSpinnerImg(userMessages);
+ $("#proxy-connector-btn-save" ).button("reset");
+ }
+ }
+ );
+ }
+ }
+
+ this.deleteProperty=function(key){
+ for(var i=0;i<self.proxyConnector.propertiesEntries().length;i++){
+ var entry=self.proxyConnector.propertiesEntries()[i];
+ if (entry.key()==key()){
+ self.proxyConnector.propertiesEntries.remove(entry);
+ self.proxyConnector.modified(true);
+ }
+ }
+
+ }
+
+ this.addProperty=function(){
+ var mainContent=$("#main-content");
+ var key=mainContent.find("#property-key").val();
+ var value=mainContent.find("#property-value").val();
+ var oldTab = self.proxyConnector.propertiesEntries();
+ oldTab.push(new Entry(key,value));
+ self.proxyConnector.propertiesEntries(oldTab);
+ mainContent.find("#property-key").val("");
+ mainContent.find("#property-value").val("");
+ self.proxyConnector.modified(true);
+ }
+
+ displayGrid=function(){
+ activateProxyConnectorsGridTab();
+ }
+ }
+
+ ProxyConnectorsViewModel=function(){
+ var self=this;
+ this.proxyConnectors=ko.observableArray([]);
+ this.proxyConnectors.subscribe(function(newValue){
+ $.log("ProxyConnectorsViewModel#proxyConnectors modified");
+ self.proxyConnectors().sort(function(a,b){
+ if ( a.sourceRepoId()== b.sourceRepoId()) return a.order() - b.order();
+ return (a.sourceRepoId() > b.sourceRepoId())? -1:1;
+ });
+ });
+ this.policyInformations=ko.observableArray([]);
+ this.managedRepositories=ko.observableArray([]);
+ this.remoteRepositories=ko.observableArray([]);
+ this.networkProxies=ko.observableArray([]);
+
+ this.bulkSave=function(){
+ return getModifiedProxyConnectors().length>0;
+ }
+
+ getModifiedProxyConnectors=function(){
+ var prx = $.grep(self.proxyConnectors(),
+ function (proxyConnector,i) {
+ return proxyConnector.modified();
+ });
+ return prx;
+ }
+
+ this.updateModifiedProxyConnectors=function(){
+ var modifiedProxyConnectors = getModifiedProxyConnectors();
+
+ openDialogConfirm(function(){
+ for(var i=0;i<modifiedProxyConnectors.length;i++){
+ var viewModel = new ProxyConnectorViewModel(modifiedProxyConnectors[i],true,self,false);
+ viewModel.save();
+ }
+ closeDialogConfirm();
+ },
+ $.i18n.prop('ok'),
+ $.i18n.prop('cancel'),
+ $.i18n.prop('proxy-connectors.bulk.save.confirm.title'),
+ $.i18n.prop('proxy.connector.bulk.save.confirm',modifiedProxyConnectors.length));
+ }
+
+ updateProxyConnector=function(proxyConnector){
+ var viewModel = new ProxyConnectorViewModel(proxyConnector,true,self,false);
+ viewModel.save();
+ }
+
+ editProxyConnector=function(proxyConnector){
+ var proxyConnectorViewModel=new ProxyConnectorViewModel(proxyConnector,true,self);
+ var mainContent = $("#main-content");
+ mainContent.find("#proxy-connectors-edit").html($("#proxy-connector-edit-form-tmpl").tmpl());
+ ko.applyBindings(proxyConnectorViewModel,mainContent.find("#proxy-connectors-edit").get(0));
+ activateProxyConnectorsEditTab();
+ mainContent.find("#proxy-connectors-view-tabs-li-edit a").html($.i18n.prop("edit"));
+ }
+
+ deleteProxyConnector=function(proxyConnector){
+
+ openDialogConfirm(
+ function(){
+ clearUserMessages();
+ removeProxyConnector(proxyConnector,function(){
+ displaySuccessMessage($.i18n.prop('proxyconnector.removed'));
+ self.proxyConnectors.remove(proxyConnector);
+ closeDialogConfirm();
+ })}, $.i18n.prop('ok'), $.i18n.prop('cancel'), $.i18n.prop('proxyconnector.delete.confirm'),
+ $("#proxy-connector-delete-warning-tmpl").tmpl(proxyConnector));
+
+
+ }
+
+
+ getManagedRepository=function(id){
+ return findManagedRepository(id,self.managedRepositories());
+ }
+
+ getRemoteRepository=function(id){
+ var remoteRepository=$.grep(self.remoteRepositories(),
+ function(repo,idx){
+ return repo.id()==id;
+ }
+ );
+ return ($.isArray(remoteRepository) && remoteRepository.length>0) ? remoteRepository[0]:new RemoteRepository();
+ }
+
+ getProxyConnector=function(sourceRepoId,targetRepoId){
+ var proxyConnectors=$.grep(self.proxyConnectors(),
+ function(proxyConnector,idx){
+ return proxyConnector.sourceRepoId()==sourceRepoId
+ && proxyConnector.targetRepoId()==targetRepoId;
+ }
+ );
+ var res = ($.isArray(proxyConnectors) && proxyConnectors.length>0) ? proxyConnectors[0]:new ProxyConnector();
+ return res;
+ }
+ showSettings=function(){
+ $.log("showSettings");
+ $("#body_content" ).find(".popover" ).hide();
+ //$("#main-content").find("[id^='proxy-connectors-grid-remoterepo-settings-edit-']" ).popover("hide");
+ }
+ buildSettings=function(proxyConnector){
+ var tmplHtml = $("#proxy-connectors-remote-settings-popover-tmpl")
+ .tmpl({
+ proxyConnectorsViewModel: self,
+ proxyConnector:ko.toJS(proxyConnector)
+ } ).html();
+
+ var targetImg = $(("#proxy-connectors-grid-remoterepo-settings-edit-")
+ +proxyConnector.sourceRepoId().replace(/\./g,"\\\.")+"-"+proxyConnector.targetRepoId().replace(/\./g,"\\\."));
+ return tmplHtml;
+ }
+
+ this.displaySettings=function(sourceRepoId,targetRepoId,targetContentStartId, targetImgStartId){
+ var proxyConnector=getProxyConnector(sourceRepoId,targetRepoId);
+ showSettings(proxyConnector,targetContentStartId,targetImgStartId);
+ }
+
+ this.findPolicyInformationName=function(id){
+ for(var i=0;i<self.policyInformations().length;i++){
+ if (id==self.policyInformations()[i].id()){
+ return self.policyInformations()[i].name();
+ }
+ }
+ return null;
+ }
+
+ orderChangeAware=function(proxyConnector){
+ return findProxyConnectorsWithSourceId(proxyConnector).length>1;
+ }
+
+ findProxyConnectorsWithSourceId=function(proxyConnector){
+ return $.grep(self.proxyConnectors(),function(curProxyConnector,idx){
+ return curProxyConnector.sourceRepoId()==proxyConnector.sourceRepoId();
+ }
+ );
+ }
+
+ displayOrderEdit=function(proxyConnector){
+ var proxyConnectors=findProxyConnectorsWithSourceId(proxyConnector);
+ $.log("displayOrderEdit:"+proxyConnector.sourceRepoId()+",number:"+proxyConnectors.length);
+
+ var managedRepository = getManagedRepository(proxyConnector.sourceRepoId());
+ var proxyConnectorEditOrderViewModel=new ProxyConnectorEditOrderViewModel(proxyConnectors,self,managedRepository);
+ ko.applyBindings(proxyConnectorEditOrderViewModel,$("#main-content").find("#proxy-connector-edit-order").get(0));
+ activateProxyConnectorsEditOrderTab();
+ }
+
+ this.displayGrid=function(){
+ this.gridViewModel = new ko.simpleGrid.viewModel({
+ data: self.proxyConnectors,
+ pageSize: 5,
+ gridUpdateCallBack: function(){
+ $("#main-content" ).find("#proxyConnectorsTable" ).find("[title]").tooltip();
+ }
+ });
+ var mainContent = $("#main-content");
+
+ ko.applyBindings(this,mainContent.find("#proxy-connectors-view").get(0));
+ var prxGrids=mainContent.find("[id^='proxy-connectors-grid-remoterepo-settings-edit-']");
+ prxGrids.popover();
+ removeSmallSpinnerImg();
+ mainContent.find("#proxy-connectors-view-tabs #proxy-connectors-view-tabs-a-network-proxies-grid").tab('show');
+
+ mainContent.find("#proxy-connectors-view-tabs").on('show', function (e) {
+ $.log("on show:"+$(e.target).attr("href"));
+ if ($(e.target).attr("href")=="#proxy-connectors-edit") {
+ $.log("#proxy-connectors-edit");
+ var proxyConnector=new ProxyConnector();
+ var defaultPolicies=new Array();
+ // populate with defaut policies options
+ for (i=0;i<self.policyInformations().length;i++){
+ defaultPolicies.push(new Entry(self.policyInformations()[i].id(),self.policyInformations()[i].defaultOption));
+ }
+ proxyConnector.policiesEntries(defaultPolicies);
+ var proxyConnectorViewModel=new ProxyConnectorViewModel(proxyConnector,false,self);
+ mainContent.find("#proxy-connectors-edit").html($("#proxy-connector-edit-form-tmpl").tmpl());
+ ko.applyBindings(proxyConnectorViewModel,mainContent.find("#proxy-connectors-edit").get(0));
+ mainContent.find("#sourceRepoId" ).select2();
+ mainContent.find("#targetRepoId" ).select2();
+ }
+ if ($(e.target).attr("href")=="#proxy-connectors-view") {
+ $("#proxy-connectors-view-tabs-a-network-proxies-grid").html($.i18n.prop("proxy-connectors.grid.tab.title"));
+ mainContent.find("#proxy-connectors-view-tabs-li-edit a").html($.i18n.prop("add"));
+ }
+ if ($(e.target).attr("href")=="#proxy-connectors-edit-order") {
+ activateProxyConnectorsEditOrderTab();
+ }
+
+ });
+ }
+
+ }
+
+ ProxyConnectorEditOrderViewModel=function(proxyConnectors,proxyConnectorsViewModel,managedRepository){
+ var self=this;
+ this.proxyConnectors=ko.observableArray(proxyConnectors);
+ this.proxyConnectorsViewModel=proxyConnectorsViewModel;
+ this.managedRepository=managedRepository;
+ proxyConnectorMoved=function(arg){
+ $.log("proxyConnectorMoved:"+arg.sourceIndex+" to " + arg.targetIndex);
+ // if only 1 move just update two whereas update all with the new order
+ if (arg.targetIndex-arg.sourceIndex==1){
+ self.proxyConnectors()[arg.targetIndex].order(arg.targetIndex+1);
+ self.proxyConnectors()[arg.sourceIndex].order(arg.sourceIndex+1);
+ } else {
+ for (i=0;i<self.proxyConnectors().length;i++){
+ self.proxyConnectors()[i].order(i+1);
+ }
+ }
+ }
+
+ this.findRemoteRepository=function(id){
+ $.log("findRemoteRepository:"+id());
+ for(var i=0;i<self.proxyConnectorsViewModel.remoteRepositories().length;i++){
+ if (self.proxyConnectorsViewModel.remoteRepositories()[i].id()==id()){
+ return self.proxyConnectorsViewModel.remoteRepositories()[i];
+ }
+ }
+ return null;
+ }
+
+ this.updateModifiedProxyConnectors=function(){
+ self.proxyConnectorsViewModel.updateModifiedProxyConnectors();
+ }
+
+ displaySettings=function(sourceRepoId,targetRepoId){
+ $.log("ProxyConnectorEditOrderViewModel#showSettings:"+sourceRepoId+"-"+targetRepoId);
+ self.proxyConnectorsViewModel.displaySettings(sourceRepoId,targetRepoId,
+ "#proxy-connectors-order-remoterepo-settings-content-",
+ "#proxy-connectors-order-remoterepo-settings-edit-");
+ }
+
+ }
+
+ displayProxyConnectors=function(){
+ screenChange();
+ var mainContent = $("#main-content");
+ mainContent.html($("#proxyConnectorsMain").tmpl());
+ mainContent.append(smallSpinnerImg());
+
+ this.proxyConnectorsViewModel = new ProxyConnectorsViewModel();
+ var self=this;
+
+ loadManagedRepositories(function(data) {
+ self.proxyConnectorsViewModel.managedRepositories(mapManagedRepositories(data));
+
+ loadRemoteRepositories(function(data) {
+ self.proxyConnectorsViewModel.remoteRepositories(mapRemoteRepositories(data));
+
+ loadNetworkProxies(function(data) {
+ self.proxyConnectorsViewModel.networkProxies(mapNetworkProxies(data));
+
+ loadAllPolicies( function(data) {
+ self.proxyConnectorsViewModel.policyInformations(mapPolicyInformations(data));
+
+ loadAllProxyConnectors( function(data) {
+ self.proxyConnectorsViewModel.proxyConnectors(mapProxyConnectors(data));
+ self.proxyConnectorsViewModel.displayGrid();
+ });
+
+ });
+
+ });
+
+ });
+
+ });
+
+ }
+
+ loadAllPolicies=function(successCallBackFn,errorCallBackFn){
+ $.ajax("restServices/archivaServices/proxyConnectorService/allPolicies", {
+ type: "GET",
+ dataType: 'json',
+ success: successCallBackFn,
+ error: errorCallBackFn
+ }
+ );
+ }
+
+ loadAllProxyConnectors=function(successCallBackFn,errorCallBackFn){
+ $.ajax("restServices/archivaServices/proxyConnectorService/getProxyConnectors", {
+ type: "GET",
+ dataType: 'json',
+ success: successCallBackFn,
+ error: errorCallBackFn
+ });
+ }
+
+ activateProxyConnectorsGridTab=function(){
+ var mainContent = $("#main-content");
+ mainContent.find("#proxy-connectors-view-tabs-content div[class*='tab-pane']").removeClass("active");
+ mainContent.find("#proxy-connectors-view-tabs li").removeClass("active");
+
+ mainContent.find("#proxy-connectors-view").addClass("active");
+ mainContent.find("#proxy-connectors-view-tabs-li-grid").addClass("active");
+ mainContent.find("#proxy-connectors-view-tabs-li-edit a").html($.i18n.prop("add"));
+
+ }
+
+ activateProxyConnectorsEditTab=function(){
+ var mainContent = $("#main-content");
+
+ mainContent.find("#proxy-connectors-view-tabs-content div[class*='tab-pane']").removeClass("active");
+ mainContent.find("#proxy-connectors-view-tabs li").removeClass("active");
+
+ mainContent.find("#proxy-connectors-edit").addClass("active");
+ mainContent.find("#proxy-connectors-view-tabs-li-edit").addClass("active");
+ }
+
+ activateProxyConnectorsEditOrderTab=function(){
+ var mainContent = $("#main-content");
+
+ mainContent.find("#proxy-connectors-view-tabs-content div[class*='tab-pane']").removeClass("active");
+ mainContent.find("#proxy-connectors-view-tabs li").removeClass("active");
+
+ mainContent.find("#proxy-connector-edit-order").addClass("active");
+ mainContent.find("#proxy-connectors-view-tabs-li-edit-order").addClass("active");
+ }
+
+ mapProxyConnector=function(data){
+ if (data==null){
+ return null;
+ }
+ var policiesEntries = data.policiesEntries == null ? []: $.each(data.policiesEntries,function(item){
+ return new Entry(item.key, item.value);
+ });
+ if (!$.isArray(policiesEntries)){
+ policiesEntries=[];
+ }
+ var propertiesEntries = data.propertiesEntries == null ? []: $.each(data.propertiesEntries,function(item){
+ return new Entry(item.key, item.value);
+ });
+ if (!$.isArray(propertiesEntries)){
+ propertiesEntries=[];
+ }
+ return new ProxyConnector(data.sourceRepoId,data.targetRepoId,data.proxyId,mapStringArray(data.blackListPatterns),
+ mapStringArray(data.whiteListPatterns),policiesEntries,propertiesEntries,
+ data.disabled,data.order);
+ }
+
+ mapProxyConnectors=function(data){
+ var mappedProxyConnectors = $.map(data, function(item) {
+ return mapProxyConnector(item);
+ });
+ return mappedProxyConnectors;
+ }
+
+ mapPolicyInformation=function(data){
+ if (data==null){
+ return null;
+ }
+ var policyInformation = new PolicyInformation(mapStringArray(data.options),data.defaultOption,data.id,data.name);
+ $.log("policyInformation.options:"+policyInformation.options());
+ return policyInformation;
+ }
+
+ mapPolicyInformations=function(data){
+ return $.map(data, function(item) {
+ return mapPolicyInformation(item);
+ });
+ }
+
+ removeProxyConnector=function(proxyConnector,fnSuccessCallback){
+ clearUserMessages();
+ var url="restServices/archivaServices/proxyConnectorService/removeProxyConnector?";
+ url += "sourceRepoId="+encodeURIComponent(proxyConnector.sourceRepoId());
+ url += "&targetRepoId="+encodeURIComponent(proxyConnector.targetRepoId());
+ $.ajax(url,
+ {
+ type: "GET",
+ contentType: 'application/json',
+ success: function(data) {
+ fnSuccessCallback();
+ },
+ error: function(data) {
+ var res = $.parseJSON(data.responseText);
+ displayRestError(res);
+ }
+ }
+ );
+
+ }
+
+});
Propchange: archiva/branches/archiva-MRM-1756/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/repository/maven2/proxy-connectors.js
------------------------------------------------------------------------------
svn:eol-style = native