mwielgoszewski/doorman

View on GitHub
doorman/templates/manage/tables/nodes.html

Summary

Maintainability
Test Coverage
                <table class="table table-striped table-condensed">
                    <thead>
                        <tr>
                            <th>Host Identifier</th>
                            <th>Node Key</th>
                            {% if current_app.config.DOORMAN_CAPTURE_NODE_INFO %}
                            {% for column, label in current_app.config.DOORMAN_CAPTURE_NODE_INFO %}
                            <th class="text-right">{{ label | title }}</th>
                            {% endfor %}
                            {% endif %}
                            <th>Last IP Address</th>
                            <th>Enrolled Date</th>
                            <th>Last Check-in Date</th>
                            <th>Tags</th>
                        </tr>
                    </thead>

                    <tbody>
                        {% for node in nodes %}

                        <tr class="{{ node | health }}">
                            <td>
                                <a href="{{ url_for('manage.get_node', node_id=node.id) }}">{{ node.display_name }}</a>
                            </td>
                            <td>{{ node.node_key }}</td>
                            {% if current_app.config.DOORMAN_CAPTURE_NODE_INFO %}
                            {% for column, label in current_app.config.DOORMAN_CAPTURE_NODE_INFO %}
                            <td>{{ node.node_info[column] | render(column) }}</td>
                            {% endfor %}
                            {% endif %}
                            <td>{{ node.last_ip | default('', true) }}</td>
                            <td>{{ node.enrolled_on }}</td>
                            <td>{{ node.last_checkin }}</td>
                            <td>
                                <input class="tagsinput" value="{{ node.tags | map(attribute='value') | sort | join(',') }}" data-uri="{{ url_for('manage.tag_node', node_id=node.id) }}">
                            </td>
                        </tr>

                        {% endfor %}
                    </tbody>

                </table>