-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[photon-client] Log Viewer Improvements (#1385)
Fixes the following issues with the client log viewer: - Inconsistent and excessive spacing between log entries - Lack of responsiveness to window size or scaling Adds the following features to the log viewer: - Auto-scroll if scrolled to the bottom - Ability to clear logs on button click - Search function to filter logs - Displays the time the frontend captured a log and displays that timestamp in hh::mm::ss in the log viewer - Allows logs to be filtered to be after a certain time - General styling refinements to increase usability --------- Co-authored-by: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com>
- Loading branch information
1 parent
169595e
commit c38b509
Showing
8 changed files
with
184 additions
and
76 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<script setup lang="ts"> | ||
import { LogLevel, type LogMessage } from "@/types/SettingTypes"; | ||
import { computed } from "vue"; | ||
const props = defineProps<{ source: LogMessage }>(); | ||
const logColorClass = computed<string>(() => { | ||
switch (props.source.level) { | ||
case LogLevel.ERROR: | ||
return "red--text"; | ||
case LogLevel.WARN: | ||
return "yellow--text"; | ||
case LogLevel.INFO: | ||
return "light-blue--text"; | ||
case LogLevel.DEBUG: | ||
return "white--text"; | ||
} | ||
return ""; | ||
}); | ||
</script> | ||
|
||
<template> | ||
<div :class="logColorClass">[{{ source.timestamp.toTimeString().split(" ")[0] }}] {{ source.message }}</div> | ||
</template> |
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
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