{% extends "admin/base.html" %}

{% block secondary %}
{% endblock %}

{% block primary %}
    <div class="primary col-md-12 col-xs-12" role="main">
    {% block primary_content %}
        <article class="module">
        {% block page_header %}
            {{ super() }}
        {% endblock %}
        <div class="module-content">
            {% if self.page_primary_action() | trim %}
            <div class="page_primary_action">
                {% block page_primary_action %}{{ super() }}{% endblock %}
            </div>
            {% endif %}
            {% block primary_content_inner %}
            <div class="">
                <nav>
                    <div class="nav nav-tabs" id="nav-tab" role="tablist">
                    <button class="nav-link active" id="nav-system-tab" data-bs-toggle="tab" data-bs-target="#nav-system" role="tab" aria-controls="nav-system" aria-selected="true">System Info</button>
                    <button class="nav-link" id="nav-ckan-tab" data-bs-toggle="tab" data-bs-target="#nav-ckan" role="tab" aria-controls="nav-ckan" aria-selected="false">CKAN Info</button>
                    {% if data.git_info %}
                        <button class="nav-link" id="nav-git-tab" data-bs-toggle="tab" data-bs-target="#nav-git"   role="tab" aria-controls="nav-git" aria-selected="false">GIT Info</button>
                    {% endif %}
                    <button class="nav-link" id="nav-python-tab" data-bs-toggle="tab" data-bs-target="#nav-python"   role="tab" aria-controls="nav-python" aria-selected="false">Python Info</button>
                    <button class="nav-link" id="nav-freeze-tab" data-bs-toggle="tab" data-bs-target="#nav-freeze"   role="tab" aria-controls="nav-freeze" aria-selected="false">PIP Freeze</button>
                    <button class="nav-link" id="nav-errors-tab" data-bs-toggle="tab" data-bs-target="#nav-errors"   role="tab" aria-controls="nav-errors" aria-selected="false">Errors</button>
                    {% block selfinfo_main_nav_tabs %}
                    {% endblock %}
                    </div>
                </nav>
            
                <div class="tab-content d-block" id="nav-data">
                    <div class="tab-pane fade show active" id="nav-system" role="tabpanel" aria-labelledby="nav-system-tab">
                        {% snippet 'selfinfo/snippets/self_system_info.html', data=data %}
                    </div>
                    <div class="tab-pane fade" id="nav-ckan" role="tabpanel" aria-labelledby="nav-ckan-tab">
                        <h2 class="mt-3">
                            CKAN Information
                        </h2>
                        <nav>
                            <div class="nav nav-tabs" id="nav-tab" role="tablist">
                            <button class="nav-link active" id="nav-ckan-tab-basic-tab" data-bs-toggle="tab" data-bs-target="#nav-ckan-tab-basic" role="tab" aria-controls="nav-ckan-tab-basic" aria-selected="true">Basic Info</button>
                            <button class="nav-link" id="nav-ckan-tab-actions-tab" data-bs-toggle="tab" data-bs-target="#nav-ckan-tab-actions" role="tab" aria-controls="nav-ckan-tab-actions" aria-selected="false">Actions</button>
                            <button class="nav-link" id="nav-ckan-tab-helpers-tab" data-bs-toggle="tab" data-bs-target="#nav-ckan-tab-helpers" role="tab" aria-controls="nav-ckan-tab-helpers" aria-selected="false">Helpers</button>
                            <button class="nav-link" id="nav-ckan-tab-blueprints-tab" data-bs-toggle="tab" data-bs-target="#nav-ckan-tab-blueprints" role="tab" aria-controls="nav-ckan-tab-blueprints" aria-selected="false">Blueprints</button>
                            </div>
                        </nav>
                        <div class="tab-content d-block">
                            <div class="tab-pane fade show active" id="nav-ckan-tab-basic" role="tabpanel" aria-labelledby="nav-ckan-tab-basic-tab">
                                {% snippet 'selfinfo/snippets/self_basic_info.html', data=data, status_show=status_show %}
                            </div>
                            <div class="tab-pane fade" id="nav-ckan-tab-actions" role="tabpanel" aria-labelledby="nav-ckan-tab-actions-tab">
                                {% snippet 'selfinfo/snippets/self_actions.html', data=data %}
                            </div>
                            <div class="tab-pane fade" id="nav-ckan-tab-helpers" role="tabpanel" aria-labelledby="nav-ckan-tab-helpers-tab">
                                {% snippet 'selfinfo/snippets/self_helpers.html', data=data %}
                            </div>
                            <div class="tab-pane fade" id="nav-ckan-tab-blueprints" role="tabpanel" aria-labelledby="nav-ckan-tab-blueprints-tab">
                                {% snippet 'selfinfo/snippets/self_blueprints.html', data=data %}
                            </div>
                        </div>
                    </div>
                    <div class="tab-pane fade" id="nav-git" role="tabpanel" aria-labelledby="nav-git-tab">
                        {% snippet 'selfinfo/snippets/self_git_info.html', data=data %}
                    </div>
                    <div class="tab-pane fade" id="nav-python" role="tabpanel" aria-labelledby="nav-python-tab">
                        {% snippet 'selfinfo/snippets/self_python_packages.html', data=data %}
                    </div>
                    <div class="tab-pane fade mt-3" id="nav-freeze" role="tabpanel" aria-labelledby="nav-freeze-tab">
                        {% snippet 'selfinfo/snippets/self_freeze.html', data=data %}
                    </div>
                    <div class="tab-pane fade mt-3" id="nav-errors" role="tabpanel" aria-labelledby="nav-errors-tab">
                        {% snippet 'selfinfo/snippets/self_errors.html', data=data %}
                    </div>
                    {% block selfinfo_main_content_tabs %}
                    {% endblock %}
                </div>
            </div>
            {% endblock %}        
        </div>
        </article>
    {% endblock %}
    </div>
{% endblock %}
