<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/aos.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/fa_all.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/index.css') }}">
    <link rel="shortcut icon" href="{{ url_for('static', filename='images/favicon.ico') }}">
    <title>{{ title }}</title>
</head>

<body>
    <!-- Loading screen -->
    <div class="overlay text-center">
        <img class="img-responsive align-middle loading-img"
            src="{{ url_for('static', filename='images/graphenex_logo_white.png') }}" alt="" height="200" width="200">
    </div>
    <!-- Loading screen end-->
    <div class="container text-center mt-4 mb-4">
        <div class="row">
            <div class="col-md-4" data-aos="fade-up">
                <!-- Left side (logo, info etc.) -->
                <div class="box deep">
                    <div class="row">
                        <div class="col col-md-12">
                            <img class="img-responsive"
                                src="{{ url_for('static', filename='images/graphenex_logo_white.png') }}" alt="logo"
                                height="200" width="200">
                        </div>
                        <div class="col col-md-12">
                            <h2>grapheneX</h2>
                            <p class="text-muted consolas">~ Automated System Hardening Framework.<br>
                                + Created for Linux & Windows.<br>
                                ><a href=" https://github.com/grapheneX" target="_blank">
                                    https://github.com/grapheneX</a><br>
                                - Copyright (C) 2019</p>
                        </div>
                    </div>
                    <!-- System information -->
                    <ul class="text-left" style="list-style-type: none;
                            padding: 0;
                            margin: 0;">
                        <li id="os"><b>OS: </b><span class="text-muted">{{ sys_info.system }}</span></li>
                        <li id="proc"><b>Processor: </b><span class="text-muted">{{ sys_info.processor }}</span></li>
                    </ul>
                    <!-- End System information -->
                    <p class="mt-4 text-left text-muted" style="font-size: 12px"><strong
                            id="modulecount">{{ mod_count }}</strong>
                        modules found.</p>

                </div>
                <div class="col-md-auto">
                    <button class="btn btn-block mt-2" data-toggle="modal" data-target="#addModuleModal" id="openModal"><i
                            class="fas fa-plus"></i> Add
                        Module</button>
                </div>
                <!-- Left side end -->
            </div>
            <div class="col-md-8 mt-3 mt-sm-0" data-aos="fade-up">
                <!-- Content -->
                <!-- Search bar etc. -->
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-8 text-left align-middle mt-1">
                            <h5>Available Modules</h5>
                        </div>
                        <div class="col-4 text-right">
                            <div class="dropdown">
                                <button class="btn dropdown-toggle deep" type="button" id="current_namespace"
                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <!-- Javascript render -->
                                </button>
                                <ul class="dropdown-menu" aria-labelledby="current_namespace" id="namespaces"></ul>
                            </div>
                        </div>
                    </div>
                    <!-- Search input -->
                    <div class="mt-3">
                        <form action="">
                            <input class="sr-bar" type="text" placeholder="Search Module" name="modulesearch"
                                style="background-color: #1E1E1E" id="module_search">
                            <button class="sr-btn" type="submit" id="btn_mod_search" disabled><i
                                    class="fa fa-search"></i></button>
                        </form>
                    </div>
                    <!-- End Search input -->
                </div>
                <!-- End Search bar etc. -->
                <!-- Modules -->
                <div id="modules" style="margin-top: 80px;"></div>
            </div>
        </div>

        <!-- Add module modal component -->
        <div class="modal fade" id="addModuleModal" tabindex="-1" role="dialog"
            aria-labelledby="addModuleModalCenterTitle" aria-hidden="true">
            <div class="modal-dialog modal-dialog-centered" role="document">
                <div class="modal-content addmd-modal">
                    <div class="modal-header">
                        <h5 class="modal-title" id="addModuleModalLongTitle">Add a new module</h5>
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                            <span aria-hidden="true" style="color: white;">&times;</span>
                        </button>
                    </div>
                    <div class="modal-body text-left">
                        <label for="amod_ns_list">Namespace</label>
                            <ul class="list-group" id="amod_ns_list">
                                <li class="list-group-item" id="ns_list_new">
                                    <div class="d-flex justify-content-between">
                                        New Namespace
                                        <i class="fas fa-plus"></i>
                                    </div>
                                </li>
                        </ul>
                        <div class="form-group">
                            <label for="amod_name">Module Name</label>
                            <input type="text" class="form-control" id="amod_name" placeholder="Name">
                        </div>
                        <div class="form-group">
                            <label for="amod_desc">Description</label>
                            <textarea class="form-control" id="amod_desc" spellcheck="false" rows="5" placeholder="Description"></textarea>
                        </div>
                        <div class="form-group">
                            <label for="amod_cmd">Command</label>
                            <textarea class="form-control consolas" spellcheck="false" id="amod_cmd"
                                rows="5" placeholder="Hardening Command"></textarea>
                        </div>
                        <div class="form-group">
                            <div class="input-group">
                                <div class="input-group-prepend">
                                    <div class="input-group-text">
                                        <input type="checkbox" id="amod_su">
                                    </div>
                                </div>
                                <div class="form-control" id="amod_su_label"><span style="color:#D8D8D8;">
                                    Requires Superuser Privileges</span></div>
                            </div>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-danger" data-dismiss="modal">Cancel <i
                                class="fas fa-times"></i></button>
                        <button type="button" class="btn btn-primary" onclick="saveModal()">Add <i class="fas fa-check"></i></button>
                    </div>
                </div>
            </div>
        </div>
        <div class="modal fade right" id="messageModal" tabindex="-1" role="dialog"
            aria-labelledby="messageModalCenterTitle" aria-hidden="true">
            <div class="modal-dialog modal-side modal-top-right" role="document">
                <div class="modal-content alert-primary p-1">
                </div>
            </div>
        </div>   
        <!-- Javascript includes -->
        <script src="{{ url_for('static', filename='js/jquery-3.2.1.js') }}"></script>
        <script src="{{ url_for('static', filename='js/popper.min.js') }}"></script>
        <script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
        <script src="{{ url_for('static', filename='js/aos.js') }}"></script>
        <script src="{{ url_for('static', filename='js/socket.io.min.js') }}"></script>
        <script src="{{ url_for('static', filename='js/listgroup.min.js') }}"></script>
        <script src="{{ url_for('static', filename='js/template.js') }}"></script>
        <script src="{{ url_for('static', filename='js/index.js') }}"></script>
</body>

</html>
