Commit Graph

1399 Commits (630e8525835c698cf58856aa43782d92b18087f2)

Author SHA1 Message Date
Tobias Bräutigam 630e852583 [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-08-04 18:21:26 +02:00
Florian Hotze 091d0edc06
Link add: Fix create item fails for trigger channels (#2689)
Regression from #2312.
Fixes #2669.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
(cherry picked from commit fa85c0752a)
2024-07-26 14:24:12 +02:00
stefan-hoehn 7d53839f7e
[blockly] Fix code generation for Thing object on Thing status block (#2688)
Fixes #2670.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
(cherry picked from commit 2de240e5d7)
2024-07-26 13:17:58 +02:00
lolodomo 7abce0908d
[BasicUI] Fix description for iconify parameter (#2660)
Default is enabled, not disabled.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
(cherry picked from commit 24a3d275bc)
2024-07-23 22:46:22 +02:00
stefan-hoehn 80584971ec
[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>
(cherry picked from commit bc73c9e297)
2024-07-22 14:47:46 +02:00
Florian Hotze bd88bca3b1
Fix 404s for overview page, semantic model tabs and add-on store (#2678)
Fixes #2665.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
(cherry picked from commit fce76c81fe)
2024-07-18 12:55:25 +02:00
Florian Hotze a2c62bd6de
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>
(cherry picked from commit 3d27333ba4)
2024-07-18 12:55:23 +02:00
Florian Hotze c9336d682e
Overview page: Fix `defineVars` is not working (#2673)
Fixes #2046.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
(cherry picked from commit 97910353fd)
2024-07-15 20:28:03 +02:00
Florian Hotze d4f97610d7
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>
(cherry picked from commit 8a50e35514)
2024-07-11 02:51:53 +02:00
Florian Hotze fa7c888209
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>
(cherry picked from commit 146fda4bb7)
2024-07-08 23:42:43 +02:00
Florian Hotze d4f1b454e6
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>
(cherry picked from commit 713cb2ba04)
2024-07-08 21:50:51 +02:00
Florian Hotze 3a3ef0ef4e
Bump to next snapshot version
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-07-08 21:48:50 +02: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
Florian Hotze 767e5e56b0
GH Actions: Upgrade relative-ci/agent-upload-artifact-action (#2598)
Fixes Node.js 16 deprecation warning.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-06-01 18:40:09 +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