From 65bf06bef472c4b01ea1fe3f6e47662f25ce9a6b Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Sat, 29 Dec 2012 23:58:34 +0000 Subject: [PATCH] move network configuration screen to a new screen with tabs git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1426860 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/webapp/js/archiva/general-admin.js | 9 +++++---- .../src/main/webapp/js/archiva/main.js | 4 ++-- .../js/templates/archiva/general-admin.html | 18 ++++++++++++++---- 3 files changed, 21 insertions(+), 10 deletions(-) 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 7ee08f0bc..6daf0fffe 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 @@ -551,16 +551,17 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" } } - displayNetworkConfiguration=function(){ + displayRuntimeConfiguration=function(){ screenChange(); var mainContent=$("#main-content"); - mainContent.html(mediumSpinnerImg()); + + mainContent.html($("#runtime-configuration-screen").tmpl()); $.ajax("restServices/archivaServices/archivaAdministrationService/getNetworkConfiguration", { type: "GET", dataType: 'json', success: function(data){ - mainContent.html($("#network-configuration-screen").tmpl()); + var networkConfiguration=new NetworkConfiguration(data.maxTotal,data.maxTotalPerHost,data.usePooling); var networkConfigurationViewModel=new NetworkConfigurationViewModel(networkConfiguration); ko.applyBindings(networkConfigurationViewModel,mainContent.get(0)); @@ -1538,7 +1539,7 @@ define("archiva.general-admin",["jquery","i18n","utils","jquery.tmpl","knockout" }); } - displayRuntimeConfiguration=function(){ + displayRedbackRuntimeConfiguration=function(){ $.log("displayRuntimeConfiguration"); var mainContent = $("#main-content"); mainContent.html(mediumSpinnerImg()); diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js index 23477cd89..30c0c25b9 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js @@ -227,7 +227,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa { text : $.i18n.prop('menu.network-proxies') , id: "menu-network-proxies-list-a" , href: "#networkproxies" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayNetworkProxies()}}, { text : $.i18n.prop('menu.legacy-artifact-support') , id: "menu-legacy-support-list-a" , href: "#legacy" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayLegacyArtifactPathSupport()}}, { text : $.i18n.prop('menu.repository-scanning') , id: "menu-repository-scanning-list-a" , href: "#scanningList" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayRepositoryScanning()}}, - { text : $.i18n.prop('menu.network-configuration') , id: "menu-network-configuration-list-a" , href: "#network" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayNetworkConfiguration()}}, + { text : $.i18n.prop('menu.runtime-configuration') , id: "menu-runtime-configuration-list-a" , href: "#runtimeconfig" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayRuntimeConfiguration()}}, { text : $.i18n.prop('menu.system-status') , id: "menu-system-status-list-a" , href: "#status" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displaySystemStatus()}}, { text : $.i18n.prop('menu.ui-configuration') , id: "menu-ui-configuration-list-a" , href: "#uiconfig" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayUiConfiguration()}}, { text : $.i18n.prop('menu.reports') , id: "menu-report-list-a" , href: "#reports" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayReportsPage()}} @@ -237,7 +237,7 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa { text : $.i18n.prop('menu.users') , id: null}, { text : $.i18n.prop('menu.users.manage') , id: "menu-users-list-a" , href: "#users" , redback: "{permissions: ['archiva-manage-users']}", func: function(){displayUsersGrid()}}, { text : $.i18n.prop('menu.users.roles') , id: "menu-roles-list-a" , href: "#roles" , redback: "{permissions: ['archiva-manage-users']}", func: function(){displayRolesGrid()}}, - { text : $.i18n.prop('menu.runtime-configuration') , id: "menu-runtime-configuration-list-a" , href: "#runtimeconfig" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayRuntimeConfiguration()}} + { text : $.i18n.prop('menu.users-runtime-configuration') , id: "menu-redback-runtime-configuration-list-a" , href: "#redbackruntimeconfig" , redback: "{permissions: ['archiva-manage-configuration']}", func: function(){displayRedbackRuntimeConfiguration()}} ]); this.docsMenuItems = ko.observableArray([ 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 fffddb7ee..fbb4cb79c 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 @@ -280,13 +280,23 @@ - +