diff --git a/ui/modules/vpc/vpc.css b/ui/modules/vpc/vpc.css
index a7ef13eadee..92ee80beb05 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;
diff --git a/ui/modules/vpc/vpc.js b/ui/modules/vpc/vpc.js
index 64081a8a4d0..a3a571eb4c3 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
6 Public'
},
{
id: 'tierPortForwarders',
diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js
index 7a1c50c10aa..57786926686 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' }
+ },
+ 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' }
+ ]
+ });
+ }
+ }
+ }
+ },
+ 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'
+ }
});
}
- }
- }
- },
- 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'
- }
- });
}
}
}
},
- detailView: {
- isMaximized: true,
- tabs: {
- loadBalancing: {
- title: 'label.load.balancing',
- custom: function(args) {
- var context = args.context;
- var $multi = $('