mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
cloudStack 3.0 new UI - NaaS - implement Add F5 Load Balancer.
This commit is contained in:
parent
593803c8d7
commit
b79aa32e59
@ -595,7 +595,7 @@
|
||||
|
||||
detailView: {
|
||||
name: 'Guest network details',
|
||||
viewAll: { path: '_zone.guestIpRanges', label: 'IP ranges' }, //jessica
|
||||
viewAll: { path: '_zone.guestIpRanges', label: 'IP ranges' },
|
||||
actions: {
|
||||
edit: {
|
||||
label: 'Edit',
|
||||
@ -928,27 +928,63 @@
|
||||
createForm: {
|
||||
title: 'Add F5',
|
||||
fields: {
|
||||
name: {
|
||||
label: 'Name',
|
||||
validation: { required: true }
|
||||
url: {
|
||||
label: 'URL'
|
||||
},
|
||||
ipaddress: {
|
||||
label: 'IP Address',
|
||||
validation: { required: true }
|
||||
username: {
|
||||
label: 'Username'
|
||||
},
|
||||
supportedServices: {
|
||||
label: 'Supported Services',
|
||||
isBoolean: true,
|
||||
multiArray: {
|
||||
serviceA: { label: 'Service A' },
|
||||
serviceB: { label: 'Service B' },
|
||||
serviceC: { label: 'Service C' }
|
||||
password: {
|
||||
label: 'Password',
|
||||
isPassword: true
|
||||
},
|
||||
networkdevicetype: {
|
||||
label: 'Network device type',
|
||||
select: function(args) {
|
||||
var items = [];
|
||||
items.push({id: "F5BigIpLoadBalancer", description: "F5 Big Ip Load Balancer"});
|
||||
args.response.success({data: items});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
action: function(args) {
|
||||
args.response.success();
|
||||
action: function(args) {
|
||||
var zoneObj = args.context.zones[0];
|
||||
var physicalNetworkObj;
|
||||
$.ajax({
|
||||
url: createURL("listPhysicalNetworks&zoneId=" + zoneObj.id),
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function(json) {
|
||||
var items = json.listphysicalnetworksresponse.physicalnetwork;
|
||||
physicalNetworkObj = items[0];
|
||||
}
|
||||
});
|
||||
|
||||
var array1 = [];
|
||||
array1.push("&physicalnetworkid=" + physicalNetworkObj.id)
|
||||
array1.push("&url=" + todb(args.data.url));
|
||||
array1.push("&username=" + todb(args.data.username));
|
||||
array1.push("&password=" + todb(args.data.password));
|
||||
array1.push("&networkdevicetype=" + todb(args.data.networkdevicetype));
|
||||
$.ajax({
|
||||
url: createURL("addF5LoadBalancer" + array1.join("")),
|
||||
dataType: "json",
|
||||
success: function(json) {
|
||||
//jessica
|
||||
var jid = json.addf5bigiploadbalancerresponse.jobid;
|
||||
args.response.success(
|
||||
{_custom:
|
||||
{jobId: jid,
|
||||
getUpdatedItem: function(json) {
|
||||
var item = json.queryasyncjobresultresponse.jobresult.loadbalancer;
|
||||
return {data: item};
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
},
|
||||
messages: {
|
||||
notification: function(args) {
|
||||
@ -956,7 +992,7 @@
|
||||
}
|
||||
},
|
||||
notification: {
|
||||
poll: testData.notifications.testPoll
|
||||
poll: pollAsyncJobResult
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user