You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ma...@apache.org on 2014/03/13 06:31:03 UTC

[1/3] STRATOS-504

Repository: incubator-stratos
Updated Branches:
  refs/heads/master ac6d6e73c -> 33e36eb0b


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos-test/WEB-INF/cxf-servlet.xml
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos-test/WEB-INF/cxf-servlet.xml b/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos-test/WEB-INF/cxf-servlet.xml
index 63adc2d..e4566a3 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos-test/WEB-INF/cxf-servlet.xml
+++ b/components/org.apache.stratos.rest.endpoint/src/main/webapp/stratos-test/WEB-INF/cxf-servlet.xml
@@ -29,8 +29,12 @@
         <jaxrs:serviceBeans>
             <ref bean="stratosRestEndpointTestBean"/>
         </jaxrs:serviceBeans>
+
+        <jaxrs:providers>
+            <ref bean="exceptionHandler"/>
+        </jaxrs:providers>
     </jaxrs:server>
 
     <bean id="stratosRestEndpointTestBean" class="org.apache.stratos.rest.endpoint.mock.StratosTestAdmin"/>
-
+    <bean id="exceptionHandler" class="org.apache.stratos.rest.endpoint.handlers.CustomExceptionMapper"/>
 </beans>


[2/3] STRATOS-504

Posted by ma...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos_wizard.js
----------------------------------------------------------------------
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");
+        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(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");
 
-    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';
-    }
-    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: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],
-                    data_string:stringify(data.step_data)
+        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';
+        }
+        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: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],
+                        data_string:stringify(data.step_data)
+                    }
                 }
-            }
-        ],
-        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: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:artifact_deploy
+            ],
+            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: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:artifact_deploy
+                    }
                 }
-            }
-        ],
-        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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/dashboard.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/dashboard.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/dashboard.js
new file mode 100644
index 0000000..ab786d9
--- /dev/null
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/dashboard.js
@@ -0,0 +1,76 @@
+var render = function (theme, data, meta, require) {
+    if(data.error.length == 0 ){
+        theme('index', {
+            body: [
+                {
+                    partial: 'dashboard',
+                    context: {
+                        title: 'Dashboard',
+                        elbs: stringify(data.elbs),
+                        clusters: stringify(data.clusters)
+                    }
+                }
+            ],
+            header: [
+                {
+                    partial: 'header',
+                    context: {
+                        title: 'My Cartridges',
+                        dashboard: 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"
+                    }
+                }
+            ]
+        });
+    }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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/index.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/index.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/index.js
index 443e2b0..6acdd05 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/index.js
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/index.js
@@ -1,76 +1,113 @@
 var render = function (theme, data, meta, require) {
       // Re-create the data structure of the cartridges.
-
-    var cartridges_old = data.mycartridges.cartridge;
-    if(cartridges_old == null) {
-        cartridges_old = {};
-    }
-    session.remove("get-status");
-    session.remove("deploy-status");
-    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 cartridges_old = data.mycartridges.cartridge;
+        if(cartridges_old == null) {
+            cartridges_old = {};
+        }
+        session.remove("get-status");
+        session.remove("deploy-status");
+        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: 'mycartridges',
-                context: {
-                    title: 'My Cartridges',
-                    mycartridges: cartridges_new
+        theme('index', {
+            body: [
+                {
+                    partial: 'mycartridges',
+                    context: {
+                        title: 'My Cartridges',
+                        mycartridges: cartridges_new
+                    }
                 }
-            }
-        ],
-        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..'
+            ],
+            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"
+            ],
+            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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/subscribe_cartridge.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/subscribe_cartridge.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/subscribe_cartridge.js
index 8684412..b1e0368 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/subscribe_cartridge.js
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/subscribe_cartridge.js
@@ -1,41 +1,79 @@
 var render = function (theme, data, meta, require) {
-    theme('index', {
-        body: [
-            {
-                partial: 'subscribe_cartridge',
-                context: {
-                    autoScalePolicies:data.autoScalePolicies.autoscalePolicy,
-                    deploymentPolicies:data.deploymentPolicies.deploymentPolicy,
-                    cartridge:data.cartridge.cartridge,
-                    cartridgeType:meta.request.getParameter('cartridgeType')
+    if(data.error.length == 0 ){
+        theme('index', {
+            body: [
+                {
+                    partial: 'subscribe_cartridge',
+                    context: {
+                        autoScalePolicies:data.autoScalePolicies.autoscalePolicy,
+                        deploymentPolicies:data.deploymentPolicies.deploymentPolicy,
+                        cartridge:data.cartridge.cartridge,
+                        cartridgeType:meta.request.getParameter('cartridgeType')
+                    }
                 }
-            }
-        ],
-        header: [
-                    {
-                        partial: 'header',
-                        context:{
-                            title:'Subscribe Cartridge',
-                            my_cartridges:true,
-                            button:{
-                                link: '/cartridges.jag',
-                                name: 'Select different Cartridge',
-                                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:'Subscribe Cartridge',
+                                my_cartridges:true,
+                                button:{
+                                    link: '/cartridges.jag',
+                                    name: 'Select different Cartridge',
+                                    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:"Subscribe Cartridge -" + data.cartridge.cartridge.cartridgeType + " " + data.cartridge.cartridge.version + " Cartridge",
+                        cartridge:data.cartridge.cartridge
+                    }
+                }
+            ]
+        });
+    }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"
                     }
-                ],
-        title:[
-            {
-                partial:'title',
-                context:{
-                    title:"Subscribe Cartridge -" + data.cartridge.cartridge.cartridgeType + " " + data.cartridge.cartridge.version + " Cartridge",
-                    cartridge:data.cartridge.cartridge,
                 }
-            }
-        ]
-    });
+            ]
+        });
+    }
 };
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_management.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_management.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_management.js
index 8551bef..efde5d0 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_management.js
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_management.js
@@ -3,41 +3,78 @@ var render = function (theme, data, meta, require) {
     session.remove("deploy-status");
     var create_btn_class = 'btn-important';
     var title = 'Tenant Management';
-    theme('index', {
-        body: [
-            {
-                partial: 'tenant_management',
-                context: {
-                    title:title,
-                    tenants:data.tenants
+    if(data.error.length == 0 ){
+        theme('index', {
+            body: [
+                {
+                    partial: 'tenant_management',
+                    context: {
+                        title:title,
+                        tenants:data.tenants.tenantInfoBean
+                    }
                 }
-            }
-        ],
-        header: [
-            {
-                partial: 'header',
-                context:{
-                    title:'Tenant Management',
-                    button:{
-                        link:'/tenant_new.jag',
-                        name:'Add New Tenant',
-                        class_name:create_btn_class
-                    },
-                    has_help:true,
-                    help:"Tenants you create has permission to view and subscribe to Cartridges. Tenants don't have permission to do Partition deployment, Policy deployment, LB Creation, and MT service deployment.",
-                    tenant_mgt:true,
-                    config_status:data.config_status,
-                    has_action_buttons:true
+            ],
+            header: [
+                {
+                    partial: 'header',
+                    context:{
+                        title:'Tenant Management',
+                        button:{
+                            link:'/tenant_new.jag',
+                            name:'Add New Tenant',
+                            class_name:create_btn_class
+                        },
+                        has_help:true,
+                        help:"Tenants you create has permission to view and subscribe to Cartridges. Tenants don't have permission to do Partition deployment, Policy deployment, LB Creation, and MT service deployment.",
+                        tenant_mgt:true,
+                        has_action_buttons:true
+                    }
                 }
-            }
-        ],
-        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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_new.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_new.js b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_new.js
index 3ae7026..1620e37 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_new.js
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/tenant_new.js
@@ -2,41 +2,78 @@ var render = function (theme, data, meta, require) {
 
     var create_btn_class = 'btn-default';
     var title = 'Tenant Management - Add New Tenant';
-    theme('index', {
-        body: [
-            {
-                partial: 'tenant_new',
-                context: {
-                    title:title,
-                    tenants:data.tenants
+    if(data.error.length == 0 ){
+        theme('index', {
+            body: [
+                {
+                    partial: 'tenant_new',
+                    context: {
+                        title:title,
+                        tenants:data.tenants
+                    }
                 }
-            }
-        ],
-        header: [
-            {
-                partial: 'header',
-                context:{
-                    title:title,
-                    button:{
-                        link:'/tenant_management.jag',
-                        name:'Tenant Management',
-                        class_name:create_btn_class,
-                        class_icon:'fa fa-arrow-left'
-                    },
-                    has_help:true,
-                    help:"Tenants you create has permission to view and subscribe to Cartridges. Tenants don't have permission to do Partition deployment, Policy deployment, LB Creation, and MT service deployment.",
-                    tenant_mgt:true,
-                    config_status:data.config_status
+            ],
+            header: [
+                {
+                    partial: 'header',
+                    context:{
+                        title:title,
+                        button:{
+                            link:'/tenant_management.jag',
+                            name:'Tenant Management',
+                            class_name:create_btn_class,
+                            class_icon:'fa fa-arrow-left'
+                        },
+                        has_help:true,
+                        help:"Tenants you create has permission to view and subscribe to Cartridges. Tenants don't have permission to do Partition deployment, Policy deployment, LB Creation, and MT service deployment.",
+                        tenant_mgt:true
+                    }
                 }
-            }
-        ],
-        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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/subthemes/theme2/ui/css/main.css
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/subthemes/theme2/ui/css/main.css b/components/org.apache.stratos.manager.console/console/themes/theme1/subthemes/theme2/ui/css/main.css
new file mode 100644
index 0000000..c9cb8da
--- /dev/null
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/subthemes/theme2/ui/css/main.css
@@ -0,0 +1,579 @@
+body, div, h1,h2,h3,h4,h5, p, span{
+    font-family: 'Open Sans', sans-serif;
+}
+a{cursor: pointer}
+a:hover{text-decoration: none}
+.top-blue-strip{
+    background: #18c3f4;
+    height: 6px;
+}
+.login-logo-section{
+    text-align: center;
+    width: 100%;
+    padding:20px 0;
+}
+h1.login-title{
+    font-size:28px;
+    text-align: center;
+    padding-bottom:20px;
+    margin:0;
+}
+h2.login-sub-title{
+    font-size:14px;
+    background: transparent url(../img/transparent-white.png) repeat left top;
+    padding:5px;
+    margin:20px 0;
+}
+.login-box-wrapper{
+    text-align: center;
+}
+.login-box{
+    width:415px;
+    display: inline-block;
+}
+.login-box-top{
+    background: #e8ebeb url(../img/clouds.png) no-repeat 40px 10px;
+    border-radius: 0;
+    -webkit-border-top-left-radius: 8px;
+    -webkit-border-top-right-radius: 8px;
+    -moz-border-radius-topleft: 8px;
+    -moz-border-radius-topright: 8px;
+    border-top-left-radius: 8px;
+    border-top-right-radius: 8px;
+    padding-top:10px;
+    padding-bottom:10px;
+}
+.login-box-bottom{
+    background: #c1c1c1;
+    border-radius: 0;
+    -webkit-border-bottom-right-radius: 8px;
+    -webkit-border-bottom-left-radius: 8px;
+    -moz-border-radius-bottomright: 8px;
+    -moz-border-radius-bottomleft: 8px;
+    border-bottom-right-radius: 8px;
+    border-bottom-left-radius: 8px;
+    padding:20px 10px;
+    text-align: left;
+}
+.login-box-footer{
+    background: transparent url(../img/login-shadow.png) no-repeat left top;
+    width:440px;
+    height: 64px;
+    margin-top:10px;
+    display: inline-block;
+}
+.username-wrapper{
+    background: #c1c1c1 url(../img/icon-user.png) no-repeat 8px 16px;
+    -webkit-border-top-left-radius: 5px;
+    -webkit-border-bottom-left-radius: 5px;
+    -moz-border-radius-topleft: 5px;
+    -moz-border-radius-bottomleft: 5px;
+    border-top-left-radius: 5px;
+    border-bottom-left-radius: 5px;
+    height:60px;
+    margin:0 10px;
+    padding-left:40px;
+}
+.password-wrapper{
+    background: #c1c1c1 url(../img/icon-lock.png) no-repeat 8px 16px;
+    -webkit-border-top-left-radius: 5px;
+    -webkit-border-bottom-left-radius: 5px;
+    -moz-border-radius-topleft: 5px;
+    -moz-border-radius-bottomleft: 5px;
+    border-top-left-radius: 5px;
+    border-bottom-left-radius: 5px;
+    height:60px;
+    margin:0 10px;
+    padding-left:40px;
+}
+.login-button-wrapper{
+    margin:34px 10px 20px;
+}
+div.username-wrapper input.input-username{
+    height:60px;
+    width:100%;
+    font-size: 16px;
+}
+div.password-wrapper input.input-password{
+    height:60px;
+    width:100%;
+    font-size: 16px;
+}
+.login-button{
+    height:40px;
+    width:100%;
+    font-size: 16px;
+}
+.footer-right{
+    width:400px;
+    font-size: 111px;
+    color:red;
+}
+/* Sticky footer styles
+     -------------------------------------------------- */
+
+html,
+body {
+    height: 100%;
+    /* The html and body elements cannot have any padding or margin. */
+}
+
+/* Wrapper for page content to push down footer */
+#wrap {
+    min-height: 100%;
+    height: auto !important;
+    height: 100%;
+    /* Negative indent footer by it's height */
+    margin: 0 auto -35px;
+}
+
+/* Set the fixed height of the footer here */
+#push,
+#footer {
+    height: 62px;
+    padding-top:10px;
+
+}
+#footer{
+    background: #e8ebeb;
+}
+.main-menu{
+    background: #e8ebeb;
+    -webkit-box-shadow: 1px 3px 4px 1px rgba(71,71,71,1);
+    -moz-box-shadow: 1px 3px 4px 1px rgba(71,71,71,1);
+    box-shadow: 1px 3px 4px 1px rgba(71,71,71,1);
+}
+.shadow-wrapper{
+    background: transparent url(../img/repeat.png) repeat-x;
+        -webkit-box-shadow: 1px 3px 4px 1px rgba(71,71,71,1);
+        -moz-box-shadow: 1px 3px 4px 1px rgba(71,71,71,1);
+        box-shadow: 1px 3px 4px 1px rgba(71,71,71,1);
+}
+.breadcrumb-strip{
+    min-height: 58px;
+    z-index: 1;
+    padding-top:10px;
+}
+.menu-strip{
+    z-index: 2;
+}
+.custom-nav ul{
+    padding:0;
+    margin:0;
+    border-left:solid 1px #9eafbc;
+    border-right:solid 1px #cadff0;
+}
+.custom-nav ul li{
+    float:left;
+    display: block;
+    border-left:solid 1px #cadff0;
+    border-right:solid 1px #9eafbc;
+}
+.custom-nav ul li a{
+    height: 64px;
+    display: block;
+    padding:5px 20px;
+    text-align: center;
+    font-size: 14px;
+    color:#444;
+}
+.custom-nav ul li a:hover{
+    background: #c8d6df;
+    text-decoration: none;
+}
+.custom-nav ul li i{
+    font-size: 24px;
+}
+.custom-nav ul li.active a{
+    background: #595a5a;
+    color: #fff;
+}
+.custom-nav ul li.active a:hover{
+    background: #3e3f3f;
+}
+.custom-nav ul li.active i{
+    color:#06adf0;
+}
+.navbar-brand{
+    padding:10px 0 0 0;
+}
+.help-section p {
+    font-size: 12px;
+}
+.icons-help{
+    font-size: 34px;
+    color:#a4a6a6;
+    display: block;
+    float:left;
+    margin-right:10px;
+}
+i.icons-small-size{
+    font-size: 20px;
+}
+.content-starter{
+    margin-top: 125px;
+}
+h1{
+    color:#575757;
+    font-size:37px;
+}
+h2{
+    background: #fff;
+    display: inline-block;
+    padding:0 10px 0 0;
+    margin:10px 0 20px;
+    color:#575757;
+    text-transform:capitalize;
+
+}
+.h2-wrapper{
+    background: transparent url(../img/gray.png) repeat-x left 30px;
+}
+h3{
+    margin: 15px 0 0 0;
+}
+h3 span{
+    color:#999;
+}
+h4{
+    font-weight: bold;
+    padding: 0;
+    margin: 10px 0 0 0;
+    color:#686868;
+    font-size: 14px;
+}
+.box-container{
+    background: #eff1f1;
+    border: solid 1px #dadada;
+    min-height: 160px;
+    margin-top:10px ;
+    margin-bottom: 20px;
+    padding:10px;
+}
+.box-left{
+    padding-top: 20px;
+}
+.state-box{
+    position: absolute;
+    margin-top: -15px;
+}
+.active-state{
+    background: #67b200;
+    color:#fff;
+    padding:5px 10px;
+}
+.inactive-state{
+    background: #fbc240;
+    color:#fff;
+    padding:5px 10px;
+}
+.big-pro-icons{
+    font-size: 50px;
+    margin-top: 20px;
+}
+.box-left span{
+    font-size: 14px;
+}
+.big-pro-icons-title{
+    text-align: left    ;
+    padding-top: 10px;
+}
+.cartridge-description{
+    padding-top:10px;
+    font-size: 12px;
+}
+
+.lb-description{
+    padding-top:10px;
+    font-size: 14px;
+    font-weight: bold;
+    color: green;
+}
+.required{
+    font-weight: bold;
+}
+.speech-bubble{
+    width: 780px;
+    background: #eff1f1;
+    border:solid 1px #dadada;
+    padding: 10px;
+    color:#686868;
+    position: absolute;
+}
+
+.speech-pointer {
+    content: '';
+    position: absolute;
+    border-style: solid;
+    border-width: 15px 15px 15px 0;
+    border-color: transparent #eff1f1;
+    display: block;
+    width: 0;
+    z-index: 1;
+    left: -15px;
+    top: 5px;
+}
+#credential_container h2{
+    background: transparent;
+}
+.sub-menu{
+    padding:0;
+    margin:-7px 0 0;
+}
+.sub-menu li{
+    list-style: none;
+    float:left;
+}
+.sub-menu li a{
+    display:block;
+    padding:15px 10px;
+    border-left: solid 1px #f2f5f5;
+    border-right: solid 1px #d1d3d3;
+    height: 55px;
+}
+.sub-menu li.active a{
+    background: #f45b00;
+    color:#fff;
+}
+.sub-menu li span{
+    display:block;
+    padding:15px 10px;
+    border-left: solid 1px #f2f5f5;
+    border-right: solid 1px #d1d3d3;
+    height: 55px;
+    color:#999;
+}
+/* wizard menu */
+.sub-menu-wizard{
+    padding:0;
+    margin:-7px 0 0;
+}
+.sub-menu-wizard li{
+    list-style: none;
+    float:left;
+    background: #dcdcdc;
+    text-align: center;
+}
+.sub-menu-wizard li.no-background{
+    background: transparent;
+}
+.sub-menu-wizard li a{
+    display:block;
+    padding:5px 10px;
+    height: 55px;
+    text-align: center;
+}
+.sub-menu-wizard li.active a{
+    background: #ffae00;
+    color:#fff;
+}
+.sub-menu-wizard li a{
+    background: #444444;
+    color:#fff;
+}
+.non-wizard li a{
+    border-left:solid 1px #444;
+    border-right:solid 1px #efefef;
+}
+.sub-menu-wizard li span{
+    display:block;
+    padding:15px 10px;
+    border-left: solid 1px #f2f5f5;
+    border-right: solid 1px #d1d3d3;
+    height: 55px;
+    color:#999;
+}
+.sub-menu-wizard-pointer {
+    content: '';
+    border-style: solid;
+    border-width: 27px 0 28px 10px;
+    border-color: transparent #dcdcdc;
+    display: block;
+    width: 0;
+    z-index: 1;
+}
+ul li.active-pointer{
+    border-color: transparent #ffae00;
+    background: #ffae00;
+}
+div.wizard-number{
+    display: inline-block;
+    width:20px;
+    padding:2px 5px;
+    background: #595a5a;
+    color:#fff;
+    font-weight: bold;
+    font-size: 12px;
+    border-radius: 11px;
+    -moz-border-radius: 11px;
+    -webkit-border-radius: 11px;
+}
+div.in-active-wizard-item{
+    padding:5px 10px;
+    height: 55px;
+}
+ul.sub-menu-wizard li.active-no-background{
+    background: #dcdcdc;
+}
+/* inactive menu */
+.sub-menu-inactive{
+    padding:0;
+    margin:-7px 0 0;
+    border-right:solid 4px #444;
+}
+
+.sub-menu-inactive li{
+    list-style: none;
+    float:left;
+    display:block;
+    padding:15px 10px;
+    border-left: solid 1px #f2f5f5;
+    border-right: solid 1px #d1d3d3;
+    height: 55px;
+    color:#888;
+    background: #ddd;
+}
+#messageModal i{
+    font-size:75px;
+}
+#messageModal i.error{
+    color:red;
+}
+#messageModal i.warning{
+    color: #ffba41;
+}
+#messageModal i.info{
+    color: #4b7eff;
+}
+#messageModal td.imageCell{
+    padding-right:20px;
+}
+/* syntax highlight styles */
+pre {border:none;background: transparent }
+.string { color: green; }
+.number { color: darkorange; }
+.boolean { color: blue; }
+.null { color: magenta; }
+.key { color: red; }
+textarea{display: block;}
+textarea.jsonEditor{
+    width:100%;
+}
+/*syntax highlight styles */
+.info-bar{
+    background: #ffe096;
+    position: absolute;
+    width:100%;
+    margin-top:-10px;
+}
+div.error{
+    background: none repeat scroll 0 0 #FF2222;
+    color: #FFFFFF;
+}
+
+div.success{
+    background:#ffe096;
+    color:#058a26;
+}
+
+.color-a-full-icons{
+    color:#ff9000;
+    font-size:30px;
+}
+.panel-heading{
+    padding:5px 10px;
+}
+.padding-remover-left{
+    padding-left:0;
+}
+label.required{
+    font-weight: bold;
+}
+li.dropdown ul.dropdown-menu li{
+    float: none;
+}
+li.dropdown ul.dropdown-menu li a{
+    height: 28px;
+    padding: 3px 20px;
+    text-align: left;
+}
+li.dropdown ul.dropdown-menu li a:hover{
+    background: #3e3f3f;
+    color:#fff;
+}
+li.dropdown ul.dropdown-menu li a i{
+    font-size: 20px;
+}
+.green-check{
+    color: #00b600;
+    font-size:18px;
+}.orange-check{
+    color: #e68d00;
+    font-size:18px;
+}
+.table thead > tr > th{
+    vertical-align: top;
+    background: #9d9f9f;
+    color:#fff;
+}
+.table thead > tr > th div{
+    font-size: 11px;
+    color:#d9d9d9;
+}
+.terms-of-use{
+    padding:10px;
+    background: #f7f7f7;
+    border: solid 1px #d1d1d1;
+}
+#wrap > div.container, .main-menu div.container{
+    min-width: 800px;
+}
+@media (max-width: 980px) {
+    .sub-menu-wizard{
+        font-size: 11px;
+    }
+}
+@media (max-width: 1200px) {
+    .sub-menu{
+            font-size: 11px;
+        }
+}
+label.error{
+    color: #be0000;
+    padding-bottom: 10px;
+}
+.loginError{
+    color: #BE0000;
+    margin-top: -27px;
+    position: absolute;
+    text-align: center;
+    width: 395px;
+}
+.hasDomain{
+    color:green;
+}
+.noDomain{
+    color:red;
+}
+.un-subscribe-container{
+    position: absolute;
+    width:100%;
+    text-align: right;
+    padding-right:30px;
+    z-index: 100;
+    margin-top: -5px;
+}
+.un-subscribe-container a.un-subscribe{
+    color:red;
+}
+.un-subscribe-container i{
+    font-size:20px;
+}
+.terms-of-use-check{
+    padding-bottom:20px;
+}
+.terms-of-use-check label.error{
+    position: absolute;
+    margin-left: 0;
+    margin-top: 20px;
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/fonts/dropped text.txt
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/fonts/dropped text.txt b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/fonts/dropped text.txt
new file mode 100644
index 0000000..02595ae
--- /dev/null
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/fonts/dropped text.txt	
@@ -0,0 +1 @@
+img_backup
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-down.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-down.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-down.png
new file mode 100644
index 0000000..f915fdd
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-down.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-restart.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-restart.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-restart.png
new file mode 100644
index 0000000..c6f9932
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-restart.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-start.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-start.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-start.png
new file mode 100644
index 0000000..dad0673
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/btn-start.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/confirm.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/confirm.gif b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/confirm.gif
new file mode 100644
index 0000000..6c719b3
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/confirm.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/dash.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/dash.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/dash.png
new file mode 100644
index 0000000..a78ffe9
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/dash.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/details.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/details.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/details.png
new file mode 100644
index 0000000..d3828ed
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/details.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/diagram.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/diagram.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/diagram.png
new file mode 100644
index 0000000..ceee4ec
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/diagram.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/error.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/error.gif b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/error.gif
new file mode 100644
index 0000000..b8da205
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/error.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-plus.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-plus.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-plus.png
new file mode 100644
index 0000000..0e00c37
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-plus.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-dark.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-dark.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-dark.png
new file mode 100644
index 0000000..82e2c02
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-dark.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-light.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-light.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-light.png
new file mode 100644
index 0000000..9c10d73
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem-light.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem.png
new file mode 100644
index 0000000..9c10d73
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/icon-problem.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/image_10.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/image_10.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/image_10.png
new file mode 100644
index 0000000..516986c
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/image_10.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/info.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/info.gif b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/info.gif
new file mode 100644
index 0000000..31ecb4e
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/info.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/overlay.png
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/overlay.png b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/overlay.png
new file mode 100644
index 0000000..e33524e
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/overlay.png differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/warning.gif
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/warning.gif b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/warning.gif
new file mode 100644
index 0000000..b4ba52f
Binary files /dev/null and b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/img/warning.gif differ

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/wizard.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/wizard.js b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/wizard.js
index a53202a..209865f 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/wizard.js
+++ b/components/org.apache.stratos.manager.console/console/themes/theme1/ui/js/wizard.js
@@ -1,8 +1,46 @@
 $(function () {
+    var isValidForm = function(){
+        if(parseInt($('#items').val()) == 0 || $('#wizard_on').val() == "false"){
+            if($('#policy').val() == ""){
+                $('#policy').addClass('error').focus();
+                $('#policyError').html("Required").show();
+                return false;
+            }else{
+                $('#policy').removeClass('error');
+                $('#policyError').hide();
+                return true;
+            }
+        }else{
+            return true;
+        }
+
+    };
+    var isValidPolicy = function(){
+        var policy = $('#policy').val();
+        var error;
+        if(policy != ""){
+            try {
+                var c = $.parseJSON(policy);
+            }
+            catch (err) {
+                error = err;
+            }
+        }
+
+        if(error == undefined){
+            $('#policy').removeClass('error');
+            $('#policyError').hide();
+            return true;
+        }else{
+            $('#policy').addClass('error').focus();
+            $('#policyError').html(error).show();
+            return false;
+        }
+    };
     $('#wizardNext').click(function () {
         var newStep = parseInt($(this).attr('data-step')) + 1;
         $('#nextStep').val(newStep);
-        if(isValidForm()){
+        if(isValidForm() && isValidPolicy()){
             $('#jsonForm').submit();
         }
     });
@@ -43,25 +81,9 @@ $(function () {
             }
         }else{
             isValidForm();
+            isValidPolicy();
         }
     });
-
-    var isValidForm = function(){
-        if(parseInt($('#items').val()) == 0 || $('#wizard_on').val() == "false"){
-            if($('#policy').val() == ""){
-                $('#policy').addClass('error').focus();
-                $('#policyError').show();
-                return false;
-            }else{
-                $('#policy').removeClass('error');
-                $('#policyError').hide();
-                return true;
-            }
-        }else{
-            return true;
-        }
-
-    };
     $('pre').each(function () {
         var jsonStr = $(this).html();
         jsonStr = jsonStr.replace(/\'/g, '\"');

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/util/utility.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/util/utility.jag b/components/org.apache.stratos.manager.console/console/util/utility.jag
index d0716ba..1765b15 100644
--- a/components/org.apache.stratos.manager.console/console/util/utility.jag
+++ b/components/org.apache.stratos.manager.console/console/util/utility.jag
@@ -98,9 +98,7 @@ consoleAppUtil = new function(){
     };
 
     this.deployCartridgeDefinition = function(cartridgeDefinition){
-        log.info("inside the cartridge call");
         return this.send("POST","/cartridge/definition",cartridgeDefinition).data;
-        log.info("end of the call ");
     };
 
     this.deployServiceDefinition = function(serviceDefinition){
@@ -157,8 +155,8 @@ consoleAppUtil = new function(){
     };
 
     this.getApplicableDeploymentPolicies = function(cartridgeType){
-               return this.sendReceive("GET","/" + cartridgeType + "/policy/deployment",{}).data;
-           };
+        return this.sendReceive("GET","/policy/deployment/"+ cartridgeType ,{}).data;
+   };
 
     this.getPartitions = function(){
         return this.sendReceive("GET","/partition",{}).data;
@@ -204,29 +202,40 @@ consoleAppUtil = new function(){
     };
     this.getConfigStatus = function(){
         var configStatus = {};
-
+        var error;
         var par_res = this.sendReceive("GET","/partition",{}).data;
         var get_status = session.get("get-status");
-
-        if(get_status == "succeeded") {
-            if(par_res.partition.length == 0){
-                configStatus.first_use = true;
-            }else{
-            var car_res = this.sendReceive("GET","/cartridge/available/list",{}).data;
-            var get_status = session.get("get-status");
-
+        if(par_res.Error != undefined){
+            error = par_res.Error;
+            configStatus.first_use = true;
+        }else{
             if(get_status == "succeeded") {
-                if(car_res.cartridge.length == 0){
+                if(par_res.partition.length == 0){
+                    configStatus.first_use = true;
+                }else{
+                    var car_res = this.sendReceive("GET","/cartridge/available/list",{}).data;
+                    if(car_res.Error != undefined){
+                        error=car_res.Error;
                         configStatus.first_use = false;
                         configStatus.not_complete = true;
                     }else{
-
-                        configStatus.not_complete = false;
-                        configStatus.first_use = false;
+                        get_status = session.get("get-status");
+                        if(get_status == "succeeded") {
+                            if(car_res.cartridge.length == 0){
+                                configStatus.first_use = false;
+                                configStatus.not_complete = true;
+                            }else{
+
+                                configStatus.not_complete = false;
+                                configStatus.first_use = false;
+                            }
+                        }
                     }
                 }
             }
         }
+
+
         return configStatus;
     };
 

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
index 9ea32af..9292ae8 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/MockContext.java
@@ -27,6 +27,7 @@ import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.Autosca
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.ServiceDefinitionBean;
+import org.apache.stratos.rest.endpoint.bean.topology.Cluster;
 import org.apache.stratos.rest.endpoint.exception.RestAPIException;
 
 import java.util.*;
@@ -42,6 +43,7 @@ public class MockContext {
     private Map<String,AutoscalePolicy> autoscalePolicyMap = new HashMap<String, AutoscalePolicy>();
     private Map<String,DeploymentPolicy> deploymentPolicyMap = new HashMap<String, DeploymentPolicy>();
     private Map<String,ServiceDefinitionBean> serviceDefinitionMap = new HashMap<String, ServiceDefinitionBean>();
+    private Map<String,Cluster> clusterMap = new HashMap<String, Cluster>();
 
     private Set<Cartridge> temp = new HashSet<Cartridge>();
 
@@ -77,17 +79,17 @@ public class MockContext {
 
 
 
-    public Cartridge[] getAvailableMultiTenantCartridges(){
+    public Cartridge[] getAvailableMultiTenantCartridges() throws RestAPIException{
        return availableMultiTenantCartridges.values().toArray(new Cartridge[0]);
     }
 
 
-    public Cartridge[] getAvailableSingleTenantCartridges(){
+    public Cartridge[] getAvailableSingleTenantCartridges() throws RestAPIException{
         return availableSingleTenantCartridges.values().toArray(new Cartridge[0]);
     }
 
 
-    public Cartridge[] getAvailableLbCartridges(){
+    public Cartridge[] getAvailableLbCartridges() throws RestAPIException{
         /*Map<String,Cartridge> availableLbCartridges = new HashMap<String,Cartridge>();
         Iterator it = availableSingleTenantCartridges.entrySet().iterator();
         while(it.hasNext()){
@@ -112,7 +114,7 @@ public class MockContext {
         return availableSingleTenantCartridges.values().toArray(new Cartridge[0]);
     }
 
-    public Cartridge[] getAvailableCartridges(){
+    public Cartridge[] getAvailableCartridges() throws RestAPIException{
         /*Map<String, Cartridge> availableCartridges = new HashMap<String,Cartridge>();
         Iterator it = availableSingleTenantCartridges.entrySet().iterator();
         while(it.hasNext()){
@@ -135,16 +137,15 @@ public class MockContext {
         }
         System.out.println(availableCartridges.size());
         return availableCartridges.values().toArray(new Cartridge[0]);*/
-
         return availableSingleTenantCartridges.values().toArray(new Cartridge[0]);
     }
 
 
-    public Cartridge[] getSubscribedCartridges(){
+    public Cartridge[] getSubscribedCartridges() throws RestAPIException{
         return subscribedCartridges.values().toArray(new Cartridge[0]);
     }
 
-    public SubscriptionInfo subscribeToCartridge(CartridgeInfoBean cartridgeInfoBean){
+    public SubscriptionInfo subscribeToCartridge(CartridgeInfoBean cartridgeInfoBean) throws RestAPIException{
          String cartridgeType = cartridgeInfoBean.getCartridgeType();
          String alias = cartridgeInfoBean.getAlias();
          Cartridge subscribedCartridge;
@@ -155,7 +156,8 @@ public class MockContext {
          }else if(availableMultiTenantCartridges.containsKey(cartridgeType)){
              subscribedCartridge = availableMultiTenantCartridges.get(cartridgeType);
          }else {
-             throw new RuntimeException("Wrong programme sequence"); // TODO; handle properly
+             String msg = "Wrong programme sequence";
+             throw new RestAPIException(msg);
          }
         //Proper way is copy construrctor
         Cartridge copy = new Cartridge();
@@ -178,31 +180,46 @@ public class MockContext {
         return subscriptionInfo;
     }
 
-    public StratosAdminResponse unsubscribe(String alias) {
+    public StratosAdminResponse unsubscribe(String alias) throws RestAPIException{
         if(subscribedCartridges.containsKey(alias)){
             subscribedCartridges.remove(alias);
+        }else{
+            throw new RestAPIException("Unable to un-subscribe");
         }
         StratosAdminResponse stratosAdminResponse = new StratosAdminResponse();
         stratosAdminResponse.setMessage("Successfully un-subscribed");
         return stratosAdminResponse;
     }
 
-    public StratosAdminResponse addTenant(TenantInfoBean tenantInfoBean){
-        tenantMap.put(tenantInfoBean.getTenantDomain(),tenantInfoBean);
+    public StratosAdminResponse addTenant(TenantInfoBean tenantInfoBean) throws RestAPIException{
+        try{
+            tenantMap.put(tenantInfoBean.getTenantDomain(),tenantInfoBean);
+        }catch (Exception e){
+            throw new RestAPIException(e.getMessage());
+        }
         StratosAdminResponse stratosAdminResponse = new StratosAdminResponse();
         stratosAdminResponse.setMessage("Successfully added new Tenant");
         return stratosAdminResponse;
     }
 
-    public TenantInfoBean getTenant(String tenantDomain){
-          return tenantMap.get(tenantDomain);
+    public TenantInfoBean getTenant(String tenantDomain) throws RestAPIException{
+        if(!tenantMap.containsKey(tenantDomain)){
+            throw new RestAPIException("Information for tenant: " + tenantDomain + " is not available");
+        }
+        return tenantMap.get(tenantDomain);
     }
 
-    public Cartridge getCartridgeInfo(String alias){
-          return subscribedCartridges.get(alias);
+    public Cartridge getCartridgeInfo(String alias) throws RestAPIException{
+        if(!subscribedCartridges.containsKey(alias)){
+            throw new RestAPIException("Cartridge information is not available.");
+        }
+        return subscribedCartridges.get(alias);
     }
 
-    public Cartridge getAvailableSingleTenantCartridgeInfo(String cartridgeType){
+    public Cartridge getAvailableSingleTenantCartridgeInfo(String cartridgeType) throws RestAPIException{
+        if(!availableSingleTenantCartridges.containsKey(cartridgeType)){
+            throw new RestAPIException("Cartridge is not available.");
+        }
         return availableSingleTenantCartridges.get(cartridgeType);
     }
 
@@ -213,11 +230,11 @@ public class MockContext {
         return stratosAdminResponse;
     }
 
-    public TenantInfoBean[] getTenants() {
+    public TenantInfoBean[] getTenants() throws RestAPIException{
         return tenantMap.values().toArray(new TenantInfoBean[0]);
     }
 
-    public TenantInfoBean[] retrievePartialSearchTenants(String searchDomain) {
+    public TenantInfoBean[] retrievePartialSearchTenants(String searchDomain) throws RestAPIException{
         List<TenantInfoBean> searchResult = new LinkedList<TenantInfoBean>();
         for(String tenantDomain : tenantMap.keySet()){
             if(tenantDomain.contains(searchDomain)){
@@ -283,36 +300,51 @@ public class MockContext {
         return stratosAdminResponse;
     }
 
-    public Partition[] getPartitions() {
+    public Partition[] getPartitions() throws RestAPIException{
         return partitionMap.values().toArray(new Partition[0]);
     }
 
-    public Partition getPartition(String partitionId) {
+    public Partition getPartition(String partitionId) throws RestAPIException{
+        if(!partitionMap.containsKey(partitionId)){
+            throw new RestAPIException("There is no partition with the id: " + partitionId);
+        }
         return  partitionMap.get(partitionId);
     }
 
 
-    public Partition[] getPartitionsOfPolicy(String deploymentPolicyId) {
+    public Partition[] getPartitionsOfPolicy(String deploymentPolicyId) throws RestAPIException{
+        if(!deploymentPolicyMap.containsKey(deploymentPolicyId)){
+            throw new RestAPIException("There is no deployment policy with id: " + deploymentPolicyId);
+        }
         return deploymentPolicyMap.get(deploymentPolicyId).partition.toArray(new Partition[0]);
     }
 
-    public PartitionGroup[] getPartitionGroups(String deploymentPolicyId) {
+    public PartitionGroup[] getPartitionGroups(String deploymentPolicyId)  throws RestAPIException{
+        if(!deploymentPolicyMap.containsKey(deploymentPolicyId)){
+            throw new RestAPIException("There is no policy with id: " + deploymentPolicyId);
+        }
         return deploymentPolicyMap.get(deploymentPolicyId).partitionGroup.toArray(new PartitionGroup[0]);
     }
 
-    public AutoscalePolicy[] getAutoscalePolicies() {
+    public AutoscalePolicy[] getAutoscalePolicies()  throws RestAPIException{
          return autoscalePolicyMap.values().toArray(new AutoscalePolicy[0]);
     }
 
-    public AutoscalePolicy getAutoscalePolicies(String autoscalePolicyId) {
+    public AutoscalePolicy getAutoscalePolicies(String autoscalePolicyId) throws  RestAPIException{
+        if(!autoscalePolicyMap.containsKey(autoscalePolicyId)){
+            throw new RestAPIException("There is no auto scale policy with id: " + autoscalePolicyId);
+        }
         return autoscalePolicyMap.get(autoscalePolicyId);
     }
 
-    public DeploymentPolicy[] getDeploymentPolicies() {
+    public DeploymentPolicy[] getDeploymentPolicies() throws RestAPIException{
         return deploymentPolicyMap.values().toArray(new DeploymentPolicy[0]);
     }
 
-    public DeploymentPolicy getDeploymentPolicies(String deploymentPolicyId) {
+    public DeploymentPolicy getDeploymentPolicies(String deploymentPolicyId) throws RestAPIException{
+        if(!deploymentPolicyMap.containsKey(deploymentPolicyId)){
+            throw new RestAPIException("There is no deployment policy with id: " + deploymentPolicyId);
+        }
         return deploymentPolicyMap.get(deploymentPolicyId);
     }
     public StratosAdminResponse deployService(ServiceDefinitionBean serviceDefinitionBean) {
@@ -322,20 +354,29 @@ public class MockContext {
         return stratosAdminResponse;
 
     }
-    public ServiceDefinitionBean[] getServices() {
+    public ServiceDefinitionBean[] getServices() throws RestAPIException{
         return serviceDefinitionMap.values().toArray(new ServiceDefinitionBean[0]);
     }
 
-    public Partition[] getPartitions(String deploymentPolicyId, String partitionGroupId) {
+    public Partition[] getPartitions(String deploymentPolicyId, String partitionGroupId) throws RestAPIException{
+        if(!deploymentPolicyMap.containsKey(deploymentPolicyId)){
+            throw new RestAPIException("There is no deployment policy with id: " + deploymentPolicyId);
+        }
+        Partition[] partitions = null;
          DeploymentPolicy deploymentPolicy = deploymentPolicyMap.get(deploymentPolicyId);
          for(PartitionGroup partitionGroup : deploymentPolicy.partitionGroup){
              if(partitionGroup.id.equals(partitionGroupId)){
-                return partitionGroup.partition.toArray(new Partition[0]);
+                 partitions =  partitionGroup.partition.toArray(new Partition[0]);
              }
          }
-         return new Partition[0];
+        if(partitions == null){
+            throw new RestAPIException("Partition not found");
+        }
+        return partitions;
+    }
+    public Cluster[] getClusters() throws RestAPIException{
+        return clusterMap.values().toArray(new Cluster[0]);
     }
-
     /*public DeploymentPolicy[] getValidDeploymentPolicies(String cartridgeType) {
         for(DeploymentPolicy deploymentPolicy : deploymentPolicyMap.values()){
             deploymentPolicy.

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosTestAdmin.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosTestAdmin.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosTestAdmin.java
index 43fa445..268da7b 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosTestAdmin.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/mock/StratosTestAdmin.java
@@ -36,6 +36,7 @@ import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.autoscale.Autosca
 import org.apache.stratos.rest.endpoint.bean.autoscaler.policy.deployment.DeploymentPolicy;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.CartridgeDefinitionBean;
 import org.apache.stratos.rest.endpoint.bean.cartridge.definition.ServiceDefinitionBean;
+import org.apache.stratos.rest.endpoint.bean.topology.Cluster;
 import org.apache.stratos.rest.endpoint.exception.RestAPIException;
 
 import javax.servlet.http.HttpServletRequest;
@@ -51,7 +52,18 @@ public class StratosTestAdmin {
     @Context
     HttpServletRequest httpServletRequest;
 
-    
+    @POST
+    @Path("/init")
+    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
+    public StratosAdminResponse initialize ()
+            throws RestAPIException {
+
+        StratosAdminResponse stratosAdminResponse = new StratosAdminResponse();
+        stratosAdminResponse.setMessage("Successfully logged in");
+        return stratosAdminResponse;
+    }
+
+
     @GET
     @Path("/cookie")
     @Produces("application/json")
@@ -69,7 +81,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableMultiTenantCartridges() throws ADCException {
+    public Cartridge[] getAvailableMultiTenantCartridges() throws RestAPIException {
           return MockContext.getInstance().getAvailableMultiTenantCartridges();
     }
 
@@ -78,7 +90,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableSingleTenantCartridges() throws ADCException {
+    public Cartridge[] getAvailableSingleTenantCartridges() throws RestAPIException {
          return MockContext.getInstance().getAvailableSingleTenantCartridges();
     }
 
@@ -87,7 +99,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableCartridges() throws ADCException {
+    public Cartridge[] getAvailableCartridges() throws RestAPIException {
          return MockContext.getInstance().getAvailableCartridges();
     }
 
@@ -96,7 +108,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getSubscribedCartridges() throws ADCException {
+    public Cartridge[] getSubscribedCartridges() throws RestAPIException {
          return MockContext.getInstance().getSubscribedCartridges();
     }
 
@@ -105,7 +117,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public SubscriptionInfo subscribe(CartridgeInfoBean cartridgeInfoBean) {
+    public SubscriptionInfo subscribe(CartridgeInfoBean cartridgeInfoBean) throws RestAPIException{
           return MockContext.getInstance().subscribeToCartridge(cartridgeInfoBean);
     }
 
@@ -115,7 +127,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge getCartridgeInfo(@PathParam("subscriptionAlias") String subscriptionAlias) throws ADCException {
+    public Cartridge getCartridgeInfo(@PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException {
         return MockContext.getInstance().getCartridgeInfo(subscriptionAlias);
     }
 
@@ -124,8 +136,8 @@ public class StratosTestAdmin {
     @Path("/cartridge/unsubscribe")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public void unsubscribe(String alias){
-          MockContext.getInstance().unsubscribe(alias);
+    public StratosAdminResponse unsubscribe(String alias) throws RestAPIException{
+          return MockContext.getInstance().unsubscribe(alias);
     }
 
     @POST
@@ -134,9 +146,8 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public String addTenant(TenantInfoBean tenantInfoBean) throws Exception {
-         MockContext.getInstance().addTenant(tenantInfoBean);
-         return "tenant added successfully...";  // why this string return type ??
+    public StratosAdminResponse addTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
+         return MockContext.getInstance().addTenant(tenantInfoBean);
     }
 
 
@@ -145,8 +156,8 @@ public class StratosTestAdmin {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public void updateTenant(TenantInfoBean tenantInfoBean) throws Exception {
-        MockContext.getInstance().addTenant(tenantInfoBean);
+    public StratosAdminResponse updateTenant(TenantInfoBean tenantInfoBean) throws RestAPIException {
+        return MockContext.getInstance().addTenant(tenantInfoBean);
     }
 
     @GET
@@ -155,7 +166,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public TenantInfoBean getTenant(@PathParam("tenantDomain") String tenantDomain) throws Exception {
+    public TenantInfoBean getTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
         return MockContext.getInstance().getTenant(tenantDomain);
     }
 
@@ -165,8 +176,8 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public void deleteTenant(@PathParam("tenantDomain") String tenantDomain) throws Exception {
-         MockContext.getInstance().deleteTenant(tenantDomain);
+    public StratosAdminResponse deleteTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
+         return  MockContext.getInstance().deleteTenant(tenantDomain);
     }
 
 
@@ -175,7 +186,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public TenantInfoBean[] retrieveTenants() throws Exception {
+    public TenantInfoBean[] retrieveTenants() throws RestAPIException {
            return MockContext.getInstance().getTenants();
     }
 
@@ -185,7 +196,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public TenantInfoBean[] retrievePartialSearchTenants(@PathParam("domain")String domain) throws Exception {
+    public TenantInfoBean[] retrievePartialSearchTenants(@PathParam("domain")String domain) throws RestAPIException {
             return MockContext.getInstance().retrievePartialSearchTenants(domain);
     }
 
@@ -195,7 +206,7 @@ public class StratosTestAdmin {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public void activateTenant(@PathParam("tenantDomain") String tenantDomain) throws Exception {
+    public void activateTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
             MockContext.getInstance().activateTenant(tenantDomain);
     }
 
@@ -204,8 +215,8 @@ public class StratosTestAdmin {
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
     @SuperTenantService(true)
-    public void deactivateTenant(@PathParam("tenantDomain") String tenantDomain) throws Exception {
-        MockContext.getInstance().deactivateTenant(tenantDomain);
+    public StratosAdminResponse deactivateTenant(@PathParam("tenantDomain") String tenantDomain) throws RestAPIException {
+        return  MockContext.getInstance().deactivateTenant(tenantDomain);
     }
 
    @POST
@@ -239,7 +250,6 @@ public class StratosTestAdmin {
     @SuperTenantService(true)
     public StratosAdminResponse deployCartridgeDefinition (CartridgeDefinitionBean cartridgeDefinitionBean)
             throws RestAPIException {
-        System.out.println("HIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII");
         return MockContext.getInstance().addCartirdgeDefinition(cartridgeDefinitionBean);
     }
 
@@ -268,7 +278,7 @@ public class StratosTestAdmin {
     @Produces("application/json")
     @Consumes("application/json")
     @AuthorizationAction("/permission/protected/manage/monitor/tenants")
-    public Cartridge[] getAvailableLbCartridges() throws ADCException {
+    public Cartridge[] getAvailableLbCartridges() throws RestAPIException {
         return MockContext.getInstance().getAvailableLbCartridges();
     }
 
@@ -404,6 +414,45 @@ public class StratosTestAdmin {
 
     }
 
+    @GET
+    @Path("/cluster/")
+    @Produces("application/json")
+    @Consumes("application/json")
+    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
+    public Cluster[] getClustersForTenant() throws RestAPIException {
+
+        return MockContext.getInstance().getClusters();
+    }
+
+    @GET
+    @Path("/cluster/{cartridgeType}/")
+    @Produces("application/json")
+    @Consumes("application/json")
+    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
+    public Cluster[] getClusters(@PathParam("cartridgeType") String cartridgeType) throws RestAPIException {
+
+        return MockContext.getInstance().getClusters();
+    }
+
+    @GET
+    @Path("/cluster/{cartridgeType}/{subscriptionAlias}")
+    @Produces("application/json")
+    @Consumes("application/json")
+    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
+    public Cluster[] getCluster(@PathParam("cartridgeType") String cartridgeType,
+                              @PathParam("subscriptionAlias") String subscriptionAlias) throws RestAPIException, RestAPIException {
+
+        return MockContext.getInstance().getClusters();
+    }
+
+    @GET
+    @Path("/cluster/clusterId/{clusterId}")
+    @Produces("application/json")
+    @Consumes("application/json")
+    @AuthorizationAction("/permission/protected/manage/monitor/tenants")
+    public Cluster[] getCluster(@PathParam("clusterId") String clusterId) throws RestAPIException {
+        return MockContext.getInstance().getClusters();
+    }
    /* @GET
     @Path("{cartridgeType}/policy/deployment")
     @Produces("application/json")


[3/3] git commit: STRATOS-504

Posted by ma...@apache.org.
STRATOS-504

Signed-off-by: Manula Thantriwatte <ma...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/33e36eb0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/33e36eb0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/33e36eb0

Branch: refs/heads/master
Commit: 33e36eb0bb508b8d34b645f8c49b7195afb14f0e
Parents: ac6d6e7
Author: Chanaka <chanaka@chanaka-TECRA-M11.(none)>
Authored: Mon Mar 10 13:12:56 2014 +0530
Committer: Manula Thantriwatte <ma...@apache.org>
Committed: Thu Mar 13 11:00:31 2014 +0530

----------------------------------------------------------------------
 .../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 +-
 .../themes/theme1/partials/dashboard.hbs        | 560 ++++++++++++++++++
 .../themes/theme1/partials/error_page.hbs       |  19 +
 .../console/themes/theme1/partials/header.hbs   |   2 +-
 .../themes/theme1/renderers/cartridge_info.js   | 111 ++--
 .../themes/theme1/renderers/cartridges.js       | 164 ++++--
 .../theme1/renderers/configure_stratos.js       | 270 +++++----
 .../renderers/configure_stratos_wizard.js       | 264 +++++----
 .../themes/theme1/renderers/dashboard.js        |  76 +++
 .../console/themes/theme1/renderers/index.js    | 167 +++---
 .../theme1/renderers/subscribe_cartridge.js     | 108 ++--
 .../theme1/renderers/tenant_management.js       | 105 ++--
 .../themes/theme1/renderers/tenant_new.js       | 105 ++--
 .../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
 .../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
 .../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(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/cartridge_info.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/cartridge_info.jag b/components/org.apache.stratos.manager.console/console/cartridge_info.jag
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/cartridges.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/cartridges.jag b/components/org.apache.stratos.manager.console/console/cartridges.jag
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/configure_stratos.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/configure_stratos.jag b/components/org.apache.stratos.manager.console/console/configure_stratos.jag
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag b/components/org.apache.stratos.manager.console/console/configure_stratos_wizard.jag
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/dashboard.jag
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/data/clusters.json
----------------------------------------------------------------------
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..68d53e3
--- /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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/data/elbs.json
----------------------------------------------------------------------
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..5d51469
--- /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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/data/node_mem_cpu.json
----------------------------------------------------------------------
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..1c60024
--- /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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/index.jag
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/subscribe_cartridge.jag
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/tenant_management.jag
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/tenant_new.jag
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/pages/index.hbs
----------------------------------------------------------------------
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>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/partials/dashboard.hbs
----------------------------------------------------------------------
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..2e62cd8
--- /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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/partials/error_page.hbs
----------------------------------------------------------------------
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..2eafeea
--- /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>

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/partials/header.hbs
----------------------------------------------------------------------
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..bf22378 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}}

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridge_info.js
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/cartridges.js
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/33e36eb0/components/org.apache.stratos.manager.console/console/themes/theme1/renderers/configure_stratos.js
----------------------------------------------------------------------
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