17 Commits

Author SHA1 Message Date
Amelia Cordwell
b0e696cf9a Optional removal of V2 openrc file
* Setting 'SHOW_V2_KEYSTONE_RC' added and will control whether
  or not user's are able to see links for the V2 rc file on both
  the API Access panel and the user menu.

Change-Id: I454fcf578dd8c4d2b9b52c3a9e5426b85e5298b5
2017-12-12 16:40:38 +13:00
Akihiro Motoki
f50cce4c1c Fix KeyError for HORIZON_CONFIG['plugins'] in plugin UT
HORIZON_CONFIG['plugins'] does not always exist.
It breaks unit tests of some horizon plugins like designate-dashboard.

Change-Id: I23aae10a7e63494c1c9f656b47becd2f067c9058
Closes-Bug: #1702889
2017-07-07 11:33:40 +00:00
Akihiro Motoki
ce82c1f805 test helper: Ensure to populate JS_CATALOG in context
_script_i18n.html which tries to access 'jsi18n' url assumes
context['JS_CATALOG'] is populated, but openstack_dashboard test
helper clears it by mocking a context processor.
This leads to a error in rendering templates in unit tests.
Note that template rendering error is caught by a rendering engine
so unit test itself succeeds even when this happens.

Change-Id: I0f5013c4e9ed7b166c527b1aacd0302413948d51
Closes-Bug: #1699509
2017-06-21 14:00:27 +00:00
Jenkins
8201d7bc9f Merge "Keystone to Keystone Federation Drop Down" 2017-01-25 23:10:07 +00:00
Elvin Tubillara
69eb05ae71 Keystone to Keystone Federation Drop Down
This adds a dropdown to enable the user to switch Keystone providers using
Keystone to Keystone Federation.

Depends-On: I75b1a10a3b40b5544b60f6fdc060e0070c585977
Change-Id: Id39bf8d21c537347cbd23f63eaa3da8cc1bfff46
Implements: blueprint k2k-horizon
2017-01-19 14:59:01 -06:00
Paul Karikh
e2cf94eb46 Enable profiling of angular pages (with async requests)
The main difficulty in tracing async requests which are made during
the rendering of Angular-based pages is tracking the root request (the
one which was made to render the skeleton page which then initiated
all other requests) throughout other requests, so they form a cohesive
trace. This is solved by capturing the root request id and exposing it
as a profiler module constant in the process of interpolating
_scripts.html Django template. Then if that constant is not an empty
dictionary, profiler module intercepts all Angular requests and adds
osprofiler headers to them.

This patch also fixes issues which arose after transitioning to the
new version of angular-bootstrap.

Change-Id: I656028b969289a473f54594681d9313ff8a07fd8
2016-12-29 18:26:19 +03:00
Timur Sufiev
4ceeef5376 Add the Profiler panel to the Developer dashboard
Provide both pythonic Django part and the static assets (angular
directives and styles) for the new panel.

DEPLOY NOTES:

To enable panel itself, copy
openstack_dashboard/local/local_settings.d/_9030_profiler_settings.py.example
file from the previous commit to
openstack_dashboard/local/local_settings.d/_9030_profiler_settings.py
and copy openstack_dashboard/contrib/developer/enabled/_9030_profiler.py
to openstack_dashboard/local/enabled/_9030_profiler.py

To support storing profiler data on server-side, MongoDB cluster needs
to be installed on Devstack host (default configuration), see
https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/#install-mongodb-community-edition
for instructions. Then, change net:bindIp: key to 0.0.0.0 inside
/etc/mongod.conf and invoke `sudo service mongod restart` for the
changes to have an effect.

Implements-blueprint: openstack-profiler-at-developer-dashboard
Change-Id: Ice7b8b4b4decad2c45a9edef3f3c4cc2ff759de4
2016-12-01 22:29:16 +03:00
Thai Tran
b56d278582 Support javascript translation for plugin
It's not possible for plugins to contribute translations to the javascript
message catalog. Right now our files are hardcoded to allow only
contributions from horizon and openstack_dashboard. This patch fixes
the issue.

Change-Id: Idde2fc6ac0bf7f762a595cf139ed5184dad64540
Closes-Bug: #1523930
2016-01-11 13:46:05 -08:00
Thai Tran
35e47358f0 Fix bug where WEBROOT is not respected
The WEB_ROOT setting needs to be respected rather than assuming / as
the root of the application. Simiarly, we can not assume that STATIC_URL
is a sub url of the WEB_ROOT. They can be configured as two indepedent url.

Angular templates are loaded dynamically with Ajax, which requires an
absolute base path. We define those base paths as angular constants for
template use and future routing.

TO TEST, follow directions at:
  http://docs.openstack.org/developer/horizon/topics/settings.html#webroot

Co-Authored-By: Matt Borland <matt.borland@hp.com>
Co-Authored-By: Shaoquan Chen <sean.chen2@hp.com>
Co-Authored-By: Thai Tran <tqtran@us.ibm.com>

Change-Id: Ifcd459633682edc94b270019ce77e17d64bea22d
Closes-Bug: #1451681
2015-07-22 04:10:50 +00:00
Vlad Okhrimenko
a47c984623 Update project list in the header bar.
Use function for clean cache (from openstack_auth), after project
members were changed(for project cache is invalidated).
Now, in the header bar, show only active projects.

Change-Id: Ia2561b591b4f3de29a14aaa4b666b16fc1d4cec8
Closes-Bug: #1393659
2014-12-11 18:22:38 +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
David Lyle
8b53d1f094 Implementing accordion navigation
Left hand side navigation is now an accordion with collapsable
dashboards and panel groups.

The project and region pickers have been relocated to the header.
They will be further enhanced in a future bp.

The help link and settings link have now been placed in a user
dropdown as well.

The page header text is still preserved and now sits above the
main content. This information is generally redundant with the
table headers or the panel selected in the left hand navigation,
and should be considered for removal in a different bp.

Implements blueprint navigation-enhancement

Change-Id: I9588cabdf4ce41bd08cadff780b1a87f73dbbea5
2014-02-26 14:03:36 -07: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
Paul Belanger
da8c69afa6 Gate on H4xx docstrings for pep8
In an effort to help horizon more friendly to OpenStack hacking
guidelines, we now gate on H40* violations.

Change-Id: Id07294543660368d2f7f5ac363710176ab23b874
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
2013-11-23 12:51:07 -05: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
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
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