Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 73ADD98B9 for ; Tue, 21 May 2013 22:58:54 +0000 (UTC) Received: (qmail 92283 invoked by uid 500); 21 May 2013 22:58:54 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 92262 invoked by uid 500); 21 May 2013 22:58:54 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 92255 invoked by uid 99); 21 May 2013 22:58:54 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 May 2013 22:58:54 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 797E2891A89; Tue, 21 May 2013 22:58:54 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jessicawang@apache.org To: commits@cloudstack.apache.org Message-Id: <9911dd7149b643348c7722498e757a74@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/ui-vpc-redesign to 3c2be57 Date: Tue, 21 May 2013 22:58:54 +0000 (UTC) Updated Branches: refs/heads/ui-vpc-redesign 7c05bb13c -> 3c2be57c3 CLOUDSTACK-747: internalLb in VPC - internal LB detail View - implement action assign VM to internal lb. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3c2be57c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3c2be57c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3c2be57c Branch: refs/heads/ui-vpc-redesign Commit: 3c2be57c35877c98d165c5f5be464815f6af2484 Parents: 7c05bb1 Author: Jessica Wang Authored: Tue May 21 15:57:58 2013 -0700 Committer: Jessica Wang Committed: Tue May 21 15:58:39 2013 -0700 ---------------------------------------------------------------------- ui/scripts/vpc.js | 30 +++++++++++++++++++++++++----- 1 files changed, 25 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3c2be57c/ui/scripts/vpc.js ---------------------------------------------------------------------- diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index e47cb12..23e7b0c 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -446,13 +446,33 @@ type: 'checkbox', filters: false }), - action: function(args) { - args.response.success(); + action: function(args) { + var vms = args.context.instances; + var array1 = []; + for(var i = 0; i < vms.length; i++) { + array1.push(vms[i].id); + } + var virtualmachineids = array1.join(','); + + $.ajax({ + url: createURL('assignToLoadBalancerRule'), + data: { + id: args.context.internalLoadBalancers[0].id, + virtualmachineids: virtualmachineids + }, + dataType: 'json', + async: true, + success: function(data) { + debugger; + var jid = data.assigntoloadbalancerruleresponse.jobid; + args.response.success({ + _custom: { jobId: jid } + }); + } + }); }, notification: { - poll: function(args) { - args.complete(); - } + poll: pollAsyncJobResult } } },