Closes#2613.
This adds support to format channel (type) descriptions using `html` tags similar to thing-type descriptions.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2574.
This is more a workaround than a real fix because it seems there is an issue in Framework7's CSS.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes https://github.com/openhab/openhab-core/issues/4266.
Error was introduced by #2582 and manifests itself
when no country was set in the setup wizard or the locale settings.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Closes#2437, Closes#2148
This PR adds a new component, the oh-context. Similar to the repeater,
this component is not rendered, but injects information into the widget
at it's tree location.
The component allows to inject these three things into the widget:
* functions - using the arrow function syntax, named functions can be
declared and reused in all subsequent expressions
* constants - constants can be defined as either single values, arrays,
or objects
* variables - variables can be defined with default values. These
variables are local in scope to the oh-context and it's descendants and
take precedence over other variables of the same name from higher
contexts.
* Variables are not divided into global vs local explicitly. But a
oh-context used as the root component of a widget will have its
variables in the context of all the other components on that widget and
thus they essentially have a global context within that widget.
* In contrast to the basic widget variables, oh-context variables do
have bi-directional passage between a main widget and a sub widget.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
This adds a button and new sub page to the semantic model.
On that sub-page the user can select from a few different basic templates for
semantic locations which can then be automatically created and added to the model.
There are a few options for customization:
1) The user can select a custom prefix that will be applied to all the items to fit or establish a desired naming scheme.
2) The user can optionally deselect extra pieces of the model that are not appropriate to their needs.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Closes#2050.
This implements filtering for connection type and country (related to
region/country setting) in the addon store.
By default, it will filter for all connection types and filter out
addons not supported for a specific country if info on countries is
available.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Makes the tabbed page config editable though the code tab: Resolves#1276. Resolves#2103.
Enables expression evaluation for tab title and icon: Resolves#2571.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Several Button elements are accepted at the same place in the grid only
when they all have visibility conditions.
In this case, the user must define proper conditions so that only one
button is visible at any time.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This PR **is really a game changer** for further Blockly Usage.
It adds typed variables which in turn allows Blockly to generate the right code.
This is what I was looking for a very long time and will also reduce
many of the issues that popped up here and there.
Fixes#2057.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
When a Switch widget leads to the rendering with buttons, the value
should not be by default also displayed at the left of the buttons
(redundant information), except if it is requested through a state
pattern defined on the widget.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Follow up #2535
The function reloadIcon is already called by the function setValue at
line 636 just before calling setValuePrivate.
The icon continues being refreshed while moving the slider except if
releaseOnly parameter is set.
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
- Remove the suggestion loading delay when setting the network without a change as this is not required.
- While in the wait cycle, going back to the network selection and setting the network again (with or without change)
would lead to the progress bar alternating between short and long because 2 timer cycles
would be running in parallel. Fix this by cancelling the existing timer if there is a network change.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Adds the possibility to provide any information to the timer's callback
block that can be used when the callback is eventually executed.
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Fixes#2552.
Add missing blocks to work with a thing or a group of things:
- oh_getthing (one particular)
- oh_getthing_state (the state of the string - to be consistent with
items)
- oh_getthings (get all things - can be used to iterate over all things)
- oh_getthing_attribute (retrieve any attribute of a thing)
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Add-on finders scan the network for devices supported by OH add-ons to suggest suitable add-ons.
These are presented in the setup-wizard (and add-ons store).
To limit network traffic, especially for IP broadcast and multicast scans,
finders could limit the traffic to one subnet.
This is especially relevant if the setup would be on servers with many
network interfaces or when using Docker.
This commit adds setting up a primary IP address to the setup,
which will also default the broadcast address accordingly to the primary address.
Querying add-on suggestions is delayed until after this step,
and some delay is built into the process to allow suggestions finders to scan the network.
See discussion in https://github.com/openhab/openhab-core/pull/4036.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This updates the tern defs used for autocompletion to the current library version included in the addon (5.0.0)
and also cleans up the actions namespace (remove functionality that is included in superior APIs like `things`).
Reference https://github.com/openhab/openhab-js/compare/v4.7.0...v5.0.0.
Last update was in #2220.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes https://github.com/openhab/openhab-core/issues/4105.
The setup wizard did not respect the i18n config file's content, which
resulted in overwriting the existing i18n settings.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This makes the setup wizard load the region and the location from the
server.
Useful when the wizard is re-launched later.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
- Move the selection of additional add-ons into the addons-setup-wizard.vue component.
- Add description texts for suggested add-ons JS Scripting and Astro.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This improves the first installation experience by:
- Splitting out persistence to a separate step of the setup wizard (and no persistence will be offered in the main wizard addon selection anymore).
- Allows unselecting addons from the shown list without having to open the selection popup again.
- Including Mapdb as a proposal for a persistence service to install
- Including Astro binding in the recommended addons at initial install
This also creates the groundwork to implement more fine grained suggestions in the setup wizard
by allowing to have separate steps for types of addons or specific addons.
It is possible to set extra text for identified add-ons.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This makes the lazy loading of the add-on logo optional (can be enabled
using a config property) in preparation to use the add-on logo component
inside the setup-wizard.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fields should use all space available. In a button grid definition the
row and column fields where not visible.
I can't say what caused this, but this PR should fix this.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Same behaviour as in the Android app is now implemented for the "none"
icon. This icon means "no icon" and we don't want to request the icon
servlet. When this icon is associated to a sitemap element, the icon
servlet is no more requested. Instead, a simple empty SVG tag is
considered and inserted in the HTML page. There is also no dynamic
behaviour (with item state) applied for this icon.
Additionally, in case the loading of any OH icon fails, the IMG tag is
replaced by an empty SVG tag in the HTML page instead of updating the
IMG source with the none icon URL (triggering a potential new icon
servlet request).
Fixopenhab/openhab-core#3977
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
---------
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Follow-up fix for #2545.
When the initial period was different from `D`, the period initial
endTime calculation was wrong.
This lead to the initial period being calculated wrong: One day was
always into the future, the rest of the period to the past.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
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>
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>
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>
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>
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>