{% extends "main.html" %}
{% load karaage_tags %}


{% block title %}Machine{% endblock %}


{% block breadcrumbs %}
<div class="breadcrumbs">
    <a href='{% url "index" %}'>Home</a>&nbsp;›
    <a href="{% url 'kg_machine_list' %}">Machines</a>&nbsp;›
    {{ machine }}
</div>
{% endblock %}


{% block object-tools %}
{% endblock %}


{% block content %}
<div id="content-main">
    <div class="module">
        <h2>Machine Details</h2>
        <h3>{{ machine }}</h3>
        <div class="table-container">
            <table class="keyvalue">
                <tr><th>No. CPUs:</th><td>{{ machine.no_cpus }}</td></tr>
                <tr><th>No. Nodes:</th><td>{{ machine.no_nodes }}</td></tr>
                <tr><th>Type: </th><td>{{ machine.type }}</td></tr>
                <tr><th>Category:</th><td>{{ machine.category }}</td></tr>
                <tr><th>Start Date:</th><td>{{ machine.start_date }}</td></tr>
                {% if machine.end_date %}
                <tr><th>End Date:</th><td>{{ machine.end_date }}</td></tr>
                {% endif %}
                <tr><th>PBS server host:</th><td>{{ machine.pbs_server_host }}</td></tr>
                <tr><th>Memory per core:</th><td>{{ machine.mem_per_core }}</td></tr>
                <tr><th>Scaling factor:</th><td>{{ machine.scaling_factor }}</td></tr>
                {% if is_admin %}
                <tr><th>Usable password:</th><td>{{ machine.has_usable_password }}</td></tr>
                {% endif %}
            </table>
        </div>
        {% if is_admin %}
        <div class="object-tools">
            <ul>
                <li><a href="{% url 'kg_machine_edit' machine.pk %}" class="changelink">Edit</a></li>
                <li><a href="{% url 'kg_machine_logs' machine.pk %}">Logs</a></li>
                <li><a href="{% url 'kg_machine_password' machine.pk %}">Password</a></li>
            </ul>
        </div>
        {% endif %}
    </div>
    {% for_each_app_include "machine_detail_extra.html" %}
    {% if is_admin %}
    <div class="module">
        <h2>Comments</h2>
        {% comments machine %}
        {% if is_admin %}
        <div class="object-tools">
            <ul>
                <li><a href="{% url 'kg_machine_add_comment' machine.pk %}" class="addlink">Add comment</a></li>
            </ul>
        </div>
        {% endif %}
    </div>
    {% endif %}
</div>
{% endblock %}

