mirror of https://github.com/Aidaho12/haproxy-wi
129 lines
5.1 KiB
HTML
129 lines
5.1 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}{{lang.menu_links.logs.h2}} {{service_name}}{% endblock %}
|
|
{% block h2 %}{{lang.menu_links.logs.h2}} {{service_name}}{% endblock %}
|
|
{% block content %}
|
|
{% from 'include/input_macros.html' import input, checkbox %}
|
|
<script src="/inc/users.js"></script>
|
|
<input type="hidden" id="service" value="{{service}}" />
|
|
<table class="overview">
|
|
<tr class="overviewHead">
|
|
<td class="padding10 first-collumn" style="width: 10%;">
|
|
{% if select_id == 'viewlogs' %}
|
|
{{lang.words.log|title()}}
|
|
{% else %}
|
|
{{lang.words.server|title()}}
|
|
{% endif %}
|
|
</td>
|
|
{% if waf != '1' and select_id != 'viewlogs' %}
|
|
<td style="width: 10%;">{{lang.words.log|title()}} {{lang.words.files|title()}}</td>
|
|
{% endif %}
|
|
{% if select_id != 'viewlogs' and service != 'nginx' %}
|
|
{% endif %}
|
|
<td style="width: 10%;">{{lang.words.number|title()}} {{lang.words.rows}}</td>
|
|
<td class="help_cursor" style="width: 10%;" title="" data-help="{{lang.phrases.find_in_log}}">{{lang.words.find|title()}}</td>
|
|
<td class="help_cursor" style="width: 10%;" title="" data-help="{{lang.phrases.exclude_in_log}}">{{lang.words.exclude|title()}}</td>
|
|
<td style="width: 10%;">
|
|
<label for="time_range_out_hour" style="padding: 0">{{lang.words.time_range|title()}}:</label>
|
|
{{ input('time_range_out_hour', value=hour, class='time-range', readonly='readonly') }}:{{ input('time_range_out_minut', value=minut, class='time-range', readonly='readonly') }}
|
|
{{ input('time_range_out_hour1', value=hour1, class='time-range', readonly='readonly') }}:{{ input('time_range_out_minut1', value=minut1, class='time-range', readonly='readonly') }}
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="padding10 first-collumn" style="width: 10%;">
|
|
<form action="" method="post" id="show_log_form">
|
|
{% if select_id == 'viewlogs' %}
|
|
<select autofocus required name="serv" id="{{ select_id }}">
|
|
<option disabled selected>------</option>
|
|
{% for select in selects %}
|
|
{% if page == 'for_editor' %}
|
|
{% if select.1.startswith('roxy-wi') or select.1.startswith('config_edit') or select.1.startswith('port_sca') %}
|
|
{% if select.0 == serv %}
|
|
<option value="{{ select.0 }}" selected>{{ select.1 }}</option>
|
|
{% else %}
|
|
<option value="{{ select.0 }}">{{ select.1 }}</option>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% else %}
|
|
{% if select.0|int() == serv|int() %}
|
|
<option value="{{ select.0 }}" selected>{{ select.1 }}</option>
|
|
{% else %}
|
|
<option value="{{ select.0 }}">{{ select.1 }}</option>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</select>
|
|
{% else %}
|
|
{% include 'include/select.html' %}
|
|
{% endif %}
|
|
</td>
|
|
{% if waf != '1' and select_id != 'viewlogs' %}
|
|
<td id="remote_log_files"></td>
|
|
{% endif %}
|
|
<td style="width: 10%;">
|
|
{{ input('rows', type='number', value=rows, required='required', style='width: 110px;') }}
|
|
</td>
|
|
<td style="width: 10%;">
|
|
{{ input('grep', value=grep, style='width: 110px;') }}
|
|
</td>
|
|
<td style="width: 10%;">
|
|
{{ input('exgrep', value=exgrep, style='width: 110px;') }}
|
|
</td>
|
|
<td style="width: 10%;">
|
|
<div id="time-range"></div>
|
|
</td>
|
|
<td class="padding10 first-collumn" style="width: 1%;">
|
|
<button type="submit" name="Show log" value="Show" id="show_log_button">{{lang.words.show|title()}}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div id="ajax"></div>
|
|
{% if select_id == 'viewlogs' and serv != '' and viewlogs != '' and viewlogs != 'roxy-wi.error.log' and viewlogs != 'roxy-wi.access.log' %}
|
|
<script>
|
|
viewLogs()
|
|
if (window.matchMedia('(max-width: 786px)').matches || window.matchMedia('(max-width: 1024px)').matches || window.matchMedia('(max-width: 667px)').matches) {
|
|
$( "#viewlogs" ).selectmenu({
|
|
width: 150
|
|
});
|
|
}
|
|
</script>
|
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
|
{{lang.phrases.read_about_files}} <a href="https://roxy-wi.org/description/logs" title="{{lang.words.servers|title()}} {{lang.words.desc}}" target="_blank" class="link">{{lang.words.here}}</a>
|
|
</div>
|
|
{% elif serv == 'roxy-wi.error.log' or serv == 'roxy-wi.access.log' %}
|
|
<script>
|
|
showApacheLog('{{serv}}');
|
|
</script>
|
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
|
{{lang.phrases.read_about_files}} <a href="https://roxy-wi.org/description/logs" title="{{lang.words.servers|title()}} {{lang.words.desc}}" target="_blank" class="link">{{lang.words.here}}</a>
|
|
</div>
|
|
{% else %}
|
|
<script>
|
|
{% if waf == '1' %}
|
|
$('#waf').prop('checked', true);
|
|
{% endif %}
|
|
{% if waf != '1' %}
|
|
{% if remote_file %}
|
|
showLog()
|
|
{% else %}
|
|
showRemoteLogFiles()
|
|
$( "#serv" ).on('selectmenuchange',function() {
|
|
showRemoteLogFiles();
|
|
});
|
|
{% endif %}
|
|
{% else %}
|
|
showLog()
|
|
{% endif %}
|
|
|
|
if (window.matchMedia('(max-width: 786px)').matches || window.matchMedia('(max-width: 1024px)').matches || window.matchMedia('(max-width: 667px)').matches) {
|
|
$( "#serv" ).selectmenu({
|
|
width: 150
|
|
});
|
|
$( "#log_files" ).selectmenu({
|
|
width: 150
|
|
});
|
|
}
|
|
</script>
|
|
{% endif %}
|
|
{% endblock %} |