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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Depends on https://github.com/openhab/openhab-core/pull/4108.
In most places, the inbox content is loaded only to show a count of items in inbox.
For any decent size systems the inbox may contain hundreds of entries that are ignored,
which equates to lots of unnecessary data being transferred and processed in the browser.
---------
Signed-off-by: Arne Seime <arne.seime@gmail.com>
For buttongrid/mapview/video/webview elements, avoids generating HTML
code for header row when it is hidden.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This upgrades `echarts` and `vue-echarts` to the latest versions.
`@vue/composition-api` was added as dependency because `vue-echarts`
needs it on Vue 2.
See
https://echarts.apache.org/handbook/en/basics/release-note/v5-upgrade-guide/
and https://github.com/ecomfe/vue-echarts#migration-to-v6 for upgrade
guides.
This also adds a fallback default for `visualMap` because it is required
to define a `visualMap` when using a heatmap, otherwise echarts fails to
render the chart.
Even though the docs and the chart-designer mentioned this until now, it
worked without defining a visualmap, which would not be the case anymore
(and therefore break charts - defining a visual map is easy though)
without providing a fallback.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2469.
After changing the ID of a Thing (only possible when creating a new
Thing), the displayed value was reset to the pre-filled default when
moving to a different field. When saving the Thing, the entered value
was used. This was because Vue did not properly notice the change of the
ID.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
- When editing an Item, also check for Item type change and display a
warning when changing the Item type.
- The dimension/unit change checks were not comparing against the saved
Item, but instead against the last changes. Fix this.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2457.
The list index collided with the "show ignored" checkbox and caused it
to not be checkable on smaller screens (mobile phones).
As I have found no real fix for this issue (setting z-indizes does not
work due to the structure of the page), I created this workaround to
switch the checkbox and the label on smaller screens.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Make the + Icon in the items list go straight into adding a new item.
This makes the most common operation quicker.
Adding from textual definition can still be done through Developer Tool,
as it's not a common task.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Closes#1832Closes#1930Closes#2342
A new page is available to show and update all per-device settings. This
page is accessible through the sitemap list page or the home page of any
sitemap.
Basic UI theme now matches the dark mode of Main UI. It can be updated
either in Main UI or in the new page of Baisc UI.
Web Audio can also be enabled either in Main UI or Basic UI.
The iconify setting is now enabled by default. The script to handle
iconify icons is now loaded in sitemap pages only if the iconify setting
is enabled.
New settings are also available to control the size of the chart and the
size of content (text, line) in the chart.
A new setting is also available to enable a bigger font size.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Depends on https://github.com/openhab/openhab-core/pull/4118.
@ghys could you comment on the purpose of `ignoreEditable` here? It's
preventing the lock icon from showing up.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Regression from #2294.
When the developer dock was opened the first time, the navbar was not
center aligned due to a styling issue because of the lazy loading. This
works-around this by setting (sub)title after component creation.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Closes https://github.com/openhab/openhab-core/issues/4082.
This PR adds:
1. A curated list of units to show as a drop-down list when creating a Number item with dimension.
2. The possibility to use a different default unit on item creation than the system default unit.
3. The ability to change unit and state description for items.
4. The ability to use the `unitHint` provided by channel types for "Link channel to Item" -> "Create a new Item".
By default, the system default unit (for the configured measurement system) will be shown when editing or creating an item.
`units.js` contains a number of frequently used units by dimension and measurement system.
These will be available in a autosuggest dropdown list.
It is still possible to not select from the list and use any other string as a unit.
All units for the dimension in `units.js` will be in the dropdown list, but they will be sorted by measurement system. If the measurement system is set to US, imperial units will appear higher in the list.
Units that have not explicitely been listed as SI or US will always appear higher.
When typing a unit that is not in the curated list, a longer list will be used for autocompletion that considers allowed prefixes to base units and constructs all combinations.
`units.js` also contains a field to set a different default unit on item creation than the system default unit.
With https://github.com/openhab/openhab-core/pull/4079, the REST API of channel types will provide a unit hint if defined in the binding channel types.
If such information is available, this PR adds support for this to be the the suggested unit.
If that information is unavailable, the UI will fall back to behavious described above.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Regression from #2267.
This fixes the service-worker and switches from injecting the manifest
into a pre-provided service-worker to generating the service-worker
during webpack builder.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This removes Cordova from Main UI.
Cordova was used to build Main UI as an iOS or Android app (a webview
with pre-packed assets), but the Cordova component of Main UI is
currently unmaintained due to requiring lots of maintenance.
Both the iOS and the Android app have an integrated webview (without
pre-packed assets though), so Cordova is unlikely to be required in the
future.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
It conflicts with the multi-select plugin and the same functionality is provided by the multi-select plugin
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Previously, when hovering over a `oh-player-control` component, a
tooltip, which shouldn't be there, was shown.
This was caused by the config title being set as the divs title.
It is now fixed by manually setting title to an empy string.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
The status badges are displayed based on the actual state of that status
category. This causes the measurement badges, which are always shown to
be either first or second line.
This swaps those, so that measurement badges don't move around anymore.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This PR adds dirty checking in the rule module popup.
Rule module popup comes up when you're editing a rule's module, e.g.
trigger, action, condition. Previously when you opened the rule module
and made changes, then clicked back, you wouldn't get a warning and the
changes will simply be lost.
---------
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
- Display specific title for each tab, but avoid becoming too long on smaller screens.
- Don't autofocus on the search bar on mobile because it opens up the on-screen keyboard and covers up half the screen.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Fixes regressions from one of the previous PRs.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Fixes this error:
```
app.30bb9074a7a632ce30a5.js:2 TypeError: Cannot read properties of undefined (reading 'length')
at i.overviewPage (app.30bb9074a7a632ce30a5.js:2:1827039)
…
```
Also refactor the code for better readability.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This adds a little button on the bottom of blockly workspace to allow
switching the renderer on the fly.
The choice is saved in `localStorage`.
---------
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Follow-up for one of the previous PRs.
Fix Item dirty warning for:
- Item not editable, but warning still displayed
- editable group Item
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Currently, Main UI attempts to load all add-on logos as PNG (the add-on
logo url is generated using the add-on name and expecting a PNG).
This PR adds support for SVG add-on logos, which means:
The UI will now attempt to load a SVG logo,
if that fails, it will attempt to load a PNG,
and if that fails, fall back to the add-on‘s default logo (which is
dependent on the add-on type).
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Resolves#2047.
- Installed addons are grouped by category in the main Add-on Store section.
- Search in the main "Add-on Store" menu will search all types of addons.
- Search in the corresponding section will only search for add-ons for that category.
The subsections are implemented as routable tabs, so switching around the different sections is fast.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Change the icon shown when no persistence is configured to be the same as the icon on the settings page.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This was due to bad ready handling, where the code editor was
initialized with not editable because the Item was not loaded yet.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
- Remove/hide non-functional title/description input fields in the initial Add Trigger/Action/Condition for the rule editor.
- When editing a rule module, set the popup title to reflect the type of module, i.e. "Edit Trigger", or "Edit Condition"
- Changed the link on the top right corner from `Done` to `Save`
- Removed the pencil icon for consistency.
Previously, Cron and Scripts have a pencil icon which goes to the Edit module popup vs clicking directly on the line goes directly to Cron Builder, or Script Editor.
Now with the pencil icon gone, cron will go into the Edit module popup, which can lead to the cron builder from there, and Scripts go directly to script editor.
Changing the script title/description is possible from
within the script editor's bottom area as shown below.
Script Editor:
- Change the title of Script Editor, from "Edit Script" to better clarify what type of script is being edited.
- Add the ability to change the script's title and description after they're created.
---------
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Also add the icon to widget-list and script-edit pages.
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Add clipboard icons to the search results and the pinned entities to copy their IDs.
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Currently for Blockly Script Action or Condition, clicking on "Edit module" the pencil icon would open up rule-module-popup,
which allows user to edit the raw javascript directly without regard to the blockly's block code.
This PR changed it by replacing the configuration sheet with a button that leads to the blockly editor.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
- Fixes an issue reported in
https://github.com/openhab/openhab-webui/pull/2322#issuecomment-1948875309
where external anchor hrefs did not work.
- Fixes an issue where the script editor docs were shown on the
`/settings/scripts/` page.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
- Make type, dimension, unit, semantic class and semantic property all lined up with name, label, category.
- Slightly shift category icon to the right to line it up with the rest.
- Move the group section directly underneath the Item type.
- Make the item form fields update their states after switching back from the Code editor.
- Show the parent groups similar to how tags are displayed.
- Minor bug fixes.
- Refactor tag-input.vue:
- Make tags always extended.
- Show zero when there are no tags.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Allow double clicking to select an item here, without having to click "Pick" at the top right corner.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Remember these checkboxes so they don't need to be re-checked every time.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
See https://github.com/openhab/openhab-core/pull/4090.
- When/If removed
- Added prefix "item", "thing", similar to "channel"
- play sound "xxx.mp3"
- thing changed -> thing status changed
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Fix this to avoid a whole bunch of these warnings were logged when
switching to math category
```
blocks-math.js:302 CodeGenerator init was not called before blockToCode was called.
blocks-math.js:303 CodeGenerator init was not called before blockToCode was called.
```
This is a quick and dirty solution without doing a bigger refactoring
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Fix so oh_get_persistvalue block does not unnecessarily disconnect the
ZDT input every time a different methodname is selected.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This adds the ability to set custom icons for pages. The custom icons
can be any icons available to the the oh-icon component. They are
visible in the side bar and in the page settings list.
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Fixes a few minor error with scripts and scene in the developer toolbar
search function:
1) Scenes and scripts could be pinned but not unpinned
2) Scenes and scripts were not enumerated with the other types for
determining existence of search results
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
- Improve doc link logic and use Vuex store for the openHAB website url.
- Channel info: Fix clear buttons displayed even if not editable.
- Persistence edit: Fix styling issues.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
On the Item Editor:
Current behaviour, when we have:
Semantic Class: Control
Property: Light
When changing Property to None, it would clear Semantic Class "Control"
too.
The Fix is not to clear the Semantic Class.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Fixes dirty checks: When the code tab was opened, the page always wanted
to be saved before leave, even though nothing was modified.
Fixes not-editable handling: Channels were configurable even though the
Thing was not editable and the save keyboard shortcut attemted a save.
In both cases, the according API requests failed, because the Thing was
not editable.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This lead to an error being thrown because openHAB core does not allow
to modify group membership of unmanaged Items and returns a 405.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Advanced parameters should be shown to the user if they have:
- a default value defined and the value is not the default value
- no default value defined and they have a value set
This is more transparent to the user and improves the UX, because the
user does not need to enable "show advanced" just to check whether he
has set up or modified advanced parameters.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
On the default renderer, it isn't obvious that this is wrong, but on
Zelos where generic output (rounded) vs Boolean output (angled) have
different looks, it's glaringly obvious.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Currently the UI would allow editing an uneditable item, despite giving
errors when trying to save it. This PR marks the relevant fields as
read-only or disabled, preventing them from being edited in the first
place.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Regression from #2276 which caused a new rule unable to be created
because the rule name/description couldn't be entered (fields are
disabled)
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Check for unsaved changes before leave and add the Ctrl-S shortcut for
save.
This makes it consistent with the service config page.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2299.
Also enhances the Item name validation when creating a new Item from the
Items list.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
When using the `@` and `@@` shortcuts for Item displayState and state in
widget expressions, properly handle cases where the Item name is
`undefined`.
Unfortunately I did not find a way to improve that for `items[itemName]`
expressions.
Requesting the Item state from the server when the Item name is
undefined leads to warnings in the log (which might cause some confusion
for the users):
```
[WARN ] [se.internal.SseItemStatesEventBuilder] - Attempting to send a state update of an item which doesn't exist: undefined
```
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Regression from #2267.
In #2267 the YAML library was upgraded to a new version, but the usage
of the library was not adjusted to breaking changes.
This PR fixes all issues discouvered in the browser console.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Upgrade webpack and related build dependencies from v4 to v5.
Also upgrade the NodeJS and npm versions used by the Main UI build as well as babel.
The changes follow the recommendations of the webpack migration guide at https://webpack.js.org/migrate/5/ or are required changes for updated webpack plugins.
New default values causing problems have been overwritten, e.g. devServer.compress: false because compression broke the SSE event streams.
The ModuleConcatenationPlugin is not created manually in production mode anymore, as this setting broke the production build, and it is not neccassary to create that, as this plugin is automatically enabled in production mode.
See https://webpack.js.org/plugins/module-concatenation-plugin/.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
Fixes#1186: Widget sends command on external update due to rounding.
This is done by replacing the generic change listener with listeners for
plusclick, minusclick and input for input element events.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes an issue where the configuration of a script action of a
file-based rule (e.g. those created using JSRule or Rule Builder of
openhab-js) was shown as editable, even though the rule is not editable
because it is provisioned from file.
Always show the tag input, even if there are no rule tags. This is more
consistent and avoids confusion, as you can now clearly see that a rule
has no tags.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
If all model tabs are hidden, the tab bar has only one entry and
therefore there is no need to display it.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Follow-up for #2088.
Depends on https://github.com/openhab/openhab-docs/pull/2199.
Also add the help sidebar button to the settings and list pages where it
is missing.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
After an error in the SSE connection, the event source is now
reconnected to the right sitemap page.
Fix one of both problems explained in #1757
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This cleanup includes:
* Fix deprecations
* Fix JavaDocs
* Remove redundant toString calls
* Remove redundant semicolons
* Simplify boolean expressions
* Use diamond operator
* Use enhanced for loops
* Use instanceof pattern matching
* Use isEmpty instead of 0 comparisons
* Use lambdas
* Use static inner classes
* Use StandardCharsets
Also adds the SA_LOCAL_SELF_COMPARISON suppression similar as used in
other repositories for https://github.com/spotbugs/spotbugs/issues/1992.
Signed-off-by: Wouter Born <github@maindrain.net>
Remove the defaultColor option.
Instead use RGB(0,0,0) black as default color if the Item state holds no
valid color, so that the color picker is accessible.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Only concerns SVG icons delivered by the openHAB icon servlet and having
"currentColor" as fill color.
Convertion to inline SVG is applied only if the "inline SVG" setting is
enabled.
Fix#2249
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Persistence policies can be configured from the UI. However, it is
difficult to find, and one needs to know where to look. Apart from a
documentation issue, I think persistence is core enough to merrit its
own entry in the settings, so it becomes more prominent.
See for example here:
https://community.openhab.org/t/after-reboot-string-values-are-empty/152064/16
This adds a persistence entry below transformations to the settings menu.
The new persistence config page allows to set the default persistence,
and links to defining the policies for each installed persistence add-on.
There also is a "add" list entry to install more persistence add-ons.
If none is installed, it will explain persistence and link to the docs and the add-on store.
The default persistence settings has been removed from the system
settings, and the link to the persistence policy config from the add-on
settings page has been converted to a button.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
As described in
https://community.openhab.org/t/openhab-4-1-milestone-discussion/149502/222,
none.png is not found for BasicUI.
This PR replaces it with non.svg, see discussion on forum.
@lolodomo @florian-h05 I was behind my screen when I saw the issue. I
didn't test, but did the replacement based on info provided on the
forum.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Suggestions are being shown in the add-on store for add-ons that are already installed.
This PR removes suggestions for installed add-ons.
See request here https://github.com/openhab/openhab-core/issues/3868#issuecomment-1859950504.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Fixes#2196.
Replaces #2211.
The double back navigation was caused by:
31f4c7065e/src/core/utils/history.js (L56-L61)
and `router.updateCurrentUrl()`, unlike the name implies, doesn't update
`router.url` for some reason (maybe a bug?).
-----
Signed-off-by: Yannick Schaus <github@schaus.net>
This updates the tern defs used for autocompletion to the current
library version included in the addon (4.7.0).
Reference https://github.com/openhab/openhab-js/compare/v4.0.0...v4.7.0.
Last update of those was in #1710.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
When installing rule templates or UI components or blockly libraries
from the marketplace, they get an entry in the add-on settings menu.
There is nothing that can be configured in these types of add-ons.
Therefore limit the list to bundles and features.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
- Update component docs (follow-up for #2214).
- Avoid sending "Invalid date" to server and do not accept "Invalid
date" as a valid state.
- Fix some errors thrown while configuring component or providing
invalid input.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Support grids containing from 1 to 12 columns.
Only the first 8 columns are rendered on tablet.
Only the first 4 columns are rendered on phone.
Related to openhab/openhab-core#3441
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Closes#2206
This will replace the auto-opening developer dock with a button on the
empty overview page to open the in-app quick start tutorial. Button will
only appear on pages wide enough to support the developer dock.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This adds support to the developer sidebar search to search persistence
configs by:
- serviceId
- label
- Items included in them
It also fixes a styling issue, where tools where to close to the search
bar and search results were far away from the search bar.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2027.
When a script inside a rule was opened, the UI always saved the rule
before navigating to the script editor. With this fix, the rule is only
saved if there is a change to save. If the rule hasn't been changed, no
save request is performed.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#1334.
Fixes#1702.
After editing or removing an Item, the searchbar of the Items list was
sometimes not working anymore. Console then showed this error:
```
TypeError: undefined is not an object (evaluating
'n.virtualList.params')
```
It seems that this was caused because the replaceAllItems operation was
applied on the virtual list without re-rendering the searchbar
afterward.
The search query was forgotten when the Items list reloaded or the
Items list page was re-entered from an Item detail page.
This is also fixed by using `$f7.data` to store the query.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
- Refactor rule & scene settings into rule-general-settings Vue
component and use this component on rule-edit, scene-edit pages and
inside script-general-settings component.
- Replace semantic tag picker & custom tag input with accordion tag
input (inspired by #2078) and show number of tags.
- Refactor shared code from rules & scenes into mixin
(`rule-edit-mixin.js`).
- Fix Scene tag is not hidden from tag input.
- Show number of tags on page settings page, follow up for #2078.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Related to https://github.com/openhab/openhab-core/pull/3481.
Closes#2108.
- Ensures that the internal unit is set when an Item is created, so that
in case the system unit changes (i.e. measurement system changes)
persisted data does not get corrupted.
By default, the unit metadata is set to the system default unit, however
the user can easily change that on Item creation.
The unit can also be changed later as it is just normal metadata,
however this can corrupt persisted data.
- Adds the ability to set state description pattern when creating a UoM
Item.
- Shows the group type for groups, e.g. `Group (Number:Temperature)`
instead of just the Item type.
This applies to both the Items and the model page.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fix#2142
Add a border to the popup.
Also update the separator color (make it more visible) in dark theme.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Fixes#665.
Provides a button to expand or collapse the model tree while searching.
Note: I didn't implement an auto-open because I felt it would be rather disturbing.
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Adjust sitemap configuration in main UI for recent changes in sitemap
chart period configuration, see https://github.com/openhab/openhab-core/pull/3863.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
The period parameter syntax was extended.
Depends on openhab/openhab-core#3863
Also add few new default periods in the selection of chart period
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Depends on https://github.com/openhab/openhab-core/pull/3806.
1. Have the setup wizard propose these addon suggestions (as a
complement to the hardcoded recommended addons).
2. List the addon suggestions on top in the addon store page.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Extends the developer sidebar search to sitemaps, where uid, label and
slots are searched for the query.
Case is ignored.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This is meant to mainly help first time contributors where to start, but
it should also be quite practical for existing contributors and save
them some time looking up stuff.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Closes#2123.
This adds filtering by tags to the rules list, the filter is inside an
accordion.
In case you select multiple tags, the filter behaves like OR, which
means all rules which have at least one of the selected tags are
displayed.
In case you use the searchbar, the rules list will be narrowed down to
the rules which match the search query and have the selected tags.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dmitry P. (d51x) <dimonich110@gmail.com>
Fixes#2139.
This adds a new toNumber block in the Math section that parses to float (I
think we don't need both parseFloat and parseInt).
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Closes#2058.
This converts the developer sidebar into a multipurpose dock.
It keeps the previous developer sidebar as the `Tools` panel and adds a
`Help` panel.
The new `Help` panel contains 4 different sections:
1) A context dependent section that will show basic help for the
administrative page currently viewed. These pages give basic
definitions, some simple tips and links to the relevant full
documentation.
2) An add-on section that lists all the currently installed add-ons and
provides direct links to their documentation pages.
3) A FAQ section for simple answers to common questions with internal
links to help guide the users, some external links to relevant
resources, and links to documentation pages providing more details about
the question.
4) A Quick-Start section that guides a new user with click-by-click
instructions for everything from binding installation to adding a widget
to a MainUI page with links to the detailed Getting Started Tutorial for
each step. This section is opened by default when an administrator opens
a new MainUI instance with no configured overview page (i.e., most
likely a new user).
All of the main setting list pages and the overview page now have a help
icon in the navbar that toggles the help dock.
FAQ and Quick-Start data are stored in separate JSON formatted files for
ease of addition and maintenance.
------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
The docker environment is (unfortunately) kept. It can be used to
compress SVG files. Conversion from SVG into PNG format has been
commented in the script .convert.sh.
Closes#2071Closes#1768
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Use of a dictionary to store audio sources currently playing and stop
them all when asked to.
Refs https://github.com/openhab/openhab-core/pull/3766.
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Make the blocks say "Cancel [private|shared] timer XXX" and "after xx
reschedule [private|shared] timer XXXX"
Also put the reschedule block right after cancel.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Fixes#2153.
Regression from #2055.
MainUI was broken on older iOS versions, e.g. 15.8, because RegEx
lookbehind assertions were introduced with Safari 16.4.
This uses split by string instead and adds an ESLint rule to forbid
the usage of RegEx lookbehind assertions.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
The temperature badge shows both the measured temperature and the
temperature setpoint in the form "measurement_value (setpoint_value)",
e.g. 20° (21°).
This introduces the same format for
humidity badge by showing humidity setpoint in addition to humidity
measurement.
Signed-off-by: Alexander Antonov <alexxys@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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#1939Fixes#1367
Also related to #1930
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
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>
Fixes https://github.com/openhab/openhab-webui/issues/2043
The sitemap parser was not able to cope with comments in the sitemap
text when pasted in from a sitemap file.
Comments will now be discarded (the REST API does not have fields for
comments), but the sitemap will still be parsed and saved.
Similarly, blanks where accepted in a number of places when defined in
text files, but not in the parser. This is now also corrected.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Regression from #2029.
A few of my UI pages stopped loading properly. Specifically there seemed to be a condition where when the page would draw its widgets before other parts
of the page were loaded (or something similar, some race conditional).
This would result in widgets loading with the wrong state, colors, icons, etc that are dependent on item state.
I tracked it down to this
one very small change, reverting back to a `v-show` from `v-if` for the
main view ready state fixes this.
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Closes#1935.
- Moves transformations to a new list for visual separaration, as it is
only second class configuration.
- Renames System Services to System Settings.
- Add Add-on Settings, which opens the same settings page as the add-on
store, i.e. provides log, service config and persistence config (if
persistence service). Add-ons that only provide log settings are
considered advanced and hidden by default.
- Consolidate the add-on store and the newly added add-on settings into
a single place (refactoring included).
- Add doc links to Things, Items, pages, rules, scenes & scripts list
pages.
- Make some system settings advanced.
- Use a third column for large screens.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Transformations are searchable by uid and label, and as the uid contains
the type, also by type.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
It is still using /bindings to get the data resulting in a 404 Not
Found. The other pages were updated in #1468.
Signed-off-by: Wouter Born <github@maindrain.net>
When the Item was a group Item and groupType was not defined, an error
was thrown. This fixes it.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
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#2011Fixes#2015
Signed-off-by: Laurent Garnier <lg.hc@free.fr>