Commit Graph

1510 Commits (4b1ef3b4dc381762ab5757318ef612820b02d02d)

Author SHA1 Message Date
Florian Hotze 9a4d454943 Upgrade lodash
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze e494e9ec68 Upgrade leaflet
Map and floor-plan pages were tested and are still working.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 1694973960 Upgrade jssip
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 14854e03b7 Upgrade dayjs
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze afaa80b182 Upgrade cronstrue
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 52cb6ff142 Upgrade jse-eval with plugins
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
dependabot[bot] 67163b0423
Bump follow-redirects from 1.15.5 to 1.15.6 in /bundles/org.openhab.ui/web (#2477)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-18 20:02:06 +01:00
Arne Seime f784419eb5
Only load ignored inbox items in inbox view (#2400)
Depends on https://github.com/openhab/openhab-core/pull/4108.

In most places, the inbox content is loaded only to show a count of items in inbox.
For any decent size systems the inbox may contain hundreds of entries that are ignored,
which equates to lots of unnecessary data being transferred and processed in the browser.

---------

Signed-off-by: Arne Seime <arne.seime@gmail.com>
2024-03-18 19:57:09 +01:00
openhab-bot 970afa0b58
New Crowdin updates (#2479) 2024-03-18 19:46:23 +01:00
lolodomo 1613dfd236
[BasicUI] Create header row only when needed (#2344)
For buttongrid/mapview/video/webview elements, avoids generating HTML
code for header row when it is hidden.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-03-17 20:34:21 +01:00
Florian Hotze 021c3d8a43
Upgrade echarts and vue-echarts & Add fallback for visualMap when using heatmap (#2450)
This upgrades `echarts` and `vue-echarts` to the latest versions.
`@vue/composition-api` was added as dependency because `vue-echarts`
needs it on Vue 2.

See
https://echarts.apache.org/handbook/en/basics/release-note/v5-upgrade-guide/
and https://github.com/ecomfe/vue-echarts#migration-to-v6 for upgrade
guides.

This also adds a fallback default for `visualMap` because it is required
to define a `visualMap` when using a heatmap, otherwise echarts fails to
render the chart.
Even though the docs and the chart-designer mentioned this until now, it
worked without defining a visualmap, which would not be the case anymore
(and therefore break charts - defining a visual map is easy though)
without providing a fallback.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-14 20:56:29 +01:00
Florian Hotze 1ceb5c6063
Thing edit: Fix changing ID shows wrong value & Always show UID (#2475)
Fixes #2469.

After changing the ID of a Thing (only possible when creating a new
Thing), the displayed value was reset to the pre-filled default when
moving to a different field. When saving the Thing, the entered value
was used. This was because Vue did not properly notice the change of the
ID.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 13:02:30 +01:00
Florian Hotze f5d9cb468a
Item edit: Fix state description not saved for existing Item (#2474)
Fixes #2468.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 13:02:06 +01:00
Florian Hotze 7db99cb431
Item edit: Check for type change & Fix dimension/unit change checks (#2473)
- When editing an Item, also check for Item type change and display a
warning when changing the Item type.
- The dimension/unit change checks were not comparing against the saved
Item, but instead against the last changes. Fix this.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 12:24:26 +01:00
Florian Hotze a1eca7d695
Thing inbox: Fix "show ignored" checkbox not checkable on small screens (#2472)
Fixes #2457.

The list index collided with the "show ignored" checkbox and caused it
to not be checkable on smaller screens (mobile phones).
As I have found no real fix for this issue (setting z-indizes does not
work due to the structure of the page), I created this workaround to
switch the checkbox and the label on smaller screens.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 10:41:56 +01:00
Florian Hotze 5ec8fc8656
Rule edit: Code clean-ups (#2471)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-13 01:35:08 +01:00
Florian Hotze c41aa384dd
Fix dirty warning shown on delete (#2470)
Fixes #2462.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-12 23:21:03 +01:00
stefan-hoehn 9f006fdff3
[blockly] Add undefined block (#2465)
Adds the undefined block as discussed at https://community.openhab.org/t/blockly-proposal-to-change-contextual-info-blocks/154403.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-03-08 18:55:24 +01:00
jimtng 67e8ed4d5d
Item details: Fix editing groups with uneditable members & Sort members (#2452)
Fixes #2427.
Also sort the list of group members alphabetically based on label or name.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-07 00:23:24 +01:00
openhab-bot 00079e3c0a
New Crowdin updates (#2439) 2024-03-07 00:18:03 +01:00
jimtng a2559de97f
Item edit: Align group's aggregation function (#2454)
This was left behind in the recent class name change.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-07 00:17:34 +01:00
jimtng 0f804357c5
Channel edit: Fix regression causing editable channels to be locked (#2455)
Regression from #2403.

Channel doesn't have its own `editable` property.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-07 00:15:06 +01:00
jimtng e6d86ae14f
Item list & details: Hide group type if not set (#2453)
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-07 00:10:25 +01:00
jimtng 4af22ff777
Items List: Remove Add item from textual (#2448)
Make the + Icon in the items list go straight into adding a new item.
This makes the most common operation quicker.

Adding from textual definition can still be done through Developer Tool,
as it's not a common task.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-04 20:46:38 +01:00
Florian Hotze e288d0b07a
Improve Item name validation (#2451)
Check that an Item name does not start with a number.

Closes #2444.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-04 20:44:37 +01:00
Florian Hotze ccaa221460
Settings menu: Fix back-link (#2449)
Regression from #2432.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-04 19:45:19 +01:00
Florian Hotze 74620c3bce
Widget expressions: Improve `@` shorthand code (#2446)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-04 11:48:22 +01:00
Florian Hotze da80fbdcd4
Fix custom page icon size for openHAB icons (#2445)
Regression from #2340.

Reported on the community:
https://community.openhab.org/t/openhab-4-2-milestone-discussion/154316/2?u=florian-h05.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-04 11:48:08 +01:00
jimtng 0f343f3ca1
Script Editor: Fix script loading (#2442)
Regression from #2374

The problem is when I clicked on a file-based script in the UI, the
content of the script didn't load.

Before:
<img width="601" alt="image"
src="https://github.com/openhab/openhab-webui/assets/2554958/b3351f27-8ae6-4463-91ee-583fce0cf873">


After:
<img width="670" alt="image"
src="https://github.com/openhab/openhab-webui/assets/2554958/596629cb-459d-43c0-992e-7221e2a505dd">

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-03 13:03:44 +01:00
lolodomo e7faba6c9f
[BasicUI] Move most of app settings to per-device (browser) settings (#2243)
Closes #1832
Closes #1930
Closes #2342

A new page is available to show and update all per-device settings. This
page is accessible through the sitemap list page or the home page of any
sitemap.
Basic UI theme now matches the dark mode of Main UI. It can be updated
either in Main UI or in the new page of Baisc UI.
Web Audio can also be enabled either in Main UI or Basic UI.

The iconify setting is now enabled by default. The script to handle
iconify icons is now loaded in sitemap pages only if the iconify setting
is enabled.

New settings are also available to control the size of the chart and the
size of content (text, line) in the chart.

A new setting is also available to enable a bigger font size.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-03-03 10:22:17 +01:00
jimtng 61aa3d8fb5
Show lock icon in the item details members list (#2410)
Depends on https://github.com/openhab/openhab-core/pull/4118.

@ghys could you comment on the purpose of `ignoreEditable` here? It's
preventing the lock icon from showing up.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-03 10:15:44 +01:00
jimtng 90223e9d4a
Widget expressions: Add `#` as a shorthand for item.numericState (#2441)
Refs https://github.com/openhab/openhab-core/pull/4123.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-02 14:39:06 +01:00
Florian Hotze 64a1e0a47e
Add-on logo: Fix jdbc logos not loading & list-item logo distorted (#2440)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-01 17:35:27 +01:00
Florian Hotze 80e762e78b
Developer dock: Fix styling issue when lazy loading component (#2438)
Regression from #2294.

When the developer dock was opened the first time, the navbar was not
center aligned due to a styling issue because of the lazy loading. This
works-around this by setting (sub)title after component creation.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-01 14:56:19 +01:00
Mark Herwege 2f17183bd1
Provide meaningful list of units in item-form (#2312)
Closes https://github.com/openhab/openhab-core/issues/4082.

This PR adds:

1. A curated list of units to show as a drop-down list when creating a Number item with dimension.
2. The possibility to use a different default unit on item creation than the system default unit.
3. The ability to change unit and state description for items.
4. The ability to use the `unitHint` provided by channel types for "Link channel to Item" -> "Create a new Item".

By default, the system default unit (for the configured measurement system) will be shown when editing or creating an item.

`units.js` contains a number of frequently used units by dimension and measurement system.
These will be available in a autosuggest dropdown list.
It is still possible to not select from the list and use any other string as a unit.

All units for the dimension in `units.js` will be in the dropdown list, but they will be sorted by measurement system. If the measurement system is set to US, imperial units will appear higher in the list.
Units that have not explicitely been listed as SI or US will always appear higher.

When typing a unit that is not in the curated list, a longer list will be used for autocompletion that considers allowed prefixes to base units and constructs all combinations.

`units.js` also contains a field to set a different default unit on item creation than the system default unit.

With https://github.com/openhab/openhab-core/pull/4079, the REST API of channel types will provide a unit hint if defined in the binding channel types.
If such information is available, this PR adds support for this to be the the suggested unit.
If that information is unavailable, the UI will fall back to behavious described above.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-03-01 12:48:05 +01:00
Florian Hotze 148c463a1c
Add-on store: Minor logo styling tweaks (#2435)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-29 23:37:38 +01:00
Florian Hotze 5159566e02
Fix service worker (#2433)
Regression from #2267.

This fixes the service-worker and switches from injecting the manifest
into a pre-provided service-worker to generating the service-worker
during webpack builder.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-29 12:30:29 +01:00
Florian Hotze ea28f32140
Remove Cordova from Main UI (#2432)
This removes Cordova from Main UI.

Cordova was used to build Main UI as an iOS or Android app (a webview
with pre-packed assets), but the Cordova component of Main UI is
currently unmaintained due to requiring lots of maintenance.
Both the iOS and the Android app have an integrated webview (without
pre-packed assets though), so Cordova is unlikely to be required in the
future.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-29 11:26:12 +01:00
Florian Hotze d6097a6346
Sidebar help: Use custom renderer instead of CSS for reduced list indentation (#2430)
Follow-up for #2423.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-29 11:03:31 +01:00
Jimmy Tanagra 1d22ce7e51 [blockly] Update multi-select plugin to v0.1.12 (#2419)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 23:20:28 +01:00
Jimmy Tanagra 50c43afc3b [blockly] Add multi-select plugin (#2419)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 23:20:28 +01:00
Jimmy Tanagra d99d3bfc86 [blockly] Enable drag mode and move with wheel (#2419)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 23:20:28 +01:00
Jimmy Tanagra 4ee3e54e20 [blockly] Remove cross-tab-copy-paste plugin (#2419)
It conflicts with the multi-select plugin and the same functionality is provided by the multi-select plugin

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 23:20:28 +01:00
stefan-hoehn 5997c28655
[blockly] Add HTTP request block (#2411)
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-02-28 23:04:26 +01:00
Florian Hotze 9096d6de70
Item picker: Disable picker & hide chevron if not yet ready (#2428)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 18:41:51 +01:00
Florian Hotze 76e631632f
oh-player-controls: Hide default tooltip (#2426)
Previously, when hovering over a `oh-player-control` component, a
tooltip, which shouldn't be there, was shown.
This was caused by the config title being set as the divs title.
It is now fixed by manually setting title to an empy string.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 18:01:55 +01:00
Florian Hotze 4b8c1796c0
Location card: Swap status & measurement badges to avoid layout shift (#2425)
The status badges are displayed based on the actual state of that status
category. This causes the measurement badges, which are always shown to
be either first or second line.

This swaps those, so that measurement badges don't move around anymore.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 17:46:13 +01:00
openhab-bot 2255bb79ca
New Crowdin updates (#2357) 2024-02-28 17:31:19 +01:00
jimtng ab96ced901
Help sidebar: Add blockly help page (#2424)
Resolves #2416.
Depends on https://github.com/openhab/openhab-docs/pull/2260.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 17:30:20 +01:00
jimtng 22fe3f00c3
Rule module popup: Add dirty checking (#2412)
This PR adds dirty checking in the rule module popup.

Rule module popup comes up when you're editing a rule's module, e.g.
trigger, action, condition. Previously when you opened the rule module
and made changes, then clicked back, you wouldn't get a warning and the
changes will simply be lost.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 17:14:49 +01:00
dependabot[bot] 1111f806d2
Bump es5-ext from 0.10.53 to 0.10.63 in /bundles/org.openhab.ui.basic (#2418)
Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.53 to 0.10.63.

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-28 17:11:46 +01:00
jimtng cc62a8f45e
Settings menu: Fix search bar to include system and addons settings (#2409)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 13:57:37 +01:00
jimtng 5c1aa898f3
Add-on store: Title and searchbar focus tweaks (#2406)
- Display specific title for each tab, but avoid becoming too long on smaller screens.
- Don't autofocus on the search bar on mobile because it opens up the on-screen keyboard and covers up half the screen.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 13:51:53 +01:00
jimtng 4cef66d46e
Material theme: Fix lock icon is visible on editable items (#2403)
Fixes regressions from one of the previous PRs.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-28 13:38:55 +01:00
Florian Hotze 11c6a7b271
Help sidebar: Reduce list indentation (#2423)
Fixes https://github.com/openhab/openhab-docs/issues/2243.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 13:16:13 +01:00
Florian Hotze 6e17810a67
Fix UID copy for not editable channels and transformations (#2422)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-28 13:08:17 +01:00
Jeremy bc7b1e4485
Update alexa networking integration (#2421)
Related to https://github.com/openhab/openhab-alexa/pull/660.

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2024-02-28 13:07:49 +01:00
jimtng 565844f8c8
Blockly Editor: combine renderer selection and show item label icons (#2415)
The current icons are too crowded for mobile devices. This PR combines
the renderer choice and the show labels into one icon.

Before
<img width="409" alt="image"
src="https://github.com/openhab/openhab-webui/assets/2554958/8c294ca4-8fce-4379-9635-fd4e053fc77c">

After
<img width="434" alt="image"
src="https://github.com/openhab/openhab-webui/assets/2554958/d04b59ef-50bf-4783-aab1-99493a8c9cf3">

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-26 17:21:15 +01:00
jimtng e2738b5d6b
Overview tab: Fix javascript error (#2414)
Fixes this error:
```
app.30bb9074a7a632ce30a5.js:2 TypeError: Cannot read properties of undefined (reading 'length')
    at i.overviewPage (app.30bb9074a7a632ce30a5.js:2:1827039)
    …
```

Also refactor the code for better readability.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-26 15:59:12 +01:00
jimtng 3b694d2680
[blockly] Add renderer switching (#2315)
This adds a little button on the bottom of blockly workspace to allow
switching the renderer on the fly.
The choice is saved in `localStorage`.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-25 10:19:42 +01:00
jimtng 8b2e548c88
[blockly] Upgrade Blockly from v9.2.0 to v10.4.2 (#2310)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-24 17:34:23 +01:00
Florian Hotze 97ae723a42
Item edit: Fix dirty warning for not-editable Items (#2408)
Follow-up for one of the previous PRs.

Fix Item dirty warning for:
- Item not editable, but warning still displayed
- editable group Item

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-24 17:29:45 +01:00
Florian Hotze e32d5a7509
Add-on store: Fix toolbar style & material design logo (#2407)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-24 16:18:26 +01:00
Florian Hotze 69f487611f
Add support for SVG add-on logos (#2402)
Currently, Main UI attempts to load all add-on logos as PNG (the add-on
logo url is generated using the add-on name and expecting a PNG).

This PR adds support for SVG add-on logos, which means: 
The UI will now attempt to load a SVG logo, 
if that fails, it will attempt to load a PNG, 
and if that fails, fall back to the add-on‘s default logo (which is
dependent on the add-on type).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-24 15:04:05 +01:00
jimtng 6272434ee7
Only align smart-select on wider screens (#2405)
On smaller screens, it's better to stick with standard styling

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-24 13:53:20 +01:00
Yannick Schaus 9cacb7c510
Add-on store: rename Blockly libraries to Block libraries (#2404)
Signed-off-by: Yannick Schaus <github@schaus.net>
2024-02-24 09:46:32 +01:00
Florian Hotze def6effa21
Script & Item edit: Add/Fix dirty handling (#2374)
- Add dirty handling for script-edit.
- Fix dirty handling of item-edit always saying dirty due to wrong
initialization order.
- Code improvements to other dirty handlings.
- Styling improvement to script-general-settings.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-23 17:48:55 +01:00
dependabot[bot] 57ed2da295
Bump ip from 2.0.0 to 2.0.1 in /bundles/org.openhab.ui.basic (#2383)
Bumps [ip](https://github.com/indutny/node-ip) from 2.0.0 to 2.0.1.

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-23 12:12:37 +01:00
Florian Hotze a1f509133a
Change the default navbar style from orange to light for light theme (#2288)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-23 12:11:22 +01:00
Florian Hotze 843ee90c25
Persistence edit: Fix dirty for new persistence & Improve const handling (#2399)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-23 11:51:27 +01:00
jimtng 6927c7f9a8
Fix link to persistence doc (#2398)
Regression from #2339.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-23 11:19:56 +01:00
jimtng e2292461f9
Update links to addons store (#2396)
To match changes in #2383.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-23 10:21:00 +01:00
jimtng 6b7e1c479a
Add-on Store: Add sub menu items & various improvements (#2381)
Resolves #2047.

- Installed addons are grouped by category in the main Add-on Store section.
- Search in the main "Add-on Store" menu will search all types of addons.
- Search in the corresponding section will only search for add-ons for that category.

The subsections are implemented as routable tabs, so switching around the different sections is fast.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-23 01:14:42 +01:00
jimtng bfa2d4a44e
Add-on list: Top align the install buttons (#2385)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-22 22:01:33 +01:00
jimtng 3893abde19
Model Treeview: Remember the expanded state (#2387)
Applies to both the model page and the model picker popup.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-22 21:55:45 +01:00
Mark Herwege 9704404968
Sitemap editor: Add slider releaseOnly parameter support (#2390)
Closes #2345.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-02-22 21:52:25 +01:00
jimtng 94ccd311c3
Fix semantics picker alignment class (#2389)
Missed these in #2362.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-22 21:44:46 +01:00
Mark Herwege 3a93123fc5
Persistence edit: Change empty-state-placeholder icon (#2391)
Change the icon shown when no persistence is configured to be the same as the icon on the settings page.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-02-22 21:38:17 +01:00
jimtng ff034d5ed2
Update links to the add-ons store (#2380)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-20 18:49:07 +01:00
jimtng b30b7e2e18
Developer sidebar icon: Check for admin role (#2378)
Fix https://github.com/openhab/openhab-webui/pull/2369#issuecomment-1951462800.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-19 17:51:03 +01:00
jimtng c703f4b23e
Rule edit: Generate suggested trigger title only when none is available (#2377)
This lets the helper library provide a more accurate label for custom triggers.

Related: https://github.com/openhab/openhab-jruby/pull/254.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 19:28:33 +01:00
Florian Hotze 260389bd4d
Item edit: Fix code tab not working properly (#2375)
This was due to bad ready handling, where the code editor was
initialized with not editable because the Item was not loaded yet.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-18 17:23:47 +01:00
jimtng a5869f3996
Label and style all UID elements consistently (#2336)
Resolve #2335.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 15:59:35 +01:00
jimtng 3f024771dd
Rule & Script editor: Various improvements (#2362)
- Remove/hide non-functional title/description input fields in the initial Add Trigger/Action/Condition for the rule editor. 
- When editing a rule module, set the popup title to reflect the type of module, i.e. "Edit Trigger", or "Edit Condition"
- Changed the link on the top right corner from `Done` to `Save`
- Removed the pencil icon for consistency.
   Previously, Cron and Scripts have a pencil icon which goes to the Edit module popup vs clicking directly on the line goes directly to Cron Builder, or Script Editor.
   Now with the pencil icon gone, cron will go into the Edit module popup, which can lead to the cron builder from there, and Scripts go directly to script editor.
   Changing the script title/description is possible from
within the script editor's bottom area as shown below.

Script Editor:
- Change the title of Script Editor, from "Edit Script" to better clarify what type of script is being edited.
- Add the ability to change the script's title and description after they're created.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 13:24:00 +01:00
jimtng af6174b9dc
Add a global component developer-dock-icon (#2369)
Also add the icon to widget-list and script-edit pages.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-18 11:56:31 +01:00
Florian Hotze 26673dc9f6
Help sidebar: Fix wrong section in developer tools (#2373)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-17 21:17:45 +01:00
jimtng 6b8293548d
Developer sidebar: Add clipboard icons (#2372)
Add clipboard icons to the search results and the pinned entities to copy their IDs.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-17 21:02:03 +01:00
jimtng f95709c3c8
Fix rule module editor popup for blockly (#2367)
Currently for Blockly Script Action or Condition, clicking on "Edit module" the pencil icon would open up rule-module-popup,
which allows user to edit the raw javascript directly without regard to the blockly's block code.

This PR changed it by replacing the configuration sheet with a button that leads to the blockly editor.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-17 20:26:15 +01:00
Florian Hotze add0b91a6b
Persistence edit: Make page title dynamic & Fix delete back navigation (#2371)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-17 20:11:19 +01:00
Florian Hotze 644a1fc7b6
Add-on config page: Fix dirty handling (#2370)
Fix regressions & leftovers from #2314.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-17 18:44:34 +01:00
Florian Hotze 2c0182940b
Help sidebar docs: Fix external anchors & Script editor RegEx (#2368)
- Fixes an issue reported in
https://github.com/openhab/openhab-webui/pull/2322#issuecomment-1948875309
where external anchor hrefs did not work.
- Fixes an issue where the script editor docs were shown on the
`/settings/scripts/` page.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-17 12:16:37 +01:00
Jeremy 344779acfa
Fix alexa thermostat attribute parameters (#2364)
Breakage introduced by #2194

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2024-02-16 22:10:26 +01:00
jimtng 02317ea716
Add back the 'When' prefix for file-based script trigger titles (#2360)
Fix regression from #2352.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-16 11:27:20 +01:00
Florian Hotze 18db55db26
Model page & Model Item picker: Don't remember "Show non-semantic" checkbox (#2358)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-16 10:39:06 +01:00
Florian Hotze 72f5637d01
Model page: Remember checkbox settings (#2355)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-15 20:43:35 +01:00
Florian Hotze e3fae0b051
Thing create: Fix bridge can't be selected (#2354)
Regression from #2329.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-15 19:21:10 +01:00
jimtng 95c33a34b6
item-form.vue: Various (layout) improvements & Refactor tag-input.vue (#2326)
- Make type, dimension, unit, semantic class and semantic property all lined up with name, label, category.
- Slightly shift category icon to the right to line it up with the rest.
- Move the group section directly underneath the Item type.
- Make the item form fields update their states after switching back from the Code editor.
- Show the parent groups similar to how tags are displayed.
- Minor bug fixes.

- Refactor tag-input.vue:
  - Make tags always extended.
  - Show zero when there are no tags.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-15 19:15:18 +01:00
Florian Hotze 80a172eab3
Home edit: Fix model card settings drop-down not accessible (#2304)
Fixes issue mentioned in
https://github.com/openhab/openhab-webui/pull/2144#issuecomment-1784114001.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-15 15:57:07 +01:00
jimtng 735bf987ff
Accept double click to pick an Item in model picker popup (#2348)
Allow double clicking to select an item here, without having to click "Pick" at the top right corner.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-15 14:26:52 +01:00
jimtng e2d2ca6a20
Remove padding in list grouping toolbar (#2347)
Minor cosmetic change.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-14 19:38:34 +01:00
jimtng b30030fdda
Remember checkbox settings in model picker popup (#2349)
Remember these checkboxes so they don't need to be re-checked every time.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-14 19:36:40 +01:00
jimtng 85f21bbec6
Rule edit: Fix undefined currentSection error in trigger-module-wizard (#2350)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-14 19:19:56 +01:00
jimtng 762b4b2a87
Rule edit: Remove redundant module title prefix (#2352)
See https://github.com/openhab/openhab-core/pull/4090.

- When/If removed
- Added prefix "item", "thing", similar to "channel"
- play sound "xxx.mp3"
- thing changed -> thing status changed

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-14 19:09:53 +01:00
jimtng b88fa5dc43
[blockly] Fix console warnings when switching to Math (#2309)
Fix this to avoid a whole bunch of these warnings were logged when
switching to math category

```
blocks-math.js:302  CodeGenerator init was not called before blockToCode was called.
blocks-math.js:303  CodeGenerator init was not called before blockToCode was called.
```

This is a quick and dirty solution without doing a bigger refactoring

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-13 22:12:45 +01:00
jimtng b10244dd1a
[blockly] Fix incorrect field names (#2307)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-13 22:10:41 +01:00
jimtng 979bfb1832
[blockly] Fix persistence block ZDT disconnection (#2306)
Fix so oh_get_persistvalue block does not unnecessarily disconnect the
ZDT input every time a different methodname is selected.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-13 22:06:39 +01:00
jimtng 76aebaf08e
Fix item-add save (#2346)
Regression from #2339 causing a new item unable to be created / saved.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-13 10:23:49 +01:00
lolodomo 24a7bf05b8
[BasicUI] Show buttons on several lines when not enough place (#2341)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-02-11 18:34:34 +01:00
JustinGeorgi 946b499f6d
Allow custom page icons (#2340)
This adds the ability to set custom icons for pages. The custom icons
can be any icons available to the the oh-icon component. They are
visible in the side bar and in the page settings list.

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-02-11 11:59:37 +01:00
JustinGeorgi 7c78241eb6
Fix sidebar search scene and script integration (#2338)
Fixes a few minor error with scripts and scene in the developer toolbar
search function:
1) Scenes and scripts could be pinned but not unpinned
2) Scenes and scripts were not enumerated with the other types for
determining existence of search results

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-02-11 11:53:39 +01:00
Florian Hotze ee5adb92fa
Sidebar help: Add script editor docs (#2331)
Depends on https://github.com/openhab/openhab-docs/pull/2231.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-10 17:30:57 +01:00
Florian Hotze 75bac51626
Fixes & Improvements to persistence edit, channel details & doc links logic (#2339)
- Improve doc link logic and use Vuex store for the openHAB website url.
- Channel info: Fix clear buttons displayed even if not editable.
- Persistence edit: Fix styling issues.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-10 17:30:38 +01:00
Florian Hotze 6ed621e92f
Settings page: Improve loading behaviour (#2332)
Fixes #2323.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-10 00:21:18 +01:00
jimtng 98271e57ca
Item edit: Fix semantic class cleared when property set to None (#2325)
On the Item Editor:

Current behaviour, when we have:
Semantic Class: Control
Property: Light

When changing Property to None, it would clear Semantic Class "Control"
too.

The Fix is not to clear the Semantic Class.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-09 23:17:44 +01:00
jimtng 6f167a51fe
Model picker popup: Add "Show name" and "Show tags" options (#2320)
This makes it easier to find items e.g. when building rules

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-09 23:10:49 +01:00
Florian Hotze 0cbda05ee7
Item & Rule pages: Minor fixes & Improvements (#2330)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-09 22:42:36 +01:00
Florian Hotze 866d9e559e
Thing page: Fix dirty checks & Fix not-editable handling (#2329)
Fixes dirty checks: When the code tab was opened, the page always wanted
to be saved before leave, even though nothing was modified.

Fixes not-editable handling: Channels were configurable even though the
Thing was not editable and the save keyboard shortcut attemted a save.
In both cases, the according API requests failed, because the Thing was
not editable.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-09 22:04:00 +01:00
Florian Hotze 22a4b99482
Item details: Fix group member selection allows to select unmanaged Items (#2328)
This lead to an error being thrown because openHAB core does not allow
to modify group membership of unmanaged Items and returns a 405.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-09 19:33:31 +01:00
Florian Hotze fff3d0ec72
Config sheet: Show advanced params if not default or not empty (#2313)
Advanced parameters should be shown to the user if they have:

- a default value defined and the value is not the default value
- no default value defined and they have a value set

This is more transparent to the user and improves the UX, because the
user does not need to enable "show advanced" just to check whether he
has set up or modified advanced parameters.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-09 19:21:17 +01:00
jimtng 5e5261beb1
[blockly] Set output type of oh_check_undefined_value to boolean (#2311)
On the default renderer, it isn't obvious that this is wrong, but on
Zelos where generic output (rounded) vs Boolean output (angled) have
different looks, it's glaringly obvious.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-08 09:55:42 +01:00
jimtng 026582bb72
Disable Item editor fields for unmanaged items (#2319)
Currently the UI would allow editing an uneditable item, despite giving
errors when trying to save it. This PR marks the relevant fields as
read-only or disabled, preventing them from being edited in the first
place.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-08 00:02:01 +01:00
jimtng e18a057ffd
[blockly] Add tooltips to the show block/code buttons (#2317)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 18:20:57 +01:00
jimtng de4ed8b21c
[blockly] Fix typos in transformation block tooltip (#2308)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 18:20:32 +01:00
jimtng aa79ab2265
[blockly] Fix warning when show code button is clicked twice (#2316)
Avoid an error popup when clicking the show code button when already
in code preview mode.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 18:11:15 +01:00
jimtng b49ab25d19
Add commenting/uncommenting with Ctrl-/ and Cmd-/ (#2322)
Resolve #1336.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 18:04:00 +01:00
jimtng 05395107c8
Fix code editor's Ruby detection (#2321)
This fixes the syntax highlighting for Ruby because it's now recognised
correctly.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 17:58:42 +01:00
jimtng 362d9f3d3d
Rule/script: Fix fields not editable in create mode or for Blockly (#2318)
Regression from #2276 which caused a new rule unable to be created
because the rule name/description couldn't be entered (fields are
disabled)

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-02-07 12:42:33 +01:00
Florian Hotze 1d5d217abb
Addon config page: Use dirty mixin & Add Ctrl-S shortcut (#2314)
Check for unsaved changes before leave and add the Ctrl-S shortcut for
save.

This makes it consistent with the service config page.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-06 21:05:38 +01:00
Florian Hotze 93dce567dc
Fix UoM metadata not stored when Item created from link (#2302)
Fixes #2299.

Also enhances the Item name validation when creating a new Item from the
Items list.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-05 21:15:09 +01:00
openhab-bot 262dc22e8f
New Crowdin updates (#2286) 2024-02-05 18:20:02 +01:00
openhab-bot f5d2b13c12
New Crowdin updates (#2287) 2024-02-05 17:39:42 +01:00
Florian Hotze f4c02a73a3
`oh-block`: Allow setting style properties (#2305)
Also evaluate widget expressions in the block title.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-05 13:44:20 +01:00
Florian Hotze eacf1d7595
Hide runtime errors and warnings from webpack dev server client overlay (#2303)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-04 16:27:33 +01:00
Florian Hotze 1e1ef59ea5
Widget expressions: (Partly) Fix handling of Item name being `undefined` (#2301)
When using the `@` and `@@` shortcuts for Item displayState and state in
widget expressions, properly handle cases where the Item name is
`undefined`.
Unfortunately I did not find a way to improve that for `items[itemName]`
expressions.

Requesting the Item state from the server when the Item name is
undefined leads to warnings in the log (which might cause some confusion
for the users):
```
[WARN ] [se.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined
```

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-02 22:43:12 +01:00
Florian Hotze 287009e119
Fix regressions caused by wrong YAML library usage (#2300)
Regression from #2267.

In #2267 the YAML library was upgraded to a new version, but the usage
of the library was not adjusted to breaking changes.
This PR fixes all issues discouvered in the browser console.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-02-02 22:26:10 +01:00
GiviMAD 1c03c60f84
Upgrade from webpack v4 to v5 (#2267)
Upgrade webpack and related build dependencies from v4 to v5.
Also upgrade the NodeJS and npm versions used by the Main UI build as well as babel.

The changes follow the recommendations of the webpack migration guide at https://webpack.js.org/migrate/5/ or are required changes for updated webpack plugins.
New default values causing problems have been overwritten, e.g. devServer.compress: false because compression broke the SSE event streams.
The ModuleConcatenationPlugin is not created manually in production mode anymore, as this setting broke the production build, and it is not neccassary to create that, as this plugin is automatically enabled in production mode.
See https://webpack.js.org/plugins/module-concatenation-plugin/.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2024-01-31 00:32:56 +01:00
Jeremy 424e646297
Update alexa range value attribute parameters (#2296)
Related to https://github.com/openhab/openhab-alexa/pull/650.
Related to https://github.com/openhab/openhab-alexa/pull/651.

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2024-01-30 09:39:33 +01:00
Florian Hotze 6ea38c34cc
Lazy load the developer dock (#2294)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-30 00:11:00 +01:00
Florian Hotze 660b8f1578
Fix `oh-stepper` sends command on Item state update due to rounding (#2096)
Fixes #1186: Widget sends command on external update due to rounding.

This is done by replacing the generic change listener with listeners for
plusclick, minusclick and input for input element events.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-29 20:37:19 +01:00
Florian Hotze 89766f32bb
Transformation edit: Fix copy UID doesn't work (#2295)
Fixes #2292.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-28 23:14:10 +01:00
Florian Hotze a13d34a956
Rule/Script edit: Fix not editable not properly handled & Always show tags (#2276)
Fixes an issue where the configuration of a script action of a
file-based rule (e.g. those created using JSRule or Rule Builder of
openhab-js) was shown as editable, even though the rule is not editable
because it is provisioned from file.

Always show the tag input, even if there are no rule tags. This is more
consistent and avoids confusion, as you can now clearly see that a rule
has no tags.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-28 13:42:38 +01:00
lolodomo 1966ba3a53
[BasicUI] Replace non printable characters (#2284)
Fix #2250

Non printable characters are replaced by the unicode replacement
character.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-27 20:58:23 +01:00
Florian Hotze 4864f43326
Home page: Hide tab bar if all model tabs are hidden (#2291)
If all model tabs are hidden, the tab bar has only one entry and
therefore there is no need to display it.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-27 17:35:39 +01:00
Florian Hotze 8b6b262304
Help sidebar: Move docs to docs repo & Integrate them into the UI (#2253)
Follow-up for #2088.
Depends on https://github.com/openhab/openhab-docs/pull/2199.

Also add the help sidebar button to the settings and list pages where it
is missing.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-27 12:01:12 +01:00
Florian Hotze f30941e49c
Help Feature FAQ: Remove persistence FAQs (#2290) 2024-01-27 11:49:53 +01:00
Florian Hotze f493e970fe
Settings page: Fix add-on settings header displayed when no add-ons installed (#2289)
Fixes #2266.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-27 01:20:50 +01:00
openhab-bot 63613c1881
New Crowdin updates (#2237) 2024-01-26 16:43:19 +01:00
lolodomo 32a7393c65
[BasicUI] Close EventSource when leaving (#2282)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-21 21:35:50 +01:00
lolodomo 3a31e85fba
[BasicUI] Fix SSE reconnection to the current page (#2280)
After an error in the SSE connection, the event source is now
reconnected to the right sitemap page.

Fix one of both problems explained in #1757

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-20 22:28:38 +01:00
Yannick Schaus c89614d0af
Update descriptions in the settings menu (#2273)
Signed-off-by: Yannick Schaus <github@schaus.net>
2024-01-18 01:25:04 +01:00
Florian Hotze 64c1e3576a
Thing edit: Hide clear button for location if not editable or not ready (#2277)
Fixes #2272.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-17 22:30:05 +01:00
Wouter Born ef523642a9
Cleanup Java code (#2263)
This cleanup includes:

* Fix deprecations
* Fix JavaDocs
* Remove redundant toString calls
* Remove redundant semicolons
* Simplify boolean expressions
* Use diamond operator
* Use enhanced for loops
* Use instanceof pattern matching
* Use isEmpty instead of 0 comparisons
* Use lambdas
* Use static inner classes
* Use StandardCharsets

Also adds the SA_LOCAL_SELF_COMPARISON suppression similar as used in
other repositories for https://github.com/spotbugs/spotbugs/issues/1992.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-17 19:10:16 +01:00
Florian Hotze f912de509c
oh-colorpicker: Replace defaultColor option with an actual default color (#2270)
Remove the defaultColor option.
Instead use RGB(0,0,0) black as default color if the Item state holds no
valid color, so that the color picker is accessible.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-01-14 14:50:56 +01:00
dependabot[bot] 4d4aea4a69
Bump follow-redirects from 1.14.8 to 1.15.4 in /bundles/org.openhab.ui/web (#2264)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.8 to 1.15.4.

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-14 12:56:18 +01:00
jimtng a7cf1a0a1d
[BasicUI] Fix Buttongrid alignment on desktop (#2260)
Fixes #2259

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-01-13 16:58:51 +01:00
lolodomo 5a09f71eae
[BaiscUI] Adjust the SVG icon in buttons to the current theme (#2257)
Only concerns SVG icons delivered by the openHAB icon servlet and having
"currentColor" as fill color.

Convertion to inline SVG is applied only if the "inline SVG" setting is
enabled.

Fix #2249

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-07 11:33:57 +01:00
Wouter Born 225e61c97c
Improve network-interface context support (#2246)
This allows for selecting multiple network interface names in
configuration parameters.

Related to:

* https://github.com/openhab/openhab-core/pull/3981
* https://github.com/openhab/openhab-addons/pull/16145

Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-06 11:36:57 +01:00
Wouter Born afdfa01b07
Update license headers to 2024 (#2254)
Signed-off-by: Wouter Born <github@maindrain.net>
2024-01-03 21:17:55 +01:00
lolodomo b6aeaa5760
[BasicUI] Enhance the description of the "Inline SVG" setting (#2247)
In order to explain the default value.

Related to #2240

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-02 19:56:06 +01:00
Mark Herwege 898b519c77
[BasicUI] icon.png minimal fix (#2232)
See comment
https://github.com/openhab/openhab-webui/pull/2231#issuecomment-1867570889

This is the minimal fix to the issue.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-01-02 19:26:18 +01:00
lolodomo b175d1b6bd
[BasicUI] Fix image element being link to a sub page (#2238)
Fix #2233

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-01-01 16:05:14 +01:00
Florian Hotze bf2f257afe
Settings pages: Fix x-overflow and large spaces on phone screens & Change icon for persistence config (#2248)
Follow-up for #2229.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-30 15:47:23 +01:00
Mark Herwege 2fe6ae9b3b
Add a new settings menu for persistence (#2229)
Persistence policies can be configured from the UI. However, it is
difficult to find, and one needs to know where to look. Apart from a
documentation issue, I think persistence is core enough to merrit its
own entry in the settings, so it becomes more prominent.

See for example here:
https://community.openhab.org/t/after-reboot-string-values-are-empty/152064/16

This adds a persistence entry below transformations to the settings menu.

The new persistence config page allows to set the default persistence,
and links to defining the policies for each installed persistence add-on.
There also is a "add" list entry to install more persistence add-ons.
If none is installed, it will explain persistence and link to the docs and the add-on store.

The default persistence settings has been removed from the system
settings, and the link to the persistence policy config from the add-on
settings page has been converted to a button.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-30 00:48:18 +01:00
Florian Hotze 0f35e0ef55
Fix Quickstart-Button shown for non-admin users (#2245)
Follow-up for #2209.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-30 00:32:14 +01:00
dependabot[bot] 3e5018b973
Bump minimatch from 3.0.4 to 3.0.8 in /bundles/org.openhab.ui.basic (#1779)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to
3.0.8.

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-29 23:19:21 +01:00
dependabot[bot] 25afea1c1f
Bump semver from 5.7.1 to 5.7.2 in /bundles/org.openhab.ui.basic (#1959)
Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-29 22:54:33 +01:00
dependabot[bot] 480f7ad239
Bump word-wrap from 1.2.3 to 1.2.5 in /bundles/org.openhab.ui.basic (#2236)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3
to 1.2.5.

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 19:28:17 +01:00
lolodomo 09df379308
[BasicUI] Fix closing h4 tag in sitemap list page (#2234)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-26 17:38:09 +01:00
Kai Kreuzer 4eda3ac170 Apply spotless after release
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-12-22 23:33:18 +01:00
openhab-bot f4cf9535f3 [unleash-maven-plugin] Preparation for next development cycle. 2023-12-22 18:16:31 +00:00
Mark Herwege cdfe37a72b
[BasicUI] Fix icon none (#2231)
As described in
https://community.openhab.org/t/openhab-4-1-milestone-discussion/149502/222,
none.png is not found for BasicUI.

This PR replaces it with non.svg, see discussion on forum.

@lolodomo @florian-h05 I was behind my screen when I saw the issue. I
didn't test, but did the replacement based on info provided on the
forum.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-22 11:34:06 +01:00
openhab-bot a908b02820
New Crowdin updates (#2230) 2023-12-20 18:19:39 +01:00
openhab-bot 4593101773
New Crowdin updates (#2225) 2023-12-19 19:39:59 +01:00
Mark Herwege f94187652e
No suggestion for installed add-ons (#2226)
Suggestions are being shown in the add-on store for add-ons that are already installed.
This PR removes suggestions for installed add-ons.

See request here https://github.com/openhab/openhab-core/issues/3868#issuecomment-1859950504.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-19 18:49:11 +01:00
GiviMAD d52296a0e1
Add panel for voiceSystem metadata (#2222)
Refs https://github.com/openhab/openhab-core/pull/3925,
https://github.com/openhab/openhab-core/pull/3897 and
https://github.com/openhab/openhab-core/pull/3853.

---------

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-12-17 12:20:17 +01:00
openhab-bot 20a313f266
New Crowdin updates (#2201) 2023-12-17 10:58:39 +01:00
Florian Hotze ab080dc8d2
Model page: Add expand/collapse model button (#2224)
Brings #2191 to the model page:
Provides a button to expand or collapse the model tree.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-16 16:09:08 +01:00
Florian Hotze c8a58fb744
Update component docs (#2223)
Follow-up for #2190 and #2215.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-15 22:06:01 +01:00
Yannick Schaus a5cce9a4c9
Fix unwanted model card back navigation (#2221)
Fixes #2196.
Replaces #2211.

The double back navigation was caused by:

31f4c7065e/src/core/utils/history.js (L56-L61)

and `router.updateCurrentUrl()`, unlike the name implies, doesn't update
`router.url` for some reason (maybe a bug?).

-----

Signed-off-by: Yannick Schaus <github@schaus.net>
2023-12-15 21:54:32 +01:00
Florian Hotze 813fb72480
Update openhab-js tern defs (#2220)
This updates the tern defs used for autocompletion to the current
library version included in the addon (4.7.0).

Reference https://github.com/openhab/openhab-js/compare/v4.0.0...v4.7.0.

Last update of those was in #1710.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-14 21:35:31 +01:00
Mark Herwege da639e2f7d
Limit add-on settings menu list to bundles (#2217)
When installing rule templates or UI components or blockly libraries
from the marketplace, they get an entry in the add-on settings menu.
There is nothing that can be configured in these types of add-ons.
Therefore limit the list to bundles and features.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-14 08:58:13 +01:00
Florian Hotze f4773a7c86
Sitemap editor: Move collapse chevron for toolbar to the left (#2218)
Follow-up for #2193.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-13 23:55:15 +01:00
Mark Herwege 123a8d3fd7
Sitemap Editor: Buttongrid support (#2193)
This PR adds the Buttongrid element to the sitemap editor.
There is also some cleanup for configuration on small screens.
See https://github.com/openhab/openhab-core/pull/3810 and
https://github.com/openhab/openhab-android/issues/3494

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-13 20:28:41 +01:00
Florian Hotze 03fdd31616
oh-input: Update component docs & Minor fixes (#2215)
- Update component docs (follow-up for #2214).
- Avoid sending "Invalid date" to server and do not accept "Invalid
date" as a valid state.
- Fix some errors thrown while configuring component or providing
invalid input.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-13 00:25:45 +01:00
Mark Herwege d4e4fb678e
Add more suggestions in add-on store (#2213)
Some persistence services can be detected by suggestion finders. They
are not made visible in the add-on store so far. This PR fixes this.

See
https://github.com/openhab/openhab-core/issues/3868#issuecomment-1848899824

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-13 00:01:08 +01:00
Mark Herwege be188e344c
Support time in oh-input widget (#2214)
Time only was not supported so far in the oh-input widget.

This was requested in the community forum:
https://community.openhab.org/t/using-a-user-input/151884/9

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-12-12 23:49:38 +01:00
lolodomo 4e73cbf968
[BasicUI] Implement Buttongrid widget (#2195)
Support grids containing from 1 to 12 columns.
Only the first 8 columns are rendered on tablet.
Only the first 4 columns are rendered on phone.

Related to openhab/openhab-core#3441

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-12-12 22:19:01 +01:00
JustinGeorgi 8c12108337
Fix auto-opening developer dock (#2209)
Closes #2206 

This will replace the auto-opening developer dock with a button on the
empty overview page to open the in-app quick start tutorial. Button will
only appear on pages wide enough to support the developer dock.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-12-11 09:27:54 +01:00
stefan-hoehn 8cc9e4b573
[blockly] Add block to get hue, saturation and brightness from Color Item (#2210)
Small extension to retrieve Hue, Saturation or Brightness from a color
Item.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-12-10 22:50:34 +01:00
Florian Hotze 7ca7e843e1
Help sidebar & Overview page: Respect release type for doc links & Add persistence FAQs (#2212)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-10 22:43:24 +01:00
Florian Hotze 4fd7c8c611
Developer sidebar: Add search for persistence configs & Style enhancements (#2208)
This adds support to the developer sidebar search to search persistence
configs by:
- serviceId
- label
- Items included in them

It also fixes a styling issue, where tools where to close to the search
bar and search results were far away from the search bar.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-09 16:40:38 +01:00
Florian Hotze 0c199ec102
Rule edit: Only save rule if it has changed when opening script editor (#2203)
Fixes #2027.

When a script inside a rule was opened, the UI always saved the rule
before navigating to the script editor. With this fix, the rule is only
saved if there is a change to save. If the rule hasn't been changed, no
save request is performed.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-07 22:38:45 +01:00
Florian Hotze 93a3e184a3
Items list: Fix searchbar broken after Items list update & Fix search query not stored (#2184)
Fixes #1334.
Fixes #1702.

After editing or removing an Item, the searchbar of the Items list was
sometimes not working anymore. Console then showed this error:
```
TypeError: undefined is not an object (evaluating
'n.virtualList.params')
```
  
It seems that this was caused because the replaceAllItems operation was
applied on the virtual list without re-rendering the searchbar
afterward.

The search query was forgotten when the Items list reloaded or the 
Items list page was re-entered from an Item detail page.
This is also fixed by using `$f7.data` to store the query.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-07 22:28:27 +01:00
Florian Hotze 10da2fea05
Rule/scene/script list: Hide scene/script tag from filter (#2202)
Follow-up for #2122.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-07 22:23:17 +01:00
Florian Hotze ba7f12615b
Rule/script/scene edit: Update tag input & Refactoring (#2083)
- Refactor rule & scene settings into rule-general-settings Vue
component and use this component on rule-edit, scene-edit pages and
inside script-general-settings component.
- Replace semantic tag picker & custom tag input with accordion tag
input (inspired by #2078) and show number of tags.
- Refactor shared code from rules & scenes into mixin
(`rule-edit-mixin.js`).
- Fix Scene tag is not hidden from tag input.
- Show number of tags on page settings page, follow up for #2078.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-07 22:06:16 +01:00
Jeremy 5a9c0c90c7
Fix alexa item group type parameter support (#2194)
Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-12-06 00:14:01 +01:00
Florian Hotze 1c15a11b73
Item edit: Fix wording of Item name alert (#2200)
Addresses
https://github.com/openhab/openhab-webui/pull/2126#pullrequestreview-1765483229.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-05 22:24:12 +01:00
Florian Hotze 617f70b103
Set unit metadata & state description pattern when creating UoM Item (#2126)
Related to https://github.com/openhab/openhab-core/pull/3481.
Closes #2108.

- Ensures that the internal unit is set when an Item is created, so that
in case the system unit changes (i.e. measurement system changes)
persisted data does not get corrupted.
By default, the unit metadata is set to the system default unit, however
the user can easily change that on Item creation.
  
The unit can also be changed later as it is just normal metadata,
however this can corrupt persisted data.
- Adds the ability to set state description pattern when creating a UoM
Item.
- Shows the group type for groups, e.g. `Group (Number:Temperature)`
instead of just the Item type.

This applies to both the Items and the model page.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-12-05 17:06:28 +01:00
lolodomo 18e93f5b1c
[BasicUI] Fix dark theme for selection popups (#2187)
Fix #2142

Add a border to the popup.
Also update the separator color (make it more visible) in dark theme.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-30 21:48:14 +01:00
Florian Hotze 4be00c2673
Update browserslist-db & Remove unused uglifyjs-webpack-plugin (#2156)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-29 11:13:40 +01:00
stefan-hoehn 700c47094c
Model Item picker: Add button to expand or collapse model (#2191)
Fixes #665.

Provides a button to expand or collapse the model tree while searching.

Note: I didn't implement an auto-open because I felt it would be rather disturbing.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-26 23:53:35 +01:00
openhab-bot 231d24b86f
New Crowdin updates (#2169) 2023-11-26 23:39:42 +01:00
Mark Herwege 6dfed0011e
Sitemap Editor: Extend chart period config for ISO8601 (#2186)
Adjust sitemap configuration in main UI for recent changes in sitemap
chart period configuration, see https://github.com/openhab/openhab-core/pull/3863.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-11-26 23:37:36 +01:00
stefan-hoehn 1c297f3175
Extend chart periods to 3Y, 5Y and 10Y (#2190)
Allow further settings 3Y, 5Y, 10Y for dynamic period of chart.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-26 23:27:41 +01:00
lolodomo 3e27463f45
[BasicUI] Fix updating of the chart period parameter in URL (#2162)
The period parameter syntax was extended.
Depends on openhab/openhab-core#3863

Also add few new default periods in the selection of chart period

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-26 21:28:16 +01:00
Florian Hotze 2f67839540
Persistence edit: Add forecast strategy (#2189)
Refs https://github.com/openhab/openhab-core/pull/3597.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-26 16:30:40 +01:00
Florian Hotze 95b48996c8
Fix developer sidebar conceals "Other Apps" panel (#2180)
Fixes #2177.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-26 01:00:27 +01:00
Mark Herwege 42193d1351
Addon suggestions (#2150)
Depends on https://github.com/openhab/openhab-core/pull/3806.

1. Have the setup wizard propose these addon suggestions (as a
complement to the hardcoded recommended addons).
2. List the addon suggestions on top in the addon store page.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-11-26 00:43:50 +01:00
Florian Hotze d8e29f1386
Re-Apply: Fix SSE failure toast container not removed (#2182)
This re-applies the fix from #2075, which must have been lost while
rebasing #1987.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-22 15:23:52 +01:00
lolodomo 9981c87410
Adapt movecontrol icon to bright and dark themes (#2116)
Related to #1769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-21 21:06:32 +01:00
lolodomo c7d0b25f05
Adapt network icon to bright and dark themes (#2117)
Use currentColor as color.

Related to #1769

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-21 19:04:44 +01:00
Florian Hotze 0c8e5acbdd
Developer sidebar: Support searching (in) sitemaps (#2138)
Extends the developer sidebar search to sitemaps, where uid, label and
slots are searched for the query.
Case is ignored.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-21 18:58:30 +01:00
Florian Hotze ea4387cddc
MainUI CONTRIBUTING.md: Mention Vue DevTools & Add FAQ section (#2179)
This is meant to mainly help first time contributors where to start, but
it should also be quite practical for existing contributors and save
them some time looking up stuff.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-20 10:24:01 +01:00
openhab-bot 66c789be02
New Crowdin updates (#1728) 2023-11-19 22:52:23 +01:00
osama-salah b089e9916f
[habpanel] Document scene activation using the selection widget (#1853)
Added a description of how to use the "Selection" widget for changing
scenes.
2023-11-19 22:49:23 +01:00
osama-salah 21909b9f8c
[habpanel] Documentation fixes (#1854)
Changed "Get widgets from the openHAB community"  to "Get more..." and at missing „Can be found“.
2023-11-19 22:43:43 +01:00
d51x fbcc07e6b4
Rules list: Add filtering by (multiple) tags (#2122)
Closes #2123.

This adds filtering by tags to the rules list, the filter is inside an
accordion.
In case you select multiple tags, the filter behaves like OR, which
means all rules which have at least one of the selected tags are
displayed.
In case you use the searchbar, the rules list will be narrowed down to
the rules which match the search query and have the selected tags.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-11-19 17:56:10 +01:00
Florian Hotze f05316669d
Move JSON defs for help features to assets (#2178)
Follow-up for #2088.

I forgot that during review, let's do it now.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-19 12:47:51 +01:00
stefan-hoehn 483e5dc9ba
[blockly] Add event available (#2176)
Fixes #2081.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-19 11:43:42 +01:00
stefan-hoehn cdeee1b576
[blockly] Add parse number block (#2175)
Fixes #2139.

This adds a new toNumber block in the Math section that parses to float (I
think we don't need both parseFloat and parseInt).

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-19 11:41:25 +01:00
stefan-hoehn d438277655
[blockly] Add support for getting persistence previous state value as number (#2174)
Fixes #2173.

Adds the possibility to retrieve the numeric value directly from the previous state.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-11-19 11:28:10 +01:00
JustinGeorgi b4128cb0a4
Add intergrated Help Features (#2088)
Closes #2058.

This converts the developer sidebar into a multipurpose dock. 
It keeps the previous developer sidebar as the `Tools` panel and adds a
`Help` panel.

The new `Help` panel contains 4 different sections:
1) A context dependent section that will show basic help for the
administrative page currently viewed. These pages give basic
definitions, some simple tips and links to the relevant full
documentation.
2) An add-on section that lists all the currently installed add-ons and
provides direct links to their documentation pages.
3) A FAQ section for simple answers to common questions with internal
links to help guide the users, some external links to relevant
resources, and links to documentation pages providing more details about
the question.
4) A Quick-Start section that guides a new user with click-by-click
instructions for everything from binding installation to adding a widget
to a MainUI page with links to the detailed Getting Started Tutorial for
each step. This section is opened by default when an administrator opens
a new MainUI instance with no configured overview page (i.e., most
likely a new user).

All of the main setting list pages and the overview page now have a help
icon in the navbar that toggles the help dock.

FAQ and Quick-Start data are stored in separate JSON formatted files for
ease of addition and maintenance.

------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-11-17 23:05:54 +01:00
lolodomo dfbdcf23b3
Remove PNG icons from the classic icon set (#2084)
The docker environment is (unfortunately) kept. It can be used to
compress SVG files. Conversion from SVG into PNG format has been
commented in the script .convert.sh.

Closes #2071
Closes #1768

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-11-13 22:13:07 +01:00
d51x 18ad473c6e
Things: Add copy channel functionality (#2131)
Added ability to copy channels of Things.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-11-09 10:25:11 +01:00
Gwendal Roulleau a2f9003d09
[webaudio] Allow stopping play (#2031)
Use of a dictionary to store audio sources currently playing and stop
them all when asked to.
Refs https://github.com/openhab/openhab-core/pull/3766.

Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
2023-11-08 10:38:44 +01:00
jimtng d8c69fbd27
[blockly] Cosmetic changes on cancel and reschedule timer blocks (#2163)
Make the blocks say "Cancel [private|shared] timer XXX" and "after xx
reschedule [private|shared] timer XXXX"
Also put the reschedule block right after cancel.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-11-08 10:15:26 +01:00
Thomas Wunschel f4bbba0df6
Fix error when actionAnalyzerItems value is a string (#2159)
Fixes #2158.

Only join `actionAnalyzerItems` values if the variable is an Array.

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
2023-11-04 11:53:11 +01:00
openhab-bot f1e2c39b69
New Crowdin updates (#2124) 2023-11-04 11:51:36 +01:00
Stefan Roellin 4103c08515
Fix invalid chart period "3M" of sitemaps (#2160)
"3M" for three months is an invalid chart period for a sitemap. Replace
it with "4M" for four months, which is missing.

See https://next.openhab.org/docs/ui/sitemaps.html#element-type-chart

Signed-off-by: Stefan Roellin <stefan@roellin-baumann.ch>
2023-11-04 11:11:18 +01:00
Florian Hotze 060c14ec03
`oh-stepper`: Fix NaN shown for Item state with unit & Fix unable to control Item with NaN state (#2137)
Regression from #2090.

Reported on the community, see
https://community.openhab.org/t/openhab-4-1-0-m2-oh-stepper-not-working-properly/150372?u=florian-h05.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-11-02 21:38:38 +01:00
Florian Hotze 6d71b3d5d8
SSE event mixin: Replace RegEx lookbehind assertion with split by string (#2157)
Fixes #2153.
Regression from #2055.

MainUI was broken on older iOS versions, e.g. 15.8, because RegEx
lookbehind assertions were introduced with Safari 16.4.
This uses split by string instead and adds an ESLint rule to forbid
the usage of RegEx lookbehind assertions.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-30 17:42:06 +01:00
alexxys 8f06d97c5e
Create aux badge for humidity setpoints similar to temperature badge (#2154)
The temperature badge shows both the measured temperature and the
temperature setpoint in the form "measurement_value (setpoint_value)",
e.g. 20° (21°). 
This introduces the same format for
humidity badge by showing humidity setpoint in addition to humidity
measurement.

Signed-off-by: Alexander Antonov <alexxys@gmail.com>
2023-10-30 08:34:10 +01:00
Florian Hotze c9de04eaff
Fix color picker not displayed correctly (#2136)
Fixes #2134.
Regression from #1989.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-29 14:50:57 +01:00
Thomas Wunschel c2d071a9cf
Support configurable visibility of semantic model cards (#2144)
Closes #2143.

Only render model-card if `visible` computed property is `true`.
Hide divs in model-tabs which do not have a visible model-card.

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
2023-10-29 14:39:48 +01:00
dependabot[bot] 4f331b5702
Bump browserify-sign from 4.2.1 to 4.2.2 in /bundles/org.openhab.ui/web (#2155)
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 14:03:25 +01:00
Florian Hotze aef0a6bf74
Fix missing footer element for Item Vue component (#2135)
Fixes #2133.
Regression from #2087.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-29 11:40:49 +01:00
Mark Herwege 922c4f3db7
Sitemap editor: Support AND conditions and icon rules (#2145)
Fixes #2149: Syntax validation errors when command mappings contain special characters like [ and ].

Sitemaps now support icon rules and AND conditions in icon, color and visibility rules.
Mappings now also support an icon.

This PR introduces support to configure this in the sitemap editor.
It also contains a fix for staticIcon support.

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

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-10-27 14:04:31 +02:00
lolodomo d34f93a275
[BasicUI] Add support for icons based on conditional rules (#2020)
Depends on openhab/openhab-core#3820 and #1998 

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-26 23:53:56 +02:00
d51x 0a8c9a7059
Add copy rule functionality (#2132)
This adds the ability to copy a UI rule.
The rule editor behaves as if the rule was a new one, but is pre-populated with the copied rule. 

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-10-22 19:51:47 +02:00
dependabot[bot] bcae592a5f
Bump @babel/traverse from 7.6.2 to 7.23.2 in /bundles/org.openhab.ui/web (#2140)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.6.2 to 7.23.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-22 19:05:48 +02:00
JustinGeorgi 335d149895
Fix oh-clock context in clock card (#2146)
This PR fixes an error in the context definition of the `oh-clock` used
in the `oh-clock` card that was causing the clock cards to fail to
render in the updated configuration definition.

See the forum discussion:
https://community.openhab.org/t/oh4-oh-clock-card-empty-since-oh4-1-m2/150518

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-10-22 18:23:52 +02:00
Florian Hotze bf377d38af
Unwrap command Item picker from f7-list-item (#2125)
Addresses
https://github.com/openhab/openhab-webui/pull/2055#discussion_r1350710682.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-09 23:30:28 +02:00
Florian Hotze e987624fcc
Item edit: Dynamically load UoM dimensions (#2120)
Fixes #1926.
Awaiting https://github.com/openhab/openhab-core/pull/3838.

Load the UoM dimensions for UoM Item types from the REST API instead of
hard-coding them into the UI.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-09 23:21:55 +02:00
openhab-bot 1409da92bf
New Crowdin updates (#1980) 2023-10-08 22:43:07 +02:00
d51x a1a33294fa
Things list: Add grouping by location & Display location in list entries (#2107)
Closes #2099.

Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-10-08 21:23:00 +02:00
Dan Cunningham 27c140aaec
Adds an UI command Item (#2055)
This allows the local running instance of the UI to listen to an Item
for commands. Specifically it will understand the following commands.

- navigate
- popup
- popover
- sheet
- close (closes all popups/sheets/popover)
- back
- reload
- notification

Commands with arguments use a colon delimiter, mirroring widget actions
in the UI, for example:
- `navigate:/pages/page`
- `popup:widget:customWidget`
- `notification:Text:Title:Sub Title:Title Right:5000`

Users can select the item in the about menu, since other local
options are set there it seemed to be the best place.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2023-10-08 21:20:46 +02:00
stefan-hoehn e2ebc1de52
[blockly] Support Quantity in more math blocks (#2041)
Closes #2001.

Adds Quantity support for more math blocks:
- math_single had to be reimplemented
- math_minmax was added

Note that there is a special case on min/max if the inputs are not of
equal type an error will be shown to user.

In the special case of variables Blockly does its best to detect the
right code to be generated for the min/max block:
- both are variables -> then numerical input is expected
- one of inputs is a variable: then blockly uses the type of the other
non-var-block to base the generation on (either number or quantity
comparison)
- note that no type conversion of the inputs is done

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-10-08 21:16:12 +02:00
dependabot[bot] aaa5e7aaa0
Bump semver from 5.6.0 to 5.7.2 in /bundles/org.openhab.ui/web (#1960)
Bumps [semver](https://github.com/npm/node-semver) from 5.6.0 to 5.7.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 19:53:06 +02:00
dependabot[bot] 696c9076e9
Bump word-wrap from 1.2.3 to 1.2.5 in /bundles/org.openhab.ui/web (#2115)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3
to 1.2.5.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 19:51:39 +02:00
Florian Hotze d4d7bea7fb
Fix `oh-stepper` not working if step is an integer (#2109)
Regression from #2090.

Fixes `Uncaught TypeError: Cannot read properties of undefined (reading
'length')` being thrown if the step property is an integer value, e.g. 1
or 1.0.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-08 09:50:04 +02:00
lolodomo 1c362ccf64
[BasicUI] Hide header row if label not explicitly set (#2112)
Applied to Chart/Image/Viodeo/Mapview/Webview elements.

Chart and Image elements are also now clickable.
Clicking allows toggling between header row shown and header row hidden.

Fix #2065

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-08 09:45:11 +02:00
lolodomo c76a8e37c8
[BasicUI] Prefer sitemap label to name in sitemap selection (#2110)
Sitemaps are now also sorted by label/name.
Dark theme is now properly handled.

In case several sitemaps have the same label, the sitemap name is
concatenated in parenthesis.

Fix #2101

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-06 10:07:00 +02:00
lolodomo 23550c65a9
[BasicUI] Prefer icon over text in buttons (switch element) (#2085)
Related to openhab/openhab-core#3441

Depends on openhab/openhab-core#3809

Icons will not be used if icons are not enabled (app setting).

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-03 19:28:54 +02:00
Mark Herwege 87e68aae61
[mainui] support staticIcon parameter in sitemap configuration (#1999)
Related to https://github.com/openhab/openhab-core/pull/3735

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-30 22:16:40 +02:00
Florian Hotze f32ef1f401
Fix `oh-` components cannot be configured in action modals (#2094)
Fixes #927.

When attempting to open an `oh-` Vue component, e.g.
`oh-colorpicker-card`, as action modal, it was not possible to configure
it, even though `actionModalConfig` was set.
This was because `oh-` componens take their configuration from the
computed `config` of the widget-mixin instead of the Vue component
`props`.
This PR fixes that by using the `actionModalConfig` for the computed
`config` of `oh-` components in action modals.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-30 21:59:56 +02:00
Florian Hotze 7893bd9b6c
Add error page for initial REST request failure & Abort further load (#1987)
Migitates and therefore closes #1205.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-30 21:56:02 +02:00
Wouter Born ec13c3d00c
Upgrade to Karaf 4.4.4 (#2098)
* Add specs features because Pax Web now depends on "asm".

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

Signed-off-by: Wouter Born <github@maindrain.net>
2023-09-30 10:47:42 +02:00
David Kesl c402d32563
Semantic model: Remove duplicate non-semantic tags in Item component (#2095)
Changes introduced into #2087 in combination with #2093 create duplicity
in showing non-semantic tags in the model page
(component/model/item-details.vue).
Non-semantic tags are displayed both in the Item and when edit mode is
enabled, in the accordion tag input in item-form.

Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-27 10:08:44 +02:00
Viorel Cojocaru eee0277d89
Update RelativeCI agent action (#2063)
The RelativeCI action was using the CLI with an inline API key.

This PR replaces the RelativeCI CLI with the action agent running on workflow_run
event and in the context of the default branch (secrets are not leaked to forks). 

Signed-off-by: Viorel Cojocaru <vio@beanon.com>
2023-09-26 19:44:38 +02:00
David Kesl 044962251f
Semantic model: Add options to display and search Item names and tags (#2093)
Closes #2092.

- Adds possibility to display Item name and non-semantic tags in Semantic model tree view.
- Adds search for Items also based on Item name and tags depending on selected view options.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-26 16:57:51 +02:00
David Kesl 05c3417194
Items tag: added tags to list, unification of items tag edit (#2087)
Closes #2086

- Adds Non-semantic tags to Items list (e.g. /settings/items/)
consistently with similar list of Rules / Scripts / Pages.
- Extends `getItemTypeAndMetaLabel` with relatesTo part of Semantic
classification and moves it to a mixin.
- Fixes incorrect calculation of vue virtual box height on Items list.
- Replaces custom tag input with accordion tag input (inspired by
https://github.com/openhab/openhab-webui/pull/2078) and show number of
tags (inspired by https://github.com/openhab/openhab-webui/pull/2083).
- Moves the custom tag input to `item-form.vue`, so it is available also
in Model view, when creating Item from Thing etc.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-26 14:02:02 +02:00
JustinGeorgi 0cc4f27f3d
Fix decimal formatting for oh-stepper (#2090)
Fixes #2089.
Possibly regression from #1875.

Stepper formatValue was calculating displayed number of decimals from the value of the step property, not it's length.

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-09-25 22:38:39 +02:00
Mark Herwege 35c3ae05b9
Sitemap editor: Trim spaces from color value (#2091)
When generating the sitemap DSL from a UI configured sitemap with color
conditions, if the color in the condition has a leading space, it will
be included in the color string.
While this does not have an impact on the sitemap functionality (it
works), it is an issue if one would copy this sitemap to a sitemap file.
This PR strips the blanks from the color.

See #2082 and the example provided there.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-25 22:24:54 +02:00
jimtng 881a8b787e
[basicui] Number of Columns label (#2062)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-09-23 17:16:22 +02:00
David Kesl 6fd82e3351
Page edit: Add editing of tags (#2078)
Closes #2077.

This PR adds ability to add / change / remove Tags to Pages via MainUI.
It is using existing tag-input.vue component similar as UI for Items and
Rules.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <davidkesl76@gmail.com>
2023-09-22 10:40:30 +02:00
jimtng 671e791f06
Fix missing jar add-ons on settings page (#2079)
Fixes #2076.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-09-22 01:32:07 +02:00
Andrew Rowe 4876efd906
Change setup wizard icon to choose add-ons to install (#2073)
Signed-off-by: Andrew Rowe <exectechnology@gmail.com>
2023-09-21 20:20:33 +02:00
Florian Hotze cf3b218571
Fix SSE failure toast container not removed (#2075)
Fixes #2069.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-18 20:53:13 +02:00
Florian Hotze d2685e9a12
Add routes for home page tabs (#2074)
Adds routes for `/overview`, `/locations`, `/equipment` and
`/properties` so a home page reload keeps the tab and routing to
individual tabs is possible.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-18 20:51:53 +02:00
Florian Hotze 5068964ad8
Fixes/Improvements for sidebar highlighting, settings page & add-on store (#2053)
Follow-up for #1997.

- Addresses
https://github.com/openhab/openhab-webui/pull/1997/files#r1313446378:
Use filled icon for the add-on store.
- Fixes #2049: Fix sidebar highlighting for add-on settings and add-on
store pages.
- Fixes #2028: Fix tab is resetted to bindings when reloading the add-on
store (by using seperate routes for all tabs, therefore addresses
https://github.com/openhab/openhab-webui/pull/1997#issuecomment-1703221977).
- Closes #2048: Expand system settings by default on large screens where
three columns are used.
- Localize the "Show All" buttons.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Co-authored-by: Yannick Schaus <github@schaus.net>
2023-09-18 20:41:31 +02:00
stefan-hoehn b1a5ac82c0
[blockly] Allow `item xxx` to be used for `get xxx of item` (#2037)
The block can now take both “get item item xxx” or (new) “item xxx” directly.
I have also added some hint in the help tooltip that clarifies
how to work with the block when using it through variables because
Blockly has to make an assumption due to the fact that it cannot detect
what is provided in the variable.

See https://community.openhab.org/t/less-then-greater-then-comparison-return-value-seems-to-be-inverted/148910/9.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-09-17 14:54:46 +02:00
Jeremy c058b12f0c
Update Alexa color temperature supported item types (#2064)
Related to https://github.com/openhab/openhab-alexa/pull/613

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-09-17 14:50:17 +02:00
Davek145 e1d90f706a
Add CO2 measurement badge to location card (#2068)
Closes #2067.

This PR introduces CO2 measument badge to the location card in MainUI.
It is same logic as other measuments badges, i.e. average from items
with Measurement and CO2 Semantic tags.

---------

Signed-off-by: David Kesl <davidkesl76@gmail.com>
2023-09-16 18:49:17 +02:00
Florian Hotze 2f7b1d7823
Profile page: Only show latest 10 sessions (#2061)
The openHAB demo's profile page takes ages to render because of the huge
sessions list. This should fix that problem.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-16 16:52:03 +02:00
Florian Hotze f2c008befb
Ensure semantic model pages are built after tags are loaded (#2066)
Fixes #2006.

With the attempt in #2029 failing due to #2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-16 16:31:53 +02:00
lolodomo 07aacc9ee5
[BasicUI] Handle the new parameter "staticIcon" (#1998)
When set on a sitemap element, Basic UI ignores the item state when
initially requesting the OH icon and do not request it again when the
item state is updated.

Depends on openhab/openhab-core#3735

Related to openhab/openhab-android#3404

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-09 13:30:57 +02:00
lolodomo 08a2d80db0
[BasicUI] Add a new header line for image, chart and video elements. (#2010)
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.

For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.

Closes #1939
Fixes #1367
Also related to #1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-09 12:31:03 +02:00
Jeremy 1ee7a2f972
Add alexa air quality monitor + remote device types (#2051)
Related to https://github.com/openhab/openhab-alexa/pull/601

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-09-05 21:01:54 +02:00
Florian Hotze 6ba92932ee
oh-colorpicker: Fix command not sent when state null & style not accepted & cosmetic error on missing defaultColor (#1989)
Fixes #1713.

- Fix command not sent when current Item state is null.
- Fix style can not be set.
- Fix a (cosmetic) error thrown when defaultColor has no value.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-05 21:00:45 +02:00
Mark Herwege 5900864e1e
[mainui] Sitemap editor fix frequency and refresh parameters (#2033)
These parameters should be number instead of text.

See: https://github.com/openhab/openhab-webui/pull/1487#issuecomment-1332135771

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-05 20:53:11 +02:00
stefan-hoehn db103db550
fix uom block output type (#2036)
fixes #2008

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-09-05 20:49:51 +02:00
Mark Herwege 06f220fe53
[MainUI] Sitemap parser parse and discard comments (#2045)
Fixes https://github.com/openhab/openhab-webui/issues/2043

The sitemap parser was not able to cope with comments in the sitemap
text when pasted in from a sitemap file.
Comments will now be discarded (the REST API does not have fields for
comments), but the sitemap will still be parsed and saved.

Similarly, blanks where accepted in a number of places when defined in
text files, but not in the parser. This is now also corrected.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-05 20:48:09 +02:00
stefan-hoehn 25a09860ee
add blockly help buttons for missing sections and release dependant helpURL (#2035)
fixes #2014 
adds the help button for uom

---------

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-09-05 20:25:18 +02:00
Dan Cunningham 303ab55657
Reverts v-if/v-show change from #2029. (#2054)
Regression from #2029.

A few of my UI pages stopped loading properly. Specifically there seemed to be a condition where when the page would draw its widgets before other parts
of the page were loaded (or something similar, some race conditional).
This would result in widgets loading with the wrong state, colors, icons, etc that are dependent on item state.

I tracked it down to this
one very small change, reverting back to a `v-show` from `v-if` for the
main view ready state fixes this.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2023-09-04 19:16:38 +02:00
lolodomo 9799a326f2
[BasicUI] Input element: Fix visibility and label/icon color (#2022)
Fix #2021 

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-02 19:11:28 +02:00
Florian Hotze 4c7298cef3
Redesign settings page & Add doc links (#1997)
Closes #1935.

- Moves transformations to a new list for visual separaration, as it is
only second class configuration.
- Renames System Services to System Settings.
- Add Add-on Settings, which opens the same settings page as the add-on
store, i.e. provides log, service config and persistence config (if
persistence service). Add-ons that only provide log settings are
considered advanced and hidden by default.
- Consolidate the add-on store and the newly added add-on settings into
a single place (refactoring included).
- Add doc links to Things, Items, pages, rules, scenes & scripts list
pages.
- Make some system settings advanced.
- Use a third column for large screens.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-01 21:19:42 +02:00
Florian Hotze 5b515ce65c
Developer sidebar: Add search for transformations (#1985)
Transformations are searchable by uid and label, and as the uid contains
the type, also by type.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-01 20:58:20 +02:00
Florian Hotze 1dcbaeb48c
Fix missing labels for semantic cards (#2029)
Fixes #2006.
Probably fixes the issue described in
https://github.com/openhab/openhab-webui/pull/1986#issuecomment-1656746939.

Reported on the community:
https://community.openhab.org/t/openhab-4-0-release-discussion/147957/86.

Sometimes, the equipment and property cards did not use the
translations.
I found out, that in some cases the equipment and property pages (Main
UI in general) initialized before the translations loaded, this
hopefully solves it.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-01 20:48:59 +02:00
Wouter Born 30ab36c221
Upgrade Maven and plug-ins (#2044)
* Use Maven 3.9.4 with GitHub Actions CI
* Upgrade Maven plug-ins

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-30 13:28:01 +02:00
stefan-hoehn 9e9caba57c
[blockly] Fix timer remove regression (#2032)
Fixes #2002.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-08-29 09:40:14 +02:00
Wouter Born 312aa0e79f
Fix add-ons missing from About Details (#2034)
It is still using /bindings to get the data resulting in a 404 Not
Found. The other pages were updated in #1468.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-08-29 08:30:23 +02:00
Dooleweerdt 95995506b1
[blockly] Fix ZDT comparison between block on GraalJS (#2040)
Fixes #2038

Signed-off-by: Brian Dooleweerdt Rasmussen <brian.rasmussen80@gmail.com>
2023-08-26 23:11:19 +02:00
Florian Hotze a08c347b95
Delay toast on SSE communication failure by one second (#1993)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:57:00 +02:00
Florian Hotze 55b825c3de
Action module wizard: Update texts to mention scenes and scripts (#1994)
Closes #1921.
Depends on https://github.com/openhab/openhab-core/pull/3733.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:54:28 +02:00
Florian Hotze 66485118cd
oh-trend: Fix type of trendlineSampling parameter (#1995)
Fixes #1632.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:48:29 +02:00
Florian Hotze db174ed899
Fix missing root semantic classes (e.g. Equipment) (#2024)
Fixes #2003.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:47:08 +02:00
Florian Hotze db085040b6
Item details: Fix metadata error thrown when opened (#2030)
When the Item was a group Item and groupType was not defined, an error
was thrown. This fixes it.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-19 19:33:54 +02:00
Jeremy ee7c5ad15a
Alexa metadata: Add UoM support to use new Item unit symbol property (#2009)
Related to https://github.com/openhab/openhab-alexa/pull/598.

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-08-19 14:05:52 +02:00
Yannick Schaus 3eff1fa404
Fix channel for Thing trigger cannot be chosen (#2026)
Fixes #1996.
Regression from #1661.

Supersedes https://github.com/openhab/openhab-core/pull/3761.

Signed-off-by: Yannick Schaus <github@schaus.net>
2023-08-18 17:36:14 +02:00
lolodomo 7f2dbb3400
[BasicUI] Upgrade to last version of Material icons (#2016)
Move from the outdated official NPM module (material-design-icons) to an
alternative NPM module (material-icons) providing most recent material
icons.

As a consequence, TTF format is no more provided, only WOFF and WOFF2
formats. All current browsers support WOFF format, so only very old
browsers could be impacted by the miss of the TTF format.

Also fix icon size in condensed mode (28x28).

Fixes #2011
Fixes #2015

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-16 10:16:45 +02:00
lolodomo 391f0fd009
[BasicUI] Add support for framework7 icons (#2013)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-13 22:46:57 +02:00
lolodomo 034d8b9318
[BasicUI] Add a new setting to choose the nb of columns (#2018)
Also allow 3 columns on desktop.

Possible number of columns on desktop: 1 or 2 or 3.
Possible number of columns on tablet: 1 or 2
Possible number of columns on phone: 1

New default is 3 columns on desktop and 2 on tablet.

Closes #1836

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-13 21:53:13 +02:00
lolodomo 1c423ba520
[BasicUI] Upgrade frontend-maven-plugin, node and npm to most recent … (#2012)
…versions

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-13 19:37:29 +02:00
Florian Hotze 0d34818112
Widget editor: Add note that properties are not evaluated in the editor (#2007)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-06 21:59:00 +02:00
stefan-hoehn ffb4ce6767
[blockly] Add Quantity support to round block (#2000)
Round block now also takes a Qty block as input.
Output type changes according to input.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-08-06 19:08:46 +02:00
stefan-hoehn edc124e4f8
Blockly: Support String/Number on eventcontext state/command (#1992)
Fixes #1991.

Support conversion of event context types itemState, oldItemState,
itemCommand as String or Number by supplying a mutating block with a
choise of Number / String.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-07-27 23:41:04 +02:00
Florian Hotze 324503283f
Use dynamic links for docs (#1983)
Open next. or www. depending the openHAB version (release or
milestone/snapshot).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:26:05 +02:00
Florian Hotze 2230f522f0
Semantic tags: Fix missing translations in case of missing label (#1986)
Fixes #1976.
Follow-up for #1882.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:24:59 +02:00
Florian Hotze 59695c65d0
Persistence editor: Remove checks on save as not required anymore (#1988)
https://github.com/openhab/openhab-core/pull/3727 made core handle
`null` as values for `relative` and `inverted` fields of persistence
filters and set defaults for those. Therefore, UI does not need to
ensure they are set anymore.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:24:27 +02:00
Florian Hotze efa3345941
Developer sidebar: Fix Thing pinning fails (#1984)
Regression from #1661.

Using the cacheable list for Things leads to a failure because the
status field is not available then.
This reverts the change from #1661 to this single REST request.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:23:31 +02:00
Florian Hotze c65252241c
oh-colorpicker: Add defaultColor option (#1971)
Related to and closes #1965.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:14:47 +02:00
Kai Kreuzer 1a0ea55d9a Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:19:34 +02:00
openhab-bot 871e5ea618 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 22:08:15 +00:00
Florian Hotze 46c9daffa8
Persistence page: Fix config update on filter removal (#1982)
When removing a filter, the persistence editor checks which configs use
that filter and removes the filter from those configs, otherwise the
save request fails with an HTTP error.

However, the implementation was buggy and also removed other filters
from configs because of a missing check.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-23 18:32:48 +02:00
openhab-bot 6a72ca704e
New Crowdin updates (#1979) 2023-07-22 14:13:15 +02:00
Florian Hotze c050fffae6
Fix masonry configuration failure (#1970)
Fixes #1964.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-21 14:52:20 +02:00
Florian Hotze 6a35b6c2e6
Persistence configuration page: Minor enhancements & fixes (#1955)
Follow-up for #1917.

- Display enabled filters in config footer.
- Display filter configuration in filter footer.
- Time filter: Define options for time unit.
- Add a button to open the documentation.
- Fixes an issue, where Filter creation fails due to missing filter type
arrays.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-18 16:27:35 +02:00
Yannick Schaus acfdb59151
Fix page highlighting in sidebar (#1967)
Fixes #1966.

Happens when you have pages prefixed with the name of another page.

Signed-off-by: Yannick Schaus <github@schaus.net>
2023-07-18 14:43:29 +02:00
openhab-bot 6a31b54b02
New Crowdin updates (#1950) 2023-07-17 12:43:21 +02:00
lolodomo 9be42930d9
[BasicUI] Use inline SVG for "colorless" SVG icons (#1799)
Related to #1743

Use a HTML svg element (inline SVG) instead of a img element
when the icon servlet returns a SVG icon containing "currentColor".

Then it is possible to adjust the color of these icons by using the
iconcolor sitemapo attribute.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-07-16 14:34:56 +02:00
Florian Hotze f51c2385f7
`oh-repeater`: Make caching configurable (#1963)
Fixes #1956.

Adds a boolean property to the repeater (and relevant docs),
`cacheSource` which allows the user to determine whether the repeater
should refresh the source array with css and object changes or cache the
source array for performance improvements.

Signed-off-by : Justin Georgi <justin.georgi@gmail.com>
2023-07-15 23:58:53 +02:00
Mark Herwege 16256c2894
[basicui] Use sitemap input hint v2 (#1923)
This PR is a continuation of
https://github.com/openhab/openhab-webui/pull/1787, using the extra
functionality provided by core if
https://github.com/openhab/openhab-core/pull/3644 gets merged in core.
It would be an alternative to
https://github.com/openhab/openhab-webui/pull/1787 with the same
functionality, but reduced complexity.

Requires https://github.com/openhab/openhab-core/pull/3644.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-07-14 11:39:48 +02:00
stefan-hoehn 851bd5007f
context block typing, extended Qty block var type support (#1948)
Fixes #1942.
Requires version 4.5.0 of openhab-js, therefore awaiting https://github.com/openhab/openhab-addons/pull/15219.

- Adds context block typings.
- Adds supports for Item state input in addition to Item object only in
case Qty Block has a var as input.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-07-10 23:20:25 +02:00
Yannick Schaus 1257a0d4d6
Use cacheable lists when possible (#1661)
Closes #1650.
Depends on https://github.com/openhab/openhab-core/pull/3335.

Will fetch items, things and rules with the `staticDataOnly` parameter set when appropriate.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Yannick Schaus <github@schaus.net>
2023-07-02 16:50:05 +02:00
Mark Herwege 1f659cced7
Developer sidebar: Support search for rule tags (#1947)
It is possible to filter the rules on tags in the search bar of the rule
list, as they are visible on screen. As items can be searched by tag in
the developer toolbar search, I think it is still useful to extend the
rule search in the developer toolbar to tags as well. I tend to give my
rules tags, often corresponding to tags on items as well. This allows
finding all of these in one place.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-06-29 18:06:55 +02:00
Mark Herwege 7ee9e0341e
Developer sidebar: Support search for Blockly rules/scripts (#1946)
Closes #1943.

Searches for 'block', 'blockly', 'blocksource' (case is ignored) will return a list of all Blockly rules.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-06-29 12:22:43 +02:00
Florian Hotze 46cf0299ab
Dynamically load the list of Semantic tags and store them in Vuex (#1882)
Supersedes #1850.
Closes #1822.

Depends on https://github.com/openhab/openhab-core/pull/3559 (already
merged now).
Adding custom semantic tags is now possible:
https://github.com/openhab/openhab-core/pull/3519.

This PR loads the Semantic tags when MainUI is loaded the first time and
stores them in Vuex.
This allows the removal of the hard-coded Semantic tags and the
translations from the assets and therefore makes the initial JS smaller.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-28 23:09:48 +02:00
Florian Hotze 8228411468
Items: Fix `unit` metadata not available for UoM groups (#1936)
Fixes #1933.
Follow-up for #1901.

This enables the unit metadata for UoM groups (i.e. groups with a
groupType of `Number:`).

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-28 22:37:56 +02:00
Florian Hotze 40b1f7adb4
`oh-sipclient`: Fix audio playback stays active when foreground is left (#1925)
I noticed this especially on my iOS when I listened to music and opened
the SIP client. After leaving the iOS app, openHAB kept active in the
audio playback control and I was unable to continue listening to my
music without closing the openHAB app.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-28 22:35:24 +02:00
Florian Hotze 376f036d04
Add a persistence configuration page (#1917)
Closes #1463.
Refs https://github.com/openhab/openhab-core/pull/2871.
Refs https://github.com/openhab/openhab-core/pull/3642.

It is accessible from the add-on settings page and has both a design and
a code tab.

The design tab allows to set persistence strategies for Items, define
cron strategies and set the default strategies. It does not duplicate
names for (cron) persistence strategies and filters as well as configs
for the same set of Items.
All four filters provided by openHAB core (treshold, time, equals/not
equals, include/exclude) can be configured.
When the user removes a cron strategy or a filter, it is automatically
removed from all configs so that there is no API failure (400 Bad
Request).

No code completion is not provided, but required attributes for filters
are automatically set on save to avoid API failure (500 Internal Server
Error).

A few words about order and sorting:
- openHAB Core seems to sort the cron strategies.
- Configurations itself are unsorted, they could be sorted
alphabetically by the UI.
- Items of configuration are sorted by their type (groups before normal
Items) as well as alphabetically.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Co-authored-by: J-N-K <github@klug.nrw>
2023-06-28 22:32:38 +02:00
lolodomo 7cb786aa51
[BasicUI] Set color-scheme for OH icon (#1937)
to have icon color depending on selected theme

Fix #1861

Will work only with SVG custom OH icons containing style="color-scheme:
light dark" and currentColor as fill color.

Signed-off-by : Laurent Garnier <lg.hc@free.fr>
2023-06-24 14:32:00 +02:00
openhab-bot a4b6203153
New Crowdin updates (#1873) 2023-06-24 01:14:53 +02:00
J-N-K d4acf720cc
Improvements to the add-on page (#1932)
- Hide author line if author not present
- Hide documentation line if documentation line not present
- Add correct provisioning information for jar file add-on service
- Properly handle description in add-on details page

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-18 19:55:54 +02:00
Mark Herwege 49de601b58
Sitemap parser: Fix negative numbers not allowed for visibility (#1928)
The sitemap DSL parser was not able to correctly recognize negative numbers.

Regression from https://github.com/openhab/openhab-webui/pull/1843 where explicit
recognition of hyphens was introduced for new icon syntax.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-06-18 19:06:56 +02:00
lolodomo 81e12f5f44
[HABot] Use SemanticsService to search for label/synonyms of a tag class (#1916)
Depends on openhab/openhab-core#3636

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-06-17 11:15:10 +02:00
Mark Herwege e75f001c35
[BasicUI] Adjust slider unit handling (#1922)
Adjust BasicUI slider unit handling.
So far, the unit was not passed on to the slider. With proposed changes
in core https://github.com/openhab/openhab-core/pull/3644, unit would be
passed and needs to stripped for the slider to work properly.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-06-14 11:42:23 +02:00
Florian Hotze f32b8a4363
`oh-slider` & `oh-knob`: Add option to ignore displayState (#1924)
Follow-up for #1920.

-- 
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-13 15:32:35 +02:00
Florian Hotze 7f6e093f01
`oh-slider` & `oh-knob`: Fix user configured unit (state description) ignored (#1920)
Fixes #1913. Fixes https://github.com/openhab/openhab-core/issues/3643.
Depends on https://github.com/openhab/openhab-core/pull/3647.

While fixing this, I also noticed a minor regression from PR #1894, that
I also fixed.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-13 14:21:56 +02:00
Florian Hotze b6393c2c37
`oh-repeater`: Fix `key` property does not refresh repeater (#1919)
Fixes #1918.
Regression from #1904.

-- 
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-13 09:40:50 +02:00
stefan-hoehn c5f2a9ff58
[blockly] Provide persistence service to blocks (#1903)
Fixes #1625.

Allows to provide the persistence type to persistence blocks.
Default can be provided instead of selecting a particular one (is
backward compatible to old blocks).
Either Iten name or Item can be provided (note that variables must have
the Item not the Item name as the type of variables cannot be detected).

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-06-12 18:21:08 +02:00
J-N-K a8ef9cc6e9
Remove "Other Services" section from main settings page (#1891)
Add-on service settings are configurable from the respective add-on's
page and therefore the "Other Services" section of the main settings
page is not needed anymore.
Services provided by openHAB core that were previously listed unter
"Other Services" were moved to "System Services".

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-04 12:23:08 +02:00
stefan-hoehn a47835933f
[blockly] Fix UoM variable support (#1911)
Fixes variable support for the blockly unit of measurement blocks which
did not work at all -> var defaults to item object.

Blockly cannot detect the type that is contained in a variable so we
expect an Item object.
This allows to iterate over a group of Item members which returns a list
of Item objects

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-29 14:21:02 +02:00
stefan-hoehn dab4630d08
Widget editor: Add minus as allowed char of widget uid (#1910)
Fixes #1906.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-29 13:53:22 +02:00
J-N-K 21a30972a8
Add BasicUI to recommended add-ons (#1908)
See discussion in https://github.com/openhab/openhab-distro/pull/1543.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-25 20:49:12 +02:00
Florian Hotze b5176216c1
`oh-slider`: Fix command sent on state update due to rounding (#1894)
Fixes https://github.com/openhab/openhab-webui/issues/1862.

When a state update like 40.545 was received, the slider component
commanded the Item to 41 because of the rounding used.
Unfortunately, the slider component has no built-in way to avoid that.
This decouples the slider value from the actual Item value and only send
command when the difference between them is larger or equal than step
size.

This is no perfect solution, because it can be that the slider does not
accept input when the above checks don't pass.
Example: Your Item has a value of 40.545, then the slider does not
accept 40.5 and 41.

I've checked `oh-setpoint` and `oh-knob`, they are not affected by this
bug.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-22 20:53:12 +02:00
Florian Hotze a75cd04565
Item & Thing code tabs: Minor fixes (#1900)
- Item code tab: Fix lock icon always displayed.
- Thing code tab: Fix missing warning when leaving page but there are
unsaved changes.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-22 20:48:35 +02:00
Florian Hotze 63c122d5f5
`oh-repeater`: Fix new data requested when css visibility changed (#1904)
Fixes #1804.

The oh-repeater re-requested it's data on every CSS visibility change
because the data was asyncComputed. This makes the data load when the
component is created and then stores it.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-22 20:44:35 +02:00
Florian Hotze 0b555580ba
Items: Add `unit` metadata for UoM (`Number:`) Items (#1901)
Fixes #1890.

This adds the `unit` metadata from
https://github.com/openhab/openhab-core/pull/3481 to the pre-defined
metadata namespaces for UoM Items (Item type `Number:`) and provides a
metadata edit page for it.

Once https://github.com/openhab/openhab-core/pull/3611 is merged, the
Item create page will be adjusted to set the `unit` metadata to the
system default on Item creation.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-20 14:36:36 +02:00
Florian Hotze 388bedf1ff
`oh-knob`: Fix `releaseOnly` not working (#1893)
Regression from #1875.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-19 17:09:39 +02:00
stefan-hoehn 55c72349e8
[blockly] Show toast instead of error when saving / running from code preview (#1899)
Since the very beginning of Blockly a not very meaningful error message was alerted when the user attempted to run/save a Blockly from the code preview. 
This detects that situation and shows a nice toast instead of the cryptic error alert.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-16 19:22:59 +02:00
stefan-hoehn ae4b729b29
[blockly] Add dictionary loop (#1898)
Fixes #1711.

This adds a new loop type which allows to iterate over a dictionary.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-15 20:52:33 +02:00
stefan-hoehn c631470fd9
[blockly] Switch between Item name or label display (#1868)
This PR allows to show either the name or the label of the item.

Since the beginning the Item picker would show the label during
selection but the item block itself then would show the name (hence the
"id" that is used internally). This always confused me because I rather
remember the labels rather the "internal" names of the item. From the
implementation perspective it is now clear to me why this was done (it
was much easier to generate the code) and also it is consistent with
what is used for code generation.

This new way allows the user of the blockly editor to switch between showing
the label or the name while the code generation always uses the name.

Note that this requires both the name and the label stored in the
blockly code. Because the current code does not store the label, it
needs to repicked once, via the item picker, to retrieve that label and
then store it. I may add automatic retrieval for the label in the future
but due to some internal limitations it doesn't seem that easy to
provide clear code separation for that.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-14 15:32:30 +02:00
lolodomo ca306c7a6d
[BasicUI] Handle properly state updates to NULL or UNDEF (#1897)
Live update to NULL state is no more ignored.
Live update to NULL or UNDEF is now properly handled by setpoint and
slider widgets.

Fix #1886

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-05-13 20:59:46 +02:00
Tobias Bräutigam 7b3490d613
[cometvisu] make sure that folder paths always end with a slash... (#1826)
... this fixes wrong backup/trash file creation

Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
2023-05-13 19:20:42 +02:00
J-N-K 51081d45f4
[basic] Fix wrong addon id (#1892)
The Basic UI uses `basic` as add-on id, not `basicui`.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-13 11:42:14 +02:00
stefan-hoehn ed3685570f
Add blockly dev server start & Document npm run dev (#1888)
Add a npm run possibility to start dev server with blockly source easily
document npm run dev options

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-12 22:26:11 +02:00
stefan-hoehn bb8d4dde46
[blockly] Fix picker update detection to allow shadow block conversion (#1889)
Follow-up for #1877.

This improves the above PR which didn't capture the openHAB blocks for
shadow block conversion due to a small implementation issue in the Item,
Thing and date pickers.
Now all these three work fine as well.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-11 17:03:02 +02:00
Florian Hotze 60221ab0b8
Transformation edit: Remove i18n string from Item state transform hint (#1883)
Follow-up for #1845.

The i18n identifier should not be part of the hint "How to use this
transformation for Item states".

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-09 20:51:14 +02:00
Florian Hotze 89d0403d80
Fix Things by binding & pages by type not in alphabetical order (#1884)
Fixes #792.
Fixes #1673.

This fixes the `Things by binding` and `pages by type` order to always
be alphentically.
These views only seemed to be alphabetically ordered in edge cases.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-09 20:46:44 +02:00
Florian Hotze a1929a68e2
`foreground-service`: Remove visibility change listener beforeDestroy (#1885)
... and check for foreground before starting foreground activity.

Follow-up for #1878.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-09 20:44:54 +02:00
Mark Herwege 54ed5fee15
Sitemap code generation: Quote colors (#1887)
The sitemap syntax requires colors in icon, label and valuecolors to be strings and have quotes around the values.
This is currently not respected, therefore the generated code could not be used without correction when copied into a sitemap file.

This fixes that bug.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-05-09 20:33:28 +02:00
lolodomo 3d8348aca9
[BasicUI] Add more examples of valid/invalid URLs in README (#1823)
Fixes #1805.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-05-09 12:07:21 +02:00
stefan-hoehn a4b0678a48
[blockly] Automatic shadow block conversion into real block (#1877)
This blockly plugin automatically converts a shadow block into a real block as soon as it is being edited.
This is very helpful in case the same block needs to be reused again and can therefore be copied.

Known issues: 
- this sometimes only works if the whole block is selected with the option "external inputs"
- unfortunately it also doesn't work with item and thing picker. Theroot cause remains to be seen and is currently being investigated with the blockly community.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-07 16:20:43 +02:00
Florian Hotze b3a4318567
Enable dynamic icons only for some icon types in default list widget (#1874)
Follow-up for #1849.
--

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-07 15:22:46 +02:00
Florian Hotze a548e0d1f6
`foreground-service`: Listen to tab visibility change event (#1878)
Fixes #1872.

This makes the foreground service also listen to the `visibilitychange`
event to stop and resume foreground activity when the tab is changed or
the browser is closed.

See
https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-07 15:13:43 +02:00
Florian Hotze b9d57f04dc
`oh-sipclient`: Various fixes & improvements (#1857)
Closes #1690.
Closes #1691.

* Improves alert message shown when HTTP is used to clearly indicate
that the SIP widget will only work with HTTPS.
* Fixes an error thrown when the SIP widget was not properly initialized
and leaves foreground.
* Upgrades JsSIP.
* Improves styling to use 100% of available height.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-07 14:22:56 +02:00
Florian Hotze 52da897b33
`oh-knob` & `oh-stepper`: Add offset functionality (#1875)
Supersedes #1565.

This adds an offset parameter to the knob and stepper components, that
allows to add or subtract a number value to the displayed state of the
component.

This is useful for thermostats which have a fixed temperature of n and
are controlled with an offset to that temperature n, e.g. you have a KNX
HVAC system which has a fixed temperature of 20 °C: -2 would mean the
target temperature is 18 °C, +2 would mean that the target temperature
is 22 °C. By setting the offset parameter to 20, the UI will display the
real target temperature instead of the -2 or 2.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-07 14:20:42 +02:00
stefan-hoehn 46d256c553
[blockly] Add pattern to text of date block (#1869)
Closes #1636.

Allows the user to define a custom pattern for the text of date block.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-07 14:02:29 +02:00
stefan-hoehn 12bd53b725
[blockly] Improvements for UoM blocks & Extend `getItemAttribute` block (#1864)
Closes #1841.
Closes #1791.

`getItemAttribute` block:
- add numeric state, quantity state
- improve tooltips
- set correct output typing

Unit of Measurement blocks: 
- add block to create Quantity out of Value and Unit
- add Qty to label to make appearance clearer
- Smart block input type detection to allow Quantity, Item and even
Item-Name as input and generate the right code from that

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-07 13:52:23 +02:00
stefan-hoehn 54aa3ab4e8
Developer sidebar: Support search in metadata value and config (#1876)
Improves developer sidebar search to even search within the metadata values and config object.

This e.g. allows you to search for all pattern settings in the `stateDescription` metadata.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-07 13:49:14 +02:00
stefan-hoehn fa371993f1
[blockly] Add new `math_round` block with round up, down and by decimals (#1871)
Fixes #1303.

Replaces the original math_round block with a new one that adds rounding up, down and by given decimals.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-07 01:09:05 +02:00
stefan-hoehn 8b3ace362f
[blockly] Support storing timers in shared cache (#1870)
Closes #1858.

Adds support for storing timers in the shared or the private cache (until now, private cache was default).
Timers in the shared cache can be managed by rules/scripts other than the one in which the timer was created.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-06 23:59:57 +02:00
Mark Herwege cb253f6b4d
Sitemap and Item config parsing adjustments (#1843)
- Adapt sitemap and item lexers to changes in icon name syntax
- Restrict the elements that can be added to a sitemap
- Added extra sitemap validations (in line with xtext validation in
core)
- Added test for sitemap parser and validation

This solves the issue in main UI created by https://github.com/openhab/openhab-core/pull/3539 and https://github.com/openhab/openhab-core/pull/3378.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-05-05 11:02:35 +02:00
Florian Hotze 095bb2f9cb
Fix icons not displayed & not dynamic on all pages (#1849)
Fixes #1839.
Fixes #574.
Closes #1860.

* Fixes Item icon styling on the Item detail page.
* Add support for openHAB iconsets.
* Fix `oh:` icons not properly displayed in `default-list-item.vue`.
* Refactor `oh-icon` config & style binding.
* Enable real-time state on the semantic model page.
* Enable state for the channel link edit page.
* Enable dynamic icons in the settings where missing and possible
(semantic model page, channel link edit page, Item edit page when
setting category, Items list page).
* Enable dynamic icons in the default list widget for most Items except
some and update the docs accordingly.
* Add a refresh button to the Item list page.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-02 22:58:13 +02:00
stefan-hoehn 79fbc793e3
Use right UID attribute in Thing picker (#1865)
Thing picker sort uses wrong UID attribute as fallback during sort of
thing list.

Follow-up for #1837.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-04-30 11:02:56 +02:00
Wouter Born 0fd9b15fe6
Remove redundant modifiers from interfaces (#1847)
This removes redundant modifiers from the interfaces similar to
openhab/openhab-core#3560.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-04-20 19:00:03 +02:00
Florian Hotze 09bcedb30a
Add a code tab to the Item editor (#1818)
Closes #728.
See discussion in
https://github.com/openhab/openhab-webui/discussions/1737#discussioncomment-5130752.

Adds a YAML code tab to the Item editor as requested several times on
various places.
Editor hints are provided for Item types, groupTypes, groupNames and
metadata namespaces.

If the Item has been provisioned from file, the editor is read-only and
a big lock icon is displayed.

Note that metadata is currently not displayed, because mass-saving
metadata is not supported yet.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-20 01:17:42 +02:00
Boris Krivonog 5ee7b28591
Evaluate service as part of series's chart config (#1852)
As discussed
https://community.openhab.org/t/widget-pass-persistence-service-as-property-to-custom-widget/146132
the `service` property of `series` is not evaluated:
```
- component: oh-chart
    config:
        ...
    slots:
      ...
      series:
        - component: oh-time-series
          config:
            service: =props.useInflux ? "influxdb":"rrd4j"
            ...
```

Signed-off-by: Boris Krivonog <boris.krivonog@inova.si>
2023-04-19 22:00:27 +02:00
openhab-bot 105feba97b
New Crowdin updates (#1846) 2023-04-18 12:05:53 +02:00
Florian Hotze b317e98a8d
Transformations: Various enhancements & fixes (#1845)
Closes #1844.

* Allows to copy the UID.
* Sorts the transformation types in the "by types" list alphabetically
and makes the segment labels uppercase to match the transformation
service names.
* Adjusts to recent core change
https://github.com/openhab/openhab-core/pull/3487: removes the script
language selection and updates the editor mode and code snippet
injection.
* Extends language support and refactors the translate mode logic in
`script-editor.vue`.
* Fixes the clear label button not displayed in create mode and
displayed for non-editable transformations.
* Shows a tip on how to use the transformation for Item states.
* Fixes failing and not required API request after transformation
creation.
* Removes possibility to select and attempt to delete not-editable
transformations, which is not possible and failed.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-16 14:54:38 +02:00
stefan-hoehn af1b0a31cd
Thing picker: Fix failure caused by missing label & Show UID (#1837)
Closes #1485.

* The Thing picker did not work when a Thing has no label (which is possible, the label is optional). This makes it fallback to the UID in case of missing label.
* This adds the UID to the Thing picker entries.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-04-14 18:07:44 +02:00
lolodomo 17a36736f7
[BasicUI] Fix text color when the page does not contain any frame (#1842)
Use the same text color (depending on theme) as if a frame was present.

Related to #1831

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-04-14 15:00:38 +02:00
lolodomo b05562c894
[BasicUI] Change assumption in case icon value contains only 2 segments (#1838)
The first segment is now expected to be the icon source.
The icon set is determined: "classic" if source is "oh" or "" in other
cases.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-04-13 22:32:54 +02:00
lolodomo 1e0f1a1fb2
[BasicUI] Add the "follow system" theme (#1829)
Closes #1828

3 themes are now available! bright, dark and system.
Theme previously named "default" has been renamed into "bright".
"default" is still accepted for backward compatibility.

Tested with Fiorefox, Chrome and Edge on Windows 10.
Tested with Chrome on Android.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-04-13 22:31:22 +02:00
lolodomo 3f817adcd7
[BasicUI] Use more contrasted color buttons in widgets when in dark mode (#1834)
Applied to colopicker, setpoint, switch/rollerblind and switch/mappings
widgets.

Also change the track color of the switch widget when state is OFF

Related to #1831

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-04-12 10:02:28 +02:00
stefan-hoehn 3e1caad9cf
Developer sidebar: Fix search in case of missing thing label (#1835)
Search fails in case a thing is missing a label, which is optional.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-04-10 16:23:43 +02:00
stefan-hoehn c264e34868
`oh-knob`: Update docs for dotted path and line cap parameters (#1833)
Dotted path and line cap cannot be used together.
See https://github.com/openhab/openhab-webui/pull/1773#issuecomment-1481712236.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-04-10 15:23:24 +02:00
openhab-bot b5295ed052
New Crowdin updates (#1606) 2023-04-09 00:35:22 +02:00
Mark Herwege 4e74d056d0
[basicui] input widget (#1729)
Depends on [PR #3398](https://github.com/openhab/openhab-core/pull/3398)

This adds support for an input widget in Basic UI. See Core PR for more
extensive description.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-04-09 00:19:14 +02:00
Florian Hotze 4edde23af8
Show warning if SSE connection or send command fails (#1808)
Depends on #1807.

Currently, SSE connection and sending commands fail silently, which
makes the user think that everything is fine, but instead outdated
values are displayed and commands are not sent.

This implements user warnings for such cases, a large openHAB orange
toast "Communication failure" with the option to reload is displayed at
the bottom center:
- as long as SSE connection is broken
- when sending a command to an Item failed for 5 sec

If the Item does not exist (error code 404), "<Itemname> not found" is
displayed for 5 sec

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-06 11:20:59 +02:00
Florian Hotze 6cbc0a0218
Add a SSE reconnection mechanism (#1807)
Currently, on SSE failure there is no reliable reconnection mechanism
(browsers might try something), e.g. on network failure, and therefore
SSE connection is lost forever once an error occurs. To reconnect, the
user has to change/reload the page.

This implements a SSE reconnection mechanism, that attempts a SSE
reconnection after SSE failure.
The time is increasing from 1 -> 2 -> 4 -> 8 -> 10.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-05 21:16:31 +02:00
Florian Hotze a9e38939a1
Add recommended add-ons to the setup wizard (#1821)
Closes #1659.

This adds the ability to define a list of recommended add-ons which will
be pre-selected in the setup wizard.

Currently, JS Scripting (GraalJS) Automation as a Blockly Dependency and
RRD4J Persistence as default persistence service (used e.g. for
trend-line, analyzer in the UI) are selected as recommended add-ons.

A note about recommended add-ons in general is displayed.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-05 21:08:55 +02:00
Florian Hotze a10750e3b5
Developer sidebar: Extend search & Sort search results (#1732)
Extends the developer sidebar search for:

- Items:
  - metadata namespaces (requires exact match)
  - tags (requires exact match)
- rules/scenes/scripts:
  - itemName & thingUID of triggers, actions, conditions
  - script code (e.g. JavaScript, Rules DSL, Blockly)
  - script MIME types (requires exact match)
- Pages:
  -  label

All searches are non case-intensive unless other stated.

Search results are now alphabetically sorted and rules, scenes and
scripts divided into their own sections.
Normal searches on settings pages and the Item detail page show a hint
for the developer sidebar search if the screen is width enough.

Related to
https://community.openhab.org/t/openhab-4-0-wishlist/142388/104?u=florian-h05.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-05 21:07:04 +02:00
J-N-K dedd3f8a84
Add a transformations menu and editor (#1448)
Depends on https://github.com/openhab/openhab-core/pull/3036

--
Signed-off-by: Jan N. Klug <github@klug.nrw>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-05 21:05:28 +02:00
Mark Herwege 5415abb730
Sitemap editor: Support `inputHint` config of Input element (#1824)
This adds support for configuring the inputHint parameter of the Input sitemap element in the sitemap editor of MainUI.
See https://github.com/openhab/openhab-core/pull/3418 and the BasicUI implementation #1787.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-04-05 18:57:21 +02:00
Boris Krivonog 48b54b38b0
Navigation to `/pages/:type/:uid` does not work (#1825)
Regression of #1815.

When navigating from "Pages" to a page, navigation did not work and an error was logged.
Reported on the community: https://community.openhab.org/t/openhab-4-0-snapshot-discussion/142322/294.

Signed-off-by: Boris Krivonog <boris.krivonog@inova.si>
2023-04-05 18:08:34 +02:00
GiviMAD 746f5f4eb9
Allow using `=` in double-quoted widget action `options` (#1820)
Fixes https://github.com/openhab/openhab-webui/issues/1641#issuecomment-1491772150.

Update options parse logic to match recent core changes in https://github.com/openhab/openhab-core/pull/3363 and https://github.com/openhab/openhab-core/pull/3488.

Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
2023-04-02 14:21:03 +02:00
Florian Hotze 59a1dbeace
Enforce required role when accessing admin or `/profile` routes (#1815)
Fixes #1794.

This checks for admin role when a client tries to access an admin route,
e.g. /settings, /developer, and redirects to log in if needed.
It also checks if the client is logged in when /profile is accessed.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-01 22:52:30 +02:00
Florian Hotze d96b95d530
Thing details: Make code tab read-only if not editable (#1819)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-04-01 22:43:16 +02:00
Florian Hotze d5d6842eb6
Fix action `options` regression (#1813)
Fixes #1806, which is regression from #1734.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-03-30 00:37:50 +02:00