Commit Graph

1849 Commits (main)

Author SHA1 Message Date
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
Holger Friedrich 8423149770
Improve GitHub Actions (#3120)
* upgrade relative-ci/agent-action from 2.1.10 to 2.2.0
https://github.com/relative-ci/agent-action/compare/v2.1.10...v2.2.0
* pin external action relative-ci/agent-action to specific SHA
* pin external action relative-ci/agent-upload-artifact-action to
specific SHA
* set global timeout
* comments

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2025-04-02 18:22:37 +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