cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject git commit: updated refs/heads/ui-vpc-redesign to ff287c1
Date Thu, 16 May 2013 20:46:18 GMT
Updated Branches:
  refs/heads/ui-vpc-redesign b5acb9034 -> ff287c10d


Tier LB UI: Split list view into internal/public


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

Branch: refs/heads/ui-vpc-redesign
Commit: ff287c10d9c30b19d588e4c5153788a58f97ebf0
Parents: b5acb90
Author: Brian Federle <bfederle@gmail.com>
Authored: Thu May 16 13:45:17 2013 -0700
Committer: Brian Federle <bfederle@gmail.com>
Committed: Thu May 16 13:46:14 2013 -0700

----------------------------------------------------------------------
 ui/modules/vpc/vpc.css |    2 +-
 ui/modules/vpc/vpc.js  |    2 +-
 ui/scripts/vpc.js      |  372 +++++++++++++++++++++----------------------
 3 files changed, 187 insertions(+), 189 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff287c10/ui/modules/vpc/vpc.css
----------------------------------------------------------------------
diff --git a/ui/modules/vpc/vpc.css b/ui/modules/vpc/vpc.css
index a7ef13e..92ee80b 100644
--- a/ui/modules/vpc/vpc.css
+++ b/ui/modules/vpc/vpc.css
@@ -140,7 +140,7 @@
 }
 
 .vpc-network-chart .tier-item .content .dashboard-item .total {
-  font-size: 28px;
+  font-size: 17px;
   /*+placement:shift 7px 5px;*/
   position: relative;
   left: 7px;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff287c10/ui/modules/vpc/vpc.js
----------------------------------------------------------------------
diff --git a/ui/modules/vpc/vpc.js b/ui/modules/vpc/vpc.js
index 64081a8..a3a571e 100644
--- a/ui/modules/vpc/vpc.js
+++ b/ui/modules/vpc/vpc.js
@@ -230,7 +230,7 @@
                     {
                       id: 'tierLoadBalancers',
                       name: 'Load balancers',
-                      total: 5
+                      total: '5 Internal<br/>6 Public'
                     },
                     {
                       id: 'tierPortForwarders',

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ff287c10/ui/scripts/vpc.js
----------------------------------------------------------------------
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 7a1c50c..5778692 100644
--- a/ui/scripts/vpc.js
+++ b/ui/scripts/vpc.js
@@ -322,214 +322,212 @@
       
       // Internal load balancers
       tierLoadBalancers: {
-        listView: {
-          id: 'internalLb',
-          fields: {
-            ipaddress: { label: 'label.ip.address' },
-            type: { label: 'label.type' }
-          },
-          dataProvider: function(args) {
-            args.response.success({
-              data: [
-                { ipaddress: '10.3.2.1', type: 'Internal' },
-                { ipaddress: '10.3.2.3', type: 'Internal' },
-                { ipaddress: '10.232.1.4', type: 'Public' }
-              ]
-            });
-          },
-          actions: {
-            add: {
-              label: 'Add Internal LB',
-              createForm: {
-                title: 'Add Internal LB',                
-                fields: {                                   
-                  name: { label: 'label.name', validation: { required: true } },
-                  description: { label: 'label.description', validation: { required: false
} },
-                  sourceipaddress: { label: 'Source IP Address', validation: { required:
false } },
-                  sourceport: { label: 'sourceport', validation: { required: true } },
-                  instanceport: { label: 'instanceport', validation: { required: true } },
-                  algorithm: { 
-                    label: 'label.algorithm',
-                    validation: { required: true },
-                    select: function(args) {
-                      args.response.success({
-                        data: [
-                          { id: 'source', description: 'source' },
-                          { id: 'roundrobin', description: 'roundrobin' },
-                          { id: 'leastconn', description: 'leastconn' }
-                        ]
-                      });
-                    }
-                  }                  
-                }
+        listView: true,
+        sectionSelect: {
+          label: 'Select LB type: '
+        },
+        sections: {
+          internalLoadBalancers: {
+            type: 'select',
+            title: 'Internal LB',
+            listView: {
+              id: 'internalLoadBalancers',
+              fields: {
+                ipaddress: { label: 'label.ip.address' },
+                type: { label: 'label.type' }
               },
-              messages: {
-                notification: function(args) {
-                  return 'Add Internal LB';
-                }
+              dataProvider: function(args) {
+                args.response.success({
+                  data: [
+                    { ipaddress: '10.3.2.1', type: 'Internal' },
+                    { ipaddress: '10.3.2.3', type: 'Internal' },
+                    { ipaddress: '10.232.1.4', type: 'Public' }
+                  ]
+                });
               },
-              action: function(args) {               
-                var data = {
-                  name: args.data.name,
-                  sourceport: args.data.sourceport,
-                  instanceport: args.data.instanceport,
-                  algorithm: args.data.algorithm,
-                  networkid: args.context.networks[0].id,
-                  sourceipaddressnetworkid: args.context.networks[0].id,
-                  scheme: 'Internal'
-                };
-                if(args.data.description != null && args.data.description.length
> 0){
-                  $.extend(data, {
-                    description: args.data.description
-                  });                  
-                }
-                if(args.data.sourceipaddress != null && args.data.sourceipaddress.length
> 0){
-                  $.extend(data, {
-                    sourceipaddress: args.data.sourceipaddress
-                  });                  
-                }                
-                $.ajax({
-                  url: createURL('createLoadBalancer'),
-                  data: data,
-                  success: function(json){                    
-                    var jid = json.createloadbalancerresponse.jobid;   
-                    args.response.success(
-                      {_custom:
-                       {jobId: jid,
-                        getUpdatedItem: function(json) {                          
-                          return json.queryasyncjobresultresponse.jobresult.loadbalancerrule;
+              actions: {
+                add: {
+                  label: 'Add Internal LB',
+                  createForm: {
+                    title: 'Add Internal LB',                
+                    fields: {                                   
+                      name: { label: 'label.name', validation: { required: true } },
+                      description: { label: 'label.description', validation: { required:
false } },
+                      sourceipaddress: { label: 'Source IP Address', validation: { required:
false } },
+                      sourceport: { label: 'sourceport', validation: { required: true } },
+                      instanceport: { label: 'instanceport', validation: { required: true
} },
+                      algorithm: { 
+                        label: 'label.algorithm',
+                        validation: { required: true },
+                        select: function(args) {
+                          args.response.success({
+                            data: [
+                              { id: 'source', description: 'source' },
+                              { id: 'roundrobin', description: 'roundrobin' },
+                              { id: 'leastconn', description: 'leastconn' }
+                            ]
+                          });
                         }
-                       }
+                      }                  
+                    }
+                  },
+                  messages: {
+                    notification: function(args) {
+                      return 'Add Internal LB';
+                    }
+                  },
+                  action: function(args) {               
+                    var data = {
+                      name: args.data.name,
+                      sourceport: args.data.sourceport,
+                      instanceport: args.data.instanceport,
+                      algorithm: args.data.algorithm,
+                      networkid: args.context.networks[0].id,
+                      sourceipaddressnetworkid: args.context.networks[0].id,
+                      scheme: 'Internal'
+                    };
+                    if(args.data.description != null && args.data.description.length
> 0){
+                      $.extend(data, {
+                        description: args.data.description
+                      });                  
+                    }
+                    if(args.data.sourceipaddress != null && args.data.sourceipaddress.length
> 0){
+                      $.extend(data, {
+                        sourceipaddress: args.data.sourceipaddress
+                      });                  
+                    }                
+                    $.ajax({
+                      url: createURL('createLoadBalancer'),
+                      data: data,
+                      success: function(json){                    
+                        var jid = json.createloadbalancerresponse.jobid;   
+                        args.response.success(
+                          {_custom:
+                           {jobId: jid,
+                            getUpdatedItem: function(json) {                          
+                              return json.queryasyncjobresultresponse.jobresult.loadbalancerrule;
+                            }
+                           }
+                          }
+                        );    
                       }
-                    );    
-                  }
-                });
-                
-                args.response.success();
-              },
-              notification: {
-                poll: function(args) {
-                  args.complete({
-                    data: {
-                      ipaddress: '10.0.3.2',
-                      type: 'Internal'
+                    });
+                    
+                    args.response.success();
+                  },
+                  notification: {
+                    poll: function(args) {
+                      args.complete({
+                        data: {
+                          ipaddress: '10.0.3.2',
+                          type: 'Internal'
+                        }
+                      });
                     }
-                  });
+                  }
                 }
               }
             }
           },
-          detailView: {
-            isMaximized: true,
-            tabs: {
-              loadBalancing: {
-                title: 'label.load.balancing',
-                custom: function(args) {
-                  var context = args.context;
-                  var $multi = $('<div>').addClass('loadBalancer');
-
-                  $multi.multiEdit({
-                    context: context,
-                    listView: $.extend(true, {}, cloudStack.sections.instances, {
-                      listView: {
-                        fields: {
-                          name: { label: 'label.name' },
-                          displayname: { label: 'label.display.name' },
-                          zonename: { label: 'label.zone.name' },
-                          state: {
-                            label: 'label.state',
-                            indicator: {
-                              'Running': 'on',
-                              'Stopped': 'off',
-                              'Destroyed': 'off',
-                              'Error': 'off'
-                            }
-                          }
-                        },
-                        filters: false,
-                        dataProvider: function(args) {
-                          args.response.success({ data: [] });
-                        }
-                      }
-                    }),
-                    
-                    multipleAdd: true,
 
-                    fields: {
-                      'name': { edit: true, label: 'label.name', isEditable: true },
-                      'publicport': { edit: true, label: 'label.public.port' },
-                      'privateport': { edit: true, label: 'label.private.port' },
-                      'algorithm': {
+          publicLoadBalancers: {
+            type: 'select',
+            title: 'Public LB',
+            listView: {
+              id: 'publicLoadBalancers',
+              fields: {
+                ipaddress: { label: 'label.ip.address' },
+                type: { label: 'label.type' }
+              },
+              dataProvider: function(args) {
+                args.response.success({
+                  data: [
+                    { ipaddress: '10.3.2.1', type: 'Internal' },
+                    { ipaddress: '10.3.2.3', type: 'Internal' },
+                    { ipaddress: '10.232.1.4', type: 'Public' }
+                  ]
+                });
+              },
+              actions: {
+                add: {
+                  label: 'Add Public LB',
+                  createForm: {
+                    title: 'Add Public LB',                
+                    fields: {                                   
+                      name: { label: 'label.name', validation: { required: true } },
+                      description: { label: 'label.description', validation: { required:
false } },
+                      sourceipaddress: { label: 'Source IP Address', validation: { required:
false } },
+                      sourceport: { label: 'sourceport', validation: { required: true } },
+                      instanceport: { label: 'instanceport', validation: { required: true
} },
+                      algorithm: { 
                         label: 'label.algorithm',
-                        isEditable: true,
+                        validation: { required: true },
                         select: function(args) {
                           args.response.success({
                             data: [
-                              { id: 'roundrobin', name: 'roundrobin', description: _l('label.round.robin')
},
-                              { id: 'leastconn', name: 'leastconn', description: _l('label.least.connections')
},
-                              { id: 'source', name: 'source', description: _l('label.source')
}
+                              { id: 'source', description: 'source' },
+                              { id: 'roundrobin', description: 'roundrobin' },
+                              { id: 'leastconn', description: 'leastconn' }
                             ]
                           });
                         }
-                      },
-
-                      'sticky': {
-                        label: 'label.stickiness',
-                        custom: {
-                          buttonLabel: 'label.configure',
-                          action: cloudStack.lbStickyPolicy.dialog()
-                        }
-                      },
-
-                      'add-vm': {
-                        label: 'label.add.vms',
-                        addButton: true
-                      }
-                    },
-
-                    tags: cloudStack.api.tags({ resourceType: 'LoadBalancer', contextId:
'multiRule' }),
-
-                    add: {
-                      label: 'label.add.vms',
-                      action: function(args) {  											  
-                        args.response.success();
-                      }
-                    },
-                    actions: {
-                      edit: {
-                        label: 'label.edit',
-                        action: function(args) {
-                          args.response.success();
-                        }
-                      },
-                      destroy:  {
-                        label: 'label.action.delete.load.balancer',
-                        action: function(args) {
-                          args.response.success();
-                        }
+                      }                  
+                    }
+                  },
+                  messages: {
+                    notification: function(args) {
+                      return 'Add Public LB';
+                    }
+                  },
+                  action: function(args) {               
+                    var data = {
+                      name: args.data.name,
+                      sourceport: args.data.sourceport,
+                      instanceport: args.data.instanceport,
+                      algorithm: args.data.algorithm,
+                      networkid: args.context.networks[0].id,
+                      sourceipaddressnetworkid: args.context.networks[0].id,
+                      scheme: 'Public'
+                    };
+                    if(args.data.description != null && args.data.description.length
> 0){
+                      $.extend(data, {
+                        description: args.data.description
+                      });                  
+                    }
+                    if(args.data.sourceipaddress != null && args.data.sourceipaddress.length
> 0){
+                      $.extend(data, {
+                        sourceipaddress: args.data.sourceipaddress
+                      });                  
+                    }                
+                    $.ajax({
+                      url: createURL('createLoadBalancer'),
+                      data: data,
+                      success: function(json){                    
+                        var jid = json.createloadbalancerresponse.jobid;   
+                        args.response.success(
+                          {_custom:
+                           {jobId: jid,
+                            getUpdatedItem: function(json) {                          
+                              return json.queryasyncjobresultresponse.jobresult.loadbalancerrule;
+                            }
+                           }
+                          }
+                        );    
                       }
-                    },
+                    });
                     
-                    itemActions: {
-                      add: {
-                        label: 'label.add.vms.to.lb',
-                        action: function(args) {
-                          args.response.success();
-                        }
-                      },
-                      destroy: {
-                        label: 'label.remove.vm.from.lb',
-                        action: function(args) {
-                          args.response.success();
+                    args.response.success();
+                  },
+                  notification: {
+                    poll: function(args) {
+                      args.complete({
+                        data: {
+                          ipaddress: '10.0.3.2',
+                          type: 'Internal'
                         }
-                      }
-                    },
-                    dataProvider: function(args) {
-                      args.response.success({ data: [] });
+                      });
                     }
-                  });
-
-                  return $multi;
+                  }
                 }
               }
             }


Mime
View raw message