remove previous stratos console app
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/6aabe7d9 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/6aabe7d9 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/6aabe7d9 Branch: refs/heads/master Commit: 6aabe7d96babc0f79e003a51ab53604da62841d9 Parents: a8146cb Author: Dakshika Jayathilaka <[email protected]> Authored: Mon Nov 10 17:24:19 2014 +0530 Committer: Dakshika Jayathilaka <[email protected]> Committed: Mon Nov 10 17:24:19 2014 +0530 ---------------------------------------------------------------------- .../console/README | 34 - .../console/apis/README | 1 - .../console/app.js | 35 - .../console/cartridge_info.jag | 75 - .../console/cartridge_info_sg.jag | 80 - .../console/cartridges.jag | 41 - .../console/config/acl.json | 12 - .../console/config/console.js | 40 - .../console/config/console.json | 22 - .../console/configure_stratos.jag | 114 - .../console/configure_stratos_wizard.jag | 113 - .../console/controllers/README | 1 - .../console/controllers/acs.jag | 103 - .../controllers/cartridgeDefintionSubmit.jag | 35 - .../controllers/cartridgeSubscribeSubmit.jag | 140 - .../controllers/cartridgeUnsubscribeSubmit.jag | 54 - .../console/controllers/checkAvailability.jag | 31 - .../console/controllers/dashboard.jag | 35 - .../console/controllers/lbDefinitionSubmit.jag | 29 - .../console/controllers/login.jag | 65 - .../console/controllers/loginSubmit.jag | 67 - .../console/controllers/logout.jag | 69 - .../console/controllers/manageTenants.jag | 60 - .../console/controllers/mycartridges.jag | 35 - .../console/controllers/newTenantSubmit.jag | 48 - .../controllers/partitionDefinitionSubmit.jag | 29 - .../console/controllers/payloadFactory.jag | 70 - .../controllers/policyDefinitionSubmit.jag | 36 - .../console/controllers/profileClient.jag | 77 - .../console/controllers/router.jag | 136 - .../console/controllers/wizardSubmit.jag | 86 - .../console/dashboard.jag | 33 - .../console/error-404.html | 110 - .../console/error.html | 118 - .../console/index.jag | 50 - .../console/jaggery.conf | 27 - .../console/js/dialog.js | 390 - .../console/js/main.js | 40 - .../console/login.jag | 30 - .../console/modules/README | 1 - .../console/modules/file.js | 34 - .../console/modules/mime.js | 43 - .../console/modules/pinch.min.js | 25 - .../modules/security/security.manager.js | 94 - .../modules/security/security.provider.js | 71 - .../console/subscribe_cartridge.jag | 70 - .../console/tenant_management.jag | 42 - .../console/tenant_new.jag | 26 - .../console/themes/README | 1 - .../console/themes/theme1/pages/index.hbs | 111 - .../console/themes/theme1/pages/plain.hbs | 87 - .../themes/theme1/partials/cartridge_info.hbs | 126 - .../theme1/partials/cartridge_info_sg.hbs | 125 - .../themes/theme1/partials/cartridges.hbs | 113 - .../theme1/partials/configure_stratos.hbs | 107 - .../partials/configure_stratos_wizard.hbs | 485 -- .../themes/theme1/partials/dashboard.hbs | 44 - .../themes/theme1/partials/error_page.hbs | 40 - .../console/themes/theme1/partials/header.hbs | 340 - .../console/themes/theme1/partials/login.hbs | 54 - .../themes/theme1/partials/mycartridges.hbs | 98 - .../theme1/partials/subscribe_cartridge.hbs | 294 - .../theme1/partials/tenant_management.hbs | 85 - .../themes/theme1/partials/tenant_new.hbs | 99 - .../console/themes/theme1/partials/title.hbs | 22 - .../themes/theme1/renderers/account_recovery.js | 44 - .../themes/theme1/renderers/cartridge_info.js | 101 - .../theme1/renderers/cartridge_info_sg.js | 99 - .../themes/theme1/renderers/cartridges.js | 161 - .../theme1/renderers/configure_stratos.js | 163 - .../renderers/configure_stratos_wizard.js | 157 - .../themes/theme1/renderers/dashboard.js | 98 - .../console/themes/theme1/renderers/index.js | 183 - .../console/themes/theme1/renderers/login.js | 58 - .../theme1/renderers/subscribe_cartridge.js | 119 - .../theme1/renderers/tenant_management.js | 103 - .../themes/theme1/renderers/tenant_new.js | 66 - .../theme1/subthemes/theme2/ui/css/main.css | 600 -- .../console/themes/theme1/theme.js | 104 - .../themes/theme1/ui/Open_Sans/LICENSE.txt | 202 - .../theme1/ui/Open_Sans/OpenSans-Bold.ttf | Bin 224592 -> 0 bytes .../theme1/ui/Open_Sans/OpenSans-BoldItalic.ttf | Bin 213292 -> 0 bytes .../theme1/ui/Open_Sans/OpenSans-ExtraBold.ttf | Bin 222584 -> 0 bytes .../ui/Open_Sans/OpenSans-ExtraBoldItalic.ttf | Bin 213420 -> 0 bytes .../theme1/ui/Open_Sans/OpenSans-Italic.ttf | Bin 212896 -> 0 bytes .../theme1/ui/Open_Sans/OpenSans-Light.ttf | Bin 222412 -> 0 bytes .../ui/Open_Sans/OpenSans-LightItalic.ttf | Bin 213128 -> 0 bytes .../theme1/ui/Open_Sans/OpenSans-Regular.ttf | Bin 217360 -> 0 bytes .../theme1/ui/Open_Sans/OpenSans-Semibold.ttf | Bin 221328 -> 0 bytes .../ui/Open_Sans/OpenSans-SemiboldItalic.ttf | Bin 212820 -> 0 bytes .../themes/theme1/ui/Open_Sans/open_sans.css | 39 - .../themes/theme1/ui/css/bootstrap-missing.css | 995 --- .../themes/theme1/ui/css/bootstrap-theme.css | 404 - .../theme1/ui/css/bootstrap-theme.min.css | 1 - .../console/themes/theme1/ui/css/bootstrap.css | 7118 ------------------ .../themes/theme1/ui/css/bootstrap.min.css | 9 - .../console/themes/theme1/ui/css/dialog.css | 149 - .../console/themes/theme1/ui/css/main.css | 677 -- .../images/222222_11x11_icon_close.gif | Bin 62 -> 0 bytes .../images/222222_11x11_icon_resize_se.gif | Bin 61 -> 0 bytes .../smoothness/images/222222_7x7_arrow_left.gif | Bin 53 -> 0 bytes .../images/222222_7x7_arrow_right.gif | Bin 53 -> 0 bytes .../images/454545_11x11_icon_close.gif | Bin 62 -> 0 bytes .../smoothness/images/454545_7x7_arrow_left.gif | Bin 53 -> 0 bytes .../images/454545_7x7_arrow_right.gif | Bin 53 -> 0 bytes .../images/888888_11x11_icon_close.gif | Bin 62 -> 0 bytes .../smoothness/images/888888_7x7_arrow_left.gif | Bin 53 -> 0 bytes .../images/888888_7x7_arrow_right.gif | Bin 53 -> 0 bytes .../css/smoothness/images/animated-overlay.gif | Bin 1738 -> 0 bytes .../dadada_40x100_textures_02_glass_75.png | Bin 214 -> 0 bytes .../e6e6e6_40x100_textures_02_glass_75.png | Bin 211 -> 0 bytes .../images/ffffff_40x100_textures_01_flat_0.png | Bin 178 -> 0 bytes .../ffffff_40x100_textures_02_glass_65.png | Bin 207 -> 0 bytes .../images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 212 -> 0 bytes .../images/ui-bg_flat_75_ffffff_40x100.png | Bin 208 -> 0 bytes .../images/ui-bg_glass_55_fbf9ee_1x400.png | Bin 335 -> 0 bytes .../images/ui-bg_glass_65_ffffff_1x400.png | Bin 207 -> 0 bytes .../images/ui-bg_glass_75_dadada_1x400.png | Bin 262 -> 0 bytes .../images/ui-bg_glass_75_e6e6e6_1x400.png | Bin 262 -> 0 bytes .../images/ui-bg_glass_95_fef1ec_1x400.png | Bin 332 -> 0 bytes .../ui-bg_highlight-soft_75_cccccc_1x100.png | Bin 280 -> 0 bytes .../images/ui-icons_222222_256x240.png | Bin 6922 -> 0 bytes .../images/ui-icons_2e83ff_256x240.png | Bin 4549 -> 0 bytes .../images/ui-icons_454545_256x240.png | Bin 6992 -> 0 bytes .../images/ui-icons_888888_256x240.png | Bin 6999 -> 0 bytes .../images/ui-icons_cd0a0a_256x240.png | Bin 4549 -> 0 bytes .../smoothness/jquery-ui-1.10.3.custom.min.css | 7 - .../ui/css/smoothness/jqueryui-themeroller.css | 856 --- .../theme1/ui/custom-font-new/LICENSE.txt | 21 - .../themes/theme1/ui/custom-font-new/README.txt | 75 - .../theme1/ui/custom-font-new/config.json | 1272 ---- .../theme1/ui/custom-font-new/css/animation.css | 85 - .../ui/custom-font-new/css/fontello-codes.css | 186 - .../custom-font-new/css/fontello-embedded.css | 239 - .../custom-font-new/css/fontello-ie7-codes.css | 186 - .../ui/custom-font-new/css/fontello-ie7.css | 197 - .../theme1/ui/custom-font-new/css/fontello.css | 237 - .../themes/theme1/ui/custom-font-new/demo.html | 545 -- .../theme1/ui/custom-font-new/font/fontello.eot | Bin 42600 -> 0 bytes .../theme1/ui/custom-font-new/font/fontello.svg | 196 - .../theme1/ui/custom-font-new/font/fontello.ttf | Bin 42432 -> 0 bytes .../ui/custom-font-new/font/fontello.woff | Bin 30096 -> 0 bytes .../console/themes/theme1/ui/img/asf-logo.png | Bin 10292 -> 0 bytes .../console/themes/theme1/ui/img/btn-down.png | Bin 738 -> 0 bytes .../themes/theme1/ui/img/btn-restart.png | Bin 801 -> 0 bytes .../console/themes/theme1/ui/img/btn-start.png | Bin 644 -> 0 bytes .../console/themes/theme1/ui/img/clouds.png | Bin 6663 -> 0 bytes .../console/themes/theme1/ui/img/confirm.gif | Bin 2324 -> 0 bytes .../console/themes/theme1/ui/img/dash.png | Bin 927 -> 0 bytes .../console/themes/theme1/ui/img/details.png | Bin 21148 -> 0 bytes .../console/themes/theme1/ui/img/diagram.png | Bin 75441 -> 0 bytes .../console/themes/theme1/ui/img/error.gif | Bin 2258 -> 0 bytes .../console/themes/theme1/ui/img/favicon.png | Bin 585 -> 0 bytes .../console/themes/theme1/ui/img/gray.png | Bin 144 -> 0 bytes .../console/themes/theme1/ui/img/icon-lock.png | Bin 337 -> 0 bytes .../console/themes/theme1/ui/img/icon-plus.png | Bin 178 -> 0 bytes .../themes/theme1/ui/img/icon-problem-dark.png | Bin 495 -> 0 bytes .../themes/theme1/ui/img/icon-problem-light.png | Bin 499 -> 0 bytes .../themes/theme1/ui/img/icon-problem.png | Bin 499 -> 0 bytes .../console/themes/theme1/ui/img/icon-user.png | Bin 447 -> 0 bytes .../console/themes/theme1/ui/img/image_10.png | Bin 49844 -> 0 bytes .../console/themes/theme1/ui/img/info.gif | Bin 2349 -> 0 bytes .../themes/theme1/ui/img/login-shadow.png | Bin 1214 -> 0 bytes .../themes/theme1/ui/img/logo-inside.png | Bin 7563 -> 0 bytes .../console/themes/theme1/ui/img/logo-login.png | Bin 6223 -> 0 bytes .../console/themes/theme1/ui/img/overlay.png | Bin 144 -> 0 bytes .../console/themes/theme1/ui/img/panel-back.png | Bin 152 -> 0 bytes .../console/themes/theme1/ui/img/repeat.png | Bin 7371 -> 0 bytes .../themes/theme1/ui/img/tmp-details.png | Bin 63979 -> 0 bytes .../themes/theme1/ui/img/transparent-white.png | Bin 144 -> 0 bytes .../console/themes/theme1/ui/img/warning.gif | Bin 2345 -> 0 bytes .../themes/theme1/ui/js/configure_stratos.js | 32 - .../console/themes/theme1/ui/js/dashboard.js | 417 - .../console/themes/theme1/ui/js/login.js | 89 - .../console/themes/theme1/ui/js/mycartridges.js | 45 - .../console/themes/theme1/ui/js/popup.js | 102 - .../themes/theme1/ui/js/tenant_management.js | 114 - .../console/themes/theme1/ui/js/utils.js | 42 - .../themes/theme1/ui/js/vendor/bootstrap.js | 1999 ----- .../themes/theme1/ui/js/vendor/bootstrap.min.js | 6 - .../theme1/ui/js/vendor/jquery-1.10.1.min.js | 6 - .../ui/js/vendor/jquery-ui-1.10.3.custom.min.js | 6 - .../theme1/ui/js/vendor/jquery.validate.min.js | 2 - .../console/themes/theme1/ui/js/wizard.js | 141 - .../console/util/acl.jag | 100 - .../console/util/utility.jag | 472 -- 186 files changed, 24533 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/README ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/README b/components/org.apache.stratos.manager.console/console/README deleted file mode 100644 index 68be986..0000000 --- a/components/org.apache.stratos.manager.console/console/README +++ /dev/null @@ -1,34 +0,0 @@ -This component contains the console web application written in jaggeryjs (httpL://jaggeryjs.org) - -#Permissions -================== -View subscribed cartridges - view -View cartridges - view - -Subscribe to cartridges - subscribe - -Partition Deploy - configure -View Partitions - configure -Policy Deployments - configure -View Deployments - configure -LBs Deployments - configure -View Deployments - configure -Cartridge Deployments - configure -View Cartridges - configure -Multi-Tenant Service Deployments - configure -View MT Service Deployments - configure - -View Tenants - tenant-mgt - -Configure Stratos Wizard - configure - -#apache-stratos-console -================== - -SSO configuration in the IDP side - -- Issuer : console -- assertion consuming URL : https://localhost:9443/console/controllers/acs.jag -- enable response signing -- enable assertion signing -- audience restriction - https://localhost:9445/oauth2/token \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/apis/README ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/apis/README b/components/org.apache.stratos.manager.console/console/apis/README deleted file mode 100644 index 0ac0f3d..0000000 --- a/components/org.apache.stratos.manager.console/console/apis/README +++ /dev/null @@ -1 +0,0 @@ -Contain all apis exposed from this webapp http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/app.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/app.js b/components/org.apache.stratos.manager.console/console/app.js deleted file mode 100644 index 5e8443a..0000000 --- a/components/org.apache.stratos.manager.console/console/app.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * 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. - * -*/ - -var caramel = require('caramel'); - -caramel.configs({ - context: '/console', - cache: true, - negotiation: true, - themer: function () { - return 'theme1'; - }/*, - languagesDir: '/i18n', - language: function() { - return 'si'; - }*/ -}); http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/cartridge_info.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/cartridge_info.jag b/components/org.apache.stratos.manager.console/console/cartridge_info.jag deleted file mode 100644 index 3b45af6..0000000 --- a/components/org.apache.stratos.manager.console/console/cartridge_info.jag +++ /dev/null @@ -1,75 +0,0 @@ -<% -/* - * - * 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. - * - */ -var caramel = require('caramel'); -var error = []; -var utils = require('/util/utility.jag'); -var process = require('process'); -var log = new Log('utility.cartridgeInfo'); -var alias = request.getParameter("alias"); -var lbCluster = {}; -var cartridgeInfo = utils.consoleAppUtil.getCartridgeInfo(alias); - -if(cartridgeInfo == null || cartridgeInfo == undefined || cartridgeInfo == ""){ - cartridgeInfo = {}; -} - -if(cartridgeInfo.Error != undefined){ - error.push(cartridgeInfo.Error); -}else{ - if(cartridgeInfo.cartridge == undefined){ - cartridgeInfo.cartridge = cartridgeInfo; - } - /* - if(cartridgeInfo.cartridge.lbClusterId) { - lbCluster = utils.consoleAppUtil.getClusterInfo(cartridgeInfo.cartridge.lbClusterId); - if(lbCluster.Error != undefined){ - error.push(lbCluster.Error); - } - } - */ - lbCluster = utils.consoleAppUtil.getLBClusterInfo(); - if(lbCluster == null || lbCluster == undefined || lbCluster == ""){ - lbCluster = {}; - } - if(lbCluster.Error != undefined){ - error.push(lbCluster.Error); - } - - var clusterInfo = utils.consoleAppUtil.getClusterInfoWithAlias(cartridgeInfo.cartridge.cartridgeType, alias); - if(clusterInfo == null || clusterInfo == undefined || clusterInfo == ""){ - clusterInfo = {}; - } - if(clusterInfo.Error != undefined){ - error.push(clusterInfo.Error); - } -} - -var bamInfo ={bamip:process.getProperty('bam.ip'),bamport:process.getProperty('bam.port')}; - -caramel.render({ - cartridgeInfo:cartridgeInfo, - lbCluster:lbCluster, - clusterInfo:clusterInfo, - bamInfo:bamInfo, - error:error -}); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/cartridge_info_sg.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/cartridge_info_sg.jag b/components/org.apache.stratos.manager.console/console/cartridge_info_sg.jag deleted file mode 100644 index 7c874f3..0000000 --- a/components/org.apache.stratos.manager.console/console/cartridge_info_sg.jag +++ /dev/null @@ -1,80 +0,0 @@ -<% -/* - * - * 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. - * - */ -var caramel = require('caramel'); -var error = []; -var utils = require('/util/utility.jag'); -var log = new Log('utility.cartridgeInfo'); -var process = require('process'); -var serviceGroup = request.getParameter("serviceGroup"); -//Get all alias for a service group -var cartridges = utils.consoleAppUtil.getCartridgeServiceGroup(serviceGroup); - -if(cartridges == null || cartridges == undefined || cartridges == ""){ - cartridges = {}; -} -cartridges=cartridges.cartridge; - -if(cartridges.Error != undefined){ - error.push(cartridges.Error); -}else{ - var i; - for(i=0;i<cartridges.length;i++){ - var cartridgeInfo = cartridges[i]; - if(cartridgeInfo.cartridge != undefined){ - cartridgeInfo = cartridgeInfo.cartridge; - } - var alias = cartridges[i].cartridgeAlias; - var lbCluster = {}; - - lbCluster = utils.consoleAppUtil.getLBClusterInfo(); - if(lbCluster == null || lbCluster == undefined || lbCluster == ""){ - lbCluster = {}; - } - if(lbCluster.Error != undefined){ - error.push(lbCluster.Error); - }else{ - //cartridges[i].lbClusterinfo = {member:[{memberIp:"foo"},{}]};//lbCluster.cluster; - //cartridges[i].lbClusterinfo = lbCluster.cluster[0]; - cartridges[i].lbclusterinfo = lbCluster.cluster[0]; - } - - //Getting the clusterInfo and putting it to the relevant cartridge json - var clusterInfo = utils.consoleAppUtil.getClusterInfoWithAlias(cartridgeInfo.cartridgeType, alias); - if(clusterInfo == null || clusterInfo == undefined || clusterInfo == ""){ - clusterInfo = {}; - } - if(clusterInfo.Error != undefined){ - error.push(clusterInfo.Error); - }else{ - cartridges[i].clusterInfo = clusterInfo.cluster[0]; - } - } -} - -var bamInfo ={bamip:process.getProperty('bam.ip'),bamport:process.getProperty('bam.port')}; -caramel.render({ - cartridges:cartridges, - serviceGroup:serviceGroup, - bamInfo:bamInfo, - error:error -}); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/cartridges.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/cartridges.jag b/components/org.apache.stratos.manager.console/console/cartridges.jag deleted file mode 100644 index 3403427..0000000 --- a/components/org.apache.stratos.manager.console/console/cartridges.jag +++ /dev/null @@ -1,41 +0,0 @@ -<% -/* - * - * 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. - * - */ -var caramel = require('caramel'); -var error = []; -var utils = require('/util/utility.jag'); -var process = require('process'); -var availableCartridges = utils.consoleAppUtil.getCartridges(); - -if(availableCartridges == null || availableCartridges == undefined || availableCartridges == ""){ - availableCartridges = {}; -} -if(availableCartridges.Error != undefined){ - error.push(availableCartridges.Error); -} - -var bamInfo ={bamip:process.getProperty('bam.ip'),bamport:process.getProperty('bam.port')}; -caramel.render({ - cartridges:availableCartridges, - bamInfo:bamInfo, - error:error -}); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/config/acl.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/config/acl.json b/components/org.apache.stratos.manager.console/console/config/acl.json deleted file mode 100644 index 0bb881c..0000000 --- a/components/org.apache.stratos.manager.console/console/config/acl.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "carbonsuper": { - "admin": ["view", "edit", "subscribe","configure","tenant-mgt", "tenant-edit"], - "Internal/admin": ["view", "edit", "subscribe","configure","tenant-mgt", "tenant-edit"], - "Internal/Everyone": ["view", "tenant-edit"] - }, - "tenants": { - "admin": ["view","subscribe", "post"], - "Internal/admin": ["view","subscribe", "post"], - "Internal/Everyone": ["test1","test2","view"] - } -} http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/config/console.js ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/config/console.js b/components/org.apache.stratos.manager.console/console/config/console.js deleted file mode 100644 index abfc2eb..0000000 --- a/components/org.apache.stratos.manager.console/console/config/console.js +++ /dev/null @@ -1,40 +0,0 @@ -/* - * - * 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. - * -*/ - -var config = function () { - var log = new Log(), - pinch = require('/modules/pinch.min.js').pinch, - config = require('/config/console.json'), - process = require('process'), - localIP = process.getProperty('server.host'), - httpPort = process.getProperty('http.port'), - httpsPort = process.getProperty('https.port'); - - pinch(config, /^/, function (path, key, value) { - if ((typeof value === 'string') && value.indexOf('%https.host%') > -1) { - return value.replace('%https.host%', 'https://' + localIP + ':' + httpsPort); - } else if ((typeof value === 'string') && value.indexOf('%http.host%') > -1) { - return value.replace('%http.host%', 'http://' + localIP + ':' + httpPort); - } - return value; - }); - return config; - }; http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/config/console.json ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/config/console.json b/components/org.apache.stratos.manager.console/console/config/console.json deleted file mode 100644 index 1d415b8..0000000 --- a/components/org.apache.stratos.manager.console/console/config/console.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "backendServerConfiguration":{ - "url":"%https.host%/stratos/admin" - }, - - "oauthConfiguration":{ - "clientId":"", - "clientSecret":"", - "tokenEndpoint":"%https.host%/oauth2/token" - }, - - "ssoConfiguration": { - "enabled": false, - "issuer": "console", - "identityProviderURL": "%https.host%/sso/samlsso.jag", - "keyStorePassword": "wso2carbon", - "identityAlias": "wso2carbon", - "responseSigningEnabled": "true", - "storeAcs" : "%https.host%/console/controllers/acs", - "keyStoreName": "/repository/resources/security/wso2carbon.jks" - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/configure_stratos.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/configure_stratos.jag b/components/org.apache.stratos.manager.console/console/configure_stratos.jag deleted file mode 100644 index 8718bbc..0000000 --- a/components/org.apache.stratos.manager.console/console/configure_stratos.jag +++ /dev/null @@ -1,114 +0,0 @@ -<% -/* - * - * 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. - * - */ -var caramel = require('caramel'); -var error = []; -var step = request.getParameter('step'); - var log = new Log("config.stratos"); - -if(step == null){ - step = 1; -} - -var step_data = {}; - -var wizard = { - "step":step -}; - -var utils = require('/util/utility.jag'); -var config_status = utils.consoleAppUtil.getConfigStatus(); - -if(wizard.step == 1){ - var step_data = utils.consoleAppUtil.getPartitions(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.partition; - } -}else if(wizard.step == 2){ - step_data = utils.consoleAppUtil.getPolicyAutoScale(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.autoscalePolicy; - } -}else if(wizard.step == 3){ - step_data = utils.consoleAppUtil.getPolicyDeployment(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.deploymentPolicy; - } -}else if(wizard.step == 4){ - step_data = utils.consoleAppUtil.getLbCartridges(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.cartridge; - } -}else if(wizard.step == 5){ - step_data = utils.consoleAppUtil.getCartridges(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.cartridge; - for(var i=0;i<step_data.length;i++) { - if(step_data[i].loadBalancer == true ) { - step_data.splice(i,1); - i = i - 1; - } - } - } -}else if(wizard.step == 6){ - step_data = utils.consoleAppUtil.getServices(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.serviceDefinitionBean; - } -} - -caramel.render({ - step_data:step_data, - wizard:wizard, - config_status:config_status, - error:error -}); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag b/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag deleted file mode 100644 index 314b1a7..0000000 --- a/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag +++ /dev/null @@ -1,113 +0,0 @@ -<% -/* - * - * 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. - * - */ -var caramel = require('caramel'); -var error = []; -var process = require('process'); -var step = request.getParameter('step'); -if(step == null){ - step = 1; -} - -var step_data = {}; - -var wizard = { - "step":step -}; - -var utils = require('/util/utility.jag'); - -if(wizard.step == 1){ - var step_data = utils.consoleAppUtil.getPartitions(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.partition; - } -}else if(wizard.step == 2){ - step_data = utils.consoleAppUtil.getPolicyAutoScale(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.autoscalePolicy; - } -}else if(wizard.step == 3){ - step_data = utils.consoleAppUtil.getPolicyDeployment(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.deploymentPolicy; - } -}else if(wizard.step == 4){ - step_data = utils.consoleAppUtil.getLbCartridges(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.cartridge; - } - }else if(wizard.step == 5){ - step_data = utils.consoleAppUtil.getCartridges(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.cartridge; - for(var i=0;i<step_data.length;i++) { - if(step_data[i].loadBalancer == true ) { - step_data.splice(i,1); - i = i - 1; - } - } - } -}else if(wizard.step == 6){ - step_data = utils.consoleAppUtil.getServices(); - if(step_data == null || step_data == undefined || step_data == ""){ - step_data = {}; - } - if(step_data.Error != undefined){ - error.push(step_data.Error); - }else{ - step_data = step_data.serviceDefinitionBean; - } -} - -var bamInfo ={bamip:process.getProperty('bam.ip'),bamport:process.getProperty('bam.port')}; -caramel.render({ - step_data:step_data, - wizard:wizard, - bamInfo:bamInfo, - error:error -}); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/README ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/README b/components/org.apache.stratos.manager.console/console/controllers/README deleted file mode 100644 index bdd0c86..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/README +++ /dev/null @@ -1 +0,0 @@ -Contains controllers required for this project http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/acs.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/acs.jag b/components/org.apache.stratos.manager.console/console/controllers/acs.jag deleted file mode 100644 index d4467da..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/acs.jag +++ /dev/null @@ -1,103 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function () { - var log = new Log(); - log.debug("console ACS page...."); - var configs = require('/config/console.js').config(), - process = require("process"), - util = require('/util/utility.jag'), - samlResponse = request.getParameter('SAMLResponse'), - sessionId = session.getId(), - samlRequest = request.getParameter('SAMLRequest'), - relayState = request.getParameter('RelayState'), - sso = require('sso'), - samlRespObj, - keyStoreProps = { - KEY_STORE_NAME: process.getProperty('carbon.home') + configs.ssoConfiguration.keyStoreName, - KEY_STORE_PASSWORD: configs.ssoConfiguration.keyStorePassword, - IDP_ALIAS: configs.ssoConfiguration.identityAlias - }, - sso_sessions = application.get('sso_sessions'); - log.debug("SAML request :"+ samlRequest); - log.debug("SAML response : "+ samlResponse); - - if (!sso_sessions) { - application.put('sso_sessions', {}); - sso_sessions = application.get('sso_sessions'); - } - - if (samlResponse != null) { - samlRespObj = sso.client.getSamlObject(samlResponse); - log.info("SAML response object :" + samlRespObj); - if (!sso.client.isLogoutResponse(samlRespObj)) { - - // validating the signature - if (configs.ssoConfiguration.responseSigningEnabled) { - - if (sso.client.validateSignature(samlRespObj, keyStoreProps)) { - var sessionObj = sso.client.decodeSAMLLoginResponse(samlRespObj, samlResponse, sessionId); - var samlToken = sso.client.getB64EncodedtSAMLAssertion(samlRespObj); - var tenantDomain = sso.client.getTenantDomain(samlRespObj); - var roleArray = sso.client.getRoleList(samlRespObj); - log.info("B64 encoded SAML2Token : " + samlToken.b64Encoded); - log.info("Logged in user : " + sessionObj.loggedInUser); - log.info("Tenant domain : " + tenantDomain); - log.info("Role List of current tenant : "+ roleArray); - log.info("B64 encoded SAML2Token : " + samlToken.b64Encoded); - var encodedString = sso.client.b64encode("LATjzZ4FvQc2gFEfwcitay78lQQa:LeZD0oN0ZLTLjLmRqphX4Ulrr5wa"); - log.info("encoded string : " + encodedString); - var accessToken = util.consoleAppUtil.getOauthAccessToken(samlToken.b64Encoded,encodedString); - log.info(accessToken.data.access_token); - session.put("access_token",accessToken.data.access_token); - if (sessionObj.sessionIndex != null || sessionObj.sessionIndex != 'undefined') { - require('console').server.current(session, sessionObj.loggedInUser); - session.put("IS_LOGGED_IN", true); - session.put("TENANT_DOMAIN",tenantDomain); - session.put("ROLE_ARRAY",roleArray); - sso_sessions[sessionObj.sessionId] = sessionObj.sessionIndex; - response.sendRedirect('/console'); - } - } - } - - } else { - session.invalidate(); - response.sendRedirect('/console'); - } - } - - // if saml request is a log out request, then invalidate session. - if (samlRequest != null) { - var index = sso.client.decodeSAMLLogoutRequest(sso.client.getSamlObject(samlRequest)); - log.debug('BACKEND LOGOUT RECIEVED FROM STORE THE INDEX IS ######' + index); - - var jSessionId = application.get('sso_sessions')[index]; - - delete application.get('sso_sessions')[index]; - - - log.debug('portal Session Id :::' + jSessionId); - - session.invalidate(); - } -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/cartridgeDefintionSubmit.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/cartridgeDefintionSubmit.jag b/components/org.apache.stratos.manager.console/console/controllers/cartridgeDefintionSubmit.jag deleted file mode 100644 index b500cd0..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/cartridgeDefintionSubmit.jag +++ /dev/null @@ -1,35 +0,0 @@ -<% -/* - * - * 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. - * - */ - -(function(){ - var log = new Log("controller.cartridgeDefinitionSubmit"); - var utils = require('/util/utility.jag'); - var cartridgeDefinition = request.getParameter("cartridge-definition").trim(); - var response = utils.consoleAppUtil.deployCartridgeDefinition(cartridgeDefinition); - response.sendRedirect(request.getContextPath() + '/cartridge_deployments.jag'); - if(response.data) { - session.put("Action successful"); - } else { - session.put("Error occurred while deploying the cartidge"); - } -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/cartridgeSubscribeSubmit.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/cartridgeSubscribeSubmit.jag b/components/org.apache.stratos.manager.console/console/controllers/cartridgeSubscribeSubmit.jag deleted file mode 100644 index 48af400..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/cartridgeSubscribeSubmit.jag +++ /dev/null @@ -1,140 +0,0 @@ -<% -/* - * - * 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. - * - */ - -(function(){ - var log = new Log("controller.cartridgeSubscribeSubmit"); - var utils = require('/util/utility.jag'); - var jsonRequest = {}; - var error = []; - jsonRequest = {}; - var cartridgeType = request.getParameter('cartridgeType'); - var alias = request.getParameter('alias'); - var repoURL = request.getParameter('repoURL'); - var isPublicRepo = request.getParameter('isPublicRepo'); - var repoUsername = request.getParameter('repoUsername'); - var repoPassword = request.getParameter('repoPassword'); - var autoscalePolicy = request.getParameter('autoscalePolicy'); - var deploymentPolicy = request.getParameter('deploymentPolicy'); - var size = request.getParameter('size'); - var removeontermination = request.getParameter('removeOnUnsubscription'); - var persistencerequired = request.getParameter('persistencerequired'); - var commitsEnabled = request.getParameter('commitsEnabled'); - var serviceGroup = request.getParameter('serviceGroup'); - - if(persistencerequired == "on"){ - persistencerequired = true; - } else { - persistencerequired = false; - } - - if(commitsEnabled == "on"){ - commitsEnabled = true; - } else { - commitsEnabled = false; - } - - if(removeontermination == "on"){ - removeontermination = true; - } else { - removeontermination = false; - } - // constructing the json request - // jsonRequest.cartridgeType = cartridgeType; - jsonRequest.alias = alias; - jsonRequest.repoURL = repoURL; - jsonRequest.privateRepo = !isPublicRepo; - if(!isPublicRepo){ - jsonRequest.repoUsername = repoUsername; - jsonRequest.repoPassword = repoPassword; - - } - jsonRequest.autoscalePolicy = autoscalePolicy; - jsonRequest.deploymentPolicy = deploymentPolicy; - if (size != null && size != ""){ - jsonRequest.size = size; - } - jsonRequest.persistanceRequired = persistencerequired; - jsonRequest.commitsEnabled = commitsEnabled; - jsonRequest.removeOnTermination = removeontermination; - - if(serviceGroup != undefined) { - var step_data = {}; - step_data = utils.consoleAppUtil.getCartridges(); - if(step_data.Error != undefined){ - error.push(step_data.Error); - } else { - if(step_data.Error != undefined){ - error.push(step_data.Error); - } else { - step_data = step_data.cartridge; - for(var i=0;i<step_data.length;i++) { - if(step_data[i].serviceGroup == undefined || - step_data[i].serviceGroup == null || - step_data[i].serviceGroup != serviceGroup) { - step_data.splice(i,1); - i = i - 1; - } - } - log.debug("Service group data : " + stringify(step_data)); - - var repoUrl = null; - for(var i=0;i<step_data.length;i++) { - //subscribe to cartridges separately which falls in the same service group - jsonRequest.alias = alias + i; - jsonRequest.cartridgeType = step_data[i].cartridgeType; - - // the following is a great dirty hack to share the same repo between gateway workers and gateway managers :( - if (repoUrl != null && repoUrl != undefined) { - log.debug("Setting previously created internal repo URL " + repoUrl); - // if a repoUrl has been returne with previous subscription response, set it to request params - jsonRequest.repoURL = repoUrl; - } - - var re = utils.consoleAppUtil.subscribeToCartridge(jsonRequest); - if(re.Error != undefined){ - session.put("errorinbackend", re.Error); - } else { - log.debug("Request :" + stringify(jsonRequest) + ", \n Response : " + stringify(re)) ; - // check if the repo Url returned in response is valid. If so, assign it to a variable to use in the next - // subscription call - if(re.subscriptionInfo != undefined && re.subscriptionInfo.repositoryURL != undefined && - re.subscriptionInfo.repositoryURL != null) { - repoUrl = re.subscriptionInfo.repositoryURL; - } - } - - } - } - } - - } else { - jsonRequest.cartridgeType = cartridgeType; - var result = utils.consoleAppUtil.subscribeToCartridge(jsonRequest); - if(result.Error != undefined){ - session.put("errorinbackend", result.Error); - } - } - - response.sendRedirect(request.getContextPath() + '/index.jag'); -}()); -%> - http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/cartridgeUnsubscribeSubmit.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/cartridgeUnsubscribeSubmit.jag b/components/org.apache.stratos.manager.console/console/controllers/cartridgeUnsubscribeSubmit.jag deleted file mode 100644 index 3340c73..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/cartridgeUnsubscribeSubmit.jag +++ /dev/null @@ -1,54 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.cartridgeUnsubscribeSubmit"); - var utils = require('/util/utility.jag'); - var alias = request.getParameter('alias'); - var serviceGroup = request.getParameter('serviceGroup'); - var error = []; - - if(serviceGroup != undefined && serviceGroup != null && serviceGroup != "") { - var step_data = {}; - step_data = utils.consoleAppUtil.getSubscribedCartridges(); - if(step_data.Error != undefined){ - error.push(step_data.Error); - } else { - step_data = step_data.cartridge; - for(var i=0;i<step_data.length;i++) { - if(step_data[i].serviceGroup == undefined || - step_data[i].serviceGroup == null || - step_data[i].serviceGroup != serviceGroup) { - step_data.splice(i,1); - i = i - 1; - } - } - - for(var i=0;i<step_data.length;i++) { - var result = utils.consoleAppUtil.unsubscribeCartridge(step_data[i].cartridgeAlias); - } - } - } else { - var result = utils.consoleAppUtil.unsubscribeCartridge(alias); - } - response.sendRedirect(request.getContextPath() + '/index.jag'); -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/checkAvailability.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/checkAvailability.jag b/components/org.apache.stratos.manager.console/console/controllers/checkAvailability.jag deleted file mode 100644 index 54753aa..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/checkAvailability.jag +++ /dev/null @@ -1,31 +0,0 @@ -<% -/* - * - * 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. - * - */ -var log = new Log("controller.manage.tenants"); -var utils = require('/util/utility.jag'); -var domain = request.getParameter("domain").trim(); -var available = utils.consoleAppUtil.checkAvailability(domain); -if(!available) { - print(available); -} else { - print(available); -} -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/dashboard.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/dashboard.jag b/components/org.apache.stratos.manager.console/console/controllers/dashboard.jag deleted file mode 100644 index f098ac3..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/dashboard.jag +++ /dev/null @@ -1,35 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.partitionDefinitionSubmit"); - var utils = require('/util/utility.jag'); - var action = request.getParameter("action"); - if(action != null && action == "get_elbs"){ - var elbs = require('/data/elbs.json'); - print(elbs); - } - if(action != null && action == "get_topology"){ - var clusters = require('/data/dashboard.json'); - print(clusters); - } -})(); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/lbDefinitionSubmit.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/lbDefinitionSubmit.jag b/components/org.apache.stratos.manager.console/console/controllers/lbDefinitionSubmit.jag deleted file mode 100644 index 845b0c9..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/lbDefinitionSubmit.jag +++ /dev/null @@ -1,29 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.lbDefinitionSubmit"); - var utils = require('/util/utility.jag'); - var lbDefinition = request.getParameter("lb-definition").trim(); - utils.consoleAppUtil.deployLbDefinition(lbDefinition); - response.sendRedirect(request.getContextPath() + '/lbs.jag'); -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/login.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/login.jag b/components/org.apache.stratos.manager.console/console/controllers/login.jag deleted file mode 100644 index e42719f..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/login.jag +++ /dev/null @@ -1,65 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controllers.login.jag"); - var dataConfig = require('/config/console.js').config(); - if(!dataConfig.ssoConfiguration.enabled){ - request.getMappedPath = function() { - return '/login.jag'; // setting path for caramel framework - }; - include('/login.jag'); - } else { - var sso = require("sso"), - process = require("process"), - sessionId = session.getId(), - requestURI, - requestedPage = request.getParameter("requestedPage"), - relayState = '/console',log = new Log(); - log.debug(dataConfig.ssoConfiguration.issuer); - var encodedSAMLAuthRequest = sso.client.getEncodedSAMLAuthRequest(dataConfig.ssoConfiguration.issuer); - postUrl = "https://" + process.getProperty('carbon.local.ip') + ":" + "9443"; - log.debug(postUrl); - - if (!session.get("Loged")) { - %> - - <div> - - <p>You are now being redirected to Identity Server. If the - redirection fails, please click on the button below.</p> - <form method="post" action="<%=postUrl%>/samlsso"> - <p> - <input type="hidden" name="SAMLRequest" value="<%= encodedSAMLAuthRequest %>"/> - <input type="hidden" name="RelayState" value="<%= relayState %>"/> - <input type="hidden" name="SSOAuthSessionID" value="<%= sessionId %>"/> - <button type="submit">Redirect manually</button> - </p> - </form> - </div> - <script type = "text/javascript" > - document.forms[0].submit(); - </script> - <% - } - } -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/loginSubmit.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/loginSubmit.jag b/components/org.apache.stratos.manager.console/console/controllers/loginSubmit.jag deleted file mode 100644 index 71065dc..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/loginSubmit.jag +++ /dev/null @@ -1,67 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.credentialSubmit"); - var utils = require('/util/utility.jag'); - var carbon = require('carbon'); - var server = new carbon.server.Server(); - //TODO: handle the angry path... - var username = request.getParameter("username").trim(); - var password = request.getParameter("password"); // not trimming the password - if(username || password){ - session.put("error","Enter your username and password."); - } - //authenticate with carbon usr-store - - - try{ - var auth = server.authenticate(username, password); - - if(!auth){ - session.put("error","The username or password you entered is incorrect."); - }else{ - var userObject = carbon.server.tenantUser(username); - var um = new carbon.user.UserManager({}, userObject.tenantId); - var user = um.getUser(userObject.username); - var roles = user.getRoles(); - //storing in session - session.put("USER_NAME",username); - session.put("TENANT_DOMAIN",userObject.domain); - session.put("ROLE_ARRAY",roles); - session.put("TENANT_ID",userObject.tenantId); - //call the authentication rest-endpoint and get the JSESSION_ID - var result = utils.consoleAppUtil.getSessionCookie(username,password); - //TODO: handle the error scenario - //save the JSESSION_ID in current console.session. - var jSessionId = result.data.Success.sessionId; - session.put("JSESSIONID",jSessionId); - require('console').server.current(session,username); - //redirect - } - response.sendRedirect(request.getContextPath()+'/index.jag'); - }catch (e){ - session.put("error",e.toString()); - response.sendRedirect(request.getContextPath()+'/index.jag'); - } - -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/logout.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/logout.jag b/components/org.apache.stratos.manager.console/console/controllers/logout.jag deleted file mode 100644 index 58971c8..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/logout.jag +++ /dev/null @@ -1,69 +0,0 @@ -<% -/* - * - * 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. - * - */ - -(function(){ - var log = new Log('controllers.logout'); - var user = require('console').server.current(session).username;//session.get("LOGGED_IN_USER"); - var dataConfig = require('/config/console.js').config(); - - if(user === null) { - response.sendRedirect('/portal'); - } else if(!dataConfig.ssoConfiguration.enabled){ - log.debug('invalidating the session...'); - session.invalidate(); - response.sendRedirect(request.getContextPath()); - }else{ - var config = require('/config/console.js').config(), - sso = require('sso'), - sso_sessions = application.get('sso_sessions'), - sessionId = session.getId(), - encodedSAMLLogoutRequest = sso.client.getEncodedSAMLLogoutRequest(user, sso_sessions[session.getId()], config.ssoConfiguration.issuer), - relayState = '/console', - postUrl = "https://" + process.getProperty('carbon.local.ip') + ":" + process.getProperty('https.port'); - - var log = new Log(); - - log.debug("portal session index : " + sso_sessions[session.getId()]); - - %> - <div> - <p>You are now redirected to Stratos Identity. If the - redirection fails, please click the post button.</p> - - <form id="logoutForm" method="post" action="<%=postUrl%>/admin/samlsso"> - <p> - <input type="hidden" name="SAMLRequest" - value="<%= encodedSAMLLogoutRequest %>"/> - <input type="hidden" name="RelayState" value="<%= relayState %>"/> - <input type="hidden" name="SSOAuthSessionID" value="<%= sessionId %>"/> - <button type="submit">POST</button> - </p> - </form> - </div> - <script type = "text/javascript" > - document.forms[0].submit(); - </script> - - <% - } -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/manageTenants.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/manageTenants.jag b/components/org.apache.stratos.manager.console/console/controllers/manageTenants.jag deleted file mode 100644 index 1ec0c2d..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/manageTenants.jag +++ /dev/null @@ -1,60 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.manage.tenants"); - var utils = require('/util/utility.jag'); - var tenantDomain = request.getParameter("foo").trim(); - var state = request.getParameter("state").trim(); - log.debug("tenant domain: " + tenantDomain + " state is: " + state); - if(tenantDomain.indexOf("-") != -1) { - var array = new Array(); - array = tenantDomain.split("-"); - - for(domain in array) { - if(state == "activate") { - utils.consoleAppUtil.activateTenant(array[domain].trim()); - } else if(state == "deactivate") { - utils.consoleAppUtil.deactivateTenant(array[domain].trim()); - } else if(state == "delete") { - utils.consoleAppUtil.deleteTenant(array[domain].trim()); - } - } - response.sendRedirect(request.getContextPath() + '/tenant_management.jag'); - - } else { - - if(state == "activate") { - utils.consoleAppUtil.activateTenant(tenantDomain); - response.sendRedirect(request.getContextPath() + '/tenant_management.jag'); - } else if(state == "deactivate") { - utils.consoleAppUtil.deactivateTenant(tenantDomain); - response.sendRedirect(request.getContextPath() + '/tenant_management.jag'); - } else if(state == "delete") { - utils.consoleAppUtil.deleteTenant(tenantDomain); - response.sendRedirect(request.getContextPath() + '/tenant_management.jag'); - } - } - - - -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/mycartridges.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/mycartridges.jag b/components/org.apache.stratos.manager.console/console/controllers/mycartridges.jag deleted file mode 100644 index 1b0e662..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/mycartridges.jag +++ /dev/null @@ -1,35 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.myCartridges"); - var utils = require('/util/utility.jag'); - var action = request.getParameter("action"); - var alias = request.getParameter("alias"); - log.debug("Action : " + action + " Alias is: " + alias); - - if(action == "sync"){ - utils.consoleAppUtil.syncRepo(alias); - } - - -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/newTenantSubmit.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/newTenantSubmit.jag b/components/org.apache.stratos.manager.console/console/controllers/newTenantSubmit.jag deleted file mode 100644 index ae764e3..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/newTenantSubmit.jag +++ /dev/null @@ -1,48 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.newTenantSubmit"); - var utils = require('/util/utility.jag'); - var jsonRequest = {}; - jsonRequest = {}; - - //get user input - var adminName = request.getParameter("adminName"); - var firstName = request.getParameter("firstName"); - var lastName = request.getParameter("lastName"); - var adminPassword = request.getParameter("adminPassword"); - var email = request.getParameter("email"); - var tenantDomain= request.getParameter("tenantDomain"); - - //create json request - jsonRequest.admin = adminName; - jsonRequest.firstname = firstName; - jsonRequest.lastname = lastName; - jsonRequest.adminPassword = adminPassword; - jsonRequest.email = email; - jsonRequest.tenantDomain = tenantDomain; - - - utils.consoleAppUtil.addTenant(jsonRequest); - response.sendRedirect(request.getContextPath() + '/tenant_management.jag'); -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/partitionDefinitionSubmit.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/partitionDefinitionSubmit.jag b/components/org.apache.stratos.manager.console/console/controllers/partitionDefinitionSubmit.jag deleted file mode 100644 index 220162f..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/partitionDefinitionSubmit.jag +++ /dev/null @@ -1,29 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.partitionDefinitionSubmit"); - var utils = require('/util/utility.jag'); - var partitionDefinition = request.getParameter("partition-definition").trim(); - utils.consoleAppUtil.deployPartitionDefinition(partitionDefinition); - response.sendRedirect(request.getContextPath() + '/partition_deployments.jag'); -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/payloadFactory.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/payloadFactory.jag b/components/org.apache.stratos.manager.console/console/controllers/payloadFactory.jag deleted file mode 100644 index 6d108b5..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/payloadFactory.jag +++ /dev/null @@ -1,70 +0,0 @@ -<% -/* - * - * 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. - * - */ - -var getUserProfile = "<mgt:getUserProfile xmlns:mgt=\"http://mgt.profile.user.identity.carbon.wso2.org\">\n" + - "<mgt:username>{0}</mgt:username>\n" + - "<mgt:profileName>{1}</mgt:profileName>\n" + - "</mgt:getUserProfile>"; - -application.put("urn:getUserProfile", getUserProfile); - - - - -var log = new Log(); - - -function getPayload(method, param){ - - var payload = application.get(method); - - if(payload != null){ - if(param instanceof Array){ - for(var x = 0; x < param.length; x++){ - payload = format(payload, param[x], x); - } - }else{ - payload = format(payload, param, 0); - } - } - - return payload; -} - -function format(variable, value, index){ - var placeHolder = "{" + index + "}"; - var index = variable.indexOf(placeHolder); - if(index > -1){ - var data = variable.split(placeHolder); - var newData = data[0] + value; - if(data.length > 1){ - newData += data[1]; - } - - return newData; - } - - return variable; -} - - -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/policyDefinitionSubmit.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/policyDefinitionSubmit.jag b/components/org.apache.stratos.manager.console/console/controllers/policyDefinitionSubmit.jag deleted file mode 100644 index e7e3705..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/policyDefinitionSubmit.jag +++ /dev/null @@ -1,36 +0,0 @@ -<% -/* - * - * 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. - * - */ -(function(){ - var log = new Log("controller.policyDefinitionSubmit"); - var utils = require('/util/utility.jag'); - var policyDefinition = request.getParameter("policy-definition").trim(); - var policyType = request.getParameter("policyType").trim(); - if(policyType == "autoscale-policy"){ - utils.consoleAppUtil.deployAutoscalePolicyDefinition(policyDefinition); - }else if(policyType == "deployment-policy"){ - utils.consoleAppUtil.deployDeploymentPolicyDefinition(policyDefinition); - }else{ - // exception - } - response.sendRedirect(request.getContextPath() + '/policy_deployments.jag'); -}()); -%> http://git-wip-us.apache.org/repos/asf/stratos/blob/6aabe7d9/components/org.apache.stratos.manager.console/console/controllers/profileClient.jag ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.manager.console/console/controllers/profileClient.jag b/components/org.apache.stratos.manager.console/console/controllers/profileClient.jag deleted file mode 100644 index d5993eb..0000000 --- a/components/org.apache.stratos.manager.console/console/controllers/profileClient.jag +++ /dev/null @@ -1,77 +0,0 @@ -<% -/* - * - * 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. - * - */ - -var payloadFac = require("payloadFactory.jag"); -var util = require("../util/utility.jag"); - -var log = new Log(); -var serverUrl = util.getServerUrl(); - -var ws = require('ws'); -var webService = new ws.WSRequest(); - -function getUserProfile(username, profileName){ - - var options = new Array(); - options.useSOAP = 1.1; - options.action = "urn:getUserProfile"; - - var payload = payloadFac.getPayload(options.action, new Array(username, profileName)); - var result; - - try { - webService.open(options, serverUrl, false, "admin", "admin"); - webService.send(payload); - - if(webService.readyState == 4){ - result = webService.responseXML; - result = util.E4XtoJSON(result); - - result.return.fieldValues = util.sortNumber(result.return.fieldValues, 'displayOrder', true, true); - - for(var x = 0; x < result.return.fieldValues.length; x++){ - var obj = result.return.fieldValues[x]; - if(obj.required === "false"){ - obj.required = ""; - } - - if(obj.readOnly === "false"){ - obj.readOnly = ""; - } - } - log.debug(result); - return result; - } - - } catch (e) { - log.error(e.toString()); - - //TODO send proper error message from i18n file - return ""; - } - -} - - - - -%>
