|
451 | 451 | } |
452 | 452 | } |
453 | 453 | }, |
454 | | - |
455 | | - //??? |
| 454 | + |
456 | 455 | lbUnderGSLB: { |
457 | 456 | id: 'lbUnderGSLB', |
458 | 457 | type: 'select', |
459 | | - title: 'load balancer rules assigned to this GSLB', |
| 458 | + title: 'assigned load balancer rules', |
460 | 459 | listView: { |
461 | 460 | section: 'lbUnderGSLB', |
462 | 461 | id: 'lbUnderGSLB', |
463 | | - label: 'load balancer rules assigned to this GSLB', |
| 462 | + label: 'assigned load balancer rules', |
464 | 463 | fields: { |
465 | 464 | name: { label: 'label.name' }, |
466 | 465 | publicport: { label: 'label.public.port' }, |
|
482 | 481 | }); |
483 | 482 | } |
484 | 483 | }); |
485 | | - }, |
| 484 | + }, |
| 485 | + actions: { |
| 486 | + add: { |
| 487 | + label: 'assign load balancer rule to GSLB', |
| 488 | + messages: { |
| 489 | + confirm: function(args) { |
| 490 | + return 'Please confirm you want to assign load balancer rule to GSLB'; |
| 491 | + }, |
| 492 | + notification: function(args) { |
| 493 | + return 'assign load balancer rule to GSLB'; |
| 494 | + } |
| 495 | + }, |
| 496 | + createForm: { |
| 497 | + title: 'assign load balancer rule to GSLB', |
| 498 | + fields: { |
| 499 | + loadbalancerrule: { |
| 500 | + label: 'load balancer rule', |
| 501 | + select: function(args) { |
| 502 | + var data = { |
| 503 | + globalloadbalancerruleid: args.context.GSLB[0].id, |
| 504 | + listAll: true |
| 505 | + }; |
| 506 | + $.ajax({ |
| 507 | + url: createURL('listLoadBalancerRules'), |
| 508 | + data: data, |
| 509 | + success: function(json) { |
| 510 | + var items = json.listloadbalancerrulesresponse.loadbalancerrule; |
| 511 | + args.response.success({ |
| 512 | + data: items, |
| 513 | + descriptionField: 'name' |
| 514 | + }); |
| 515 | + } |
| 516 | + }); |
| 517 | + } |
| 518 | + } |
| 519 | + } |
| 520 | + }, |
| 521 | + action: function(args) { |
| 522 | + var data = { |
| 523 | + id: args.context.GSLB[0].id, |
| 524 | + loadbalancerrulelist: args.data.loadbalancerrule |
| 525 | + }; |
| 526 | + $.ajax({ |
| 527 | + url: createURL('assignToGlobalLoadBalancerRule'), |
| 528 | + data: data, |
| 529 | + success: function(json) { |
| 530 | + var jid = json.assigntogloballoadbalancerruleresponse.jobid; |
| 531 | + args.response.success( |
| 532 | + {_custom: |
| 533 | + {jobId: jid, |
| 534 | + getUpdatedItem: function(json) { |
| 535 | + return json.queryasyncjobresultresponse.jobresult.loadbalancerrule; |
| 536 | + } |
| 537 | + } |
| 538 | + } |
| 539 | + ); |
| 540 | + } |
| 541 | + }); |
| 542 | + }, |
| 543 | + notification: { |
| 544 | + poll: pollAsyncJobResult |
| 545 | + } |
| 546 | + } |
| 547 | + }, |
| 548 | + |
486 | 549 | detailView: { |
487 | 550 | name: 'load balancer rule details', |
488 | 551 | actions: { |
|
528 | 591 | publicport: { label: 'label.public.port' }, |
529 | 592 | privateport: { label: 'label.private.port' }, |
530 | 593 | algorithm: { label: 'label.algorithm' }, |
531 | | - publicip: { label: 'label.public.ip' }, |
| 594 | + publicip: { label: 'label.public.ip' }, |
| 595 | + state: { label: 'label.state' }, |
532 | 596 | id: { label: 'label.id' }, |
533 | 597 | cidrlist: { label: 'label.cidr' }, |
534 | 598 | domain: { label: 'label.domain' }, |
535 | | - account: { label: 'label.account' }, |
536 | | - state: { label: 'label.state' } |
| 599 | + account: { label: 'label.account' } |
537 | 600 | } |
538 | 601 | ], |
539 | 602 | dataProvider: function(args) { |
|
554 | 617 | } |
555 | 618 | } |
556 | 619 | } |
557 | | - } |
558 | | - //??? |
| 620 | + } |
559 | 621 | } |
560 | 622 | }; |
561 | 623 |
|
|
0 commit comments