Commit Graph

29 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 692778f8cf pylint: Address no-else-return warning
This pylint check 'no-else-return' might be debatable.
but as far as I checked it works in most cases.

Change-Id: Ie8574d4a529454c6e050fa62a7a17ea097d00240
2020-09-27 12:44:16 +09:00
manchandavishal d6217b3e63 Instances column is shortened so it fits properly
The 'Time since created' column name has been shortened to 'Age'
in project instances and admin instances meaning it fits properly
in table header cell and doesn't cause table header height to
increase.

Closes-Bug: #1614287

Change-Id: I94fc9eb260050e187445abd8236ac414b885b467
Co-Authored-By: Sam Wright <swright.wellington@gmail.com>
2018-12-18 10:01:56 +00: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
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
liaozd 296d48074d clean unused imports
Change-Id: I9db0bbe3d24fb04e647fcfca1a3a746df006f85c
2017-02-12 17:58:11 +08:00
Alex Monk 5ea8482ae4 Usage tables: Sort by disk properly
Change-Id: I05057ac399f6b4b0d8935a88684f7ed7099c367d
Closes-Bug: #1610173
2016-08-05 10:30:57 +00:00
tinytmy 58cbdb55ec Add help text for vcpu hours
In overview page, disk hours and ram hours has help text.
Also add help text for vcpu hours.

Change-Id: Ic44cf8753a0deebc30f7087e2e54bab6dfde5284
Closes-bug:#1417856
2015-02-14 13:10:06 +08: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
tinytmy 99ec0e70e7 Add ram-hours in overview page
In the admin and project overview page, there has cpu-hours,
disk-hours, but has no ram-hours. This patch add ram-hours for
overview page.

Change-Id: I4eaf7cd7639de570058bdb793a95045a0be5d224
Closes-bug:#1415775
2015-02-02 15:06:42 +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
Sam Betts e98f2429fa Remove duplicated headings from horizon tables
Many panels in horizon only contain a single table, in these cases the
tables often have the same name as the panel, leading to duplicated
headings, e.g. Instances (panel heading) then Instances (table
heading). This patch adds an attribute the table to hide or show the
title, since the majority of panels have this duplication this flag
is set to hide the heading by default allowing a developer to re-enable
it for specific cases.

Tabbed panels also often lead to duplicated titles between the panel
heading and the tabs themselves, that is not fixed, however how this
patch reduces the duplication in the case of Volumes (panel name),
Volumes (tab name) and Volumes (table name), by hiding the table
heading.

Change-Id: I65efa53cc881417288e5c5b29bfa7d539e97c7dd
Closes-Bug: 1379044
2014-11-13 15:31:08 +00:00
Cindy Lu 13f56fc1bc Clarify meaning of "Disk GB Hours" column
Admin > Overview Usage table has a column called "Disk GB Hours".
The meaning of this column is unclear.

Co-Authored-By: Thiago Paiva <thiagop@lsd.ufcg.edu.br>

Change-Id: I17e4a3ce60c66804e98a18c33261881ea10964b8
Closes-Bug: #1267362
2014-10-28 19:03:56 -07:00
Matthias Runge b5b09140b1 Change column uptime
Renamed misleading column uptime

Change-Id: Id72c10a7166943fcfef68c338a1412897ad9cc4b
Closes-Bug: #1156563
2014-10-01 14:00:31 +02:00
Cindy Lu a6cd12f24d Add missing Disk unit to Overview Usage
Added unit to the Summary table and the csv report

Change-Id: I91a0bdd13384098cd2e306413bfc103c99bbc418
Closes-Bug: #1346389
2014-08-04 15:59:58 -07: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 86bdac1f22 Merge "Same styling for "Limit Summary" and "Usage Summary"" 2014-01-12 04:05:13 +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
Babitha Donepudi 0d089c49c5 Same styling for "Limit Summary" and "Usage Summary"
"Usage Summary" as heading instead of "Select a month.."

Submit button styling is changed.

Change-Id: Ie19e8fd16a4db11a67267513cef82ad9e0c41c29
Closes-Bug: #1100830
2013-12-27 15:26:29 +05:30
Paul Belanger 74117eb8b6 Gate on H102 Apache 2.0 license header not found for pep8
Now all files are properly licensed per OpenStack Hacking.

Change-Id: I223d983018568357197b0d9cf5dde12c135c53c9
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
2013-11-19 13:55:04 -05:00
Georgi Demirchev 44cd16753c Sortable instances
New filter that appends a timestamp to the uptime localized string,
managed with tablesorter new parser on client side.

Change-Id: I999b04d3da93bc00003fed954382a0ac99b506a3
Closes-Bug: #1222286
2013-10-22 07:11:53 +03:00
Tatiana Mazur b4fc9b4bc9 Small "H302 check" cleanup
This patch set removes some commented out stuff that
has been unintentially left in "H302 check" patch set.
It also replaces a couple more method imports with
module imports.

Fixes bug 1215892

Change-Id: I35fd880154a4ea6d6d8d3b3615103c271aa4a005
2013-08-23 18:07:08 +04: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
Tihomir Trifonov 0c0153a037 Improvements in csv export for usage data
Added a csv writer using the 'csv' library to format
properly exported data - escaping, encoding etc.
Added a HttpResponse-based class to handle csv generation
Added translation for the CSV columns and template.

Fix bug #1158383

Renamed few occurencies of 'tenant' to 'project'.

Also added a new 'project' in nova_data.py, which required
some refactoring of few tests, that didn't consider the current project
for project-based calls.

Note: I've added a StreamingHttpResponse example,
which is introduced in Django 1.5+ and being advised in the ticket.
However, my opinion is that at the moment we don't need this - it is
too complicated for the current usage.

Change-Id: I18bd70a23b7b8389c7c0f96dbf8794fea5e1e75b
2013-06-21 14:00:37 +03: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
Kieran Spear ef26414b8d Revert "Improvements in csv export for usage data"
This reverts commit a4e583cffb

Fixes bug 1183441, bug 1183230, bug 1183310.
2013-05-23 16:50:57 +00:00
Tihomir Trifonov a4e583cffb Improvements in csv export for usage data
Added a csv writer using the 'csv' library to format
properly exported data - escaping, encoding etc.
Added a HttpResponse-based class to handle csv generation
Added translation for the CSV columns and template.
Improved consistency for exported data - now passing project name
instead of project id for csv export. Also added both project name/id
in the header of a project usage export.

Fix bug #1158383

Renamed few occurencies of 'tenant' to project.

Also added a new 'project' in nova_data.py, which required
some refactoring of few tests, that didn't consider the current project
for project-based calls.

Note: I've added a StreamingHttpResponse example,
which is introduced in Django 1.5+ and  being advised in the ticket.
However, my opinion is that at the moment we don't need this - it is
too complicated for the current usage.

Change-Id: Ic00626b273921fa5c6c89704b3a9e08b252aaeb0
2013-05-22 11:09:49 +03:00
Tihomir Trifonov 811ee7b58a Fixed url pattern for project:instances:detail page
Removed obsolete :nova: namespace

Fixes bug 1070230

Change-Id: Ia56ef9ebf1a9bfe90b02491125821742ee840baa
2012-10-23 11:33:32 +03: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