{% load i18n sizeformat parse_date %}

{% trans "Share Overview" %}


{% trans "Name" %}
{{ share.name }}
{% trans "ID" %}
{{ share.id }}
{% if share.description %}
{% trans "Description" %}
{{ share.description }}
{% endif %}
{% trans "Status" %}
{{ share.status|capfirst }}
{% trans "Export locations" %}
{% for el in share.export_locations %}

Path:
Preferred: {{ el.preferred }}
{% if el.is_admin_only == True or el.is_admin_only == False %}
Is admin only: {{ el.is_admin_only }}
{% endif %} {% if el.share_instance_id %}
Share Replica ID: {{ el.share_instance_id }}
{% endif %}

{% endfor %} {% if share.snapshot_id %}
{% trans "Snapshot ID" %}
{% url 'horizon:project:share_snapshots:share_snapshot_detail' share.snapshot_id as snapshot_url%}
{{ share.snapshot_id }}
{% endif %}
{% trans "Visibility" %}
{% if share.is_public == True %}
{{ 'public' }}
{% else %}
{{ 'private' }}
{% trans "Availability zone" %}
{{ share.availability_zone }}
{% endif %}
{% trans "Size" %}
{{ share.size }} {% trans "GiB" %}
{% trans "Protocol" %}
{{ share.share_proto }}
{% if share.share_type %}
{% trans "Share type" %}

Name: {{ share.share_type_name }}
ID: {{ share.share_type }}

{% endif %} {% if share.share_network_id %}
{% trans "Share Network" %}
{% url 'horizon:project:share_networks:share_network_detail' share.share_network_id as sn_url%}
{{ share.share_network_id }}
{% endif %} {% if share.share_group_id %}
{% trans "Share Group" %}
{% url 'horizon:project:share_groups:detail' share.share_group_id as sg_url%}
{{ share.share_group_id }}
{% endif %}
{% trans "Mount snapshot support" %}
{{ share.mount_snapshot_support }}
{% trans "Created" %}
{{ share.created_at|parse_date }}
{% trans "Host" %}
{{ share.host }}
{% trans "Task state" %}
{{ share.task_state }}

{% trans "Access Rules" %}


{% for rule in share.rules %}
{{ rule.access_type }}

Access to: {{ rule.access_to }}
Access Level: {{ rule.access_level }}
Status: {{ rule.state }}
Access Key: {{ rule.access_key }}

{% endfor %}

{% trans "Metadata" %}


{% for key, value in share.metadata.items %}
{{ key }}
{{ value }}
{% endfor %}