-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds the ability to live-switch regions, and bakes in support at a lower level. Cleans up login-related code. Makes the login view capable of being used as a modal dialog. Overall UX improvements for region support. Fixes a bug where having one region would still show the region switcher inappropriately. Fixed bug 929886. BACKWARDS INCOMPATIBLE CHANGE: If you were an early adopter of the region switcher, you will need to reverse the order of the settings tuples from the previous ("region name", "endpoint") order to the new ("endpoint", "region name") style. This change was done to better suit Django's "choices" syntax since the original ordering was arbitrary. Change-Id: I79db4ec1e608ee0f35916966c018d2a76b5ff662
- Loading branch information
1 parent
95970b7
commit 4d8a924
Showing
13 changed files
with
98 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{% extends "base.html" %} | ||
{% load i18n %} | ||
|
||
{% block title %}{% trans "Login" %}{% endblock %} | ||
|
||
{% block body_id %}splash{% endblock %} | ||
|
||
{% block content %} | ||
{% include '_login.html' %} | ||
{% endblock %} |
8 changes: 5 additions & 3 deletions
8
horizon/horizon/templates/horizon/common/_region_selector.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
{% if region.support %} | ||
{% if regions.support %} | ||
<div id="region_switcher" class="dropdown switcher_bar" tabindex='1'> | ||
<a class="dropdown-toggle" data-toggle="dropdown" href="#region_switcher"> | ||
{{ region.name }} | ||
{{ regions.current.name }} | ||
</a> | ||
<ul id="region_list" class="dropdown-menu"> | ||
<li class='divider'></li> | ||
<li><a href="{% url horizon:auth_logout %}">Change Regions</a></li> | ||
{% for region in regions.available %} | ||
<li><a class="ajax-modal" href="{% url horizon:auth_login %}?region={{ region.endpoint }}">{{ region.name }}</a></li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters