diff options
3 files changed, 27 insertions, 76 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/RedbackImplementationInformations.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/RedbackImplementationInformations.java deleted file mode 100644 index 7bdafb48f..000000000 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/src/main/java/org/apache/archiva/rest/api/model/RedbackImplementationInformations.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.apache.archiva.rest.api.model; -/* - * 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. - */ - -import javax.xml.bind.annotation.XmlRootElement; -import java.util.List; - -/** - * @author Olivier Lamy - * @since 1.4-M4 - */ -@XmlRootElement( name = "redbackImplementationInformations" ) -public class RedbackImplementationInformations -{ - private List<UserManagerImplementationInformation> userManagerImplementationInformations; - - private List<RBACManagerImplementationInformation> rbacManagerImplementationInformations; - - public RedbackImplementationInformations() - { - // no op - } - - public RedbackImplementationInformations( - List<UserManagerImplementationInformation> userManagerImplementationInformations, - List<RBACManagerImplementationInformation> rbacManagerImplementationInformations ) - { - this.userManagerImplementationInformations = userManagerImplementationInformations; - this.rbacManagerImplementationInformations = rbacManagerImplementationInformations; - } - - public List<UserManagerImplementationInformation> getUserManagerImplementationInformations() - { - return userManagerImplementationInformations; - } - - public void setUserManagerImplementationInformations( - List<UserManagerImplementationInformation> userManagerImplementationInformations ) - { - this.userManagerImplementationInformations = userManagerImplementationInformations; - } - - public List<RBACManagerImplementationInformation> getRbacManagerImplementationInformations() - { - return rbacManagerImplementationInformations; - } - - public void setRbacManagerImplementationInformations( - List<RBACManagerImplementationInformation> rbacManagerImplementationInformations ) - { - this.rbacManagerImplementationInformations = rbacManagerImplementationInformations; - } -} diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js index 1de494da4..90b561b0c 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/general-admin.js @@ -1368,10 +1368,11 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" return null; } - RedbackRuntimeConfigurationViewModel=function(redbackRuntimeConfiguration,userManagerImplementationInformations){ + RedbackRuntimeConfigurationViewModel=function(redbackRuntimeConfiguration,userManagerImplementationInformations,rbacManagerImplementationInformations){ var self=this; this.redbackRuntimeConfiguration=ko.observable(redbackRuntimeConfiguration); - this.userManagerImplementationInformations=ko.observable(userManagerImplementationInformations); + this.userManagerImplementationInformations=ko.observableArray(userManagerImplementationInformations); + this.rbacManagerImplementationInformations=ko.observableArray(rbacManagerImplementationInformations); this.usedUserManagerImpls=ko.observableArray([]); @@ -1697,18 +1698,20 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" var mainContent = $("#main-content"); mainContent.html(mediumSpinnerImg()); - $.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackImplementationInformations", { + $.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackImplementationsInformations", { type: "GET", dataType: 'json', success: function(data) { var userManagerImplementationInformations=data?mapManagerImplementationInformations(data.userManagerImplementationInformations):[]; + var rbacManagerImplementationInformations=data?mapManagerImplementationInformations(data.rbacManagerImplementationInformations):[]; + $.log("rbacManagerImplementationInformations:"+rbacManagerImplementationInformations.length); $.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackRuntimeConfiguration", { type: "GET", dataType: 'json', success: function(data) { var redbackRuntimeConfiguration = mapRedbackRuntimeConfiguration(data); var redbackRuntimeConfigurationViewModel = - new RedbackRuntimeConfigurationViewModel(redbackRuntimeConfiguration,userManagerImplementationInformations); + new RedbackRuntimeConfigurationViewModel(redbackRuntimeConfiguration,userManagerImplementationInformations,rbacManagerImplementationInformations); var groups=[]; var useLdap = $.inArray("ldap",redbackRuntimeConfiguration.usedUserManagerImpls)>0 diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html index 43d87876e..dafb04dfb 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/general-admin.html @@ -988,14 +988,31 @@ <div class="span4 dotted"> <h5>${$.i18n.prop('redback.runtime.user-managers.impls.choosed')}</h5> <div style="min-height: 40px" id="user-mananagers-sortables-choosed" - data-bind="sortable: { template: 'redback-runtime-general-content-usermanagers', data:usedUserManagerImpls,afterMove: userManagerImplMoved}"> + data-bind="sortable: { template: 'redback-runtime-general-content-impl-informations', data:usedUserManagerImpls,afterMove: userManagerImplMoved}"> </div> </div> <div class="span4 dotted"> <h5>${$.i18n.prop('redback.runtime.user-managers.impls.available')}</h5> <div style="min-height: 40px"id="user-mananagers-sortables-availables" - data-bind="sortable: {template: 'redback-runtime-general-content-usermanagers',data:availableUserManagerImpls,afterMove: userManagerImplMoved}"> + data-bind="sortable: {template: 'redback-runtime-general-content-impl-informations',data:availableUserManagerImpls,afterMove: userManagerImplMoved}"> + </div> + </div> + </div> + </div> + <div class="well"> + <div class="row-fluid"> + <div class="span4 dotted"> + <h5>${$.i18n.prop('redback.runtime.rbac-managers.impls.choosed')}</h5> + <div style="min-height: 40px" id="rbac-mananagers-sortables-choosed" + data-bind="sortable: { template: 'redback-runtime-general-content-impl-informations', data:usedUserManagerImpls,afterMove: userManagerImplMoved}"> + </div> + </div> + + <div class="span4 dotted"> + <h5>${$.i18n.prop('redback.runtime.rbac-managers.impls.available')}</h5> + <div style="min-height: 40px"id="rbac-mananagers-sortables-availables" + data-bind="sortable: {template: 'redback-runtime-general-content-impl-informations',data:availableUserManagerImpls,afterMove: userManagerImplMoved}"> </div> </div> </div> @@ -1232,7 +1249,7 @@ </script> -<script id="redback-runtime-general-content-usermanagers" type="text/html"> +<script id="redback-runtime-general-content-impl-informations" type="text/html"> <div class="well draggable-item"> ${$data.description} </div> |