Commit Graph

21 Commits

Author SHA1 Message Date
Zuul 2cd7093804 Merge "Fix deprecated use of 'jQuery.fn.change()' shorthand event" 2023-04-27 05:35:54 +00:00
manchandavishal 6918015508 Fix deprecated use of 'jQuery.fn.change()' shorthand event
This patch changed the code to use the recommended 'on()' method
instead of the deprecated shorthand event. For more information
about this deprecation, please refer [1].

[1] https://api.jquery.com/change-shorthand/

Change-Id: Ia580ddf2ea5b0fba7feb400db759f59c0f5d958f
2023-04-26 19:43:42 +05:30
Zuul c151d67c93 Merge "Fix Deprecated: jQuery.parseJSON() warning by updating to JSON.parse()" 2023-04-25 03:52:12 +00:00
manchandavishal 6b0aa20179 Update jQuery click event to remove deprecation warning
The shorthand jQuery.fn.click() event has been deprecated in favor
of the on() method. This patch updates the code to use the on()
method instead to remove the deprecation warning. For more
information about the deprecation of jQuery.fn.click(),
please refer [1].

[1] https://api.jquery.com/click/

Change-Id: Ic44aaded8d0aaa70e38e46d4121dc3c825f3b831
2023-04-12 22:16:53 +05:30
manchandavishal de61e2a049 Fix Deprecated: jQuery.parseJSON() warning by updating to JSON.parse()
The jQuery.parseJSON() method has been deprecated since jQuery 3.0, and
generates a warning in the console. This patch replaces all instances of
jQuery.parseJSON() with JSON.parse(), as recommended in the jQuery
upgrade guide [1]. This ensures that the code is compatible with the
latest version of jQuery and eliminates the warning.

[1] https://jquery.com/upgrade-guide/3.0/#deprecated-jquery-parsejson
Change-Id: I1da5a6c56cefe9bbe0c1185ac8c536eb8f2a6a35
2023-04-10 13:18:06 +00:00
Akihiro Motoki ffbe0e2f2f network topology: handle port AZ correctly
Previously d3 version of the network topology view handles ports with
device_owner 'compute:nova' and 'compute:None' specially. This leads
to the situtaion that neutron ports with non-default AZ are not shown
properly. There is no reason to handle neutron ports with the default
AZ differently. What we would like to do is just to classify neutron
ports attached to nova servers.

This commit changes the logic to check device_owner of ports have
a prefix 'compute:'. Note that we also need to check if device_owner
is a string before checking the prefix.

Change-Id: I472bae9af3d14d8a31efcae8a7610b84c4f09c3d
Closes-Bug: #1820260
2019-03-21 19:17:05 +09:00
Artem Tiumentcev e049609f88 Hide button "delete subnet" on the network topology for shared networks
Co-Authored-By: Ameed Ashour <Ameed.Ashour.ext@nokia.com>
Co-Authored-By: Artem Tiumentcev <darland.maik@gmail.com>
Change-Id: Ia1bd3b231a039adef9be92a873e65bfd476088a5
Closes-Bug: #1703021
2018-02-22 02:02:46 -05:00
Itxaka Serrano Garcia 666762956a Provide a button to center the network topology
In some cases by moving the network topology svg around and
playing with the zoom, you can lose track of it as it goes
out of view. Provide a button that resets the visualization
so it gets in the center and removes zoom.

Co-Authored-By: Ameed Ashour <Ameed.Ashour.ext@nokia.com>
Co-Authored-By: Paul Karikh <pkarikh@mirantis.com>
Change-Id: Ide5e10ec82972890fe20d68c4aa1d367df9863f6
Closes-Bug: #1540484
2018-02-21 09:40:23 -05:00
Ameed Ashour 4a3f0dcef0 Network topology "Graph" tab always shows nothing
Network topology "Graph" tab always says "There are no networks,
routers, or connected instances to display."
This happens after a fix for bug 1661350
(commit f35eaa2d13) was merged.

The problem with that in checking the length of object.
So always will be equal undefined,
also check the object before getting filled.

Closes-Bug: #1747196
Change-Id: I72dd8d2b472677411635f58309c780a8d602ffe3
2018-02-08 03:53:20 -05:00
Sam Wright f35eaa2d13 Correctly show no data message in Network Topology
Unhid the message on the div so that if there are no networks,
routers, or connected instances it says this instead of a blank
white box

closes bug: #1661350

Change-Id: Id5f86a81125ff91c5824b51ca4a2141cabc2d0c4
2018-01-18 13:57:21 +13:00
Marek Lycka 8aff865ee6 Fixes the deletion on click action assignment
Changes the selector used to assign the delete on
click action to the correct button in the modal
confirmation dialog.

In addition, the code that hides the "working"
modal to the success handler of said delete action;
the modal should now appear while elements are
actually being deleted and disappearing after
the operation finishes.

Closes-Bug: 1733324
Change-Id: Ia14c263ed49c6f9705dbe12e8108a2c8c858aa31
2017-11-20 14:20:17 +01:00
Zuul cb6fcc1d7a Merge "Fixes toggle behavior in Network Topology graphs" 2017-10-21 05:46:15 +00:00
Marek Lycka 4db34f616d Added type checks for ha device owners
Added owner check types to is_interface function calls
used by templates to decide if the 'delete interface'
button should be displayed or not.

Change-Id: I47000d425d2a3b81c776f791cbfeb82fd7f3e0f9
Closes-Bug: 1720327
2017-10-19 09:18:18 +00:00
Jenkins a37d9f08b0 Merge "Fix subnets can not be deleted from network topology panel" 2017-10-03 22:31:20 +00:00
Marek Lycka 0c8b0f3754 Fixes toggle behavior in Network Topology graphs
Changes the buttons (Toggle Labels and Toggle Network Collapse)
 in the network topology graph view into bootstrap styled checkboxes
(the buttons should now operate as on/off) and modifies the relevant
js code to prevent random un-toggeling on data loading. Additionally,
the states for each button should now be respected on page refresh.

Change-Id: I16c00786a2c7cd37a38ebecc9494861232d2f473
Closes-Bug: 1672723
2017-09-20 08:52:59 +02:00
Feilong Wang b26b17caec Fix icon of status on network topology
Currently, the icon of status on network topology is wrong because
of incorrect icon. There are two issues:

1. The icon of router status is in red color though it's active.
2. The icon of interface status is missing.

Closes-Bug: #1713901

Change-Id: Icf676c7267f64b3704cd16e6a1cccf9ae4d95e91
2017-09-15 12:00:37 +12:00
Ying Zuo fb4ae6bbda Fix subnets can not be deleted from network topology panel
The structure of DetailView was changed, so the url for the delete
subnet action needs to be updated so that subnets can be deleted properly.

Added the required method get_subnets_data in DetailView.

Added JS code to remove the subnet from the network node on network
topology panel after the subnet is deleted.

Fixed router interface not being removed from the network topology
panel after it's deleted.

Closes-bug: #1643414

Change-Id: I60cc161655b994c8e3ace5efc37459f3e9e60d67
2017-08-21 21:42:30 -07:00
swati 698dbe322b Confirm Dialog for Delete operation in Network Topology
When we click a delete button in network topology, the corresponding
delete operation is issued immediately. Now, a confirm dialog is
displayed first to confirm the user's action and then the item gets
deleted accordingly. It brings better consistency with delete
operations of other tables.

Change-Id: I1312364c75cea17f228eb298daacb141bf1bfdde
Co-Authored-By: Vladislav Kuzmin <vkuzmin@mirantis.com>
Co-Authored-By: Swati Sharma <sharma.swati6@tcs.com>
Co-Authored-By: Allen <chen.qiaomin@99cloud.net>
Closes-Bug: #1242251
2017-06-19 13:38:51 +04:00
Diana Whitten c219a3efc6 Horizon Spinner/Loader should inherit from theme
The Horizon spinner was using a spinner generated and animated
entirely out of JavaScript. Since CSS3 provides animates and we have
access to icon fonts, doing everything with JavaScript is not
necessary and actually taxing on the browser. Plus, all of the
spinner options were being passed in and around with JavaScript,
including the colors.  This makes it supremely difficult to use the
theme to style the spinner.

The new spinner is just defined by a handful of templates now. There
are two clientside templates to support Legacy Horizon, and one
template in the Angular to support spinners going forward.  Legacy
Horizon had two forms of spinners, so it was broken up. Angular as
not yet made use of the inline spinner, but should follow the same
markup when it is made.

There are two types of spinners, inline spinners (those shown when a
dynamic tab content is loading) and modal spinners (various other
places).  These are consistent with each other for the 'default'
experience, but their experience can be entirely customized separate
from each other.  'material' has been augmented with loaders defined
within their design spec to show the power of this new feature.

horizon.templates.js was augmented with this refactor to support only
having to compile one tempalte at a time (instead of all of them) and
caching that template so that all of them can be recompiled later.
Also, horizon.loader.js was added to house template compilation code
that was repeated in several locations.

To test overwriting page modal spinner and inline-modal spinner
examples, please follow the instructions in _loading_inline_exmaple.html,
_loading_modal_example.html under
openstack_dashboard/themes/material/templates/horizon/client_side

Change-Id: I92bc786160e070d30691eeabd4f2a50d6e2bb395
Partially-implements: blueprint horizon-theme-css-reorg
Partially-Implements: blueprint bootstrap-html-standards
Closes-bug: #1570485
2017-04-21 11:15:52 -07:00
MinSun 73f8675148 Support to delete instance from network topology view
When try to delete an instance in network topology view, horizon would
try to load project/instance table in background, then do the delete
row action to the instance.
But the project instance table was paginated, it only load the first
page instances. The delete action would not work if you try to delete
an instance that are not in the first page.
The patch try to fix the bug.

Change-Id: I317bd1ee418d19c075ae3ac8d39563a0514b1795
Closes-Bug: #1597677
2017-01-20 21:19:54 +08:00
Kenji Ishii 295175826b Move js files into openstack_dashboard folder.
hozoin doc says that the horizon directory holds the generic
libraries and components that can be used in any Django project.

So, this patch move js files related with Openstack components into
openstack_dashboard folder.

Change-Id: Ib4ed05e1136ee3f70a201139e456d4c3b93519f3
Closes-bug: #1635519
2016-12-18 15:27:42 +09:00