From e2750d8c7629ef04c20ff3d6c2843ec1c617271b Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Tue, 24 Jul 2012 11:16:43 -0700 Subject: [PATCH] Pass projectId to listTags, when viewing a project resource --- ui/scripts/sharedFunctions.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index ff38a9815f4..7eba4340b79 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -697,14 +697,18 @@ cloudStack.api = { }, dataProvider: function(args) { var resourceId = args.context[contextId][0].id; + var data = { + resourceId: resourceId, + resourceType: resourceType + }; + + if (args.context.projects) { + data.projectid=args.context.projects[0].id; + } $.ajax({ url: createURL('listTags'), - data: { - listAll: true, - resourceId: resourceId, - resourceType: resourceType - }, + data: data, success: function(json) { args.response.success({ data: json.listtagsresponse ?