Commit Graph

1612 Commits (5cba1d80a05816bfdc4fd5263d66b63e25f2d11c)

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