{% load logtailer_utils static %}
{% load i18n %}
<form id="logfile_form" action="">
	<div>
		<fieldset class="module aligned">
            <div class="form-row">
                <label>
                    {% trans "filters" %}:
                </label>
			    {% filters_select %}
                <input type="text" id="filter" class="vTextField"/>
                <span id="apply-filter-row">
                    <span id="apply-label">{% trans "apply" %}</span>
                    <input type="checkbox" id="apply-filter" value="1">
                </span>
            </div>
             <div class="form-row">
                <label>
                    {% trans "Last lines to read" %}:
                </label>
                <input type="text" id="history_lines" name="history_lines" class="vTextField" value="0"/>
            </div>
            <div class="form-row">
                <label>
                {% trans "auto_scroll" %}:
                </label>
                <input type="button" id="auto-scroll" value="ON">
            </div>
        </fieldset>
        <div class="submit-row">
                <input type="button" id="start-button" class="default" value="{% trans "start_read" %}">
                <input type="button" id="stop-button" class="default"  style="display: none;" value="{% trans "stop_read" %}">
                <input type="button" id="save-rows" value="{% trans "save_selected_rows" %}">
        </div>
		<div id="log-window-container">
		    <div id="log-window"></div>
		</div>
	</div>
</form>

    <div id="modal-overlay" class="modal-overlay hide">
        <div class="modal-wrapper">
            <div id="clipboard-form-container">
                <form id="clipboard-form" action="">
                    <h1>{% trans "save_logs" %}</h1>
                    <p><input type="text" size="40" placeholder="{% trans "name" %}" name="clipboard-name" id="clipboard-name"></p>
                    <p><textarea name="clipboard-notes" placeholder="{% trans "notes" %}" id="clipboard-notes" cols="40" rows="5"></textarea></p>
                    <p>
                        {% csrf_token %}
                        <input  type="hidden" id="clipboard-file" name = "clipboard-file" value="{{logfile_id}}"/>
                        <input  type="hidden" id="clipboard-logs" name = "clipboard-logs" />
                        <input  type="submit" id="clipboard-save" value="{% trans "save" %}" />
                        <input type="button"  id="close-modal-btn" value="{% trans "close" %}">
                    </p>
                    <p><span id="clipboard-error" style="color: red;"></span></p>
                </form>
            </div>
        </div>
    </div>
<script type="text/javascript" src="{% static 'logtailer/js/utils.js' %}"></script>
<script type="text/javascript" src="{% static 'logtailer/js/logtailer.js' %}"></script>
<script type="text/javascript">
	LogTailer.file_id = {{logfile_id}};
	var clipboard_url = "{% url "logtailer_save_to_clipboard" %}"
</script>
<script type="text/javascript" src="{% static 'logtailer/js/init.js' %}"></script>