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:
@@ -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',})
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
|
||||
20
muranodashboard/templates/common/_detail_header.html
Normal file
20
muranodashboard/templates/common/_detail_header.html
Normal 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 %}
|
||||
@@ -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 %}
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block page_header %}
|
||||
{% include "horizon/common/_detail_header.html" %}
|
||||
{% include "common/_detail_header.html" %}
|
||||
{% endblock page_header %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
@@ -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 }}">
|
||||
|
||||
Reference in New Issue
Block a user