Commit Graph

37 Commits

Author SHA1 Message Date
Akihiro Motoki 385870317a Split out FWaaS dashboard
Implement blueprint split-out-neutron-xaas-dashboards
Change-Id: Ieaca88dbe28cc2330d9b333082ff7e92c91e8639
2017-06-27 14:20:03 +00:00
Jenkins 30a00a0dc3 Merge "Ensure log messages are not translated" 2017-04-27 22:39:12 +00:00
Akihiro Motoki c8cd03189a Use BooleanField for admin_state_up form
admin_state_up is a boolean value but the network and port edit forms
expected a string version of True/False. As a result, True/False string
was shown as the default value in these forms. The field is implemented
as ChoiceField, but there is no special reason not to use BooleanField
for a boolean field and admin_state(_up) fields are the only exceptions
in horizon. This commit replaces all admin_state(_up) fields to
use BooleanField.

As far as I checked, this pattern is used only in the networking
related panels and this patch clean them up.

Change-Id: I9286f6c29d67fec7a88b74661bc8eca945fd9061
Closes-Bug: #1672213
2017-04-14 19:40:48 +00:00
Akihiro Motoki ced987815d Ensure log messages are not translated
Previously translated messages are included in log messages
and it was determined what language is chosen by users.
It makes difficult for operators to understand log messgaes.

This commit tries to use English messages for all log messages.
The following policies are applied based on the past discussions
in the bug 1406333 and related reviews.

- English messages are used for log messages.
- log messages include exception messages if possible
  to help operators identify what happens.
- Use ID rather than name for log messages
  as ID is much more unique compared to name.
- LOG.debug() in success code path are deleted.
  We don't log success messages in most places and API calls to
  back-end services can be logged from python bindings.

Change-Id: Ie554463908327435d886d0d0f1671fd327c0cd00
Closes-Bug: #1406333
2017-04-11 10:24:01 +00:00
Cindy Lu 163489b5e9 Horizon selects are now themable: Project Panels
Based on Diana's work.
Complete for Admin Panels: https://review.openstack.org/#/c/290204/

Horizon used a standard select input. Unfortunately this type of
input is only customizable to a small extend. Note: not all
ChoiceFields were converted because they have unexpected
impact.

Change-Id: Id9405c6f0127d6e86db09dfaf772f1275a7d7547
Partially-implements: blueprint horizon-theme-css-reorg
2016-08-01 14:15:54 -07:00
Diana Whitten 259973dd06 Horizon Checkboxes are now themeable.
Horizon checkboxes were using a standard checkbox. Unfortunately,
this type of checkbox is only customizable through Chrome, and
even then, its not completely flexible.

The default checkboxes have now been altered to allow for a highly
customized experience through the use of CSS pseudo elements and
Icon Fonts. This allows the color, size and unselected and selected
states of the checkbox to be customized.

The 'default' theme uses the standard Font Awesome checked and
unchecked icons.  The 'material' now uses the Material Design
checkbox design.

It was also noticed (and fixed) that the help-icon on the forms
were not the same color as its corresponding text.

Partially-Implements: blueprint horizon-theme-css-reorg

Change-Id: I52602357d831a5e978fe6916b37b0cde9edb2b9b
2016-03-02 19:17:09 -07:00
Jenkins b9e8dc1e30 Merge "Add Reject option to Firewall Rules" 2015-11-23 13:29:57 +00:00
Reedip Banerjee eb4db5e149 Add Reject option to Firewall Rules
Although Neutron API and Neutronclient support Reject action
in Firewall Rule, it is missing in Horizon. This change
proposes to add the 'Reject' action option to the Firewall
rule in the 'Add Rule' workflow and the 'Edit Rule' form.

Change-Id: Ibf6072948becdc1852464826a04f08127bd85113
Closes-Bug: #1516856
2015-11-22 16:31:36 +05:30
Reedip Banerjee fbabc26a99 Add support for IP Version in Horizon FW-Rule
Currently IP Version can be specified during creation/updation
of firewall rules in CLI, but not in Horizon.
This patch adds the support for IP Version in Horizon.

Change-Id: I206c84501248c393167b060e0329dc1b0ea02f14
Closes-Bug: #1503947
2015-11-12 08:52:33 +05:30
Qiaowei Ren 37a24e2afc Remove unnecessary executable permission
Bunch of horizon source code files are marked as executable which is not
appropriate, this patch just 'chmod -x' to all of them.

Closes-Bug: 1468564

Change-Id: Ieadc839bc47599dbcd1a784127fcde9cf8f45bf4
2015-08-03 10:15:30 +08:00
yan.haifeng 95c17c3947 Rename label of remove router from firewall
The label of remove router from firewall is ambiguous, this patch rename it
to be more distinct, better to understand.

Change-Id: Iea3ab2e4ace75c14bcc3145c02f155136c49ff28
Closes-Bug: #1467208
2015-06-22 01:41:53 +08:00
Vishwanath Jayaraman fb9bcd31da Adds configuration support to associate firewall to routers
- Allows router selection during firewall create/update
- Exposes router association information in the firewall details page
- Extends relevant tests

Co-Authored-By: Abishek Subramanian <absubram@cisco.com>
Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I602b7273c1a2caf9d80347689d09cbbe166d2048
Implements: blueprint fwaas-router-insertion
2015-03-29 02:14:26 -05:00
Akihiro Motoki 9736609e53 List shared firewall policies/rules in Project panel
When firewall policy/rule is set to shared, it should be seen
by any users.

This commit reimplements the support of shared firewall policies
and rules with honoring Neutron listing behavior for admin role.

Closes-bug: #1294541
Change-Id: Ie7142b10234e720b65f6540f08c7a092939e3ea8
2015-02-15 21:54:18 +09:00
Akihiro Motoki df03be6aa3 Revert "Fix shared firewall policy can not be displayed in horizon"
This reverts commit ca8df08bb8.

The reverted commit introduced a regression that all firewall
related resources from all projects are shown in the project panel
if a user has admin role. It violates the design policy of the
Project dashboard (which focuses on project-related resources).
A fix for the original bug 1294541 is coming in the subsequent patch.

Closes-Bug: #1422081
Related-Bug: #1294541
Change-Id: Ie8864b92b4ffb59681c0d18ac8b5f09f636d5fba
2015-02-15 18:28:21 +09:00
Zhang Hua ca8df08bb8 Fix shared firewall policy can not be displayed in horizon
When firewall policy is set to shared, it should be seen by any
users just like public images.

_model_query function of common_db_minxin.py in neutron has used
shared and tenant_id fields restored from token to construct the
query condition, so continuing to pass tenant_id as filters
condition will cause sql confusion, just delete them to keep
consistent with the approach python-neutronclient did.

Change-Id: Id891f735509275bd79eff52385ffce40069fc460
Closes-bug: 1294541
2015-02-03 14:42:05 +08:00
Jenkins 15b9b8d064 Merge "Replace set_id_as_name_if_empty with name_or_id" 2014-12-22 16:14:46 +00:00
liyingjun 33092aec9b Make admin_state translatable
In several panels the network admin state is hardcoded to UP/DOWN,
this patch aims to make the admin_state translatable.

Change-Id: Ia0e5ba02a4980c1db0d914e2689956feee5fb718
Closes-bug: #1390207
2014-12-16 15:50:47 +08:00
liyingjun 403b81db29 Replace set_id_as_name_if_empty with name_or_id
we can replace set_id_as_name_if_empty with name_or_id in
in all neutron related place to reduce a extra loop call
since set_id_as_name_if_empty is called every after *_list.

Change-Id: I341adb3a581337790e22e049e5b72df11b462b44
Closes-bug: #1370986
2014-12-09 09:57:28 +08:00
Jenkins 3de4fdd19e Merge "Correct protocol/action initial values provided to UpdateRule" 2014-10-13 16:06:10 +00:00
Christian Berendt 9f6ec9500b Remove @author tags from copyright statements
We have git to track the authorship of files. It is not necessary to use
the @author tags in the copyright statements.

Change-Id: Ib99e53323dba7315a6c8cf73ba4c7eb7c9803ac3
2014-10-07 20:55:05 +02:00
Jenkins 8a1c59ca4f Merge "Handle correctly protocol 'ANY' in firewall rule" 2014-09-22 19:03:33 +00:00
Cedric Brandily aef210704f Correct protocol/action initial values provided to UpdateRule
Currently protocol/action initial values in UpdateRule are incorrectly
formatted: neutron returns lowercase protocol/action strings but
UpdateRule form expects uppercase strings as initial values which
implies to reorder protocol/action choices to select the right initial
values.

This change corrects initial values provided to UpdateRule which allows
to remove the trick in UpdateRule.__init__ and initial protocol/action
values become translatable.

Change-Id: I7145dd591581a7e5e3fb0591518d0e1564f38c10
2014-09-20 10:42:11 +02:00
Cedric Brandily ede62824b8 Handle correctly protocol 'ANY' in firewall rule
Currently horizon allows to create firewall rule with protocol == 'ANY'
but horizon crashs if you try to update such rule because UpdateRule
assumes that protocol is a string and fails to convert it to uppercase
if protocol is ANY/None. Moreover horizon does not allow to update
protocol to 'ANY' despite neutron supports it.

This change updates UpdateRule in order to convert correctly ANY to
None and vice versa. It allows also to update firewall rule protocol to
ANY.

Closes-Bug: #1324382
Closes-Bug: #1370485
Change-Id: I5748b8e6c1cf0ef0d7a4317016492e064b5e8918
2014-09-19 15:13:37 +02:00
Sam Betts ab9e36e9b2 Made Admin State choice more human readable
The Admin State choices in create forms throughout horizon
were not very clear, this patch presents that choice in a much more
readable and understandable way. The field is changed from a boolean
field to a choice field with the different states, making it more
obvious what is being decided.

Change-Id: I7091e5ccf91c57d3f64e2d4415bed952d09ada71
Closes-Bug: 1370322
2014-09-17 18:34:14 +01:00
Akihiro Motoki 588d1de8fa Fix and enable H702 _() method check
Enable hacking rule H702 Formatting operation should
be outside of localization method call.
This rule is useful to avoid untranslated strings.

Change-Id: I1c32707ed418c1e64cce24b0adceee14af16200c
2014-08-02 12:43:27 +09: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
Ivan Kolodyazhny 9d85f384ea Fix missing translations in Firewall views
Change-Id: Iade6d57b713dd645527a1a21b4620f7a123bb048
Closes: bug #1309125
2014-05-21 22:10:55 +03: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
Maxime Vidori cbb52ebc66 Group specific fields in horizon.form module
According to the Django architecture, all fields are grouped in
the django.form module, Horizon fields were dispatched in two modules
utils and form. This patch cleanup the loading of Horizon specific
fields.

Change-Id: Ib18848a8cc06dbd5984ec02d7cd647145124ced4
Closes-Bug: #1287634
2014-03-04 11:13:59 +01: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
Jenkins 0a6b41ee17 Merge "Set "remove rule" field to be required in dialog" 2013-12-20 05:57:06 +00:00
chenhaiq 6557ff66d7 Set "remove rule" field to be required in dialog
The dialog can be open from: the "Firewalls"->"Firewall Policies"
->"More" button of a policy->"Remove Rule"

The "remove rule" field should be required, otherwise, user will
hit error when no rule is select. Removed "required=False",
because it is default to True.

Added 'btn-danger' to the button style

Change-Id: Ifa21419bc93818335057bb16ed2683994c6efee7
Closes-Bug: #1252996
2013-12-19 10:19:34 +08:00
Akihiro MOTOKI 821ce1c3f4 Make Neutron API name consistent
Previously several types of name are used for same type operations
in Neutron releated API method names.

* XXXX_modify -> XXXX_update
* <plural>_get -> <singular>_list
* <plural>_list -> <singular>_list

Closes-Bug: #1261283
Change-Id: I95c268822d1a55ea0440b44ea2c7993979ee4c36
2013-12-16 15:24:21 +09:00
Akihiro MOTOKI 0def30491c Fix typos: "gruop" and "remove from"
Change-Id: If1afd82ffff3f4058c87b675913d4a0d31c52c09
Closes-Bug: #1234119
2013-10-02 20:49:09 +09:00
Akihiro MOTOKI f3f6f05275 Create links between FWaaS resources
Part of blueprint fwaas-horizon

This commit creates cross links between FWaaS resources
and resolves FWaaS resource UUID in tables to its name.
This helps users to track FWaaS resources.

This commit also improves an error handling when an error occurs
during retrieving a resource detail via API call.
While previously a detail page without item values is displayed,
now the index page is displayed for such case.

Closes-Bug: #1229433

Change-Id: I4357b5c275ab75163f0afc7158b4c1edb8cecd6c
2013-09-30 03:19:08 +09:00
Gabriel Wainer ecf45c6ead Typo fix rangein -> range in
Change-Id: I2af716242b50624ec5f7cbd83a7054cc07694f06
2013-09-20 12:40:51 -03:00
KC Wang 1255766344 FWaaS Horizon panel
Implements: blueprint fwaas-horizon

Change-Id: I1017573887922b4dea0a42d46965de2b86325b0e
2013-09-10 18:03:12 +09:00