Commit Graph

1119 Commits (1c03c60f84388b9d7da0231df2d4ebb1e17d3fcf)

Author SHA1 Message Date
Florian Hotze c9de04eaff
Fix color picker not displayed correctly (#2136)
Fixes #2134.
Regression from #1989.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-29 14:50:57 +01:00
Thomas Wunschel c2d071a9cf
Support configurable visibility of semantic model cards (#2144)
Closes #2143.

Only render model-card if `visible` computed property is `true`.
Hide divs in model-tabs which do not have a visible model-card.

Signed-off-by: Thomas Wunschel <thomas.wunschel@twistsolutions.de>
2023-10-29 14:39:48 +01:00
dependabot[bot] 4f331b5702
Bump browserify-sign from 4.2.1 to 4.2.2 in /bundles/org.openhab.ui/web (#2155)
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-29 14:03:25 +01:00
Florian Hotze aef0a6bf74
Fix missing footer element for Item Vue component (#2135)
Fixes #2133.
Regression from #2087.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-29 11:40:49 +01:00
Mark Herwege 922c4f3db7
Sitemap editor: Support AND conditions and icon rules (#2145)
Fixes #2149: Syntax validation errors when command mappings contain special characters like [ and ].

Sitemaps now support icon rules and AND conditions in icon, color and visibility rules.
Mappings now also support an icon.

This PR introduces support to configure this in the sitemap editor.
It also contains a fix for staticIcon support.

Depends on https://github.com/openhab/openhab-core/pull/3850.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-10-27 14:04:31 +02:00
lolodomo d34f93a275
[BasicUI] Add support for icons based on conditional rules (#2020)
Depends on openhab/openhab-core#3820 and #1998 

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-26 23:53:56 +02:00
d51x 0a8c9a7059
Add copy rule functionality (#2132)
This adds the ability to copy a UI rule.
The rule editor behaves as if the rule was a new one, but is pre-populated with the copied rule. 

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-10-22 19:51:47 +02:00
dependabot[bot] bcae592a5f
Bump @babel/traverse from 7.6.2 to 7.23.2 in /bundles/org.openhab.ui/web (#2140)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.6.2 to 7.23.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-22 19:05:48 +02:00
JustinGeorgi 335d149895
Fix oh-clock context in clock card (#2146)
This PR fixes an error in the context definition of the `oh-clock` used
in the `oh-clock` card that was causing the clock cards to fail to
render in the updated configuration definition.

See the forum discussion:
https://community.openhab.org/t/oh4-oh-clock-card-empty-since-oh4-1-m2/150518

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-10-22 18:23:52 +02:00
Florian Hotze bf377d38af
Unwrap command Item picker from f7-list-item (#2125)
Addresses
https://github.com/openhab/openhab-webui/pull/2055#discussion_r1350710682.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-09 23:30:28 +02:00
Florian Hotze e987624fcc
Item edit: Dynamically load UoM dimensions (#2120)
Fixes #1926.
Awaiting https://github.com/openhab/openhab-core/pull/3838.

Load the UoM dimensions for UoM Item types from the REST API instead of
hard-coding them into the UI.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-09 23:21:55 +02:00
openhab-bot 1409da92bf
New Crowdin updates (#1980) 2023-10-08 22:43:07 +02:00
d51x a1a33294fa
Things list: Add grouping by location & Display location in list entries (#2107)
Closes #2099.

Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
2023-10-08 21:23:00 +02:00
Dan Cunningham 27c140aaec
Adds an UI command Item (#2055)
This allows the local running instance of the UI to listen to an Item
for commands. Specifically it will understand the following commands.

- navigate
- popup
- popover
- sheet
- close (closes all popups/sheets/popover)
- back
- reload
- notification

Commands with arguments use a colon delimiter, mirroring widget actions
in the UI, for example:
- `navigate:/pages/page`
- `popup:widget:customWidget`
- `notification:Text:Title:Sub Title:Title Right:5000`

Users can select the item in the about menu, since other local
options are set there it seemed to be the best place.

Signed-off-by: Dan Cunningham <dan@digitaldan.com>
2023-10-08 21:20:46 +02:00
stefan-hoehn e2ebc1de52
[blockly] Support Quantity in more math blocks (#2041)
Closes #2001.

Adds Quantity support for more math blocks:
- math_single had to be reimplemented
- math_minmax was added

Note that there is a special case on min/max if the inputs are not of
equal type an error will be shown to user.

In the special case of variables Blockly does its best to detect the
right code to be generated for the min/max block:
- both are variables -> then numerical input is expected
- one of inputs is a variable: then blockly uses the type of the other
non-var-block to base the generation on (either number or quantity
comparison)
- note that no type conversion of the inputs is done

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-10-08 21:16:12 +02:00
dependabot[bot] aaa5e7aaa0
Bump semver from 5.6.0 to 5.7.2 in /bundles/org.openhab.ui/web (#1960)
Bumps [semver](https://github.com/npm/node-semver) from 5.6.0 to 5.7.2.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 19:53:06 +02:00
dependabot[bot] 696c9076e9
Bump word-wrap from 1.2.3 to 1.2.5 in /bundles/org.openhab.ui/web (#2115)
Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3
to 1.2.5.

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-08 19:51:39 +02:00
Florian Hotze d4d7bea7fb
Fix `oh-stepper` not working if step is an integer (#2109)
Regression from #2090.

Fixes `Uncaught TypeError: Cannot read properties of undefined (reading
'length')` being thrown if the step property is an integer value, e.g. 1
or 1.0.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-10-08 09:50:04 +02:00
lolodomo 1c362ccf64
[BasicUI] Hide header row if label not explicitly set (#2112)
Applied to Chart/Image/Viodeo/Mapview/Webview elements.

Chart and Image elements are also now clickable.
Clicking allows toggling between header row shown and header row hidden.

Fix #2065

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-08 09:45:11 +02:00
Wouter Born fb8e84a635
Update bnd to 7.0.0 (#2111)
For release notes, see:

https://github.com/bndtools/bnd/wiki/Changes-in-7.0.0

Signed-off-by: Wouter Born <github@maindrain.net>
2023-10-06 18:57:54 +02:00
lolodomo c76a8e37c8
[BasicUI] Prefer sitemap label to name in sitemap selection (#2110)
Sitemaps are now also sorted by label/name.
Dark theme is now properly handled.

In case several sitemaps have the same label, the sitemap name is
concatenated in parenthesis.

Fix #2101

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-06 10:07:00 +02:00
lolodomo 23550c65a9
[BasicUI] Prefer icon over text in buttons (switch element) (#2085)
Related to openhab/openhab-core#3441

Depends on openhab/openhab-core#3809

Icons will not be used if icons are not enabled (app setting).

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-10-03 19:28:54 +02:00
Mark Herwege 87e68aae61
[mainui] support staticIcon parameter in sitemap configuration (#1999)
Related to https://github.com/openhab/openhab-core/pull/3735

---------

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-30 22:16:40 +02:00
Florian Hotze f32ef1f401
Fix `oh-` components cannot be configured in action modals (#2094)
Fixes #927.

When attempting to open an `oh-` Vue component, e.g.
`oh-colorpicker-card`, as action modal, it was not possible to configure
it, even though `actionModalConfig` was set.
This was because `oh-` componens take their configuration from the
computed `config` of the widget-mixin instead of the Vue component
`props`.
This PR fixes that by using the `actionModalConfig` for the computed
`config` of `oh-` components in action modals.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-30 21:59:56 +02:00
Florian Hotze 7893bd9b6c
Add error page for initial REST request failure & Abort further load (#1987)
Migitates and therefore closes #1205.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-30 21:56:02 +02:00
Wouter Born ec13c3d00c
Upgrade to Karaf 4.4.4 (#2098)
* Add specs features because Pax Web now depends on "asm".

Depends on https://github.com/openhab/openhab-core/pull/3814.

Signed-off-by: Wouter Born <github@maindrain.net>
2023-09-30 10:47:42 +02:00
David Kesl c402d32563
Semantic model: Remove duplicate non-semantic tags in Item component (#2095)
Changes introduced into #2087 in combination with #2093 create duplicity
in showing non-semantic tags in the model page
(component/model/item-details.vue).
Non-semantic tags are displayed both in the Item and when edit mode is
enabled, in the accordion tag input in item-form.

Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-27 10:08:44 +02:00
Viorel Cojocaru eee0277d89
Update RelativeCI agent action (#2063)
The RelativeCI action was using the CLI with an inline API key.

This PR replaces the RelativeCI CLI with the action agent running on workflow_run
event and in the context of the default branch (secrets are not leaked to forks). 

Signed-off-by: Viorel Cojocaru <vio@beanon.com>
2023-09-26 19:44:38 +02:00
David Kesl 044962251f
Semantic model: Add options to display and search Item names and tags (#2093)
Closes #2092.

- Adds possibility to display Item name and non-semantic tags in Semantic model tree view.
- Adds search for Items also based on Item name and tags depending on selected view options.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-26 16:57:51 +02:00
David Kesl 05c3417194
Items tag: added tags to list, unification of items tag edit (#2087)
Closes #2086

- Adds Non-semantic tags to Items list (e.g. /settings/items/)
consistently with similar list of Rules / Scripts / Pages.
- Extends `getItemTypeAndMetaLabel` with relatesTo part of Semantic
classification and moves it to a mixin.
- Fixes incorrect calculation of vue virtual box height on Items list.
- Replaces custom tag input with accordion tag input (inspired by
https://github.com/openhab/openhab-webui/pull/2078) and show number of
tags (inspired by https://github.com/openhab/openhab-webui/pull/2083).
- Moves the custom tag input to `item-form.vue`, so it is available also
in Model view, when creating Item from Thing etc.

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <david_git@keslovi.cz>
2023-09-26 14:02:02 +02:00
JustinGeorgi 0cc4f27f3d
Fix decimal formatting for oh-stepper (#2090)
Fixes #2089.
Possibly regression from #1875.

Stepper formatValue was calculating displayed number of decimals from the value of the step property, not it's length.

Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
2023-09-25 22:38:39 +02:00
Mark Herwege 35c3ae05b9
Sitemap editor: Trim spaces from color value (#2091)
When generating the sitemap DSL from a UI configured sitemap with color
conditions, if the color in the condition has a leading space, it will
be included in the color string.
While this does not have an impact on the sitemap functionality (it
works), it is an issue if one would copy this sitemap to a sitemap file.
This PR strips the blanks from the color.

See #2082 and the example provided there.

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-25 22:24:54 +02:00
jimtng 881a8b787e
[basicui] Number of Columns label (#2062)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-09-23 17:16:22 +02:00
David Kesl 6fd82e3351
Page edit: Add editing of tags (#2078)
Closes #2077.

This PR adds ability to add / change / remove Tags to Pages via MainUI.
It is using existing tag-input.vue component similar as UI for Items and
Rules.

---------

Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: David Kesl <davidkesl76@gmail.com>
2023-09-22 10:40:30 +02:00
jimtng 671e791f06
Fix missing jar add-ons on settings page (#2079)
Fixes #2076.

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
2023-09-22 01:32:07 +02:00
Andrew Rowe 4876efd906
Change setup wizard icon to choose add-ons to install (#2073)
Signed-off-by: Andrew Rowe <exectechnology@gmail.com>
2023-09-21 20:20:33 +02:00
Florian Hotze cf3b218571
Fix SSE failure toast container not removed (#2075)
Fixes #2069.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-18 20:53:13 +02:00
Florian Hotze d2685e9a12
Add routes for home page tabs (#2074)
Adds routes for `/overview`, `/locations`, `/equipment` and
`/properties` so a home page reload keeps the tab and routing to
individual tabs is possible.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-18 20:51:53 +02:00
Florian Hotze 5068964ad8
Fixes/Improvements for sidebar highlighting, settings page & add-on store (#2053)
Follow-up for #1997.

- Addresses
https://github.com/openhab/openhab-webui/pull/1997/files#r1313446378:
Use filled icon for the add-on store.
- Fixes #2049: Fix sidebar highlighting for add-on settings and add-on
store pages.
- Fixes #2028: Fix tab is resetted to bindings when reloading the add-on
store (by using seperate routes for all tabs, therefore addresses
https://github.com/openhab/openhab-webui/pull/1997#issuecomment-1703221977).
- Closes #2048: Expand system settings by default on large screens where
three columns are used.
- Localize the "Show All" buttons.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Co-authored-by: Yannick Schaus <github@schaus.net>
2023-09-18 20:41:31 +02:00
stefan-hoehn b1a5ac82c0
[blockly] Allow `item xxx` to be used for `get xxx of item` (#2037)
The block can now take both “get item item xxx” or (new) “item xxx” directly.
I have also added some hint in the help tooltip that clarifies
how to work with the block when using it through variables because
Blockly has to make an assumption due to the fact that it cannot detect
what is provided in the variable.

See https://community.openhab.org/t/less-then-greater-then-comparison-return-value-seems-to-be-inverted/148910/9.

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-09-17 14:54:46 +02:00
Jeremy c058b12f0c
Update Alexa color temperature supported item types (#2064)
Related to https://github.com/openhab/openhab-alexa/pull/613

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-09-17 14:50:17 +02:00
Davek145 e1d90f706a
Add CO2 measurement badge to location card (#2068)
Closes #2067.

This PR introduces CO2 measument badge to the location card in MainUI.
It is same logic as other measuments badges, i.e. average from items
with Measurement and CO2 Semantic tags.

---------

Signed-off-by: David Kesl <davidkesl76@gmail.com>
2023-09-16 18:49:17 +02:00
Florian Hotze 2f7b1d7823
Profile page: Only show latest 10 sessions (#2061)
The openHAB demo's profile page takes ages to render because of the huge
sessions list. This should fix that problem.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-16 16:52:03 +02:00
Florian Hotze f2c008befb
Ensure semantic model pages are built after tags are loaded (#2066)
Fixes #2006.

With the attempt in #2029 failing due to #2054, this finally fixes an
issue where the semantic model pages (Equipment, Properties) were
missing translations.
This was due to a race condition, where the semantic model pages were
built before the tags were loaded.

This PR fixes this by watching for semantic model updates (i.e.
subscripting to the underlying Vuex mutation) and loading/building the
model pages after such an update.

Futher improvements:
- Initial loading of semantic tags is put in parallel with other API
requests performed on app init.
- Vuex semantics: A mutation is used for setting the semantic tags from
the action.
- Debug logging is added to both the semantic tag and the semantic model
page loading.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-16 16:31:53 +02:00
lolodomo 07aacc9ee5
[BasicUI] Handle the new parameter "staticIcon" (#1998)
When set on a sitemap element, Basic UI ignores the item state when
initially requesting the OH icon and do not request it again when the
item state is updated.

Depends on openhab/openhab-core#3735

Related to openhab/openhab-android#3404

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-09 13:30:57 +02:00
lolodomo 08a2d80db0
[BasicUI] Add a new header line for image, chart and video elements. (#2010)
Header line for video element contains icon and label.

Header line for image element contains icon, label and a button to
switch between no upscale and upscale of the image. Header line for
chart element contains icon, label and 4 buttons:
 - one button to show or hide the legend
 - one button to change the time range
 - one button to switch between no upscale and upscale of the chart
 - one button to refresh the chart

Fix handling of iconcolor and labelcolor parameters for mapview and
webview elements.

For image and chart elements, the header line is always present so that
user has an access to its buttons.
For video, mapview and webview elements, if the label is empty, the
header line is hidden.

For chart and image elements, there is now no upscale applied by default
(tablet/phone devices) but a button allows upscaling.

Closes #1939
Fixes #1367
Also related to #1930

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2023-09-09 12:31:03 +02:00
Jeremy 1ee7a2f972
Add alexa air quality monitor + remote device types (#2051)
Related to https://github.com/openhab/openhab-alexa/pull/601

Signed-off-by: jsetton <jeremy.setton@gmail.com>
2023-09-05 21:01:54 +02:00
Florian Hotze 6ba92932ee
oh-colorpicker: Fix command not sent when state null & style not accepted & cosmetic error on missing defaultColor (#1989)
Fixes #1713.

- Fix command not sent when current Item state is null.
- Fix style can not be set.
- Fix a (cosmetic) error thrown when defaultColor has no value.

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
2023-09-05 21:00:45 +02:00
Mark Herwege 5900864e1e
[mainui] Sitemap editor fix frequency and refresh parameters (#2033)
These parameters should be number instead of text.

See: https://github.com/openhab/openhab-webui/pull/1487#issuecomment-1332135771

Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
2023-09-05 20:53:11 +02:00
stefan-hoehn db103db550
fix uom block output type (#2036)
fixes #2008

Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
2023-09-05 20:49:51 +02:00