Skip to content

Commit ab6ef4b

Browse files
pranavsbfederle
authored andcommitted
TAGS feature implementation throughout CloudStack UI
1 parent 2ec005c commit ab6ef4b

4 files changed

Lines changed: 25 additions & 3 deletions

File tree

‎ui/scripts/instances.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,6 +1150,8 @@
11501150
id: { label: 'label.id' }
11511151
}
11521152
],
1153+
1154+
tags: cloudStack.api.tags({ resourceType: 'UserVm', contextId: 'instances' }),
11531155

11541156
dataProvider: function(args) {
11551157
$.ajax({

‎ui/scripts/network.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,10 @@
757757
account: { label: 'label.account' }
758758
}
759759
],
760+
761+
tags: cloudStack.api.tags({ resourceType: 'Network', contextId: 'networks' }),
762+
763+
760764
dataProvider: function(args) {
761765
$.ajax({
762766
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 @@
14721476
vlanname: { label: 'label.vlan' }
14731477
}
14741478
],
1479+
1480+
tags: cloudStack.api.tags({ resourceType: 'PublicIpAddress', contextId: 'ipAddresses' }),
14751481

14761482
dataProvider: function(args) {
14771483
var items = args.context.ipAddresses;
@@ -2782,6 +2788,9 @@
27822788
}
27832789
],
27842790

2791+
tags: cloudStack.api.tags({ resourceType: 'SecurityGroup', contextId: 'securityGroups' }),
2792+
2793+
27852794
dataProvider: function(args) {
27862795
$.ajax({
27872796
url: createURL("listSecurityGroups&id="+args.id),

‎ui/scripts/storage.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,9 @@
10041004
}
10051005
],
10061006

1007+
tags: cloudStack.api.tags({ resourceType: 'Volume', contextId: 'volumes' }),
1008+
1009+
10071010
dataProvider: function(args) {
10081011
$.ajax({
10091012
url: createURL("listVolumes&id=" + args.context.volumes[0].id),
@@ -1269,6 +1272,8 @@
12691272
}
12701273
],
12711274

1275+
tags: cloudStack.api.tags({ resourceType: 'Snapshot', contextId: 'snapshots' }),
1276+
12721277
dataProvider: function(args) {
12731278
$.ajax({
12741279
url: createURL("listSnapshots&id=" + args.context.snapshots[0].id),

‎ui/scripts/templates.js‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,9 +678,12 @@
678678
account: { label: 'label.account' },
679679
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
680680
}
681-
],
681+
],
682+
683+
tags: cloudStack.api.tags({ resourceType: 'Template', contextId: 'templates' }),
684+
682685

683-
dataProvider: function(args) {
686+
dataProvider: function(args) {
684687
var jsonObj = args.context.templates[0];
685688
var apiCmd = "listTemplates&templatefilter=self&id=" + jsonObj.id;
686689
if(jsonObj.zoneid != null)
@@ -822,6 +825,7 @@
822825
}
823826
}
824827
},
828+
825829

826830
action: function(args) {
827831
var array1 = [];
@@ -1192,8 +1196,10 @@
11921196
created: { label: 'label.created', converter: cloudStack.converters.toLocalDate }
11931197
}
11941198
],
1199+
1200+
tags: cloudStack.api.tags({ resourceType: 'ISO', contextId: 'isos' }),
11951201

1196-
dataProvider: function(args) {
1202+
dataProvider: function(args) {
11971203
var jsonObj = args.context.isos[0];
11981204
var apiCmd = "listIsos&isofilter=self&id="+jsonObj.id;
11991205
if(jsonObj.zoneid != null)

0 commit comments

Comments
 (0)