Closes#2883.
This adds a basic log viewer into the Main UI, and displays the logs
from openHAB log file using a websocket connection.
## Overview
This adds the log viewer to the Developer Tools -:
The main logger window is reasonably simple, and a little busy. Log
entries are styled with a background color:
red=error, yellow=warn, greed=info, grey text = trace, no change = debug.
The window scrolls horizontally - the time column
remains fixed, but the log level, class and message scroll left/right.
This allows the user to effectively remove these columns if they desire
by simply setting the horizontal scroll point accordingly.
Across the top in the navbar and the bottom toolbar are a bunch of status and configuration
data/buttons. These are:
* Play button: Continues receiving/processing logs if paused / stopped.
* Pause: Continues to receive logs from openHAB, but doesn't add them to
the display, so the display is static. When Play is pressed, the filter
is updated, so any recent entries will be added.
* Stop: Stops receiving data from the server. The websocket connection
is disconnected - this ensures there is no change to the local buffer.
* Filter input box - this filters the display to display only text in
either the logger name or message containing the filter text (case
insensitive).
* Time of the oldest and latest log entries held in the local buffer.
* Number of log entries currently displayed and in the buffer.
The color of the badge is green if all are displayed, orange if some are
filtered out, or red if the max size of the buffer (2000) is reached.
* Download: Downloads a CSV of the filtered log file for further
processing.
* Copy: Copies the log as HTML to the clipboard. This allows pasting of
the filtered log complete with highlighting.
* Delete: Clears the log buffer.
* Exclamation: Shows `ERROR` logs even if they would otherwise be
filtered out.
* Pen: Configures highlighting (more on this below).
* Cog: Configured logging (more on this below).
## Highlighting
The UI allows the user to add any number of text elements that will be
highlighted. The user can specify a colour, and enable and disable if
the highlighting is active or not. The list of highlights is saved
locally.
## Log Settings
The user can directly manipulate log levels. This allows the user to
simply change the log level for existing packages, or delete the log
entry (restoring it to default) or adding a new logger for a custom
package. If adding a custom package, this gets added as `WARN` level (it
uses the log level provided in the `ROOT` logger), which can then be
changed in the dropdown.
Also-by: Yannick Schaus <github@schaus.net>
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
- Should only affect switch with mappings, not player control
- Utilise the wasted space instead of wrapping the buttons into multiple
rows, if possible.
- Right align the buttons. This makes it look _much_ neater.
- Instead of limiting the width of the buttons, reserve a minimum width
for the label
- However if the label is shorter than 6 characters (including blank
labels), reduce the label's minimum width to just what's actually taken
up by the shorter label. This gives more space for the buttons with
shorter labels.
- When buttons wrap to multiple rows, make sure that each row contains
almost the same number of buttons, instead of having the first row
filling up the horizontal space, move the buttons down. By doing this,
there is more space for the label to occupy.
- Squeeze extra space for more buttons in "condensed layout" by reducing
padding, inter-button gaps, min-width, etc.
- The reduced padding in condensed layout also affects buttons in
buttongrid.
Before:
<img width="1130" alt="image"
src="https://github.com/user-attachments/assets/6bb010b7-d8e3-42bf-a3ae-0236e3ca3601">
After:
<img width="1127" alt="image"
src="https://github.com/user-attachments/assets/395b2440-532b-41f1-8369-c9963ebe84b7">
---------
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Allows to flash and handle state on whole SVG groups without a proxy by
using the group's path elements instead, e.g. this whole group can be used directly
---------
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
This fixes an issue where "-" was displayed as label in that case, which
was very annoying when using the label card only for displaying an icon.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This fixes a nasty bug on initial setup of an embedded SVG that has no configuration yet.
---------
Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
This is major contribution to the fixed canvas layout which allows
an SVG background to become an active part of the page. Through this
feature the SVG itself can become an active component of the page.
Keep in mind: it is not a replacement for widgets ... widgets can and
should still be used but it allows the background itself to be as
interactive as a widget.
---------
Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Use grid instead of flex with a minimum card width and automatic sizing.
Looks nearly the same on smaller screens and much better on large
screens.
Also limit width of single add-on card in swiper component as a
safeguard.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Do NOT allow the addition of the scene tag outside the scene editor and
addition of the script tag outside the script editor.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This allows setting the step size for date and datetime contexts, which
makes the UI display seconds if the step size is 1.
Refs #2847.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
- Default to action input name if no label provided
- Use label for action output "result" if provided
- Display action output descriptions if provided
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Fixes Items list flickering when an Item is added, updated or removed.
Fixes the same issue for other lists, where this is a regression from
#2823 and #2827.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Follow-up for #2216.
- Do not use addon swiper on iPad.
- Revert addon card size changes.
- Show more addon cards in swiper in landscape mode.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
By setting step size to 0 in a config description parameter, one can
allow any step size i.e. the user can enter as many decimals as he wants
to.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Fixes#2205 and fixes#1668.
This slighly reduces the addon card size on desktop and uses a swiper
(like in many app stores) instead of a flex on mobile.
Signed-off-by: Florian Hotze <dev@florianhotze.com>