2018-05-05 12:40:41 +00:00
|
|
|
{% extends "base.html" %}
|
2023-02-13 14:45:45 +00:00
|
|
|
{% block title %}{{lang.menu_links.logs.h2}} {{service_name}}{% endblock %}
|
|
|
|
{% block h2 %}{{lang.menu_links.logs.h2}} {{service_name}}{% endblock %}
|
2018-05-05 12:40:41 +00:00
|
|
|
{% block content %}
|
2019-10-25 07:18:57 +00:00
|
|
|
{% from 'include/input_macros.html' import input, checkbox %}
|
2018-05-07 19:09:56 +00:00
|
|
|
<script src="/inc/users.js"></script>
|
2020-02-05 08:15:57 +00:00
|
|
|
<input type="hidden" id="service" value="{{service}}" />
|
2018-05-05 12:40:41 +00:00
|
|
|
<table class="overview">
|
|
|
|
<tr class="overviewHead">
|
2018-05-18 18:09:14 +00:00
|
|
|
<td class="padding10 first-collumn" style="width: 10%;">
|
2020-07-05 06:59:51 +00:00
|
|
|
{% if select_id == 'viewlogs' %}
|
2023-02-13 14:45:45 +00:00
|
|
|
{{lang.words.log|title()}}
|
2018-05-07 19:09:56 +00:00
|
|
|
{% else %}
|
2023-02-13 14:45:45 +00:00
|
|
|
{{lang.words.server|title()}}
|
2018-05-07 19:09:56 +00:00
|
|
|
{% endif %}
|
|
|
|
</td>
|
2022-03-26 20:23:02 +00:00
|
|
|
{% if waf != '1' and select_id != 'viewlogs' %}
|
2023-02-13 14:45:45 +00:00
|
|
|
<td style="width: 10%;">{{lang.words.log|title()}} {{lang.words.files|title()}}</td>
|
2022-03-02 20:09:39 +00:00
|
|
|
{% endif %}
|
2020-08-08 20:22:45 +00:00
|
|
|
{% if select_id != 'viewlogs' and service != 'nginx' %}
|
2018-08-23 14:27:28 +00:00
|
|
|
{% endif %}
|
2023-02-13 14:45:45 +00:00
|
|
|
<td style="width: 10%;">{{lang.words.number|title()}} {{lang.words.rows}}</td>
|
2023-04-09 13:11:16 +00:00
|
|
|
<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>
|
2018-05-18 18:09:14 +00:00
|
|
|
<td style="width: 10%;">
|
2023-02-13 14:45:45 +00:00
|
|
|
<label for="time_range_out_hour" style="padding: 0">{{lang.words.time_range|title()}}:</label>
|
2019-10-25 07:18:57 +00:00
|
|
|
{{ 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') }}
|
2018-05-18 18:09:14 +00:00
|
|
|
</td>
|
2020-07-05 06:59:51 +00:00
|
|
|
<td></td>
|
2018-05-05 12:40:41 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2018-05-18 18:09:14 +00:00
|
|
|
<td class="padding10 first-collumn" style="width: 10%;">
|
2020-07-05 06:59:51 +00:00
|
|
|
<form action="" method="post" id="show_log_form">
|
|
|
|
{% if select_id == 'viewlogs' %}
|
|
|
|
<select autofocus required name="serv" id="{{ select_id }}">
|
2021-08-08 13:02:00 +00:00
|
|
|
<option disabled selected>------</option>
|
2018-05-07 19:09:56 +00:00
|
|
|
{% for select in selects %}
|
2020-08-11 06:44:03 +00:00
|
|
|
{% if page == 'for_editor' %}
|
2021-07-23 06:49:59 +00:00
|
|
|
{% if select.1.startswith('roxy-wi') or select.1.startswith('config_edit') or select.1.startswith('port_sca') %}
|
|
|
|
{% if select.0 == serv %}
|
2020-08-11 06:44:03 +00:00
|
|
|
<option value="{{ select.0 }}" selected>{{ select.1 }}</option>
|
|
|
|
{% else %}
|
|
|
|
<option value="{{ select.0 }}">{{ select.1 }}</option>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2018-05-07 19:09:56 +00:00
|
|
|
{% else %}
|
2020-08-11 06:44:03 +00:00
|
|
|
{% if select.0|int() == serv|int() %}
|
|
|
|
<option value="{{ select.0 }}" selected>{{ select.1 }}</option>
|
|
|
|
{% else %}
|
|
|
|
<option value="{{ select.0 }}">{{ select.1 }}</option>
|
|
|
|
{% endif %}
|
2018-05-07 19:09:56 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2019-10-25 07:18:57 +00:00
|
|
|
</select>
|
2022-03-02 20:09:39 +00:00
|
|
|
{% else %}
|
|
|
|
{% include 'include/select.html' %}
|
|
|
|
{% endif %}
|
2018-08-17 11:55:17 +00:00
|
|
|
</td>
|
2022-03-26 20:23:02 +00:00
|
|
|
{% if waf != '1' and select_id != 'viewlogs' %}
|
2022-03-02 20:09:39 +00:00
|
|
|
<td id="remote_log_files"></td>
|
2018-08-23 14:27:28 +00:00
|
|
|
{% endif %}
|
2023-04-09 13:11:16 +00:00
|
|
|
<td style="width: 10%;">
|
2022-03-02 20:09:39 +00:00
|
|
|
{{ input('rows', type='number', value=rows, required='required', style='width: 110px;') }}
|
2018-05-05 12:40:41 +00:00
|
|
|
</td>
|
2023-04-09 13:11:16 +00:00
|
|
|
<td style="width: 10%;">
|
2022-03-02 20:09:39 +00:00
|
|
|
{{ input('grep', value=grep, style='width: 110px;') }}
|
2018-05-05 12:40:41 +00:00
|
|
|
</td>
|
2023-04-09 13:11:16 +00:00
|
|
|
<td style="width: 10%;">
|
2022-03-02 20:09:39 +00:00
|
|
|
{{ input('exgrep', value=exgrep, style='width: 110px;') }}
|
2020-07-05 06:59:51 +00:00
|
|
|
</td>
|
2023-04-09 13:11:16 +00:00
|
|
|
<td style="width: 10%;">
|
2018-05-18 18:09:14 +00:00
|
|
|
<div id="time-range"></div>
|
|
|
|
</td>
|
2022-03-02 20:09:39 +00:00
|
|
|
<td class="padding10 first-collumn" style="width: 1%;">
|
2023-02-13 14:45:45 +00:00
|
|
|
<button type="submit" name="Show log" value="Show" id="show_log_button">{{lang.words.show|title()}}</button>
|
2018-05-05 12:40:41 +00:00
|
|
|
</form>
|
2018-05-18 18:09:14 +00:00
|
|
|
</td>
|
2018-05-05 12:40:41 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
2021-08-08 13:02:00 +00:00
|
|
|
<div id="ajax"></div>
|
2021-07-23 06:49:59 +00:00
|
|
|
{% if select_id == 'viewlogs' and serv != '' and viewlogs != '' and viewlogs != 'roxy-wi.error.log' and viewlogs != 'roxy-wi.access.log' %}
|
2019-09-29 20:16:24 +00:00
|
|
|
<script>
|
|
|
|
viewLogs()
|
2019-12-04 05:43:03 +00:00
|
|
|
if (window.matchMedia('(max-width: 786px)').matches || window.matchMedia('(max-width: 1024px)').matches || window.matchMedia('(max-width: 667px)').matches) {
|
|
|
|
$( "#viewlogs" ).selectmenu({
|
|
|
|
width: 150
|
|
|
|
});
|
|
|
|
}
|
2019-09-29 20:16:24 +00:00
|
|
|
</script>
|
2019-10-02 06:35:34 +00:00
|
|
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
2023-02-13 14:45:45 +00:00
|
|
|
{{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>
|
2021-08-08 13:02:00 +00:00
|
|
|
</div>
|
2021-07-23 06:49:59 +00:00
|
|
|
{% elif serv == 'roxy-wi.error.log' or serv == 'roxy-wi.access.log' %}
|
2019-09-29 20:16:24 +00:00
|
|
|
<script>
|
|
|
|
showApacheLog('{{serv}}');
|
|
|
|
</script>
|
2019-10-02 06:35:34 +00:00
|
|
|
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
2023-02-13 14:45:45 +00:00
|
|
|
{{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>
|
2021-08-08 13:02:00 +00:00
|
|
|
</div>
|
2019-09-29 20:16:24 +00:00
|
|
|
{% else %}
|
|
|
|
<script>
|
2019-10-04 06:23:48 +00:00
|
|
|
{% if waf == '1' %}
|
|
|
|
$('#waf').prop('checked', true);
|
|
|
|
{% endif %}
|
2022-03-02 20:09:39 +00:00
|
|
|
{% if waf != '1' %}
|
2022-07-30 17:00:36 +00:00
|
|
|
{% if remote_file %}
|
|
|
|
showLog()
|
|
|
|
{% else %}
|
|
|
|
showRemoteLogFiles()
|
|
|
|
$( "#serv" ).on('selectmenuchange',function() {
|
|
|
|
showRemoteLogFiles();
|
|
|
|
});
|
|
|
|
{% endif %}
|
2022-03-02 20:09:39 +00:00
|
|
|
{% else %}
|
|
|
|
showLog()
|
|
|
|
{% endif %}
|
|
|
|
|
2019-12-04 05:43:03 +00:00
|
|
|
if (window.matchMedia('(max-width: 786px)').matches || window.matchMedia('(max-width: 1024px)').matches || window.matchMedia('(max-width: 667px)').matches) {
|
|
|
|
$( "#serv" ).selectmenu({
|
|
|
|
width: 150
|
|
|
|
});
|
2022-03-02 20:09:39 +00:00
|
|
|
$( "#log_files" ).selectmenu({
|
|
|
|
width: 150
|
|
|
|
});
|
2019-12-04 05:43:03 +00:00
|
|
|
}
|
2019-09-29 20:16:24 +00:00
|
|
|
</script>
|
|
|
|
{% endif %}
|
2018-05-05 12:40:41 +00:00
|
|
|
{% endblock %}
|