TAGS feature implementation throughout CloudStack UI

This commit is contained in:
Pranav Saxena 2012-07-25 03:11:30 +05:30 committed by Brian Federle
parent 2ec005c628
commit ab6ef4bceb
4 changed files with 25 additions and 3 deletions

View File

@ -1151,6 +1151,8 @@
}
],
tags: cloudStack.api.tags({ resourceType: 'UserVm', contextId: 'instances' }),
dataProvider: function(args) {
$.ajax({
url: createURL("listVirtualMachines&id=" + args.context.instances[0].id),

View File

@ -757,6 +757,10 @@
account: { label: 'label.account' }
}
],
tags: cloudStack.api.tags({ resourceType: 'Network', contextId: 'networks' }),
dataProvider: function(args) {
$.ajax({
url: createURL("listNetworks&id=" + args.context.networks[0].id + "&listAll=true"), //pass "&listAll=true" to "listNetworks&id=xxxxxxxx" for now before API gets fixed.
@ -1473,6 +1477,8 @@
}
],
tags: cloudStack.api.tags({ resourceType: 'PublicIpAddress', contextId: 'ipAddresses' }),
dataProvider: function(args) {
var items = args.context.ipAddresses;
@ -2782,6 +2788,9 @@
}
],
tags: cloudStack.api.tags({ resourceType: 'SecurityGroup', contextId: 'securityGroups' }),
dataProvider: function(args) {
$.ajax({
url: createURL("listSecurityGroups&id="+args.id),

View File

@ -1004,6 +1004,9 @@
}
],
tags: cloudStack.api.tags({ resourceType: 'Volume', contextId: 'volumes' }),
dataProvider: function(args) {
$.ajax({
url: createURL("listVolumes&id=" + args.context.volumes[0].id),
@ -1269,6 +1272,8 @@
}
],
tags: cloudStack.api.tags({ resourceType: 'Snapshot', contextId: 'snapshots' }),
dataProvider: function(args) {
$.ajax({
url: createURL("listSnapshots&id=" + args.context.snapshots[0].id),

View File

@ -678,9 +678,12 @@
account: { label: 'label.account' },
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
}
],
],
dataProvider: function(args) {
tags: cloudStack.api.tags({ resourceType: 'Template', contextId: 'templates' }),
dataProvider: function(args) {
var jsonObj = args.context.templates[0];
var apiCmd = "listTemplates&templatefilter=self&id=" + jsonObj.id;
if(jsonObj.zoneid != null)
@ -823,6 +826,7 @@
}
},
action: function(args) {
var array1 = [];
array1.push("&name=" + todb(args.data.name));
@ -1193,7 +1197,9 @@
}
],
dataProvider: function(args) {
tags: cloudStack.api.tags({ resourceType: 'ISO', contextId: 'isos' }),
dataProvider: function(args) {
var jsonObj = args.context.isos[0];
var apiCmd = "listIsos&isofilter=self&id="+jsonObj.id;
if(jsonObj.zoneid != null)