Updated Branches:
  refs/heads/master b247ba6b4 -> 11a7e46df

CLOUDSTACK-1974: Dedicate Guest VLAN Range - UI - Infrastructure menu - 
physical network - Guest - Dedicated Guest VLAN Range tab - implement Release 
Dedicated VLAN Range action.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/11a7e46d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/11a7e46d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/11a7e46d

Branch: refs/heads/master
Commit: 11a7e46dfb8123b5ca96d34c41f401d91df332fa
Parents: b247ba6
Author: Jessica Wang <[email protected]>
Authored: Fri May 24 15:45:10 2013 -0700
Committer: Jessica Wang <[email protected]>
Committed: Fri May 24 15:45:10 2013 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   67 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 67 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/11a7e46d/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 32303d3..8b56bda 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -2199,6 +2199,73 @@
                         }
                       }  
                     }
+                  },
+                  
+                  //???
+                  detailView: {
+                    name: 'VLAN Range details',
+                    actions: {
+                      remove: {
+                        label: 'Delete VLAN Range',
+                        messages: {
+                          confirm: function(args) {
+                            return 'Please confirm you want to delete VLAN 
Range';
+                          },
+                          notification: function(args) {
+                            return 'Delete VLAN Range';
+                          }
+                        },
+                        action: function(args) {
+                          var data = {
+                            id: args.context.dedicatedGuestVlanRanges[0].id
+                          };                
+                          $.ajax({
+                            url: createURL('releaseDedicatedGuestVlanRange'),
+                            data: data,
+                            async: true,
+                            success: function(json) {                          
   
+                              var jid = 
json.releasededicatedguestvlanrangeresponse.jobid;
+                              args.response.success(
+                                {
+                                  _custom: { jobId: jid }
+                                }
+                              );                              
+                            }
+                          });
+                        },
+                        notification: {
+                          poll: pollAsyncJobResult
+                        }
+                      }
+                    },
+
+                    tabs: {
+                      details: {
+                        title: 'label.details',
+                        fields: [
+                          {
+                            guestvlanrange: { label: 'VLAN Range(s)' },
+                          },
+                          {
+                            domain: { label: 'label.domain' },
+                            account: { label: 'label.account' },               
               
+                            id: { label: 'label.id' }
+                          }
+                        ],
+                        dataProvider: function(args) {   
+                          $.ajax({
+                            url: createURL('listDedicatedGuestVlanRanges'),
+                            data: {
+                              id: args.context.dedicatedGuestVlanRanges[0].id
+                            },
+                            success: function(json) {
+                              var item = 
json.listdedicatedguestvlanrangesresponse.dedicatedguestvlanrange[0];
+                              args.response.success({ data: item })
+                            }
+                          });   
+                        }
+                      }
+                    }
                   }
                 }
               }            

Reply via email to