]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1722] Use cookie settings from redback for rememberme feature
authorOlivier Lamy <olamy@apache.org>
Wed, 19 Dec 2012 22:37:53 +0000 (22:37 +0000)
committerOlivier Lamy <olamy@apache.org>
Wed, 19 Dec 2012 22:37:53 +0000 (22:37 +0000)
fix issues on not saved redbackRuntimeConfiguration.properties

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1424183 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/DefaultRuntimeInfoService.java
archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/api/RuntimeInfoService.java
archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/model/ApplicationRuntimeInfo.java
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/archiva.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/general-admin.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/utils.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/knockout.simpleGrid.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/archiva/general-admin.html
archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/templates/redback/login.html

index f28ce3266b1cdb78ccbd37ae85db94ec1c53770c..e61297b772cf40aeb6d8416636cb91f3f2436f8a 100644 (file)
@@ -18,6 +18,8 @@ package org.apache.archiva.web.api;
  * under the License.
  */
 
+import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
+import org.apache.archiva.rest.api.services.ArchivaRuntimeConfigurationService;
 import org.apache.archiva.web.runtime.ArchivaRuntimeInfo;
 import org.apache.archiva.web.model.ApplicationRuntimeInfo;
 import org.apache.commons.lang.StringUtils;
@@ -35,7 +37,7 @@ import java.util.Locale;
 /**
  * @author Olivier Lamy
  */
-@Service( "runtimeInfoService#rest" )
+@Service("runtimeInfoService#rest")
 public class DefaultRuntimeInfoService
     implements RuntimeInfoService
 {
@@ -44,6 +46,9 @@ public class DefaultRuntimeInfoService
 
     private ArchivaRuntimeInfo archivaRuntimeInfo;
 
+    @Inject
+    private ArchivaRuntimeConfigurationService archivaRuntimeConfigurationService;
+
     @Context
     protected HttpServletRequest httpServletRequest;
 
@@ -54,6 +59,7 @@ public class DefaultRuntimeInfoService
     }
 
     public ApplicationRuntimeInfo getApplicationRuntimeInfo( String locale )
+        throws ArchivaRestServiceException
     {
         ApplicationRuntimeInfo applicationRuntimeInfo = new ApplicationRuntimeInfo();
         applicationRuntimeInfo.setBuildNumber( this.archivaRuntimeInfo.getBuildNumber() );
@@ -65,6 +71,9 @@ public class DefaultRuntimeInfoService
                                                      new Locale( StringUtils.isEmpty( locale ) ? "en" : locale ) );
         applicationRuntimeInfo.setTimestampStr( sfd.format( new Date( archivaRuntimeInfo.getTimestamp() ) ) );
 
+        applicationRuntimeInfo.setRedbackRuntimeConfiguration(
+            archivaRuntimeConfigurationService.getRedbackRuntimeConfigurationAdmin() );
+
         return applicationRuntimeInfo;
     }
 
index cb5b03e12552e9f206fe704544c8b339da6409e9..422176a71d9815cc1975aaa1c9cbda647d6dd6b7 100644 (file)
@@ -18,6 +18,7 @@ package org.apache.archiva.web.api;
  * under the License.
  */
 
+import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
 import org.apache.archiva.web.model.ApplicationRuntimeInfo;
 import org.apache.archiva.redback.authorization.RedbackAuthorization;
 
@@ -32,19 +33,20 @@ import javax.ws.rs.core.MediaType;
  * @author Olivier Lamy
  * @since 1.4-M3
  */
-@Path( "/runtimeInfoService/" )
+@Path("/runtimeInfoService/")
 public interface RuntimeInfoService
 {
-    @Path( "archivaRuntimeInfo/{locale}" )
+    @Path("archivaRuntimeInfo/{locale}")
     @GET
-    @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
-    @RedbackAuthorization( noRestriction = true )
-    ApplicationRuntimeInfo getApplicationRuntimeInfo( @PathParam( "locale" ) String locale );
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noRestriction = true)
+    ApplicationRuntimeInfo getApplicationRuntimeInfo( @PathParam("locale") String locale )
+        throws ArchivaRestServiceException;
 
 
-    @Path( "logMissingI18n" )
+    @Path("logMissingI18n")
     @GET
-    @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
-    @RedbackAuthorization( noRestriction = true )
-    Boolean logMissingI18n( @QueryParam( "key" ) String key );
+    @Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
+    @RedbackAuthorization(noRestriction = true)
+    Boolean logMissingI18n( @QueryParam("key") String key );
 }
index b5bc8cc9179603ff8899644eef6a6dc7b561833b..85fdef76b02d2dc3d88046050935d11345633d12 100644 (file)
@@ -18,6 +18,8 @@ package org.apache.archiva.web.model;
  * under the License.
  */
 
+import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
+
 import javax.xml.bind.annotation.XmlRootElement;
 import java.util.Calendar;
 
@@ -25,7 +27,7 @@ import java.util.Calendar;
  * @author Olivier Lamy
  * @since 1.4-M3
  */
-@XmlRootElement( name = "applicationRuntimeInfo" )
+@XmlRootElement(name = "applicationRuntimeInfo")
 public class ApplicationRuntimeInfo
 {
     private boolean devMode = false;
@@ -46,6 +48,8 @@ public class ApplicationRuntimeInfo
 
     private String timestampStr;
 
+    private RedbackRuntimeConfiguration redbackRuntimeConfiguration;
+
     public ApplicationRuntimeInfo()
     {
         this.devMode = Boolean.getBoolean( "archiva.devMode" );
@@ -147,6 +151,16 @@ public class ApplicationRuntimeInfo
         this.timestampStr = timestampStr;
     }
 
+    public RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
+    {
+        return redbackRuntimeConfiguration;
+    }
+
+    public void setRedbackRuntimeConfiguration( RedbackRuntimeConfiguration redbackRuntimeConfiguration )
+    {
+        this.redbackRuntimeConfiguration = redbackRuntimeConfiguration;
+    }
+
     @Override
     public String toString()
     {
@@ -161,6 +175,7 @@ public class ApplicationRuntimeInfo
         sb.append( ", logMissingI18n=" ).append( logMissingI18n );
         sb.append( ", baseUrl='" ).append( baseUrl ).append( '\'' );
         sb.append( ", timestampStr='" ).append( timestampStr ).append( '\'' );
+        sb.append( ", redbackRuntimeConfiguration=" ).append( redbackRuntimeConfiguration );
         sb.append( '}' );
         return sb.toString();
     }
index aeb3765c6aeb09962340e9e6b8f8ae4383444170..5a64e44eb89b704138e52da10ae24ce9ac1556bc 100644 (file)
@@ -96,25 +96,30 @@ $.ajax({
                     "archiva.search": "archiva/search",
                     "archiva.proxy-connectors-rules": "archiva/proxy-connectors-rules",
                     "archiva.docs": "archiva/docs",
-                    "archiva.main": "archiva/main"
+                    "archiva.main": "archiva/main",
+                    "archiva.knockout.properties": "archiva/knockout-properties"
                 }
             });
 
-                requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils','domReady!','archiva.main'], function () {
+                requirejs(['jquery','jquery.tmpl','jquery.ui','i18n','sammy','startup','utils','domReady!','archiva.main','archiva.general-admin'], function () {
                   loadi18n(function () {
                     $.ajax({
                       url: "restServices/archivaUiServices/runtimeInfoService/archivaRuntimeInfo/"+usedLang(),
                       dataType: 'json',
                       success:function(data){
-                          window.archivaDevMode=data.devMode;
-                          window.archivaJavascriptLog=data.javascriptLog;
-                          window.archivaRuntimeInfo=data;
+                        window.archivaDevMode=data.devMode;
+                        window.archivaJavascriptLog=data.javascriptLog;
+                        window.archivaRuntimeInfo=data;
 
-                          require(['sammy','jquery','i18n','jquery.tmpl','archiva.main','utils','domReady!'],function () {
-                              startArchivaApplication();
-                              $("#loadingDiv").hide();
-                              drawQuickSearchAutocomplete();
-                          })
+                        window.redbackRuntimeConfiguration=mapRedbackRuntimeConfiguration(data.redbackRuntimeConfiguration);
+
+                        $.log("security.rememberme.enabled key value:"+ window.redbackRuntimeConfiguration.findPropertyValue('security.rememberme.enabled'));
+
+                        require(['sammy','jquery','i18n','jquery.tmpl','archiva.main','utils','domReady!'],function () {
+                            startArchivaApplication();
+                            $("#loadingDiv").hide();
+                            drawQuickSearchAutocomplete();
+                        })
                       }
                     })
                   });
index 5675b3d7739aa05d8ce2a88d505bacfe16997065..8dc355f7a340c5ff025422b0935481ccdb89e11b 100644 (file)
@@ -17,7 +17,7 @@
  * under the License.
  */
 define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout","knockout.simpleGrid",
-  "knockout.sortable","jquery.validate","bootstrap"]
+  "knockout.sortable","jquery.validate","bootstrap","archiva.knockout.properties"]
     , function(jquery,i18n,utils,jqueryTmpl,ko) {
 
   //-------------------------
@@ -1169,6 +1169,16 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
       self.modified(true);
       $.log("configurationPropertiesEntries modified")
     });
+
+    this.findPropertyValue=function(key){
+      for(var i=0;i<self.configurationPropertiesEntries().length;i++){
+        if(self.configurationPropertiesEntries()[i].key==key){
+          var val = self.configurationPropertiesEntries()[i].value;
+          $.log("findPropertyValue " + key + "->" + val);
+          return val;
+        }
+      }
+    }
   }
 
   mapRedbackRuntimeConfiguration=function(data){
@@ -1252,6 +1262,24 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
 
     this.usedUserManagerImpls=ko.observableArray([]);
 
+    self.gridViewModel = new ko.simpleGrid.viewModel({
+      data: self.redbackRuntimeConfiguration().configurationPropertiesEntries,
+      columns: [
+       {
+         headerText: $.i18n.prop('redback.runtime.properties.key.label'),
+         rowText: "key"
+       },
+       {
+         headerText: $.i18n.prop('redback.runtime.properties.value.label'),
+         rowText: "value"
+       }
+      ],
+      pageSize: 10,//self.redbackRuntimeConfiguration().configurationPropertiesEntries.length,
+      gridUpdateCallBack: function(){
+
+      }
+      });
+
     findUserManagerImplementationInformation=function(id){
       for(var i= 0;i<self.userManagerImplementationInformations().length;i++){
         $.log(id+""+self.userManagerImplementationInformations()[i].beanId);
@@ -1358,14 +1386,13 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
       var userMessages=$("#user-messages");
       userMessages.html(mediumSpinnerImg());
       self.redbackRuntimeConfiguration().userManagerImpls=ko.observableArray([]);
-      $.log("length:"+self.usedUserManagerImpls().length);
+
       for(var i=0;i<self.usedUserManagerImpls().length;i++){
         var beanId=self.usedUserManagerImpls()[i].beanId;
         $.log("beanId:"+beanId);
         self.redbackRuntimeConfiguration().userManagerImpls.push(beanId);
       }
-      $.log("length:"+self.redbackRuntimeConfiguration().userManagerImpls().length);
-      $.log("json:"+ko.toJSON(self.redbackRuntimeConfiguration));
+      $.log("rememberme enabled:"+self.redbackRuntimeConfiguration().findPropertyValue("security.rememberme.enabled"));
       $.ajax("restServices/archivaServices/archivaRuntimeConfigurationService/redbackRuntimeConfiguration",
         {
           type: "PUT",
@@ -1426,11 +1453,12 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout"
         type: "GET",
         dataType: 'json',
         success: function(data) {
+          // TODO use window.redbackRuntimeConfiguration ?
           var redbackRuntimeConfiguration = mapRedbackRuntimeConfiguration(data);
           var redbackRuntimeConfigurationViewModel =
               new RedbackRuntimeConfigurationViewModel(redbackRuntimeConfiguration,userManagerImplementationInformations);
-          mainContent.html( $( "#runtime-configuration-main" ).tmpl() );
-          ko.applyBindings(redbackRuntimeConfigurationViewModel,$("#runtime-configuration-content" ).get(0));
+          mainContent.html( $("#redback-runtime-configuration-main" ).tmpl() );
+          ko.applyBindings(redbackRuntimeConfigurationViewModel,$("#redback-runtime-configuration-content" ).get(0));
           activatePopoverDoc();
         }
       });
index 55aae137118c48655baccf6cc6321525b07768eb..d42596eec43dfca381392c935f8620286f4ef134 100644 (file)
@@ -359,14 +359,28 @@ require(["jquery","jquery.tmpl","i18n","knockout"], function(jquery,jqueryTmpl,i
    */
   Entry=function(key,value,subscribeFn){
     var self=this;
+    this.modified=ko.observable(false);
+    this.modified.subscribe(function(newValue){
+      $.log("Entry modified");
+    });
+
     this.key=ko.observable(key);
-    if(subscribeFn){
-      this.key.subscribe(function(newValue){subscribeFn(newValue)});
-    }
+    this.key.subscribe(function(newValue){
+      self.modified(true);
+      if(subscribeFn){
+        subscribeFn(newValue)
+      }
+    });
+
     this.value=ko.observable(value);
-    if(subscribeFn){
-      this.value.subscribe(function(newValue){$.log("value modified");subscribeFn(newValue);});
-    }
+    this.value.subscribe(function(newValue){
+      self.modified(true);
+      if(subscribeFn){
+        subscribeFn(newValue)
+      }
+    });
+
+
   }
 
   /**
index 73cff0e4712013eaaf714a16ef7e43aaa66cd5ea..f9fbafc23fe2bf3c09133a1136bd3f24564faf7d 100644 (file)
 
 
 
-  (function(factory) {
-      if (typeof define === "function" && define.amd) {
-          // AMD anonymous module
-          define("knockout.simpleGrid",["jquery","knockout","utils","i18n"], factory);
-      } else {
-          // No module loader (plain <script> tag) - put directly in global namespace
-          factory(window.ko, jQuery);
-      }
-  })(function ($,ko,utils,i18n) {
-
-
-      ko.simpleGrid = {
-        // Defines a view model class you can use to populate a grid
-        viewModel: function (configuration) {
-          this.data = configuration.data;
-          this.currentPageIndex = ko.observable(0);
-          this.pageSize = configuration.pageSize || 5;
-          this.columns = configuration.columns;
-
-          this.itemsOnCurrentPage = ko.computed(function () {
-              var startIndex = this.pageSize * this.currentPageIndex();
-              return this.data.slice(startIndex, startIndex + this.pageSize);
-          }, this);
-
-          this.maxPageIndex = ko.computed(function () {
-              return Math.ceil(ko.utils.unwrapObservable(this.data).length / this.pageSize);
-          }, this);
-          this.i18n=function(key){
-            return $.i18n.prop(key);
-          };
-          this.gridUpdateCallBack = configuration.gridUpdateCallBack;
-          this.pageLinksUpdateCallBack = configuration.pageLinksUpdateCallBack;
-
-        }
+(function(factory) {
+    if (typeof define === "function" && define.amd) {
+        // AMD anonymous module
+        define("knockout.simpleGrid",["jquery","knockout","utils","i18n"], factory);
+    } else {
+        // No module loader (plain <script> tag) - put directly in global namespace
+        factory(window.ko, jQuery);
+    }
+})(function ($,ko,utils,i18n) {
+
+
+  ko.simpleGrid = {
+    // Defines a view model class you can use to populate a grid
+    viewModel: function (configuration) {
+      this.data = configuration.data;
+      this.currentPageIndex = ko.observable(0);
+      this.pageSize = configuration.pageSize || 5;
+      this.columns = configuration.columns;
+
+      this.itemsOnCurrentPage = ko.computed(function () {
+          var startIndex = this.pageSize * this.currentPageIndex();
+          return this.data.slice(startIndex, startIndex + this.pageSize);
+      }, this);
+
+      this.maxPageIndex = ko.computed(function () {
+          return Math.ceil(ko.utils.unwrapObservable(this.data).length / this.pageSize);
+      }, this);
+      this.i18n=function(key){
+        return $.i18n.prop(key);
       };
+      this.gridUpdateCallBack = configuration.gridUpdateCallBack;
+      this.pageLinksUpdateCallBack = configuration.pageLinksUpdateCallBack;
+
+    }
+  };
 
-      // Templates used to render the grid
-      var templateEngine = new ko.jqueryTmplTemplateEngine();
+  // Templates used to render the grid
+  var templateEngine = new ko.jqueryTmplTemplateEngine();
 
 
-      // The "simpleGrid" binding
-      ko.bindingHandlers.simpleGrid = {
-          // This method is called to initialize the node, and will also be called again if you change what the grid is bound to
-          update: function (element, viewModelAccessor, allBindingsAccessor) {
-            var viewModel = viewModelAccessor(), allBindings = allBindingsAccessor();
+  // The "simpleGrid" binding
+  ko.bindingHandlers.simpleGrid = {
+      // This method is called to initialize the node, and will also be called again if you change what the grid is bound to
+      update: function (element, viewModelAccessor, allBindingsAccessor) {
+        var viewModel = viewModelAccessor(), allBindings = allBindingsAccessor();
 
-            // Empty the element
-            while(element.firstChild) {
-                ko.removeNode(element.firstChild);
-            }
+        // Empty the element
+        while(element.firstChild) {
+            ko.removeNode(element.firstChild);
+        }
 
-            // Allow the default templates to be overridden
-            var gridTemplateName      = allBindings.simpleGridTemplate || "ko_usersGrid_grid",
-                pageLinksTemplateName = allBindings.simpleGridPagerTemplate || "ko_simpleGrid_pageLinks";
+        // Allow the default templates to be overridden
+        var gridTemplateName      = allBindings.simpleGridTemplate || "ko_usersGrid_grid",
+            pageLinksTemplateName = allBindings.simpleGridPagerTemplate || "ko_simpleGrid_pageLinks";
 
-            // Render the main grid
-            var gridContainer = element.appendChild(document.createElement("DIV"));
-            ko.renderTemplate(gridTemplateName, viewModel, { templateEngine: templateEngine }, gridContainer, "replaceNode")
-                .subscribe(viewModel.gridUpdateCallBack?viewModel.gridUpdateCallBack:function(){});
+        // Render the main grid
+        var gridContainer = element.appendChild(document.createElement("DIV"));
+        ko.renderTemplate(gridTemplateName, viewModel, { templateEngine: templateEngine }, gridContainer, "replaceNode")
+            .subscribe(viewModel.gridUpdateCallBack?viewModel.gridUpdateCallBack:function(){});
 
-            if (viewModel.gridUpdateCallBack) viewModel.gridUpdateCallBack();
+        if (viewModel.gridUpdateCallBack) viewModel.gridUpdateCallBack();
 
-            // Render the page links
-            var pageLinksContainer = $("#"+allBindings.pageLinksId).get(0);
-            var renderedTemplate = ko.renderTemplate(pageLinksTemplateName, viewModel, { templateEngine: templateEngine }, pageLinksContainer, "replaceNode");
-            if (renderedTemplate.subscribe){
-              renderedTemplate.subscribe(viewModel.pageLinksUpdateCallBack?viewModel.pageLinksUpdateCallBack:function(){});
-            }
-            if (viewModel.pageLinksUpdateCallBack) viewModel.pageLinksUpdateCallBack();
-          }
-      };
+        // Render the page links
+        var pageLinksContainer = $("#"+allBindings.pageLinksId).get(0);
+        var renderedTemplate = ko.renderTemplate(pageLinksTemplateName, viewModel, { templateEngine: templateEngine }, pageLinksContainer, "replaceNode");
+        if (renderedTemplate.subscribe){
+          renderedTemplate.subscribe(viewModel.pageLinksUpdateCallBack?viewModel.pageLinksUpdateCallBack:function(){});
+        }
+        if (viewModel.pageLinksUpdateCallBack) viewModel.pageLinksUpdateCallBack();
+      }
+  };
 })
 
index 571d693b1aacc7f2cf8623e3301ad3e1fb85b855..39c127e5078b59791e8bbec39e2958080ad5c0a7 100644 (file)
@@ -366,6 +366,16 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) {
       $.log("user not in cookie");
     }
 
+    var rememberMe=window.redbackRuntimeConfiguration.findPropertyValue('security.rememberme.enabled');
+    $.log("rememberMe:"+rememberMe);
+    if (rememberMe!='true'){
+      $("#user-login-form-rememberme-label" ).hide();
+      $("#user-login-form-rememberme" ).attr("disabled","true");
+      if($("#user-login-form-rememberme" ).get(0 ).checked){
+        $("#user-login-form-rememberme" ).get(0 ).checked=false;
+      }
+    }
+
     var userLoginForm = $("#user-login-form");
 
     userLoginForm.validate({
index 9bf322fc71a2b99e660bba59bcdf490d9c7fd262..1c9cadbeb3a8f7f7ab2aa59697cc9bcbe49511c1 100644 (file)
     </tbody>
 </script>
 
-<script type="text/html" id="runtime-configuration-main">
+<script type="text/html" id="redback-runtime-configuration-main">
   <div class="page-header">
     <h2>${$.i18n.prop('redback-runtime-configuration.title')}</h2>
   </div>
-  <div id="runtime-configuration-content" data-bind='template: {name:"redback-runtime-configuration-content-tmpl"}'>
+  <div id="redback-runtime-configuration-content" data-bind='template: {name:"redback-runtime-configuration-content-tmpl"}'>
   </div>
 </script>
 
     </div>
 
     <div class="tab-pane" id="redback-runtime-properties-content">
-      <div class="well">
-        <table>
-          <thead>
-            <tr>
-              <th></th>
-              <th>${$.i18n.prop('redback.runtime.properties.key.label')}</th>
-              <th>${$.i18n.prop('redback.runtime.properties.value.label')}</th>
-            </tr>
-          </thead>
-          <tbody>
-            {{each(i, property) redbackRuntimeConfiguration().configurationPropertiesEntries}}
-              <tr>
-                <td>
-                  {{var key = property.key}}
-                  <a class="popover-doc"
-                     data-original-title="${$.i18n.prop('redback.runtime.properties.help.title')}"
-                     data-content="${$.i18n.prop(key+'.help.content')}">
-                    <span class="btn btn-info"><i class="icon-question-sign icon-white"></i></span>
-                  </a>
-                </td>
-                <td><input type="text" class="input-xxlarge" value="${property.key}"></td>
-                <td><input type="text" class="input-xlarge" value="${property.value}"></td>
-              </tr>
-            {{/each}}
-          </tbody>
 
+      <div class="well">
+        <table id="proxyConnectorsTable"
+               data-bind="simpleGrid: gridViewModel,simpleGridTemplate:'properties-grid',pageLinksId:'properties-grid-pagination'">
         </table>
+        <div id="properties-grid-pagination"></div>
       </div>
   </div>
 
   <div>
     <button data-bind="click: saveRedbackRuntimeConfiguration,css:{ 'btn-warning': redbackRuntimeConfiguration().modified() | redbackRuntimeConfiguration().ldapConfiguration().modified()  }"
-            id="redback-archiva-runtime-configuration-save"class="btn">${$.i18n.prop('save')}</button>
+            id="redback-runtime-configuration-save"class="btn">${$.i18n.prop('save')}</button>
   </div>
 
 </script>
 
-<script id="configurationPropertiesEntries-tmpl" type="text/html">
+<script id='properties-grid' type='text/html'>
+  <thead>
+  <tr>
+    <th></th>
+    <th>${$.i18n.prop('redback.runtime.properties.key.label')}</th>
+    <th>${$.i18n.prop('redback.runtime.properties.value.label')}</th>
+  </tr>
+  </thead>
+  <tbody>
+  {{each(i, row) itemsOnCurrentPage()}}
+    <tr>
+      <td>
+        {{var key = row.key}}
+        <a class="popover-doc"
+           data-original-title="${$.i18n.prop('redback.runtime.properties.help.title')}"
+           data-content="${$.i18n.prop(key+'.help.content')}">
+          <span class="btn btn-info"><i class="icon-question-sign icon-white"></i></span>
+        </a>
+      </td>
+      <td>${row.key}</td>
+      <td><input type="text" class="input-xxlarge" data-bind="value: row.value"></td>
+    </tr>
+  {{/each}}
+  </tbody>
 
 </script>
 
index 0baa26089088fb39e5509904968974e17715ad54..6e036cc17b97b85b5820ae10c44a2385790c08ad 100644 (file)
@@ -47,7 +47,7 @@
   </div>
   <div class="modal-footer" id="modal-login-footer">
     <div class="pull-left">
-      <label class="checkbox">
+      <label class="checkbox" id="user-login-form-rememberme-label">
         <input type="checkbox" id="user-login-form-rememberme">${$.i18n.prop('rememberme')}
       </label>
     </div>