<commit_before><!DOCTYPE html>
<html lang="en">
    <head>
        <title>Environment log viewer - plots</title>
        <meta charset="utf-8" />

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
              integrity="<KEY>"
              crossorigin="anonymous">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.css" />
        <style>
            input[type="text"] {
                width: 100px;
            }
            .leftMargin {
                margin-left: 30px;
            }
            .clearBoth {
                clear: both;
            }
            .displayNone {
                display: none;
            }
            .noData {
                color: red;
                font-size: 1.2em;
                font-weight: bold;
                display: none;
            }
            .noProfiles {
                font-size: 1.2em;
                font-weight: bold;
            }
            #plotControls > div > label {
                margin-right: 10px;
            }
            #yardcamImage {
                height: auto;
                width: auto;
                max-width: 700px;
                max-height: 700px;
            }
            div.dygraph-title {
                font-size: 0.85em;
            }
            .boldText {
                font-weight: bold;
            }
            #profilesDiv {
                padding: 10px;
                width: 20%;
            }
            #submitBtn {
                margin-left: 30px;
            }
        </style>
    </head>
    <body>
        <div style="position: absolute; top: 20px; right: 20px;">
            {% if logged-in? %}
                <span id="showProfiles" class="boldText" style="margin-right: 15px; cursor: pointer;">Profiles</span>
                <a href="logout" class="boldText">Log out</a>
            {% else %}
                <a href="login" class="boldText">Log in</a>
            {% endif %}
        </div>
        <h2 class="leftMargin" style="margin-bottom: 15px;">Environment observations</h2>
        <div class="leftMargin displayNone" id="lastObservation" style="margin-bottom: 15px;"></div>

        {% if logged-in? %}
            <div id="profilesDiv" class="panel panel-default leftMargin displayNone">
                <h4>Profiles</h4>
                <span id="noProfiles" class="noProfiles {% if profiles|not-empty %}displayNone{% endif %}">No profiles</span>
                <select id="profiles" {% if profiles|empty? %}class="displayNone"{% endif %}>
                    {% for prof in profiles %}
                        <option value="{{ prof.profile }}">{{ prof.name }}</option>
                    {% endfor %}
                </select>
                <br><br>
                <input type="button" class="btn btn-primary {% if profiles|empty? %}displayNone{% endif %}" id="applyProfile" value="Apply">
                <input type="button" class="btn btn-danger {% if profiles|empty? %}displayNone{% endif %}" id="deleteProfile" value="Delete">
                <input type="button" class="btn btn-default" id="newProfile" value="New" style="margin-left: 30px;">
                <div id="newProfileDiv" class="displayNone">
                    <br>
                    <label for="profileName">Profile name</label>
                    <input type="text" name="profileName" id="profileName" style="width: 190px;" maxlength="100">
                    <br><br>
                    <input type="button" class="btn btn-primary" id="saveProfile" value="Save">
                    <input type="button" class="btn btn-danger" id="cancelProfile" value="Cancel">
                </div>
            </div>
        {% endif %}
        <div class="leftMargin clearBoth">
            <h4>Date interval to show</h4>
            <form method="get" action="">
                <input type="text" name="startDate" id="startDate" value="{{start-date}}">&nbsp;-&nbsp;
                <input type="text" name="endDate" id="endDate" value="{{end-date}}">
                <input type="submit" class="btn btn-primary" id="submitBtn" value="Refresh">
            </form>
        </div>
        <div>
            <div id="graphDiv" style="float: left;">
                <span id="noDataError" class="leftMargin noData">No observations found</span>
            </div>
            <div id="labelDiv" style="float: left;"></div>
        </div>
        <span id="plotData" class="displayNone">{{ data }}</span>

        <div id="plotControls">
            <div class="leftMargin clearBoth checkboxes">
                {% if logged-in? %}
                    <input type="checkbox" class="selectBox" id="showTemperature" checked="checked">
                    <label for="showTemperature">Inside temperature</label>
                    <input type="checkbox" class="selectBox" id="showOutsideTemperature" checked="checked">
                    <label for="showOutsideTemperature">Temperature (outside)</label>
                    <input type="checkbox" class="selectBox" id="showFMITemperature" checked="checked">
                    <label for="showFMITemperature">Temperature (FMI)</label>
                    <input type="checkbox" class="selectBox" id="showTempDelta" checked="checked">
                    <label for="showTempDelta">Temperature delta</label>
                    <input type="checkbox" id="showAll" style="margin-left: 180px;">
                    <label for="showAll" id="showAllLabel">Show all</label>
                    <br>
                    <input type="checkbox" class="selectBox" id="showBrightness" checked="checked">
                    <label for="showBrightness">Brightness</label>
                    <input type="checkbox" class="selectBox" id="showCloudiness" checked="checked">
                    <label for="showCloudiness">Cloudiness</label>
                    <input type="checkbox" class="selectBox" id="showPressure">
                    <label for="showPressure">Pressure (FMI)</label>
                    <br>
                    <input type="checkbox" class="selectBox" id="showBeacon" checked="checked">
                    <label id="showBeaconLabel" for="showBeacon">Beacon</label>
                    {% if ruuvitag-enabled? %}
                        <input type="checkbox" class="selectBox" id="showRTTemperature" checked="checked">
                        <label for="showRTTemperature">RuuviTag inside temperature</label>
                        <input type="checkbox" class="selectBox" id="showRTHumidity" checked="checked">
                        <label for="showRTHumidity">RuuviTag humidity</label>
                    {% endif %}
                {% else %}
                    <input type="checkbox" class="selectBox" id="showOutsideTemperature" checked="checked">
                    <label for="showOutsideTemperature">Temperature (outside)</label>
                    <input type="checkbox" class="selectBox" id="showFMITemperature" checked="checked">
                    <label for="showFMITemperature">Temperature (FMI)</label>
                    <input type="checkbox" class="selectBox" id="showTempDelta" checked="checked">
                    <label for="showTempDelta">Temperature delta</label>
                    <input type="checkbox" class="selectBox" id="showCloudiness" checked="checked">
                    <label for="showCloudiness">Cloudiness</label>
                    <input type="checkbox" class="selectBox" id="showPressure">
                    <label for="showPressure">Pressure (FMI)</label>
                    <input type="checkbox" id="showAll" style="margin-left: 100px;">
                    <label for="showAll" id="showAllLabel">Show all</label>
                {% endif %}
            </div>
        </div>
        <div id="imageButtonDiv" class="leftMargin">
            <input type="checkbox" id="showImages">
            <label for="showImages">Show image{% if logged-in? %}s{% endif %}</label>
        </div>
        <div id="imageDiv" class="leftMargin displayNone" style="margin-bottom: 20px;">
            <img src="" id="testbedImage" alt="FMI Testbed image">
            {% if logged-in? %}
                <a id="yardcamImageLink" href="" target="_blank">
                    <img src="" id="yardcamImage" alt="Yardcam image"
                         style="margin-left: 40px;">
                </a>
            {% endif %}
        </div>

        <script src="https://code.jquery.com/jquery-3.4.1.min.js"
                integrity="<KEY>
                crossorigin="anonymous"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
                integrity="<KEY>"
                crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
        <script>
            var mode = '{% if logged-in? %}all{% else %}weather{% endif %}',
                ruuvitagEnabled = {% if ruuvitag-enabled? %}true{% else %}false{% endif %},
                ycImageBasepath = '{{ yc-image-basepath }}',
                tbImageBasepath = '{{ tb-image-basepath }}',
                socket = new WebSocket('{{ ws-url }}');
        </script>
        <script src="js/plots.js"></script>
        {% if logged-in? %}
            <script src="js/profiles.js"></script>
        {% endif %}
        <script>
            var datepickerOptions = {
                format: 'dd.mm.yyyy',
                weekStart: 1,
                endDate: new Date().toLocaleDateString().replace(/\//g, '.'),
                todayBtn: true,
                calendarWeeks: true,
                autoclose: true
            };<commit_msg>Update frontend library versions<commit_after><!DOCTYPE html>
<html lang="en">
    <head>
        <title>Environment log viewer - plots</title>
        <meta charset="utf-8" />

        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
              integrity="<KEY>"
              crossorigin="anonymous">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.min.css">
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.css" />
        <style>
            input[type="text"] {
                width: 100px;
            }
            .leftMargin {
                margin-left: 30px;
            }
            .clearBoth {
                clear: both;
            }
            .displayNone {
                display: none;
            }
            .noData {
                color: red;
                font-size: 1.2em;
                font-weight: bold;
                display: none;
            }
            .noProfiles {
                font-size: 1.2em;
                font-weight: bold;
            }
            #plotControls > div > label {
                margin-right: 10px;
            }
            #yardcamImage {
                height: auto;
                width: auto;
                max-width: 700px;
                max-height: 700px;
            }
            div.dygraph-title {
                font-size: 0.85em;
            }
            .boldText {
                font-weight: bold;
            }
            #profilesDiv {
                padding: 10px;
                width: 20%;
            }
            #submitBtn {
                margin-left: 30px;
            }
        </style>
    </head>
    <body>
        <div style="position: absolute; top: 20px; right: 20px;">
            {% if logged-in? %}
                <span id="showProfiles" class="boldText" style="margin-right: 15px; cursor: pointer;">Profiles</span>
                <a href="logout" class="boldText">Log out</a>
            {% else %}
                <a href="login" class="boldText">Log in</a>
            {% endif %}
        </div>
        <h2 class="leftMargin" style="margin-bottom: 15px;">Environment observations</h2>
        <div class="leftMargin displayNone" id="lastObservation" style="margin-bottom: 15px;"></div>

        {% if logged-in? %}
            <div id="profilesDiv" class="panel panel-default leftMargin displayNone">
                <h4>Profiles</h4>
                <span id="noProfiles" class="noProfiles {% if profiles|not-empty %}displayNone{% endif %}">No profiles</span>
                <select id="profiles" {% if profiles|empty? %}class="displayNone"{% endif %}>
                    {% for prof in profiles %}
                        <option value="{{ prof.profile }}">{{ prof.name }}</option>
                    {% endfor %}
                </select>
                <br><br>
                <input type="button" class="btn btn-primary {% if profiles|empty? %}displayNone{% endif %}" id="applyProfile" value="Apply">
                <input type="button" class="btn btn-danger {% if profiles|empty? %}displayNone{% endif %}" id="deleteProfile" value="Delete">
                <input type="button" class="btn btn-default" id="newProfile" value="New" style="margin-left: 30px;">
                <div id="newProfileDiv" class="displayNone">
                    <br>
                    <label for="profileName">Profile name</label>
                    <input type="text" name="profileName" id="profileName" style="width: 190px;" maxlength="100">
                    <br><br>
                    <input type="button" class="btn btn-primary" id="saveProfile" value="Save">
                    <input type="button" class="btn btn-danger" id="cancelProfile" value="Cancel">
                </div>
            </div>
        {% endif %}
        <div class="leftMargin clearBoth">
            <h4>Date interval to show</h4>
            <form method="get" action="">
                <input type="text" name="startDate" id="startDate" value="{{start-date}}">&nbsp;-&nbsp;
                <input type="text" name="endDate" id="endDate" value="{{end-date}}">
                <input type="submit" class="btn btn-primary" id="submitBtn" value="Refresh">
            </form>
        </div>
        <div>
            <div id="graphDiv" style="float: left;">
                <span id="noDataError" class="leftMargin noData">No observations found</span>
            </div>
            <div id="labelDiv" style="float: left;"></div>
        </div>
        <span id="plotData" class="displayNone">{{ data }}</span>

        <div id="plotControls">
            <div class="leftMargin clearBoth checkboxes">
                {% if logged-in? %}
                    <input type="checkbox" class="selectBox" id="showTemperature" checked="checked">
                    <label for="showTemperature">Inside temperature</label>
                    <input type="checkbox" class="selectBox" id="showOutsideTemperature" checked="checked">
                    <label for="showOutsideTemperature">Temperature (outside)</label>
                    <input type="checkbox" class="selectBox" id="showFMITemperature" checked="checked">
                    <label for="showFMITemperature">Temperature (FMI)</label>
                    <input type="checkbox" class="selectBox" id="showTempDelta" checked="checked">
                    <label for="showTempDelta">Temperature delta</label>
                    <input type="checkbox" id="showAll" style="margin-left: 180px;">
                    <label for="showAll" id="showAllLabel">Show all</label>
                    <br>
                    <input type="checkbox" class="selectBox" id="showBrightness" checked="checked">
                    <label for="showBrightness">Brightness</label>
                    <input type="checkbox" class="selectBox" id="showCloudiness" checked="checked">
                    <label for="showCloudiness">Cloudiness</label>
                    <input type="checkbox" class="selectBox" id="showPressure">
                    <label for="showPressure">Pressure (FMI)</label>
                    <br>
                    <input type="checkbox" class="selectBox" id="showBeacon" checked="checked">
                    <label id="showBeaconLabel" for="showBeacon">Beacon</label>
                    {% if ruuvitag-enabled? %}
                        <input type="checkbox" class="selectBox" id="showRTTemperature" checked="checked">
                        <label for="showRTTemperature">RuuviTag inside temperature</label>
                        <input type="checkbox" class="selectBox" id="showRTHumidity" checked="checked">
                        <label for="showRTHumidity">RuuviTag humidity</label>
                    {% endif %}
                {% else %}
                    <input type="checkbox" class="selectBox" id="showOutsideTemperature" checked="checked">
                    <label for="showOutsideTemperature">Temperature (outside)</label>
                    <input type="checkbox" class="selectBox" id="showFMITemperature" checked="checked">
                    <label for="showFMITemperature">Temperature (FMI)</label>
                    <input type="checkbox" class="selectBox" id="showTempDelta" checked="checked">
                    <label for="showTempDelta">Temperature delta</label>
                    <input type="checkbox" class="selectBox" id="showCloudiness" checked="checked">
                    <label for="showCloudiness">Cloudiness</label>
                    <input type="checkbox" class="selectBox" id="showPressure">
                    <label for="showPressure">Pressure (FMI)</label>
                    <input type="checkbox" id="showAll" style="margin-left: 100px;">
                    <label for="showAll" id="showAllLabel">Show all</label>
                {% endif %}
            </div>
        </div>
        <div id="imageButtonDiv" class="leftMargin">
            <input type="checkbox" id="showImages">
            <label for="showImages">Show image{% if logged-in? %}s{% endif %}</label>
        </div>
        <div id="imageDiv" class="leftMargin displayNone" style="margin-bottom: 20px;">
            <img src="" id="testbedImage" alt="FMI Testbed image">
            {% if logged-in? %}
                <a id="yardcamImageLink" href="" target="_blank">
                    <img src="" id="yardcamImage" alt="Yardcam image"
                         style="margin-left: 40px;">
                </a>
            {% endif %}
        </div>

        <script src="https://code.jquery.com/jquery-3.5.1.min.js"
	        integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
	        crossorigin="anonymous"></script>
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
                integrity="<KEY>"
                crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/dygraph/2.1.0/dygraph.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.27.0/moment.min.js"></script>
        <script>
            var mode = '{% if logged-in? %}all{% else %}weather{% endif %}',
                ruuvitagEnabled = {% if ruuvitag-enabled? %}true{% else %}false{% endif %},
                ycImageBasepath = '{{ yc-image-basepath }}',
                tbImageBasepath = '{{ tb-image-basepath }}',
                socket = new WebSocket('{{ ws-url }}');
        </script>
        <script src="js/plots.js"></script>
        {% if logged-in? %}
            <script src="js/profiles.js"></script>
        {% endif %}
        <script>
            var datepickerOptions = {
                format: 'dd.mm.yyyy',
                weekStart: 1,
                endDate: new Date().toLocaleDateString().replace(/\//g, '.'),
                todayBtn: true,
                calendarWeeks: true,
                autoclose: true
            };
{'fraction_non_alphanumeric': 0.14746748127709894, 'fraction_numerical': 0.009016554986204179, 'mean_word_length': 1.809273356401384, 'pattern_counts': {'":': 0, '<': 316, '<?xml version=': 0, '>': 320, 'https://': 16, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '780344', 'n_tokens_mistral': 5891, 'n_tokens_neox': 5347, 'n_words': 1039}