Pass projectId to listTags, when viewing a project resource

This commit is contained in:
Brian Federle 2012-07-24 11:16:43 -07:00
parent 8e1b8d1f56
commit 7a2be05c24
1 changed files with 9 additions and 5 deletions

View File

@ -675,14 +675,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 ?