|
214 | 214 | id: 'GSLB', |
215 | 215 | label: 'GSLB', |
216 | 216 | fields: { |
217 | | - name: { label: 'label.name' } |
218 | | - }, |
219 | | - |
220 | | - //??? |
| 217 | + name: { label: 'label.name' }, |
| 218 | + gslbdomainname: { label: 'GSLB Domain Name' }, |
| 219 | + gslblbmethod: { label: 'Algorithm' } |
| 220 | + }, |
221 | 221 | actions: { |
222 | 222 | add: { |
223 | 223 | label: 'Add GSLB', |
|
241 | 241 | description: { |
242 | 242 | label: 'label.description' |
243 | 243 | }, |
| 244 | + /* |
244 | 245 | domainid: { |
245 | 246 | label: 'Domain', |
246 | 247 | select: function(args) { |
|
287 | 288 | return true; |
288 | 289 | } |
289 | 290 | }, |
| 291 | + */ |
290 | 292 | gslblbmethod: { |
291 | 293 | label: 'Algorithm', |
292 | 294 | select: function(args) { |
|
297 | 299 | } |
298 | 300 | }, |
299 | 301 | gslbdomainname: { |
300 | | - label: 'Domain Name', |
| 302 | + label: 'GSLB Domain Name', |
301 | 303 | validation: { required: true } |
302 | 304 | }, |
303 | 305 | gslbservicetype: { |
|
317 | 319 | name: args.data.name, |
318 | 320 | regionid: args.context.regions[0].id, |
319 | 321 | gslblbmethod: args.data.gslblbmethod, |
| 322 | + gslbstickysessionmethodname: 'sourceip', |
320 | 323 | gslbdomainname: args.data.gslbdomainname, |
321 | 324 | gslbservicetype: args.data.gslbservicetype |
322 | 325 | }; |
323 | 326 | if(args.data.description != null && args.data.description.length > 0) |
324 | | - $.extend(data, { description: args.data.description }); |
| 327 | + $.extend(data, { description: args.data.description }); |
| 328 | + /* |
325 | 329 | if(args.data.domainid != null && args.data.domainid.length > 0) |
326 | 330 | $.extend(data, { domainid: args.data.domainid }); |
327 | 331 | if(args.data.account != null && args.data.account.length > 0) |
328 | | - $.extend(data, { account: args.data.account }); |
329 | | - |
| 332 | + $.extend(data, { account: args.data.account }); |
| 333 | + */ |
330 | 334 | $.ajax({ |
331 | 335 | url: createURL('createGlobalLoadBalancerRule'), |
332 | 336 | data: data, |
333 | | - success: function(json) { |
334 | | - var item = json.creategloballoadbalancerruleresponse.globalloadbalancerrule; |
335 | | - args.response.success({data: item}); |
336 | | - }, |
337 | | - error: function(data) { |
338 | | - args.response.error(parseXMLHttpResponse(data)); |
| 337 | + success: function(json) { |
| 338 | + var jid = json.creategloballoadbalancerruleresponse.jobid; |
| 339 | + args.response.success( |
| 340 | + {_custom: |
| 341 | + {jobId: jid, |
| 342 | + getUpdatedItem: function(json) { |
| 343 | + return json.queryasyncjobresultresponse.jobresult.globalloadbalancerrule; |
| 344 | + } |
| 345 | + } |
| 346 | + } |
| 347 | + ); |
339 | 348 | } |
340 | 349 | }); |
341 | 350 | }, |
342 | | - |
343 | 351 | notification: { |
344 | 352 | poll: function(args) { |
345 | | - args.complete(); |
| 353 | + poll: pollAsyncJobResult |
346 | 354 | } |
347 | 355 | } |
348 | 356 | } |
349 | 357 | }, |
350 | | - //??? |
351 | | - |
| 358 | + |
352 | 359 | dataProvider: function(args) { |
353 | 360 | if('regions' in args.context) { |
354 | 361 | var data = { |
|
0 commit comments