{# Modal-body fragment: loaded via AJAX into #csvPreviewBody (see host_list.html). Do NOT wrap it in page chrome: the modal is the frame. #}
{# Multi-line CSV rides in a hidden textarea so the import (and the header re-preview) work without server state. #} {% if import_format == 'json' %} {% else %}
Forgot the header? Uncheck this: the first row is then kept as data and columns are numbered instead.
{% endif %}
{% if can_store_secrets %}
{% for col in columns %}
{% endfor %}
Checked columns do not become labels: their values are stored in the Secret Store, bound to the imported host, and rules reach them with {{ "{{ secret('column') }}" }}.
{% endif %}
Every host of this import, and with it its secrets, belongs to this account.

{% if editable %} All {{ row_count }} host(s). Edit any value, add a column or give a host its own template before you start the import. {% else %} Preview of the first {{ preview_rows|length }} of {{ row_count }} row(s); an import this big is not editable here. {% endif %} Every column except the hostname, folder, lifecycle_state and inventory_<name> becomes a host label (an label_<name> prefix is stripped for the Export CSV round-trip).

{% if editable %}
{% endif %}
{% for col in columns %} {% endfor %} {% if editable %}{% endif %} {% for row in preview_rows %} {% for col in columns %} {% if editable %} {% else %} {% endif %} {% endfor %} {% if editable %} {% endif %} {% endfor %} {% if not preview_rows %} {% endif %}
{{ col if col else '(empty)' }} {% if col == hostname_column %} hostname {% endif %} Template
{% if '\n' in row[col] %} {% else %} {% endif %} {{ row[col]|truncate(80) }}
No data rows found.