Commit Graph

1510 Commits (4b1ef3b4dc381762ab5757318ef612820b02d02d)

Author SHA1 Message Date
Florian Hotze d84eed00eb
Script editor: Extend mode translation for more automation languages (#2760)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-16 18:20:57 +02:00
Florian Hotze bd70e6b9c1
Transformation edit: Improve dirty handling & Fix settings styling (#2759)
Only mark the transformation as dirty if there was an actual change, not
only an editor input.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-16 18:20:35 +02:00
Florian Hotze b7e2efead8
Fix dirty indicator blocks subtitles (#2758)
Regression from #2687.

The dirty indicator code blocked the use of subtitles, these were not
showing up anymore.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-16 18:04:20 +02:00
Mark Herwege 66787288e0
[blockly] Remove Nashorn support & Check for required automation add-on in script edit (#2743)
This PR removes Nashorn support from Blockly and removes all Nashorn 
specific code from the blocks.

When opening a Blockly script, the UI will tell you if the script needs
to be saved again (because the MIME type is for Nashorn or because newly
generated code is different from the saved code).
It will also warn if the JS Scripting addon is not installed.

The Run Now link from the script editor is grayed out when the required
scripting add-on is not installed, and will show a warning when trying to run.

-----

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-09-16 17:37:15 +02:00
Mark Herwege 05464128b3
[blockly] Add persistence median methods (#2732)
Depends on https://github.com/openhab/openhab-js/pull/376

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-09-16 15:46:19 +02:00
Mark Herwege b293ab1b84
Sitemap editor: Validation improvements (#2720)
Closes #2701.

This PR contains a number of sitemap validation improvements,
interactive, before saving and in the DSL parser.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-09-13 19:36:25 +02:00
Florian Hotze 850fd48c1b
State description metadata: Allow to select transformations from list (#2752)
Resolves #1944.

When entering a state description pattern, an autocomplete list
is provided containing the available transformations.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-13 19:35:58 +02:00
Mark Herwege d79efb7cec
[blockly] Small improvements to blocks (#2742)
Several small improvements:

- Persistence `previous...State` and `next...State` blocks: add boolean
shadow block for skip same, default false
- Named `timer` blocks: add a `undefined` shadow block for `context`.
- `run rule or script` block: make the parameter dictionnary input a
shadow block

In addition to that, for the `transform` block, 
the transformation dropdown now dependens on the installed transformations.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-09-12 23:36:15 +02:00
Florian Hotze 920466e3aa
Rules/Scenes/Scripts: Gray out run now button if uninitialized (#2754)
Also improve toast messages in developer sidebar and fix a minor styling
issues for the script settings.

Addresses no. 1 of #2749.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-12 22:27:06 +02:00
Florian Hotze e958d3717b
Developer sidebar: Show error when trying to run unititialized rule (#2753)
Fixes #2748.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-12 21:48:59 +02:00
Florian Hotze b207722dd4
Home edit: Fix model tab settings not editable (#2751)
Fixes #2597.
Regression from #2304.

Also minimizes the gap between the Cards title and the reorder button.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-12 20:59:10 +02:00
Mark Herwege 99a9c0aa18
[blockly] Make HTTP block method name dropdown labels less technical (#2740)
See https://github.com/openhab/openhab-webui/pull/2607#issuecomment-2322954012.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-09-07 18:02:07 +02:00
Florian Hotze 22a42c3607
CSP: Allow embedding any source (#2741)
Regression from #2714.
This updates Main UI‘s CSP to allow embedding any source.

Fixes issues reported on the community, see
https://community.openhab.org/t/openhab-4-3-milestone-discussion/158139/6 and
https://community.openhab.org/t/openhab-4-3-milestone-discussion/158139/7.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-09-03 23:37:56 +02:00
dependabot[bot] ee27cecebd
Bump elliptic from 6.5.6 to 6.5.7 in /bundles/org.openhab.ui/web (#2726)
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.6 to 6.5.7.

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-31 19:12:13 +02:00
Florian Hotze 2dccd471e2
Upgrade webpack from 5.93.0 to 5.94.0 (#2738)
Replaces #2736.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-31 18:53:28 +02:00
Florian Hotze 2a82a44884
[BasicUI] Update CONTRIBUTING.md (#2737)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-31 18:45:48 +02:00
lolodomo f295665469
[BasicUI] Upgrade node/npm/gulp/node-sass tools (#2722)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-08-31 18:39:53 +02:00
jimtng 08cd5a5208
Items: Add MEDIAN group function (#2734)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-26 22:31:15 +02:00
jimtng 5716165e6a
Developer sidebar: Focus on search when opened (#2731)
Resolve #2727.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-26 09:00:38 +02:00
Dan Cunningham 77dbfcb198
Fixes logic to detect when a thing's config changes vs the whole thing structure (#2729)
Fixes #2704

---------

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2024-08-25 09:17:40 +02:00
lolodomo 6139039f6c
[BasicUI] Upgrade Material Icons (#2724)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-08-23 09:45:56 +02:00
Tobias Bräutigam 51d28119a9
[cometvisu] fix path check regressions (#2719)
1. Fix serving the index.html when "/" (or empty) path is requested
2. Fix allowing files beeing served from special cometvisu config folder

Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
2024-08-21 22:14:16 +02:00
jimtng ca42730984
[BasicUI] Add build date to resource requests (#2703)
The goal is so users don't need to do a force refresh whenever openhab
is updated.

---------

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-21 21:42:47 +02:00
Cody Cutrer 56eea58aa0
HomeKit metadata: Mark Thermostat.CurrentHeatingCoolingMode as optional (#2721)
See https://github.com/openhab/openhab-addons/pull/17191

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-20 18:46:11 +02:00
Mark Herwege b0d9ad7532
[blockly] HTTP block enhancements (#2607)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-08-19 11:16:32 +02:00
Mark Herwege 19aac477ca
[BasicUI] input widget, support html escape characters in input (#2685)
Closes https://github.com/openhab/openhab-webui/issues/2675

HTML escape characters in input widgets were not properly supported,
leading to an escaped character sequence under certain conditions.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-08-16 08:36:29 +02:00
Florian Hotze 17c2119efb
Charts: Apply iOS-related fixes only to iOS devices (#2717)
Improves the fixes from #2677, #2511, #2706 and #2710 to only apply to
iOS devices.
Avoids/Fixes regressions with other platforms such as
https://community.openhab.org/t/chart-scrollbar/157828.

Known issues:
- Charts display in popups on iPads are rendered to large.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-15 20:11:42 +02:00
Florian Hotze 6f01001b05
Main UI: Allow use of eval() in CSP (#2716)
Regression from #2714.

eval() seems to be required by ECharts: When opening a chart, an CSP
error is thrown that traces back to ECharts, but the chart still
renders.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-15 19:04:31 +02:00
Florian Hotze 654c89edb4
Main UI: Improve Content-Security-Policy (#2714)
This new CSP is much more restrictive compared to the old one:
- Don't allow any origin as default
- Don't allow eval() usage
- Don't allow data:, gap:, content: and blob: schemes by default

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-15 13:15:31 +02:00
Florian Hotze 94b3e7c90f
Widget actions: Support optional confirmation dialog/sheet (#2715)
This adds support for optionally asking the user for confirmation either
by dialog or by sheet before executing an action.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-14 17:08:37 +02:00
Florian Hotze b3ec38aa2c
Revert "Bump braces and gulp in /bundles/org.openhab.ui.basic" (#2713)
Reverts #2606.
Fixes #2712.
2024-08-14 10:57:07 +02:00
Florian Hotze a13ffe311e
Widget actions: Add a HTTP action to perform HTTP requests (#2711)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-13 13:19:17 +02:00
Florian Hotze f745fa98b7
Charts: Improve forced re-render code to keep settings and loaded data (#2710)
Follow-up for #2706.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-13 10:35:44 +02:00
dependabot[bot] 2ee0876c77
Bump braces and gulp in /bundles/org.openhab.ui.basic (#2606)
Bumps [braces](https://github.com/micromatch/braces) to 3.0.3 and
updates ancestor dependency [gulp](https://github.com/gulpjs/gulp).
These dependencies need to be updated together.

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-12 16:45:55 +02:00
Florian Hotze c43354aabe
Upgrade dependencies with security vulnerabilities (#2709)
Run npm audit fix.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-12 16:26:50 +02:00
Florian Hotze 09da526815
Upgrade @jsep/template-plugin, dayjs, echarts, qrcode & yaml (#2708)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-12 16:12:12 +02:00
Florian Hotze 0eddb68ca7
Upgrade build dependencies & Apply new ESLint config (#2707)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-12 15:43:59 +02:00
Florian Hotze f7f04bf18c
Charts: Force re-render on device orientation change (#2706)
Fixes #2702.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-12 14:45:48 +02:00
Thomas Wunschel 94aa16aba8
Allow model cards and model tabs outside of homepage (#2584)
Fixes #2583. Fixes #1591.

This moves model loading code to a new Vuex store module named model.
Model loading is now done by app.vue on init and when an Item change event is received through SSE.

home.vue and home-edit.vue now get the model from the Vuex store instead of loading it.
Add tab components for locations-tab, equipment-tab and properties-tab for easy usage in tabbed pages.
Add card components for oh-.location-card, oh-equipment-card and oh-property-card to standard widget list.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Thomas Wunschel <4302898+wuschi@users.noreply.github.com>
2024-08-12 13:00:03 +02:00
Cody Cutrer 3afef194df
Update HomeKit metadata definitions (#2691)
Add missing accessories, configuration parameters, enums, etc.

Signed-off-by: Cody Cutrer <cody@cutrer.us>
2024-08-12 10:55:39 +02:00
Mark Herwege 175b639937
Sitemap editor: Remove sendFrequency parameter (#2705)
See
https://github.com/openhab/openhab-core/issues/4338#issuecomment-2283251553

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-08-12 10:55:12 +02:00
lolodomo be71ace313
[BasicUI] Remove reading of frequency parameter of colorpicker element (#2699)
Note that %frequency% does not exist in colorpicker snippet.

Related to openhab/openhab-core#4338

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-08-11 20:17:40 +02:00
jimtng 77d42c1500
[BasicUI] Fix frame title's left padding in condensed tablet layout (#2700)
Before:

<img width="328" alt="image"
src="https://github.com/user-attachments/assets/f8dcad17-a86f-4a19-8c99-7668d755f37d">

After:

<img width="378" alt="image"
src="https://github.com/user-attachments/assets/673397dc-af99-4d46-8a9c-845f44033882">

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-10 08:50:55 +02:00
jimtng 4d6ad05607
[BasicUI] Make button text not uppercased (#2697)
The buttons on iOS and Android apps don't uppercase the text, so this PR
makes BasicUI behave the same way.

Related discussion:

https://github.com/openhab/openhab-webui/pull/2388#issuecomment-2270883776

https://github.com/openhab/openhab-webui/pull/2388#issuecomment-2272304430

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-10 08:32:26 +02:00
jimtng 4dc1bda5c1
[BasicUI] Revert uppercasing exponent (#2698)
Core now accepts lowercased exponent since
https://github.com/openhab/openhab-core/pull/3834

@mherwege would you mind verifying this please?

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-08 19:00:29 +02:00
openhab-bot 19a1acf320
New Crowdin updates (#2692) 2024-08-08 18:22:59 +02:00
Tobias Bräutigam 5e53b21626
[cometvisu] add more path checks (#2696)
also deny external xml schema loading (avoid XXE attacks)

Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
2024-08-08 10:51:19 +02:00
Florian Hotze 85cd64e147
Page designers: Fix dirty handling for code tab (#2695)
This fixes an issue, where the usage of the code tab of a page marked it
as dirty, even if no change to the page was made.
Please note that for the layout page desinger, the fix however does not
apply on the first time when the code tab of an existing page is opened.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-04 13:14:18 +02:00
jimtng e5418b4f92
Add a dirty indicator on the title bar (#2687)
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-08-04 12:00:31 +02:00
Florian Hotze cee0377aea
SSE state tracking: Reduce logging (#2694)
This might improve performance as console logging takes some performance.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-04 11:40:34 +02:00
Florian Hotze 0430db5138
Clean-up unused login/logout code in app.vue (#2693)
Removes unused code from app.vue and other occurrences. This code would
be a security issue if used and generates security warnings.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-08-04 11:40:05 +02:00
Florian Hotze 6b2f264660
Link add: Support linking Number channel to Switch Item with profile (#2690)
Closes #1478.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-28 15:05:20 +02:00
Florian Hotze fa85c0752a
Link add: Fix create item fails for trigger channels (#2689)
Regression from #2312.
Fixes #2669.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-26 14:16:53 +02:00
stefan-hoehn 2de240e5d7
[blockly] Fix code generation for Thing object on Thing status block (#2688)
Fixes #2670.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-07-26 13:16:32 +02:00
stefan-hoehn 0c03554e25
[blockly] Fixes for notification block code generation (#2686)
There was an error on code generation in particular when using vars and
string concat blocks (who sometime generate code instead of pure
strings) which is fixed now.
I also gave notifications its individual color to distinguish them
better from other groups.

Follow-up for #2672.

---------

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-07-25 23:18:46 +02:00
stefan-hoehn 4ce4d495fc
[blockly] Add new sophisticated notification blocks (#2672)
Note that the new blocks can completely replace the old ones (though
they will not be automatically converted but it must be done manually).

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-07-23 22:44:43 +02:00
lolodomo 24a3d275bc
[BasicUI] Fix description for iconify parameter (#2660)
Default is enabled, not disabled.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-22 14:51:17 +02:00
lolodomo 187f0b2580
[BasicUI] Add a translatable title to the settings page (#2661)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-22 14:49:35 +02:00
stefan-hoehn bc73c9e297
[blockly] Fix bracketing in context block (#2682)
Fixes what was mentioned in
https://community.openhab.org/t/issue-with-contextual-info-block-after-upgrading-to-4-2/157321.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-07-22 14:46:19 +02:00
Florian Hotze fce76c81fe
Fix 404s for overview page, semantic model tabs and add-on store (#2678)
Fixes #2665.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-18 11:47:11 +02:00
Florian Hotze 3d27333ba4
Charts: Fix issues with charts not displaying on iOS >= 17.4 (#2677)
Follow-up for #2511.

I think I finally discovered the root cause for charts not displaying
initially on iOS >= 17.4: The height of the chart was calculated to 0px.
By using 100dvh (dynamic viewport height) and subtracting safe areas
etc. instead of using 100%, I managed to fix this issue.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-18 11:31:50 +02:00
Tobias Bräutigam 2056367b55
[cometvisu] Security fixes & cleanup for cometvisu backend (#2671)
add required authentication for some rest endpoints, add some sanity
checks to improve security.

Remove code that has been marked as deprecated.

---------

Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
2024-07-17 22:00:00 +02:00
Florian Hotze 97910353fd
Overview page: Fix `defineVars` is not working (#2673)
Fixes #2046.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-15 20:26:18 +02:00
Florian Hotze 0b2c42cfed
oh-sipclient: Regenerate component docs (#2666)
This regenerated the component docs after #2648.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-13 14:35:15 +02:00
jimtng b5e6c34eff
Canvas layout page: Hide empty background image element to remove white border (#2663)
See https://community.openhab.org/t/remove-border-from-fixed-canvas-layout/137541.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-07-13 13:43:52 +02:00
Florian Hotze 8a50e35514
oh-context: Fix rendering failure when not in edit mode (#2662)
When not being in edit mode, oh-context did not render at all. Instead,
an error was thrown:

```
[Vue warn]: Cannot set reactive property on undefined, null, or primitive value: undefined

found in

---> <OhContext> at src/components/widgets/system/oh-context.vue
```

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-11 02:51:20 +02:00
Florian Hotze 43abf2f52d
oh-sipclient: Add call status Item to report call status to server (#2648)
This adds the option to specify a String Item, to which the call status
is sent.
This allows to track the usage of oh-sipclient from rules and scripts.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-10 12:56:15 +02:00
Florian Hotze 553591d72c
item-mixin: Improve Item name validation RegEx (#2658)
`A-z` also matches `[ \ ] ^ _ `, which is not intended.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-09 12:01:56 +02:00
Florian Hotze 2d07d21ebb
Fix sidebar openHAB logo href to avoid repeated navigation to home page (#2657)
When clicking repeatedly on the openHAB logo in the sidebar, the
overview page was opened over and over again because it now resides
under the `/overview` path. By adjusting the href to `/overview`, this
is fixed.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-09 11:21:08 +02:00
Florian Hotze 146fda4bb7
Page editors: Encapsulate CSS to avoid polluting global CSS (#2656)
This fixes an issue where the last lines of the layout code editor were not visible.

Reported on the community: https://community.openhab.org/t/openhab-4-2-release-discussion/157076/12

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-08 23:41:54 +02:00
Florian Hotze 713cb2ba04
Fix code editor overflow in sitemap editor (#2655)
This was caused by a wrong class name in layout-edit.vue, that overwrote
a Framework7 CSS var used by the sitemap editor.

Reported on the community
https://community.openhab.org/t/openhab-4-2-release-discussion/157076/8.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-08 21:37:24 +02:00
Florian Hotze ccbda492f3
Make tabbed pages routable (#2647)
This adds the ability to route through tabbed page by their index,
i.e. 0 for the first tab and so on.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-08 12:25:23 +02:00
Kai Kreuzer 99ad4ff997
Apply spotless after release (#2653)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2024-07-08 02:03:57 +02:00
openhab-bot 3ce7fc1507 [unleash-maven-plugin] Preparation for next development cycle. 2024-07-07 23:43:10 +00:00
Florian Hotze 10746f1c81
Health menu: Remove sidebar and settings entry, instead use FAB (#2652)
Closes #2644.

This removes the health check entry from the sidebar and the settings
menu and instead uses a floating action button (FAB) to allow access to
the health checks page if there are any actual issues.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-07 02:18:15 +02:00
openhab-bot 7225c0dacd
New Crowdin updates (#2651) 2024-07-07 00:27:43 +02:00
openhab-bot c5d7e54f96
New Crowdin updates (#2650) 2024-07-06 23:17:03 +02:00
lolodomo 907024e8b0
[BasicUI] Fix iconify parameter description (#2649)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-07-06 22:28:35 +02:00
jimtng 06667942b8
Fix a typo in orphanlinks page (#2643)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-07-05 08:58:33 +02:00
Florian Hotze d4ad0285dd
Update openhab-js tern defs (#2642)
Depens on https://github.com/openhab/openhab-addons/pull/16985.

This updated the tern defs used for autocompletion to the current
library version included in the add-on (5.3.1).

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

Last update was in #2627.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-04 14:10:12 +02:00
JustinGeorgi 82c937eb6f
Developer sidebar: Fix script and scene "unpin all" links (#2640)
The links to unpin scenes and scripts in the dev toolbar were set to
'rules' instead of the correct specifics, and so, didn't work.

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-07-04 09:59:46 +02:00
Florian Hotze 57749b4127
Do not request icon with state for Image Items (#2638)
Fixes #2561.
Fixes #2637.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-02 00:35:50 +02:00
Mark Herwege 2d935d65a0
[blockly] Persistence: Enhance existing blocks & add blocks to cover all available actions (#2596)
Closes https://github.com/openhab/openhab-webui/issues/2595.

This PR further extends the Blockly capabilities to include more of the persistence extensions.

Specifically enhanced the `oh_get_persistvalue` block:
- Add all `Between` methods of already existing methods
- Add `countSince`, `countUntil` and `countBetween`
- Add `countStateChangesSince`, `countStateChangesUntil` and `countStateChangesBetween`
- Add `getAllStatesSince`, `getAllStatesUntil`, `getAllStatesBetween` returning an Array of timestamp and state pairs
- Add a parameter for return type if relevant (`String`, `Number`, `Quantity`, `Timestamp`).

Added methods to the `oh_get_persistence_lastupdate` block:
- `lastChange`, `nextChange`

Created a new block `oh_delete_persistedvalues` to delete persisted values:
- `deleteAllStatesSince`, `deleteAllStatesUntil`, `deleteAllStatesBetween`

Created a new block `oh_persist` to persist values:
- `currentState`: persists a state at the current time
- `stateAt`: persists a state to a given time
- `stateList`: persists a TimeSeries

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-29 16:24:16 +02:00
Arne Seime 32688a562e
Add UI for health checks (broken links) (#2420)
Refs on https://github.com/openhab/openhab-core/pull/4115.

This is the starting point for a UI that shows issues with the users installation,
the first function is broken links.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Arne Seime <arne.seime@gmail.com>
2024-06-29 16:13:00 +02:00
Dan Cunningham e9210dc8c2
oh-sipclient: Add auto answer & auto dial features (#2635)
Adds two new features:

- Auto accept calls if they match a configured list of numbers (* for all, 'user', or 'user@host` in a comma delimited list).
- Auto dial a pre-configured number when the client finishes registering (or when the client connects if registration is disabled).

Both can be safely used together.
This allows for features like intercoms, as well as widgets that connect when popped up.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2024-06-29 16:04:02 +02:00
openhab-bot 5c6a5d9ac2
New Crowdin updates (#2625) 2024-06-29 10:46:45 +02:00
Florian Hotze 44eaa58421
oh-input: Allow overwriting calendarParams defaults for datepicker (#2634)
Fixes #2604.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-27 17:21:37 +02:00
openhab-bot c5a4b1b3b1
New Crowdin updates (#2619) 2024-06-27 16:47:35 +02:00
Florian Hotze f316ded031
Rules list: Improve performance of rule status tracking (#2623)
Fixes #2621.
Fixes #2593.

This improves performance of the SSE event source event processing for
rule status changes by using a separate object for the rule statuses
(allows O(1) modification) instead of finding the rule in the rules
array (O(n) for linear search) and ignoring RUNNING status.

The RUNNING status can be ignored IMO because rules tend to run such a
short time that you don't see the state shown as RUNNING, so we can use
this "trick" to reduce the amount of processed events.

The rule-status-mixin was updated with short circuit evaluations for the
IDLE status, which is very likely the most processed status, and
therefore reducing the amount of comparisons done.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-27 16:46:46 +02:00
Florian Hotze 6d367b82b3
oh-input: Fix select with options & setting style not working (#2633)
Fixes #982.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-27 13:50:48 +02:00
Florian Hotze cee03a7414
Group item form: Add missing COUNT aggregation function (#2632)
Closes #956.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-27 12:38:57 +02:00
Florian Hotze 822b40c913
Analyzer: Fix silent failure if no items are set (#2631)
Fixes #910.

This fixes a silent failure of the analyzer if no items are passed as
query params. In this case, the empty-state-placeholder will be used to
display a "Invalid configuration" banner.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-27 12:33:30 +02:00
Florian Hotze 9ebf078a58
Cron expression builder: Set day 1 as Sunday (#2630)
Fixes #1371.
Fixes #902.

This sets the UI's cron builder to use day 1 for Sunday, instead of
Monday, which is the convention as used by the Quartz scheduler, see
https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm
and https://freeformatter.com/cron-expression-generator-quartz.html.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-27 11:44:13 +02:00
Florian Hotze cafc8964be
Setup wizard: Add InMemory persistence to recommended add-ons (#2629)
With https://github.com/openhab/openhab-addons/pull/16496 merged, we can
add InMemory persistence to the recommended add-ons.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-27 11:43:45 +02:00
Florian Hotze 2decdd6ef6
Rename rule/scene/script name to label for consistency (#2628)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-26 12:33:19 +02:00
Florian Hotze eb975c16aa
Update openhab-js tern defs (#2627)
This updates the tern defs used for autocompletion to the current
library version included in the add-on (5.2.0).
See https://github.com/openhab/openhab-js/compare/v5.0.0...v5.2.0 for changes.

Last update was in #2563.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-25 20:56:49 +02:00
Mark Herwege 2a830a6f09
Fix value mapped to NULL not shown in list label item (#2626)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>

See description in
https://github.com/openhab/openhab-core/pull/4203#issuecomment-2095792756

If a mapping is used to map a value to NULL, it is currently not shown
in an oh_label_item.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-25 10:26:30 +02:00
Dan Cunningham 0d8c21a727
[MainUI] exposes navigation commands to native wrappers (#2622)
This exposes the command item logic to native wrappers, like our IOS and
Android clients, so they can control navigation of the app when
receiving push notifications.

See https://github.com/openhab/openhab-android/issues/3193

---------

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2024-06-24 23:00:05 +02:00
Florian Hotze e6043d405f
Things list: Reload on ThingUpdatedEvent (#2624)
This change makes the SSE event tracking handle ThingUpdatedEvents and
reloads the Things list when such an event is received.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-24 16:44:33 +02:00
dependabot[bot] fa1d526510
Bump braces from 3.0.2 to 3.0.3 in /bundles/org.openhab.ui/web (#2616)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-23 09:57:00 +02:00
Florian Hotze 5703ddc416
Rule module popup: Fix margin issues and improve styling (#2620)
Second attempt after #2618.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-23 09:55:12 +02:00
Florian Hotze 0fd5428dd1
Rule module popup: Fix margin issue with Configuration block title (#2618)
Fixes margin issue by ensuring that margin is not negative.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-23 00:15:57 +02:00
Florian Hotze cd40c72e43
Thing view: Add support for HTML-formatting of channel descriptions (#2614)
Closes #2613.

This adds support to format channel (type) descriptions using `html` tags similar to thing-type descriptions.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-16 21:39:36 +02:00
Florian Hotze 418def2eb4
Sitemap edit: Fix column width wrongly applied (#2611)
Fixes #2574.

This is more a workaround than a real fix because it seems there is an issue in Framework7's CSS.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-16 16:27:51 +02:00
Wouter Born 85fd88dbe8
Fix Main UI dark mode scrollbars in Chrome (#2610)
This fixes the issue that when using Chrome the scrollbars are still very bright and not dark.

Signed-off-by: Wouter Born <github@maindrain.net>
2024-06-16 15:07:59 +02:00
Mark Herwege e80b221940
Sitemap editor: Fix issues with AND, buttongrid and numeric commands (#2609)
Fixes https://github.com/openhab/openhab-webui/issues/2605
Also fixes issue with Buttongrid and non-numeric commands

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-13 16:01:19 +02:00
openhab-bot eb0a24720d
New Crowdin updates (#2577) 2024-06-03 13:59:58 +02:00
Mark Herwege 17e463d229
Add-on store: Fix region is null error (#2600)
Fixes https://github.com/openhab/openhab-core/issues/4266.

Error was introduced by #2582 and manifests itself
when no country was set in the setup wizard or the locale settings.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-06-02 12:39:42 +02:00
Florian Hotze c148e7d897
Widget expressions: Ensure correct context & props are passed on recursion (#2599)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-02 11:55:40 +02:00
JustinGeorgi 6ceeee3b6e
Add oh-context component (#2533)
Closes #2437, Closes #2148

This PR adds a new component, the oh-context. Similar to the repeater,
this component is not rendered, but injects information into the widget
at it's tree location.

The component allows to inject these three things into the widget:
* functions - using the arrow function syntax, named functions can be
declared and reused in all subsequent expressions
* constants - constants can be defined as either single values, arrays,
or objects
* variables - variables can be defined with default values. These
variables are local in scope to the oh-context and it's descendants and
take precedence over other variables of the same name from higher
contexts.
  * Variables are not divided into global vs local explicitly. But a
oh-context used as the root component of a widget will have its
variables in the context of all the other components on that widget and
thus they essentially have a global context within that widget.
  * In contrast to the basic widget variables, oh-context variables do
have bi-directional passage between a main widget and a sub widget.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-06-01 18:31:27 +02:00
JustinGeorgi aa4e218961
Add a "Add from template" page for the semantic model (#2105)
This adds a button and new sub page to the semantic model.
On that sub-page the user can select from a few different basic templates for
semantic locations which can then be automatically created and added to the model.

There are a few options for customization:
1) The user can select a custom prefix that will be applied to all the items to fit or establish a desired naming scheme.
2) The user can optionally deselect extra pieces of the model that are not appropriate to their needs.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2024-05-31 19:53:08 +02:00
Mark Herwege 5ae3e37636
Add-on store: Add connection and country filter (#2582)
Closes #2050.

This implements filtering for connection type and country (related to
region/country setting) in the addon store.

By default, it will filter for all connection types and filter out
addons not supported for a specific country if info on countries is
available.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-31 13:01:01 +02:00
Dan Cunningham 3999dea947
Tabbed pages: Add optional badges and badge color to tabbar (#2592)
Small addition that adds badge text and color to tabs on a tabbed page.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2024-05-27 21:36:18 +02:00
Florian Hotze 4c34b611ed
Tabbed pages: Show config in code tab & Enable expressions for title and icon (#2591)
Makes the tabbed page config editable though the code tab: Resolves #1276. Resolves #2103.
Enables expression evaluation for tab title and icon: Resolves #2571.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-27 20:18:00 +02:00
stefan-hoehn df8ef84ff0
[blockly] Fix Thing "is enabled" code generation (#2588)
Thing::enabled produces undefined because enabled is no valid field.
Using Thing::isEnabled instead.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-05-26 12:37:03 +02:00
Christian Kittel 21b669e3d5
[blockly] Fix event block code generation (#2587)
Fixes #2586.

Moves the bracket to the correct position.

Signed-off-by: Christian Kittel <ckittel@gmx.de>
2024-05-26 10:13:38 +02:00
Jacob Laursen fabafbf3d2
Provide on/off icons for soundvolume_mute (#2585)
Related to openhab/openhab-core#4245

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
2024-05-25 14:33:35 +02:00
Holger Friedrich d23f407b2a
Upgrade Karaf from 4.4.5 to 4.4.6 (#2547)
Refs https://github.com/openhab/openhab-core/pull/4181.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-05-20 19:45:24 +01:00
lolodomo a76d0ed338
[BasicUI] Switch between several Button elements at a place in the grid (#2580)
Several Button elements are accepted at the same place in the grid only
when they all have visibility conditions.
In this case, the user must define proper conditions so that only one
button is visible at any time.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-19 15:05:03 +02:00
stefan-hoehn 7e59922a33
[blockly] Add typed vars (#2581)
This PR **is really a game changer** for further Blockly Usage. 

It adds typed variables which in turn allows Blockly to generate the right code.
This is what I was looking for a very long time and will also reduce
many of the issues that popped up here and there.

Fixes #2057.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-05-19 14:28:29 +02:00
lolodomo 37cfea2862
[BasicUI] Switch with buttons: value displayed if pattern on widget (#2579)
When a Switch widget leads to the rendering with buttons, the value
should not be by default also displayed at the left of the buttons
(redundant information), except if it is requested through a state
pattern defined on the widget.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 17:32:37 +02:00
lolodomo 2fd4267ebc
[BasicUI] New Button element as child of Buttongrid (#2573)
Related to openhab/openhab-core#4173

Depends on openhab/openhab-core#4223

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 16:31:32 +02:00
lolodomo bcfd55fd6e
[BasicUI] Remove a useless call to function reloadIcon (slider widget) (#2578)
Follow up #2535

The function reloadIcon is already called by the function setValue at
line 636 just before calling setValuePrivate.

The icon continues being refreshed while moving the slider except if
releaseOnly parameter is set.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-18 11:54:40 +02:00
Mark Herwege d8016b6ddf
Setup Wizard: improve suggestions refresh on network change (#2568)
- Remove the suggestion loading delay when setting the network without a change as this is not required.
- While in the wait cycle, going back to the network selection and setting the network again (with or without change)
  would lead to the progress bar alternating between short and long because 2 timer cycles
  would be running in parallel. Fix this by cancelling the existing timer if there is a network change.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-15 11:09:32 +02:00
stefan-hoehn a32fd66544
[blockly] Add timer context (#2575)
Adds the possibility to provide any information to the timer's callback
block that can be used when the callback is eventually executed.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-05-15 11:07:08 +02:00
lolodomo ce17983cdf
[BasicUI] Remove a call to window.console (#2572)
Was added when implementing #2536 for test purpose and I forgot to
remove it.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-10 10:24:42 +02:00
stefan-hoehn 5282f447fd
[blockly] Add more thing blocks (#2562)
Fixes #2552.

Add missing blocks to work with a thing or a group of things:

- oh_getthing (one particular)
- oh_getthing_state (the state of the string - to be consistent with
items)
- oh_getthings (get all things - can be used to iterate over all things)
- oh_getthing_attribute (retrieve any attribute of a thing)

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-05-07 17:58:18 +02:00
Florian Hotze 8ed66cc642
[blockly] Adjust persistence blocks to breaking changes (#2564)
This adjusts the persistence blocks for the **breaking** changes of
`org.openhab.core.persistence.extensions.PersistenceExtensions`.

For NashornJS, see https://github.com/openhab/openhab-core/pull/3736 for the changes.
For GraalJS, see
https://next.openhab.org/addons/automation/jsscripting/#itempersistence for the current API docs and
https://github.com/openhab/openhab-js/pull/331 for the changes.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-07 17:55:25 +02:00
Mark Herwege 6bb52b5aca
Item parser: Add missing group item aggregation functions (#2567)
See https://community.openhab.org/t/groupnor-not-working-anymore/155812.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-07 17:45:00 +02:00
dependabot[bot] 8779dcf694
Bump ejs from 3.1.9 to 3.1.10 in /bundles/org.openhab.ui/web (#2560)
Bumps [ejs](https://github.com/mde/ejs) from 3.1.9 to 3.1.10.

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-07 13:03:23 +02:00
Mark Herwege 5f3d6daa21
Setup wizard: Add primary IP config (#2565)
Add-on finders scan the network for devices supported by OH add-ons to suggest suitable add-ons.
These are presented in the setup-wizard (and add-ons store).

To limit network traffic, especially for IP broadcast and multicast scans,
finders could limit the traffic to one subnet.
This is especially relevant if the setup would be on servers with many
network interfaces or when using Docker. 

This commit adds setting up a primary IP address to the setup,
which will also default the broadcast address accordingly to the primary address.
Querying add-on suggestions is delayed until after this step, 
and some delay is built into the process to allow suggestions finders to scan the network.

See discussion in https://github.com/openhab/openhab-core/pull/4036.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-07 12:54:30 +02:00
Mark Herwege 3fa319248b
Sitemap editor: Add press release button support (#2553)
Related to https://github.com/openhab/openhab-core/pull/4183.
Depends on https://github.com/openhab/openhab-core/pull/4204.

This PR implements press/release button support.

Refactor code to allow proper quoting of arguments in mappings and conditions.
Quotes are now preserved, and therefore they need to be removed in core
at usage (https://github.com/openhab/openhab-core/pull/4204).

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-07 10:44:40 +02:00
lolodomo 02024c62b5
[BasicUI] Implement press & release button (#2536)
Related to openhab/openhab-core#3822

Depends on openhab/openhab-core#4183

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-06 20:55:24 +02:00
Florian Hotze 50f2a91703
Update openhab-js tern defs (#2563)
This updates the tern defs used for autocompletion to the current library version included in the addon (5.0.0)
and also cleans up the actions namespace (remove functionality that is included in superior APIs like `things`).
Reference https://github.com/openhab/openhab-js/compare/v4.7.0...v5.0.0.

Last update was in #2220.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-06 12:02:59 +02:00
Florian Hotze 9d89146705
Setup wizard: Fix already set i18n settings not respected (#2559)
Fixes https://github.com/openhab/openhab-core/issues/4105.

The setup wizard did not respect the i18n config file's content, which
resulted in overwriting the existing i18n settings.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-02 14:42:06 +02:00
Florian Hotze 6f5a59f57e
Setup wizard: Fix server-set region and location not shown on later wizard launch (#2558)
This makes the setup wizard load the region and the location from the
server.
Useful when the wizard is re-launched later.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-02 12:57:32 +02:00
lolodomo 93f758b75b
[BasicUI] Fix build after a method renaming in core framework (#2557)
Related to openhab/openhab-core#3652 that renamed method setPageId into
updateSubscriptionLocation

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-05-02 11:01:55 +02:00
Florian Hotze 14a6c9e59d
Setup wizard: Refactor add-on selection & Add descriptions for JS Scripting & Astro (#2556)
- Move the selection of additional add-ons into the addons-setup-wizard.vue component.
- Add description texts for suggested add-ons JS Scripting and Astro.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-05-01 15:02:43 +02:00
Mark Herwege faa4018536
Setup wizard: Add separate step for persistence (#2431)
This improves the first installation experience by:

- Splitting out persistence to a separate step of the setup wizard (and no persistence will be offered in the main wizard addon selection anymore).
- Allows unselecting addons from the shown list without having to open the selection popup again.
- Including Mapdb as a proposal for a persistence service to install
- Including Astro binding in the recommended addons at initial install

This also creates the groundwork to implement more fine grained suggestions in the setup wizard 
by allowing to have separate steps for types of addons or specific addons.
It is possible to set extra text for identified add-ons.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-05-01 12:37:58 +02:00
Florian Hotze c6e1d8bc87
Use Node v20 for Main UI build (#2434)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-30 16:55:03 +02:00
Florian Hotze 13169c1475
Add-on logo component: Make lazy loading optional (#2555)
This makes the lazy loading of the add-on logo optional (can be enabled
using a config property) in preparation to use the add-on logo component
inside the setup-wizard.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-30 15:52:29 +02:00
Mark Herwege d292cf6ae8
Sitemap editor: Fix buttongrid editor (#2554)
Fields should use all space available. In a button grid definition the
row and column fields where not visible.

I can't say what caused this, but this PR should fix this.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-04-30 13:59:01 +02:00
lolodomo b27d71392e
[BasicUI] Add special handling for "none" icon (#2534)
Same behaviour as in the Android app is now implemented for the "none"
icon. This icon means "no icon" and we don't want to request the icon
servlet. When this icon is associated to a sitemap element, the icon
servlet is no more requested. Instead, a simple empty SVG tag is
considered and inserted in the HTML page. There is also no dynamic
behaviour (with item state) applied for this icon.

Additionally, in case the loading of any OH icon fails, the IMG tag is
replaced by an empty SVG tag in the HTML page instead of updating the
IMG source with the none icon URL (triggering a potential new icon
servlet request).

Fix openhab/openhab-core#3977

Signed-off-by: Laurent Garnier <lg.hc@free.fr>

---------

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-27 10:48:05 +02:00
Holger Friedrich 10aeb247ae
Update Maven plugins (#2551)
Update nearly all Maven plugins:

* set minimum Maven version to 3.6.3
* build-helper-maven-plugin, 3.4.0 to 3.5.0, see
https://github.com/mojohaus/build-helper-maven-plugin/releases/tag/3.5.0
* frontend-maven-plugin, 1.13.4 to 1.15.0, see
https://github.com/eirslett/frontend-maven-plugin/blob/master/CHANGELOG.md
* license-maven-plugin, 4.2 to 4.3
* maven-clean-plugin, 3.3.1 to 3.3.2, see
https://github.com/apache/maven-clean-plugin/releases
* maven-dependency-plugin, 3.6.0 to 3.6.1, see
https://github.com/apache/maven-dependency-plugin/releases/tag/maven-dependency-plugin-3.6.1
* maven-enforcer-plugin, 3.4.0 to 3.4.1
* maven-jar-plugin, 3.3.0 to 3.4.1, see
https://github.com/apache/maven-jar-plugin/releases
* maven-javadoc-plugin, 3.2.0 to 3.6.3, see
https://github.com/apache/maven-javadoc-plugin/releases
* maven-plugin-plugin, 3.9.0 to 3.12.0, see
https://github.com/apache/maven-plugin-tools/releases/tag/maven-plugin-tools-3.12.0
* maven-site-plugin, 3.12.1 to 4.0.0-M13
* maven-source-plugin, 3.3.0 to 3.3.1
* maven-surefire-plugin, 3.1.2 to 3.2.5, see
https://github.com/apache/maven-surefire/releases
* sortpom-maven-plugin, 3.3.0 to 3.4.1
* spotless-maven-plugin, 2.38.0 to 2.43.0, see
https://github.com/diffplug/spotless/blob/main/plugin-maven/CHANGES.md

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-26 10:57:54 +02:00
Florian Hotze 3396a4f639
Charts: Fix initial period wrongly calculated for future charts (#2548)
Follow-up fix for #2545.

When the initial period was different from `D`, the period initial
endTime calculation was wrong.
This lead to the initial period being calculated wrong: One day was
always into the future, the rest of the period to the past.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-23 14:01:45 +02:00
Florian Hotze e9c5ad505f
Charts: Add option to extend initial period to future & Refactor prop defs (#2545)
This adds a new option to charts which allows to extend the initial period to the future by default.
Until now, when a chart was opened its period always extended to the past.
This is especially useful with the new timeseries support for Items as it allows to display forecasts.

Also refactor the chart property definitions to use the helpers.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-21 17:13:39 +02:00
lolodomo 0c7aa4d07d
[BasicUI] Fix slider behaviour and implement two different modes (#2535)
Fix #2525
Also related to openhab/openhab-core#4084 and openhab/openhab-core#3430

Two behaviour modes are now supported.
- If releaseOnly parameter is set, the new value is sent to the item
only when the slider is released.
- If releaseOnly parameter is not set, new values are sent to the item
while moving the slider. Events are sent at a certain frequency, this
frequency is defined by the sendFrequency parameter if set or every 200
ms by default. Event is not sent when the value is is unchanged (when
stopping the move but keeping the mouse pressed).

The brightness slider of the colorpicker widget is also updated to send
regular new color commands when moving the slider.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-21 16:29:19 +02:00
Mark Herwege 736d12c703
Save stateDescriptionPattern from channel type for UoM Items & Save UoM metadata when adding from model (#2485)
When creating a new Number with Dimension item from a channel link, the
stateDescriptionPattern does not propose the state description pattern
from the channel type as the default.

This commit introduces this:

It only saves this state description pattern from the channel type to
metadata of the item if it is not the default state description pattern
for a Number type.

Subsequent edits of the item will present a disabled state description pattern input.
If no state description field is set, a blank field will be presented.
Reasons are:
- A state description can contain more than a pattern.
  Saving only the pattern would override the rest of the stateDescription.
- An Item can be linked to multiple channels with (possibly conflicting) stateDescription.
  The only solution would be for the user the set it on the item and override the channel stateDescriptions.

See https://github.com/openhab/openhab-addons/pull/16531#discussion_r1530394678.

This PR also now saves the unit (and state description pattern) when creating equipment or point from a thing.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-04-21 15:00:18 +02:00
Florian Hotze e5d930b057
Metadata: Add `link_to_more` as well-known namespace (#2543)
Closes #2382.
Refs https://github.com/openhab/openhab-android/issues/3140.

Adds Android app's link_to_more metadata to the well-known namespaces,
therefore also adds an editing page for it.

---------

Also-by: mueller-ma <mueller-ma@users.noreply.github.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-21 14:56:42 +02:00
lolodomo 9e48ad8693
[BasicUI] Fix update of buttons (switch element) (#2538)
Fix #2537

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-21 11:40:15 +02:00
Florian Hotze 2de1521cf9
Script edit: Fix script creation fails due to exception (#2542)
Regression from #2508.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-20 23:40:10 +02:00
Florian Hotze 83147c23ac
Persistence edit: Add support for selecting all Items (#2541)
Closes #2516.

Adds a new toggle to the configuration popup of persistence edit to
select all Items (the equivalent to the `*` wildcard in file-based config).
If all Items are selected, the group Item and normal Item pickers will be disabled.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-20 23:29:39 +02:00
Florian Hotze aadeb38d3d
SSE Item State Tracking: Avoid requesting __ob__ and __v_isRef (#2540)
Fixes #2530.
Regression from #2489.

I wasn't able to identify the root cause, but this seems to solve the problem.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-20 22:52:11 +02:00
dependabot[bot] b614f97156
Bump tar from 6.1.13 to 6.2.1 in /bundles/org.openhab.ui.basic (#2531)
Bumps [tar](https://github.com/isaacs/node-tar) from 6.1.13 to 6.2.1.

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-20 21:21:07 +02:00
Florian Hotze bb66514642
Things list: Always show the inbox (#2539)
This allows to access the inbox if it only contains ignored entries
without having to manually enter the page route.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-20 21:15:56 +02:00
Mark Herwege 1232bf5606
Allow future periods in sitemap configuration (#2529)
Chart widget sitemap configuration has been extended with support for
future periods in https://github.com/openhab/openhab-core/pull/4172.
This adds configuration in the UI.

See #2518.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-04-12 12:45:29 +00:00
openhab-bot c546534602
New Crowdin updates (#2527) 2024-04-12 12:38:03 +00:00
openhab-bot ac6b3a4eef
New Crowdin updates (#2528) 2024-04-12 12:37:18 +00:00
Florian Hotze 4a0054a1f0
Thing details: Fix code tab not editable (#2526)
Fixes #2523.

Regression from one of the previous PRs to the Thing details page.

This is a timing issue similar to #2375, where the code editor is
initialized as read-only because the Thing is not loaded yet.
After initialisation, the editor can not be set to read-write.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-04-07 11:51:24 +02:00
lolodomo aaf3edcd09
[BasicUI] Adjust user-defined colors to theme for better contrast (#2521)
Closes #1780

Colors are those defined by user through the labelcolor, valuecolor and
iconcolor parameters. The aim is to provide a good contrast n both
themes. For example white in light theme just leads to something not
visible. So black is used instead.

This behaviour is already implemented in the Android app with the same
adjustments.

Colors adjusted in light theme: yellow, pink, white, lime, aqua, silver
and gold.
Colors adjusted in dark theme: maroon, purple, green, navy, blue, black
and gold.

These color adjustments are controlled by a new Basic UI setting,
enabled by default. By disabling it, no adjustment is performed and the
old behaviour is restored.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-07 11:17:45 +02:00
lolodomo 1db2d0bea4
[BasicUI] Add predefined periods in future for chart (#2524)
Related to #2518

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-07 10:54:10 +02:00
lolodomo 93e6e97bc4
[BasicUI] All buttons forced on one line for a Player item (#2492)
Follow-up #2341
Partial revert to make two exceptions and restore old behaviour (buttons
on a unique line) for:
* Control buttons of a Player item
* Buttons in the settings page

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2024-04-07 10:43:27 +02:00
Florian Hotze 0449e5111b
Things list: Fix broken list index after Thing removal (#2515)
After a Thing has been removed, the list index showed several wrong
entries derived from Thing labels.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-30 22:09:07 +01:00
Florian Hotze c9f2a4effd
Downgrade vue-fragment as the upgrade broke oh-repeater in some circumstances (#2514)
When we upgrade to Vue 3, we can remove this dependency as Vue 3 has
this functionality integrated, see
https://api.vueframework.com/guide/migration/fragments.html.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-30 22:00:58 +01:00
Florian Hotze 57025c3832
Chart calendar axis: Don't override user-defined dayLabel and monthName settins (#2513)
This e.g. allows to set dayLabel.nameMap
(https://echarts.apache.org/en/option.html#calendar.dayLabel.nameMap).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-30 19:58:02 +01:00
Florian Hotze 673ef9b1ca
Things (inbox) list: Improve condition for reversed checkbox style (#2512)
Follow-up for #2472.

Improve the condition to only show the reversed order where really
required.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-30 12:58:02 +01:00
Florian Hotze 2539d6dcf3
Analyzer: Fix analyzer not initially visible on iOS 17.4 (#2511)
When the analyzer was opened on iOS/iPadOS 17.4 devices, the screen stayed blank until the controls were opened.

ECharts logged the following warning to the console:

[ECharts] Can't get DOM width or height.Please check dom.clientWidth and dom.clientHeight.
They should not be 0.For example, you may need to call this in the callback of window.onload.

Reported on the community:
https://community.openhab.org/t/openhab-4-1-release-discussion/152252/188?u=florian-h05.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-29 17:24:03 +01:00
Florian Hotze 4d5a4a4a81
Downgrade pkce-challenge to fix authentication for insecure (HTTP) contexts (#2510)
Regression from #2488.

Version 4.x of pkce-challenge uses the Web Crypto API, which is only
available in secure contexts (https) in most browsers.
This broke the login when accessing the UI over an insecure (plain HTTP)
connection.
See https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-29 14:52:40 +01:00
openhab-bot 01203e1c61
New Crowdin updates (#2494) 2024-03-29 11:11:32 +01:00
dependabot[bot] 85d3e477fd
Bump express from 4.18.2 to 4.19.2 in /bundles/org.openhab.ui/web (#2507)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2.

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-29 11:10:52 +01:00
Florian Hotze 5507555908
Charts config: Add gauge and pie chart types (#2509)
Those are imported in
974e28e9ba/bundles/org.openhab.ui/web/src/components/widgets/system/oh-chart-component.vue (L47)
and should therefore work.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-27 10:01:12 +01:00
Florian Hotze 974e28e9ba
Script edit: Fix dirty handling (#2508)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-26 12:12:23 +01:00
Florian Hotze ea59ce14e2
Upgrade Framework7 to latest v5 version (#2506)
Framework7 v6 requires Vue 3, so we need to upgrade to Vue 3 as well
when upgrading to Framework7 v6.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-26 02:20:45 +01:00
Florian Hotze 72f53e6ff8
Rule edit: Fix rule module title and description regression (#2505)
Fixes regression from #2471.
See https://github.com/openhab/openhab-webui/pull/2471#discussion_r1538237708.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-26 02:08:33 +01:00
Florian Hotze abdffc62d2
Make marked and diacritic dependencies and not dev dependencies (#2504)
They are actual dependencies for Main UI's code, therefore they should
not be dev but main dependencies.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-25 16:35:04 +01:00
Florian Hotze 576142fe0a
Upgrade dev dependencies (#2503)
This upgrades most dev dependencies to their latest (compatible) version.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-25 16:23:34 +01:00
Florian Hotze aa7543ffb5
Things list: Fix location tab (#2501)
Regression from #2499.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-25 14:05:33 +01:00
stefan-hoehn e5749f6fd6
[blockly] Fix multilineedit rendering issue (#2496)
Fixes the the dreaded blockly multilineedit rendering issue.

More info can be found at: https://github.com/google/blockly-samples/issues/2235

The solution is to make sure that the hidden textarea style neither has a background of none or transparent.

---------

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-03-25 13:52:20 +01:00
Florian Hotze 577568d167
Sitemap edit: Fix attribute-details styling applies globally (#2500)
Fixes #2456.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-24 23:48:39 +01:00
Florian Hotze 6ed3683cd4
Things list: Only show "no location" optionally for sort-by location (#2499)
Closes #2486.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-24 23:15:38 +01:00
Florian Hotze 3a37d014dd
Rule edit: Always create script field for script action/condition (#2497)
Fixes #2461.
Depends on https://github.com/openhab/openhab-core/pull/4148.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-24 22:31:26 +01:00
Florian Hotze b876572de2
Fix deprecation warning in unit test (#2498)
See
https://v1.test-utils.vuejs.org/api/wrapper/isvueinstance.html#isvueinstance.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-24 22:30:20 +01:00
dependabot[bot] f2f9f58146
Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /bundles/org.openhab.ui/web (#2493)
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 5.3.3 to 5.3.4.

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-24 21:50:48 +01:00
jimtng 6b321a766a
Item edit: Validate name on load (#2495)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-24 21:32:56 +01:00
stefan-hoehn 32b8b88e47
[blockly] Fix missing event property causes JS error (#2476)
See https://community.openhab.org/t/blockly-proposal-to-change-contextual-info-blocks/154403/27.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2024-03-24 21:26:48 +01:00
jimtng 1bebae32ea
Link channel to Item: Include error message on name validation failure (#2487)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2024-03-21 19:43:54 +01:00
Mark Herwege 162cc1ada4
Fix webpack asset filename (#2484)
Resolves https://github.com/openhab/openhab-webui/issues/2483

The webpack [ext] template string already includes a leading . (see https://webpack.js.org/configuration/output/#template-strings).
This PR removes the the extra dot that was added.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2024-03-21 19:17:50 +01:00
Florian Hotze 8bb84162ad
Upgrade & Clean-up webpack loaders (#2490)
Updates webpack loaders and removes `vue-style-loader` as it is not used.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 19:16:30 +01:00
Florian Hotze 70b2df201b
Upgrade Vue from 2.6.12 to 2.7.16 (#2489)
Also upgrade unit test dependencies and unit test and and ESLint config 

See https://v2.vuejs.org/v2/guide/migration-vue-2-7 for Vue migration guide.
See https://github.com/vuejs/vue-test-utils/ and https://github.com/vuejs/vue-jest for unit tests.
See https://github.com/vuejs/eslint-plugin-vue/releases/tag/v9.0.0 for ESLint rule changes.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 18:59:22 +01:00
Florian Hotze 577d6ed842 Upgrade vuex
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze d5a510e8fe Upgrade yaml
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 77901b425a Upgrade vue-i18n & Silence translation fallback warnings
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 8e9acce538 Upgrade vue-grid-layout
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 5752856c7d Upgrade vue-fullscreen
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 29f3c1be00 Upgrade vue-fragment
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze e39d476655 Upgrade tern
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 12546605be Remove sprintf-js
This dependency was not used and hence can be removed.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 6e3d483f9d Upgrade qrcode
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze 7d35ec8d92 Upgrade pkce-challenge
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00
Florian Hotze bcdab18cae Upgrade moo & nearley
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-21 17:24:54 +01:00