Commit Graph

60 Commits

Author SHA1 Message Date
Akihiro Motoki eac3e7032a Drop Heat related code from horizon
Orchestration tab in the admin info panel needs a discussion.
It seems not to be covered by heat-dashboard yet.

blueprint heat-dashboard-split-out

Change-Id: I56e6edb1f2ac72e2f42d0e9f3291308e67f24cad
2017-12-05 07:38:55 +00:00
Gábor Antal 34a3aa0ba8 Handle log message interpolation by the logger
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.

[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages
Change-Id: I51f50935f1eeffe4960562d6309dfdf05814e595
Closes-Bug: #1596829
2017-03-31 20:59:16 +09:00
Jenkins e3cd250a81 Merge "hacking: noqa cleanup in openstack_dashboard" 2017-03-27 05:11:18 +00:00
Akihiro Motoki baa4ca8dce hacking: noqa cleanup in openstack_dashboard
attribute-level imports are not checked by hacking module now.
most noqa is used to disable warnings on attribute-level imports.
This commit drops noqa for this purpose.

After this, there are only 3 noqa under openstack_dashboard/ :)

Change-Id: I4a449802f5dbd6e44e4b8b5c378a555d47d9a99f
2017-03-17 19:38:47 +00:00
Kenji Ishii 00173dc3c8 Use ThemableSelectWidget for themable
Some places are not using ThemableSelectWidget, so
these select ui is not themable. This patch fix it.

Change-Id: I303a9cf8c6f8f651edf68973a2f5e16a8b04b26d
Closes-bug: #1669696
2017-03-14 12:47:56 +00:00
Radomir Dopieralski 39e2bb784c Use "Default", "Value" and "DefaultValue" for Heat parameters
It seems there has been changes in the Heat API, and it no longer
returns the default value for a parameter in the "Default" key, it
has been instead renamed to "DefaultValue" and later to "Value".
This patch makes it use all those key names, whichever exists.

Change-Id: Ia86d8d79fcd48974ffe3fecf21a7153bf2ba6a9a
2017-02-09 12:01:07 +01:00
Cady_Chen 51fe944449 Replace six.iteritems(iter) with iter.items()
As mentioned in [1], we should avoid using six.iteritems(iter) to
achieve iterators. We can use iter.items() instead, as it will
return iterators in PY3 as well.

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Change-Id: Ieadd5fa69b3f6058c0641a5b96ef3e8e1e3f6cc2
2016-12-14 11:13:20 +08:00
zhurong 2c56563580 Remove the lowercase case boolean type in heat param_type
heat-api had already return the boolean type using 'Boolean' in this commit:
https://review.openstack.org/#/c/116762/ , So remove the lowercase case.

Change-Id: If2fd981ffb854699301b77c6b0bc318a90c178dc
2016-09-11 21:51:00 +08:00
Jenkins 84f9c75b80 Merge "Pass environment data to update stack action" 2016-04-10 16:16:37 +00:00
Rob Cresswell fd92d8ec59 Fix remaining Django 1.9 test failures
This patch gets Horizon to a passing state in the Django 1.9 tests

Co-Authored-By: Itxaka <iserrano@redhat.com>
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Change-Id: Icbc1a3c039de658faa9fba4a2cdd5027345fe94d
Partially-Implements: blueprint drop-dj17
2016-04-09 11:13:16 +00:00
Ying Zuo f65ff0fe91 Pass environment data to update stack action
Change-Id: I7df7f1664ab067b287cffab4187c16a10ad4abba
Closes-bug: #1564613
2016-04-04 15:53:09 +00:00
LIU Yulong d3dd5e0ff0 Make no response notification(msg) level to INFO
Some API calls just sent but the results were uncertain,
Horizon should notify the user that your request is
just accepted, not successfully.
So this patch change some form message level to INFO,
and some message expression.

Change-Id: I241cd9cf3ad6b2bd747e3ea1c6040a140ba77b56
Closes-Bug: #1326301
Closes-Bug: #1286418
2016-03-29 21:12:31 +08:00
Jenkins 5bc8b72008 Merge "Fixes heat templates hidden parameters are not loading problem" 2016-02-24 21:31:35 +00:00
Jenkins f5057aa30b Merge "Use new log style when LOG.error" 2016-01-05 09:04:45 +00:00
LiuNanke 362976dde6 Use new log style when LOG.error
Use new log style replace the old Logger.exception()
in according to the link:
http://docs.openstack.org/developer/oslo.log/usage.html
Closes-Bug: #1529534

Change-Id: I5aa58bd6fa666c84dc200ecb44ba595f970f0613
2015-12-30 15:20:22 +00:00
Tatiana Ovchinnikova 36a98817f5 Make it possible to pick False for default stack parameter value
While creating Heat stack user has to set all required stack parameters.
So if there is no default value for boolean type parameter, user has to
choose between True or False. However the boolean field is marked as
"required" and doesn't accept False value. This patch set removes
requirement from this field and allows user to pick False for boolean
parameter.

Change-Id: Ie9495a8c83f33d6634931888b31336e5a1b52130
Closes-Bug: #1526698
2015-12-28 12:38:21 +03:00
dixiaoli d1c3b4787b Add handle get_file when launch stack from horizon
when get_file is contained in template, the stack create/update/preview
will fail due to No content found in the "files" section.
So added handle get_file code.

Change-Id: I6f125f9e5f3f53f630ab0d4f3f00631e6850e905
Closes-Bug: #1512564
2015-12-17 23:11:07 -06:00
lin-hua-cheng ddb94e0d52 Fixes heat templates hidden parameters are not loading problem
This patch allows the initial value to be filled on the form.

Change-Id: I3070c63ddca7b969eaca6a519e0912d973fe46ba
Closes-bug: #1414830
2015-12-07 10:23:45 -08:00
Jenkins 7a791878c2 Merge "Port dashboard stack tests to Python 3" 2015-11-11 04:30:03 +00:00
Victor Stinner 68764f741f Port dashboard stack tests to Python 3
* On Python 3, the pretty JSON output doesn't add space before newline.
* CreateStackForm: don't compare str to int, it raises a TypeError on
  Python 3. Instead, use MinLength already converted to int.
* tox.ini: enable all stacks on Python 3.

Partial-Implements: blueprint porting-python3
Change-Id: I20cd9e83720cc3974973bec5471864f0ffc00716
2015-11-09 10:49:03 +01:00
nikunj2512 2465843690 Adds config to disable the password in stack
Currently a password is needed when doing a stack creation using
Horizon. This patch adds a configurable setting in local_settings.py
file, so that it can be disabled from the stack creation form.

Change-Id: I82783b73940e39d961ac70a5ce86abdaca02eba7
Closes-bug: #1290344
Co-Authored-By: Richard Jones <r1chardj0n3s@gmail.com>
Co-Authored-By: Jesse Keating <jlk@bluebox.net>
2015-11-05 16:26:59 -08:00
Victor Stinner 4057ff2569 py3: Replace unicode with six.text_type
Initial patch generated by:

    sixer.py unicode horizon openstack_dashboard/ tools/

Partial-Implements: blueprint porting-python3
Change-Id: I8bdec74fbe32a6ff0e65f2f0810a0c698a3b9637
2015-08-27 01:26:02 +02:00
lin-hua-cheng 28d8f49786 Escape the description param from heat template
The heat template allows user to define custom parameters,
the fields are then converted to input fields. The description
param maps to the help_text attribute of the field.

Since the value comes from the user, the value must be escaped
before rendering.

Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>
Change-Id: I79d540a8363b2507c4bccdc0cc38e283962919d2
Closes-bug: #1453074
2015-06-09 17:43:34 +00:00
Tatiana Ovchinnikova eeba3b4b57 [Heat] Fix default values displaying for "Launch Stack"
This patch set fixes default values displaying for JSON parameters
to make it possible to use them without any changes.

Closes-Bug: #1438138

Change-Id: Ib925dc39320f7cab240eed3ccbcf1fa574bc5507
2015-03-30 14:06:23 +03:00
Tatiana Ovchinnikova cab3912b69 Add "Preview Stack" action to Stacks table
This patch set adds "Preview Stack" button to Stacks table
to provide user with a possibility to preview stack without
creating it, as it is already implemented in CLI.

Partially implements blueprint: heat-ui-improvement

Change-Id: Idf92deb57f8213a403f102db467828087d91e79a
2015-03-13 15:35:47 +03:00
George Peristerakis 221739e1f0 Generate a drop down field for custom heat parameters
If the heat template parameter has a custom constraint of
'nova.flavor', 'nova.keypair', 'glance.image' or 'neutron.network',
the form will generate a drop down field with a list of all
possible options the current user has access to.

Change-Id: I17f99eca364f1123a950cf712225ce751728239e
blueprint: heat-template-choices
Co-Authored-By: Cédric Soulas <cedric.soulas@cloudwatt.com>
2015-02-27 15:08:05 -05:00
Jenkins f29a176932 Merge "Make params order fixed in stack forms" 2015-02-05 17:48:23 +00:00
lin-hua-cheng 0cde6aa055 Move to hacking 0.10
Release notes:
http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0

Per the release notes, H307, H803 and H904 has been removed.

Fix code issues with H238 and W292.

Change-Id: I747ebb64db5825bc70f1ae19c1c1f5ca2089c06d
2015-02-04 20:27:07 -08:00
Wu Wenxiang 600c3371a2 Make params order fixed in stack forms
Horizon input fields may be swapped when launching stack instances
with some errors. The patch make params order fixed by simply sort
them.

Change-Id: Ied3e681cfa76a52bde824ddc91ff3c1851b3cac3
Closes-Bug: #1417515
2015-02-04 23:39:40 +08:00
lin-hua-cheng 0e95eb0441 Switch from oslo.utils to oslo_utils
oslo_utils moved out of the oslo namespace.

Partially Implements: blueprint drop-namespace-packages

Change-Id: I3c38426142de535b5474676b1214ea72b231ce76
2015-01-18 14:23:32 -08:00
Akihiro Motoki 2a9349bd67 Fix E128 errors in openstack_dashboard/dashboards/project/
E128 continuation line under-indented for visual indent

Partial-Bug: #1375929
Change-Id: I6bc8db7dab6fc2c3aad7fa54b6e07643b595f230
2014-10-16 16:53:52 +09:00
Jenkins 42c4a05fe0 Merge "Use strutils from oslo.utils" 2014-10-13 16:58:26 +00:00
lin-hua-cheng bef92d6dd0 Use strutils from oslo.utils
Rather than sync'ing with oslo-incubator, let's use the library
oslo.utils instead. Removing the local copy of strutils.

With removal of strutils in local, gettextutils is now safe to
remove as well.

Change-Id: I0d98d41b03d105e34933efcdb5c60020141e13fb
Partially-Implements: blueprint improve-oslo-usage
2014-10-11 22:08:59 +00:00
Miguel Grinberg ad9c303504 display boolean and json parameters in stack launch form
Horizon fails to render boolean and json parameters properly in the
stack launch form, instead of rendering these fields it renders a
duplicate of the previous field.

Change-Id: Idb2fcf4b52578951fb578138a80529eefc140d1a
Closes-Bug: 1360495
2014-10-08 18:39:12 +00:00
Jenkins c41b672d9c Merge "render stack parameters in the correct order" 2014-10-08 03:13:33 +00:00
Akihiro Motoki 62a0ec2659 Use integer instead of string for form max_length
This is a follow-up patch of a comment
in https://review.openstack.org/#/c/119134/

Change-Id: I87f0a5698e5ccde251eb9cd9c1280291f5d746e0
2014-09-14 15:49:39 +09:00
Miguel Grinberg a8c0f89824 render stack parameters in the correct order
Parameters in a heat template are now rendered in the order specified
in the "ParameterGroups" section. If this section is not available then
they are rendered unordered.

Change-Id: I3367b42c4c3037666b705cebf9cf67ccf0ce4fce
Closes-Bug: 1364567
2014-09-10 00:44:56 +00:00
Jenkins 8a83578bcc Merge "Render hidden stack parameters with a password field" 2014-09-04 14:16:09 +00:00
Miguel Grinberg 612ab2bcea Render hidden stack parameters with a password field
In the launch stack form, any heat template parameters that are
of type string and marked as hidden are now rendered as a
password field.

Change-Id: Ie9b0a051a8815525c89de31b7ab98d8148166a55
Closes-Bug: 1362846
2014-09-02 22:43:02 +00:00
Ashish Chandra 80d05a5c3d Improve help messages on modals
Some general guidelines:
1. Removed contractions
2. Changed "Info" to "Information"
3. Removed the "From here you can..." at the beginning of messages.
4. Explained concepts to users instead of just reiterating the modal
title. Thanks Jeff Calcaterra!

Co-Authored-By: Cindy Lu <clu@us.ibm.com>
Closes-Bug: #1329984

Change-Id: I35af81953cafcbafc28c31b3ce305e8c5e21fe84
2014-08-27 16:12:18 -07:00
Radomir Dopieralski 0eca7449cc Fix Flake8 style warnings in openstack_dashboard/
Warnings H904, H307 and H405 are new or considerably changed, and will
be fixed in a separate patch.

Closes-bug: #1349820
Partial-bug: #1347472

Change-Id: I4fd28990dacf16f03a4eaa6074ef59c37f1a2c14
2014-07-30 14:13:24 +02:00
Tatiana Ovchinnikova 9621ea3a90 Cleanup for Horizon fields
Since 'True' is the default value for 'required',
additional assignments are not needed.

Change-Id: I11ae029949e6245af1cf8b0c83825a2ed384aec4
2014-07-25 12:07:23 +04:00
Jenkins 79a6d4dd10 Merge "replace dict.iteritems() with six.iteritems(dict)" 2014-06-20 02:25:29 +00:00
Jordan OMara ecdc73a339 Ensuring environment data is passed to heat template validate
- environment data was being passed to heat API on stack create,
   but not stack validate - meaning that templates that referenced
   environment files were not validating correctly

 - heat client does not support URLs for environment files - we will
   need to do this client side before POSTing back to horizon. future
   patch

Partial-Bug: #1322258

Change-Id: I40982b777abaec743ed6cbc527008522a619e817
2014-06-11 09:17:04 -04:00
Christian Berendt 6458dccb6f replace dict.iteritems() with six.iteritems(dict)
According to https://wiki.openstack.org/wiki/Python3 dict.iteritems()
should be replaced with six.iteritems(dict).

Change-Id: Ia2dcabbd071e1fcdf111ba83573785989a77aef0
2014-05-26 12:06:58 +02:00
He Yongli e790ac070e Remove extraneous vim configuration comments
Remove vim setting:
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4

at the top of source code files, except for files in
openstack/common.

Change-Id: I9a5c6b17c6ef7ecec601f4503dfc7b31fc72e90a
Close-bug: #1229324
2014-05-06 15:30:10 +08:00
Jenkins c63c16b448 Merge "Added the field label to the field arguments." 2014-04-29 01:12:17 +00:00
George Peristerakis 5338266283 Added the field label to the field arguments.
Initially, the field key was used as the label. In the return dictionary
has the label, so I use that value and fall back to the key if it does
not exist.

Change-Id: I39b4a7f25d8947276d3bdc3e12e728f84696a203
Co-Authored-By: Yves-Gwenaël Bourhis <yves-gwenael.bourhis@cloudwatt.com>
2014-04-27 16:42:47 -04:00
Steve Baker 2c7db077b2 Fix formatting of heat exceptions
Heat now consistently formats error messages in returned HTTP json
and heatclient HTTPException makes every attempt to capture these
messages.

This means that the safest way to display an error or validation
message from Heat is to rely on the existing behaviour of
Horizon's exceptions.handle.

Change-Id: I80cdb67df87cb5192f220bc78a156d6e4113112f
Closes-Bug: #1241395
2014-04-14 10:46:26 +12:00
Jordan OMara 11eebb8aa3 Additional optional Environment data to heat template selection
Change-Id: I4e0d32e7e032d5c0ec93595c14134e780fa21d66
Implements: blueprint heat-environment-file
2014-03-06 17:25:35 -05:00