stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject [1/8] stratos git commit: application editor partial added
Date Sat, 13 Dec 2014 04:19:28 GMT
Repository: stratos
Updated Branches:
  refs/heads/4.1.0-test 2f7d4aaf8 -> 55e0d8444


application editor partial added


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

Branch: refs/heads/4.1.0-test
Commit: 3aab09eb1c7691c86c8c198294f5d498ba369875
Parents: 2f7d4aa
Author: Dakshika Jayathilaka <sinhaladjs@gmail.com>
Authored: Thu Dec 11 16:55:54 2014 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Sat Dec 13 09:45:23 2014 +0530

----------------------------------------------------------------------
 .../console/applications_form.jag               |   7 +-
 .../theme0/partials/applications_editor.hbs     |   0
 .../theme0/renderers/applications_form.js       | 104 +++++++++++++++----
 3 files changed, 89 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/3aab09eb/components/org.apache.stratos.manager.console/console/applications_form.jag
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/applications_form.jag b/components/org.apache.stratos.manager.console/console/applications_form.jag
index c4f5b6a..66071da 100644
--- a/components/org.apache.stratos.manager.console/console/applications_form.jag
+++ b/components/org.apache.stratos.manager.console/console/applications_form.jag
@@ -33,7 +33,7 @@ var log = new Log("apachestratos.applications_form"),
         elements = uriMatcher.match('/{context}/applications/{formtype}/'),
         breadcrumbPathLevelOne = 'applications',
         formDataEdit = topology_data = '',
-        isEdit = applicationView = isForm = false,
+        isEdit = applicationView = applicationEditor= isForm = false,
         userPermissions = session.get('PERMISSIONS');
 
 //create left menu
@@ -47,6 +47,8 @@ if (!elements) {
     if (elements.formtype == 'applications' && elements.action != 'new') {
         applicationView = true;
         topology_data = util.RESTCalls.getApplicationTopology(elements.action);
+    }else if(elements.formtype == 'applications' && elements.action == 'new'){
+        applicationEditor = true;
     }else  if(elements.action != 'new'){
         isEdit = true;
     }
@@ -112,7 +114,8 @@ var caramelData = {
     appName: elements.action,
     topology_data: JSON.stringify(topology_data),
     applicationView: applicationView,
-    formTitle: formTitle,
+    applicationEditor: applicationEditor,
+formTitle: formTitle,
     formDataRaw: JSON.stringify(formDataRaw),
     //formDataRaw: JSON.stringify(partition_data.partition[0]),
     formDataEdit: JSON.stringify(formDataEdit),

http://git-wip-us.apache.org/repos/asf/stratos/blob/3aab09eb/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_editor.hbs
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_editor.hbs
b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/applications_editor.hbs
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/stratos/blob/3aab09eb/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js
b/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js
index fd23107..2a7d8fe 100644
--- a/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js
+++ b/components/org.apache.stratos.manager.console/console/themes/theme0/renderers/applications_form.js
@@ -22,7 +22,7 @@ var render = function (theme, data, meta, require) {
 
     if(data.error.length === 0 ){
 
-        if(data.applicationView == true){
+        if(data.applicationView == true) {
             theme('index', {
                 page_meta: [
                     {
@@ -33,42 +33,42 @@ var render = function (theme, data, meta, require) {
                         }
                     }
                 ],
-                header:[
+                header: [
                     {
                         partial: 'index_header',
-                        context:{
+                        context: {
                         }
                     }
                 ],
-                sub_header:[
+                sub_header: [
                     {
-                        partial:'index_sub_header',
-                        context:{
-                            breadcrumbPathLevelOne:data.breadcrumbPathLevelOne,
-                            breadcrumbPathLevelTwo:data.breadcrumbPathLevelTwo
+                        partial: 'index_sub_header',
+                        context: {
+                            breadcrumbPathLevelOne: data.breadcrumbPathLevelOne,
+                            breadcrumbPathLevelTwo: data.breadcrumbPathLevelTwo
                         }
                     }
                 ],
-                left_menu:[
+                left_menu: [
                     {
-                        partial:'index_left_menu',
-                        context:{
-                            left_menu:data.left_menu
+                        partial: 'index_left_menu',
+                        context: {
+                            left_menu: data.left_menu
                         }
                     }
                 ],
-                right_menu_help:[
+                right_menu_help: [
                     {
-                        partial:'index_right_menu_help',
-                        context:{
+                        partial: 'index_right_menu_help',
+                        context: {
 
                         }
                     }
                 ],
                 content: [
                     {
-                        partial:'applications_topology',
-                        context:{
+                        partial: 'applications_topology',
+                        context: {
                             formContext: data.breadcrumbPathLevelTwo,
                             appName: data.appName,
                             topology_data: data.topology_data,
@@ -78,10 +78,74 @@ var render = function (theme, data, meta, require) {
                             formDataRaw: data.formDataRaw,
                             formDataEdit: data.formDataEdit,
                             isForm: data.isForm,
-                            isEdit:data.isEdit,
+                            isEdit: data.isEdit,
                             formTitle: data.formTitle,
-                            content_body: {sections:
-                                data.list_data
+                            content_body: {sections: data.list_data
+                            }
+                        }
+                    }
+
+                ]
+            });
+        }else if(data.applicationEditor == true){
+            theme('index', {
+                page_meta: [
+                    {
+                        partial: 'index_title',
+                        context: {
+                            page_title: 'Apache Stratos - Application Managment',
+                            page_description: 'Apache Stratos - Application Managment'
+                        }
+                    }
+                ],
+                header: [
+                    {
+                        partial: 'index_header',
+                        context: {
+                        }
+                    }
+                ],
+                sub_header: [
+                    {
+                        partial: 'index_sub_header',
+                        context: {
+                            breadcrumbPathLevelOne: data.breadcrumbPathLevelOne,
+                            breadcrumbPathLevelTwo: data.breadcrumbPathLevelTwo
+                        }
+                    }
+                ],
+                left_menu: [
+                    {
+                        partial: 'index_left_menu',
+                        context: {
+                            left_menu: data.left_menu
+                        }
+                    }
+                ],
+                right_menu_help: [
+                    {
+                        partial: 'index_right_menu_help',
+                        context: {
+
+                        }
+                    }
+                ],
+                content: [
+                    {
+                        partial: 'applications_editor',
+                        context: {
+                            formContext: data.breadcrumbPathLevelTwo,
+                            appName: data.appName,
+                            topology_data: data.topology_data,
+                            form_action: data.form_action,
+                            formHtml: data.formHtml,
+                            formData: data.formData,
+                            formDataRaw: data.formDataRaw,
+                            formDataEdit: data.formDataEdit,
+                            isForm: data.isForm,
+                            isEdit: data.isEdit,
+                            formTitle: data.formTitle,
+                            content_body: {sections: data.list_data
                             }
                         }
                     }


Mime
View raw message