From 8683fc4e057a0d345bc3af5279b19a74d5287a95 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 81a980c8d1f..e2688507919 100644 --- a/ui/scripts/network.js +++ b/ui/scripts/network.js @@ -3784,6 +3784,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 11999fba9c0..08e2e4b4c5e 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -84,6 +84,9 @@ addButton: true } }, + + tags: cloudStack.api.tags({ resourceType: 'NetworkACL', contextId: 'multiRule' }), + add: { label: 'Add', action: function(args) { @@ -111,6 +114,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) { @@ -596,6 +612,9 @@ addButton: true } }, + + tags: cloudStack.api.tags({ resourceType: 'StaticRoute', contextId: 'multiRule' }), + add: { label: 'Add', action: function(args) { @@ -623,6 +642,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) { @@ -885,6 +917,7 @@ created: { label: 'label.date', converter: cloudStack.converters.toLocalDate } } ], + dataProvider: function(args) { $.ajax({ url: createURL("listVpnConnections&id=" + args.context.vpnConnection[0].id),