diff --git a/horizon/static/horizon/js/horizon.networktopology.js b/horizon/static/horizon/js/horizon.networktopology.js index 2179fbc4ae..5578830cef 100644 --- a/horizon/static/horizon/js/horizon.networktopology.js +++ b/horizon/static/horizon/js/horizon.networktopology.js @@ -508,17 +508,17 @@ horizon.network_topology = { try { ip_address = port.fixed_ips[0].ip_address; }catch(e){ - ip_address = 'no info'; + ip_address = gettext('None'); } var device_owner = ''; try { device_owner = port.device_owner.replace('network:',''); }catch(e){ - device_owner = 'no info'; + device_owner = gettext('None'); } object.ip_address = ip_address; object.device_owner = device_owner; - object.is_interface = (device_owner === 'router_interface') ? true : false; + object.is_interface = (device_owner === 'router_interface'); ports.push(object); }); var html_data = { @@ -527,19 +527,19 @@ horizon.network_topology = { url:d.url, name:d.name, type:d.type, - type_capital:d.type.replace(/^\w/, function($0) { - return $0.toUpperCase(); - }), + delete_label: gettext("Delete"), status:d.status, status_class:(d.status === "ACTIVE")? 'active' : 'down', status_label: gettext("STATUS"), id_label: gettext("ID"), interfaces_label: gettext("Interfaces"), - interface_label: gettext("Interface"), - open_console_label: gettext("open console"), - view_details_label: interpolate(gettext("view %s details"), [d.type]) + delete_interface_label: gettext("Delete Interface"), + open_console_label: gettext("Open Console"), + view_details_label: gettext("View Details") }; if (d.type === 'router') { + html_data.delete_label = gettext("Delete Router"); + html_data.view_details_label = gettext("View Router Details"); html_data.port = ports; html_data.add_interface_url = d.url + 'addinterface'; html_data.add_interface_label = gettext("Add Interface"); @@ -548,6 +548,8 @@ horizon.network_topology = { table2:(ports.length > 0) ? port_tmpl : null }); } else if (d.type === 'instance') { + html_data.delete_label = gettext("Terminate Instance"); + html_data.view_details_label = gettext("View Instance Details") html_data.console_id = d.id; html_data.console = d.console; html = balloon_tmpl.render(html_data,{ @@ -582,7 +584,7 @@ horizon.network_topology = { } $balloon.find('.delete-device').click(function(e){ var $this = $(this); - $this.addClass('deleting'); + $this.prop('disabled', true); d3.select('#id_' + $this.data('device-id')).classed('loading',true); self.delete_device($this.data('type'),$this.data('device-id')); }); 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 bbf163c093..10c8c35603 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 @@ -24,7 +24,7 @@ [[add_interface_label]]