Commit Graph

29 Commits

Author SHA1 Message Date
Zuul 9e383e439b Merge "Set up the initial displayed values in all boot-sources" 2020-03-09 15:53:08 +00:00
Zuul c0a7a43d3f Merge "Add pagination to Source table in Launch Instance wizard" 2020-03-08 21:24:39 +00:00
Ivan Kolodyazhny 3e7bc83c4b Allow to set default instance boot source
This introduces a new config option `DEFAULT_BOOT_SOURCE` to allow
operators to configure a default instance boot source.

Change-Id: Ia9b0d1d24ae69958b6606b9a645bd54f70b3aacc
Implements: blueprint default-instance-boot-source
2020-02-18 11:46:39 +02:00
Tatiana Ovchinnikova 5c54ab5d46 Add pagination to Source table in Launch Instance wizard
The most elegant way to add pagination is to refactor the table using
<hz-dynamic-table> which already contains pagination instead of wiring
it to the existing table framework.
This solution adds the pagination and makes the code more readable.

Partial-Bug: #1859423

Change-Id: I08b7b94cf214a6b086565c2dd429e460e4e5c3de
2020-02-05 11:40:17 +01:00
Pedro Martins c7e5b64978 Set up the initial displayed values in all boot-sources
Problem description
===================

In the launch instance workflow while creating a virtual machine,  when
I select the Source tab, most of the time the default boot-source is
`Image` and everything works just fine. However, some times, the default
boot-source comes as Volume, due to some race condition (tested and
reproduced in Chrome 77). In this case, the Available items table is
empty, even if there are bootable volumes to be attached to the VM. This
problem happens because the initial state of boot-sources is setting
only the `displayedAvailable` of the Image source (that is the "default
source"), instead of setting all the initial `displayedAvailable`
elements.

Proposal
========

The proposal is basically to set up the `displayedAvailable` in
all boot-sources.

Closes-Bug: #1848334

Change-Id: I1c9399bf3f6c859206c093452c2e637892aa9722
2019-10-29 17:41:29 -03:00
Andy Botting d641e6d105 Better support for community images
This commit updates several places where image information is processed
and extends support for the 'community' image visibility value.

Some support did exist already, which was mostly just the main Images
tab of the dashboard, but this commit also includes support for:
  - image name in the instances list/details
  - 'Community' visibility label in the Images tab
  - Listing of community images in launch instance wizard

Closes-Bug: #1779250

Change-Id: Iedea0b7d20313837a72a2759511251a7bb324869
2018-12-27 09:04:53 +09:00
David Gutman 87f5e21b03 Select correct boot source when launching instance from different sources
When launching instance from snapshot, volume or volume snapshot,
the selected boot source was always image.
This was due to a reset to image boot source when receiving "change allowed boot
sources" event.
From now:
 - The "change allowed boot source" event does not flush a preselection
if the preselection boot source type is in the allowed sources.
 - Set the bootsource with preselection update correctly the form for each
different type of boot source.

Change-Id: I6907652731fa89b303d997fe2e3c331a68f085b6
Closes-bug: #1608565
2018-09-18 10:29:11 +02:00
kairat_kushaev 48862eb9b7 do not flush selection on "old" boot source
This fixes an issue introduced by watchers:
when page initialized images watchers called before
select boot source watcher.it leads to sutiation when
we specify selection from user input and flush it on
updateBootSource. as a result page come to
inconsistent state described in the bug.
Perhaps, this requires big refactoring but  in the
current patch we do not flush selection if boot type
was not changed. it allows to use image, snapshot,
volume from context as ctrl.selection.

Change-Id: I4b23071a2a9e2c02cc1f46713165e5cb5155894f
Closes-Bug: #1710890
2017-08-21 16:34:42 +04:00
Mohammed Naser d734f482ec Add config for default create volume option
This patch adds the ability to configure the default "create volume"
value when launching an instance with Cinder enabled.

Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>

Closes-Bug: 1678109
Change-Id: I272f7f1b20cc1276976c464a82d1776de92d17e7
2017-06-06 15:38:45 +02:00
Ying Zuo c6f8d7444a Set minimum volume size based on the flavor selected
On the Angular launch instance modal, the volume size for the new
instance does not take the disk size required by the selected flavor
into consideration, which is inconsistent with the Django launch
instance modal.

This patch will set the volume size of the new instance to the
minimum disk size required by the selected flavor.

Change-Id: Ifb35b70c5b41820024e17da783687bfe7880b8e8
Closes-bug: #1676648
2017-04-27 10:58:25 -07:00
Stéphane Nguyen eddef8fa30 Snapshot not selected by default when launching it from images
In images tab, when launching an instance snapshot,
the images is not selected by default in the source
tab of the launch instance wizard.

Change-Id: I9c1bcdd4e22ebf7034146c14a43d8a405ae2a8be
Closes-Bug: #1644882
2017-01-19 20:40:24 +01:00
Sean Mooney 723e547e84 Fix Launch Instance without Cinder
A previous patch altered the defaults in the angular Launch Instance,
but didn't account for those running without Cinder. This patch fixes
those assumptions.

Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Change-Id: I8dc54fa40fa7eb8ae95a13741405f2a80337b33d
Closes-Bug: 1585761
2016-09-23 13:07:37 +00:00
Itxaka 4a9f988813 Angular: Configuration of boot sources for launch instance
Adds new configs to LAUNCH_INSTANCE_DEFAULTS to configure
which sources are available when launching an instance.
Provides an info message  if no boot sources are enabled.
Prevents doing extra calls if a boot source is disabled.
Adds tests to check for the proper filling of allowedBootSources.
Removes one test as the object being checked no longer exists.

Co-Authored-By: Brad Pokorny <brad_pokorny@symantec.com>
Co-Authored-By: Yosef Hoffman <yh128t@att.com>

Change-Id: I90f76c34dbfb20cb54d5f3e599052388bd0dba39
Implements: blueprint configurable-boot-sources
2016-08-17 13:50:15 -04:00
Tyr Johanson 1d886b71fc Define Magic Search Event Constants
This makes is easier to listen for the appropriate Magic Search
events in other parts of Horizon, or from plugins to Horizon.

Change-Id: I5a551bf44139dab07a7ca111fc195dc23079f7d6
2016-06-14 16:39:25 +00:00
Rob Cresswell 3e65e337ee Improve Volume selection handling in LI
The code for updating the Volume Size error in the Launch Instance
source step appears to be incorrect. This patch updates and improves the
handling to also bump the current value to the minimum for the chosen
image (rather than just a form field error). Also changed the default to
create a new volume, as it was advised that this is the more common
workflow.

Change-Id: Iecb679d967b2285776278f23018e4151ebb18df2
Closes-Bug: 1568866
2016-04-30 10:05:19 -05:00
Matt Borland 93381d001e Allow Launch Instance (Angular) from Volume Snapshots
Just as with https://review.openstack.org/#/c/219925/ , right now on
the Volume Snapshots table, if you click on Launch as Instance you
get the legacy launch instance wizard even if local_settings is
configured for LAUNCH_INSTANCE_LEGACY_ENABLED = False.

This needs to recompile the Angular context due to the way Django
creates tab content.

Change-Id: Ibf027d523751cd4808591b8b24d8bb26c6351f5a
Fixes-Bug: 1543891
2016-03-18 12:21:28 +03:00
Itxaka 2aeb99a145 Add Network Port selection to new instance launch
Adds a new step to the new instance launch
with the available ports.
The operator can add or remove ports to be
attached to the instance on boot.
This allows the operator to use ports
at launch instead or together with a network.
Adds tests and modifies other tests to take
into account the new number of steps and the
new addition to the model.

Change-Id: I29fdce433a5a8a9e3ebedbd1a1d96399890e4c6c
Implements: blueprint allow-launching-ports
2016-03-16 17:00:02 +00:00
Cindy Lu 223fb86f0b Launch Instance Wizard - Avail items count doesn't update
In the Angular Launch Instance Wizard, when you change the
the boot source, the Available items count does not update
correctly. Example: Boot Source is set to Image by default and
the Available items Count is correct. Change the boot source.
The count does not update. Also, when you change back to
Image, the previously allocated item no longer exists.

Also fix tiny typo.

Change-Id: I647b31c7a280af4e10040fb27b4436d489fd8163
Closes-Bug: #1489618
2016-03-09 15:09:21 -08:00
Jenkins 8cade6356e Merge "Handle Volume launch as instance(NG) in Volume tables." 2016-03-05 18:08:03 +00:00
mavinagi 9a9772ab80 Handle Volume launch as instance(NG) in Volume tables.
The launch as instance option for Volumes launches the legacy
launch instance wizard even if local_settings is configured
for LAUNCH_INSTANCE_LEGACY_ENABLED = False. This Fix addresses
the issue.

Volume snapshots will be a separate patch.

Horizon tables.js has a separate bug that needs to be fixed:

https://bugs.launchpad.net/horizon/+bug/1514627

Change-Id: Id4a7dc2a48c63cbe27ece4dba1825eb89b7a0388
Closes-bug: #1491645
Co-Authored-By: Travis Tripp <travis.tripp@hpe.com>
2016-03-03 21:59:51 -07: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
Itxaka a32a1d9da9 Increase branching testing
Increases the testing for different branches
in javascript code.
Closes-Bug: #1544881
Change-Id: Id8982f3f4321c822b74caa4fb0eb380dbc059f8a
2016-02-12 13:04:59 +01:00
Rajat Vig 5ee8de73e2 [Launch Instance Fix] Magic Search in new Launch Instance
Currently implemented in the "Select Source", Network and
"Select Flavor" step in the Launch Instane workflow.

Co-Authored-By: Rajat Vig<rajatv@thoughtworks.com>

Change-Id: I5e195bfcf7fe3367576089b23cc08b40c2c36b09
Partial-Bug: #1434710
2016-02-09 10:06:48 -07:00
Justin Pomeroy 9a0f130119 Support docker image type in ng launch instance wizard
This updates the angular Launch Instance wizard so the source tables
correctly display DOCKER as the type when the disk format is raw and
the container format is docker.

Closes-Bug: #1489562
Change-Id: Id8c93376237bd37efded1d6f9d0c036d8a5b1144
2016-02-05 06:27:00 -06:00
Akihiro Motoki 5fc26b0a11 Replace "Terminate Instance" with "Delete Instance"
"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
2015-11-30 03:55:19 +09:00
Dan Siwiec ba91041a90 Split instance details and source in Launch Instance wizard.
Per user feedback, the existing wizard step, Select Source,
is being split into two steps - Instance Details and Select Source.

Partial-Implements: blueprint launch-instance
Change-Id: I3bf2c6dc8baea782416e608965459cce0aee69f6
Co-Authored-By: Coleman Beasley <cbeasley@thoughtworks.com>
Co-Authored-By: Kyle Olivo<keolivo@thoughtworks.com>
Co-Authored-By: Errol Pais<epais@thoughtworks.com>
Co-Authored-By: Matt Borland <matt.borland@hpe.com>
2015-11-23 07:52:42 -07:00
Rajat Vig f863e51dea JSCS Cleanup - use DI in launch instance model
Per the JP style guide, implements getter syntax rather than declaring a
variable for the module, and implements DI for the service as well.
This also fixes the indent related issues caused by the new eslint
rules.
Change-Id: I8d9404d56c0c38debe97a99d8282d1d5b559302d
Co-Authored-By: Valerie Roske<varoske@thoughtworks.com>
Partially-Implements: blueprint jscs-cleanup
2015-08-28 08:17:09 -07:00
Rob Cresswell c7df485631 Move i18n to HTML for launch-instance source step
We should clean out old gettext and move them into HTML files.
This bug addresses the move to launch-instance source step.

Change-Id: Ib7dd0880949e980994464aa18cc3a2e8f224fe58
Partial-Bug: #1487582
2015-08-25 08:32:57 +00:00
Tyr Johanson 87e386aea8 Dashboard ReOrg - Relocate Launch Instance module
This patch relocates the 'launch-instance' directory.

Continuing re-organization of the Launch Instance angular code
to move it into the correct place for plugins, namely
openstack_dashboard/dashboards/project/

This patch attempts to divide https://review.openstack.org/#/c/191592
into smaller, more easily reviewable pieces.

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

Change-Id: I426c77d704ed9114ce9ae148b5fdec4e381f0f68
Partial-Bug: 1478717
2015-08-05 11:21:19 -06:00