        <thead>
            <tr>
                <th>Type</th>
                <th>Name</th>
                <th>Status</th>
                <th>Ips</th>
                <th>Source</th>
                <th>Description/Plan</th>
                <th>Profile</th>
                <th>Actions</th>
            </tr>
        </thead>
        <tbody>
            {% for vm in vms %}
            {% if vm.image is defined %}
                {% if 'rhel' in vm.image.lower() or 'rhcos' in vm.image.lower() %}
                    {% set logo = 'Redhat.png' %}
                {% elif 'cfme' in vm.image.lower() %}
                    {% set logo = 'Centos.png' %}
                {% elif 'centos' in vm.image.lower() %}
                    {% set logo = 'Centos.png' %}
                {% elif 'fedora' in vm.image.lower() %}
                    {% set logo = 'Fedora.png' %}
                {% elif vm.image.startswith('debian') %}
                    {% set logo = 'Debian.png' %}
                {% elif vm.image.startswith('utopic') %}
                    {% set logo = 'Ubuntu.png' %}
                {% elif vm.image.startswith('vivid') %}
                    {% set logo = 'Ubuntu.png' %}
                {% elif vm.image.startswith('wily') %}
                    {% set logo = 'Ubuntu.png' %}
                {% elif vm.image.startswith('xenial') %}
                    {% set logo = 'Ubuntu.png' %}
                {% elif vm.image.startswith('yakkety') %}
                    {% set logo = 'Ubuntu.png' %}
                {% elif vm.image.startswith('zesty') %}
                    {% set logo = 'Ubuntu.png' %}
                {% elif vm.image.startswith('artful') %}
                    {% set logo = 'Ubuntu.png' %}
                {% elif vm.image.startswith('bionic') %}
                    {% set logo = 'Ubuntu.png' %}
                {% elif vm.image.startswith('cosmic') %}
                    {% set logo = 'Ubuntu.png' %}
                {% else %}
                    {% set logo = 'Tux.png' %}
                {% endif %}
            {% else %}
                {% set logo = 'Tux.png' %}
            {% endif %}
                <tr>
                <td><img src="/static/images/{{ logo }}"/></td>
                <td align="left"> <a data-toggle="tooltip" data-placement="left" data-delay='{"show": "1000", "hide": "100"}' title="{{ vm.info }}">{{ vm.name }}</a></td>
                <td>{{ vm.status }}</td>
                <td>{{ vm.ip }}</td>
                <td>{{ vm.image }}</td>
                <td>{{ vm.plan }}</td>
                <td>{{ vm.profile }}</td>
                <td>
                    <div class="dropdown">
                        <button class="btn btn-default dropdown-toggle" type="button" id="actions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"><font size="1">Actions</font>
                    <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                        {% if not readonly %}
                        <li onclick="vmstart('{{ vm.name }}');"><span class="glyphicon glyphicon-play green" data-toggle="tooltip" title="Start Vm"></span> Start</li>
                        <li class="divider"></li>
                        <li onclick="vmstop('{{ vm.name }}');"><span class="glyphicon glyphicon-stop" data-toggle="tooltip" title="Stop Vm"></span> Stop</li>
                        <li class="divider"></li>
                        {% endif %}
                        {% if vm.status in ["up", "powering_up", "RUNNING"] %}
                        <li onclick="location.href='/vmconsole/{{ vm.name }}'" target="_blank"><span class="glyphicon glyphicon-edit" data-toggle="tooltip" title="Console Vm"></span> Console</li>
                        <li class="divider"></li>
                        {% endif %}
                        {% if not readonly %}
                        <li onclick="vmdelete('{{ vm.name }}');"><span class="glyphicon glyphicon-trash red" data-toggle="tooltip" title="Delete Vm"></span> Delete</li>
                        <li class="divider"></li>
                        <li class="dropdown-header">Snapshot actions</li>
                        <li onclick="snapshotcreate('{{ vm.name }}');"><span class="glyphicon glyphicon-cd blue" data-toggle="tooltip" title="Snapshot Vm"></span> Create</li>
                        <li onclick="snapshotdelete('{{ vm.name }}');"><span class="glyphicon glyphicon-trash blue" data-toggle="tooltip" title="Delete Snapshot"></span> Delete</li>
                        <li onclick="snapshotrevert('{{ vm.name }}');"><span class="glyphicon glyphicon-repeat blue" data-toggle="tooltip" title="Revert Snapshot"></span> Revert</li>
                        {% endif %}
                    </ul></div>
                </td>
            </tr>
            {% endfor %} 
        </tbody>
