From a42a56f495568de4d2136530129825f4e27377b1 Mon Sep 17 00:00:00 2001 From: mareklycka Date: Mon, 16 Jul 2018 15:37:58 +0200 Subject: [PATCH] Restores deletion in flat network topology - Removes an inappropriate condition for the device deletion button - Fixes a jquery selector for the confirmation dialog that pops up on deletion Change-Id: I0a4c7dd5782524a875bf208d4ea63ac6df4a62b4 Closes-Bug: 1781911 --- .../network_topology/client_side/_balloon_container.html | 2 -- .../static/js/horizon.flatnetworktopology.js | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/client_side/_balloon_container.html b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/client_side/_balloon_container.html index 68e1571112..4ba7d42975 100644 --- a/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/client_side/_balloon_container.html +++ b/openstack_dashboard/dashboards/project/network_topology/templates/network_topology/client_side/_balloon_container.html @@ -22,7 +22,6 @@ [[/console]] [[#type]] - [[#allow_delete_subnet]]
- [[/allow_delete_subnet]] [[/type]] diff --git a/openstack_dashboard/static/js/horizon.flatnetworktopology.js b/openstack_dashboard/static/js/horizon.flatnetworktopology.js index 51c5654a32..944b6f4f19 100644 --- a/openstack_dashboard/static/js/horizon.flatnetworktopology.js +++ b/openstack_dashboard/static/js/horizon.flatnetworktopology.js @@ -624,7 +624,7 @@ horizon.flat_network_topology = { $balloon.find('.delete-device').click(function(){ var $this = $(this); var delete_modal = horizon.datatables.confirm($this); - delete_modal.find('.btn-primary').click(function () { + delete_modal.find('.btn.btn-danger').click(function () { $this.prop('disabled', true); d3.select('#id_' + $this.data('device-id')).classed('loading',true); self.delete_device($this.data('type'),$this.data('device-id')); @@ -634,7 +634,7 @@ horizon.flat_network_topology = { $balloon.find('.delete-port').click(function(){ var $this = $(this); var delete_modal = horizon.datatables.confirm($this); - delete_modal.find('.btn-primary').click(function () { + delete_modal.find('.btn.btn-danger').click(function () { $this.prop('disabled', true); self.delete_port($this.data('router-id'),$this.data('port-id'),$this.data('network-id')); horizon.modals.spinner.modal('hide'); @@ -642,7 +642,7 @@ horizon.flat_network_topology = { }); self.balloon_id = balloon_id; }, - delete_balloon:function() { + delete_balloon: function() { var self = this; if(self.balloon_id) { $('#' + self.balloon_id).remove();