336 Commits

Author SHA1 Message Date
zhurong
872ea43d65 Adding identity ng-groups panel
This patch adds angular groups table.

To be added in subsequent patches:
 - Actions
 - filterFacets
 - Integration to Searchlight

To Test
 - set 'groups_panel': True in settings.py
 - local_settings.py v3 enabled

Co-Authored-By: Cindy Lu <clu@us.ibm.com>
Co-Authored-By: Kenji Ishii <ken-ishii@sx.jp.nec.com>
Co-Authored-By: Shu Muto <shu-mutou@rf.jp.nec.com>

Change-Id: Ifcb3353762ae9d65b73981a4a8d6241273afd16a
Implements: blueprint ng-groups
2017-10-10 13:35:09 +09:00
Jenkins
0f3ab405d2 Merge "Set default panel of identity with pluggable settings mechanism" 2017-10-03 22:19:39 +00:00
Akihiro Motoki
af3b7e4134 flake8-import-order: Ensure to place project imports last
To ensure project imports are placed after third party import,
we need to specify application-import-names.
Previously flake8-import-check checks only standard imports or not.

Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
2017-09-20 01:19:38 +00:00
chao liu
1eb9596a8d Set default panel of identity with pluggable settings mechanism
The way of setting default panel of project dashboard and admin
dashboard is the "pluggable settings" mechanism, but for identity
dashboard, a traditional "hard-coded" way is used. It's a good
idea to make it consistent with other dashboards.

Change-Id: I52c584b5ef4981ede981385d39615ab8e7922abe
Closes-Bug: #1717932
2017-09-19 07:33:13 +00:00
Jenkins
7a2e9aaac6 Merge "Refresh role table after editing role" 2017-08-31 18:20:51 +00:00
Lucas H. Xu
a9517ff615 Fix cannot delete user's email addresses in the identity/user panel
How to reproduce the bug:

P.S. Using the horizon master(pike) codebase

1) Login as an admin user
2) Click Identity and go to the Users panel
3) Create a user and put an email address with that user
4) Then edit this user to clear the email address.
5) Update the user and even though we have a green  banner(successful)
show up, the email address still viewable and do not disappear.

Closes Bug: #1573479

Change-Id: I0273d0c6d885c77f1f74bdc2ae6674d1e6539ac0
2017-08-09 16:30:46 -04:00
Bence Romsics
a58aa26450 Refresh role table after editing role
By using the track-by feature of hz-resource-table.

Closes-Bug: #1708444
Change-Id: I782aa4671f5f1bc23a1aa8535b86751ffe712c0b
2017-08-09 08:42:08 +02:00
wei.ying
4b2e5b574f Correct the wrong exceptions reference in domain tables.py
This patch fixes a typo when referencing exception message handle
function, the correct function should use the Horizon exceptions
module instead of keystoneclient.

Change-Id: Iaeabf3630351f13f6881b4df489c709fa3ef092f
Closes-Bug: #1701782
2017-07-02 21:28:48 +08:00
Diana Whitten
1f11a79279 Horizon Forms should allow themable number spinners
Much like the themable selects and checkboxes, number spinners
should also be themable.

Standard number spinners are not very customizable.  We should use
existing buttons and fonts to add their functionality to allow a
richer experience if desired downstream.

An example of how to customize the spinner was placed in Material.
The example shows how to use flexbox to change layout type from
column to row, change icon order, and how to override the icons.

'autocomplete' needs to be false on this new element, otherwise
the browser will retain and load the last value without actually
triggering any JavaScript events by which we can key on and update
the state of the spinner buttons.

Change-Id: Ifd266cd515a903841e2d28e2f4731879116e3513
Closes-bug: #1598311
2017-06-28 15:50:27 -07:00
Akihiro Motoki
9067ae8b0f Move SG and FIP API wrapper to api.neutron
We no longer need to have SG and FIP API wrapper in api.network
as we only supports a single network back-end.

Completes blueprint drop-nova-network

Change-Id: I4e59d897508b497a3cd2ae2fda93b30b786610dc
2017-06-04 17:51:25 +00:00
Akihiro Motoki
81891697c6 Retrieve quota and usage only for quota-enabled resources
Previously _get_tenant_(compute|network|volume)_usage are callled
regardless of resources are listed in enabled_quotas.
This commit retrives usage information only for resources listed
in eanbled_quotas.

floating_ips and security_groups were returned even when
they are included in disabled_quotas. They are not needed
and they are cleanup in this commit.

All (*_)QUOTA_FILEDS were previously a list but it is always used
after converting into a set, so this commit changes (*_)QUOTA_FIELDS
into a set in the initial definitions.

This is a preparation for fix of bug 1675504

Partial-Bug: #1675504
Change-Id: I41cdabde477d87aa8b35d1c908e18a69454286c3
2017-05-05 13:53:11 +00:00
Jenkins
66944d0d94 Merge "Drop novalclient security group and floating IP dependency" 2017-05-04 20:39:11 +00:00
Jenkins
5c6a919590 Merge "Fix unauthorized exception in users panel" 2017-04-30 10:33:12 +00:00
wei.ying
5d8c8fb85b Fix unauthorized exception in users panel
If a member role user login and use admin to get keystoneclient,
but he is not a super user, then a notAuthorized exceptions will be raised,
it seems to be unreasonable.

The following actions will throw unauthorized exception.

Go to Users panel, Click user name , Click Change Password,
Submit Change Password form.

Change-Id: I4f6486b92f023ad0daecfff51e3a1ed16b0e78c0
Closes-Bug: #1684475
2017-04-30 06:11:43 +08:00
Akihiro Motoki
acd3f2a240 Drop novalclient security group and floating IP dependency
novaclient 8.0.0 dropped python bindings for security group and
floating IP. This commit drops security group and floating IP logics
from the nova API wrapper.

The following changes are made accordingly.

* Update unit tests to consume neutron test data
* Drop API unit tests for nova security group and floating IP

Partially implement blueprint drop-nova-network
Change-Id: I946c508d7a82162fc8434213e006513867b79350
2017-04-28 08:38:28 +00:00
Jenkins
30a00a0dc3 Merge "Ensure log messages are not translated" 2017-04-27 22:39:12 +00:00
Jenkins
3a8e7b67c6 Merge "Delete instance,volume,etc confirmation is missing name or ID" 2017-04-25 17:20:16 +00:00
Jenkins
7ed2e64801 Merge "Don't update cinder quotas if disabled" 2017-04-25 00:54:18 +00:00
wei.ying
000db66c68 Correct the group name field less than or equal to 64 characters
If create or update group name longer than 64 characters, api will return
'Recoverable error: Group name should not be greater than 64 characters.
(HTTP 400) (Request-ID: req-979dfe60-c461-4fdc-ab6c-61c62ed24ff3)'.

Change-Id: I95a668c5bf24a58930e4d881417b8f732148bc93
Closes-Bug: #1684353
2017-04-20 13:28:51 +08: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
wei.ying
fa3528933c Delete instance,volume,etc confirmation is missing name or ID
If click the name link and go into the details page for the instance, volume, etc.
And attempt to delete. It will pop up a message, but omit the name/id.
Need to add the property of 'data-display' in detail page.

Change-Id: I9c1966dc7942a27903237e2786edbcd2fbd936ea
Closes-Bug: #1680329
2017-04-07 22:58:50 +00:00
Jenkins
24a4905f5e Merge "Update Horizon to use latest nova policy rules for validation" 2017-04-05 20:34:46 +00:00
Gábor Antal
34a3aa0ba8 Handle log message interpolation by the logger
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.

[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages
Change-Id: I51f50935f1eeffe4960562d6309dfdf05814e595
Closes-Bug: #1596829
2017-03-31 20:59:16 +09:00
Radomir Dopieralski
3055a98763 Don't update cinder quotas if disabled
The quotas for cinder were being updated even if they were disabled,
resulting in None being sent as the value, and an error being thrown
by the API.

This patch cleans up that code to use the same logic in all three cases
for nova, cinder and neutron.

Change-Id: I73209122df20689eee33da9dccffa994a04a3ec0
Closes-bug: #1671911
2017-03-30 10:24:51 +02:00
Jenkins
e3cd250a81 Merge "hacking: noqa cleanup in openstack_dashboard" 2017-03-27 05:11:18 +00:00
Luis Daniel Castellanos
bed34722f3 Add server filters to NGusers & enable filter first
This patch adds server side filters to current NG users panel
it also enables the filter first functionality

Look at:https://review.openstack.org/#/c/427794/

Partially-Implements: blueprint ng-users
Implements: blueprint admin-views-filter-first

Change-Id: If0a5e2b38b1076387fd4eb7ff2c01fadb06badc3
Depends-on: Ieeedffbc621291251d50e7d8f254d3ce4def896c
2017-03-23 14:08:25 +00: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
Jenkins
9dee6b3af3 Merge "NG details view route should not be '/project/...'" 2017-03-14 04:56:47 +00:00
Yaguang Tang
c61ae4f083 Update Horizon to use latest nova policy rules for validation
As Nova's API is unified to os_compute_api, the API policies are also
updated to use this format, Horizon needs to use Nova  policy enforce
rules in the codebase. This patch also update nova_policy.json using
oslo-config-generator for Nova policy file.

Co-Authored-By: Rob Cresswell <robert.cresswell@outlook.com>
Implements: blueprint update-nova-enforce-policies

Change-Id: Id7d01a39930c88592301a5035f0befe5293a78fa
2017-03-13 13:43:02 +00:00
Richard Jones
a835dbfbaa Remove dangerous safestring declaration
This declaration allows XSS content through the JSON and
is unnecessary for correct rendering of the content anyway.

Change-Id: I82355b37108609ae573237424e528aab86a24efc
Closes-Bug: 1667086
2017-03-07 08:10:19 +00:00
Jenkins
6658649d21 Merge "Change Quota tab title to be plural" 2017-03-02 18:17:35 +00:00
Ying Zuo
5479887614 Change Quota tab title to be plural
There are multiple quotas on the tab so the title should be plural.

Closes-bug: #1667412
Change-Id: Ia1e0c99827985842382b04196b64722a4bf47e57
2017-03-02 08:58:00 -08:00
Itxaka
4958805863 Merge "missing" quotas with nova quotas
There was an extra variable for the so called "missing"
quotas since 2013. This patch merges them with the
normal nova quotas, cleans up the tests, removes any
usage of that special var and as a side effect, adds
the missing keys to the project quota update page.

Change-Id: Icaac1ebb1749e13fdfc307e89dcc6bbd64bef922
Closes-Bug: 1655393
2017-03-01 15:30:33 +00:00
Radomir Dopieralski
1be065aed8 Use domain_context not effective domain to display domains list
Use domain_context to decide whether to call domain_list or domain_get
in the list of domains. Previous code used the user's effective domain
instead, which is no longer the same thing with Keystone V3.

Closes-Bug: #1660602

Change-Id: Ie410d282c5b19a061fe83b496785f35bbcfad9ad
2017-02-15 13:12:57 +01:00
Liao Zhuodi
e1beeb7217 don't need to 'import identity' as the same name 'identity'
Change-Id: Ib8c0a457f1358c64a01e3cf76e9666ab3e4ab809
2017-02-15 09:26:37 +08:00
Jenkins
392ddec13b Merge "Disentangle domain context from effective domain" 2017-02-15 00:26:00 +00:00
Jenkins
f313437f9f Merge "Add Angular keystone role edit action" 2017-02-14 04:21:54 +00:00
Jenkins
a265d8cd64 Merge "Add Angular keystone role deletion action" 2017-02-14 04:09:57 +00:00
Jenkins
c6313ed99a Merge "Add Angular keystone role creation action" 2017-02-14 04:08:20 +00:00
Cindy Lu
c73e1c8fa8 NG details view route should not be '/project/...'
Right now the route includes the name 'project'
but we may have details view for 'identity' and
'admin' too, so it should be more general.

Picked just 'ngdetails' instead and moved this out as a
constant. Since this constant needs to be used
by the config blocks, I moved it out into its own
constant module.

Change-Id: I7603250dd70eb40568aa74be2ae4821ee8fcefcc
Closes-Bug: #1641250
2017-02-13 13:24:02 -08:00
Radomir Dopieralski
8b839938bc Disentangle domain context from effective domain
Since the existence of a domain token was equivalent with having
selected a domain context with Keystone V2, some code confuses the
two. This is no longer true for Kestone V3, so we have to separate
the two concepts and use domain context when we mean the domain
context.

Close-bug: #1661537

Change-Id: Ifa66d8c397e34d16a4534e7216eb11c752699505
2017-02-13 11:40:57 +01:00
Jenkins
06651ab018 Merge "Fix alignment issues for nav-tabs and ul on details panels" 2017-01-30 05:52:18 +00:00
Luis Daniel Castellanos
33fcd95caf Implement "filter first" for identity panels
Implemented the "filter first" for the following identity panels:
- Users
- Groups
- Roles
- Projects

The functionality helps horizon not to hang and timeout when there is
a large set of identity resources to display. It can be turned on and
off easily.

In a subsequent patch set the same functionality will be added to
other identity views such as Project > Manage Members

Change-Id: I6e569712fb5159552a27271837cf2629059f5894
2017-01-19 15:32:20 -06:00
Jenkins
686b380707 Merge "Add default common template to python table views" 2017-01-19 05:27:56 +00:00
Ying Zuo
a21b51e34a Fix alignment issues for nav-tabs and ul on details panels
Added space between the nav-tabs and tab content on details panels.

Removed the bullet points in front of instance IP addresses
and security groups.

Change-Id: I426e73eca0ef8ac57434631da75cb602674be893
Closes-bug: #1625310
2017-01-18 11:40:14 -08:00
Jenkins
8962d7b8cc Merge "Adding identity domains table" 2017-01-16 15:54:19 +00:00
Kenji Ishii
cc94b0f202 Adding identity domains table
This patch adds the domain table to the identity domains panel
adn domain detail page.
Actions will be added in subsequent patches.

To test this patch, it needs to show domain panel and enable angular
feature for domain panel.

To show domain panel (after installing OpenStack with latest Devstack).
 - using backends except signed cookie as SESSION_ENGINE in local_settings.py.
   e.g memcached
----
CACHES = {
   'default': {
       'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
       'LOCATION': '127.0.0.1:11211',
   }
}
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
----

 - enable OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT in local_settings.py
----
OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT = True
----

After that, if admin user logged in, the user could see Domain panel and
could operate actions for domains like Create.

To test this patch, after above, set 'domains_panel': True in 'ANGULAR_FEATURES'.

Change-Id: Ib15e25a4cebe6de83f1c2f427490d5850d36b908
Partially-Implements: blueprint angularize-identity-tables
2017-01-12 13:55:46 +09:00
Jenkins
691db471a6 Merge "Add Angular keystone user details use registry" 2017-01-11 05:12:09 +00:00
jing.liuqing
5cb3703ca4 Add Angular keystone user details use registry
supports v3 domain details

To Test
 - set 'users_panel' to True in settings.py

Co-Authored-By: Cindy Lu <clu@us.ibm.com>

Partially-Implements: blueprint ng-users

Change-Id: I2f8826b2e115dbb6843782cbfcf04d9639f26f98
2017-01-09 16:41:50 -08:00
Cindy Lu
0e17dadfc4 Add Angular keystone role edit action
To test set 'roles_panel' to True in settings.py
and have v3 enabled

Change-Id: Id02349a539f12dfe86924a075c62ba190999724d
Co-Authored-By: Richard Jones <r1chardj0n3s@gmail.com>
Partially-Implements: blueprint ng-roles
2017-01-09 14:47:05 -08:00