Commit Graph

36 Commits

Author SHA1 Message Date
Tatiana Ovchinnikova f044c4b0a3 Migrate to AngularJS v1.8.2
This patch aligns current code with AngularJS v1.8.2 requirements.

Change-Id: Ifdad18e805953957bfaa1b42908dfbbe8976dbcb
2022-06-08 15:43:13 -05:00
Akihiro Motoki 3c6286a9e9 Drop the usage of nova extensions in JavaScript code
Part of the removal of OPENSTACK_NOVA_EXTENSIONS_BLACKLIST (2/3)

References to nova extensions are cleaned up.
The logic to fetch nova extension list is finally dropped.

Change-Id: If4876634276eff37ab0a18a49e6e97851d41911b
2020-10-27 20:00:45 +09:00
Matt Riedemann b148c92075 Remove dependency on novaclient list_extensions API
The novaclient list_extensions API binding was removed in the
16.0.0 release [1]. The ability to enable/disable extensions
in nova has been deprecated since Liberty [2] and was removed
in Newton [3].

For horizon this only matters for the OPENSTACK_NOVA_EXTENSIONS_BLACKLIST
config setting and some javascript code used to compile panels based on
enabled extensions. In order to work with novaclient 16.0.0+, this
change removes the list_extensions usage since all extensions
are enabled in nova and thus for horizon a nova extension is only
not supported if it's in the configured blacklist. To continue supporting
the javascript code which uses the getExtensions function, the extension
names are hard-coded. Note that the method meant to test that code,
_test_extension_list, was wrong but never ran because of the underscore
prefix on the method name. That is fixed here.

[1] https://review.opendev.org/686516/
[2] https://review.opendev.org/214592/
[3] https://review.opendev.org/351362/

Change-Id: Iebb1e78c718b931d632445e4de6d7a29ccb92be2
Closes-Bug: #1847959
2019-10-24 15:24:39 -04:00
wei.ying 940ff111a1 Add angular server group details page
This patch adds angular server group details page to show details of
the given server group, also shows the server group members under the
current server group.

Change-Id: I5b903972dd4fc5c9f1b52f97bdd7e0852d7d00d3
Partial-Implements: blueprint ng-server-groups
2018-03-18 22:42:43 +08:00
wei.ying 37647dd318 Add angular delete server groups action
This patch adds delete actions for angular server groups panel.

Change-Id: I9cd887fb315a5523c44c48d284cdea3a6673b3b2
Partial-Implements: blueprint ng-server-groups
2018-03-18 22:20:03 +08:00
wei.ying df857f00b5 Add angular create server group action
This patch adds create server group action for angular server groups
panel.

Change-Id: Ia4354448dcb42bc5e53e2415084f0569a75a68a3
Partial-Implements: blueprint ng-server-groups
2018-03-16 23:51:41 +08:00
Shu Muto e7f22178b2 Add delete action for key pair
This patch adds delete actions for angularized key pair panel.

Change-Id: Iccb5014add0e19d6154bd6261d97a83b2ecdf32f
Partial-Implements: blueprint ng-keypairs
2017-11-01 14:53:04 +09:00
liyingjun 2161b91264 [Micro version] Support description for instance
In Nova Compute API microversion 2.19, you can specify a “description”
attribute when creating, rebuilding, or updating a server instance. This
description can be retrieved by getting server details, or list details
for servers, this patch adds support for this attribute for instance in
horizon.

Change-Id: Ic9217234021d236aee8295915f1a9c3c544396b0
Implement-blueprint: support-description-for-instance
2017-10-26 22:36:00 +08:00
Shu Muto 194c881396 Angularize Key Pair Details
This patch adds Angularized details view for Key Pair.
Also, added new filter 'mediumDate' that format date as follow:
e.g) Feb 3, 2001 4:05:06 PM

Change-Id: I1eaead66a582c15442b28ae83fb1c573a46b0f43
Partial-Implements: blueprint ng-keypairs
2017-09-28 16:57:49 +09:00
Jenkins f5b2561a09 Merge "Use POST not GET for keypair generation" 2017-06-16 09:00:05 +00:00
Matt Borland d07fedc45f Use POST not GET for keypair generation
This patch fixes the Cross-Site Request Forgery (CSRF) attack against
the keypair generation pages:
- HORIZON_URL/project/key_pairs/PAIRNAME/generate/
- HORIZON_URL/project/key_pairs/PAIRNAME/download/
These pages exposed creating and/or overwriting a keypair with a given
name via a CSRF attack.

This patch closes these holes by using only POST-based keypair creation,
and exposing the keypair in the contents of a modal dialog instead of a
download, which ultimately requires a GET.  It uses the same client-side
features for both the Launch Instance keypair creation and Compute / Key
Pairs panel.

Closes-Bug: 1575913
Change-Id: Ie5ca28ff2bd806eb1481eba6f419b797b68856b6
2017-06-08 11:13:31 -07:00
Radomir Dopieralski a1dd035050 Fix instance launch dialog under MSIE11
The novaAPI.getFlavors() call takes only a single parameter, which
should be an object with params. But it is being called with two
parameters here, both "true", which makes IE11 fail with TypeError
later on, when it tries to iterate over keys of params.

Change-Id: I0dcfcdca3dda2d94509d7a574184e7f82f21ca22
Closes-Bug: #1694574
2017-06-01 23:27:30 +02:00
chenaidong1 34a6a8946d Fix a typo
Change-Id: I0bde562c7b569690520d74e8d377654983e1654c
2017-05-05 14:23:14 +08:00
Matt Borland e8e84c2db4 Flavors panel can switch to Angular
This patch enables all of the features for the Flavors panel to use Angular but
disables it, so that it is easy to switch on/off.

Note that we add integration test switches since it can't read the Django
conf.

Note that I changed the common tests to allow for testing of api calls that
don't produce error toasts, because we needed better branch coverage, and
the deleteFlavor api wasn't fully branch-tested.

Change-Id: I92b1b57bd486e5eb87179cb8d44b7551e9de2e0f
Partially-Implements: blueprint ng-flavors
2016-10-11 15:49:55 -07:00
Matt Borland 93b7edd694 Add more Nova API features for NG Instances
This patch adds more Nova API features for instances.  It establishes
several new proxy APIs and provides the various JavaScript libraries for
accessing those APIs as well.

Change-Id: I016be1d0598faf78b1fb02f4d0768efdaf6cb7bf
Partially-Implements: blueprint angularize-instances-table
2016-08-12 14:43:37 -06:00
Jenkins 7ae9c6317e Merge "Angular LI:Make sure we always get all limits" 2016-07-26 23:02:02 +00:00
woodm1979 7cbd3b7019 No more space-in-parens eslint errors
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
2016-07-22 15:27:22 -06:00
Brad Pokorny cf91124d0c Choose a server group when booting a VM with NG launch instance
Allow users to choose a server group when booting a VM.  Adds
an optional workflow step to the launch instance workflow that
shows the available server groups and details about each group.
The ability to choose a server groups already exists for the
legacy launch instance workflow as a dropdown list, but having
it as a separate step in the angular workflow provides the added
capability of seeing group details.

To test this patch, create a server group via the nova CLI. Example:
  nova server-group-create group1 affinity

And use the angular launch instance workflow to select a server
group. To validate the new instance was added to the server group,
use the nova CLI:
  nova server-group-get [ID of server group]

Change-Id: I651817850ef8a5afec047a9a481843a5eddbf5a9
Implements: blueprint nova-server-groups
2016-07-19 09:25:52 -07:00
Itxaka 5c5f35afc2 Angular LI:Make sure we always get all limits
When checking with nova for the absolute limits
we were not taking into account the reserved
quotas (i.e. instance in rebuilding will take
cpu and ram) so this could lead to wrongly
thinking that the user could launch more instances
that its quota allowed. It also made the overview
page display wrong quotas as it didnt took into
account those reserved resources.

Change-Id: I42d0bc1521a9da26ee2d23a5900c67badeb2d04b
Closes-bug: 1561310
2016-07-01 09:50:25 +00:00
Paulo Ewerton Gomes Fragoso 3945b24062 Adding Identity NGProjects API
This patch adds some projects-related endpoints to the Nova,
Cinder and Neutron REST/Angular APIs.

These changes are needed for the angular Identity Projects
actions that handle mainly project quota updates.

Partially-Implements: blueprint angularize-identity-projects

Change-Id: I98b8eb9e5e7bfb0d49a77c00115fe62d412abe21
2016-06-21 13:12:43 +00:00
Rajat Vig df14d977c9 API for getting and updating quotas
Adding API for getting and updating default
quotas information from nova and cinder.

The patch for the panel is at
https://review.openstack.org/#/c/205296/

Co-Authored-By: Kyle Olivo <keolivo@thoughtworks.com>
Co-Authored-By: Kristine Brown<kbrown@thoughtworks.com>
Co-Authored-By: Dan Siwiec<dan.siwiec@thoughtworks.com>
Co-Authored-By: Paulo Ewerton <pauloewerton@lsd.ufcg.edu.br>

Change-Id: Ia8e26e10b816d0dba69542b8da4ad18cccf5173a
Partially-Implements: blueprint ng-defaults-panel
2016-06-06 11:58:14 +00:00
Matt Borland 09148f68d6 Cleaning up eslint warnings in the openstack-service-api directory
There are many eslint warnings in this directory.  This patch cleans
them up, about 100 warnings removed.

Change-Id: I639dccd7b511190552f05ae0e52234532412e54c
Partial-Bug: 1554824
2016-03-25 15:41:15 +00:00
Akihiro Motoki 075d9b3624 Use interpolate in JS to allow translators to control word order
String concatenation is not recommended for better translation.

Change-Id: I56cd604d88693dadc85ec06f4b4220a63151f2ee
Closes-Bug: #1553619
2016-03-06 08:27:49 +09:00
Itxaka cfbfab4142 Reduce lint warnings
Reduce some of the most obvious lint warnings like braces.

Change-Id: Ib4740ed0cf358374600a99c69559fec52215727c
2016-02-25 10:28:42 +01:00
Rajat Vig 0903fd20ff API Services for Flavors Panel
Adding the api services needed by the flavor panel
for the sub flows

To test set DISABLED = False in _2081_admin_flavors_panel.py

Co-Authored-By: Rajat Vig <rajatv@thoughtworks.com>
Co-Authored-By: Errol Pais <epais@thoughtworks.com>
Co-Authored-By: Kristine Brown <kbrown@thoughtworks.com>
Co-Authored-By: Kyle Olivo <keolivo@thoughtworks.com>
Co-Authored-By: Yakira Dixon <ydixon@thoughtworks.com>
Co-Authored-By: Dan Siwiec <dsiwiec@thoughtworks.com>

Change-Id: Iad97739203a05cce3c971cc8458cd2eb67e117d3
Partially-Implements: blueprint ng-flavors
2016-02-10 08:23:17 -08:00
Errol Pais 32906ef7db Launch Instance - Create Keypair Service
This patch includes a service that creates a keypair and returns
a promise that checks if the keypair was created successfully.

Co-Authored-By: Matt Borland <matt.borland@hpe.com>

Partially Implements: blueprint launch-instance-download-keypair-redesign
Change-Id: I3da0b8bde37b004df42f044887faeabe189af57f
2016-02-09 13:00:01 -07:00
Jenkins 634b525537 Merge "Add getServers function to nova rest API" 2016-01-08 04:43:53 +00:00
Justin Pomeroy 79971c627b Add action for editing instance metadata
This adds the Update Metadata action to the instances table to allow
managing the metadata on an instance. This is very similar to the
Update Metadata actions for images, flavors, etc.

Implements: blueprint edit-server-metadata
Change-Id: Ia09a05f5cd93898ec9d64ac7af1e6baf07e71757
2016-01-04 08:46:28 -06:00
Rajat Vig 436e0fb868 Add API services for system information
Adding API services that are necessary for displaying System Information.
This patch will contain all of the APIs necessary to populate those tabs.
HTTP code 501 is introduced, to communicate to the UI that an API extension
is not available. This simplifies the UI implementation by avoiding making
an additional 'check' call from the UI

Co-Authored-By: Kristine Brown <kbrown@thoughtworks.com>
Co-Authored-By: Kyle Olivo <kyle@kyleolivo.com>
Co-Authored-By: Rajat Vig <rajatv@thoughtworks.com>
Co-Authored-By: Dan Siwiec <dan.siwiec@thoughtworks.com>

Change-Id: I64167d8f5f8e914667f4b6582edc00463f9e0d4a
Partially-Implements: blueprint ng-system-information
2015-12-16 23:22:20 +00:00
Justin Pomeroy 1515caaba8 Add getServers function to nova rest API
This adds the getServers function to the nova rest API module so
that new angular code can use it.

Partially-Implements: blueprint angularize-instances-table
Change-Id: I2be7e37f0065bda66fbacbb1f9898551819f45c8
2015-12-10 14:18:05 -06:00
Rajat Vig 60ba217951 Uncapitalize the first letter of non init functions
Several files contain capital letters instead of lower case ones in
non init functions as discussed here:
https://review.openstack.org/#/c/216443/3/openstack_dashboard/static/app/core/openstack-service-api/heat.service.js

Change-Id: I79d7eaaa11c9475184ede580d10cc5fd2bc3ded7
Closes-Bug: #1501860
2015-10-01 11:06:06 -07:00
Rajat Vig 40899b8481 ESLint glob pattern not matching files for lint
The file glob pattern in package.json

*/static openstack_dashboard/dashboards/*/static

has been changed to openstack_dashboard/static and
horizon/static as only then does it run lint on the
openstack_dashboard folder.

Fixed issues in files in openstack_dashboard that
have unaddressed warnings.

Change-Id: I1ae1346281f028821afae159d471e3e87b2d8d6d
Closes-Bug: #1490704
2015-09-01 06:04:16 +00:00
Szymon Wroblewski f030262521 Angular metadata update modal
This patch adds metadata update modal dialog widet written in js
and some required REST API methods.

To see it in action checkout following patch
https://review.openstack.org/#/c/184275/
which replaces old metadata modals with new ones written in angular.

Co-Authored-By: Shaoquan Chen <sean.chen2@hp.com>
Co-Authored-By: Rajat Vig <rajatv@thoughtworks.com>

Partially-Implements: blueprint angularize-metadata-update-modals
Change-Id: I36bfb91f8b6bbba49fed6bb01cd1dd266261cfdb
2015-08-25 15:20:47 +02:00
Rajat Vig 28d99113b8 Use the JP Style Guide for OpenStack Services
Use the Service style as documented in
https://github.com/johnpapa/angular-styleguide#style-y052

Fix a eslint error on security-group.service.spec.js
Changes API Services from Angular service to factory.

Change-Id: I76ef729e51878d67c355d1edc774d936038d7f62
Partially-Implements: blueprint john-papa-style-guide
Partially-Implements: blueprint jscs-cleanup
2015-08-24 18:31:20 +00:00
Rajat Vig a51855707e Use the JP Style Guide for Nova Service
Splits the nova.service.js into multiple files
as based off the functions they provide.

Change-Id: Ic5713c573162598bff75d245ec5c1fe3396da9c2
Implements: blueprint john-papa-style-guide
2015-08-14 08:42:32 -07:00
Shaoquan Chen 0d4cf1661e Dashboard ReOrg - Move APIs into app/core
This patch relocates the 'openstack-service-api' directory because
they are application specific, but needed by multiple dashboards.

Co-Authored-By: Tyr Johanson <tyr@hp.com>
Co-Authored-By: Shaoquan Chen <sean.chen2@hp.com>

Change-Id: Ie5455f3ca4cfaacb99cbccd66c95fb3ad31da272
Partial-Bug: #1478717
2015-08-03 14:25:37 -06:00