Commit Graph

25 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
Akihiro Motoki 70b9d258bd Drop Flavor Edit completely
After dropping the flavor edit feature was dropped in Rocky-1,
we still allow to edit flavor in the "Modify Access" form.
This commit drops the remaining flavor edit forms.

Duplicated API calls (flavor_get and flavor_access_list)
in the UpdateFlavorAccess form are refactored into one API
call per request.

Change-Id: I009fe285d2263fd9b9f07ed1c3f4c96df261b535
Closes-Bug: #1766053
2018-04-24 01:18:55 +09: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
Rob Cresswell 560f23a1c9 Add default common template to python table views
Many of the Python table views are using identical (or nearly identical)
table templates. This patch adds a common template and makes it the
default for a DataTableView, which allows us to remove many similar
templates and redundant lines of code.

Change-Id: I1e4e15e695ee1f21f4d44f141a854e30f1e567a1
Closes-Bug: 1653986
2017-01-05 08:59:35 +00:00
Thai Tran 8c7c33381c Consolidated common angular view
We have views that references angular.html all over the dashboard.
This patch creates a single view for angular views and consolidate others.

Change-Id: I31bd7eb1ce9eac5ec4e13531679b12fc5ebbe60b
2016-11-17 12:07:16 -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
liyingjun 30a75642c4 Pagination for flavor - prev link
More link for flavors table is already supported, this patch adds
support to prev link for flavors table.

Implement blueprint: pagination-for-flavor

Change-Id: I3111e929c59077a0e52bf8f84a512ee18eee5f12
2015-12-25 00:14:03 +08:00
liyingjun 90d0f4e830 Pagination for flavor - more link
Nova and novaclient already support pagination for flavor, it would be
nice to have this in horizon. Adding pagination for flavors table.

Implement blueprint: pagination-for-flavor

Change-Id: Icff51302158263f2101a78519f509415514cd880
2015-12-16 19:43:14 +08: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
Sam Betts 0b93ec500e Reduce page title duplication in Admin Flavors
Patch https://review.openstack.org/#/c/142802/15 adds a method of
reducing duplication of page title logic, this patch applies that change
to the admin flavors view.

Change-Id: I2a75ec719b4e126775cd763caeee0266b87944a5
Partial-Bug: 1413749
2015-02-11 16:32:40 +00:00
Bartosz Fic df25035fd1 Flavors metadata cleanup
Fix review comments on https://review.openstack.org/#/c/112874/
in admin/flavors/views.py regarding exception handling. Also
adding unit test to test negative scenario after changes.

Closes-Bug: 1369678
Co-Authored-By: Bartosz Fic <bartosz.fic@intel.com>
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Change-Id: I5ea1216a22560cc0e8a5ba57be548b54674db689
2014-09-18 12:15:26 +02: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
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
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
Sascha Peilicke 89efbaaffd Use "flavor details" rather than "flavor data"
Be consistent with views using either "details" or "information".

Change-Id: I7d69ffede8934f3130bb3fcd740b9ae8e8d5d4a6
2013-10-09 15:44:02 +02: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
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
Kieran Spear 242c8df495 Enable H201: do not write "except:"
Fixes all occurrences of this. We have a custom exception handler
in Horizon anyway that only catches ClientException in most of these
cases, but this commit lets us gate on the other cases.

Change-Id: Iea3dc13817f3e5b775b2024424bf3a906da5584b
Closes-Bug: #1211657
2013-08-13 17:21:32 +10:00
Tatiana Mazur 3087c3486b Enable H304 check
This patch replaces relative imports with full paths and
makes H304 test enabled.

Fixes bug 1188535

Change-Id: I47254cf9a790727102f7993d0fd107da514983df
2013-07-16 18:49:56 +04:00
Matthias Runge cea720e793 Sort imports alphabetically
This patch also re-organizes imports to import one per line.

Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
2013-06-14 12:05:55 +02: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
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