Refs https://github.com/openhab/openhab-core/pull/4392.
Closes#2817.
This adds a new section "Actions" to the Thing tab of the Thing page,
which provides a button for each UI-supported Thing action.
Clicking on that button will open a popup, where action input can be
configured and action output can be viewed.
All keys of the action output response object from REST are rendered as
list Items, the labels are taken from the action output definitions and fallback to the key.
If the key is `qrCode` or its output type is defined as `qrCode`, its value is rendered as QR code.
For actions without inputs or without outputs, messages are shown indicating that there is no such.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
This adds new boolean config parameters to the home page settings that allow
setting the default navbar style and standard background for mobile and desktop devices.
The device-specific settings allow to override these defaults by using a segmented button
with three options: The admin's default, option A and option B.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
The color attribute for the header badges in the oh-cell were not
dynamic and as a result setting headerBadgeColor in the cell config
caused a malformed color class to be added to the badge.
This fixes a minor styling issue on mobile devices, where the input's
column is too wide and the sendButton overflows to the next line. Also
add `time` to the docs for valid input types.
---------
Signed-off-by: Florian Hotze <dev@florianhotze.com>
Regression from #2801.
During testing, it looked good, but in production it introduced some
styling issues.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This fixes ugly styling issues with too large margin/padding on iOS
devices due to safe areas getting applied to children of f7-card, even
though f7-card already respects the safe areas.
-----
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Refs https://github.com/openhab/openhab-core/pull/4377.
The most recent addition to the sitemap syntax allows defining buttons
nested as components inside the Buttongrid component.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This sets the version in the Framework7 parameters to the build version during production build,
and adds the commit hash to the Vuex store so it can be displayed on the about page.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Bumps [send](https://github.com/pillarjs/send) and [express](https://github.com/expressjs/express).
These dependencies needed to be updated together.
Updates `send` from 0.18.0 to 0.19.0
Updates `express` from 4.19.2 to 4.21.0
Signed-off-by: dependabot[bot] <support@github.com>
A Thing config action is only supposed to save the config of the Thing,
not the whole Thing.
Fixes https://github.com/openhab/openhab-core/issues/4380.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Regression from #2687.
The dirty indicator code blocked the use of subtitles, these were not
showing up anymore.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This PR removes Nashorn support from Blockly and removes all Nashorn
specific code from the blocks.
When opening a Blockly script, the UI will tell you if the script needs
to be saved again (because the MIME type is for Nashorn or because newly
generated code is different from the saved code).
It will also warn if the JS Scripting addon is not installed.
The Run Now link from the script editor is grayed out when the required
scripting add-on is not installed, and will show a warning when trying to run.
-----
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Closes#2701.
This PR contains a number of sitemap validation improvements,
interactive, before saving and in the DSL parser.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Resolves#1944.
When entering a state description pattern, an autocomplete list
is provided containing the available transformations.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Several small improvements:
- Persistence `previous...State` and `next...State` blocks: add boolean
shadow block for skip same, default false
- Named `timer` blocks: add a `undefined` shadow block for `context`.
- `run rule or script` block: make the parameter dictionnary input a
shadow block
In addition to that, for the `transform` block,
the transformation dropdown now dependens on the installed transformations.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Also improve toast messages in developer sidebar and fix a minor styling
issues for the script settings.
Addresses no. 1 of #2749.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2597.
Regression from #2304.
Also minimizes the gap between the Cards title and the reorder button.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
1. Fix serving the index.html when "/" (or empty) path is requested
2. Fix allowing files beeing served from special cometvisu config folder
Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
Closes https://github.com/openhab/openhab-webui/issues/2675
HTML escape characters in input widgets were not properly supported,
leading to an escaped character sequence under certain conditions.
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Improves the fixes from #2677, #2511, #2706 and #2710 to only apply to
iOS devices.
Avoids/Fixes regressions with other platforms such as
https://community.openhab.org/t/chart-scrollbar/157828.
Known issues:
- Charts display in popups on iPads are rendered to large.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Regression from #2714.
eval() seems to be required by ECharts: When opening a chart, an CSP
error is thrown that traces back to ECharts, but the chart still
renders.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This new CSP is much more restrictive compared to the old one:
- Don't allow any origin as default
- Don't allow eval() usage
- Don't allow data:, gap:, content: and blob: schemes by default
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This adds support for optionally asking the user for confirmation either
by dialog or by sheet before executing an action.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#2583. Fixes#1591.
This moves model loading code to a new Vuex store module named model.
Model loading is now done by app.vue on init and when an Item change event is received through SSE.
home.vue and home-edit.vue now get the model from the Vuex store instead of loading it.
Add tab components for locations-tab, equipment-tab and properties-tab for easy usage in tabbed pages.
Add card components for oh-.location-card, oh-equipment-card and oh-property-card to standard widget list.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Thomas Wunschel <4302898+wuschi@users.noreply.github.com>
This fixes an issue, where the usage of the code tab of a page marked it
as dirty, even if no change to the page was made.
Please note that for the layout page desinger, the fix however does not
apply on the first time when the code tab of an existing page is opened.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Removes unused code from app.vue and other occurrences. This code would
be a security issue if used and generates security warnings.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
There was an error on code generation in particular when using vars and
string concat blocks (who sometime generate code instead of pure
strings) which is fixed now.
I also gave notifications its individual color to distinguish them
better from other groups.
Follow-up for #2672.
---------
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Note that the new blocks can completely replace the old ones (though
they will not be automatically converted but it must be done manually).
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Stefan Höhn <mail@stefanhoehn.com>
Follow-up for #2511.
I think I finally discovered the root cause for charts not displaying
initially on iOS >= 17.4: The height of the chart was calculated to 0px.
By using 100dvh (dynamic viewport height) and subtracting safe areas
etc. instead of using 100%, I managed to fix this issue.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
add required authentication for some rest endpoints, add some sanity
checks to improve security.
Remove code that has been marked as deprecated.
---------
Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
When not being in edit mode, oh-context did not render at all. Instead,
an error was thrown:
```
[Vue warn]: Cannot set reactive property on undefined, null, or primitive value: undefined
found in
---> <OhContext> at src/components/widgets/system/oh-context.vue
```
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This adds the option to specify a String Item, to which the call status
is sent.
This allows to track the usage of oh-sipclient from rules and scripts.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
When clicking repeatedly on the openHAB logo in the sidebar, the
overview page was opened over and over again because it now resides
under the `/overview` path. By adjusting the href to `/overview`, this
is fixed.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This adds the ability to route through tabbed page by their index,
i.e. 0 for the first tab and so on.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Closes#2644.
This removes the health check entry from the sidebar and the settings
menu and instead uses a floating action button (FAB) to allow access to
the health checks page if there are any actual issues.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
The links to unpin scenes and scripts in the dev toolbar were set to
'rules' instead of the correct specifics, and so, didn't work.
Signed-off-by: Justin Georgi <justin.georgi@gmail.com>
Closes https://github.com/openhab/openhab-webui/issues/2595.
This PR further extends the Blockly capabilities to include more of the persistence extensions.
Specifically enhanced the `oh_get_persistvalue` block:
- Add all `Between` methods of already existing methods
- Add `countSince`, `countUntil` and `countBetween`
- Add `countStateChangesSince`, `countStateChangesUntil` and `countStateChangesBetween`
- Add `getAllStatesSince`, `getAllStatesUntil`, `getAllStatesBetween` returning an Array of timestamp and state pairs
- Add a parameter for return type if relevant (`String`, `Number`, `Quantity`, `Timestamp`).
Added methods to the `oh_get_persistence_lastupdate` block:
- `lastChange`, `nextChange`
Created a new block `oh_delete_persistedvalues` to delete persisted values:
- `deleteAllStatesSince`, `deleteAllStatesUntil`, `deleteAllStatesBetween`
Created a new block `oh_persist` to persist values:
- `currentState`: persists a state at the current time
- `stateAt`: persists a state to a given time
- `stateList`: persists a TimeSeries
---------
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Refs on https://github.com/openhab/openhab-core/pull/4115.
This is the starting point for a UI that shows issues with the users installation,
the first function is broken links.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Arne Seime <arne.seime@gmail.com>
Adds two new features:
- Auto accept calls if they match a configured list of numbers (* for all, 'user', or 'user@host` in a comma delimited list).
- Auto dial a pre-configured number when the client finishes registering (or when the client connects if registration is disabled).
Both can be safely used together.
This allows for features like intercoms, as well as widgets that connect when popped up.
---------
Also-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
Fixes#2621.
Fixes#2593.
This improves performance of the SSE event source event processing for
rule status changes by using a separate object for the rule statuses
(allows O(1) modification) instead of finding the rule in the rules
array (O(n) for linear search) and ignoring RUNNING status.
The RUNNING status can be ignored IMO because rules tend to run such a
short time that you don't see the state shown as RUNNING, so we can use
this "trick" to reduce the amount of processed events.
The rule-status-mixin was updated with short circuit evaluations for the
IDLE status, which is very likely the most processed status, and
therefore reducing the amount of comparisons done.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Fixes#910.
This fixes a silent failure of the analyzer if no items are passed as
query params. In this case, the empty-state-placeholder will be used to
display a "Invalid configuration" banner.
---------
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
This updates the tern defs used for autocompletion to the current
library version included in the add-on (5.2.0).
See https://github.com/openhab/openhab-js/compare/v5.0.0...v5.2.0 for changes.
Last update was in #2563.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
See description in
https://github.com/openhab/openhab-core/pull/4203#issuecomment-2095792756
If a mapping is used to map a value to NULL, it is currently not shown
in an oh_label_item.
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
This exposes the command item logic to native wrappers, like our IOS and
Android clients, so they can control navigation of the app when
receiving push notifications.
See https://github.com/openhab/openhab-android/issues/3193
---------
Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This change makes the SSE event tracking handle ThingUpdatedEvents and
reloads the Things list when such an event is received.
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
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>