Top-level semantic values like Point, Equipment, Location broke the
item-details view.
Regression from #3178.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Documentation link for certain types isn't displayed because the lookup
was done using the wrong key.
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Closes https://github.com/openhab/openhab-webui/issues/3211.
This PR changes the semantics picker to use a treeview.
This treeview is inherited from
https://github.com/openhab/openhab-webui/pull/3165 and enhanced.
It therefore also introduces some enhancements in the semantic treeview maintenance.
The semantics treeview presents a searchable treeview of the semantic
classes/properties, limited to what is relevant in the context. When
used as a picker, radio buttons are used for picking. It has filter and
expand capabilities, options to show the semantic name and synonyms and
tooltips showing the semantic descriptions if available.
---------
Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Resolves#433.
Adding to the model from thing channels has been enhanced in a few ways:
- Add Points to Model: now allows to pick an existing item already
linked to the channel. The item will get default semantic tags from the
channel defaults if it does not have semantic tags already.
- Add Equipment to Model: ability to pick an existing group for the
equipment. This group will get the default equipment semantic tag from
the thing if it does not have a semantic tag already. Groups tagged as
locations cannot be selected to guard model consistency. Adding points
in this case is enhanced just as above.
When doing this, I ran into some reactivity issues with oh-icon, where
switching icon and state at the same time caused update issues. This was
caused by conflicts in the 2 watchers updating the same properties. I
fixed that by grouping these 2 elements in 1 object with a single
watcher.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Follow-up for #3197.
- Fixes issue with "overcrowded" rules-list selection toolbar on narrow screens.
- Adds ability to regenerate multiple rules at once from the rules-list selection.
- Adds ability to select all rules of a certain template by clicking on the template badge in the rules-list selection.
- Shows the script type in the top bar as subtitle for scripted rules (e.g. JS Scripting).
---------
Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
This adds a page with a treeview of the existing semantic tags in the
development tools and allows adding (and editing) custom semantic tags.
With this, you can maintain custom tags from the UI (it was already
possible from `tags.yaml` files before). Moving around custom tags with
drag and drop is possible.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Fixes#1949.
This monkey patches parseFloat to also handle decimal comma and updates
oh-input to take advantage of that.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This improves DX by adding the ability to use ./mvnw, so you aren't
required to manually install Maven anymore.
It also fixes (rare) issues with platform specific Maven builds (e.g.
https://github.com/codehaus-plexus/plexus-compiler/issues/394).
Also use Maven Wrapper in GitHub Actions CI, which eliminates the need
for the stCarols/setup-maven action.
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Closes https://github.com/openhab/openhab-webui/issues/1503.
https://github.com/openhab/openhab-webui/issues/1503 is caused by the
display state of the Item formatting the raw state different from the
slider.
With this change, it is possible to make the oh-slider-item ignore the
display state for the displayed state value.
oh-slider also ignores the display state if that value is set.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Closes#2945.
Load the markdown source files used by the add-on details and the
developer sidebar from the versioned git branch instead of always using
the latest docs. This is implemented by loading the docs src from the
website, were Netlify redirects are used to point each version to the
proper branch.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This does:
1. The collection methods can now not only include exact Property /
Equipment values but also (_**new**_) children of those values
(optionally). This allows display of not only Lightbulb and Lightstripe,
but also any LightSource or child thereof. And also of doors and windows
that support either OpenState (digital) or OpenLevel (analog) positions;
to name a couple.
2. Aligns the code in this PR with the
[documentation](https://github.com/openhab/openhab-docs/pull/2514) and
vice versa; taking into account
[#556](https://github.com/openhab/openhab-webui/issues/556) and
subsequent PRs related to that. This PR and #3239 added support for
Motion detectors under presence, other displays under screens.
3. Cleans up the collection of lighting points to prevent duplicate
entries in the location card; that may otherwise arise when (say) the
user connects a Switch, a Dimmer, and a Color item to the same light
channel.
Resolves
https://github.com/openhab/openhab-webui/pull/3239#issuecomment-3004118138
---------
Also-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
This fixes 2 issues:
- When picking items from model, the already checked or selected items
would not appear if these are non-semantic. It would also return a bad
selection (selecting the already selected semantic item twice). This PR
fixes it by enabling showNonSemantic if any of the selected or checked
items are non-semantic and expanding the tree to show all selected or
checked items.
- Drag/drop sometimes fails when moving into a subtree of a sibling of a
node being moved, as the added and removed events where not generated,
but a moved event is created instead. This fix also interprets the moved
event. To make things more easily understood for the users when
dragging, the ghost element is now hidden, as it sometimes showed in
another place than where it would be dropped.
- Drag/drop performance on large models was sometimes very slugish. Some
performance improvements where made that should improve this.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Follow-up for #3249.
Depends on https://github.com/openhab/openhab-core/pull/4874.
This allows to add and edit editable metadata for uneditable Items, it
only blocks edition of uneditable metadata.
For the `widget` metaddata, it allow to try out changes if not editable,
but does not allow saving them.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
When viewing an uneditable item, its metadata is shown as editable in
the UI. Use the editable property of the Item to decide whether its
metadata is editable. (Technically seen you can have managed metadata
for an unmanaged item, but this will cause confusing behaviour for the
user).
Signed-off-by: Florian Hotze <dev@florianhotze.com>
As console logging consumes a considerable amount of time, even when
the browser console is closed (especially since logging objects requires
deep cloning them), implemented a UI wide log level.
The log level allows to only log to the console when the level is above a
set value. These levels mimic the OH server side log levels.
The log level for the browser can be set in an extra developer tools
screen entry, and are persisted in the browser store when set.
The default logging level is INFO (will include ERROR and WARN), thereby
disabling `console.log`, `console.debug` and `console.trace`.
The impact is UI wide.
---------
Also-by: Florian Hotze <dev@florianhotze.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
fixes#3096
Adds a new block to allow enabling/disabling rules.
Variables of type Boolean and String are supported. A String with "true"
or "enabled" will be converted to true, all other values will result
into false.
<img width="471" alt="image"
src="https://github.com/user-attachments/assets/30210a96-5adb-4b65-ad45-0e6a082fe486"
/>
I also added Boolean to typed variables as this was missing:
<img width="417" alt="image"
src="https://github.com/user-attachments/assets/30cf9ec1-46bd-45d8-95bc-6fb11ea99a16"
/>
I used "as" because I think this is the most intuitive way of describing
what the block does, in particular when you use "enabled". If anyone has
a better idea to make the block design better, then please provide
feedback. Using a dropdown with Note that "Enable/Disable" ruleUID would
be nicer but would not allow to use variables.
---------
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
This PR depends on https://github.com/openhab/openhab-core/pull/4718.
It does several things, but the major points are:
* It enables regeneration of rules based on rule templates from the UI.
Regeneration can be desirable if the rule template has been updated and
you want the rule(s) to reflect the change, or if you wish to change one
of the parameters, for example to make the rule work with a different
Item.
* It restores the display of read-only/unmanaged rules in the UI. It is
currently broken because all read-only rules are forwarded to the script
editor, effectively hiding the rule editor, unless you modify the URL
manually. This is very relevant for
https://github.com/openhab/openhab-core/pull/4633, whose rules will
otherwise be quite meaningless in the UI (they will still work, but you
won't be able to see what they do from the UI).
* It provides a third tab "Source" to the rule editor that shows the
"source script" used to create the rule, if the rule is supplied via a
JSR223 based scripting add-on, *if* the "source script" is embedded as
metadata with the rule. This is the current practice with most JSR223
based scripting add-on provided rules, and is the only situation where
showing read-only rules in the script editor makes any sense. The
"Source" tab is thus a replacement for removing the forwarding to the
script editor. Rules that have embedded "source scripts" will by default
open in the "Source" tab, so that the difference for these rules will be
minimal, while it also allows other read-only rules to work.
In addition to the above points, there are quite a few bug fixes that I
have come over while debugging/testing this.
There's a lot that could be said about the details here, but I know from
experience that if I attempt to describe everything, people won't read
it. So, I tried to make this description brief, and can instead
elaborate on any subjects on demand.
---------
Signed-off-by: Ravi Nadahar <nadahar@rediffmail.com>
Co-authored-by: Yannick Schaus <github@schaus.net>
When zooming, instead of just upscaling the previously loaded chart, a
new chart is built using available width as new chart width. Upscale is
kept and will be used in case the user defined a maximum width for
charts that is lower than the available width.
Closes#3139
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This suppresses the warning about missing top level directory marker
during build with Maven 4.
The approach to add `.mvn` dir is the option to do it which does not
impact our standard builds with Maven 3.
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This is a follow-up for #2970.
This applies 2 fixes:
1. Extra non-semantic tag was added with value equal to semantic class
when semantic item was moved.
2. On larger models, SortableJS and Vue DOM updates sometimes got out of
sync. This is solved by forcing SortableJS to use the fallback that does
not directly update the DOM.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>