-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6b17e55
commit 696d8e5
Showing
12 changed files
with
788 additions
and
562 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
## Disable the default monolog configuration | ||
|
||
If you want to disable the default monolog configuration, add the following to your configuration: | ||
|
||
If you want to disable the default monolog configuration, overwrite `log_files` with your own configuration. For example: | ||
```yaml | ||
# config/packages/fd_log_viewer.yaml | ||
fd_log_viewer: | ||
enable_default_monolog: false | ||
log_files: | ||
apache-access: | ||
type: http-access | ||
name: Apache2 access | ||
finder: | ||
in: "/var/log/apache2" | ||
name: "access.log" | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<script setup lang="ts"> | ||
import {ref} from 'vue'; | ||
const expanded = ref(false); | ||
const emit = defineEmits(['add']); | ||
const addFilter = (event: MouseEvent) => { | ||
const target = event.target as HTMLElement; | ||
const filter = target.closest('[data-role=filter]') as HTMLInputElement; | ||
const fields = Array.from(filter.querySelectorAll('input')); | ||
let pattern = String(filter.dataset.pattern); | ||
const strip = filter.dataset.strip; | ||
let replaced = false; | ||
for (const input of fields) { | ||
const key = input.name; | ||
let val = input.value.trim(); | ||
if (strip !== undefined) { | ||
val = val.replace(strip, ''); | ||
} | ||
const escapeVal = (val.indexOf(' ') === -1 ? val : '"' + val + '"'); | ||
const matches = pattern.match('\\{' + key + '(=)?\\}'); | ||
if (matches !== null) { | ||
pattern = pattern.replace(matches[0], val === '' ? '' : escapeVal + (matches[1] ?? '')); | ||
replaced = replaced || val !== ''; | ||
} | ||
input.value = ''; | ||
} | ||
if (replaced) { | ||
emit('add', pattern); | ||
} | ||
} | ||
</script> | ||
|
||
<template> | ||
<button ref="filterButton" | ||
class="btn btn-outline-secondary dropdown-toggle" | ||
type="button" | ||
:aria-expanded="expanded" | ||
@click="expanded = !expanded">Filter | ||
</button> | ||
<div class="dropdown-menu slv-dropdown-menu" :class="{'d-block': expanded}"> | ||
<div class="px-2"> | ||
<div class="input-group mb-1" data-role="filter" data-pattern="before:{value}"> | ||
<span class="slv-input-label input-group-text" id="filter-date-start">Before</span> | ||
<input name="value" type="datetime-local" class="form-control" aria-label="Before" aria-describedby="filter-date-start"> | ||
<button class="btn btn-outline-primary" type="button" @click="addFilter">Add</button> | ||
</div> | ||
<div class="input-group mb-1" data-role="filter" data-pattern="after:{value}"> | ||
<span class="slv-input-label input-group-text" id="filter-date-end">After</span> | ||
<input name="value" type="datetime-local" class="form-control" aria-label="After" aria-describedby="filter-date-end"> | ||
<button class="btn btn-outline-primary" type="button" @click="addFilter">Add</button> | ||
</div> | ||
<div class="input-group mb-1" data-role="filter" data-pattern="severity:{value}" data-strip=" "> | ||
<span class="slv-input-label input-group-text" id="filter-severity">Severity</span> | ||
<input name="value" | ||
type="text" | ||
class="form-control" | ||
placeholder="Separate multiple by pipe symbol" | ||
aria-label="Severity" | ||
aria-describedby="filter-severity"> | ||
<button class="btn btn-outline-primary" type="button" @click="addFilter">Add</button> | ||
</div> | ||
<div class="input-group mb-1" data-role="filter" data-pattern="channel:{value}" data-strip=" "> | ||
<span class="slv-input-label input-group-text" id="filter-severity">Channels</span> | ||
<input name="value" | ||
type="text" | ||
class="form-control" | ||
placeholder="Separate multiple by pipe symbol" | ||
aria-label="Severity" | ||
aria-describedby="filter-severity"> | ||
<button class="btn btn-outline-primary" type="button" @click="addFilter">Add</button> | ||
</div> | ||
<div class="input-group mb-1" data-role="filter" data-pattern="exclude:{value}"> | ||
<span class="slv-input-label input-group-text" id="filter-exclude">Exclude</span> | ||
<input name="value" type="text" class="form-control" aria-label="Exclude string" aria-describedby="filter-exclude"> | ||
<button class="btn btn-outline-primary" type="button" @click="addFilter">Add</button> | ||
</div> | ||
<div class="input-group mb-1" data-role="filter" data-pattern="context:{key=}{value}"> | ||
<span class="slv-input-label input-group-text" id="filter-context">Context</span> | ||
<input name="key" | ||
type="text" | ||
class="form-control" | ||
placeholder="key (optional)" | ||
aria-label="Context key (optional)" | ||
aria-describedby="filter-context"> | ||
<input name="value" type="text" class="form-control" placeholder="search" aria-label="Context" aria-describedby="filter-context"> | ||
<button class="btn btn-outline-primary" type="button" @click="addFilter">Add</button> | ||
</div> | ||
<div class="input-group mb-1" data-role="filter" data-pattern="extra:{key=}{value}"> | ||
<span class="slv-input-label input-group-text" id="filter-extra">Extra</span> | ||
<input name="key" | ||
type="text" | ||
class="form-control" | ||
placeholder="key (optional)" | ||
aria-label="Extra key (optional)" | ||
aria-describedby="filter-extra"> | ||
<input name=value type="text" class="form-control" placeholder="search" aria-label="Extra" aria-describedby="filter-extra"> | ||
<button class="btn btn-outline-primary" type="button" @click="addFilter">Add</button> | ||
</div> | ||
<div> | ||
<button class="btn btn-sm btn-primary float-end" type="button" @click="expanded = !expanded">Close</button> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.slv-dropdown-menu { | ||
top: 37px; | ||
} | ||
.slv-input-label { | ||
width: 100px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<script setup lang="ts"> | ||
import SearchFilter from '@/components/SearchFilter.vue'; | ||
import {ref} from 'vue'; | ||
const searchRef = ref<HTMLInputElement>(); | ||
const query = defineModel<string>('query'); | ||
const sort = defineModel<string>('sort'); | ||
const perPage = defineModel<string>('perPage'); | ||
const emit = defineEmits(['navigate']); | ||
const focus = (): void => { | ||
searchRef.value?.focus(); | ||
} | ||
defineProps<{ | ||
badRequest: boolean, | ||
}>(); | ||
defineExpose({focus}); | ||
</script> | ||
|
||
<template> | ||
<div class="input-group"> | ||
<SearchFilter @add="(value) => query = (query === '' ? value : query + ' ' + value)"/> | ||
|
||
<input type="text" | ||
class="form-control" | ||
:class="{'is-invalid': badRequest}" | ||
ref="searchRef" | ||
placeholder="Search log entries." | ||
aria-label="Search log entries." | ||
aria-describedby="button-search" | ||
@change="emit('navigate')" | ||
v-model="query"> | ||
|
||
<select class="slv-menu-sort-direction form-control" | ||
aria-label="Sort direction" | ||
title="Sort direction" | ||
v-model="sort" | ||
@change="emit('navigate')"> | ||
<option value="desc">Newest First</option> | ||
<option value="asc">Oldest First</option> | ||
</select> | ||
|
||
<select class="slv-menu-page-size form-control" | ||
aria-label="Entries per page" | ||
title="Entries per page" | ||
v-model="perPage" | ||
@change="emit('navigate')"> | ||
<option value="50">50</option> | ||
<option value="100">100</option> | ||
<option value="150">150</option> | ||
<option value="200">200</option> | ||
<option value="250">250</option> | ||
<option value="300">300</option> | ||
</select> | ||
|
||
<button class="slv-log-search-btn btn btn-outline-primary" type="button" id="button-search" @click="emit('navigate')">Search</button> | ||
</div> | ||
</template> | ||
|
||
<style scoped> | ||
.slv-menu-sort-direction, .slv-menu-page-size, .slv-log-search-btn { | ||
max-width: fit-content; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"src/main.ts": { | ||
"file": "assets/main-2He2JVbP.js", | ||
"file": "assets/main-8G18k7Hp.js", | ||
"src": "src/main.ts", | ||
"isEntry": true | ||
}, | ||
"style.css": { | ||
"file": "assets/style-2zzsHFJL.css", | ||
"file": "assets/style-BG1K9lyT.css", | ||
"src": "style.css" | ||
} | ||
} |
Oops, something went wrong.