Commit Graph

34 Commits

Author SHA1 Message Date
Akihiro Motoki cd7c1b5110 Address RemovedInDjango40Warning (2)
django.utils.translation.ugettext(), ugettext_lazy(), ugettext_noop(),
ungettext(), and ungettext_lazy() are deprecated in favor of the
functions that they’re aliases for: django.utils.translation.gettext(),
gettext_lazy(), gettext_noop(), ngettext(), and ngettext_lazy().

https://docs.djangoproject.com/en/4.0/releases/3.0/#id3

Change-Id: I77878f84e9d10cf6a136dada81eabf4e18676250
2022-02-04 16:22:07 +09:00
YuehuiLei 87f498bee5 Drop the usage of unicode prefix from unicode strings
All strings are considered as unicode strings in python 3,
so we no longer need "u" prefix (u'...').

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I796d2fcdca066475bbf29d25cbf2aa67b2b2178b
2021-02-12 13:05:27 -06:00
Akihiro Motoki e5d09edc20 Use python3-style super()
In python3, super() does not always require a class and self reference.
In other words, super() is enough for most cases.
This is much simpler and it is time to switch it to the newer style.

pylint provides a check for this.
Let's enable 'super-with-arguments' check.

NOTE: _prepare_mappings() method of FormRegion in
openstack_dashboard/test/integration_tests/regions/forms.py is refactored.
super() (without explicit class and self referece) does not work when
a subclass method calls a same method in a parent class multiple times.
It looks better to prepare a separate method to provide a common logic.

Change-Id: Id9512a14be9f20dbd5ebd63d446570c7b7c825ff
2020-10-15 14:37:20 +09:00
Tin Lam 140c22741e Add policy_rules to flavors dashboard
This patch set adds in os_compute_api:os-flavor-manage policies in the
appropriate dashboards.

Change-Id: I3157aeaa916837b4f6258009dc643ab225e6ee17
Signed-off-by: Tin Lam <tin@irrational.io>
2019-12-02 23:45:07 +00:00
Ivan Kolodyazhny 377422b33e Delete the deprecated Edit Flavor feature
Historically, Horizon has provided the ability to edit Flavors by
deleting and creating a new one with the same information. This is not
supported in the Nova API and causes unexpected issues and breakages.

Change-Id: I796259c66e01be088a50ab6ba63f515de9590c9b
Closes-Bug: #1751354
2018-04-13 15:49:54 +03:00
Akihiro Motoki e477eafa45 django2: Replace django.core.urlresolves with django.urls
(In Django 2.0) The django.core.urlresolvers module is removed
in favor of its new location, django.urls.
It was depreacted in Django 1.10:
https://docs.djangoproject.com/en/2.0/releases/1.10/#id3

blueprint django2-support
Change-Id: I46ab5c325491274b8eaffbf848e5d80f83c2fd26
2018-02-17 01:36:48 +09:00
Zuul fc89dc7394 Merge "Disable flavor ModifyAccess action while the flavor is public" 2018-01-06 16:26:14 +00:00
jing.liuqing 337ef4daab Disable flavor ModifyAccess action while the flavor is public
see more info: https://developer.openstack.org/api-ref/compute/#flavors-access-flavors-os-flavor-access

Closes-bug: #1739533

Change-Id: I31245edc5931c4e5f4deb88ad66c5f971fa55451
2017-12-21 05:25:06 +00:00
Rob Cresswell 9a98a5fd98 Disable Edit Flavour by default
Closes-bug: 1709056
Change-Id: Ifa4e9cdfbbac1a1d4bf28679b24a17b13f637ddd
2017-08-07 12:06:33 +00:00
Rob Cresswell 07d33cf462 Prevent long names breaking table layouts
Adds a word-break class that can be added to tables to prevent large
column values breaking the table shape.

Change-Id: Icca10d9c29254d176dc7f8b7c039bc19c3f52c72
Related-Bug: 1565724
Closes-Bug: 1584785
2016-08-19 09:21:33 +01:00
chen.qiaomin@99cloud.net fc02a0207d Modify "Edit Flavor" action
Reproduce:
1 Open Admin/Flavors
2 Click "Edit Flavor" in the table list actions

Expected result:
Open "Flavor Information" tab.

Actual result:
Open "Flavor Access" tab.

Change-Id: I45a4097413e8e5154350459d15e2f45b61f811a8
Closes-Bug: #1600062
2016-07-08 00:25:30 +00:00
Itxaka 90b3276e60 Add rxtx factor to flavors.
Adds rxtx factor to create and update flavor.
Adds rxtx factor column to flavor table.
Update tests.

Change-Id: I0b6c0a8faff5ae32339c41ec95258b5ac3da5148
Closes-Bug: 1481425
2016-02-12 19:20:42 +01:00
Szymon Wroblewski 3c2ce866df Angularize metadata update modals
Update table action to use new angular modal dialog.
Remove "Metadata Update" views.

Implemenents: blueprint angularize-metadata-update-modals
Change-Id: I7b3d2eab8c0830dc44a45901981eb0e71009c038
2015-08-25 13:29:03 +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
tintmy e31269f5e9 Change mbformat to mb_float_format
In the some page use mbformat to filter RAM,(Usage Summary,
instances details,database,image detail, test file), We need
change to mb_float_format.

Change-Id: Ib2d98d17949ba1b453977cb666b2e10cdf07d90b
Closes-bug:#1319230
2015-01-20 08:32:56 +08:00
mariamj@us.ibm.com 6e8992a11f Rename Extra Specs with Metadata in Flavors table
The 'Extra Specs' column heading in the Flavors table has been renamed
to 'Metadata' for consistency (for example, 'Update Metadata' form)

Closes-Bug: #1371251

Change-Id: Ibeb81167553b42f299613359dad49a9bff05fc48
2014-09-24 16:42:58 +00:00
Doug Fish d40f9a91f7 Remove concatenation from Delete Flavors
Fix concatenation and pluralization problems with the Delete
Flavors action

Change-Id: I15f0b6cf0e12112687dd70fae48e9074202c83be
partial-bug: 1307476
2014-09-16 10:40:25 -05:00
Michal Dulko d5fea888a8 Enable flavors metadata update
Nova currently expose an api to let the users update
the flavors metadata so horizon should expose
this functionality. At the same time Glance is exposing
a metadata dictionary in Juno, where users can register
the key/value pairs that describe their cloud deployment.
This patch uses the glance metadata api to expose the available
metadata and the nova api to update the aggregates metadata.

Implements: blueprint glaance-metadata-flavors

Co-Authored-By: Santiago Baldassin <santiago.b.baldassin@intel.com>
Co-Authored-By: Pawel Skowron <pawel.skowron@intel.com>
Co-Authored-By: Pawel Koniszewski <pawel.koniszewski@intel.com>
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>

DocImpact:
    New UI. FLAVOR_EXTRA_KEYS setting deprecated.

Change-Id: Ica9d3d06314a4d5afa77f644bd1f8900a1c328f7
2014-09-15 16:48:06 +02: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
Jiri Tomasek 92146772b6 Update Twitter Bootstrap to version 3
Updated to bootstrap 3.2.0
back to v3.1.1
fix base-line-height variable
Revamped grid system
Replaced help-inline with help-block
Change .control-group to .form-group
Add column widths to horizontal form labels and .controls, remove .controls class
Datepicker form fix
Add btn-default to btn elements with no other color
Topbar switcher fix
Rename button sizes
Replace alert-error with alert-danger
Removed alert-block
Alerts fixing
Updated LinkAction and Action table actions to define icon, replaced btn-default icon with glyphicon
Replaced icons with glyphicons, removed btn-icon styling from horizon.scss
change Button Icons text in customizing docs
Fixed table header
Fix page_header h2 margin
Nav accordion fix
Tables fix
Modal fixes
added form-control class to input and selects
Forms fixes
Workflow modal fix
Fix quota bar
updated customizing docs
removed unused styling from horizon.scss
make datepicker form inline
fix table filter styling
added btn-danger to terminate instances button
fixed loading spinner
form fields and validations
Created bootstrap_form_field filter and template to render bootstrap forms properly
Style up the datepicker
Fixed failing test cases

Implements: blueprint bootstrap-update

Change-Id: Ic826849be1af7fc6bf06f97dd7a60fc54b862148
2014-07-28 16:13:21 +02:00
Jenkins 5eaa984b61 Merge "Add a column to show if Extra Specs are defined on a Flavor" 2014-05-24 17:28:43 +00:00
Nicolas Simonds a75df6f267 Add a column to show if Extra Specs are defined on a Flavor
UX improvement: Adds a column to the Flavors DataTable to show if
any Extra Specs have been defined for the flavor.  Also contains a
LinkAction to open the Extra Specs view for the flavor

BP: extra-specs-as-column
Change-Id: I044b86c366c6687f4b0e9870371ef63a2066083d
2014-05-21 13:12:56 -07: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
Zhenguo Niu adf0613dab Make values display in Flavor Table consistent
Add 'GB' to Disk And Ephemeral Disk to make them
consistent with others.

Change-Id: If466f2a4b8a58aed05b8e77eca1e81b4e86137e9
Closes-Bug: #1270036
2014-01-20 06:25:53 +00:00
Radomir Dopieralski 028332da4a Remove #noqa from most common imports and add them to import_exceptions
We have a lot of import with #noqa that is there to ignore h302,
because it's traditional to import and use a name directly, instead
of a whole module. This hides other errors and gives people the
impression that it's actually fine to import non-modules, you just
have to slap #noqa on those lines.

I went through the code and identified about a dozen names that are
most commonly imported this way. I remove the #noqa tag from them,
and added them to the list in import_exceptions.

I also removed a few unused imports that were revealed in the process.

Change-Id: I27afb8e2b1d4759ec974ded9464d8f010312ee78
2014-01-07 12:26:35 +01:00
Paul Belanger da8c69afa6 Gate on H4xx docstrings for pep8
In an effort to help horizon more friendly to OpenStack hacking
guidelines, we now gate on H40* violations.

Change-Id: Id07294543660368d2f7f5ac363710176ab23b874
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
2013-11-23 12:51:07 -05:00
lawrancejing d33f294ba9 Remove unused LOG
In some files, we import logging and define
LOG, but we never used it later, so i remove
those unused LOG and make horizon code clean.

Fixed: bug #1231761

Change-Id: I1ebf0098c647e7522f5f1a93cfece7a52bdc05c1
2013-09-28 23:57:13 -07:00
daisy-ycguo 5bbc4d3803 Enable some table actions translatable
Also enables verbose_name "ID" in FlavorsTable translatable.

Closes-Bug: #1224360
Change-Id: Ia9a863db722639f9d0c925e833ab38c6500fa619
2013-09-16 01:14:50 +09:00
Yangyang Zheng 9f95409249 Define flavor for each project
Change CreateFlavor/EditFlavor forms to CreateFlavor/UpdateFlavor
workflows. Provide access flavor management in each project. Add
the filtering function in Flavors page.

Implements blueprint define-flavor-for-project

Change-Id: I723bbf250a46af8de58de06a907f6efc737778db
2013-09-01 22:14:23 +10:00
Tatiana Mazur 953d1b9793 Enable H302 check
This patch replaces some method imports with module imports and
makes H302 test enabled.

Fixes bug 1188531

Change-Id: Ibfbddeaa19cbbb244da58ffd5c918c41f03a0c65
2013-08-22 17:39:09 +04:00
Akihiro MOTOKI 12faaa5c30 Ensure to use api.<category>.<method>
In the current code both api.<method> and api.<category>.<method> are used.
Using api.<method> directly makes it difficult to identify which module
defined a method and forces developers to use unique method names among
projects. This commit removes api.<method> style method calls.

Change-Id: Iaefa1061f99b7865e02541df87c112a6b2868ec0
2013-01-22 20:37:12 +09:00
Christian Berendt 06e1d59a5c show swap disk in listing and forms in flavors syspanel
At the moment the swap disk entry of flavors is not listed in
the syspanel listing of flavors and it's not possible to create
a new flavor or edit an existing flavor with the swap size

Change-Id: I92195671024bb361fa5825cbdcea515850ddee31
2012-12-05 15:43:56 +01:00
Malini Bhandaru 82c19aee05 Flavor Extra Specs support.
Special thanks:

  * Preserves extra specs on flavor edit (Tihomir Trifonov)
  * Displays flavor name on extra specs pages (Vinay Bannai)
  * Extras specs table close (Don Dugger & Gabriel).
  * Final cleanup (Gabriel Hurley)

Change-Id: I6acb1176e5c0ca6987abc758fc45335870c55d57
2012-11-06 17:06:30 -05:00
Gabriel Hurley cb8e7c1f8f Splits OpenStack Dashboard bits from framework app code.
Moves everything OpenStack-specific (dashboards, apis, etc.)
into the openstack_dashboard project, achieving a much
cleaner separation between the project-specific code and
the generic Horizon framework code.

Change-Id: I7235b41d449b26c980668fc3eb4360b24508717b
2012-10-11 11:47:50 -07:00