Commit 2ffebae7 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Improve ui personal images ui view

include reference to custom image creation guide if available.
Reference url can be configured by setting the UI_CUSTOM_IMAGE_HELP_URL
setting.
parent 9d10aac2
......@@ -289,6 +289,12 @@
_.bind(this.show_loading_view, this),
_.bind(this.hide_loading_view, this)
);
$(".custom-image-help").hide();
if (type == 'personal') {
$(".custom-image-help").show();
}
this.update_layout_for_type(type);
},
......
......@@ -631,6 +631,7 @@
synnefo.config.vm_hostname_format = {{ vm_hostname_format|safe }};
synnefo.config.automatic_network_range_format = {{ automatic_network_range_format|safe }};
synnefo.config.quota_url = '{% url synnefo.ui.views.user_quota %}';
synnefo.config.custom_image_help_url = '{{ custom_image_help_url|safe }}';
synnefo.auth_client = new synnefo.auth.AstakosClient({
login_url: synnefo.config.login_redirect,
......
......@@ -108,7 +108,17 @@
</h4>
<ul class="images-list">
</ul>
<span class="empty">{% trans "no images available" %}</span>
<span class="empty">
{% trans "No images available" %}.
</span>
{% if custom_image_help_url %}
<span class="custom-image-help" style="display:none">
<br /><br />
{% blocktrans with custom_image_help_url as url %}
Consult <a href="{{ url }}">this guide</a> if you want to create a custom OS image
{% endblocktrans %}
</span>
{% endif %}
<span class="loading hidden">{% trans "loading..." %}</span>
</div>
<div class="images-info-cont content-cont">
......
......@@ -101,6 +101,7 @@ VM_HOSTNAME_FORMAT = getattr(settings, "UI_VM_HOSTNAME_FORMAT",
MAX_SSH_KEYS_PER_USER = getattr(settings, "USERDATA_MAX_SSH_KEYS_PER_USER")
FLAVORS_DISK_TEMPLATES_INFO = getattr(settings, "UI_FLAVORS_DISK_TEMPLATES_INFO", {})
SYSTEM_IMAGES_OWNERS = getattr(settings, "UI_SYSTEM_IMAGES_OWNERS", {})
CUSTOM_IMAGE_HELP_URL = getattr(settings, "UI_CUSTOM_IMAGE_HELP_URL", None)
# MEDIA PATHS
UI_MEDIA_URL = getattr(settings, "UI_MEDIA_URL",
......@@ -195,6 +196,7 @@ def home(request):
'use_glance': json.dumps(ENABLE_GLANCE),
'glance_api_url': json.dumps(GLANCE_API_URL),
'system_images_owners': json.dumps(SYSTEM_IMAGES_OWNERS),
'custom_image_help_url': CUSTOM_IMAGE_HELP_URL,
'image_deleted_title': json.dumps(IMAGE_DELETED_TITLE),
'image_deleted_size_title': json.dumps(IMAGE_DELETED_SIZE_TITLE),
'network_suggested_subnets': json.dumps(NETWORK_SUBNETS),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment