Fix murano dashboard to work with older Horizon versions

Specifically, make Newton+ versions of murano-dashboard compatible
with Horizon from Mitaka release.

Change-Id: I70a3bcefeb9c708460c8da9c658aea3f14e000e7
This commit is contained in:
Timur Sufiev
2016-10-11 21:51:11 +03:00
parent b3ba35a08e
commit 14ab8153f3
8 changed files with 43 additions and 7 deletions

View File

@@ -28,5 +28,13 @@ DATABASES = {
}
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
try:
from openstack_dashboard import static_settings
LEGACY_STATIC_SETTINGS = True
except ImportError:
LEGACY_STATIC_SETTINGS = False
HORIZON_CONFIG['legacy_static_settings'] = LEGACY_STATIC_SETTINGS
# from openstack_dashboard.settings import POLICY_FILES
POLICY_FILES.update({'murano': 'murano_policy.json',})

View File

@@ -8,12 +8,16 @@
{{ block.super }}
{% compress css %}
<link rel="stylesheet" href="{% static 'muranodashboard/css/catalog.css' %}">
<link rel="stylesheet" href="{% static 'horizon/lib/font_awesome/css/font-awesome.min.css' %}">
{% if HORIZON_CONFIG.legacy_static_settings %}
<link rel="stylesheet" href="{% static 'horizon/lib/font-awesome/css/font-awesome.min.css' %}">
{% else %}
<link rel="stylesheet" href="{% static 'horizon/lib/font_awesome/css/font-awesome.min.css' %}">
{% endif %}
{% endcompress %}
{% endblock %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% include "common/_detail_header.html" %}
{% endblock %}
{% block main %}

View File

@@ -9,7 +9,11 @@
{{ block.super }}
{% compress css %}
<link rel="stylesheet" href="{% static 'muranodashboard/css/catalog.css' %}">
<link rel="stylesheet" href="{% static 'horizon/lib/font_awesome/css/font-awesome.min.css' %}">
{% if HORIZON_CONFIG.legacy_static_settings %}
<link rel="stylesheet" href="{% static 'horizon/lib/font-awesome/css/font-awesome.min.css' %}">
{% else %}
<link rel="stylesheet" href="{% static 'horizon/lib/font_awesome/css/font-awesome.min.css' %}">
{% endif %}
{% endcompress %}
{% endblock %}

View File

@@ -0,0 +1,20 @@
{% if HORIZON_CONFIG.legacy_static_settings %}
<div class='page-header'>
<div class="row">
<div class="col-xs-12 col-sm-9 text-left">
<span class="h1">{{ page_title }}</span>
</div>
<div class="col-xs-12 col-sm-3 text-right">
{% if actions %}
<div class='actions_column' action='{{ url }}' method="POST">
{% csrf_token %}
{{ actions }}
</div>
{% endif %}
</div>
</div>
</div>
{% else %}
{% include "horizon/common/_detail_header.html" %}
{% endif %}

View File

@@ -4,7 +4,7 @@
{% block title %}{% trans "Deployment Details" %}{% endblock %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% include "common/_detail_header.html" %}
{% endblock page_header %}
{% block main %}

View File

@@ -4,7 +4,7 @@
{% block title %}{% trans "Package Details" %}{% endblock %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% include "common/_detail_header.html" %}
{% endblock %}
{% block main %}

View File

@@ -13,7 +13,7 @@
{% endblock %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% include "common/_detail_header.html" %}
{% endblock page_header %}
{% block main %}

View File

@@ -7,7 +7,7 @@
{% block title %}{% trans "Components" %}{% endblock %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% include "common/_detail_header.html" %}
{% endblock page_header %}
{% block main %}
<input type="hidden" id="environmentId" value="{{ environment_id }}">