mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-04-04 19:58:49 +02:00
Improvements to log viewer
This commit is contained in:
@@ -6,6 +6,7 @@ logo_text: ''
|
||||
body_classes: ''
|
||||
content_padding: true
|
||||
twofa_enabled: true
|
||||
log_viewer_files: ['grav', 'email']
|
||||
sidebar:
|
||||
activate: tab
|
||||
hover_delay: 100
|
||||
|
||||
@@ -253,6 +253,15 @@ form:
|
||||
label: Hide modular page types in Admin
|
||||
value_only: true
|
||||
|
||||
log_viewer_files:
|
||||
type: selectize
|
||||
size: medium
|
||||
label: PLUGIN_ADMIN.LOG_VIEWER_FILES
|
||||
help: PLUGIN_ADMIN.LOG_VIEWER_FILES_HELP
|
||||
classes: fancy
|
||||
validate:
|
||||
type: commalist
|
||||
|
||||
MediaResize:
|
||||
type: section
|
||||
title: Page Media Image Resizer
|
||||
|
||||
@@ -782,5 +782,7 @@ PLUGIN_ADMIN:
|
||||
UPLOADS_DANGEROUS_EXTENSIONS_HELP: "Block these extensions from being uploaded no matter the accepted MIME types"
|
||||
REPORTS: "Reports"
|
||||
LOGS: "Logs"
|
||||
LOG_VIEWER_FILES: "Log Viewer Files"
|
||||
LOG_VIEWER_FILES_HELP: "Files in /logs/ that will be available to view in Tools - Logs. e.g. 'grav' = /logs/grav.log"
|
||||
|
||||
|
||||
|
||||
2
themes/grav/css-compiled/template.css
vendored
2
themes/grav/css-compiled/template.css
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1243,11 +1243,20 @@ body.sidebar-quickopen #admin-main {
|
||||
.logs-output {
|
||||
|
||||
form {
|
||||
float: right;
|
||||
|
||||
.form-select {
|
||||
display: inline-block;
|
||||
width: auto;
|
||||
.form-data {
|
||||
display: flex;
|
||||
margin: 0 -0.5rem;
|
||||
|
||||
@include breakpoint(small-mobile-range) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.forms-select-wrapper {
|
||||
display: block;
|
||||
flex: 1;
|
||||
margin: 0.5rem 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1258,6 +1267,10 @@ body.sidebar-quickopen #admin-main {
|
||||
h3 {
|
||||
padding: 0.5rem 1.5rem;
|
||||
font-size: 1.1rem;
|
||||
|
||||
@include breakpoint(mobile-only) {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
}
|
||||
table.noflex {
|
||||
|
||||
@@ -1287,6 +1300,7 @@ body.sidebar-quickopen #admin-main {
|
||||
|
||||
td.message {
|
||||
width: 100%;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.trace {
|
||||
@@ -1297,10 +1311,11 @@ body.sidebar-quickopen #admin-main {
|
||||
|
||||
code {
|
||||
font-size: 0.7rem;
|
||||
display: block;
|
||||
white-space: pre-wrap
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -382,8 +382,6 @@ form {
|
||||
}
|
||||
|
||||
.switch-toggle {
|
||||
// margin-left: 30%;
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@@ -70,18 +70,6 @@ i.fa {
|
||||
}
|
||||
}
|
||||
|
||||
// Blockquote
|
||||
blockquote {
|
||||
p {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
cite {
|
||||
display: block;
|
||||
text-align: right;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 2rem;
|
||||
border-radius: 3px;
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
<div class="logs-content">
|
||||
|
||||
{% macro render_select(name, options, selected, autokey=false) %}
|
||||
<div class="forms-select-wrapper">
|
||||
<select class="form-select" name="{{ name }}" data-grav-selectize>
|
||||
{% for key,option in options %}
|
||||
{% if autokey %}
|
||||
{% set key = key|of_type('int') ? option|lower : key %}
|
||||
{% endif %}
|
||||
<option value="{{ key }}" {{ key == selected ? ' selected' : '' }}>{{ option|titleize }}</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% import _self as macro %}
|
||||
|
||||
{% if authorize(['admin.super']) %}
|
||||
{% set file = grav.uri.query('log') ?: 'grav' %}
|
||||
{% set verbose = grav.uri.query('verbose') == 'true' ? true : false %}
|
||||
@@ -9,28 +24,16 @@
|
||||
|
||||
<div class="logs-output">
|
||||
|
||||
<form>
|
||||
<form id="logs-form">
|
||||
<div class="block block-select">
|
||||
<div class="form-field">
|
||||
<div class="form-data">
|
||||
<select class="form-select selectized" name="log">
|
||||
<option value="grav">Grav</option>
|
||||
<option value="email">Email</option>
|
||||
</select>
|
||||
{% set log_files = config.plugins.admin.log_viewer_files|default(['grav','email']) %}
|
||||
{% set lines_list = {10:'10 entries', 25:'25 entries', 50:'50 entries', 100:'100 entries', 200:'200 entries', 500:'500 entries'} %}
|
||||
|
||||
<select class="form-select selectized" name="verbose">
|
||||
<option value="false">Essential Details</option>
|
||||
<option value="true">Verbose Output</option>
|
||||
</select>
|
||||
|
||||
<select class="form-select selectized" name="lines">
|
||||
<option value="10">10 entries</option>
|
||||
<option value="25">25 entries</option>
|
||||
<option value="50">50 entries</option>
|
||||
<option value="100">100 entries</option>
|
||||
<option value="200">200 entries</option>
|
||||
<option value="500">500 entries</option>
|
||||
</select>
|
||||
{{ macro.render_select('log', log_files, file, true) }}
|
||||
{{ macro.render_select('verbose', {'false':'Essential Output', 'true':'Verbose Output'}, verbose) }}
|
||||
{{ macro.render_select('lines', lines_list, lines) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user