From a2b08dc4ce29062ecf647ad45298b0076db67db7 Mon Sep 17 00:00:00 2001 From: Dinesh Bandara Date: Fri, 6 Jun 2014 23:41:17 +0530 Subject: [PATCH 01/19] Fix for PAAS-69 - BAM url should be configurable --- .../console/cartridge_info.jag | 3 +++ .../console/cartridge_info_sg.jag | 6 ++++-- .../console/cartridges.jag | 3 +++ .../console/configure_stratos_wizard.jag | 3 +++ .../console/index.jag | 5 +++++ .../console/subscribe_cartridge.jag | 14 ++++++++------ .../console/tenant_management.jag | 3 +++ .../console/themes/theme1/partials/header.hbs | 2 +- .../themes/theme1/renderers/cartridge_info.js | 1 + .../themes/theme1/renderers/cartridge_info_sg.js | 1 + .../console/themes/theme1/renderers/cartridges.js | 1 + .../themes/theme1/renderers/configure_stratos.js | 1 + .../theme1/renderers/configure_stratos_wizard.js | 1 + .../console/themes/theme1/renderers/index.js | 1 + .../themes/theme1/renderers/subscribe_cartridge.js | 1 + .../themes/theme1/renderers/tenant_management.js | 2 ++ .../console/themes/theme1/renderers/tenant_new.js | 1 + 17 files changed, 40 insertions(+), 9 deletions(-) diff --git a/source/components/org.apache.stratos.manager.console/console/cartridge_info.jag b/source/components/org.apache.stratos.manager.console/console/cartridge_info.jag index 6b807972..6f3ea862 100644 --- a/source/components/org.apache.stratos.manager.console/console/cartridge_info.jag +++ b/source/components/org.apache.stratos.manager.console/console/cartridge_info.jag @@ -22,6 +22,7 @@ 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 = {}; @@ -51,10 +52,12 @@ if(cartridgeInfo.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 }); %> diff --git a/source/components/org.apache.stratos.manager.console/console/cartridge_info_sg.jag b/source/components/org.apache.stratos.manager.console/console/cartridge_info_sg.jag index 04d9fdea..772c3924 100644 --- a/source/components/org.apache.stratos.manager.console/console/cartridge_info_sg.jag +++ b/source/components/org.apache.stratos.manager.console/console/cartridge_info_sg.jag @@ -22,7 +22,8 @@ var caramel = require('caramel'); var error = []; var utils = require('/util/utility.jag'); - var log = new Log('utility.cartridgeInfo'); +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); @@ -59,10 +60,11 @@ if(cartridges.Error != undefined){ } } - +var bamInfo ={bamip:process.getProperty('bam.ip'),bamport:process.getProperty('bam.port')}; caramel.render({ cartridges:cartridges, serviceGroup:serviceGroup, + bamInfo:bamInfo, error:error }); %> diff --git a/source/components/org.apache.stratos.manager.console/console/cartridges.jag b/source/components/org.apache.stratos.manager.console/console/cartridges.jag index 8cf0e64c..3060bc1c 100644 --- a/source/components/org.apache.stratos.manager.console/console/cartridges.jag +++ b/source/components/org.apache.stratos.manager.console/console/cartridges.jag @@ -22,12 +22,15 @@ var caramel = require('caramel'); var error = []; var utils = require('/util/utility.jag'); +var process = require('process'); var availableCartridges = utils.consoleAppUtil.getCartridges(); 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 }); %> diff --git a/source/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag b/source/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag index ad9399c0..ac7f8024 100644 --- a/source/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag +++ b/source/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag @@ -21,6 +21,7 @@ */ var caramel = require('caramel'); var error = []; +var process = require('process'); var step = request.getParameter('step'); if(step == null){ step = 1; @@ -84,9 +85,11 @@ if(wizard.step == 1){ 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 }); %> diff --git a/source/components/org.apache.stratos.manager.console/console/index.jag b/source/components/org.apache.stratos.manager.console/console/index.jag index 89f49bf8..7c4149fd 100644 --- a/source/components/org.apache.stratos.manager.console/console/index.jag +++ b/source/components/org.apache.stratos.manager.console/console/index.jag @@ -23,12 +23,17 @@ var log = new Log("console.index"); var error=[]; var caramel = require('caramel'); var utils = require('/util/utility.jag'); +var process = require('process'); + var subscribedCartridges = utils.consoleAppUtil.getSubscribedCartridges(); if(subscribedCartridges.Error != undefined){ error.push(subscribedCartridges.Error); } + +var bamInfo ={bamip:process.getProperty('bam.ip'),bamport:process.getProperty('bam.port')}; caramel.render({ mycartridges:subscribedCartridges, + bamInfo:bamInfo, error:error }); %> diff --git a/source/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag b/source/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag index cb08f8ac..c73208bf 100644 --- a/source/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag +++ b/source/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag @@ -23,6 +23,7 @@ var log = new Log("subscribe_cartridge"); var error = []; var caramel = require('caramel'); var utils = require('/util/utility.jag'); +var process = require('process'); var type = request.getParameter('cartridgeType'); var autoScalePolicies = utils.consoleAppUtil.getAutoScalePolicies(); var deploymentPolicies = utils.consoleAppUtil.getApplicableDeploymentPolicies(type); @@ -39,12 +40,13 @@ if(autoScalePolicies.Error != undefined ){ error.push(mtServiceInfo.Error); } - +var bamInfo ={bamip:process.getProperty('bam.ip'),bamport:process.getProperty('bam.port')}; caramel.render({ - cartridge:cartridge, - autoScalePolicies:autoScalePolicies, - deploymentPolicies:deploymentPolicies, - mtServiceInfo:mtServiceInfo, - error:error + cartridge:cartridge, + autoScalePolicies:autoScalePolicies, + deploymentPolicies:deploymentPolicies, + mtServiceInfo:mtServiceInfo, + bamInfo:bamInfo, + error:error }); %> diff --git a/source/components/org.apache.stratos.manager.console/console/tenant_management.jag b/source/components/org.apache.stratos.manager.console/console/tenant_management.jag index 9039b0d4..f8057172 100644 --- a/source/components/org.apache.stratos.manager.console/console/tenant_management.jag +++ b/source/components/org.apache.stratos.manager.console/console/tenant_management.jag @@ -23,12 +23,15 @@ var log = new Log("console.tenant_management"); var caramel = require('caramel'); var error = []; var utils = require('/util/utility.jag'); +var process = require('process'); var tenants = utils.consoleAppUtil.getTenants(); if(tenants.Error != undefined){ error.push(tenants.Error); } +var bamInfo ={bamip:process.getProperty('bam.ip'),bamport:process.getProperty('bam.port')}; caramel.render({ tenants:tenants, + bamInfo:bamInfo, error:error }); %> diff --git a/source/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs b/source/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs index 8f6960f5..23de1631 100755 --- a/source/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs +++ b/source/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs @@ -44,7 +44,7 @@

  • My Cartridges
  • {{#isAllowed "configure"}}

  • Configure Stratos
  • {{/isAllowed}} {{#isAllowed "tenant-mgt"}}

  • Tenant Mgt
  • {{/isAllowed}} -

  • Dashboard
  • +

  • Dashboard