{% extends "layouts/default.html" %}

{% block title %} Manage Objects {% endblock title %}

{% block stylesheets %}
<link rel="stylesheet" href="/static/assets/css/suggestags.css">
{% endblock stylesheets %}

{% block content %}

{% if current_user.is_authenticated %}
{{ form.hidden_tag() }}
<div class="page-inner">
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                    <div class="row">
                        <div class="col col-heading collapsed" href="#collapse_assets" title="Click to unfold"  data-toggle="collapse" aria-expanded="false" role="button"  aria-controls="collapse_assets">
                            <span class="accicon float-left mr-3"><i class="fas fa-angle-right rotate-icon"></i></span>
                            <div class="card-title">Assets types</div>
                        </div>
                        <div class="col">
                            <button type="button" class="btn btn-sm btn-dark float-right ml-2" onclick="refresh_asset_table();">
                                Refresh
                            </button>
                            <button class="btn btn-sm btn-dark float-right ml-2" onclick="add_asset_type();">Add new</button>
                        </div>
                    </div>
                </div>
                <div class="card-body collapse" id="collapse_assets">

                    <div class="table-responsive" id="assets_table_wrapper">
                        <div class="selectgroup">
                            <span id="table_buttons"></span>
                        </div>
                        <table class="table display table table-striped table-hover" width="100%"
                            cellspacing="0" id="assets_table">
                            <thead>
                                <tr>
                                    <th>Name</th>
                                    <th>Description</th>
                                    <th>Icon - not compromised</th>
                                    <th>Icon - compromised</th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <th>Name</th>
                                    <th>Description</th>
                                    <th>Icon - not compromised</th>
                                    <th>Icon - compromised</th>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header" >
                    <div class="row">
                        <div class="col col-heading collapsed" href="#collapse_ioc" title="Click to unfold"  data-toggle="collapse" role="button" aria-expanded="false" aria-controls="collapse_ioc">
                            <span class="accicon float-left mr-3"><i class="fas fa-angle-right rotate-icon"></i></span>
                            <div class="card-title">IOC types</div>
                        </div>
                        <div class="col float-right">
                            <button type="button" class="btn btn-sm btn-dark float-right ml-2" onclick="refresh_ioc_table();">
                                Refresh
                            </button>
                            <button class="btn btn-sm btn-dark float-right ml-2" onclick="add_ioc_type();">Add new</button>
                        </div>
                    </div>
                </div>
                <div class="card-body collapse" id="collapse_ioc">
                    <div class="table-responsive" id="ioc_table_wrapper">
                        <div class="selectgroup">
                            <span id="ioc_buttons"></span>
                        </div>
                        <table class="table display table table-striped table-hover" width="100%"
                            cellspacing="0" id="ioc_table">
                            <thead>
                                <tr>

                                    <th>Name</th>
                                    <th>Description</th>
                                    <th>Taxonomy</th>
                                    <th>Validation regex</th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <th>Name</th>
                                    <th>Description</th>
                                    <th>Taxonomy</th>
                                    <th>Validation regex</th>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header" >
                    <div class="row">
                        <div class="col col-heading collapsed" href="#collapse_classifications" title="Click to unfold"  data-toggle="collapse" role="button" aria-expanded="false" aria-controls="collapse_classifications">
                            <span class="accicon float-left mr-3"><i class="fas fa-angle-right rotate-icon"></i></span>
                            <div class="card-title">Case classifications</div>
                        </div>
                        <div class="col float-right">
                            <button type="button" class="btn btn-sm btn-dark float-right ml-2" onclick="refresh_classification_table();">
                                Refresh
                            </button>
                            <button class="btn btn-sm btn-dark float-right ml-2" onclick="add_classification();">Add new</button>
                        </div>
                    </div>
                </div>
                <div class="card-body collapse" id="collapse_classifications">
                    <div class="table-responsive" id="classification_table_wrapper">
                        <div class="selectgroup">
                            <span id="classification_buttons"></span>
                        </div>
                        <table class="table display table table-striped table-hover" width="100%"
                            cellspacing="0" id="classification_table">
                            <thead>
                                <tr>
                                    <th>Name</th>
                                    <th>Expanded name</th>
                                    <th>Description</th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <th>Name</th>
                                    <th>Expanded name</th>
                                    <th>Description</th>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header" >
                    <div class="row">
                        <div class="col col-heading collapsed" href="#collapse_state" title="Click to unfold"  data-toggle="collapse" role="button" aria-expanded="false" aria-controls="collapse_state">
                            <span class="accicon float-left mr-3"><i class="fas fa-angle-right rotate-icon"></i></span>
                            <div class="card-title">Case state</div>
                        </div>
                        <div class="col float-right">
                            <button type="button" class="btn btn-sm btn-dark float-right ml-2" onclick="refresh_state_table();">
                                Refresh
                            </button>
                            <button class="btn btn-sm btn-dark float-right ml-2" onclick="add_state();">Add new</button>
                        </div>
                    </div>
                </div>
                <div class="card-body collapse" id="collapse_state">
                    <div class="table-responsive" id="state_table_wrapper">
                        <div class="selectgroup">
                            <span id="state_buttons"></span>
                        </div>
                        <table class="table display table table-striped table-hover" width="100%"
                            cellspacing="0" id="state_table">
                            <thead>
                                <tr>
                                    <th>Name</th>
                                    <th>Description</th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <th>Name</th>
                                    <th>Description</th>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header" >
                    <div class="row">
                        <div class="col col-heading collapsed" href="#collapse_evidence" title="Click to unfold"  data-toggle="collapse" role="button" aria-expanded="false" aria-controls="collapse_evidence">
                            <span class="accicon float-left mr-3"><i class="fas fa-angle-right rotate-icon"></i></span>
                            <div class="card-title">Evidence types</div>
                        </div>
                        <div class="col float-right">
                            <button type="button" class="btn btn-sm btn-dark float-right ml-2" onclick="refresh_evidence_table();">
                                Refresh
                            </button>
                            <button class="btn btn-sm btn-dark float-right ml-2" onclick="add_evidence_type();">Add new</button>
                        </div>
                    </div>
                </div>
                <div class="card-body collapse" id="collapse_evidence">
                    <div class="table-responsive" id="evidence_table_wrapper">
                        <div class="selectgroup">
                            <span id="evidence_buttons"></span>
                        </div>
                        <table class="table display table table-striped table-hover" width="100%"
                            cellspacing="0" id="evidence_table">
                            <thead>
                                <tr>

                                    <th>Name</th>
                                    <th>Description</th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <th>Name</th>
                                    <th>Description</th>
                                </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>
    <div class="modal" tabindex="-1"  id="modal_add_type" data-backdrop="true">
        <div class="modal-lg modal-dialog" role="document">
            <div class="modal-content" id="modal_add_type_content">
    
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>
    {% endif %}

    {% endblock content %}

    {% block javascripts %}

    <script src="/static/assets/js/iris/manage.objects.js"></script>
    {% endblock javascripts %}