From 8e82266f6bcece246a67fff4db0db4a7a569a8a7 Mon Sep 17 00:00:00 2001 From: Jessica Wang Date: Mon, 23 Jan 2012 15:02:57 -0800 Subject: [PATCH] cloudstack 3.0 new UI - network page - Associate new IP - pass domainId and account to API call if network type is Shared. --- ui/scripts/network.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index 241ffe7679e..b7ca23adb54 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -590,9 +590,12 @@ add: { label: 'Acquire new IP', addRow: 'true', - action: function(args) { + action: function(args) { + var apiCmd = "associateIpAddress"; + if(args.context.networks[0].type == "Shared") + apiCmd += "&domainid=" + g_domainid + "&account=" + g_account; $.ajax({ - url: createURL('associateIpAddress'), + url: createURL(apiCmd), data: { networkId: args.context.networks[0].id },