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

@ -1150,6 +1150,8 @@
id: { label: 'label.id' }
}
],
tags: cloudStack.api.tags({ resourceType: 'UserVm', contextId: 'instances' }),
dataProvider: function(args) {
$.ajax({

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.
@ -1472,6 +1476,8 @@
vlanname: { label: 'label.vlan' }
}
],
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 }
}
],
],
tags: cloudStack.api.tags({ resourceType: 'Template', contextId: 'templates' }),
dataProvider: function(args) {
dataProvider: function(args) {
var jsonObj = args.context.templates[0];
var apiCmd = "listTemplates&templatefilter=self&id=" + jsonObj.id;
if(jsonObj.zoneid != null)
@ -822,6 +825,7 @@
}
}
},
action: function(args) {
var array1 = [];
@ -1192,8 +1196,10 @@
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
}
],
tags: cloudStack.api.tags({ resourceType: 'ISO', contextId: 'isos' }),
dataProvider: function(args) {
dataProvider: function(args) {
var jsonObj = args.context.isos[0];
var apiCmd = "listIsos&isofilter=self&id="+jsonObj.id;
if(jsonObj.zoneid != null)