mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 18:43:26 +01:00
CLOUDSTACK-1910: cloudstack UI - Regions menu - create GSLB - (1) pass gslbstickysessionmethodname parameter to createGlobalLoadBalancerRule API. (2) Take async Job response.
This commit is contained in:
parent
76d1ee54de
commit
a4e61b71cc
@ -214,10 +214,10 @@
|
|||||||
id: 'GSLB',
|
id: 'GSLB',
|
||||||
label: 'GSLB',
|
label: 'GSLB',
|
||||||
fields: {
|
fields: {
|
||||||
name: { label: 'label.name' }
|
name: { label: 'label.name' },
|
||||||
|
gslbdomainname: { label: 'GSLB Domain Name' },
|
||||||
|
gslblbmethod: { label: 'Algorithm' }
|
||||||
},
|
},
|
||||||
|
|
||||||
//???
|
|
||||||
actions: {
|
actions: {
|
||||||
add: {
|
add: {
|
||||||
label: 'Add GSLB',
|
label: 'Add GSLB',
|
||||||
@ -241,6 +241,7 @@
|
|||||||
description: {
|
description: {
|
||||||
label: 'label.description'
|
label: 'label.description'
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
domainid: {
|
domainid: {
|
||||||
label: 'Domain',
|
label: 'Domain',
|
||||||
select: function(args) {
|
select: function(args) {
|
||||||
@ -287,6 +288,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
gslblbmethod: {
|
gslblbmethod: {
|
||||||
label: 'Algorithm',
|
label: 'Algorithm',
|
||||||
select: function(args) {
|
select: function(args) {
|
||||||
@ -297,7 +299,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
gslbdomainname: {
|
gslbdomainname: {
|
||||||
label: 'Domain Name',
|
label: 'GSLB Domain Name',
|
||||||
validation: { required: true }
|
validation: { required: true }
|
||||||
},
|
},
|
||||||
gslbservicetype: {
|
gslbservicetype: {
|
||||||
@ -317,37 +319,42 @@
|
|||||||
name: args.data.name,
|
name: args.data.name,
|
||||||
regionid: args.context.regions[0].id,
|
regionid: args.context.regions[0].id,
|
||||||
gslblbmethod: args.data.gslblbmethod,
|
gslblbmethod: args.data.gslblbmethod,
|
||||||
|
gslbstickysessionmethodname: 'sourceip',
|
||||||
gslbdomainname: args.data.gslbdomainname,
|
gslbdomainname: args.data.gslbdomainname,
|
||||||
gslbservicetype: args.data.gslbservicetype
|
gslbservicetype: args.data.gslbservicetype
|
||||||
};
|
};
|
||||||
if(args.data.description != null && args.data.description.length > 0)
|
if(args.data.description != null && args.data.description.length > 0)
|
||||||
$.extend(data, { description: args.data.description });
|
$.extend(data, { description: args.data.description });
|
||||||
|
/*
|
||||||
if(args.data.domainid != null && args.data.domainid.length > 0)
|
if(args.data.domainid != null && args.data.domainid.length > 0)
|
||||||
$.extend(data, { domainid: args.data.domainid });
|
$.extend(data, { domainid: args.data.domainid });
|
||||||
if(args.data.account != null && args.data.account.length > 0)
|
if(args.data.account != null && args.data.account.length > 0)
|
||||||
$.extend(data, { account: args.data.account });
|
$.extend(data, { account: args.data.account });
|
||||||
|
*/
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: createURL('createGlobalLoadBalancerRule'),
|
url: createURL('createGlobalLoadBalancerRule'),
|
||||||
data: data,
|
data: data,
|
||||||
success: function(json) {
|
success: function(json) {
|
||||||
var item = json.creategloballoadbalancerruleresponse.globalloadbalancerrule;
|
var jid = json.creategloballoadbalancerruleresponse.jobid;
|
||||||
args.response.success({data: item});
|
args.response.success(
|
||||||
},
|
{_custom:
|
||||||
error: function(data) {
|
{jobId: jid,
|
||||||
args.response.error(parseXMLHttpResponse(data));
|
getUpdatedItem: function(json) {
|
||||||
|
return json.queryasyncjobresultresponse.jobresult.globalloadbalancerrule;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
notification: {
|
notification: {
|
||||||
poll: function(args) {
|
poll: function(args) {
|
||||||
args.complete();
|
poll: pollAsyncJobResult
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//???
|
|
||||||
|
|
||||||
dataProvider: function(args) {
|
dataProvider: function(args) {
|
||||||
if('regions' in args.context) {
|
if('regions' in args.context) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user