You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2014/03/18 05:17:10 UTC

[2/4] Fixing error handling empty case

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/77bef2f3/0001-STRATOS-504.patch
----------------------------------------------------------------------
diff --git a/0001-STRATOS-504.patch b/0001-STRATOS-504.patch
new file mode 100644
index 0000000..e39f8e7
--- /dev/null
+++ b/0001-STRATOS-504.patch
@@ -0,0 +1,7370 @@
+From 110ad070feba3e8a598b4e4c5c511c03b9f8213d Mon Sep 17 00:00:00 2001
+From: Chanaka <chanaka@chanaka-TECRA-M11.(none)>
+Date: Mon, 10 Mar 2014 13:12:56 +0530
+Subject: [PATCH] STRATOS-504
+
+---
+ .../console/cartridge_info.jag                     |   25 +-
+ .../console/cartridges.jag                         |    9 +-
+ .../console/configure_stratos.jag                  |   52 +-
+ .../console/configure_stratos_wizard.jag           |   50 +-
+ .../console/dashboard.jag                          |   13 +
+ .../console/data/clusters.json                     |  301 ++++++++++
+ .../console/data/elbs.json                         |   20 +
+ .../console/data/node_mem_cpu.json                 |  114 ++++
+ .../console/index.jag                              |    8 +-
+ .../console/subscribe_cartridge.jag                |   12 +-
+ .../console/tenant_management.jag                  |   10 +-
+ .../console/tenant_new.jag                         |    5 -
+ .../console/themes/theme1/pages/index.hbs          |    2 +-
+ .../console/themes/theme1/partials/dashboard.hbs   |  560 +++++++++++++++++++
+ .../console/themes/theme1/partials/error_page.hbs  |   19 +
+ .../console/themes/theme1/partials/header.hbs      |    2 +-
+ .../themes/theme1/renderers/cartridge_info.js      |  111 ++--
+ .../console/themes/theme1/renderers/cartridges.js  |  164 +++---
+ .../themes/theme1/renderers/configure_stratos.js   |  270 +++++----
+ .../theme1/renderers/configure_stratos_wizard.js   |  264 +++++----
+ .../console/themes/theme1/renderers/dashboard.js   |   76 +++
+ .../console/themes/theme1/renderers/index.js       |  167 +++---
+ .../themes/theme1/renderers/subscribe_cartridge.js |  108 ++--
+ .../themes/theme1/renderers/tenant_management.js   |  105 ++--
+ .../console/themes/theme1/renderers/tenant_new.js  |  105 ++--
+ .../themes/theme1/subthemes/theme2/ui/css/main.css |  579 ++++++++++++++++++++
+ .../themes/theme1/ui/fonts/dropped text.txt        |    1 +
+ .../console/themes/theme1/ui/img/btn-down.png      |  Bin 0 -> 738 bytes
+ .../console/themes/theme1/ui/img/btn-restart.png   |  Bin 0 -> 801 bytes
+ .../console/themes/theme1/ui/img/btn-start.png     |  Bin 0 -> 644 bytes
+ .../console/themes/theme1/ui/img/confirm.gif       |  Bin 0 -> 2324 bytes
+ .../console/themes/theme1/ui/img/dash.png          |  Bin 0 -> 927 bytes
+ .../console/themes/theme1/ui/img/details.png       |  Bin 0 -> 21148 bytes
+ .../console/themes/theme1/ui/img/diagram.png       |  Bin 0 -> 75441 bytes
+ .../console/themes/theme1/ui/img/error.gif         |  Bin 0 -> 2258 bytes
+ .../console/themes/theme1/ui/img/icon-plus.png     |  Bin 0 -> 178 bytes
+ .../themes/theme1/ui/img/icon-problem-dark.png     |  Bin 0 -> 495 bytes
+ .../themes/theme1/ui/img/icon-problem-light.png    |  Bin 0 -> 499 bytes
+ .../console/themes/theme1/ui/img/icon-problem.png  |  Bin 0 -> 499 bytes
+ .../console/themes/theme1/ui/img/image_10.png      |  Bin 0 -> 49844 bytes
+ .../console/themes/theme1/ui/img/info.gif          |  Bin 0 -> 2349 bytes
+ .../console/themes/theme1/ui/img/overlay.png       |  Bin 0 -> 144 bytes
+ .../console/themes/theme1/ui/img/warning.gif       |  Bin 0 -> 2345 bytes
+ .../console/themes/theme1/ui/js/wizard.js          |   58 +-
+ .../console/util/utility.jag                       |   43 +-
+ .../stratos/rest/endpoint/mock/MockContext.java    |  103 ++--
+ .../rest/endpoint/mock/StratosTestAdmin.java       |   97 +++-
+ .../webapp/stratos-test/WEB-INF/cxf-servlet.xml    |    6 +-
+ 48 files changed, 2823 insertions(+), 636 deletions(-)
+ create mode 100644 components/org.apache.stratos.manager.console/console/dashboard.jag
+ create mode 100644 components/org.apache.stratos.manager.console/console/data/clusters.json
+ create mode 100644 components/org.apache.stratos.manager.console/console/data/elbs.json
+ create mode 100644 components/org.apache.stratos.manager.console/console/data/node_mem_cpu.json
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/partials/dashboard.hbs
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/partials/error_page.hbs
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/renderers/dashboard.js
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/subthemes/theme2/ui/css/main.css
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/fonts/dropped text.txt
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-down.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-restart.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-start.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/confirm.gif
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/dash.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/details.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/diagram.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/error.gif
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-plus.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-dark.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-light.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/image_10.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/info.gif
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/overlay.png
+ create mode 100644 components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/warning.gif
+
+diff --git a/components/org.apache.stratos.manager.console/console/cartridge_info.jag b/components/org.apache.stratos.manager.console/console/cartridge_info.jag
+index 1cea51e..9650081 100644
+--- a/components/org.apache.stratos.manager.console/console/cartridge_info.jag
++++ b/components/org.apache.stratos.manager.console/console/cartridge_info.jag
+@@ -1,20 +1,31 @@
+ <%
+ var caramel = require('caramel');
++var error = [];
+ var utils = require('/util/utility.jag');
+  var log = new Log('utility.cartridgeInfo');
+ var alias = request.getParameter("alias");
+-var cartridgeInfo = utils.consoleAppUtil.getCartridgeInfo(alias).cartridge;
+-var lbCluster = '{}';
+-if(cartridgeInfo.lbClusterId) {
+-  lbCluster = utils.consoleAppUtil.getClusterInfo(cartridgeInfo.lbClusterId).cluster;
+-  log.debug("***************:" + stringify(lbCluster));
++var lbCluster = {};
++var cartridgeInfo = utils.consoleAppUtil.getCartridgeInfo(alias);
++if(cartridgeInfo.Error != undefined){
++    error.push(cartridgeInfo.Error);
++}else{
++    if(cartridgeInfo.cartridge.lbClusterId) {
++        lbCluster = utils.consoleAppUtil.getClusterInfo(cartridgeInfo.cartridge.lbClusterId);
++        if(lbCluster.Error != undefined){
++            error.push(lbCluster.Error);
++        }
++    }
++    var clusterInfo = utils.consoleAppUtil.getClusterInfoWithAlias(cartridgeInfo.cartridge.cartridgeType, alias);
++    if(clusterInfo.Error != undefined){
++        error.push(clusterInfo.Error);
++    }
+ }
+ 
+-var clusterInfo = utils.consoleAppUtil.getClusterInfoWithAlias(cartridgeInfo.cartridgeType, alias).cluster;
+ 
+ caramel.render({
+     cartridgeInfo:cartridgeInfo,
+     lbCluster:lbCluster,
+-    clusterInfo:clusterInfo
++    clusterInfo:clusterInfo,
++    error:error
+ });
+ %>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/cartridges.jag b/components/org.apache.stratos.manager.console/console/cartridges.jag
+index 999cc44..04f94f4 100644
+--- a/components/org.apache.stratos.manager.console/console/cartridges.jag
++++ b/components/org.apache.stratos.manager.console/console/cartridges.jag
+@@ -1,8 +1,13 @@
+ <%
+-var caramel = require('caramel')
++var caramel = require('caramel');
++var error = [];
+ var utils = require('/util/utility.jag');
+ var availableCartridges = utils.consoleAppUtil.getCartridges();
++if(availableCartridges.Error != undefined){
++    error.push(availableCartridges.Error);
++}
+ caramel.render({
+-    cartridges:availableCartridges
++    cartridges:availableCartridges,
++    error:error
+ });
+ %>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/configure_stratos.jag b/components/org.apache.stratos.manager.console/console/configure_stratos.jag
+index c75390b..9a723c0 100644
+--- a/components/org.apache.stratos.manager.console/console/configure_stratos.jag
++++ b/components/org.apache.stratos.manager.console/console/configure_stratos.jag
+@@ -1,5 +1,6 @@
+ <%
+ var caramel = require('caramel');
++var error = [];
+ var step = request.getParameter('step');
+     var log = new Log("config.stratos");
+ 
+@@ -16,38 +17,61 @@ var wizard = {
+ var utils = require('/util/utility.jag');
+ var config_status = utils.consoleAppUtil.getConfigStatus();
+ 
+-
+ if(wizard.step == 1){
+-    var partition_deployments =  utils.consoleAppUtil.getPartitions();
+-    step_data = partition_deployments.partition;
++    var step_data =  utils.consoleAppUtil.getPartitions();
++    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();
+-    step_data = step_data.autoscalePolicy;
++    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();
+-    step_data = step_data.deploymentPolicy;
+-
++    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();
+-    step_data = step_data.cartridge;
++    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();
+-    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;
++    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();
+-    step_data = step_data.serviceDefinitionBean;
++    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
++    config_status:config_status,
++    error:error
+ });
+ %>
+\ No newline at end of file
+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
+index edb22d1..6128106 100644
+--- a/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag
++++ b/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag
+@@ -1,5 +1,6 @@
+ <%
+ var caramel = require('caramel');
++var error = [];
+ var step = request.getParameter('step');
+ if(step == null){
+     step = 1;
+@@ -15,32 +16,57 @@ var utils = require('/util/utility.jag');
+ 
+ 
+ if(wizard.step == 1){
+-    var partition_deployments =  utils.consoleAppUtil.getPartitions();
+-    step_data = partition_deployments.partition;
++    var step_data =  utils.consoleAppUtil.getPartitions();
++    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();
+-    step_data = step_data.autoscalePolicy;
++    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();
+-    step_data = step_data.deploymentPolicy;
++    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();
+-    step_data = step_data.cartridge;
++    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();
+-    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;
++    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();
+-    step_data = step_data.serviceDefinitionBean;
++    if(step_data.Error != undefined){
++        error.push(step_data.Error);
++    }else{
++        step_data = step_data.serviceDefinitionBean;
++    }
+ }
+ caramel.render({
+     step_data:step_data,
+-    wizard:wizard
++    wizard:wizard,
++    error:error
+ });
+ %>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/dashboard.jag b/components/org.apache.stratos.manager.console/console/dashboard.jag
+new file mode 100644
+index 0000000..a3ff782
+--- /dev/null
++++ b/components/org.apache.stratos.manager.console/console/dashboard.jag
+@@ -0,0 +1,13 @@
++<%
++var log = new Log("console.index");
++var error = [];
++var caramel = require('caramel');
++var utils = require('/util/utility.jag');
++var elbs = require('/data/elbs.json');
++var clusters = require('/data/clusters.json');
++caramel.render({
++    elbs:elbs,
++    clusters:clusters,
++    error:error
++});
++%>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/data/clusters.json b/components/org.apache.stratos.manager.console/console/data/clusters.json
+new file mode 100644
+index 0000000..dca68eb
+--- /dev/null
++++ b/components/org.apache.stratos.manager.console/console/data/clusters.json
+@@ -0,0 +1,301 @@
++[{
++        "id":"bps"
++        ,"name":"BPS Cluster"
++        ,"elb":["elb1"]
++        ,"up_time":"25hrs"
++        ,"down_time":""
++        ,"cpu":"20"
++        ,"policy":"Round Robin"
++        ,"state":"down"
++        ,"patches":[
++            {
++                "name":"wso2-0001"
++            },
++            {
++                "name":"wso2-0002"
++            }
++        ]
++        ,"details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at turpis at lorem congue laoreet in hendrerit arcu. Pellentesque interdum quis nunc ut dictum. Nullam bibendum risus quis mollis dignissim. Duis congue fringilla sapien in commodo. Curabitur ut mauris ligula. Pellentesque sit amet neque tincidunt, malesuada est at, euismod purus. Praesent id bibendum neque, a ultricies diam. Suspendisse suscipit sem lacus, eget bibendum sapien adipiscing ac. Vestibulum suscipit convallis sagittis. Maecenas lacinia tincidunt viverra. Curabitur ac blandit est. Nunc ac molestie nisl."
++        ,"nodes":[
++            {
++                "id":"n1"
++                ,"name":"N1"
++                ,"up_time":"25hrs"
++                ,"down_time": ""
++                ,"cpu": "20"
++                ,"policy": "Round Robin"
++                ,"state": "crashed"
++                ,"patches": [
++                    {
++                        "name": "wso2-0001"
++                    },
++                    {
++                        "name": "wso2-0002"
++                    }
++                ]
++                ,"details":"Lorem"
++            }
++            ,{
++                "id":"n2"
++                ,"name":"N2"
++                ,"up_time":"25hrs"
++                ,"down_time": ""
++                ,"cpu": "20"
++                ,"policy": "Round Robin"
++                ,"state": "error"
++                ,"patches": [
++                    {
++                        "name": "wso2-0001"
++                    },
++                    {
++                        "name": "wso2-0002"
++                    }
++                ]
++                ,"details":"Lorem"
++            }
++            ,{
++                "id":"n3"
++                ,"name":"N3"
++                ,"up_time":"25hrs"
++                ,"down_time": ""
++                ,"cpu": "20"
++                ,"policy": "Round Robin"
++                ,"state": "up"
++                ,"patches": [
++                    {
++                        "name": "wso2-0001"
++                    },
++                    {
++                        "name": "wso2-0002"
++                    }
++                ]
++                ,"details":"Lorem"
++            }
++        ]
++    },
++    {
++        "id":"esb"
++        ,"name":"ESB Cluster"
++        ,"elb":["elb1","elb2"]
++        ,"up_time":"25hrs"
++        ,"down_time":""
++        ,"cpu":"20"
++        ,"policy":"Round Robin"
++        ,"state":"down"
++        ,"patches":[
++            {
++                "name":"wso2-0001"
++            },
++            {
++                "name":"wso2-0002"
++            }
++        ]
++        ,"details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at turpis at lorem congue laoreet in hendrerit arcu. Pellentesque interdum quis nunc ut dictum. Nullam bibendum risus quis mollis dignissim. Duis congue fringilla sapien in commodo. Curabitur ut mauris ligula. Pellentesque sit amet neque tincidunt, malesuada est at, euismod purus. Praesent id bibendum neque, a ultricies diam. Suspendisse suscipit sem lacus, eget bibendum sapien adipiscing ac. Vestibulum suscipit convallis sagittis. Maecenas lacinia tincidunt viverra. Curabitur ac blandit est. Nunc ac molestie nisl."
++        ,"nodes":[
++            {
++                "id":"n1"
++                ,"name":"N1"
++                ,"up_time":"25hrs"
++                ,"down_time": ""
++                ,"cpu": "20"
++                ,"policy": "Round Robin"
++                ,"state": "crashed"
++                ,"patches": [
++                    {
++                        "name": "wso2-0001"
++                    },
++                    {
++                        "name": "wso2-0002"
++                    }
++                ]
++                ,"details":"Lorem"
++            }
++            ,{
++                "id":"n2"
++                ,"name":"N2"
++                ,"up_time":"25hrs"
++                ,"down_time": ""
++                ,"cpu": "20"
++                ,"policy": "Round Robin"
++                ,"state": "error"
++                ,"patches": [
++                    {
++                        "name": "wso2-0001"
++                    },
++                    {
++                        "name": "wso2-0002"
++                    }
++                ]
++                ,"details":"Lorem"
++            }
++            ,{
++                "id":"n3"
++                ,"name":"N3"
++                ,"up_time":"25hrs"
++                ,"down_time": ""
++                ,"cpu": "20"
++                ,"policy": "Round Robin"
++                ,"state": "up"
++                ,"patches": [
++                    {
++                        "name": "wso2-0001"
++                    },
++                    {
++                        "name": "wso2-0002"
++                    }
++                ]
++                ,"details":"Lorem"
++            }
++        ]
++    }
++    ,{
++            "id":"bam"
++            ,"name":"BAM Cluster"
++            ,"elb":["elb2"]
++            ,"up_time":"25hrs"
++            ,"down_time":""
++            ,"cpu":"20"
++            ,"policy":"Round Robin"
++            ,"state":"up"
++            ,"patches":[
++                {
++                    "name":"wso2-0001"
++                },
++                {
++                    "name":"wso2-0002"
++                }
++            ]
++            ,"details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at turpis at lorem congue laoreet in hendrerit arcu. Pellentesque interdum quis nunc ut dictum. Nullam bibendum risus quis mollis dignissim. Duis congue fringilla sapien in commodo. Curabitur ut mauris ligula. Pellentesque sit amet neque tincidunt, malesuada est at, euismod purus. Praesent id bibendum neque, a ultricies diam. Suspendisse suscipit sem lacus, eget bibendum sapien adipiscing ac. Vestibulum suscipit convallis sagittis. Maecenas lacinia tincidunt viverra. Curabitur ac blandit est. Nunc ac molestie nisl."
++            ,"nodes":[
++                {
++                    "id":"n1"
++                    ,"name":"N1"
++                    ,"up_time":"25hrs"
++                    ,"down_time": ""
++                    ,"cpu": "20"
++                    ,"policy": "Round Robin"
++                    ,"state": "crashed"
++                    ,"patches": [
++                        {
++                            "name": "wso2-0001"
++                        },
++                        {
++                            "name": "wso2-0002"
++                        }
++                    ]
++                    ,"details":"Lorem"
++                }
++                ,{
++                    "id":"n2"
++                    ,"name":"N2"
++                    ,"up_time":"25hrs"
++                    ,"down_time": ""
++                    ,"cpu": "20"
++                    ,"policy": "Round Robin"
++                    ,"state": "up"
++                    ,"patches": [
++                        {
++                            "name": "wso2-0001"
++                        },
++                        {
++                            "name": "wso2-0002"
++                        }
++                    ]
++                    ,"details":"Lorem"
++                }
++                ,{
++                    "id":"n3"
++                    ,"name":"N3"
++                    ,"up_time":"25hrs"
++                    ,"down_time": ""
++                    ,"cpu": "20"
++                    ,"policy": "Round Robin"
++                    ,"state": "up"
++                    ,"patches": [
++                        {
++                            "name": "wso2-0001"
++                        },
++                        {
++                            "name": "wso2-0002"
++                        }
++                    ]
++                    ,"details":"Lorem"
++                }
++            ]
++        },
++        {
++            "id":"appfac"
++            ,"name":"App Factory"
++            ,"elb":["elb2"]
++            ,"up_time":"25hrs"
++            ,"down_time":""
++            ,"cpu":"20"
++            ,"policy":"Round Robin"
++            ,"state":"up"
++            ,"patches":[
++                {
++                    "name":"wso2-0001"
++                },
++                {
++                    "name":"wso2-0002"
++                }
++            ]
++            ,"details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec at turpis at lorem congue laoreet in hendrerit arcu. Pellentesque interdum quis nunc ut dictum. Nullam bibendum risus quis mollis dignissim. Duis congue fringilla sapien in commodo. Curabitur ut mauris ligula. Pellentesque sit amet neque tincidunt, malesuada est at, euismod purus. Praesent id bibendum neque, a ultricies diam. Suspendisse suscipit sem lacus, eget bibendum sapien adipiscing ac. Vestibulum suscipit convallis sagittis. Maecenas lacinia tincidunt viverra. Curabitur ac blandit est. Nunc ac molestie nisl."
++            ,"nodes":[
++                {
++                    "id":"n1"
++                    ,"name":"N1"
++                    ,"up_time":"25hrs"
++                    ,"down_time": ""
++                    ,"cpu": "20"
++                    ,"policy": "Round Robin"
++                    ,"state": "crashed"
++                    ,"patches": [
++                        {
++                            "name": "wso2-0001"
++                        },
++                        {
++                            "name": "wso2-0002"
++                        }
++                    ]
++                    ,"details":"Lorem"
++                }
++                ,{
++                    "id":"n2"
++                    ,"name":"N2"
++                    ,"up_time":"25hrs"
++                    ,"down_time": ""
++                    ,"cpu": "20"
++                    ,"policy": "Round Robin"
++                    ,"state": "up"
++                    ,"patches": [
++                        {
++                            "name": "wso2-0001"
++                        },
++                        {
++                            "name": "wso2-0002"
++                        }
++                    ]
++                    ,"details":"Lorem"
++                }
++                ,{
++                    "id":"n3"
++                    ,"name":"N3"
++                    ,"up_time":"25hrs"
++                    ,"down_time": ""
++                    ,"cpu": "20"
++                    ,"policy": "Round Robin"
++                    ,"state": "up"
++                    ,"patches": [
++                        {
++                            "name": "wso2-0001"
++                        },
++                        {
++                            "name": "wso2-0002"
++                        }
++                    ]
++                    ,"details":"Lorem"
++                }
++            ]
++        }
++]
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/data/elbs.json b/components/org.apache.stratos.manager.console/console/data/elbs.json
+new file mode 100644
+index 0000000..38d816a
+--- /dev/null
++++ b/components/org.apache.stratos.manager.console/console/data/elbs.json
+@@ -0,0 +1,20 @@
++[
++    {
++        "id":"elb1"
++        ,"name":"Elb1"
++        ,"up_time":"25hrs"
++        ,"down_time":""
++        ,"cpu":"20"
++        ,"policy":"Round Robin"
++        ,"state":"down"
++    }
++    ,{
++        "id":"elb2"
++        ,"name":"Elb2"
++        ,"up_time":"25hrs"
++        ,"down_time":""
++        ,"cpu":"20"
++        ,"policy":"Round Robin"
++        ,"state":"up"
++    }
++]
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/data/node_mem_cpu.json b/components/org.apache.stratos.manager.console/console/data/node_mem_cpu.json
+new file mode 100644
+index 0000000..71d0102
+--- /dev/null
++++ b/components/org.apache.stratos.manager.console/console/data/node_mem_cpu.json
+@@ -0,0 +1,114 @@
++[
++    {
++        "node_id": "v_mcrunningdb_node3000",
++        "records": [
++            {
++                "cpu": 50,
++                "mem": 15,
++                "time": 1386072000
++            }
++            ,
++            {
++                "cpu": 60,
++                "mem": 20,
++                "time": 1386072060
++            }
++            ,
++            {
++                "cpu": 45,
++                "mem": 17,
++                "time": 1386072120
++            },
++            {
++                "cpu": 40,
++                "mem": 10,
++                "time": 1386072180
++            }
++            ,{
++                "cpu": 30,
++                "mem": 12,
++                "time": 1386072240
++            }
++            ,{
++                "cpu": 45,
++                "mem": 22,
++                "time": 1386072300
++            }
++        ]
++    },
++    {
++            "node_id": "c_esbrunning_node331123",
++            "records": [
++                {
++                    "cpu": 40,
++                    "mem": 12,
++                    "time": 1386072000
++                }
++                ,
++                {
++                    "cpu": 52,
++                    "mem": 22,
++                    "time": 1386072060
++                }
++                ,
++                {
++                    "cpu": 35,
++                    "mem": 24,
++                    "time": 1386072120
++                },
++                {
++                    "cpu": 38,
++                    "mem": 20,
++                    "time": 1386072180
++                }
++                ,{
++                    "cpu": 40,
++                    "mem": 17,
++                    "time": 1386072240
++                }
++                ,{
++                    "cpu": 55,
++                    "mem": 15,
++                    "time": 1386072300
++                }
++            ]
++        },
++        {
++            "node_id": "d_wired_node1235",
++            "records": [
++                {
++                    "cpu": 51,
++                    "mem": 11,
++                    "time": 1386072000
++                }
++                ,
++                {
++                    "cpu": 41,
++                    "mem": 19,
++                    "time": 1386072060
++                }
++                ,
++                {
++                    "cpu": 33,
++                    "mem": 13,
++                    "time": 1386072120
++                },
++                {
++                    "cpu": 55,
++                    "mem": 15,
++                    "time": 1386072180
++                }
++                ,{
++                    "cpu": 42,
++                    "mem": 25,
++                    "time": 1386072240
++                }
++                ,{
++                    "cpu": 45,
++                    "mem": 12,
++                    "time": 1386072300
++                }
++            ]
++        }
++
++]
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/index.jag b/components/org.apache.stratos.manager.console/console/index.jag
+index 7a6f3af..5d8baeb 100644
+--- a/components/org.apache.stratos.manager.console/console/index.jag
++++ b/components/org.apache.stratos.manager.console/console/index.jag
+@@ -1,9 +1,15 @@
+ <%
+ var log = new Log("console.index");
++var error=[];
+ var caramel = require('caramel');
+ var utils = require('/util/utility.jag');
+ var subscribedCartridges =  utils.consoleAppUtil.getSubscribedCartridges();
++if(subscribedCartridges.Error != undefined){
++    error.push(subscribedCartridges.Error);
++}
++
+ caramel.render({
+-    mycartridges:subscribedCartridges
++    mycartridges:subscribedCartridges,
++    error:error
+ });
+ %>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag b/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag
+index eb31666..cf6c739 100644
+--- a/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag
++++ b/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag
+@@ -1,14 +1,24 @@
+ <%
+ var log = new Log("subscribe_cartridge");
++var error = [];
+ var caramel = require('caramel');
+ var utils = require('/util/utility.jag');
+ var type = request.getParameter('cartridgeType');
+ var autoScalePolicies = utils.consoleAppUtil.getAutoScalePolicies();
+ var deploymentPolicies = utils.consoleAppUtil.getApplicableDeploymentPolicies(type);
+ var cartridge = utils.consoleAppUtil.getSingleTenantCartridgeInfo(type);
++
++if(autoScalePolicies.Error != undefined ){
++    error.push(autoScalePolicies.Error);
++}if(deploymentPolicies.Error != undefined ){
++    error.push(deploymentPolicies.Error);
++}if(cartridge.Error != undefined ){
++    error.push(cartridge.Error);
++}
+ caramel.render({
+         cartridge:cartridge,
+         autoScalePolicies:autoScalePolicies,
+-        deploymentPolicies:deploymentPolicies
++        deploymentPolicies:deploymentPolicies,
++        error:error
+ });
+ %>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/tenant_management.jag b/components/org.apache.stratos.manager.console/console/tenant_management.jag
+index 45f7182..e2ef349 100644
+--- a/components/org.apache.stratos.manager.console/console/tenant_management.jag
++++ b/components/org.apache.stratos.manager.console/console/tenant_management.jag
+@@ -1,12 +1,14 @@
+ <%
+ var log = new Log("console.tenant_management");
+ var caramel = require('caramel');
++var error = [];
+ var utils = require('/util/utility.jag');
+ var tenants =  utils.consoleAppUtil.getTenants();
+-var config_status = require('/data/config_status.json');
+-log.debug(tenants);
++if(tenants.Error != undefined){
++    error.push(tenants.Error);
++}
+ caramel.render({
+-    tenants:tenants.tenantInfoBean,
+-    config_status:config_status
++    tenants:tenants,
++    error:error
+ });
+ %>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/tenant_new.jag b/components/org.apache.stratos.manager.console/console/tenant_new.jag
+index ba01922..7c08761 100644
+--- a/components/org.apache.stratos.manager.console/console/tenant_new.jag
++++ b/components/org.apache.stratos.manager.console/console/tenant_new.jag
+@@ -1,11 +1,6 @@
+ <%
+ var caramel = require('caramel');
+-var tenants = require('data/tenants.json');
+-var config_status = require('/data/config_status.json');
+ var log = new Log();
+-log.debug(tenants);
+ caramel.render({
+-    tenants:tenants,
+-    config_status:config_status
+ });
+ %>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/pages/index.hbs b/components/org.apache.stratos.manager.console/console/themes/theme1/pages/index.hbs
+index f8f3fe2..f0d240d 100644
+--- a/components/org.apache.stratos.manager.console/console/themes/theme1/pages/index.hbs
++++ b/components/org.apache.stratos.manager.console/console/themes/theme1/pages/index.hbs
+@@ -25,7 +25,7 @@
+     <link rel="stylesheet" href="{{url "/themes/theme1/ui/css/dialog.css"}}">
+     <link rel="stylesheet" href="{{url "/themes/theme1/ui/custom-fonts/style.css"}}">
+     <link rel="stylesheet" href="{{url "/themes/theme1/ui/font-awesome/css/font-awesome.css"}}">
+-    <script src="{{url "/themes/theme1/ui/js/vendor/modernizr-2.6.2-respond-1.1.0.min.js"}}"></script>
++    <script src="{{url "/themes/theme1/ui/js/vendor/raphael-min.js"}}"></script>
+     <script src="{{url "/themes/theme1/ui/js/vendor/jquery-1.10.1.min.js"}}"></script>
+     <script src="{{url "/themes/theme1/ui/js/vendor/jquery-ui-1.10.3.custom.min.js"}}"></script>
+     <script src="{{url "/js/main.js"}}"></script>
+diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/dashboard.hbs b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/dashboard.hbs
+new file mode 100644
+index 0000000..608928e
+--- /dev/null
++++ b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/dashboard.hbs
+@@ -0,0 +1,560 @@
++<div id="canvas_container"></div>
++
++<div class="breadcrumb-strip-sub">
++<div class="container">
++    <!-- Example row of columns -->
++    <div class="row">
++        <div class="col-lg-12">
++            <div class="detail-strip">
++                <h1 class="pull-left">ESB Cluster</h1>
++                <nav class="navbar navbar-inverse pull-left affix-menu" role="navigation">
++                    <!-- Brand and toggle get grouped for better mobile display -->
++
++                    <!-- Collect the nav links, forms, and other content for toggling -->
++                    <div class="collapse navbar-collapse">
++                        <ul class="nav navbar-nav">
++                            <li class="active"><a href="#">Nodes</a></li>
++                            <li><a href="#">Patches</a></li>
++                            <li><a href="#">Details</a></li>
++                        </ul>
++                    </div>
++                    <!-- /.navbar-collapse -->
++                </nav>
++                <div class="btn-toolbar pull-right detail-menu">
++                    <div class="btn-group">
++                        <button class="btn btn-danger"><i class="icon-power-off"></i> Shoutdown</button>
++                        <button class="btn"><i class="icon-repeat"></i> Restart with (Policy 2)</button>
++                        <button class="btn dropdown-toggle" data-toggle="dropdown" tabindex="-1">
++                            <span class="caret"></span>
++                        </button>
++                        <ul class="dropdown-menu">
++                            <li><a href="#">Restart Policy 1</a></li>
++                            <li><a href="#">Restart Policy 2</a></li>
++                            <li><a href="#">Restart Policy 3</a></li>
++                            <li class="divider"></li>
++                            <li><a href="#">Create New Policy</a></li>
++                        </ul>
++                    </div>
++                </div>
++                <div style="clear:both"></div>
++            </div>
++            <div class="detail-strip" style="padding-top:10px;">
++            </div>
++        </div>
++    </div>
++</div>
++</div>
++
++<div class="container content-section-wrapper">
++<div class="row">
++    <div class="col-lg-12 content-section">
++        <div class="container">
++            <div class="row">
++                <div class="col-lg-6">
++                    <h2>Nodes</h2>
++                    <table class="table table-striped table-bordered">
++                        <thead>
++                        <tr>
++                            <th></th>
++                            <th></th>
++                            <th>Up Time</th>
++                            <th>Load Averages</th>
++                            <th>%CPU</th>
++                            <th>%Mem</th>
++                            <th>Faults/Requests</th>
++                        </tr>
++                        </thead>
++                        <tbody>
++                        <tr>
++                            <td class="col-lg-1"><i class="icon-check"></i></td>
++                            <td><a>N1</a></td>
++                            <td>3h:20m:10s</td>
++                            <td>0.65 0.42 0.36</td>
++                            <td>15</td>
++                            <td>25</td>
++                            <td>0/4000</td>
++                        </tr>
++                        <tr>
++                            <td class="col-lg-1"><i class="icon-check"></i></td>
++                            <td><a>N2</a></td>
++                            <td>3h:20m:10s</td>
++                            <td>0.65 0.42 0.36</td>
++                            <td>15</td>
++                            <td>25</td>
++                            <td>0/4000</td>
++                        </tr>
++                        <tr>
++                            <td class="col-lg-1"><i class="icon-check"></i></td>
++                            <td><a>N3</a></td>
++                            <td>3h:20m:10s</td>
++                            <td>0.65 0.42 0.36</td>
++                            <td>15</td>
++                            <td>25</td>
++                            <td>0/4000</td>
++                        </tr>
++                        </tbody>
++                    </table>
++                    <h2 class="pull-left">Patches</h2>
++                    <div class="btn-toolbar pull-right" style="margin-top:19px;">
++                        <div class="btn-group">
++                            <button class="btn"><i class="icon-repeat"></i> Refresh</button>
++                            <button class="btn"><i class="icon-trash"></i> Remove</button>
++                        </div>
++                    </div>
++                    <table class="table table-striped table-bordered">
++                        <thead>
++                        <tr>
++                            <th class="col-lg-1"><input type="checkbox"/></th>
++                            <th class="col-lg-11">Patch Name</th>
++                        </tr>
++                        </thead>
++                        <tbody>
++                        <tr>
++                            <td><input type="checkbox"/></td>
++                            <td>patch-001</td>
++                        </tr>
++                        </tbody>
++                    </table>
++
++                    <h2>Details</h2>
++                    <table class="table table-striped table-bordered">
++
++                        <tbody>
++                        <tr>
++                            <td>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </td>
++                        </tr>
++                        <tr>
++                            <td>Curabitur nec velit sed augue molestie posuere ut nec odio.  </td>
++                        </tr>
++                        <tr>
++                            <td>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </td>
++                        </tr>
++                        <tr>
++                            <td>Curabitur nec velit sed augue molestie posuere ut nec odio.  </td>
++                        </tr>
++                        <tr>
++                            <td>Lorem ipsum dolor sit amet, consectetur adipiscing elit. </td>
++                        </tr>
++                        <tr>
++                            <td>Curabitur nec velit sed augue molestie posuere ut nec odio.  </td>
++                        </tr>
++                        </tbody>
++                    </table>
++
++
++                </div>
++                <div class="col-lg-6">
++                    <h2>CPU/Memory Usage</h2>
++                    <div id="mem_cup_chart"></div>
++
++
++
++                </div>
++            </div>
++        </div>
++
++
++    </div>
++</div>
++</div>
++<script>
++var paper,paper_chart;
++
++var ELB_WIDTH = 200;
++var ELB_HEIGHT = 60;
++var ELB_ROUND = 10;
++//down colors
++var NODE_DOWN_FILL = "90-#d0d0d0-#e6e6e6";
++var NODE_DOWN_OVER_FILL = "#fafafa";
++
++//ELB colors
++var ELB_UP_FILL = "90-#ffb100-#ff8900";
++var ELB_UP_OVER_FILL = "#ff9226";
++
++//Cluster colors
++var CLUSTER_UP_FILL = "90-#007eff-#007edd";
++var CLUSTER_UP_OVER_FILL = "#00b9ff";
++
++//Error colors
++var ERROR_FILL = "90-#ff221a-#ba0600";
++var ERROR_OVER_FILL = "#ff221a";
++
++var DARK_TXT_COLOR = '#404040';
++var LIGHT_TXT_COLOR = '#FFFFFF';
++
++var INIT_X = 15;
++var INIT_Y = 30;
++
++var UP_TIME_TITLE = "Up Time";
++var DOWN_TIME_TITLE = "Down Time";
++
++var NODE_SHIFT_H = 250;
++var NODE_SHIFT_V = 200;
++var NODE_SHIFT_V_SUB = 80;
++
++var LINE_COLOR = "#91de02";
++
++var CIRCLE_FILL = ["#dcff9b","#ff9bfc","#fec5ac"];
++var CIRCLE_STROKE = ["#91de02","#c402de","#de4402"];
++
++var draw_node = function(cnode){
++    var rectangleSet = paper.set();
++    var rectangle = paper.rect(cnode.x, cnode.y, ELB_WIDTH+10, ELB_HEIGHT+10, 10);
++    var mainFill = NODE_DOWN_FILL;
++    var txtColor = DARK_TXT_COLOR;
++    var titleTxtColor = DARK_TXT_COLOR;
++
++    if(cnode.state == "up"){
++        if(cnode.nodeType == 'elb'){
++            mainFill = ELB_UP_FILL;
++        }else{
++            mainFill = CLUSTER_UP_FILL;
++        }
++        txtColor = LIGHT_TXT_COLOR;
++        titleTxtColor = LIGHT_TXT_COLOR;
++    }else if(cnode.state == "error"){
++        titleTxtColor = LIGHT_TXT_COLOR;
++        txtColor = DARK_TXT_COLOR;
++        mainFill = ERROR_FILL;
++    }
++
++
++    rectangle.attr({fill:mainFill,stroke:'#259cbc','stroke-width':0, 'stroke-linejoin':'round'});
++    rectangle.glow({"width":7,"color":"#000000","offsetx":3,"offsety":3,"fill":true});
++
++    if(cnode.nodeType == "node"){
++        var rectangle_sub = paper.rect(cnode.x+5, cnode.y+20, rectangle.getBBox().width-10, rectangle.getBBox().height-20, 10);
++        rectangle_sub.attr({fill:'#fff',stroke:'#259cbc','stroke-width':0, 'stroke-linejoin':'round'});
++        rectangle_sub.glow({"width":7,"color":"#000000","offsetx":3,"offsety":3,"fill":true});
++    }
++    //elb title
++    var word_elb = paper.text(rectangle.getBBox().x , rectangle.getBBox().y + 10,cnode.title).attr({"font-size":13,fill:titleTxtColor,stroke:"none"});
++    word_elb.translate(rectangle.getBBox().width/2,0);
++
++    //up time title
++    var word_up_time = paper.text(rectangle.getBBox().x, rectangle.getBBox().y + 15, cnode.time_title).attr({"font-size": 10, fill: '#000', stroke: "none"});
++    word_up_time.translate(word_up_time.getBBox().width/2+5, 15);
++
++    //up time value
++    var word_up_time_value = paper.text(rectangle.getBBox().x, rectangle.getBBox().y + 15, cnode.time_value).attr({"font-size": 11, fill: txtColor, stroke: "none"});
++    word_up_time_value.translate(word_up_time_value.getBBox().width/2+5, 30);
++
++    //cup%
++    var word_cpu = paper.text(rectangle.getBBox().x+10, rectangle.getBBox().y + 15, '%CPU').attr({"font-size": 10, fill: '#000', stroke: "none"});
++    word_cpu.translate(rectangle.getBBox().width/2-word_cpu.getBBox().width/2, 15);
++
++
++    //value cup%
++    var value_cpu = paper.text(rectangle.getBBox().x+10, rectangle.getBBox().y + 15, '20').attr({"font-size": 10, fill: txtColor, stroke: "none"});
++    value_cpu.translate(rectangle.getBBox().width/2-word_cpu.getBBox().width/2, 30);
++
++    //algo title
++    var word_policy = paper.text(rectangle.getBBox().x+10, rectangle.getBBox().y + 15, cnode.policy).attr({"font-size": 10, fill: '#000', stroke: "none"});
++    word_policy.translate(rectangle.getBBox().width*2/3+word_policy.getBBox().width*1/3, 15);
++
++    if(cnode.state == "up"){
++        var rectangle_btn_sd = paper.rect(word_policy.getBBox().x, word_policy.getBBox().y + 15, 23, 17, 0);
++        rectangle_btn_sd.attr({fill:'url({{url "/themes/theme1/ui/img/btn-down.png"}})','stroke-width':0});
++
++        var rectangle_btn_restart = paper.rect(word_policy.getBBox().x+30, word_policy.getBBox().y + 15, 23, 17, 0);
++        rectangle_btn_restart.attr({fill:'url({{url "/themes/theme1/ui/img/btn-restart.png"}})','stroke-width':0});
++
++        rectangleSet.push(rectangle, word_elb,word_up_time,word_up_time_value,word_policy);
++
++        rectangle_btn_sd.mouseup(executeAction({elem:cnode,action:'shout_down'}));
++        rectangle_btn_restart.mouseup(executeAction({elem:cnode,action:'restart'}));
++    }else{
++        var rectangle_btn_start = paper.rect(word_policy.getBBox().x, word_policy.getBBox().y + 15, 23, 17, 0);
++        rectangle_btn_start.attr({fill:'url({{url "/themes/theme1/ui/img/btn-start.png"}})','stroke-width':0});
++        rectangleSet.push(rectangle, word_elb,word_up_time,word_up_time_value,word_policy);
++
++        rectangle_btn_start.mouseup(executeAction({elem:cnode,action:'start'}));
++    }
++    if(cnode.nodeType == "node"){
++        rectangleSet.push(rectangle_sub);
++    }
++    rectangleSet.state = cnode.state;
++    rectangleSet.nodeType = cnode.nodeType;
++
++    rectangleSet.mouseup(loadNode(cnode.title));
++    rectangleSet.mouseover(elbMouseOverHandler(rectangleSet));
++    rectangleSet.mouseout(elbMouseOutHandler(rectangleSet));
++};
++
++var draw_connector = function(elb,cluster){
++    var x1 = elb.x+ELB_WIDTH/2;
++    var y1 =  elb.y+ELB_HEIGHT+10;
++
++    var x2 = cluster.x+ELB_WIDTH/2;
++    var y2 = cluster.y-10;
++
++    var linePath = paper.path("M " + x1 + " " + y1 + " L " + x2 + " " + y2).attr({'stroke':CIRCLE_STROKE[elb.index],'stroke-width':3});
++    var c1 = paper.circle(x1, y1, 10).attr({fill: CIRCLE_FILL[elb.index],stroke:CIRCLE_STROKE[elb.index],'stroke-width':4});
++    var c2 = paper.circle(x2, y2, 10).attr({fill: CIRCLE_FILL[elb.index],stroke:CIRCLE_STROKE[elb.index],'stroke-width':4});
++};
++$(document).ready(function(){
++    var data_cluster= $.parseJSON('{{clusters}}'),data_elb=$.parseJSON('{{elbs}}');
++    paper = new Raphael(document.getElementById('canvas_container'), 1000, 500);
++    var maxNodesForCluster = 0;
++    var clustersDrew = [];
++    var clustersDrewNodes = [];
++    for (var i = 0; i < data_elb.length; i++) {
++        //drawing the elb
++        if (i == 0) {
++            data_elb[0].x = INIT_X;
++        } else {
++            data_elb[i].x = data_elb[i - 1].x + NODE_SHIFT_H*data_elb[i - 1].clustersForElb;
++        }
++        if (data_elb[i].state == "down") {
++            draw_node({x: data_elb[i].x, y: INIT_Y, title: data_elb[i].name, time_title: DOWN_TIME_TITLE, time_value: data_elb[i].down_time, policy: data_elb[i].policy, state: data_elb[i].state, nodeType: 'elb'});
++        } else {
++            draw_node({x: data_elb[i].x, y: INIT_Y, title: data_elb[i].name, time_title: UP_TIME_TITLE, time_value: data_elb[i].up_time, policy: data_elb[i].policy, state: data_elb[i].state, nodeType: 'elb'});
++        }
++        data_elb[i].y = INIT_Y;
++        data_elb[i].index = i;
++        //drawing the clusters
++        var clustersForElb = 0;
++        for (var j = 0; j < data_cluster.length; j++) {
++            var foundIndex = searchStringInArray(data_elb[i].id, data_cluster[j].elb);
++            if (foundIndex != -1) {
++                var clusterIndex = searchStringInArray(data_cluster[j].id, clustersDrew);
++                if (clusterIndex == -1) {
++                    clustersForElb++;
++                    var cx = data_elb[i].x;
++                    if (data_elb[i].cluster_x != undefined) {
++                        cx = data_elb[i].cluster_x + NODE_SHIFT_H;
++                    }
++                    data_elb[i].cluster_x = cx;
++                    if (data_cluster[j].state == "down") {
++                        draw_node({x: cx, y: INIT_Y + NODE_SHIFT_V, title: data_cluster[j].name, time_title: DOWN_TIME_TITLE, time_value: data_cluster[j].down_time, policy: data_cluster[j].policy, state: data_cluster[j].state, nodeType: 'cluster'});
++                    } else {
++                        draw_node({x: cx, y: INIT_Y + NODE_SHIFT_V, title: data_cluster[j].name, time_title: UP_TIME_TITLE, time_value: data_cluster[j].up_time, policy: data_cluster[j].policy, state: data_cluster[j].state, nodeType: 'cluster'});
++                    }
++                    //Draw a connector
++                    data_cluster[j].x = cx;
++                    data_cluster[j].y = INIT_Y + NODE_SHIFT_V;
++                    draw_connector(data_elb[i], data_cluster[j]);
++
++                    // Drawing cluster nodes
++                    var data_node = data_cluster[j].nodes;
++                    if (maxNodesForCluster < data_node.length) {
++                        maxNodesForCluster = data_node.length;
++                    }
++                    for (var k = 0; k < data_node.length; k++) {
++                        var nx, ny;
++                        if (k == 0) {
++                            nx = data_cluster[j].x;
++                            ny = data_cluster[j].y + NODE_SHIFT_V_SUB;
++                        } else {
++                            nx = data_node[k - 1].x;
++                            ny = data_node[k - 1].y + NODE_SHIFT_V_SUB;
++                        }
++                        data_node[k].x = nx;
++                        data_node[k].y = ny;
++
++                        if (data_node[k].state == "down") {
++                            draw_node({x: nx, y: ny, title: data_node[k].name, time_title: DOWN_TIME_TITLE, time_value: data_node[k].down_time, policy: data_node[k].policy, state: data_node[k].state, nodeType: 'node'});
++                        } else {
++                            draw_node({x: nx, y: ny, title: data_node[k].name, time_title: UP_TIME_TITLE, time_value: data_node[k].up_time, policy: data_node[k].policy, state: data_node[k].state, nodeType: 'node'});
++                        }
++                    }
++                    clustersDrew.push(data_cluster[j].id);
++                    clustersDrewNodes.push(data_cluster[j]);
++                }else{
++                    //draw the connector
++                    draw_connector(data_elb[i], clustersDrewNodes[clusterIndex]);
++                }
++            }
++        }
++        data_elb[i].clustersForElb = clustersForElb;
++    }
++    //draw_node({x:15,y:30,title:'ELB1',time_title:'Up Time',time_value:'3h:25m:10s',algo:'Round Robin',state:'',nodeType:'elb'});
++    //draw_node({x:330,y:30,title:'ELB1',time_title:'Up Time',time_value:'3h:25m:10s',algo:'Round Robin',state:'up',nodeType:'elb'});
++
++    //draw_node({x: 15, y: 230, title: 'ESB Cluster', time_title: 'Up Time', time_value: '3h:25m:10s', policy: 'Round Robin', state: 'up', nodeType: 'cluster'});
++
++
++    // Resize the canves
++    var paperHeight = 350 + 80*maxNodesForCluster;
++    paper.setSize(1000,paperHeight);
++
++});
++
++var elbMouseOverHandler = function (rect) {
++    return function() {
++        if(rect.state == "up"){
++            if(rect.nodeType=="elb"){
++                rect[0].attr({ "stroke-width": 2,"stroke":'#ff000', "fill" :ELB_UP_OVER_FILL });
++            }else if(rect.nodeType=="cluster"){
++                rect[0].attr({ "stroke-width": 2,"stroke":'#ff000', "fill" :CLUSTER_UP_OVER_FILL });
++            }
++        } else if (rect.state == "error") {
++            rect[0].attr({ "stroke-width": 0, "fill": ERROR_OVER_FILL});
++        } else {
++            rect[0].attr({ "stroke-width": 2, "stroke": '#a5a5a5', "fill": NODE_DOWN_OVER_FILL});
++        }
++    }
++};
++
++
++var elbMouseOutHandler = function (rect) {
++    return function () {
++        if (rect.state == "up") {
++            if (rect.nodeType == "elb") {
++                rect[0].attr({ "stroke-width": 0, "fill": ELB_UP_FILL});
++            } else if (rect.nodeType == "cluster") {
++                rect[0].attr({ "stroke-width": 0, "fill": CLUSTER_UP_FILL});
++            }
++        } else if(rect.state == "error"){
++            rect[0].attr({ "stroke-width": 0, "fill": ERROR_FILL});
++        } else {
++            rect[0].attr({ "stroke-width": 0, "fill": NODE_DOWN_FILL});
++
++        }
++    }
++};
++function loadNode(newState){
++    var tmpState = newState;
++    return function(){
++        alert('chanaing lifecycle state to ' + tmpState);
++    }
++}
++
++function executeAction(info){
++    var tmpInfo = info;
++    return function(event){
++        alert('Action is ' + tmpInfo.action + ' - Node is ' + tmpInfo.elem.title);
++    }
++}
++function searchStringInArray (str, strArray) {
++    for (var j=0; j<strArray.length; j++) {
++        if (strArray[j].match(str)) return j;
++    }
++    return -1;
++}
++
++///////////////////////////////////////////////
++// Drawing the chart
++///////////////////////////////////////////////
++var CHART_BACK_COLOR = "90-#161616-#3a3a3a";
++var CPU_COLOR = "#ff0079";
++var MEM_COLOR = "#91df03";
++var LEGEND_BACK_COLOR = "#464646";
++var LEGEND_FONT_COLOR = "#999999";
++var GRID_LINE_COLOR = "#373737";
++var CHART_WIDTH = 540;
++var CHART_HEIGHT = 350;
++var TIME_LABELS_COUNT = 6;
++$(document).ready(
++        function(){
++            $.ajax({
++                dataType: "json",
++                url: '{{url "/data/node_mem_cpu.json"}}',
++                data: 'foo=bar',
++                success: function (data) {
++                    paper_chart = new Raphael(document.getElementById('mem_cup_chart'), CHART_WIDTH, CHART_HEIGHT);
++                    var paper_chart_rect = paper_chart.rect(0, 0, CHART_WIDTH, CHART_HEIGHT, 6).attr({"fill": CHART_BACK_COLOR});
++                    //top title
++                    paper_chart.text(CHART_WIDTH/2, 20, "Total number of nodes:"+data.length).attr({"font-size": 10, fill: '#fff', stroke: "none"});
++                    //legend
++                    var legend_rect = paper_chart.rect(5, CHART_HEIGHT-25, CHART_WIDTH-10,20 , 5).attr({"fill":LEGEND_BACK_COLOR});
++                    var elemX = legend_rect.getBBox().x+10;
++                    var elemY = legend_rect.getBBox().y+10;
++
++
++                    var l1 = paper_chart.path('M ' + elemX + ' ' + elemY + ' L ' + (elemX+10) + ' ' + elemY ,3).attr({'stroke':CPU_COLOR,'stroke-width':3});
++                    elemX += l1.getBBox().width + 5;
++
++                    var l2 = paper_chart.text(elemX,elemY,"Avg CPU Usage(%)").attr({"font-size":10,fill:LEGEND_FONT_COLOR,"stroke":"none"});
++                    l2.translate(l2.getBBox().width/2,0);
++                    elemX += l2.getBBox().width + 10;
++
++                    var l3 = paper_chart.circle(elemX, elemY,3).attr({"fill":CPU_COLOR, stroke:"none"});
++                    elemX += l3.getBBox().width + 5;
++
++                    var l4 = paper_chart.text(elemX,elemY,"CPU Usage By Node(%)").attr({"font-size":10,fill:LEGEND_FONT_COLOR,"stroke":"none"});
++                    l4.translate(l4.getBBox().width/2,0);
++                    elemX += l4.getBBox().width + 10;
++
++
++                    var l5 = paper_chart.path('M ' + elemX + ' ' + elemY + ' L ' + (elemX+10) + ' ' + elemY ,3).attr({'stroke':MEM_COLOR,'stroke-width':3});
++                    elemX += l5.getBBox().width + 5;
++
++                    var l6 = paper_chart.text(elemX,elemY,"Avg Mem Usage(%)").attr({"font-size":10,fill:LEGEND_FONT_COLOR,"stroke":"none"});
++                    l6.translate(l6.getBBox().width/2,0);
++                    elemX += l6.getBBox().width + 10;
++
++                    var l7 = paper_chart.circle(elemX, elemY,3).attr({"fill":MEM_COLOR, stroke:"none"});
++                    elemX += l7.getBBox().width + 5;
++
++                    var l8 = paper_chart.text(elemX,elemY,"Mem Usage By Node(%)").attr({"font-size":10,fill:LEGEND_FONT_COLOR,"stroke":"none"});
++                    l8.translate(l8.getBBox().width/2,0);
++                    elemX += l8.getBBox().width + 10;
++
++                    //Drawing the grid
++                    var percentage_labels = [0,20,40,60,80];
++                    var grid_height = CHART_HEIGHT - 50;
++                    var grid_width = CHART_WIDTH - 40;
++                    var chart_x0 = 50;
++                    var chart_y0 = 0;
++
++                    for(var i=0;i<percentage_labels.length;i++){
++                        var yPos = chart_y0 + grid_height - i*grid_height/percentage_labels.length;
++                        var strokeWidth = 1;
++                        if(percentage_labels[i]==0){
++                            strokeWidth = 3;
++                        }
++                        paper_chart.text(chart_x0-20,yPos ,percentage_labels[i]+"%").attr({"font-size":10,fill:LEGEND_FONT_COLOR,"stroke":"none"});
++                        paper_chart.path('M '+ chart_x0 + ' ' + yPos + ' L ' + CHART_WIDTH + ' ' + yPos).attr({'stroke':GRID_LINE_COLOR,'stroke-width':strokeWidth});
++                    }
++
++                    paper_chart.text(chart_x0-40,grid_height/2 ,"Percentage").attr({"font-size":10,fill:LEGEND_FONT_COLOR,"stroke":"none"}).rotate("-90");
++
++                    var grid_content_width = CHART_WIDTH - chart_x0 - 20;
++                    var  chart_content_x0 = chart_x0+10;
++                    var grid_label_gap = grid_content_width/TIME_LABELS_COUNT;
++
++
++                    //Drawing the data
++                    var minTime,maxTime;
++                    for(i=0;i<data.length;i++){
++                        var records =  data[i].records;
++                        for(var j=0;j<records.length;j++){
++                            if (minTime == undefined) {
++                                minTime = records[j].time
++                            } else if(minTime > records[j].time) {
++                                minTime = records[j].time;
++                            }
++
++                            if (maxTime == undefined) {
++                                maxTime = records[j].time
++                            } else if(maxTime < records[j].time) {
++                                maxTime = records[j].time;
++                            }
++                        }
++                    }
++                    var timeDif = maxTime - minTime;
++                    if(timeDif < 4*60*1000){
++                        //upset case
++                    }else{
++
++                    }
++                    var timeGap = timeDif/TIME_LABELS_COUNT;
++
++                    var labelTime = minTime;
++                    var index = 0;
++                    while(labelTime<maxTime){
++                        labelTime += timeGap;
++                        if(index != 0){
++                            paper_chart.text(chart_content_x0 + index*grid_label_gap,chart_y0 + grid_height,labelTime).attr({"font-size":10,fill:LEGEND_FONT_COLOR,"stroke":"none"});
++                        }
++                        index++;
++                    }
++
++                }
++            });
++        }
++);
++
++
++</script>
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/error_page.hbs b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/error_page.hbs
+new file mode 100644
+index 0000000..8d086a7
+--- /dev/null
++++ b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/error_page.hbs
+@@ -0,0 +1,19 @@
++<div class="container content-starter">
++    <div class="row">
++        <div class="col-lg-12">
++            <h1>Error Occurred</h1>
++        </div>
++    </div>
++</div>
++<div class="container">
++    <div class="row">
++        {{#each error}}
++        <div class="col-md-12">
++            <div class="alert alert-danger alert-dismissable">
++                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
++                <strong>Error!</strong> {{errorMessage}}
++            </div>
++        </div>
++        {{/each}}
++    </div>
++</div>
+diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs
+index f22c5f3..7ab4c39 100644
+--- a/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs
++++ b/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs
+@@ -19,7 +19,7 @@
+                  </div>
+                  <div class="col-lg-9 custom-nav">
+                     <ul class="pull-left">
+-                        <!-- li {{#if dashboard}} class="active" {{/if}}><a href="{{url "/"}}"><i class="fa fa-dashboard"></i> <span><br>Dashboard</span></a></li -->
++                        <!-- li {{#if dashboard}} class="active" {{/if}}><a href="{{url "/dashboard.jag"}}"><i class="fa fa-dashboard"></i> <span><br>Dashboard</span></a></li -->
+                         <li {{#if my_cartridges}} class="active" {{/if}}><a href="{{url "/"}}"><i class="fa fa-tasks"></i>  <span><br>My Cartridges</span></a></li>
+                         {{#isAllowed "configure"}}<li {{#if configure_stratos}} class="active" {{/if}}><a href="{{url "/configure_stratos.jag"}}"><i class="fa fa-cogs"></i> <span><br>Configure Stratos</span></a></li>{{/isAllowed}}
+                         {{#isAllowed "tenant-mgt"}}<li {{#if tenant_mgt}} class="active" {{/if}}><a href="{{url "/tenant_management.jag"}}"><i class="fa fa-user"></i> <span><br>Tenant Mgt</span></a></li>{{/isAllowed}}
+diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridge_info.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridge_info.js
+index a430643..019de9d 100644
+--- a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridge_info.js
++++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridge_info.js
+@@ -1,42 +1,79 @@
+ var render = function (theme, data, meta, require) {
+-    // Re-create the data structure of the cartridges.
+-    theme('index', {
+-        body: [
+-            {
+-                partial: 'cartridge_info',
+-                context: {
+-                    title:'Cartridges',
+-                    cartridgeInfo:data.cartridgeInfo,
+-                    lbclusterinfo:data.lbCluster,
+-                    clusterinfo:data.clusterInfo,
+-                    host:data.cartridgeInfo.hostName
++    if(data.error.length == 0 ){
++        theme('index', {
++            body: [
++                {
++                    partial: 'cartridge_info',
++                    context: {
++                        title:'Cartridges',
++                        cartridgeInfo:data.cartridgeInfo.cartridge,
++                        lbclusterinfo:data.lbCluster.cluster,
++                        clusterinfo:data.clusterInfo.cluster,
++                        host:data.cartridgeInfo.cartridge.hostName
++                    }
+                 }
+-            }
+-        ],
+-        header: [
+-            {
+-                partial: 'header',
+-                context:{
+-                    title:'Cartridges',
+-                    my_cartridges:true,
+-                    button:{
+-                        link:'/',
+-                        name:'Back To My Cartridges',
+-                        class_name:"btn-default",
+-                        class_icon: 'icon-arrow-left'
+-                    },
+-                    has_help:true,
+-                    help:'Create cartridges like PHP, Python, Ruby etc.. Or create data cartridges with mySql, PostgreSQL. Directly install applications like Drupal, Wordpress etc..'
++            ],
++            header: [
++                {
++                    partial: 'header',
++                    context:{
++                        title:'Cartridges',
++                        my_cartridges:true,
++                        button:{
++                            link:'/',
++                            name:'Back To My Cartridges',
++                            class_name:"btn-default",
++                            class_icon: 'icon-arrow-left'
++                        },
++                        has_help:true,
++                        help:'Create cartridges like PHP, Python, Ruby etc.. Or create data cartridges with mySql, PostgreSQL. Directly install applications like Drupal, Wordpress etc..'
++                    }
+                 }
+-            }
+-        ],
+-        title:[
+-            {
+-                partial:'title',
+-                context:{
+-                    title:"My Cartridges"
++            ],
++            title:[
++                {
++                    partial:'title',
++                    context:{
++                        title:"My Cartridges"
++                    }
+                 }
+-            }
+-        ]
+-    });
++            ]
++        });
++    }else{
++        theme('index', {
++            body: [
++                {
++                    partial: 'error_page',
++                    context: {
++                        title:'Error',
++                        error:data.error
++                    }
++                }
++            ],
++            header: [
++                {
++                    partial: 'header',
++                    context: {
++                        title: 'My Cartridges',
++                        my_cartridges: true,
++                        button: {
++                            link: '/cartridges.jag',
++                            name: 'Subscribe to Cartridge',
++                            class_name: 'btn-important'
++                        },
++                        has_help: true,
++                        help: 'Create cartridges like PHP, Python, Ruby etc.. Or create data cartridges with mySql, PostgreSQL. Directly install applications like Drupal, Wordpress etc..'
++                    }
++                }
++            ],
++            title: [
++                {
++                    partial: 'title',
++                    context: {
++                        title: "My Cartridges"
++                    }
++                }
++            ]
++        });
++    }
+ };
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridges.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridges.js
+index 1242e0c..55753ff 100644
+--- a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridges.js
++++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridges.js
+@@ -1,73 +1,111 @@
+ var render = function (theme, data, meta, require) {
+     // Re-create the data structure of the cartridges.
+-    var log = new Log();
+-    session.remove("get-status");
+-    session.remove("deploy-status");
+-    var cartridges_old = data.cartridges.cartridge;
+-    var cartridges_new = [
+-        {
+-            kind: "Framework",
+-            cartridges: []}
+-    ];
+-    var cartridgesToPush;
+-    for (var i = 0; i < cartridges_old.length; i++) {
+-        if (cartridges_old[i].provider == undefined || (cartridges_old[i].provider.toLowerCase() != "application" && cartridges_old[i].provider.toLowerCase() != "data" )) {
+-            cartridgesToPush = null;
+-            for (var j = 0; j < cartridges_new.length; j++) {
+-                if (cartridges_new[j].kind == "Framework") {
+-                    cartridgesToPush = cartridges_new[j].cartridges;
+-                }
+-            }
+-            cartridgesToPush.push(cartridges_old[i]);
+-        } else {
+-            cartridgesToPush = null;
+-            for (var j = 0; j < cartridges_new.length; j++) {
+-                if (cartridges_new[j].kind == cartridges_old[i].provider) {
+-                    cartridgesToPush = cartridges_new[j].cartridges;
++    if(data.error.length == 0 ){
++        var log = new Log();
++        session.remove("get-status");
++        session.remove("deploy-status");
++        var cartridges_old = data.cartridges.cartridge;
++        var cartridges_new = [
++            {
++                kind: "Framework",
++                cartridges: []}
++        ];
++        var cartridgesToPush;
++        for (var i = 0; i < cartridges_old.length; i++) {
++            if (cartridges_old[i].provider == undefined || (cartridges_old[i].provider.toLowerCase() != "application" && cartridges_old[i].provider.toLowerCase() != "data" )) {
++                cartridgesToPush = null;
++                for (var j = 0; j < cartridges_new.length; j++) {
++                    if (cartridges_new[j].kind == "Framework") {
++                        cartridgesToPush = cartridges_new[j].cartridges;
++                    }
+                 }
+-            }
+-            if (cartridgesToPush == null) {
+-                var kind = cartridges_old[i].provider;
+-                cartridges_new.push({kind: cartridges_old[i].provider, cartridges: [cartridges_old[i]]})
+-            } else {
+                 cartridgesToPush.push(cartridges_old[i]);
++            } else {
++                cartridgesToPush = null;
++                for (var j = 0; j < cartridges_new.length; j++) {
++                    if (cartridges_new[j].kind == cartridges_old[i].provider) {
++                        cartridgesToPush = cartridges_new[j].cartridges;
++                    }
++                }
++                if (cartridgesToPush == null) {
++                    var kind = cartridges_old[i].provider;
++                    cartridges_new.push({kind: cartridges_old[i].provider, cartridges: [cartridges_old[i]]})
++                } else {
++                    cartridgesToPush.push(cartridges_old[i]);
++                }
+             }
+         }
+-    }
+-    theme('index', {
+-        body: [
+-            {
+-                partial: 'cartridges',
+-                context: {
+-                    title:'Cartridges',
+-                    cartridges:cartridges_new
++        theme('index', {
++            body: [
++                {
++                    partial: 'cartridges',
++                    context: {
++                        title:'Cartridges',
++                        cartridges:cartridges_new
++                    }
+                 }
+-            }
+-        ],
+-        header: [
+-            {
+-                partial: 'header',
+-                context:{
+-                    title:'Cartridges',
+-                    my_cartridges:true,
+-                    button:{
+-                        link:'/',
+-                        name:'Back To My Cartridges',
+-                        class_name:"btn-default",
+-                        class_icon: 'icon-arrow-left'
+-                    },
+-                    has_help:true,
+-                    help:'Create cartridges like PHP, Python, Ruby etc.. Or create data cartridges with mySql, PostgreSQL. Directly install applications like Drupal, Wordpress etc..'
++            ],
++            header: [
++                {
++                    partial: 'header',
++                    context:{
++                        title:'Cartridges',
++                        my_cartridges:true,
++                        button:{
++                            link:'/',
++                            name:'Back To My Cartridges',
++                            class_name:"btn-default",
++                            class_icon: 'icon-arrow-left'
++                        },
++                        has_help:true,
++                        help:'Create cartridges like PHP, Python, Ruby etc.. Or create data cartridges with mySql, PostgreSQL. Directly install applications like Drupal, Wordpress etc..'
++                    }
+                 }
+-            }
+-        ],
+-        title:[
+-            {
+-                partial:'title',
+-                context:{
+-                    title:"My Cartridges"
++            ],
++            title:[
++                {
++                    partial:'title',
++                    context:{
++                        title:"My Cartridges"
++                    }
+                 }
+-            }
+-        ]
+-    });
++            ]
++        });
++    }else{
++        theme('index', {
++            body: [
++                {
++                    partial: 'error_page',
++                    context: {
++                        title:'Error',
++                        error:data.error
++                    }
++                }
++            ],
++            header: [
++                {
++                    partial: 'header',
++                    context: {
++                        title: 'My Cartridges',
++                        my_cartridges: true,
++                        button: {
++                            link: '/cartridges.jag',
++                            name: 'Subscribe to Cartridge',
++                            class_name: 'btn-important'
++                        },
++                        has_help: true,
++                        help: 'Create cartridges like PHP, Python, Ruby etc.. Or create data cartridges with mySql, PostgreSQL. Directly install applications like Drupal, Wordpress etc..'
++                    }
++                }
++            ],
++            title: [
++                {
++                    partial: 'title',
++                    context: {
++                        title: "My Cartridges"
++                    }
++                }
++            ]
++        });
++    }
+ };
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos.js
+index 8291d7e..c3322ca 100644
+--- a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos.js
++++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos.js
+@@ -1,132 +1,170 @@
+ var render = function (theme, data, meta, require) {
+     session.put("configuring","true");
+-    var title;
+-    var header_type;
+-    var deploy_status = session.get("deploy-status");
+-    var list_status = session.get("get-status");
+-    var err_message;
+-    var isErrDeply = false;
+-    var isErrGet = false;
+-    var isErr = false;
+-    var isSucceeded = false;
+-    var wizard_on_val = [];
+-    for(var i=0; i<6 ;i++){
+-        if(i <= data.wizard.step-1){
+-            wizard_on_val.push(true);
+-        }else{
+-            wizard_on_val.push(false);
++    if(data.error.length == 0 ){
++        var title;
++        var header_type;
++        var deploy_status = session.get("deploy-status");
++        var list_status = session.get("get-status");
++        var err_message;
++        var isErrDeply = false;
++        var isErrGet = false;
++        var isErr = false;
++        var isSucceeded = false;
++        var wizard_on_val = [];
++        for(var i=0; i<6 ;i++){
++            if(i <= data.wizard.step-1){
++                wizard_on_val.push(true);
++            }else{
++                wizard_on_val.push(false);
++            }
++        }
++        var config_status = data.wizard;
++        if( config_status.step == 1 ){
++            title = 'Partition Deployment';
++        }else if( config_status.step == 2 ){
++            title = 'Auto scale Policy Deployment';
++        }else if( config_status.step == 3 ){
++            title = 'Deployment Policy Deployment';
++        }else if( config_status.step == 4 ){
++            title = 'Lb';
++        }else if( config_status.step == 5 ){
++            title = 'Cartridge Deployment';
++        }else if( config_status.step == 6 ){
++            title = 'Multi-Tenant Service Deployment';
+         }
+-    }
+-    var config_status = data.wizard;
+-    if( config_status.step == 1 ){
+-        title = 'Partition Deployment';
+-    }else if( config_status.step == 2 ){
+-        title = 'Auto scale Policy Deployment';
+-    }else if( config_status.step == 3 ){
+-        title = 'Deployment Policy Deployment';
+-    }else if( config_status.step == 4 ){
+-        title = 'Lb';
+-    }else if( config_status.step == 5 ){
+-        title = 'Cartridge Deployment';
+-    }else if( config_status.step == 6 ){
+-        title = 'Multi-Tenant Service Deployment';
+-    }
+ 
+-    if(deploy_status == "succeeded") {
+-        isErrDeply = false;
+-        isSucceeded = true;
+-    } else if(deploy_status == null) {
+-        isErrDeply = false;
+-    } else {
+-        isErrDeply = true;
+-        err_message = deploy_status;
+-    }
++        if(deploy_status == "succeeded") {
++            isErrDeply = false;
++            isSucceeded = true;
++        } else if(deploy_status == null) {
++            isErrDeply = false;
++        } else {
++            isErrDeply = true;
++            err_message = deploy_status;
++        }
+ 
+-    if(list_status == "succeeded") {
+-        isErrGet = false;
+-    } else if(list_status == null) {
+-        isErrGet = false;
+-    } else {
+-        isErrGet = true;
+-        if(err_message == undefined) {
+-                   err_message = list_status;
++        if(list_status == "succeeded") {
++            isErrGet = false;
++        } else if(list_status == null) {
++            isErrGet = false;
+         } else {
+-            err_message = err_message + ", " + list_status;
++            isErrGet = true;
++            if(err_message == undefined) {
++                       err_message = list_status;
++            } else {
++                err_message = err_message + ", " + list_status;
++            }
++            step_data = "[]";
+         }
+-        step_data = "[]";
+-    }
+ 
+-    if(isErrDeply || isErrGet) {
+-     isErr = true;
+-    }
++        if(isErrDeply || isErrGet) {
++         isErr = true;
++        }
+ 
+-    session.remove("get-status");
+-    session.remove("deploy-status");
++        session.remove("get-status");
++        session.remove("deploy-status");
+ 
+-    for(var i=0;i<step_data.length;i++){
+-        step_data[i].json_string = stringify(step_data[i]);
+-    }
++        for(var i=0;i<step_data.length;i++){
++            step_data[i].json_string = stringify(step_data[i]);
++        }
+ 
+-    theme('index', {
+-        body: [
+-            {
+-                partial: 'configure_stratos_wizard',
+-                context: {
+-                    title:title,
+-                    step_data:data.step_data,
+-                    step:config_status.step,
+-                    wizard_on:false,
+-                    config_on:true,
+-                    wizard_on_1:wizard_on_val[0],
+-                    wizard_on_2:wizard_on_val[1],
+-                    wizard_on_3:wizard_on_val[2],
+-                    wizard_on_4:wizard_on_val[3],
+-                    wizard_on_5:wizard_on_val[4],
+-                    wizard_on_6:wizard_on_val[5],
+-                    config_status:data.config_status,
+-                    data_string:stringify(data.step_data),
+-                    configure_stratos:true
++        theme('index', {
++            body: [
++                {
++                    partial: 'configure_stratos_wizard',
++                    context: {
++                        title:title,
++                        step_data:data.step_data,
++                        step:config_status.step,
++                        wizard_on:false,
++                        config_on:true,
++                        wizard_on_1:wizard_on_val[0],
++                        wizard_on_2:wizard_on_val[1],
++                        wizard_on_3:wizard_on_val[2],
++                        wizard_on_4:wizard_on_val[3],
++                        wizard_on_5:wizard_on_val[4],
++                        wizard_on_6:wizard_on_val[5],
++                        config_status:data.config_status,
++                        data_string:stringify(data.step_data),
++                        configure_stratos:true
+ 
++                    }
+                 }
+-            }
+-        ],
+-        header: [
+-            {
+-                partial: 'header',
+-                context:{
+-                    title:'Configure Stratos',
+-                    button:{
+-                        link:'/',
+-                        name:'Deploy New Cartridge',
+-                        class_name:''
+-                    },
+-                    has_help:false,
+-                    step_data:true,
+-                    config_status:data.config_status,
+-                    wizard_on:false,
+-                    config_on:true,
+-                    wizard_on_1:wizard_on_val[0],
+-                    wizard_on_2:wizard_on_val[1],
+-                    wizard_on_3:wizard_on_val[2],
+-                    wizard_on_4:wizard_on_val[3],
+-                    wizard_on_5:wizard_on_val[4],
+-                    wizard_on_6:wizard_on_val[5],
+-                    step:step,
+-                    configure_stratos:true,
+-                    error:isErr,
+-                    deploy_status:isSucceeded,
+-                    error_msg:err_message,
+-                    type:title
++            ],
++            header: [
++                {
++                    partial: 'header',
++                    context:{
++                        title:'Configure Stratos',
++                        button:{
++                            link:'/',
++                            name:'Deploy New Cartridge',
++                            class_name:''
++                        },
++                        has_help:false,
++                        step_data:true,
++                        config_status:data.config_status,
++                        wizard_on:false,
++                        config_on:true,
++                        wizard_on_1:wizard_on_val[0],
++                        wizard_on_2:wizard_on_val[1],
++                        wizard_on_3:wizard_on_val[2],
++                        wizard_on_4:wizard_on_val[3],
++                        wizard_on_5:wizard_on_val[4],
++                        wizard_on_6:wizard_on_val[5],
++                        step:step,
++                        configure_stratos:true,
++                        error:isErr,
++                        deploy_status:isSucceeded,
++                        error_msg:err_message,
++                        type:title
++                    }
+                 }
+-            }
+-        ],
+-        title:[
+-            {
+-                partial:'title',
+-                context:{
+-                    title:title
++            ],
++            title:[
++                {
++                    partial:'title',
++                    context:{
++                        title:title
++                    }
+                 }
+-            }
+-        ]
+-    });
++            ]
++        });
++    }else{
++        theme('index', {
++            body: [
++                {
++                    partial: 'error_page',
++                    context: {
++                        title:'Error',
++                        error:data.error
++                    }
++                }
++            ],
++            header: [
++                {
++                    partial: 'header',
++                    context: {
++                        title: 'My Cartridges',
++                        my_cartridges: true,
++                        button: {
++                            link: '/cartridges.jag',
++                            name: 'Subscribe to Cartridge',
++                            class_name: 'btn-important'
++                        },
++                        has_help: true,
++                        help: 'Create cartridges like PHP, Python, Ruby etc.. Or create data cartridges with mySql, PostgreSQL. Directly install applications like Drupal, Wordpress etc..'
++                    }
++                }
++            ],
++            title: [
++                {
++                    partial: 'title',
++                    context: {
++                        title: "My Cartridges"
++                    }
++                }
++            ]
++        });
++    }
+ };
+\ No newline at end of file
+diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos_wizard.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos_wizard.js
+index e51f9f7..adc404a 100644
+--- a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos_wizard.js
++++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos_wizard.js
+@@ -1,127 +1,165 @@
+ var render = function (theme, data, meta, require) {
+     session.put("configuring","false");
+-    var deploy_status = session.get("deploy-status");
+-    var list_status = session.get("get-status");
+-    var title;
+-    var err_message;
+-    var isErrDeply = false;
+-    var isErrGet = false;
+-    var isErr = false;
+-    var isSucceeded = false;
+-    var artifact_deploy = session.get("deploy_artifacts");
+-    session.remove("deploy_artifacts");
+-    var wizard_on_val = [];
+-    for(var i=0; i<6 ;i++){
+-        if(i <= data.wizard.step-1){
+-            wizard_on_val.push(true);
+-        }else{
+-            wizard_on_val.push(false);
++    if(data.error.length == 0 ){
++        var deploy_status = session.get("deploy-status");
++        var list_status = session.get("get-status");
++       

<TRUNCATED>