From eb68b40e7fbc0f30d89f01a1097eba525f65d451 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Tue, 24 Jul 2012 13:58:02 -0700 Subject: [PATCH] Add tag UI support for VPC resource types: - Vpc, - NetworkACL, - StaticRoute --- ui/scripts/network.js | 3 +++ ui/scripts/vpc.js | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/ui/scripts/network.js b/ui/scripts/network.js index badb9685a0d..543b681e930 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -3764,6 +3764,9 @@ id: { label: 'label.id' } } ], + + tags: cloudStack.api.tags({ resourceType: 'Vpc', contextId: 'vpc' }), + dataProvider: function(args) { $.ajax({ url: createURL("listVPCs"), diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 88bae1e02d0..70cded4c157 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -77,6 +77,9 @@ addButton: true } }, + + tags: cloudStack.api.tags({ resourceType: 'NetworkACL', contextId: 'multiRule' }), + add: { label: 'Add', action: function(args) { @@ -104,6 +107,19 @@ } }, actions: { + edit: { + label: 'label.edit', + + // Blank -- edit is just for tags right now + action: function(args) { + args.response.success({ + notification: { + label: 'Edit ACL item', + poll: function(args) { args.complete(); } + } + }); + } + }, destroy: { label: 'Remove ACL', action: function(args) { @@ -589,6 +605,9 @@ addButton: true } }, + + tags: cloudStack.api.tags({ resourceType: 'StaticRoute', contextId: 'multiRule' }), + add: { label: 'Add', action: function(args) { @@ -616,6 +635,19 @@ } }, actions: { + edit: { + label: 'label.edit', + + // Blank -- edit is just for tags right now + action: function(args) { + args.response.success({ + notification: { + label: 'Edit static route', + poll: function(args) { args.complete(); } + } + }); + } + }, destroy: { label: 'Remove static route', action: function(args) { @@ -878,6 +910,7 @@ created: { label: 'label.date', converter: cloudStack.converters.toLocalDate } } ], + dataProvider: function(args) { $.ajax({ url: createURL("listVpnConnections&id=" + args.context.vpnConnection[0].id),