{% extends "report_base.html" %}
{% block content %}

<div class="container-fluid">

    <div class="page-header">
        <h1>{{ page_title }}</h1>
    </div>

    <ul class="nav nav-tabs">
        <li class="active"><a data-toggle="tab" data-target="#home">Summary</a></li>

    </ul>

    <div class="tab-content">

        <div id="home" class="tab-pane in active">

            <h2>Cluster Analysis</h2>

            <div class="panel-group">

                {{ macros.panel('Data sets', 'datasets', {}, tables=image_range_tables) }}

                <div class="panel panel-default">
                    <div class="panel-heading" data-toggle="collapse" data-target="#collapse_intensity_cluster">
                        <h4 class="panel-title">
                            <a>Data correlation matrices</a>
                        </h4>
                    </div>
                    <div id="collapse_intensity_cluster" class="panel-collapse collapse">
                        <div class="panel-body">

                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" data-target="#collapse_cc_cluster">
                                    <h4 class="panel-title">
                                        <a>Correlation coefficient clustering</a>
                                    </h4>
                                </div>
                                <div id="collapse_cc_cluster" class="panel-collapse collapse">
                                    <div class="panel-body">

                                        <div class="container-fluid">
                                            {{ macros.table(cc_cluster_table,
                                                has_column_header=true,
                                                has_row_header=true) }}
                                            {{ macros.plotly_graph("cc_cluster", cc_cluster_json, style="dendrogram-plot") }}
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" data-target="#collapse_cos_angle_cluster">
                                    <h4 class="panel-title">
                                        <a>Cos angle clustering</a>
                                    </h4>
                                </div>
                                <div id="collapse_cos_angle_cluster" class="panel-collapse collapse">
                                    <div class="panel-body">

                                        <div class="container-fluid">
                                            {{ macros.table(cos_angle_cluster_table,
                                                has_column_header=true,
                                                has_row_header=true) }}
                                            {{ macros.plotly_graph("cos_angle_cluster", cos_angle_cluster_json, style="dendrogram-plot") }}
                                        </div>

                                    </div>
                                </div>
                            </div>

                            {{ macros.panel('Cosym cluster plots', 'cosym_plots', cosym_graphs) }}

                            <div class="panel panel-default">
                                <div class="panel-heading" data-toggle="collapse" data-target="#collapse_pca">
                                    <h4 class="panel-title">
                                        <a>Principal component analysis</a>
                                    </h4>
                                </div>
                                <div id="collapse_pca" class="panel-collapse collapse">
                                    <div class="panel-body">

                                        <div class="container-fluid">
                                            {{ macros.plotly_graph("pca_analysis", pca_plot, style="dendrogram-plot") }}
                                        </div>
                                    </div>
                                </div>
                            </div>


                        </div>
                    </div>
                </div>

            </div>

        </div>

    </div>

</div>



{% endblock %}
