Our templates are very inconsistent and sometimes even use single and
double quotes in the same tag. This is an attempt to clean it up a
little and use double quotes everywhere.
In addition, I have run into a problem with single quotes being
incorrectly escaped by the Django compressor, and I want to see if
this will help with the issue.
Change-Id: I2d5137a87ed65c6abef38a49264346f917a1c85a
This commit enables template debug option to detect errors
in template rendering in unit tests.
Several errors in template rendering are found by enabling the
debug option and they are fixed in this commit.
Related-Bug: #1809983
Change-Id: I1a2d19f2eae62e16f02d3386abd65527bac4e7a0
I read the code of switch region and modify the code of switch project.
Now change project will redirect to the original page.
Change-Id: Ia19eaefa5de884ac4d5900c93138922f00e9c692
Closes-Bug: #1549560
The first step in the dynamic theme effort requires that the context
selection picker inherit properly from a dropdown menu, so that the
styles can be shared and the experience is matched.
Dynamic themes will use the 'select' experience of the context menu
but from within the user menu, so it was necessary to match the
experiences to minimize duplicated code.
The style of the context menu was extremely dependant on DOM structure
and therefore difficult to customize. This has been simplified by using
classes and attempting to keep specificity as low as possible.
Change-Id: Idb9e8f5c1d246688418f68e12fb53f094c01ea34
Partially-implements: blueprint horizon-dynamic-theme
Partially-Implements: blueprint bootstrap-html-standards
The padding around the Top Nav Bar's Dropdown Icons have been done
with actual text spaces, instead of relying on padding that is set
via css. This makes it very difficult to customize the padding
around these elements at a global level.
Some contextual classes have been added for ease of branding-level
customization.
Change-Id: I6768135351637db8a950a4b44366880817ce2df3
Closes-bug: #1537608
The delimiter in the context selector should use an icon to enable
vast customization options.
Change-Id: I07551471213e79b6f7d6e1c95ccc7a605c2a9418
Closes-bug: #1537594
A recent branding effort exposed several aspects of the header
templates that need to be more composable to enable richer
customizations.
The Horizon _header.html template has many components within it:
region pickers, user menus, logos. All of these things are highly
desirable to customize, but because it is all contained in the same
template, a brander will have to override the entire template. This
is not ideal as it increase the cost of maintenance.
The splash section of the login page, the context selector, the logo
section of the header, the user menu and the region selector are now
composable to a much more granular level. The top navigation menus
can now be used outside of existing within a list. The templates
now allow use as normal, standalone dropdown items.
Also, the current primary color used for 'material' was highly
unpleasant with OpenStack Red. Another color on the material design
palette was chosen, very close to the previous blue. See
https://www.google.com/design/spec/style/color.html#color-color-palette
To showcase this new composability, 'material' now shows how to
customize the logo and logo-splash beyond just replacing the png, but
now allowing the use of any type of image. In this case, the
OpenStack logos have been upgraded with their svg counterparts.
It was also noted that the context selection menu was using the wrong
variable to set the color of its links. This was corrected.
Closes-Bug: #1518584
Change-Id: Ib544176b9836e17fc913170664646e1d10eda831
Angular Panels have enabled ngRoute and HTML5 which
allows Angular to handle routing which makes all
routes to pass via Angular.
Links that do not have route defintion as a result stop
working.
This can be fixed by specifying the target="_self" on the <a> tags.
This is already in place for the Sidebar. It needs to done for the
Header Links as well.
Closes-Bug: #1531734
Change-Id: Ida76b40fdf0b66ba3ee3af4d32701974c312af57
An unintended result of a recent refactor left the context picker css
without any love. The refactor of the topbar needs to have style
parity to its previous incantation.
It was noted that the design for the current context selection is not
a good pattern to follow for responsive design. The menu grows
horizontally, which will make it difficult to see on smaller screens
as well as when it is displayed in the now responsive topbar. The
original design still applies to larger screens, but now on smaller
screens, the menu will fall back to a vertically growing responsive
menu.
The nav-header color has been changed, because it was also the same
color as the 'disabled' nav item state, which was confusing.
Refactoring of the some of the context_selection.py code was required
in order to support wrapping the menus in <li> tagss without needing
to change their corresponding HTML files. Since the files can be
used as templatetag templates outside of _header.html, it was best to
keep them as stand alone <ul> lists.
Change-Id: I6e7c7b6fed08d215bcf83941da1bf90b40cd17b2
closes-bug: #1483910
partially implements bp: bootstrap-html-standards
Horizon's top nav now uses <nav> and correcly implements
the Bootstrap HTML standards to make a responsive experience.
Partially-Implements: blueprint horizon-theme-css-reorg
Partially-Implements: blueprint bootstrap-html-standards
Change-Id: I73c5529ae477a17f10a17946ac7120969578a0ba
A Cross-Frame Scripting (XFS) vulnerability can allow an attacker to
load the vulnerable application inside an HTML iframe tag on a
malicious page. An attacker could use XFS to devise a Clickjacking
attack to conduct phishing, frame sniffing, social engineering or
Cross-Site Request Forgery attacks. Although many pages within Horizon
leverage the X-Frame-Options header with the recommended SAMEORIGIN
policy, some (still popular) older browsers don’t support this setting.
Namely, browsers older than IE 8 and Firefox 3.6.9 don’t recognize the
header and are thus vulnerable to an attack known as ClickJacking
unless an additional mitigating control is present.
To support legacy browsers, a suggested best practice is to add a
frame breaking script to the base/global template file.
Reference: http://tinyurl.com/anticlickjack
Change-Id: Ibd7acd0d7b4c4d58afcd59f025735bfc9e4c2957
Closes-Bug: 1461154
Icon font carets should be used over the caret class because they
offer more flexibility while themeing. An Icon Font will grow with
the font size dynamically, whereas the caret class is hardcoded to
a specific set of sizes. Also, the fa-caret-down has the same feel
of the other icons --> showing a slight border radius.
Change-Id: I01c01df96d9d3d1bf07b009f94776d53389e0c32
Partially-Implements: blueprint horizon-theme-icons
There are still some scss mixins that use the old (from bootstrap 2)
image icons. Replacing them will have to be done in a separate patch.
I also link to the css file, instead of scss, because django-pyscss has
some problems finding the right file. This is reported and will have to
be fixed upstream to unbundle bootstrap.
Change-Id: I67e94a9283bcceef8fc89343f3f5b2d7e0d4449f
Partial-implement: blueprint font-icons-replace
Also moved topbar styling into separate component
Adjusted context selection to match other dropdowns, merged it with topbar styles file
Partially-Implements: blueprint css-breakdown
Partially-Implements: blueprint navigation-styling
Change-Id: If30b85f5415a3e8d0416fdafeb233b722feb014f
Providing the mechanism to easily switch between projects and regions.
Only shows domain info if OPENSTACK_KEYSTONE_MULTIDOMAIN_SUPPORT is set
to True in settings.
Will add domain switching for v3 once support for it is complete.
Will add advance filtering rules in follow up patch.
Co-Authored-By: David Lyle <david.lyle@hp.com>
Implements: blueprint context-selection
Change-Id: Ie6e81eebe822ab2394b07345d148a1c06a33a25f