Commit Graph

1594 Commits (1cc0b830a6f28f78ca34bd944f40561f08652d12)

Author SHA1 Message Date
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
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
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