From 4c6738266d941696bccff6be3ef086a03dc94c81 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Thu, 28 Jun 2012 15:32:18 -0700 Subject: [PATCH] Fix add tier UI Properly pass context for add tier dialog, which broke due to recent changes that requires context to be present, for the action filter. --- ui/scripts/ui-custom/vpc.js | 5 +++++ ui/scripts/vpc.js | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/scripts/ui-custom/vpc.js b/ui/scripts/ui-custom/vpc.js index c728becf399..4e601387e3d 100644 --- a/ui/scripts/ui-custom/vpc.js +++ b/ui/scripts/ui-custom/vpc.js @@ -350,7 +350,9 @@ var actions = args.actions; var vmListView = args.vmListView; var actionPreFilter = args.actionPreFilter; + var context = args.context; var tier = $.extend(args.tier, { + context: context, vmListView: vmListView, actions: actions, actionPreFilter: actionPreFilter, @@ -396,6 +398,9 @@ function(args) { $loading.remove(); addNewTier({ + context: $.extend(true, {}, context, { + tiers: [tier] + }), tier: tier, $tiers: $tiers, actions: actions, diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index e4f13df2d85..768894633bf 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -390,7 +390,8 @@ args.response.success({ data: { name: args.data.name, - cidr: args.data.cidr + cidr: args.data.cidr, + state: 'Stopped' } }); }, 500); @@ -480,7 +481,7 @@ setTimeout(function() { args.response.success({ data: { - tiers: tiers + tiers: [] } }); }, 1000);