2018-05-05 12:40:41 +00:00
{% extends "base.html" %}
{% 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' %}
2018-05-07 19:09:56 +00:00
Log
{% else %}
Server
{% endif %}
< / 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 style = "width: 10%;" > Log files< / td >
{% 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 %}
2022-03-02 20:09:39 +00:00
< td style = "width: 10%;" > Number rows< / td >
< td class = "help_cursor" style = "width: 10%;" > < span title = "Find in a log file(supports regular expressions)" > Find< span > < / td >
< td class = "padding10 help_cursor" style = "width: 10%;" > < span title = "Exclude from search in a log file(supports regular expressions)" > Exclude< span > < / td >
2018-05-18 18:09:14 +00:00
< td style = "width: 10%;" >
2018-10-11 02:49:50 +00:00
< label for = "time_range_out_hour" style = "padding: 0" > Time range:< / 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 %}
2018-05-18 18:09:14 +00:00
< td class = "padding10" 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 >
2018-05-18 18:09:14 +00:00
< td class = "padding10" 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 >
2020-07-05 06:59:51 +00:00
< td class = "padding10" 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 >
2018-05-18 18:09:14 +00:00
< td class = "padding10" style = "width: 10%;" >
< div id = "time-range" > < / div >
< / td >
2022-03-02 20:09:39 +00:00
< td class = "padding10 first-collumn" style = "width: 1%;" >
2020-07-05 06:59:51 +00:00
< button type = "submit" name = "Show log" value = "Show" id = "show_log_button" > Show< / 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;" >
2022-07-30 17:00:36 +00:00
You can read the descriptions about all logs < a href = "https://roxy-wi.org/description/logs" title = "Servers description" target = "_blank" class = "link" > 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;" >
2022-07-30 17:00:36 +00:00
You can read the description about all logs file < a href = "https://roxy-wi.org/description/logs" title = "Servers description" target = "_blank" class = "link" > 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 %}