diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index aaf6c0f365f..1c4651af40b 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -16,6 +16,8 @@ error.invalid.username.password=Invalid username or password
message.enabling.security.group.provider=Enabling Security Group provider
message.adding.Netscaler.provider=Adding Netscaler provider
message.creating.guest.network=Creating guest network
+label.action.delete.physical.network=Delete physical network
+message.action.delete.physical.network=Please confirm that you want to delete this physical network
#new labels (end) ************************************************************************************************
#modified labels (begin) *****************************************************************************************
diff --git a/client/WEB-INF/classes/resources/messages_ja.properties b/client/WEB-INF/classes/resources/messages_ja.properties
index 9858ec456ec..c60bbec5d0f 100644
--- a/client/WEB-INF/classes/resources/messages_ja.properties
+++ b/client/WEB-INF/classes/resources/messages_ja.properties
@@ -12,6 +12,8 @@ error.invalid.username.password=Invalid username or password
message.enabling.security.group.provider=Enabling Security Group provider
message.adding.Netscaler.provider=Adding Netscaler provider
message.creating.guest.network=Creating guest network
+label.action.delete.physical.network=Delete physical network
+message.action.delete.physical.network=Please confirm that you want to delete this physical network
#new labels (end) ************************************************************************************************
#modified labels (begin) *****************************************************************************************
diff --git a/ui/index.jsp b/ui/index.jsp
index 057cd387320..673335f144a 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -2907,6 +2907,8 @@ dictionary = {
'error.invalid.username.password': '',
'message.enabling.security.group.provider': '',
'message.adding.Netscaler.provider': '',
-'message.creating.guest.network': ''
+'message.creating.guest.network': '',
+'label.action.delete.physical.network': '',
+'message.action.delete.physical.network': ''
};
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index 86d496b389d..815ad425faa 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -1665,7 +1665,40 @@
label: 'label.state', indicator: { 'Enabled': 'on', 'Disabled': 'off' }
},
vlan: { label: 'label.vlan.range' }
- }
+ },
+
+ actions: {
+ remove: {
+ label: 'label.action.delete.physical.network',
+ messages: {
+ confirm: function(args) {
+ return 'message.action.delete.physical.network';
+ },
+ notification: function(args) {
+ return 'label.action.delete.physical.network';
+ }
+ },
+ action: function(args) {
+ $.ajax({
+ url: createURL("deletePhysicalNetwork&id=" + args.context.physicalNetworks[0].id),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var jid = json.deletephysicalnetworkresponse.jobid;
+ args.response.success(
+ {_custom:
+ {jobId: jid
+ }
+ }
+ );
+ }
+ });
+ },
+ notification: {
+ poll: pollAsyncJobResult
+ }
+ }
+ }
},
dataProvider: function(args) {
//Comment out next line which causes Bug 13852 (Unable to configure multiple physical networks with service providers of the same device type).