diff --git a/ui/scripts/system.js b/ui/scripts/system.js index 8d08584dc60..d89f6b69dcd 100644 --- a/ui/scripts/system.js +++ b/ui/scripts/system.js @@ -588,7 +588,83 @@ } }); } - } + }, + /* + releaseFromAccount: { + label: 'Release from Account', + action: function(args) { + $.ajax({ + url: createURL('releasePublicIpRange'), + data: { + id: args.context.multiRule[0].id + }, + success: function(json) { + args.response.success({ + notification: { + label: 'release from account', + poll: function(args) { + args.complete(); + } + } + }); + }, + error: function(json) { + args.response.error(parseXMLHttpResponse(json)); + } + }); + } + }, + addAccount: { + label: 'Add Account', + createForm: { + title: 'Add Account', + fields: { + account: { label: 'Account' }, + domainid: { + label: 'Domain', + select: function(args) { + $.ajax({ + url: createURL('listDomains'), + data: { listAll: true }, + success: function(json) { + args.response.success({ + data: $.map(json.listdomainsresponse.domain, function(domain) { + return { + id: domain.id, + description: domain.path + }; + }) + }); + } + }); + } + } + } + }, + action: function(args) { + var data = { + id: args.context.multiRule[0].id + }; + $.ajax({ + url: createURL('dedicatePublicIpRange'), + data: data, + success: function(json) { + args.response.success({ + notification: { + label: 'Add Account', + poll: function(args) { + args.complete(); + } + } + }); + }, + error: function(json) { + args.response.error(parseXMLHttpResponse(json)); + } + }); + } + } + */ }, dataProvider: function(args) { $.ajax({