<!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" type="text/css" href="{{ url_for('scheduler/static', file='css/font-awesome.min.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ url_for('scheduler/static', file='css/skeleton-2.0.4.min.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ url_for('scheduler/static', file='css/normalize-3.0.2.min.css') }}">
        <link rel="stylesheet" type="text/css" href="{{ url_for('scheduler/static', file='css/index.css') }}">
        <script type="text/javascript" src="{{ url_for('scheduler/static', file='js/jquery-3.4.1.min.js') }}"></script>
        <script type="text/javascript" src="{{ url_for('scheduler/static', file='js/mx_utils.js') }}"></script>
        <title>Object Viewer</title>
    </head>

    <body>
        <div class="container-fluid">
            <pre id="json" class="container-scroll"></pre>
        </div>
        <div class="flex-bottom container-close justify-center">
            <form class="justify-center">
                <button type="button" class="action_button btn-center" onclick="window.close()">
                    <i class="fa fa-remove"></i><span>Close</span></button>
                <button type="button" class="action_button btn-center" onclick="window.location.reload();">
                    <i class="fa fa-refresh"></i><span>Refresh</span></button>
            </form>
        </div>

        <script type="text/javascript">
            $(function () {
                let action = getUrlParameter('action');
                let params = window.location.search.substring(1);
                let url = decodeURIComponent(`/${action}/?${params}`);

                $.get(url, function (data) {
                    $("#json").text(formatJSON(data));
                });
            });
        </script>
    </body>

</html>