{% extends "network/hosts.html" %} {% from "_helpers.html" import link_to_items, link_to_stack_members, link_to_ansible_groups, delete_button_with_confirmation, render_field, submit_button_with_confirmation %} {% block title %}View Host - CSEntry{% endblock %} {% block hosts_nav %} {% endblock %} {% block hosts_main %}
Hostname
{{ host.fqdn }}
Device Type
{{ host.device_type }}
{% if host.items %}
Items
{{ link_to_items(host.items) }}
{% endif %} {% if host.stack_members() %}
Stack Members
{{ link_to_stack_members(host.stack_members()) }}
{% endif %}
Description
{{ host.description }}
Created by
{{ host.user }}
Created at
{{ host.created_at | datetimeformat }}
{% if host.ansible_vars %}
Ansible vars
{{ host.ansible_vars | toyaml }}
{% endif %} {% if host.ansible_groups %}
Ansible groups
{{ link_to_ansible_groups(host.ansible_groups) }}
{% endif %}
{% if host.device_type.name.startswith('Virtual') and current_user.is_admin %} {% if host.is_ioc %} {% set vm_type = 'Virtual IOC' %} {% else %} {% set vm_type = 'VM' %} {% endif %}
{{ form.hidden_tag() }} {{ render_field(form.cores, label_size='6', input_size='6') }} {{ render_field(form.memory, label_size='6', input_size='6') }} {{ submit_button_with_confirmation('Create ' + vm_type, 'Do you really want to create the ' + vm_type + ' ' + host.name + '?') }}
{% elif host.device_type.name == 'Network' and host.model and current_user.is_admin %}
{{ form.hidden_tag() }} {{ submit_button_with_confirmation('Generate ZTP configuration', 'Do you really want to generate the ZTP configuration for ' + host.name + '?') }}
{% endif %}

Interfaces

{% for interface in host.interfaces %} {% endfor %}
Name Cnames IP MAC Network Tags
{{ delete_button_with_confirmation("Delete interface", "deleteConfirmation-%s" | format(interface.id), "Are you sure you want to delete interface %s?" | format(interface.name)) }}
{{ interface.name }} {{ interface.cnames | join(' ') }} {{ interface.ip }} {{ interface.mac }} {{ interface.network }} {{ interface.tags | join(' ') }}

History

{% for version in host.versions | reverse %} {% endfor %}
Updated at Updated by Name Device Type Ansible variables Ansible groups
{{ version.transaction.issued_at | datetimeformat }} {{ version.transaction.user }} {{ version.name }} {{ version.device_type }}
{{ version.ansible_vars | toyaml }}
{{ link_to_ansible_groups(version.ansible_groups) }}
{%- endblock %}