From 11a7e46dfb8123b5ca96d34c41f401d91df332fa Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Fri, 24 May 2013 15:45:10 -0700 Subject: [PATCH] CLOUDSTACK-1974: Dedicate Guest VLAN Range - UI - Infrastructure menu - physical network - Guest - Dedicated Guest VLAN Range tab - implement Release Dedicated VLAN Range action. --- ui/scripts/system.js | 67 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 32303d3ed0f..8b56bda08e5 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 }) + } + }); + } + } + } } } }