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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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