}
//---------------------------
- // system status part
+ // UiConfiguration part
+ //---------------------------
+
+ displayUiConfiguration=function(){
+ screenChange();
+ var mainContent=$("#main-content");
+ mainContent.html(mediumSpinnerImg());
+ $.ajax("restServices/archivaServices/archivaAdministrationService/getNetworkConfiguration", {
+ type: "GET",
+ dataType: 'json',
+ success: function(data){
+ mainContent.html($("#ui-configuration-screen").tmpl());
+ var uiConfiguration=new UiConfiguration(data.showFindArtifacts,data.appletFindEnabled,data.disableEasterEggs,data.applicationUrl);
+ var uiConfigurationViewModel=new UiConfigurationViewModel(uiConfiguration);
+ ko.applyBindings(uiConfigurationViewModel,mainContent.get(0));
+ /*var validator = mainContent.find("#network-configuration-edit-form").validate({
+ showErrors: function(validator, errorMap, errorList) {
+ customShowError(mainContent.find("#network-configuration-edit-form" ).get(0),validator,errorMap,errorMap);
+ }
+ });*/
+ }
+ });
+ }
+
+ UiConfiguration=function(showFindArtifacts,appletFindEnabled,disableEasterEggs,applicationUrl){
+ this.showFindArtifacts = ko.observable(showFindArtifacts);
+
+ this.appletFindEnabled = ko.observable(appletFindEnabled);
+
+ this.disableEasterEggs = ko.observable(disableEasterEggs);
+
+ this.applicationUrl = ko.observable(applicationUrl);
+ }
+
+ UiConfigurationViewModel=function(uiConfiguration){
+ this.uiConfiguration=ko.observable(uiConfiguration);
+ var self=this;
+ save=function(){
+ $.ajax("restServices/archivaServices/archivaAdministrationService/setUiConfiguration", {
+ type: "POST",
+ contentType: 'application/json',
+ data: ko.toJSON(self.uiConfiguration),
+ dataType: 'json',
+ success: function(data){
+ displaySuccessMessage( $.i18n.prop("ui-configuration.updated"));
+ }
+ });
+ }
+ }
+
+
+ //---------------------------
+ // System status part
//---------------------------
QueueEntry=function(key,entriesNumber){
</form>
</script>
+<script id="ui-configuration-screen" type="text/html">
+ <div class="page-header">
+ <h4>${$.i18n.prop('ui-configuration.header')}</h4>
+ </div>
+ <div id="ui-configuration-form" data-bind='template: {name:"ui-configuration-form-tmpl"}'></div>
+</script>
+
+<script id="ui-configuration-form-tmpl" type="text/html">
+ <form id="ui-configuration-edit-form" class="well form-horizontal">
+ <fieldset id="ui-configuration-edit-fieldset">
+ <div class="control-group">
+ <label class="control-label" for="maxTotal">${$.i18n.prop('ui-configuration.applicationUrl')}</label>
+ <div class="controls">
+ <input type="text" class="xlarge required digits" id="applicationUrl" name="applicationUrl" size="8"
+ data-bind="value: uiConfiguration().applicationUrl"/>
+ </div>
+ </div>
+ </fieldset>
+ <button id="ui-configuration-btn-save" data-bind="click: save" class="btn">${$.i18n.prop('save')}</button>
+ </form>
+</script>
+
<script id="system-status-main" type="text/html">
<div class="page-header">
<h4>${$.i18n.prop('system-status.header.version.info')}</h4>