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
As per OpenStack licensing guide lines [1]:
[H102 H103] Newly contributed Source Code should be licensed under
the Apache 2.0 license.
[1] http://docs.openstack.org/developer/hacking/#openstack-licensing
Change-Id: If9ae2195d23ee8ed4bfe3da136e647f4e291a415
Running eslint is effectively useless nowdays because of the
overwhelming number of warnings returned.
This patch fixes the existing "space-in-parens" errors.
I've decided to only fix those errors here to keep the patch small, and
not destroy any chance of success by needing to rebase every 5 minutes.
Other fixes will be incoming.
Change-Id: Ie9292da293eea6a93751e6c17d24068b66c5d62a
Partial-Bug: #1554824
Do a check to see if the ip is already on the device
ip_addresses list before pushing it to prevent having
duplicated ips when the ports status changes.
Change-Id: I0a526f37faa2ef757cd5474c43264795d6b758ae
Closes-Bug: 1543312
There has been user/operator feedback that the new network topology
satisfies different needs than the old did. The two are actually
complimentary rather than mutually exclusive. This patch allows for both
topologies to be visible on separate tabs. Both views share the same
data model, but renders that data differently.
One interesting inclusion is triggering a resize event if an HTML
element with the d3-container CSS class is present. The reason for this
is that the svg content in a non-visible tab is rendered into a container
with 0 height and width. This causes the contents to all sit in the top
left corner of the container. Without the resize event which is used to
trigger a redo of the force layout. The plus side is now this d3 based
network topology handles window resize events. I am open to suggestions
so that a resize event is not necessary on the tab show event.
An additional area for improvement is the inline CSS in
_svg_element.html
Implements blueprint: restore-old-net-topology
Change-Id: Iba6e6ad07b9ff7705f62cdb0281904880df6e4ba
We didn't allow to delete a router_gateway interface from a router
in the network topology due to the checking being done
working only on normal interfaces.
Change-Id: I35f7fc7c0050e1441a740a110fb6f45ddec9371d
Closes-Bug: 1548224
Enables the translation of the status on
network topology.
Provides a json decoder that will resolve
lazy objects like translations.
Moves STATUS_DISPLAY_CHOICES and
ADMIN_STATE_DISPLAY_CHOICES out of the RoutersTable
for easy access to their status from other parts
of the code.
All network objects have their status translated
and a new item called original_status which provides
the untranslated status so the javascript code
is able to display the proper image (green/red)
based on the original status instead of doing it
on the translation.
Change-Id: Ic8cebafe7fbc291fa8933e8d1c2a244be20128e3
Closes-Bug: #1323599
Closes-Bug: #1484113
Alerts that are spawned from javascript aren't auto-dismissed because
horizon.autoDismissAlerts is only called once on page load (the network
topology JS calls it explictly to work around this). This patch sets the
autodismiss on each alert as it's created if applicable so that alerts
created by JS are also auto-dismissed, and calls the function on any
alerts created statically (i.e. in django code) at page load.
Change-Id: I7d42ba4fbc7565fb43fb0cc894154100e8fe0fe9
Closes-Bug: #1442288
"Delete" is being used almost everywhere in OpenStack Dashboard
except the instance panel. Using "Delete" looks more consistent.
In addition, "Delete" tells non-native English speakers that
deleted instances will be no longer usable again compared to
"Terminate".
DocImpact
Closes-Bug: #1502773
Change-Id: Idccaf3c45566f20f11d02ada64c1d3934a6f3002
This enables the no-unused-vars rule from the upstream
eslint-config-openstack, and corrects all linting errors found.
Change-Id: I9f5fb29cd9b2429698819ecf556ced933378b081
Replace the current network topology with the visualisation from the Curvature
user interface
Implements: blueprint curvature-network-topology
Change-Id: I4435ab9b54ce51540c3346aa709f0fa8bbcb87b4
Hogan and STATIC_URL are only use in a few files. Hence, we do not really
need them enabled globally. Removing them from jshint global config.
Change-Id: I0881ab0e6668a47bf795e422e17f9f025a010d31
Closes-bug: #1452464
Removing unused and undefined variables in networktopology javascript.
This ensures that once we enable it globally, the gate will not barf.
Change-Id: Ia071199aef0f65fb56fe70475e8a47f89d8f9084
Partial-Bug: #1438620
Fixes toggle button, puts icon and changes bgcolor.
Changes the position of "Add interface" button in balloon.
Remove networktopology css from horizon.scss
Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>
Change-Id: I7c917ed6cd12481fde961320dcfa76e409c51e4c
Closes-Bug: 1351395
Partially-Implements: blueprint css-breakdown
Use font-awesome 'globe' glyph to indicate that network is
external. Also show a tooltip 'External Network' on hovering the
glyph.
Change-Id: I597e10a11e956a01874732bb0e9827262ebdad5d
Closes-Bug: #1381531
Fix the button and object labels in the network topology pop ups to be
translatable and concatenation-free. Use "None" as the not found value to be
consistent with the network ports detail screen. This patch excludes
fixing the status values.
Partial-Bug: #1323599
Change-Id: Ia0c92842703109401d758d5ac3ccefab9ccf6971
On the Network Topology tab, when a router is selected a new
button was added to allow it connect with different networks.
This change was made following the most simple mechanism that
I could find, please check if it is the correct behavior.
Change-Id: Ia08c5f22e3237fc4e90767a8becfe6413d754b04
Closes-Bug: #1288779
This change allow us to use the ngCookies module in the angular
app of Horizon, it also provide this service outside through the
horizon.cookies object.
Change-Id: I12d85efdff32ce4d7d6a9d3a65e1e93ec0bbc9a7
Implements: blueprint horizon-angular
Co-Authored-By: miziel-r <robert.mizielski@cloudwatt.com>
This will prevent Network topology init function from being called on every page
Change-Id: Ia1005e592b82c7a1641ba8b45362084829fc62da
Closes-Bug: #1195471
Bitwise operators are very rare in JavaScript programs and
quite often & is simply a mistyped &&.
Implements: blueprint jshint-codestyle
Change-Id: Ib176d811f022782ab68ca97a42946f1aa9fec6cc
In order to reduce possible bugs in our scripts the use of identity
operator must be mandatory over the equality operator. This rule force
developers to use the '===' and '!==' instead of '==' and '!='.
Change-Id: I1069ed2baed7bce305fce80d688a5a2c10249148
Implements: blueprint jshint-codestyle
In order to improve the javascript coding style an indentation of
two spaces must be used in the whole project.
A jshint option has been added, and all the files which violate
this rule have been corrected.
In addition, some code style corrections have been made.
Implements: blueprint jshint-codestyle
Change-Id: Ic6428e77a06fd33b1c1298569fc01860c3e28690
As long as Horizon does not support any browser lower than IE8,
json2.js library is no longer needed, browsers have a native
implementation of JSON.stringify and JSON.parse.
Removing this script allow us to reduce the javascript footprint
of Horizon.
jQuery $.parseJSON will replace all parsing of JSON in order to
standardize the use of this functionnality.
Change-Id: Ifaf027e2adc462ee7b3d9587b28583ade376ccfc
Fix code that makes JSHint issue warnings about bad
line breaking and missing radix parameter to parseInt.
Change-Id: I3a7cd1b56921a70a5b393df05b30b71332c471ef
Implements: blueprint js-coding-style-checks
Fix the code that makes JSHint issue warnings about missing
semicolons.
Change-Id: Id76ee094ae32cbb00f24b06b303a73fd258e5666
Implements: blueprint js-coding-style-checks
Change javascript so that we don't use interval that will always call
AJAX, instead only schedule next AJAX poll when we have successfully
finished the previous AJAX request.
This avoids many calls with errors if token times out.
Fixes bug #1253768
Change-Id: I74c4bf8cb931655ce64783ae11467183275386ab
The `open console` link in `Network Topology` page is inconsistent with
console in `Instance Detail` page.
Fixes bug 1228990
Change-Id: I845a9fa4cc17a296bde5da624d3b8833fef9ade6
This feature enables to delete and launch a instance or router on the network
topology view. So you can do basic actions on this view.
Also it enables to change view small or normal. You can see more networks and
devices in the small view.
implements bp editable-network-topology-view
fixes bug #1215683
Change-Id: Ie65d50d2a99f72696c8f10223f8430ad5f90b144
This commit separates CIDR labels with a comma and adjusts the vertical
positioning of port labels for improved readability.
Change-Id: I57510033fcc309b5d570d7ee6a9369a97775719b
Fixes: bug #1199086
A port link between router and extra network was not displayed
with demo account. This commit fixed the bug. Also remove dead
link when port has no link.
fixes bug 1131082
Change-Id: I50c469e55e0b8435b95f03b191a04e27017fc37e
fixes bug 1129190
- display a message when there is no router, network or instance to show
- remove link from not owned network
- improve layout algorithm
- improve css to change router icon
- fix auto update layout
Change-Id: Ibbbf55a53939ab1446f3cb36165a5cf45c27c28c
The check of the jquery selector by name will always return a
non-null object even if the object does not exist on the page,
the check needs to make sure the object returned doesn't
contain any items.
Change-Id: I51367547a37a2ee72ed300853d35d3cc6d89df7d
Fixes: bug #1132588
Implements bp quantum-network-topology
- network-topology pane shows the topology of quantum network
- supports network, router , instances now
- support of load balancer is future work
Change-Id: Idb1bf2d3add43cf51ed23ebaac3ee740b03498aa