Commit Graph

36 Commits

Author SHA1 Message Date
Radomir Dopieralski 4a89303231 Clean up the syntax of html attributes to always use double quotes
Our templates are very inconsistent and sometimes even use single and
double quotes in the same tag. This is an attempt to clean it up a
little and use double quotes everywhere.

In addition, I have run into a problem with single quotes being
incorrectly escaped by the Django compressor, and I want to see if
this will help with the issue.

Change-Id: I2d5137a87ed65c6abef38a49264346f917a1c85a
2023-04-05 11:00:26 +02:00
Tatiana Ovchinnikova b847012085 Mark "Source" tab in the launch instance form as required
The boot source must be specified to launch instance. This patch adds
a validation for the allocated sources table length and marks "Source"
tab with asterisk.

Closes-Bug: #1920004

Change-Id: Ifec3bca94845b5d19c37b4c2844f1a983ad9365b
2022-02-03 16:55:12 +00: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
pengyuesheng a06e7de97a Correct error message for volume size in Launch Instance
In the "Source" tab of the "Launch Instance" form,
when some image is selected as a boot source and
"Create New Volume" is selected, if a decimal number
such as 1.1 is provided in the volume size, the error message
still says "The volume size must be at least 1 GB" even if
the specified value is larger than min_disk.
This is incorrect. This commit corrects the message
for this case.

Change-Id: I36d37407eb208586fb7bacdb941b445c5ea33bcb
Closes-Bug: #1812959
2019-02-09 16:13:22 +09:00
Tobias Urdin 132243183a Add hide_create_volume to LAUNCH_INSTANCE_DEFAULTS
This adds a new option named hide_create_volume to the
LAUNCH_INSTANCE_DEFAULTS dict.

With this option you can select if you want to hide
the "Create New Volume" option to your users and have
it rely on the default value that is provide with the
create_volume option.

This is currently the only way to make sure the end-users
utilizing the web interface is forced to spawn a volume-backed
instance until Nova supports Cinder as a images backend.

Change-Id: I3a78593ada0d39cc7f1e30fb0a6300887b7b1a00
2018-09-29 00:48:12 +02:00
Zuul 64cc85967f Merge "Fix warning message not showing on launch instance modal" 2017-12-17 13:36:34 +00:00
Akihiro Motoki 7b82f7baa3 Fix gettext warning "Empty msgid"
Empty string tag should not be marked as 'translate'.

TrivialFix

Change-Id: I5d584068c11d4352421e3024195b2f1f978ec6f4
2017-10-06 02:15:57 +00:00
Ying Zuo 9c3d01a77c Fix warning message not showing on launch instance modal
The warning message should be shown when hovering over the
warning icon on launch instance modal.

Updated the name and attribute of the popover directive.

Change-Id: Ida5b7aad33c6024d8bdd1ea6d1cb2b35b9fd6ba6
Closes-bug: #1713591
2017-09-03 21:27:57 -07:00
Marek Lycka 4c5231c258 Restores sorting in the launch dialog source page
Replaces the (non-working) sorting attributes with parametrized callbacks.

Change-Id: I91ffee71a982e1f20e80e6f41d75e8a9268f7a44
Closes-Bug:1640901
2017-08-24 16:39:23 +02:00
jing.liuqing fcd30d95e8 [TrivialFix] Make translatable string more clear
Change-Id: I8783981e219f47456986210fe4a31da3b51b6be6
2017-06-15 23:38:28 +08:00
Rob Cresswell c89633c9b0 Update for ui bootstrap changes
UI Bootstrap decided to prefix all of their services/functions, so we
need to add these prefixes for the code to continue to function.

This patch primarily addresses functionality - some styling is broken
even with this patch, but those breakages can be fixed once this
patch lands.

Change-Id: Ia6f593e27f81b2b00b6376426cc469a776c4add7
Depends-On: I7d8ebd4e9018332c1974672a0b99080c152ce6c3
2016-12-15 17:00:22 +00:00
eric 8b4457645d Change icons in launch instance ng transfer
The icons in the transfer table used + /- icons to move
items up and down.   The arrow buttons are more intuitive / appropriate.

Change-Id: I9d9200b87dd7c7d916d50100137359063097ee79
Closes-Bug: #1642406
2016-11-18 22:03:10 +00:00
Akihiro Motoki 18c90b4887 Launch Instance: Creating new volume for image snapshot
"Create new volume" option is supported when image snapshot
is chosen as a boot source in Nova API. It is worth supporting
this option in Horizon.

Change-Id: I4f7fc6f850d9830557fca833ee9abea1f5b9f0bf
Closes-Bug: #1627416
Co-Authored-By: Kenji-i<ken-ishii@sx.jp.nec.com>
2016-11-02 08:44:56 +00:00
Akihiro Motoki 49c942d9cb Add volume snapshot to boot source description
Also sorts boot source options in the order of the dropdown menu
of "Select Boot Source".

Change-Id: Icc9796123afe84af9dc1e8fc27cb56dd83a7a5d3
Closes-Bug: #1626302
2016-09-25 01:31:33 +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
Matt Borland 180bcf2374 Correcting detail-row logic to not disrupt styling
The detail-rows on source and flavor transfer tables get styling confused
when items are selected because their detail-row elements remain and thus
confuse the alternate styling.  This patch fixes both of those tables
to exclude the detail-row when the primary row is also excluded.

Test this by (before the patch) selecting, say, the first option from the
available and see how the styling screws up on the remaining ones.  Then
apply the patch and see how everything looks beautiful.

Change-Id: Ia19fd4b47ea08c28dfb95c369b6b3f7271420f04
Closes-Bug: 1582790
2016-06-01 02:16:03 +00:00
Jenkins b2d641e81f Merge "Further Theming fixes for Launch Instances" 2016-05-06 09:41:12 +00:00
Kenji Ishii df1cbabfd1 Adjust width so as not to be hidden by "help element”
At the moment, a part of description written on the top of each step
in ng-launch instance modal is hidden by help-element.
This patch will fix it by adjusting a description width.

Change-Id: Idab7536e046ec4b49a70c9ae96f45a3f4c36b029
Closes-bug: #1562495
Closes-bug: #1557817
2016-05-05 21:00:59 +00:00
Rob Cresswell fd569dafaa Further Theming fixes for Launch Instances
- Use actions_column, instead of action-col, for consistency
- Use themable checkboxes instead of regular ones
- Remove redundant SCSS
- Remove some more *-sm classes
- Fix colspans
- Remove usage of ng-style

Change-Id: I1438dbb659001c1c468d8429dbea35d51e64dd7e
Closes-Bug: 1568839
2016-04-30 13:16:54 -05: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 e86b1e4c06 Move magic-search bar out of the smart-table structure
This patch allows the magic-search bar to be moved out of the
smart-table table structure.  This was causing trouble for styling but
also didn't allow for much flexibility in layout.

Closes-Bug: 1558772

Change-Id: I461b233e56ddf404d75c094c54473e43ee50e7c8
2016-04-22 20:57:12 +00:00
Rob Cresswell be9023d86e Fix theming in angular launch instance
This patch makes the new angular Launch Instance workflow mostly
themeable. Most of the existing CSS has been deleted, and this now
follows bootstraps markup. This is not intended to solve all edge cases
given the size of the work, but is a big step in the right direction.

Changes:
- Use stacked nav tabs for navigation. Move base nav tabs toward
  bootstrap default. Style primary side nav as before.
- Use bootstraps form markup for modal
- Use bootstraps form markup for form fields and their errors
- Make pie charts and tables inherit any missing theme variables. A more
  thorough pass will be done on this next release cycle.

Closes-Bug: 1538491
Change-Id: Ic20b7f4341a2853ca334824c6a811125b04e88cc
2016-03-02 20:08:49 -07:00
Rob Cresswell b69ff722c1 Match python/ angular table styles
This patch unifies the Python and Angular table styles (there is no
reason for them to look drastically different).

- Clean up table header in _data_table.html
- Remove page_header styling for default theme, as it causes the angular
  panels to shift downwards on the page
- Removed styling workarounds from default themes
- Removed several chunks of angular specific scss code, including the
  'modern' class
- Removed the "Actions" header in python tables, to match Angular
- Removed duplicate 'no items to display' info in footer, when table is
  empty.
- Also fixes the Containers header, which was different to all the
  others

Closes-Bug: 1517081
Co-Authored-By: Diana Whitten <hurgleburgler@gmail.com>
Change-Id: Id71aab6e8bbbcd1f7fa4d5575156e4d3c6aa990d
2016-03-01 10:36:16 +00: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
Lucas Palm ea05246724 Made error fields in ng launch instance workflow more visible
During UX review, feedback was given that fields with errors in the new
angular launch instance workflow should have a more obvious line/glow
around them.  Currently, the "has-warning" class is being used for
fields that have errors, which gives the fields a light yellow glow
around them upon invalid input.  This change simply switches the class
applied to these fields to the "has-error" class.  This class gives the
fields a darker red glow that is easier to see and tell that an invalid
input has been entered.

Change-Id: I5a28d4429a723e68d93509a178e32fe5225bc95a
Closes-Bug: #1445729
2015-10-13 16:54:53 +00:00
Jenkins d0743c7317 Merge "hz-if prefix change to promise directives" 2015-08-30 02:54:50 +00:00
Travis Tripp e070d13348 hz-if prefix change to promise directives
Based on the following patch discussion and some IRC discussion,
we decided that the directives being refactored as part of this
bug could use a better naming pattern.

Basically hz-if-<target>, similar to ng-if.

See:

https://review.openstack.org/#/c/212125/7/openstack_dashboard/
static/app/core/cloud-services/hz-service-enabled.directive.js

Change-Id: I4d6ec6bc0a1d69f9c77659c98c875a50b81d30e5
Partial-Bug: #1450150
2015-08-27 16:38:58 -06:00
Jenkins 8ede6555af Merge "Cleaning up the Transfer Table" 2015-08-27 12:52:57 +00:00
Jenkins d91ae7109a Merge "Move i18n to HTML for launch-instance source step" 2015-08-27 09:23:52 +00: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
Thai Tran b68758740a Cleaning up the Transfer Table
This patch cleaned the transfer-table code and moved the tooltip logic out.
This will make it easier to later add the cloning feature in the bp below.

Change-Id: I6d4cb292a4b86abbf453843ba8b96c3b4a6cfa24
Partially-Implements: blueprint transfer-table-clone-feature
2015-08-21 12:57:32 -07:00
Travis Tripp 9eb471c595 Refactor angular cloud services utilities
A nova-extensions and settings-service services and directives
were implemented at the very end of Kilo.

The directive implementation required a dependency tree that
should have to be maintained.  This removes that dependency
tree. It also greatly improves the ability to customize
the directives, while improving readability, by using the
angular.extend way of creating directives from a template.

Ultimately, this leads to much better decoupling of the
functionality which makes it easier for future plugins
and deployers to write their own directives with similar
functionality.

This is the recommended way by angular docs.
See the bottom of this page for more on extending directives:

  https://github.com/angular/angular.js/wiki/Understanding-Directives

This change also enables the directive to be attribute based,
rather than element based, making it more flexible in usage.

In addition, this takes advantage of compilation that improves
performance by ensuring that non-enabled features are not
compiled, meaning any nested directives will not be processed.

To manually test this with Launch Instance NG:

hz-settings-toggle:
  In local_settings.py the following between True and False
     'can_set_mount_point': True,

  On the first step of Launch Instance, notice that when you select
  Create New Volume that when the above is True, that you'll have
  and input box for setting the device name.  When it is false,
  you won't have the input box.

hz-nova-extensions:
  In openstack_dashboard/dashboards/project/static/dashboard/
     project/workflow/launch-instance/configuration/configuration.html

  Find <div hz-nova-extensions='["ConfigDrive"]'>
  Change to <div hz-nova-extensions='["NON_EXISTENT_EXTENSION"]'>

  Launch the Launch Instance NG. Go to the Configuration step.
  Note that when the extension is ConfigDrive, you'll see the
  checkbox for config drive.  When you set NON_EXISTENT_EXTENSION,
  the checkbox won't exist.

Change-Id: I56b52288d18a2558d2a60878c88714d2672bf783
Partial-Bug: #1450150
Co-Authored-By: Rajat Vig <rajatv@thoughtworks.com>
2015-08-20 08:04:05 -06: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