list partitions done

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

Branch: refs/heads/master
Commit: 2cfb0edbcb0bf716d3f6cbff87ee3d010b7efceb
Parents: 08758f5
Author: Dakshika Jayathilaka <[email protected]>
Authored: Mon Jan 26 17:05:27 2015 +0530
Committer: Dakshika Jayathilaka <[email protected]>
Committed: Tue Jan 27 12:27:02 2015 +0530

----------------------------------------------------------------------
 .../console/configure_form.jag                  |  9 +++++++
 .../console/controllers/rest/rest_calls.jag     |  4 +++
 .../themes/theme0/partials/configure_form.hbs   | 28 ++++++++++++++++++++
 3 files changed, 41 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/2cfb0edb/components/org.apache.stratos.manager.console/console/configure_form.jag
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.manager.console/console/configure_form.jag 
b/components/org.apache.stratos.manager.console/console/configure_form.jag
index 296992f..4f7249f 100644
--- a/components/org.apache.stratos.manager.console/console/configure_form.jag
+++ b/components/org.apache.stratos.manager.console/console/configure_form.jag
@@ -68,6 +68,15 @@ if(isEdit == false && elements.action != 'new') {
 
     switch (formtype) {
 
+        case "partitions":
+            formTitle = "Partition Definition",
+                    buttonText = "Partition Definition";
+            list_data = util.RESTCalls.getPartitions();
+            if (list_data && list_data.length === 0) {
+                list_data = null;
+            }
+            break;
+
         case "autoscalingpolicies":
             formTitle = "Auto-scaling Policie",
                     buttonText = "Auto-scaling Policy";

http://git-wip-us.apache.org/repos/asf/stratos/blob/2cfb0edb/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
 
b/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
index 740957c..3c2f014 100644
--- 
a/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
+++ 
b/components/org.apache.stratos.manager.console/console/controllers/rest/rest_calls.jag
@@ -112,6 +112,10 @@ RESTCalls = new function(){
         return this.send("POST","/cartridge/sync",alias);
     };
 
+    this.getPartitions = function(){
+        return this.sendReceive("GET","/networkPartitions/",{});
+    };
+
     this.getAutoScalePolicies = function(){
         return this.sendReceive("GET","/policy/autoscale",{});
     };

http://git-wip-us.apache.org/repos/asf/stratos/blob/2cfb0edb/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
 
b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
index 6cbd005..6474720 100644
--- 
a/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
+++ 
b/components/org.apache.stratos.manager.console/console/themes/theme0/partials/configure_form.hbs
@@ -177,6 +177,34 @@
                         </div>
                     {{/each}}
                 {{/ifCond}}
+                {{#ifCond formtype "==" "partitions"}}
+                    {{#each content_body.sections}}
+                        <div class="block col-md-4 col-xs-4 grid-group-item 
border-right">
+                            <div class="toggle-menu-icon">
+                                <i class="fa fa-expand "></i>
+                            </div>
+                            <h2 class="truncate">{{id}} </h2>
+
+                            <div 
class="toggle-menu-description">{{description}}</div>
+                            <div class="list-button" style="display: none;">
+                                <button class="btn btn-danger btn-lg 
hover-delete" type="button"
+                                        id="{{id}}" 
data-formtype="delete-partitions"> Delete</button>
+                                <button class="btn btn-info btn-lg 
hover-details" type="button" id="details_list_{{id}}"
+                                        data-url="{{url 
""}}/configure/partitions/{{id}}/" > Details
+                                </button>
+                            </div>
+                            <div class="bottom-bar-wrapper">
+                                <div class="bottom-bar">
+                                    <button class="btn btn-danger btn-lg 
hover-delete" type="button"
+                                            id="{{id}}" 
data-formtype="delete-partitions"> Delete</button>
+                                    <button class="btn btn-info btn-lg 
hover-details" type="button" id="details_{{id}}"
+                                            data-url="{{url 
""}}/configure/partitions/{{id}}/" > Details
+                                    </button>
+                                </div>
+                            </div>
+                        </div>
+                    {{/each}}
+                {{/ifCond}}
             </div>
         </div>
     </div>

Reply via email to