summaryrefslogtreecommitdiff
path: root/horizon/tables
Commit message (Collapse)AuthorAgeFilesLines
* Enable H201: do not write "except:"Kieran Spear2013-08-131-3/+3
| | | | | | | | | 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
* Make get_object_by_id() work for most Django objects.Zhigang Wang2013-06-221-2/+12
| | | | | | | | | Django object id is usually an int while lookup is an unicode string. It works for Openstack but not other Django objects. This patch makes other standard Django apps reusing Horizon easier. Change-Id: I436c34e8b17340537f8d201001741d34c933764e
* Use Python 3.x compatible except constructDirk Mueller2013-06-141-2/+2
| | | | | | | | Python 3.x removed the "except x,y:" construct. Use "except x as y:" instead which works with all Python versions >= 2.6. Change-Id: Iedb4c5a6d8580cbb6c9697933d006e94b1db916d
* Sort imports alphabeticallyMatthias Runge2013-06-143-13/+23
| | | | | | | | This patch also re-organizes imports to import one per line. Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316 Fixes: bug 1188529 Fixes: bug 1188537
* remove unused importsMatthias Runge2013-06-131-0/+14
| | | | | | | | | | | | In the move to make flake8 tests stricter, we need a code cleanup earlier. This removes all unused imports and also enables tests to prevent them for the future. This patch also includes the checks on __init__.py files. Change-Id: I34055803f7c4726682ac6fb95cc5b50ba761fec8 Fixes: bug 1188134
* Display table actions BatchActions buttons in the correct localeJulie Pichon2013-05-211-2/+3
| | | | | | | | | | The table actions' verbose names were getting initialised too early. The most noticeable effect was all the red buttons being displayed in English no matter the locale. Fixes bug #1126324 Change-Id: I8e21a1ec73f11129317249d103c081e90fa13a34
* Update Horizon for Django 1.5 compatibilityLin Hua Cheng2013-04-301-1/+1
| | | | | | | | | | | | | | | | | Changes made: - Changed template url tags: {% url myview %} to {% url myview %} - Import json instead of django.utils.simplejson - Import django.utils.encoding.force_unicode instead of django.utils.translation.force_unicode - Fixed error in tables/base.py for CheckboxInput, pass a callable check_test. Django 1.5 does not silently fail on this now. - Set SECRET_KEY in test/settingspy, Django 1.5 refuse to start if it is not set. - Added notes about ALLOWED_HOSTS when running Horizon in Production Fixes bug 1147329 Change-Id: I6ac1e81498f41141dea99760922991feb310a326
* Enhancement on prompts to list selected objects.Lin Hua Cheng2013-04-081-1/+8
| | | | | | | | | | | | | Used the display name from table.get_object_display(datum), instead of explicitly looking for the first occurance of table header that contains 'Name'. Fallback mode: tables with no valid get_object_display(datum) won't list selected objects. Fixes bug 1155821 Change-Id: Iff4ee8500eb57f39a9bcb199c7eb2be7fa3e4ec4
* Allow image filtering based on image ownershipKieran Spear2013-02-153-2/+65
| | | | | | | | | | | | Uses buttons above the images list to allow filtering into categories: project, "official", shared, public. Adds a FixedFilterAction that creates a button group on top of the datatable. Supports server-side and client-side filtering. Implements blueprint organised-images-display. Change-Id: I87f6cf4dd7d7397ad8c23ebadc8bf293d0bad998
* Prevent column summation if no non-None cellsBrian Waldon2013-01-161-4/+9
| | | | Change-Id: I96ec5f5c6391c9234f79ad751b5c1671eda393ef
* Merge "Adds a "simplified" floating IP management option."Jenkins2012-12-171-1/+1
|\
| * Adds a "simplified" floating IP management option.Gabriel Hurley2012-12-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Provides one-click associate and disassociated actions when in "simple" floating IP management mode. Complex floating IP management is still allowed via the access & security panel, but in general it's not necessary except when managing multiple floating IP pools or with complex network requirements. Implements blueprint associate-ip-one-click. Change-Id: Iaa9333b4f9a0c1590fcee50d1e56fcbaa21a84dc
* | Removes unused importsZhongyue Luo2012-12-101-1/+1
|/ | | | | | | | Removed unused imports founded by: find . -type f -name "*py" -exec pylint -r n {} \; | grep -E "Unused imp|^\*" Change-Id: I84f81ed833f6f792c5beb41a4d6b26cbb3236b2b
* Allow permissions to be set on tablesKieran Spear2012-12-062-3/+19
| | | | | | | | | | | | | | | Sometimes we want to hide certain UI elements depending on the permissions granted to the current user. At the moment this is possible for Actions and Panels. This commit extends support to DataTable too. We also set the permission on the volume snapshots table so that, like the volumes panel, it is only displayed when the 'volume' service is active. Fixes bug #1087128. Change-Id: Icc12b479c3eb888320af735b8b7810e58517eef0
* Add an optional link_classes to tables.Column, this is used as the class of ↵Lin Hua Cheng2012-11-271-2/+12
| | | | | | | | the displayed link in the cell. Fixes bug 1079464. Change-Id: Ibaf58c7f47d1cc8ea8f2ca074bf6c21142df5579
* Unifies Horizon conf.Gabriel Hurley2012-11-201-2/+3
| | | | | | | | | | Centralizes all of Horizon's configuration options so that they're all uniformly accesible from a single place and always guaranteed to exist. Implements blueprint unify-config. Change-Id: I3279b7ccd58302fcff4f0d273f89f282a285c442
* Adds a method for overriding specific API messages.Tihomir Trifonov2012-09-071-3/+7
| | | | | | | | | Also provides a specific error message for dependent snapshots during volume deletion. Fixes bug 1037241. Fixes bug 1020326. Change-Id: I40e5f537bc1806ec97c21f3eeea1d74beca04250
* Fix BatchAction class incongruence between documentation and codeRosario Di Somma2012-08-311-3/+3
| | | | | | | | Fixes launchpad bug #1044424 The BatchAction class in the tables package define the success_url variable in the docs but use completion_url in the code. Change-Id: Ia93eeee4eccb4250d4b0984f38585175de738907
* grammar fixes and other minutiaMatt Joyce2012-08-221-1/+1
| | | | Change-Id: I48d4fa3dddd199ad4c66a6ee8a73bbaeff08fa62
* High-light selected container in browserKe Wu2012-08-171-1/+7
| | | | | Fixed bug #1038264 Change-Id: I46c1d2faf58872d9ed72ee9f6f0f9c4d61d20756
* Adds breadcrumb to resource browser.Ke Wu2012-08-162-1/+2
| | | | | | Fixes bug #1037012 Change-Id: I09247ae2e30261989118c37de8ec33d90c8b4100
* Resolves i18n problem on batch actions.Gabriel Hurley2012-08-141-1/+2
| | | | | | | | | Updated translation files along with it. Thanks to amotoki for the fix. Fixes bug 1005056. Change-Id: Ia339a5f9e45d1d4275af5b776c296b05ddfe6e8d
* Switch to use python-swiftclient instead of cloudfiles.Gabriel Hurley2012-08-133-37/+43
| | | | | | | | | | | | | This patch also resolves some thread-safety problems with when the browser and associated tables are constructed and where the request and data caches are stored on the table. Also includes stylistic and UX enhancments to the swift ResourceBrowser subclass. Implements blueprint swiftclient. Change-Id: I578277ff158b293ee50860528b069dc20e2136a9
* Initial support of Quantum V2.Akihiro MOTOKI2012-08-131-1/+1
| | | | | | | | | | | | | | Implementes blueprint quantum-horizon and blueprint readd-quantum-support. This commit also covers blueprint quantum-workflow-integration. - Added quantum API layer, - Added network/subnet/port CRUD operations, - Added 'Network' user panel, - Added 'Network' system panel, - Added 'Networking' tab in instance creation workflow. - Supported launching an instance with specified network(s) Change-Id: I7ad608e17cb6fb4f0de02721888e96a68cf926e8
* Adds ResourceBrowser and ResourceBrowserView classKe Wu2012-08-093-9/+77
| | | | | | | | | | related: blueprint swift-ui-improvements Provides new API for building browser for navigation, as well as new look and feel in CSS. Applies it to container panel of the nova dashboard. Change-Id: Iecd984263bae7c3774a0630639f645cee4cffca9
* Added a check for None value in get_object_displayTihomir Trifonov2012-08-071-5/+5
| | | | | | | | | | | | When get_object_display returns None, the concatenation of the list of display values fails. Fixes bug 1030641 PATCH SET 2: Added function for joining of lazy(proxy) strings(similar to string_concat) Change-Id: I76398e85f93bc508aaae056aca77c8103998c7b6
* Makes data table accept mixed data typesKe Wu2012-07-244-18/+202
| | | | | | | | | | | | | | | | | | | | | | | This is the first step of making the resource browser, related to blueprint swift-ui-improvements. Adds three attrs to DataTableOptions: .. attribute:: mixed_data_type .. attribute:: data_types .. attribute:: data_type_name Adds attr to Column class: .. attribute:: allowed_data_types Adds attr to Action and LinkAction class: .. attribute:: allowed_data_types Changes implentation of FilterAction. Adds MixedDataTableView. Change-Id: I45fce5e889e92abc592f0a5abfef1abb4ce527be
* Inline object creation.Gabriel Hurley2012-07-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows the creation of related objects during a workflow. For example, this patch implements importing keypairs during the launch instance workflow and allocating floating IP addresses during the floating IP associate workflow. This required several significant changes: * SelfHandlingForm should no long return a redirect. Instead, it should return either the object it created/acted on, or else a boolean such as True. * The ModalFormView now differentiates between GET and POST. * Due to the previous two items, SelfHandlingForm was mostly gutted (no more maybe_handle, etc.). * Modals now operate via a "stack" where only the top modal is visible at any given time and closing one causes the next one to become visible. In the process of these large changes there was a large amount of general code cleanup, especially in the javascript code and the existing SelfHandlingForm subclasses/ModalFormView subclasses. Many small bugs were fixed along with the cleanup. Implements blueprint inline-object-creation. Fixes bug 994677. Fixes bug 1025977. Fixes bug 1027342. Fixes bug 1025919. Change-Id: I1808b34cbf6f813eaedf767a6364e815c0c5e969
* Smarter table form rendering and controls.Gabriel Hurley2012-07-121-1/+24
| | | | | | Fixes bug 1022466. Change-Id: I7958db7751b01f558efcb2b0451df2c0728d4b1e
* Summation rows handle None correctly.Gabriel Hurley2012-07-031-0/+1
| | | | | | Fixes bug 1010220. Change-Id: Ib39520c131f4c27843deaee5d737e87e2cb35906
* Corrections for stricter pep8 checking.Gabriel Hurley2012-06-231-1/+1
| | | | | | | | | | | | | Updates the code to reflect stricter pep8 checking standards for pep8 1.3+. Also adds a pep8 config file to silence unnecessary indentation errors. Removes the "reverse bugfix" monkeypatch since Django 1.4 is now required. Implements blueprint upgrade-pep8. Change-Id: I7343321627d8ccd1598f39323821133168a645cc
* Fixing Nameless Volume DisplayJohn Postlethwait2012-06-141-4/+26
| | | | | | | | | | | | | | | | | | | When a volume has no name, it now shows the ID instead. I also added a fixture data that represents such a volume being in the system. Fixes bug #1012380 You can also now use truncate=i on DataTable Columns in order to have the value truncated if it goes beyond i characters. On top of this I fixed/made-clearer a bunch of the tests relating to volumes and instances. Please do NOT use deepcopy() of fixture data in tests any more, instead just create a new fixture for the data you want. Change-Id: If2f92b5d04b04f08f5cacca03f614fce5ea38702
* Adding block links in table cells.John Postlethwait2012-06-071-0/+2
| | | | | | Fixes bug #999303 Change-Id: I09a379fbe8afd042a43db99c974c7a8d104de3d3
* Only sort on sortable columns.Gabriel Hurley2012-06-071-11/+11
| | | | | | Also some generic cleanup. Change-Id: I7b4f27a5d25204f2356bb1189dc252a65f83332e
* Adds a summation row option to the datatables.Gabriel Hurley2012-06-041-12/+54
| | | | | | Implements blueprint summation-row. Change-Id: I81c984bbf830182854e8f2227e6eae8909e91eef
* Adds pagination to Glance API and tables.Gabriel Hurley2012-05-221-0/+12
| | | | | | Fixes bug 981252. Change-Id: Ib1fa6136947a23521dcdbf6d0d7ae783a6e0fae7
* Adds initial workflow support to Horizon.Gabriel Hurley2012-05-221-3/+3
| | | | | | | | | | Implements blueprint workflows. Adds a reusable workflow component to Horizon, and puts it to use for the Launch Instance user interface. Contains tests with roughly 90% coverage and full documentation. Change-Id: I7325ef9db2ba2496d3fc1e2767cfeda50c71cbca
* Added a new attribute - display_choicesTihomir Trifonov2012-05-161-4/+18
| | | | | | | | | | | to Column class, for substituting the display value of the statuses provided by Nova to some more meaningful ones in the instance table. Fixes bug 997374 Change-Id: I18560868435b4cbc42670e3fc9c0bc83ebf9fda4
* Make empty_value accept a callable.Gabriel Hurley2012-05-141-3/+8
| | | | | | Fixes bug 999370. Change-Id: I0c3f830396645b261e4eb71c7b3d59560c913c6f
* Ensure that table action ids are unique again. Fixes bug 971328.Gabriel Hurley2012-04-022-6/+12
| | | | Change-Id: I98a1af2d0b527befec4a807ee7eb151c57a98422
* Add preference towards single id for action handling.Gabriel Hurley2012-03-291-1/+3
| | | | | | | | | | | | When the action handler received both a single id and multiple object ids (such as when a user checks multiple boxes, then selects a single row's action), it would previously favor the mutiple ids, which goes against the intention of the user. This patch causes it to favor the single id now. Fixes bug 960866. Change-Id: I53034589ada5792c22c2fc5144af2aee3b551eb0
* Add link to instance for its id in floating ip listAndy Chong2012-03-261-2/+3
| | | | | | * fix bug 964735 Change-Id: I75398eecb36c272fffb19fb3fc368d6f3d0df313
* Copies column instances to be unique per table instance.Gabriel Hurley2012-03-242-10/+17
| | | | | | | | | Fixes bug 964345. Incidentally fixes bug 964351 as well by wrapping the dropdown actions template code in a spaceless tag. Change-Id: I672cb517d230db235c90a403e9b8ac0740e8732d
* Merge "Adds support for tabs + tables."Jenkins2012-03-253-51/+82
|\
| * Adds support for tabs + tables.Gabriel Hurley2012-03-243-51/+82
| | | | | | | | | | | | | | | | | | | | Creates new TableTab and TabbedTableView classes to support the complex logic involved in processing both table and tab actions in a single view. Fixes bug 964214. Change-Id: I3f70d77975593773bf783d31de06d2b724aad2d5
* | Merge changes Ibd478e24,I69ce9f89Jenkins2012-03-232-9/+9
|\ \ | | | | | | | | | | | | | | | * changes: Additional translations for Traditional Chinese Use ugettext_lazy for verbose_texts instead of unicode.
| * | Use ugettext_lazy for verbose_texts instead of unicode.Jim Yeh2012-03-232-9/+9
| |/ | | | | | | | | | | | | | | | | | | * Fix bug 962417 * Change the ugettext to ugettext_lazy * Unicode the verbose_name while the DataTableOption is initialize will make the translation fixed. * Similar scenario in Column class and Action class. Change-Id: I69ce9f89b0f0c2afb32b26e15ea8db84828d840f
* | Merge "Fixing an issue where a unique id was not being returned for the ↵Jenkins2012-03-231-0/+5
|\ \ | |/ |/| | | overview table, causing the same information to be rendered for instances with the same name but differing stats. Fixes bug #959489"
| * Fixing an issue where a unique id was not being returned for the overview ↵John Postlethwait2012-03-221-0/+5
| | | | | | | | | | | | table, causing the same information to be rendered for instances with the same name but differing stats. Fixes bug #959489 Change-Id: I78050462903e1b971d0a219805d19c5f728e23f7
* | Rework translation for panel and dashboard names. Marked more strings.Gabriel Hurley2012-03-221-0/+1
|/ | | | | | | | | | | | | | Uses ugettext_lazy to delay translation; reworks the __repr__ method to avoid using the translated form; and changes the unicode method of the HorizonComponent class to actually return a string coerced to unicode rather than a proxy object. In the process, many more strings which had been missed have been marked for translation. Fixes bug 910297. Change-Id: Ie8d10a928b0419313e6c54b0eff7a3a37299ca83