Commit Graph

1414 Commits (14adafb810c41a3c10d9847952ec9724e399355d)

Author SHA1 Message Date
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
Holger Friedrich 345e93e363
Bump maven-compiler-plugin to 3.13.0 (#2520)
Avoid ZipException with ejc >3.30.0.

Refs: openhab/openhab-core#4167

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-12 12:36:37 +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
Holger Friedrich 730ab97d7b
Allow for compiling with Java 21 (#2517)
* Support Java 17 and 21, default compilation to Java 17 class files
* Add profile "j21" to compile to Java 21 class files
* Bump ecj to 3.36.0
* Upgrade SAT to 0.16.0

Refs:
https://github.com/openhab/openhab-distro/issues/1590

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
2024-04-03 11:04:31 +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
Florian Hotze a81bb0dd3a
GHA Main UI checks: Run unit tests (#2491)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2024-03-23 10:00:44 +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