Commit Graph

1712 Commits (main)

Author SHA1 Message Date
Andrew Fiddian-Green 93a7c05775
Fix tag badges (#3239)
Resolves #3238.

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2025-06-24 14:24:55 +02:00
Dan Cunningham 0646db2278
Fix Matter metadata configuration options for group members (#3241)
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2025-06-23 22:48:06 +02:00
jimtng 3ce849be3e
[BasicUI] Fix multiline buttons to optimize width when set to visible (#3237)
Regression from #2388
Fix #3233

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-06-22 08:52:53 +02:00
Timotheos Constambeys 204ca25097
oh-colorpicker: Fix sliders not initialized in widget (#3213)
Fixes #3208.

Signed-off-by: Timotheos Constambeys <timo0190@gmail.com>
2025-06-20 14:07:59 +02:00
Mark Herwege 7151fc618e
[Blockly] Fix blockly persistence code generation (#3234)
Reported here:
https://community.openhab.org/t/openhab-5-0-milestone-discussion/162686/108

A few persistence extension calls were expecting a RiemannType input,
which should not have been there.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-06-20 13:38:57 +02:00
dependabot[bot] 2d0b1853a1
Bump webpack-dev-server from 5.0.4 to 5.2.1 in /bundles/org.openhab.ui/web (#3214)
Bumps
[webpack-dev-server](https://github.com/webpack/webpack-dev-server) from
5.0.4 to 5.2.1.

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-20 13:37:37 +02:00
Mark Herwege 0d52054c3c
Make Main UI log levels configurable (#3226)
As console logging consumes a considerable amount of time, even when
the browser console is closed (especially since logging objects requires
deep cloning them), implemented a UI wide log level.
The log level allows to only log to the console when the level is above a
set value. These levels mimic the OH server side log levels.

The log level for the browser can be set in an extra developer tools
screen entry, and are persisted in the browser store when set.
The default logging level is INFO (will include ERROR and WARN), thereby
disabling `console.log`, `console.debug` and `console.trace`.

The impact is UI wide.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-06-18 09:39:54 +02:00
openhab-bot b8cb689ea2
New Crowdin updates (#3206) 2025-06-17 15:21:14 +02:00
stefan-hoehn ac2d89abdd
Add blockly "rule enable" block (#3209)
fixes #3096

Adds a new block to allow enabling/disabling rules.
Variables of type Boolean and String are supported. A String with "true"
or "enabled" will be converted to true, all other values will result
into false.

<img width="471" alt="image"
src="https://github.com/user-attachments/assets/30210a96-5adb-4b65-ad45-0e6a082fe486"
/>

I also added Boolean to typed variables as this was missing:

<img width="417" alt="image"
src="https://github.com/user-attachments/assets/30cf9ec1-46bd-45d8-95bc-6fb11ea99a16"
/>

I used "as" because I think this is the most intuitive way of describing
what the block does, in particular when you use "enabled". If anyone has
a better idea to make the block design better, then please provide
feedback. Using a dropdown with Note that "Enable/Disable" ruleUID would
be nicer but would not allow to use variables.

---------

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2025-06-15 20:05:12 +02:00
Nadahar 548d1c6d36
Regenerate rule templates (#3197)
This PR depends on https://github.com/openhab/openhab-core/pull/4718.

It does several things, but the major points are:
* It enables regeneration of rules based on rule templates from the UI.
Regeneration can be desirable if the rule template has been updated and
you want the rule(s) to reflect the change, or if you wish to change one
of the parameters, for example to make the rule work with a different
Item.
* It restores the display of read-only/unmanaged rules in the UI. It is
currently broken because all read-only rules are forwarded to the script
editor, effectively hiding the rule editor, unless you modify the URL
manually. This is very relevant for
https://github.com/openhab/openhab-core/pull/4633, whose rules will
otherwise be quite meaningless in the UI (they will still work, but you
won't be able to see what they do from the UI).
* It provides a third tab "Source" to the rule editor that shows the
"source script" used to create the rule, if the rule is supplied via a
JSR223 based scripting add-on, *if* the "source script" is embedded as
metadata with the rule. This is the current practice with most JSR223
based scripting add-on provided rules, and is the only situation where
showing read-only rules in the script editor makes any sense. The
"Source" tab is thus a replacement for removing the forwarding to the
script editor. Rules that have embedded "source scripts" will by default
open in the "Source" tab, so that the difference for these rules will be
minimal, while it also allows other read-only rules to work.

In addition to the above points, there are quite a few bug fixes that I
have come over while debugging/testing this.

There's a lot that could be said about the details here, but I know from
experience that if I attempt to describe everything, people won't read
it. So, I tried to make this description brief, and can instead
elaborate on any subjects on demand.

---------

Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
Co-authored-by: Yannick Schaus <github@schaus.net>
2025-06-15 19:49:05 +02:00
lolodomo f1bc650743
[BasicUI] Reload the chart with higher dimensions when zooming (#3183)
When zooming, instead of just upscaling the previously loaded chart, a
new chart is built using available width as new chart width. Upscale is
kept and will be used in case the user defined a maximum width for
charts that is lower than the available width.

Closes #3139

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2025-06-14 13:55:46 +02:00
stefan-hoehn c12c18cdde
[blockly] Fix typed var not working for dictionary (#3210)
Fixes #3038.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2025-06-06 19:02:15 +02:00
Dan Cunningham 6c66733bd9
Add Matter metadata (#3129)
Refs https://github.com/openhab/openhab-addons/pull/18486

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2025-05-28 17:23:40 +02:00
Mark Herwege 60d7f8cf3f
Model editor: drag drop fixes (#3199)
This is a follow-up for #2970.

This applies 2 fixes:

1. Extra non-semantic tag was added with value equal to semantic class
when semantic item was moved.
2. On larger models, SortableJS and Vue DOM updates sometimes got out of
sync. This is solved by forcing SortableJS to use the fallback that does
not directly update the DOM.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-05-26 20:46:10 +02:00
openhab-bot 2e9c8c8e0c
New Crowdin updates (#3189) 2025-05-26 20:31:05 +02:00
Florian Hotze 2b5be47e9e
Analyzer: Add comment to silent series option (#3196)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-05-26 20:21:51 +02:00
Florian Hotze 63a00c254e Regenerate component docs
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-05-21 14:01:40 +02:00
Florian Hotze 68df4be547
Widget actions: Add aggregation type parameter for analyzer action (#3195)
Closes #3088.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-05-21 14:00:50 +02:00
Florian Hotze 3742650a9e Regenerate component docs
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-05-21 11:39:35 +02:00
Mark Herwege 6bdfe408e6
Model editor: Add drag & drop (#2970)
Closes #2728.
Closes #969.

Allow drag and drop in the model view:

1. Drag and drop inside the semantic model
2. Move items into the semantic model
3. Move between non-semantic groups (and duplicate)
4. Ask for creation of location, equipment or point if item does not
have a semantic class yet when moving into the semantic model

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-05-21 11:32:19 +02:00
jsjames d17072ae31
Charts: Add oh-state-series to render state transitions over time (#3179)
This implements a new series type to show state transitions on a timeline diagram. 

The additional settings in the oh-state-series (in addition to the oh-time-series) are:
- yValue (optional) - where the timeline center should be on the y axis.
  Note, if using categories, it will simply be the index of the category, defaults to 0.
- yHeight (optional) - the unit (in relation to the y-axis coordiate system) of the height of the timeline, defaults to .6.
- mapState (optional) - a function to classify item states to a set of "string" states
- stateColor (optional) - a map of specified colors to use in the graph for each state.

---------

Signed-off-by: Jeff James <jeff@james-online.com>
2025-05-21 00:41:54 +02:00
Mark Herwege 5d01ce3efc
Sitemap editor: Various fixes (#3194)
Relates to: https://github.com/openhab/openhab-webui/pull/3184#issuecomment-2886630684

- Fixes scroll through the three on iOS, immediately moves elements.
- Fixes dirty warning when selecting an Item.
- Fixes editor gets dirty when collapsing the tree.
- Drag and drop also struggled when there were mutiple equal trees. When
  dragging one of these, it could not find the proper new position. This
  has been fixed as well.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-05-19 19:33:30 +02:00
Nadahar 68d47c5d22
Fix Python syntax highlighting (#3193)
The MIME types for Jython/Python were changed, breaking syntax
highlighting in the script editor:
https://github.com/openhab/openhab-addons/pull/18616

Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
2025-05-19 16:04:26 +02:00
Florian Hotze 63a3c33fa6
Make Vue clipboard plugin available globally (#3192)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-05-16 12:10:36 +02:00
jimtng 794f5e9ee1
Log Viewer: Add text mode option (#3177)
- Add an option to display the log in "Text mode" vs "Table mode".
- In Text Mode, the "Copy" button will copy the log as plain text. In
  Table Mode, the "Copy" button does what it used to do before.
- Hovering the mouse pointer over the log name reveals the full name
- Clicking on the log line still brings up the detail dialog
- You can select the text, and copy / paste it into a text file

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-05-16 11:49:43 +02:00
Mark Herwege 1ae5fc6ec5
Sitemap editor: Small fixes & Add duplicate element functionality (#3184)
This fixes:
- Scrollbar for sitemap tree not visible on narrow screens
- Details sheet not closed resulting in browser error
- Sitemap marked dirty when no icon defined on one of the sitemap
elements

This adds a sitemap element duplicate function. This will duplicate a
sitemap element with all of its sitemap children elements and can
drastically speeds up sitemap creation or editing. Before, the easiest
way was doing this in the code editor. With this change it can easily be
done in the treeview.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-05-16 11:31:11 +02:00
jimtng 7133f9e79d
Log Viewer: Add next/prev to log details popup & make it movable (#3172)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-05-16 11:30:52 +02:00
Mark Herwege a266cf03d4
[Blockly] Add previous state item fields (#3166)
This adds the previousState item enhancements to Blockly.
Refs https://github.com/openhab/openhab-core/pull/4351.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-05-16 11:20:59 +02:00
openhab-bot 5579ef8ffc
New Crowdin updates (#3151) 2025-05-05 10:46:26 +02:00
jimtng 3fefe9042e
Rule Module Popup: Hide Save link on inline script language selection (#3174)
Clicking Save there would create an invalid module with a missing
language, so just hide the save button.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-05-05 10:43:45 +02:00
jimtng 7add1895f2
Left Menu: show with shortcut when pinned but hidden (#3170)
Previously the shortcut Ctrl+Shift+M only worked when the menu wasn't
pinned.

But being able to show the menu is also very handy when the menu was
pinned but hidden because the screen is narrowed.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-05-05 10:40:48 +02:00
jimtng 0e37ba676b
Add Widget: Sort Personal Widgets (#3175)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-05-05 10:38:57 +02:00
jimtng b907329a70
Thing Edit: Thing UID should not change when bridge is changed (#3173)
Regression from #3009.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-05-05 10:37:16 +02:00
Holger Hees d661f558f7
Add mime type & code snippet for PY transformation (#3169)
Signed-off-by: Holger Hees <holger.hees@gmail.com>
2025-05-05 10:36:14 +02:00
lolodomo ec871afa97
[BasicUI] Enable dynamic icons for Chart element (#3182)
Fix #3176

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2025-05-04 11:49:42 +02:00
jimtng b67616fd79
[BasicUI] Shrink labels before values (#3143)
Resolve #3094

Here's an animated gif:

![label-value-width](https://github.com/user-attachments/assets/fc4a60db-dd00-4c8a-9c4d-94bebb1f0ac0)

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-05-04 09:51:05 +02:00
Chris Jackson efe3fefd4f
Add log details popup (#3160)
Closes #2961.

This adds a click handler to the log entries, and then displays a popup with the details of this entry.
This allows long entries to be viewed, as well as (finally) multi-line stack traces.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
2025-04-28 21:31:38 +02:00
Dan Cunningham afe96e1c4a
Thing details: Add dialog view for properties with overflow key/values (#3162)
This adds an icon to properties who have values longer then can be
displayed on the thing details page. Clicking this icon brings up the
key and value of the property in a dialog box. This icon only shows if
the value overflows.

---------

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2025-04-28 19:53:07 +02:00
jimtng 7c0e759b04
Developer Sidebar: Make pinned objects persistent (#3164)
Make pinned objects persistent within the browser session, so they don't
disappear when closing / reopening the developer sidebar, or when
switching to Help tab and back.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-28 19:48:40 +02:00
jimtng 67409fe3e4
Addon Store: Add Python Scripting to featured automations (#3168)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-28 19:46:59 +02:00
jimtng c9c4ab6f76
Copy File Definition: Process multiple objects with single api request (#3163)
Refs https://github.com/openhab/openhab-core/pull/4734.

This solves the problem with YAML format returning the `version` and
`things` (or `items`) keys for each item in multi-select requests. By
combining them into a single request, only one key will be returned at
the top.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-23 23:01:16 +02:00
jimtng 19c3a42d60
Script Editor: Add shortcut key Shift+Cmd+K/Shift+Ctrl+K to delete the current line (#3156)
This shortcut is quite well known from VS Code.
It is basically the same as Cmd+X / Ctrl X, but without putting the deleted stuff into the clipboard.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-20 14:48:40 +02:00
jimtng e3812d5105
Add Copy Thing YAML file definition & Refactor copy file definition code (#3130)
To support https://github.com/openhab/openhab-core/pull/4691

- Refactor file definition code into a mixin to create a consistent UI
in inbox, things-list, items-list, item-details, thing, details, single,
and multi-selection.
- Add `Copy` button in Things List which shows up when multi-selection
is active. This makes it in line with Items list and Inbox
- Standardize the list selection UI for inbox, things, items list.
Action buttons/links are closer together in the center now.
- Remove the selection counter off the buttons to make room. The
selection counter is shown in the list title.
- Use one "Copy" button which opens a dialog to select the file
definition format to export/copy to clipboard.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-20 14:42:22 +02:00
Chris Jackson 0b6159401a
Show thing firmware status (#3158)
Refs #1427.

This adds a block to the thing information to provide the status of
firmware. It just shows if there are firmwares available, the current
firmware version and the status.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
2025-04-20 11:43:34 +02:00
jimtng 57a7f1dae4
Sidebar Search: Fix rules/scenes/scripts search result count (#3159)
Fixes #3157.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-20 11:14:56 +02:00
dependabot[bot] 4d00851a3e
Bump http-proxy-middleware from 2.0.7 to 2.0.9 in /bundles/org.openhab.ui/web (#3154)
Bumps
[http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware)
from 2.0.7 to 2.0.9.

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-16 22:59:30 +02:00
Nadahar 270d80f022
Remove ESLintPlugin from webpack build (#3142)
Removed `ESLintPlugin` execution from the webpack build as discussed
at https://community.openhab.org/t/using-eclipse-with-openhab-webui/162923/30.

Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
2025-04-16 22:51:58 +02:00
spacemanspiff2007 64a0bf08df
Item edit: Relabel category to icon (#3149)
Closes #3146.

Changed label from "Category" to "Icon" to make usage more clear and make it consistent with the documentation.

---------

Signed-off-by: Sebastian Gerber <github@sgerber.de>
2025-04-16 10:21:56 +02:00
Mark Herwege 0864b52e09
Persistence edit: Support configuring aliases (#3070)
Configuration in the UI for persistence alias changes introduced in
https://github.com/openhab/openhab-core/pull/4363.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-04-15 23:34:23 +02:00
Florian Hotze d8a31769d2
Layout edit: Fix details chevron up icon/link missing (#3153)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-15 22:07:14 +02:00
Florian Hotze 266f5dbbae
Align search behaviour in case of nothing found (#3152)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-15 19:09:12 +02:00
jimtng eaee49c9f6
Items List: Add select all / deselect all (#3144)
Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-15 18:26:06 +02:00
Mark Herwege 9e3b377796
Create equipment from model: Use semanticEquipmentTag of Thing (#3124)
Refs https://github.com/openhab/openhab-core/pull/4617.

If the thing provides a default `semanticEquipmentTag`, this will be
used when creating an equipment from thing instead of the default
`Equipment`.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-04-15 17:43:42 +02:00
jimtng 56ee4d15e0
Inbox List: Add select all / deselect all (#3145)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-15 17:42:17 +02:00
jimtng df5f0e3cc2
[BasicUI] Add a setting to render buttons with rounded corners (#3147)
<img width="549" alt="image"
src="https://github.com/user-attachments/assets/75ec1b38-2cab-49bb-bfb2-e074f201e4a2"
/>

<img width="557" alt="image"
src="https://github.com/user-attachments/assets/2a8b2f90-8139-4c1f-92cd-4720f760453a"
/>


Default:
<img width="384" alt="image"
src="https://github.com/user-attachments/assets/6b2c421b-4306-48b5-8233-099b5ca43124"
/>

Rounded:
<img width="378" alt="image"
src="https://github.com/user-attachments/assets/06651f04-1aaa-413b-b08b-b60ddfc0712f"
/>


Pill:
<img width="378" alt="image"
src="https://github.com/user-attachments/assets/0e716d1e-f499-43f6-94f4-3fd992c65c5d"
/>

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-13 12:16:11 +02:00
jimtng 0404c5eb47
[BasicUI] Remove top/bottom margins in buttons-multiline (#3148)
Before:
<img width="882" alt="image"
src="https://github.com/user-attachments/assets/cfd7b872-ecc0-487d-a1dd-4b56b3da03b7"
/>
condensed mode:
<img width="847" alt="image"
src="https://github.com/user-attachments/assets/54ee7e8e-f980-4505-b9ae-54f02562b331"
/>


After:

<img width="881" alt="image"
src="https://github.com/user-attachments/assets/2f75f02e-4dfe-4eba-84e3-005a07aefe95"
/>

condensed mode:
<img width="854" alt="image"
src="https://github.com/user-attachments/assets/f66904d7-25f5-4d14-85aa-0e1ec499211f"
/>


```java
sitemap test {
    Text item=TestString1 label="Test"
    Switch item=TestSwitch1 label="Test" mappings=[ON="ON Label", OFF="OFF label"]
    Text item=TestString1  label="Test"
    Switch item=TestSwitch1 label="Test" mappings=[ON="ON Label", OFF="OFF label"]
}
```

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-12 16:28:18 +02:00
Florian Hotze ac6dff3941
Link add/edit: Fix config-sheet not properly re-rendered on profile type change (#3141)
Previously, autocomplete for parameter text sometimes did not properly
initialize due to receiving the old config descriptions of the previous
profile type.
This fixes this by making sure the config sheet is re-rendered when the
new profile type config has been loaded.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-08 22:19:48 +02:00
Nadahar 62aaf75c49
Parameter text: Improve support for multiple text values (#3092)
Previously, the text parameter used a text area and line breaks to separate multiple entries.
This has been reworked to now use a list of single line text fields, and autocompletion for multiple values has been enhanced as well.

Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
2025-04-08 22:10:31 +02:00
Florian Hotze eb18d69a8e
Widget order: Fix string length considered, instead parse integer (#3138)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-07 21:20:01 +02:00
Mark Herwege d046319656
[blockly] Riemann sum persistence extension and js tern definitions (#2893)
Depends on https://github.com/openhab/openhab-js/pull/401
Depends on https://github.com/openhab/openhab-core/pull/4461

This PR extends the Blockly block getting a statistical value from
persistence to be aligned with core and js scripting extensions.
The added statistical function is Riemann sum. This is an approximation
of the integral value and can e.g. be used to calculate an approximation
for energy consumption (in kWh) when the instantanous power (in W) is
persisted.
The existing sum method calculates a naive sum, ignoring the time
dimension and is not applicable for this. It could be used only if the
persistence interval is constant by using the sum and multiplying with
the interval duration.

There are multiple types of Riemann sum calculations depending on which
value is used as an approximation in each bucket. The ones implemented
in core (and js scripting) are: left, right, trapezoidal and midpoint.
If the Riemann sum statistical method block is selected in the block, a
parameter for this will also be shown, defaulting to left.

As average, variance and deviation statistical methods are based on
Riemann sum calculations (the current average calculation assumes
Riemann sums of type left), these methods now also have this extra type
input parameter (defaulting to left).

Note that in most cases, the trapezoidal (or midpoint) methods would
result in better accuracy. However, for backward compatibility reasons,
the default has been kept on left.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-04-07 19:20:01 +02:00
Florian Hotze 299f300dbf
oh-chart-component: Register & Use configured locale for Echarts (#3136)
Fixes #3035.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-07 14:54:40 +02:00
Florian Hotze 606a20ad14
Upgrade (Vue) Echarts (#3137)
- Upgrade Echarts from 5.5.1 to 5.6.0, changelog:
https://github.com/apache/echarts/releases/tag/5.6.0
- Upgrade vue-echarts from 6.6.9 to 7.0.3, changelog:
https://github.com/ecomfe/vue-echarts/blob/main/CHANGELOG.md#703

---------

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-07 14:47:33 +02:00
Florian Hotze 5c12f26dc1
Log viewer: Fix copy to clipboard not working (#3135)
Fixes #3017.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-07 12:57:55 +02:00
Florian Hotze fbc9c1ea6b
Link add/edit: Fix link String Items to any channel (#3134)
String Items can be linked to any channel, so allow this.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-07 12:32:05 +02:00
Florian Hotze 4b7f614b4f
Link add/edit: Fix link Dimmer/Switch Items to Color channel (#3133)
Fixes #3122.

Regression from #2941 and/or #2690.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-07 12:19:43 +02:00
Florian Hotze c874d4603a
oh-icon: Fix action not working for f7 & iconify icons (#3132)
Fixes #2664.

Also use pointer cursor if action is configured.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-07 11:09:54 +02:00
Florian Hotze e589cba69a
Widgets: Fix check for action not checking actionPropsParameterGroup (#3131)
The code that should check whether an action is configured did only take
the action prop into account, but an action can also be configured
through actionPropsParameterGroup.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-07 11:02:33 +02:00
jimtng 0049d501a3
oh-input: Fix editing a number item with unit & Several enhancements (#3050)
When oh-input is set to a Number item with unit, the f7-input in
'numeric' mode cannot set its numeric value to the item state because it
contains the unit.

This fixes the above issue and:

- Display the number's unit after the input field for numeric type
- Make numeric input field right-aligned
- Improve input-elements alignment
- Accept Enter key to send the value, with or without a sendButton
- Honor useDisplayState config
- Add `min` and `max` config
- If the stateDescription on the item specifies `minimum`, `maximum`, and `step`,
  they will be used as the default, but it can be overridden by the widget's config
- Tested against Dimensionless Percent
- Tested against patterns with multiple format specifiers, e.g. `Test
  format %1$.4f and %1$.2f %unit%`. The last format specifier will be used.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-06 00:13:32 +02:00
Florian Hotze c76a6d49b2
Help sidebar: Add log viewer docs (#3128)
Refs https://github.com/openhab/openhab-docs/pull/2481.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-05 18:17:34 +02:00
Florian Hotze 423b67d295
Don't use virtual lists where not necessary (#3127)
Don't use virtual lists for:

- persistence config filter picker
- persistence config strategy picker

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-05 16:36:36 +02:00
Mark Herwege 0ddad83696
Sitemap editor: Add chart interpolation parameter (#3069)
Depends on https://github.com/openhab/openhab-core/pull/4610
Related to https://github.com/openhab/openhab-core/issues/3662

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-04-05 16:29:40 +02:00
Florian Hotze c8f579cc37
Thing & Channel pickers: Add Thing location/Channel description (#3126)
Closes #2128.
Replaces abandonded PR #2129.

Displays the Thing location (if any) in the Thing picker and the channel
description in the channel picker,
which improves UX greatly as it allows to distinguish Things easier and
know the channel functionality without having to lookup documentation.
Also disables virtual list for the Thing picker to avoid issues with the
height due to the different entry heights, as the Things page does not
use a virtual list, we should also be fine without here.

---------

Also-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-04-05 16:26:52 +02:00
openhab-bot 1a24e8bc50
New Crowdin updates (#3115) 2025-04-05 15:27:53 +02:00
jimtng ee8c84768e
Addon Card: Give title has more room to avoid overflow (#3112)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-04-05 15:27:10 +02:00
dependabot[bot] 2219a783dd
Bump @babel/runtime from 7.25.0 to 7.26.10 in /bundles/org.openhab.ui/web (#3107)
Bumps
[@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime)
from 7.25.0 to 7.26.10.

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-03 19:38:43 +02:00
Florian Hotze fbdcf55350
Main UI mvn build: Various enhancements to improve DX in Eclipse IDE (#3116)
- Do not always clean install, do only so in mvn `clean` phase.
- Built web app directly to mvn target dir.
- Perform all Main UI related executions in the `prepare-package` phase
to allow faster Java code compilation.

This improves the behaviour when using Eclipse IDE, as the M2E plugin
causes a recompilation "loop" due to the Main UI build writing to a mvn
source folder.

---------

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-26 14:36:02 +01:00
Florian Hotze 729a70810b
oh-card: Indicate that card is clickable if action is configured (#3119)
Align with the style of the link-item class if an action is configured.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-25 23:45:36 +01:00
Florian Hotze 61a9269773
Persistence edit: Add missing dirty checking on edit (#3118)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-25 22:55:30 +01:00
jimtng d48aecff60
Developer sidebar: Add ability to search and pin widgets (#3110)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-22 16:06:23 +01:00
Mark Herwege f193ef9f1f
Persistence edit: Fix multiple selection (#3105)
Closes https://github.com/openhab/openhab-webui/issues/3104.

As the item picker keys where dependent on the length of the selection,
they got recreated each time something was selected. This made
multi-selection impossible.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-03-21 18:55:24 +01:00
jimtng d3755905cd
Config sheet: Fix loading of multi-line default values (#3114)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-21 18:54:59 +01:00
jimtng 944b8f6201
Add-on card: Add tooltip to label (#3113)
This displays the title when the mouse hovers over.
Useful in case the title overflows and is hidden.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-21 18:51:49 +01:00
jimtng ce53cc3e66
Developer tools: Add Copy DSL definition for Items and Things (#3085)
Resolve https://github.com/openhab/openhab-core/issues/4509.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-11 20:55:43 +01:00
jimtng 6c88932ef1
Item details & Items list: Add Copy DSL Definition button (#3084)
Add Copy DSL Definition for items, both in Item Details and Items List
using the definition provided by
https://github.com/openhab/openhab-core/pull/4569.

Resolves https://github.com/openhab/openhab-core/issues/4509.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-11 20:50:08 +01:00
Florian Hotze 40a8de5052 Adjustments to the changes from #3086
Those were forgotten to submit during review.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-11 20:38:23 +01:00
jimtng a229c3d12b
Thing Details: Add Copy DSL Definition button (#3086)
Based on https://github.com/openhab/openhab-core/pull/4569.
Resolve https://github.com/openhab/openhab-core/issues/4509.

Also cleaned up / removed the previous attempt (from 5 years ago) to
create a textual definition. It was commented out and wasn't actually used.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-11 20:35:48 +01:00
jimtng d6519450bb
Inbox: Add `Copy DSL Definition` (to clipboard) button & Add selection count (#3021)
Refs https://github.com/openhab/openhab-core/pull/4569.

This allows us to quickly create the Thing inside a .things file from the discovered Inbox items.
It works when clicking a single inbox entry, and also when multiple entries are selected.

It also adds a count for the number of the selected Things.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 15:16:10 +01:00
jimtng ed9aa3117e
Widget config/code editing: Add live update, dirty checking, make popups movable (#3039)
- Make Widget Config and Widget Code Editor popups draggable by the
navbar, so they can be moved out of the way to view the widget being
edited
- Preview changes immediately on the widget
- The changes can be reverted if desired by clicking the "Reset" link in
the navbar.
- The changes are reverted if the popup is closed without saving.
- Implement dirty checking confirmation

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 15:15:46 +01:00
Florian Hotze 394c704cb7
Event WS client: Filter by topic instead of type (#2997)
Depends on https://github.com/openhab/openhab-core/pull/4550.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 15:13:50 +01:00
Florian Hotze b34a3905fa
Location card: Support Lightbulb & LightStripes equipment for lights status badge (#3101)
Closes #1144.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 14:32:52 +01:00
Florian Hotze 3fd72739e0
Script edit: Fix minor styling issue in script details (#3100)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 13:59:34 +01:00
jimtng 2a7d531b0f
Layout edit: Move page settings to bottom of screen in edit mode (#3056)
This frees up screen real estate to see more widgets.
In Edit mode, remove the page settings from the top of editor page.
In createMode, it is still shown at the top as before, but a note added where to find the settings later.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 13:52:14 +01:00
jimtng 26ef1d9ccc
Things List: Add multiple search, select all & Inbox: Go to newly approved Thing(s) (#3020)
Things Filtering/Searching & Selection:

- The Thing count is updated to reflect the number of matches found when
performing search/filtering
- When filtering, the invisible Things (i.e. Things that do not meet the
filter criteria) will be deselected. Only Things within the filtered
result can be selected and acted upon (Remove, Disable, Enable). So if
you first selected all your things (e.g. 100 things) then perform
search/filtering which result in 5 things, then the total selected
Things will now be just 5, and when you hit Remove, only those 5 will be
removed.
- Add `Select All` / `Deselect All`. This also works in tandem with
search/filter. When the filtered result shows only 5 Things, Select All
will only select those 5 Things and not all the available Things on the
system.
- It is possible to search and display multiple Things by separating the
search terms with a comma.

## Preload Things List search

- This allows navigating to Things List page with a pre-defined search
terms, also to support the inbox approval feature

Inbox approval:

- `Add as Thing` and `Add as Thing (with Custom ID)` are merged into
just `Add as Thing`. The subsequent dialog will prompt for both the
Thing ID and the Label in one dialog, removing multiple steps.
- Thing UID / ID validation is performed within the Add a Thing dialog,
and the validation status displayed instantly under the Thing ID input
- It also checks against full UID conflicts against existing Things
- When multiple inbox items are selected and `Approve` is clicked, the
user will be redirected to the `Things List` page, with pre-set filter
to show all and only the approved Things.

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 13:36:36 +01:00
jimtng 8d04f95b82
Model Item details: `View/Hide Details` instead of `Edit` for uneditable Items (#3089)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 12:43:19 +01:00
jimtng 40635e0962
Use a more specific browser title for each page (#3058)
Resolves #3054.

- Refactor how the current url is checked inside app.vue.
- Fix a bug where `Settings` menu item in the sidebar isn't highlighted
  when viewing the Transformation and Persistence sections.
- Add a new `browserTitle` config for pages other than the `overview` page
- Hide "Sidebar & Visibility" and "Tags" input for the `overview page`.
  This frees up some screen real estate for editing widgets
- Every page has a custom browser page title:
  - Pages will use its `browserTitle` || `label` config
  - Overview page will just use `label` since it's not used elsewhere
- For other pages, use the section menu's text, so if/when this gets
  internationalized, the title will also change
- Settings -> System Settings will use `Settings - <navbar title> -
  openHAB` and so it's also automatically localized as the navbar title gets localized.
- Settings -> Addon settings will use `<navbartitle> - openHAB` because
  the navbar title always starts with "Configure....". Adding "Settings -" in front of it would seem redundant.
- Things/Items/Widgets/Add-on Store/Pages/Rules/Scripts/Scenes will show
  `[X] - [uid] - openHAB` e.g. `Things - mqtt:topic:xxx - openHAB`

---------

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 12:29:03 +01:00
Mark Herwege 71d6e8b99c
Sitemap editor: Check for empty frames (#3090)
Check and warn for empty frames when saving a sitemap.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2025-03-10 12:24:10 +01:00
Florian Hotze aa14758cb7
i18n: Add support for loading locales from multiple scopes (#3099)
This allows to load locales from multiple sub dirs, e.g.:
```js
loadLocaleMessages(require.context('@/assets/i18n/about'), require.context('@/assets/i18n/empty-states'))
```

Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 12:21:11 +01:00
jimtng 219693fdfa
Location picker: Set default to system location, otherwise set to worldwide zoom level (#3047)
Resolves #2999.

Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-10 12:00:26 +01:00
Florian Hotze a3deece99f
Script edit: Automatically update GraalJS mime type when opening script (#3098)
Signed-off-by: Florian Hotze <dev@florianhotze.com>
2025-03-10 11:32:48 +01:00
jimtng 1cd53865c8
Add Alt-Shift-M shortcut key to toggle menu when unpinned (#3081)
It has always been a pain point when the menu is not pinned,
getting back to it is very difficult, involving several "back" clicks,
and sometimes it also gets lost and it became impossible without a full
browser refresh.

This adds a shortcut Alt-Shift-M (similar to Alt-Shift-D) to show the
menu whereever you are.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2025-03-08 00:54:12 +01:00