Commit Graph

1101 Commits (f912de509c504ab2619bbcbca58fe959f0eb6ebf)

Author SHA1 Message Date
Yannick Schaus 3eff1fa404
Fix channel for Thing trigger cannot be chosen (#2026)
Fixes #1996.
Regression from #1661.

Supersedes https://github.com/openhab/openhab-core/pull/3761.

Signed-off-by: Yannick Schaus <github@schaus.net>
2023-08-18 17:36:14 +02:00
lolodomo 7f2dbb3400
[BasicUI] Upgrade to last version of Material icons (#2016)
Move from the outdated official NPM module (material-design-icons) to an
alternative NPM module (material-icons) providing most recent material
icons.

As a consequence, TTF format is no more provided, only WOFF and WOFF2
formats. All current browsers support WOFF format, so only very old
browsers could be impacted by the miss of the TTF format.

Also fix icon size in condensed mode (28x28).

Fixes #2011
Fixes #2015

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-16 10:16:45 +02:00
lolodomo 391f0fd009
[BasicUI] Add support for framework7 icons (#2013)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-13 22:46:57 +02:00
lolodomo 034d8b9318
[BasicUI] Add a new setting to choose the nb of columns (#2018)
Also allow 3 columns on desktop.

Possible number of columns on desktop: 1 or 2 or 3.
Possible number of columns on tablet: 1 or 2
Possible number of columns on phone: 1

New default is 3 columns on desktop and 2 on tablet.

Closes #1836

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-13 21:53:13 +02:00
lolodomo 1c423ba520
[BasicUI] Upgrade frontend-maven-plugin, node and npm to most recent … (#2012)
…versions

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-08-13 19:37:29 +02:00
Florian Hotze 0d34818112
Widget editor: Add note that properties are not evaluated in the editor (#2007)
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-08-06 21:59:00 +02:00
stefan-hoehn ffb4ce6767
[blockly] Add Quantity support to round block (#2000)
Round block now also takes a Qty block as input.
Output type changes according to input.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-08-06 19:08:46 +02:00
stefan-hoehn edc124e4f8
Blockly: Support String/Number on eventcontext state/command (#1992)
Fixes #1991.

Support conversion of event context types itemState, oldItemState,
itemCommand as String or Number by supplying a mutating block with a
choise of Number / String.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-07-27 23:41:04 +02:00
Florian Hotze 324503283f
Use dynamic links for docs (#1983)
Open next. or www. depending the openHAB version (release or
milestone/snapshot).

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:26:05 +02:00
Florian Hotze 2230f522f0
Semantic tags: Fix missing translations in case of missing label (#1986)
Fixes #1976.
Follow-up for #1882.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:24:59 +02:00
Florian Hotze 59695c65d0
Persistence editor: Remove checks on save as not required anymore (#1988)
https://github.com/openhab/openhab-core/pull/3727 made core handle
`null` as values for `relative` and `inverted` fields of persistence
filters and set defaults for those. Therefore, UI does not need to
ensure they are set anymore.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:24:27 +02:00
Florian Hotze efa3345941
Developer sidebar: Fix Thing pinning fails (#1984)
Regression from #1661.

Using the cacheable list for Things leads to a failure because the
status field is not available then.
This reverts the change from #1661 to this single REST request.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:23:31 +02:00
Florian Hotze c65252241c
oh-colorpicker: Add defaultColor option (#1971)
Related to and closes #1965.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-26 17:14:47 +02:00
Kai Kreuzer 1a0ea55d9a Apply spotless
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2023-07-24 01:19:34 +02:00
openhab-bot 871e5ea618 [unleash-maven-plugin] Preparation for next development cycle. 2023-07-23 22:08:15 +00:00
Florian Hotze 46c9daffa8
Persistence page: Fix config update on filter removal (#1982)
When removing a filter, the persistence editor checks which configs use
that filter and removes the filter from those configs, otherwise the
save request fails with an HTTP error.

However, the implementation was buggy and also removed other filters
from configs because of a missing check.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-23 18:32:48 +02:00
openhab-bot 6a72ca704e
New Crowdin updates (#1979) 2023-07-22 14:13:15 +02:00
Florian Hotze c050fffae6
Fix masonry configuration failure (#1970)
Fixes #1964.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-21 14:52:20 +02:00
Florian Hotze 6a35b6c2e6
Persistence configuration page: Minor enhancements & fixes (#1955)
Follow-up for #1917.

- Display enabled filters in config footer.
- Display filter configuration in filter footer.
- Time filter: Define options for time unit.
- Add a button to open the documentation.
- Fixes an issue, where Filter creation fails due to missing filter type
arrays.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-07-18 16:27:35 +02:00
Yannick Schaus acfdb59151
Fix page highlighting in sidebar (#1967)
Fixes #1966.

Happens when you have pages prefixed with the name of another page.

Signed-off-by: Yannick Schaus <github@schaus.net>
2023-07-18 14:43:29 +02:00
Wouter Born 8d310b28a9
Upgrade SAT and Spotless (#1969)
This upgrades SAT and Spotless so they can correctly check and format
Java 17 code.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-07-18 08:58:26 +02:00
openhab-bot 6a31b54b02
New Crowdin updates (#1950) 2023-07-17 12:43:21 +02:00
lolodomo 9be42930d9
[BasicUI] Use inline SVG for "colorless" SVG icons (#1799)
Related to #1743

Use a HTML svg element (inline SVG) instead of a img element
when the icon servlet returns a SVG icon containing "currentColor".

Then it is possible to adjust the color of these icons by using the
iconcolor sitemapo attribute.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-07-16 14:34:56 +02:00
Florian Hotze f51c2385f7
`oh-repeater`: Make caching configurable (#1963)
Fixes #1956.

Adds a boolean property to the repeater (and relevant docs),
`cacheSource` which allows the user to determine whether the repeater
should refresh the source array with css and object changes or cache the
source array for performance improvements.

Signed-off-by : Justin Georgi <justin.georgi@gmail.com>
2023-07-15 23:58:53 +02:00
Mark Herwege 16256c2894
[basicui] Use sitemap input hint v2 (#1923)
This PR is a continuation of
https://github.com/openhab/openhab-webui/pull/1787, using the extra
functionality provided by core if
https://github.com/openhab/openhab-core/pull/3644 gets merged in core.
It would be an alternative to
https://github.com/openhab/openhab-webui/pull/1787 with the same
functionality, but reduced complexity.

Requires https://github.com/openhab/openhab-core/pull/3644.

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-07-14 11:39:48 +02:00
stefan-hoehn 851bd5007f
context block typing, extended Qty block var type support (#1948)
Fixes #1942.
Requires version 4.5.0 of openhab-js, therefore awaiting https://github.com/openhab/openhab-addons/pull/15219.

- Adds context block typings.
- Adds supports for Item state input in addition to Item object only in
case Qty Block has a var as input.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-07-10 23:20:25 +02:00
Yannick Schaus 1257a0d4d6
Use cacheable lists when possible (#1661)
Closes #1650.
Depends on https://github.com/openhab/openhab-core/pull/3335.

Will fetch items, things and rules with the `staticDataOnly` parameter set when appropriate.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Yannick Schaus <github@schaus.net>
2023-07-02 16:50:05 +02:00
Mark Herwege 1f659cced7
Developer sidebar: Support search for rule tags (#1947)
It is possible to filter the rules on tags in the search bar of the rule
list, as they are visible on screen. As items can be searched by tag in
the developer toolbar search, I think it is still useful to extend the
rule search in the developer toolbar to tags as well. I tend to give my
rules tags, often corresponding to tags on items as well. This allows
finding all of these in one place.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-06-29 18:06:55 +02:00
Mark Herwege 7ee9e0341e
Developer sidebar: Support search for Blockly rules/scripts (#1946)
Closes #1943.

Searches for 'block', 'blockly', 'blocksource' (case is ignored) will return a list of all Blockly rules.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-06-29 12:22:43 +02:00
Florian Hotze 46cf0299ab
Dynamically load the list of Semantic tags and store them in Vuex (#1882)
Supersedes #1850.
Closes #1822.

Depends on https://github.com/openhab/openhab-core/pull/3559 (already
merged now).
Adding custom semantic tags is now possible:
https://github.com/openhab/openhab-core/pull/3519.

This PR loads the Semantic tags when MainUI is loaded the first time and
stores them in Vuex.
This allows the removal of the hard-coded Semantic tags and the
translations from the assets and therefore makes the initial JS smaller.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-28 23:09:48 +02:00
Florian Hotze 8228411468
Items: Fix `unit` metadata not available for UoM groups (#1936)
Fixes #1933.
Follow-up for #1901.

This enables the unit metadata for UoM groups (i.e. groups with a
groupType of `Number:`).

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-28 22:37:56 +02:00
Florian Hotze 40b1f7adb4
`oh-sipclient`: Fix audio playback stays active when foreground is left (#1925)
I noticed this especially on my iOS when I listened to music and opened
the SIP client. After leaving the iOS app, openHAB kept active in the
audio playback control and I was unable to continue listening to my
music without closing the openHAB app.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-28 22:35:24 +02:00
Florian Hotze 376f036d04
Add a persistence configuration page (#1917)
Closes #1463.
Refs https://github.com/openhab/openhab-core/pull/2871.
Refs https://github.com/openhab/openhab-core/pull/3642.

It is accessible from the add-on settings page and has both a design and
a code tab.

The design tab allows to set persistence strategies for Items, define
cron strategies and set the default strategies. It does not duplicate
names for (cron) persistence strategies and filters as well as configs
for the same set of Items.
All four filters provided by openHAB core (treshold, time, equals/not
equals, include/exclude) can be configured.
When the user removes a cron strategy or a filter, it is automatically
removed from all configs so that there is no API failure (400 Bad
Request).

No code completion is not provided, but required attributes for filters
are automatically set on save to avoid API failure (500 Internal Server
Error).

A few words about order and sorting:
- openHAB Core seems to sort the cron strategies.
- Configurations itself are unsorted, they could be sorted
alphabetically by the UI.
- Items of configuration are sorted by their type (groups before normal
Items) as well as alphabetically.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Co-authored-by: J-N-K <github@klug.nrw>
2023-06-28 22:32:38 +02:00
lolodomo 7cb786aa51
[BasicUI] Set color-scheme for OH icon (#1937)
to have icon color depending on selected theme

Fix #1861

Will work only with SVG custom OH icons containing style="color-scheme:
light dark" and currentColor as fill color.

Signed-off-by : Laurent Garnier <lg.hc@free.fr>
2023-06-24 14:32:00 +02:00
openhab-bot a4b6203153
New Crowdin updates (#1873) 2023-06-24 01:14:53 +02:00
J-N-K d4acf720cc
Improvements to the add-on page (#1932)
- Hide author line if author not present
- Hide documentation line if documentation line not present
- Add correct provisioning information for jar file add-on service
- Properly handle description in add-on details page

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-18 19:55:54 +02:00
Mark Herwege 49de601b58
Sitemap parser: Fix negative numbers not allowed for visibility (#1928)
The sitemap DSL parser was not able to correctly recognize negative numbers.

Regression from https://github.com/openhab/openhab-webui/pull/1843 where explicit
recognition of hyphens was introduced for new icon syntax.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-06-18 19:06:56 +02:00
lolodomo 81e12f5f44
[HABot] Use SemanticsService to search for label/synonyms of a tag class (#1916)
Depends on openhab/openhab-core#3636

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-06-17 11:15:10 +02:00
Mark Herwege e75f001c35
[BasicUI] Adjust slider unit handling (#1922)
Adjust BasicUI slider unit handling.
So far, the unit was not passed on to the slider. With proposed changes
in core https://github.com/openhab/openhab-core/pull/3644, unit would be
passed and needs to stripped for the slider to work properly.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-06-14 11:42:23 +02:00
Florian Hotze f32b8a4363
`oh-slider` & `oh-knob`: Add option to ignore displayState (#1924)
Follow-up for #1920.

-- 
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-13 15:32:35 +02:00
Florian Hotze 7f6e093f01
`oh-slider` & `oh-knob`: Fix user configured unit (state description) ignored (#1920)
Fixes #1913. Fixes https://github.com/openhab/openhab-core/issues/3643.
Depends on https://github.com/openhab/openhab-core/pull/3647.

While fixing this, I also noticed a minor regression from PR #1894, that
I also fixed.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-13 14:21:56 +02:00
Florian Hotze b6393c2c37
`oh-repeater`: Fix `key` property does not refresh repeater (#1919)
Fixes #1918.
Regression from #1904.

-- 
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-06-13 09:40:50 +02:00
stefan-hoehn c5f2a9ff58
[blockly] Provide persistence service to blocks (#1903)
Fixes #1625.

Allows to provide the persistence type to persistence blocks.
Default can be provided instead of selecting a particular one (is
backward compatible to old blocks).
Either Iten name or Item can be provided (note that variables must have
the Item not the Item name as the type of variables cannot be detected).

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-06-12 18:21:08 +02:00
Wouter Born bff05be6f6
Upgrade maven-surefire-plugin to 3.0.0 (#1848)
This fixes deprecation warnings when runnings tests with Maven 3.9.x:

`[WARNING] Parameter 'localRepository' is deprecated core expression;
Avoid use of ArtifactRepository type. If you need access to local
repository, switch to '${repositorySystemSession}' expression and get
LRM from it instead.`

See: https://issues.apache.org/jira/browse/SUREFIRE-2154

Related to openhab/openhab-core#3512

Signed-off-by: Wouter Born <github@maindrain.net>
2023-06-11 22:13:01 +02:00
J-N-K a8ef9cc6e9
Remove "Other Services" section from main settings page (#1891)
Add-on service settings are configurable from the respective add-on's
page and therefore the "Other Services" section of the main settings
page is not needed anymore.
Services provided by openHAB core that were previously listed unter
"Other Services" were moved to "System Services".

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-06-04 12:23:08 +02:00
stefan-hoehn a47835933f
[blockly] Fix UoM variable support (#1911)
Fixes variable support for the blockly unit of measurement blocks which
did not work at all -> var defaults to item object.

Blockly cannot detect the type that is contained in a variable so we
expect an Item object.
This allows to iterate over a group of Item members which returns a list
of Item objects

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-29 14:21:02 +02:00
stefan-hoehn dab4630d08
Widget editor: Add minus as allowed char of widget uid (#1910)
Fixes #1906.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-05-29 13:53:22 +02:00
J-N-K 21a30972a8
Add BasicUI to recommended add-ons (#1908)
See discussion in https://github.com/openhab/openhab-distro/pull/1543.

Signed-off-by: Jan N. Klug <github@klug.nrw>
2023-05-25 20:49:12 +02:00
Florian Hotze b5176216c1
`oh-slider`: Fix command sent on state update due to rounding (#1894)
Fixes https://github.com/openhab/openhab-webui/issues/1862.

When a state update like 40.545 was received, the slider component
commanded the Item to 41 because of the rounding used.
Unfortunately, the slider component has no built-in way to avoid that.
This decouples the slider value from the actual Item value and only send
command when the difference between them is larger or equal than step
size.

This is no perfect solution, because it can be that the slider does not
accept input when the above checks don't pass.
Example: Your Item has a value of 40.545, then the slider does not
accept 40.5 and 41.

I've checked `oh-setpoint` and `oh-knob`, they are not affected by this
bug.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-22 20:53:12 +02:00
Florian Hotze a75cd04565
Item & Thing code tabs: Minor fixes (#1900)
- Item code tab: Fix lock icon always displayed.
- Thing code tab: Fix missing warning when leaving page but there are
unsaved changes.

--
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-05-22 20:48:35 +02:00