|
489 | 489 | actions: { |
490 | 490 | add: { |
491 | 491 | label: 'Add Portable IP Range', |
492 | | - |
493 | 492 | messages: { |
494 | 493 | notification: function(args) { |
495 | 494 | return 'Add Portable IP Range'; |
496 | 495 | } |
497 | 496 | }, |
498 | | - |
499 | 497 | createForm: { |
500 | 498 | title: 'Add Portable IP Range', |
501 | 499 | fields: { |
|
557 | 555 | poll: pollAsyncJobResult |
558 | 556 | } |
559 | 557 | } |
560 | | - } |
| 558 | + }, |
| 559 | + |
| 560 | + detailView: { |
| 561 | + name: 'Portable IP Range details', |
| 562 | + actions: { |
| 563 | + remove: { |
| 564 | + label: 'Delete Portable IP Range', |
| 565 | + messages: { |
| 566 | + confirm: function(args) { |
| 567 | + return 'Please confirm you want to delete Portable IP Range'; |
| 568 | + }, |
| 569 | + notification: function(args) { |
| 570 | + return 'Delete Portable IP Range'; |
| 571 | + } |
| 572 | + }, |
| 573 | + action: function(args) { |
| 574 | + var data = { |
| 575 | + id: args.context.portableIpRanges[0].id |
| 576 | + }; |
| 577 | + $.ajax({ |
| 578 | + url: createURL('deletePortableIpRange'), |
| 579 | + data: data, |
| 580 | + async: true, |
| 581 | + success: function(json) { |
| 582 | + var jid = json.deleteportablepublicipresponse.jobid; |
| 583 | + args.response.success({ |
| 584 | + _custom: { |
| 585 | + jobId: jid |
| 586 | + } |
| 587 | + }); |
| 588 | + }, |
| 589 | + error: function(data) { |
| 590 | + args.response.error(parseXMLHttpResponse(data)); |
| 591 | + } |
| 592 | + }); |
| 593 | + }, |
| 594 | + notification: { |
| 595 | + poll: pollAsyncJobResult |
| 596 | + } |
| 597 | + } |
| 598 | + }, |
| 599 | + tabs: { |
| 600 | + details: { |
| 601 | + title: 'label.details', |
| 602 | + fields: [ |
| 603 | + { |
| 604 | + id: { label: 'label.id' } |
| 605 | + }, |
| 606 | + { |
| 607 | + startip: { label: 'label.start.IP' }, |
| 608 | + endip: { label: 'label.end.IP' }, |
| 609 | + gateway: { label: 'label.gateway' }, |
| 610 | + netmask: { label: 'label.netmask' }, |
| 611 | + vlan: { label: 'label.vlan' }, |
| 612 | + portableipaddress: { |
| 613 | + label: 'Portable IPs', |
| 614 | + converter: function(args) { |
| 615 | + var text1 = ''; |
| 616 | + if(args != null) { |
| 617 | + for(var i = 0; i < args.length; i++) { |
| 618 | + if(i > 0) { |
| 619 | + text1 += ', '; |
| 620 | + } |
| 621 | + text1 += args[i].ipaddress; |
| 622 | + } |
| 623 | + } |
| 624 | + return text1; |
| 625 | + } |
| 626 | + } |
| 627 | + } |
| 628 | + ], |
| 629 | + dataProvider: function(args) { |
| 630 | + $.ajax({ |
| 631 | + url: createURL('listPortableIpRanges'), |
| 632 | + data: { |
| 633 | + id: args.context.portableIpRanges[0].id |
| 634 | + }, |
| 635 | + success: function(json) { |
| 636 | + var item = json.listportableipresponse.portableiprange[0]; |
| 637 | + args.response.success({ |
| 638 | + data: item |
| 639 | + }); |
| 640 | + }, |
| 641 | + error: function(json) { |
| 642 | + args.response.error(parseXMLHttpResponse(json)); |
| 643 | + } |
| 644 | + }); |
| 645 | + } |
| 646 | + } |
| 647 | + } |
| 648 | + } |
561 | 649 | } |
562 | 650 | }, |
563 | 651 |
|
|
0 commit comments