Merged trunk
This commit is contained in:
@@ -15,6 +15,7 @@ setup(
|
||||
author_email = 'xtoddx@gmail.com',
|
||||
packages = find_packages('src'),
|
||||
package_dir = {'': 'src'},
|
||||
package_data = {'django_nova_syspanel': ['templates/django_nova_syspanel/*.html','templates/django_nova_syspanel/*/*.html',]},
|
||||
install_requires = ['setuptools', 'boto==1.9b', 'mox>=0.5.0'],
|
||||
classifiers = [
|
||||
'Development Status :: 4 - Beta',
|
||||
|
||||
@@ -15,6 +15,8 @@ setup(
|
||||
author_email = 'devin.carlen@gmail.com',
|
||||
packages = find_packages('src'),
|
||||
package_dir = {'': 'src'},
|
||||
package_data = {'': ['templates/django_nova/*.html','templates/django_nova/*/*.html',
|
||||
'templates/admin/*.html','templates/admin/*/*.html',]},
|
||||
install_requires = ['setuptools', 'boto==1.9b', 'mox>=0.5.0',
|
||||
'nova-adminclient'],
|
||||
classifiers = [
|
||||
|
||||
@@ -22,6 +22,7 @@ Views for managing Nova instances.
|
||||
|
||||
from django import http
|
||||
from django import template
|
||||
from django.conf import settings
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth.decorators import login_required
|
||||
from django.shortcuts import redirect, render_to_response
|
||||
@@ -63,6 +64,7 @@ def detail(request, project_id, instance_id):
|
||||
'selected_instance': instance,
|
||||
'instances': instances,
|
||||
'update_form': nova_forms.UpdateInstanceForm(instance),
|
||||
'enable_vnc': settings.ENABLE_VNC,
|
||||
'detail' : True,
|
||||
}, context_instance = template.RequestContext(request))
|
||||
|
||||
|
||||
@@ -54,10 +54,10 @@
|
||||
<div id="last" class="column">
|
||||
{% if instance.state == "running" %}
|
||||
<a href="{% url nova_instances_console project.projectname instance.id %}" id="console_{{instance.id}}" class="console" target="_blank">Show Console</a>
|
||||
<a href="{% url nova_instances_vnc project.projectname instance.id %}" id="vnc_{{instance.id}}" class="console" target="_blank">VNC</a>{% endif %}
|
||||
{% if enable_vnc %}
|
||||
<a href="{% url nova_instances_vnc project.projectname instance.id %}" id="vnc_{{instance.id}}" class="console" target="_blank">VNC</a>{% endif %}
|
||||
{% endif %}
|
||||
<a id="edit_instance_link" href="{% url nova_instance_update project.projectname instance.id %}">Edit Instance</a>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<span class="delete">
|
||||
|
||||
@@ -13,6 +13,7 @@ TEMPLATE_DEBUG = DEBUG
|
||||
SITE_ID = 1
|
||||
SITE_BRANDING = 'OpenStack'
|
||||
SITE_NAME = 'openstack'
|
||||
ENABLE_VNC = True
|
||||
|
||||
LOGIN_URL = '/accounts/login'
|
||||
LOGIN_REDIRECT_URL = '/'
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="user_info">
|
||||
<a id="lnk_login" href="/accounts/login">Sign In</a>
|
||||
<a id="lnk_login" href="{% url auth_login %}">Sign In</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{% if form.errors %}
|
||||
<p class="error">Your username and password didn't match. Please try again.</p>
|
||||
{% endif %}
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
<input type="hidden" name="next" value="{% if next %}{{ next }}{% else %}{% url index %}{% endif %}" />
|
||||
{{ form.username.label_tag }}{{ form.username }}
|
||||
{{ form.password.label_tag }}{{ form.password }}
|
||||
<div class="button">
|
||||
|
||||
@@ -9,21 +9,5 @@ sys.stdout = sys.stderr
|
||||
|
||||
DEBUG = False
|
||||
|
||||
class WSGIRequest(django.core.handlers.wsgi.WSGIRequest):
|
||||
def is_secure(self):
|
||||
value = self.META.get('wsgi.url_scheme', '').lower()
|
||||
if value == 'https':
|
||||
return True
|
||||
return False
|
||||
|
||||
class WSGIHandler(django.core.handlers.wsgi.WSGIHandler):
|
||||
request_class = WSGIRequest
|
||||
|
||||
_application = WSGIHandler()
|
||||
|
||||
def application(environ, start_response):
|
||||
environ['PATH_INFO'] = environ['SCRIPT_NAME'] + environ['PATH_INFO']
|
||||
environ['wsgi.url_scheme'] = environ.get('HTTP_X_URL_SCHEME', 'http')
|
||||
|
||||
return _application(environ, start_response)
|
||||
application = django.core.handlers.wsgi.WSGIHandler()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user