Commit Graph

1638 Commits (main)

Author SHA1 Message Date
Mark Herwege 15463f894f
Sitemap editor: Add drag & drop (#2904)
This PR implements drag and drop in the sitemap tree, to make it easier
to graphically rearange sitemaps.
To achieve this, [Vue.Draggable](https://github.com/SortableJS/Vue.Draggable) (by itself
based on SortableJS) is included.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-12-28 13:20:52 +01:00
stefan-hoehn df02810c3b
Interactive SVG canvas: Add String Type support (#2948)
Adds String type support to the interactive SVG canvas by allowing to
compare a string to a specific value that is perceived as state ON:

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-12-28 11:52:04 +01:00
Florian Hotze bd9c6f0c36
Link add/edit: Fix profile selection (#2941)
Regression from #2690.

Reported here:

https://community.openhab.org/t/enocean-impossible-to-link-a-rockerswitch-channel-with-an-item-in-main-ui-there-is-no-profile-available-for-the-selected-item/160987

When creating a Thing channel link to an item, the profile selection are
disabled. This presents two problems:

- It made linking a trigger channel to an item not possible, because a
profile must be selected, but they're disabled.
- Linking a non-trigger channel to a new item is possible, but selecting
a profile is not possible at link creation. The user has to create the
link without a profile first, then go back to edit the link in order to
assign a profile.

When editing a channel link, profile selection was possible for
unsupported profiles, e.g. when editing a link between a Switch Item and
a Number channel, one could edit the link to use the default or follow
profiles.

---------

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-24 09:46:23 +01:00
Florian Hotze 3861fa8f27
Things list: Do not listen to InboxUpdatedEvents (#2942)
Fixes #2395.
Supersedes #2918.

Those do not change the inbox count and hence can be ignored.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-22 17:39:12 +01:00
Mark Herwege 8d8e46ad5b
Import treeview items locally & Clean-up sitemap page components (#2915)
See https://github.com/openhab/openhab-webui/pull/2904#issuecomment-2537081847
and https://github.com/openhab/openhab-webui/pull/2904#issuecomment-2537277268

This moves the import from the treeview items for model and sitemap out
of app.js and removes the sitemap page elements as this was never used.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-12-22 17:20:58 +01:00
dependabot[bot] ba1c988ebf
Bump nanoid from 3.3.7 to 3.3.8 in /bundles/org.openhab.ui/web (#2922)
Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8.

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-22 17:12:17 +01:00
dependabot[bot] b3b32be705
Bump elliptic from 6.5.7 to 6.6.1 in /bundles/org.openhab.ui/web (#2887)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.7 to 6.6.1.

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-22 17:06:21 +01:00
jimtng 0071de993c
Fix enabled profiles in link editor appear disabled (#2938)
Reported on the community:
https://community.openhab.org/t/enocean-impossible-to-link-a-rockerswitch-channel-with-an-item-in-main-ui-there-is-no-profile-available-for-the-selected-item/160987/40

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-12-22 15:48:10 +01:00
Florian Hotze 0ead7b8100
Widget expressions: Fix screen object not properly initialized & updated (#2933)
Fixes #2929.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-22 01:48:33 +01:00
Florian Hotze 56e0ebe23e
`oh-clock-card`: Remove (broken) background property in favour of style config (#2932)
This avoids confusion because `background` is not working anymore.
Use `style: background: ` instead.

---------

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-19 15:31:40 +01:00
Florian Hotze a907cc3319
`oh-card`: Fix action & tap-hold action not working (#2931)
Regression from #2781.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-19 15:09:07 +01:00
Florian Hotze 511b9493bb
Fix scripting add-on availability check for old JS Scripting MIME type (#2928)
Regression from #2743.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-17 16:14:23 +01:00
Holger Friedrich 97b37f6cc9
Fix problem matchers (#2926)
Regression, but introduced with #2925

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-12-16 08:39:11 +01:00
Holger Friedrich 9cafa80b60
Remove Java 17 build, switch to 21 (#2925)
Related to  openhab/openhab-core#4483

---------

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-12-15 23:21:28 +01:00
Florian Hotze 148248900d
CODEOWNERS: Add Blockly maintainers (#2923)
Add @stefan-hoehn as Blockly CODEOWNER so he is automatically requested
for review in his role as Blockly maintainer.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-15 20:39:41 +01:00
Holger Friedrich b54f9d2297
Prepare for OH 5.0.0 (#2924)
* Fix spotless after unleash

Depends on https://github.com/openhab/openhab-core/pull/4496

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-12-15 19:41:01 +01:00
openhab-bot f5a4bb3388 [unleash-maven-plugin] Preparation for next development cycle. 2024-12-15 17:12:57 +00:00
Arne Seime 8b8732ceaf
Update CONTRIBUTING with missing npm lint scripts (#2919)
Signed-off-by: Arne Seime <arne.seime@gmail.com>
2024-12-14 09:27:27 +01:00
Yannick Schaus c2ae0ab5d3
Log viewer: only render lines around visible area (#2905)
This should fix the performance problems in the log viewer when the
number of items reaches the max buffer size.

---------

Signed-off-by: Yannick Schaus <github@schaus.net>
2024-12-13 15:17:02 +01:00
Florian Hotze dfd1e453c2
Unit metadata edit: Add missing padding (#2913)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-11 17:55:25 +01:00
Florian Hotze b6233259b1
Update unit definitions (#2912)
Refs https://github.com/openhab/openhab-core/pull/4467.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-11 17:47:42 +01:00
Florian Hotze a55edca789
Update openhab-js tern defs (#2911)
This updates the tern defs used for autocompletion to the current
library version included in the add-on (5.8.1).

See https://github.com/openhab/openhab-js/compare/v5.3.1...v5.8.1 for
changes.

Last update was in #2642.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-11 17:09:38 +01:00
Florian Hotze b6118058ce
Fix safe-area issues (#2910)
This fixes safe-area issues all over the UI:

- Issues where the safe area was applied to elements where it should
not, e.g. the settings menus' entries.
- Issues where the safe area was missing, e.g. model cards, which were
hidden under the notch.

Due to webpack's CssMinimizerPlugin minimizing `0px` to `0` when
overriding the Framework7 safe area CSS vars, which then broke the
calculation, a new .css file has been introduced.

---------

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-10 20:52:07 +01:00
Florian Hotze 1783d8fe73
Log viewer: Fix styling issues on mobile devices (#2908)
- Fix navbar button color and arrangement on iOS devices.
- Remove tooltip for iPhones as it is hidden behing the notch, which
looks weird.
- Fix safe area issues with log table and badge in landscape on iPhone.
- Clean-up code a bit.

---------

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-10 14:26:24 +01:00
openhab-bot 8823e0e9c6
New Crowdin updates (#2909) 2024-12-10 00:11:00 +01:00
openhab-bot 7e8f460802
New Crowdin updates (#2906) 2024-12-09 23:25:59 +01:00
Mark Herwege 320c3f57b2
Persistence edit: Support excluding items or groups (#2896)
Ability to exclude items or groups from persistence configurations.

Refs https://github.com/openhab/openhab-core/pull/4468.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-12-08 16:25:40 +01:00
Chris Jackson 92dd646387
Add Log Viewer to MainUI (#2884)
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>
2024-12-08 14:11:14 +01:00
openhab-bot 1a208e77b6
New Crowdin updates (#2903) 2024-12-08 11:04:55 +01:00
lolodomo 7d80bbeb0e
[BasicUI] Replace OK by CLOSE in the 2 color pop-ups (#2895)
Also make the button label translatable.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-12-07 12:38:54 +01:00
lolodomo d6cc3419ff
[BasicUI] Fix unit determination for min/max from item state description (#2894)
Concerns the Colortemperaturepiucker element.

---------

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-12-07 12:38:10 +01:00
Florian Hotze 1258cf0e6a
Config sheet: Always show advanced params only if changed from default (#2888)
Improve code from #2313.
Closes #2879.

---------

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-03 21:08:39 +01:00
Florian Hotze d432f3bde7
Thing: Fix dirty warning shown on deletion if unsaved changes (#2892)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-01 15:26:12 +01:00
Florian Hotze f7352894a1
Channel copy: Fix changed config discarded (#2891)
Fixes https://github.com/openhab/openhab-core/issues/4458.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-12-01 13:27:26 +01:00
Florian Hotze ecb2cae390
Widget action taphold: Hide context menu in desktop browser (#2886)
Fixes #2808.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-11-30 22:12:08 +01:00
Wouter Born c1da41f909
Update bnd to 7.1.0 (#2885)
For release notes, see:

https://github.com/bndtools/bnd/wiki/Changes-in-7.1.0

Signed-off-by: Wouter Born <github@maindrain.net>
2024-11-30 21:38:36 +01:00
Mark Herwege 09b153c388
Sitemap editor: Add support for color temperature picker (#2880)
Closes https://github.com/openhab/openhab-webui/issues/2852.

Refs https://github.com/openhab/openhab-core/pull/4420.
Related to https://github.com/openhab/openhab-core/issues/3891.

This implements configuring a color temperature picker in the sitemap builder UI.

It also does some visualisation improvements of names and labels (by
defaults shows item label in treeview, analogous to model treeview).

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-11-30 14:50:33 +01:00
jimtng 1e0b7deaf6
[BasicUI] Align and optimize available space for switch with mappings (#2388)
- 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>
2024-11-30 14:12:34 +01:00
Siegmar Immel b06c21f055
oh-context: Improve parameter descriptions (#2868)
Added info about changeability of elements to the parameter description.

Signed-off-by: Siegmar Immel <36704892+SiggiFR@users.noreply.github.com>
2024-11-29 18:34:35 +01:00
openhab-bot db99e5846e
New Crowdin updates (#2843) 2024-11-29 18:21:02 +01:00
stefan-hoehn ed54bf6d23
Canvas Interactive SVG: Prevent image caching & Add id in config dialog (#2881)
prevent url caching in edit mode, 
add svg element id to dialog title

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-11-19 00:38:42 +01:00
lolodomo d5a0748b32
[BasicUI] Add preview color to Colorpicker widget (#2873)
Also cleanup class ColorpickerRenderer

---------

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-11-18 08:58:09 +01:00
Florian Hotze 7c3d114750
oh-chart: Only include boundary & Item state if now between start/end time (#2878)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-11-17 22:46:54 +01:00
lolodomo e067305f32
[BasicUI] Fix selection of color temperature near min and max (#2871)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-11-17 18:20:59 +01:00
stefan-hoehn e1990669e0
Interactive SVG background: Allow processing whole SVG group for state (#2872)
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>
2024-11-16 18:43:42 +01:00
Florian Hotze e3daf94577
oh-label-card: Hide label if no label or Item configured (#2874)
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>
2024-11-16 18:06:44 +01:00
Florian Hotze 45dd117f9a
oh-image-card: Fix too much padding when no action configured (#2869)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-11-13 23:32:53 +01:00
Florian Hotze 549112b1bb
Thing actions: Respect action visibility (#2867)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-11-11 13:42:36 +01:00
Florian Hotze 90210ae986
Fix hsbToRgb util & Fix conversion in oh-canvas-embedded-svg-mixin.js (#2866)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-11-10 22:02:46 +01:00
Florian Hotze 7e8a03e5cc
Thing action popup: Fix invocation of action with signature hash (#2865)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2024-11-10 21:56:28 +01:00