Pre-fill config parameters controls with the default
value if provided in the config description.
Display thing configuration parameter status info.
Fixes#285.
Fixes#293.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Migrates all tests to the JUnit 5 Jupiter API
* Updates bnd to 5.1.2
* Updates maven-surefire-plugin to 3.0.0-M5
* Removes org.openhab.core.boot POM dependencies
Signed-off-by: Wouter Born <github@maindrain.net>
This will include the ID of the bridge in the ThingUID if it is specified during the
manual creation of the thing.
The thingUID format will therefore be
`binding:thingType:bridgeID:thingID` if a
bridge is specified during the creation,
otherwise it will be `binding:thingType:thingID`.
This is consistent with the naming convention
adopted when creating things by other means
(files, inbox).
Note that the thingUID is immutable once the thing has been created, so the
bridge ID part will be false or missing when
the bridge is altered or assigned after the
creation.
Relying on the thingUID to determine the bridge
should be discouraged.
See https://github.com/openhab/openhab-addons/pull/7496#discussion_r426005622Fixes#290.
Signed-off-by: Yannick Schaus <github@schaus.net>
This release introduces syntax highlighting of the
JSON examples and payloads.
Enable option to sort operations and tags alphabetically.
Enable option to display a filter box.
Fix OAuth2 redirect URL.
Replace o2c.html contents with current version from upstream.
Remove swagger-ui.js (not required if using swagger-ui-bundle.js).
Signed-off-by: Yannick Schaus <github@schaus.net>
Fix a bug introduced with #275 when points being added to the model without an
equipment would not have their default name properly computed.
Signed-off-by: Yannick Schaus <github@schaus.net>
Use a treeview-based semantic picker to select a parent
location or equipment group item when using the
Add Equipment to Model or Add Points to Model functions
in a Thing's Channels tab.
Replaces the current flat list of group items.
Add functionality to the model picker popup to support this
use case and adjust some texts and controls on the page.
Signed-off-by: Yannick Schaus <github@schaus.net>
This implementation transforms certain cards issued
by HABot for its own GUI to compatible equivalents.
It will not try to transform cards saved on HABot's
"card deck"/CardRegistry because they may have been
modified and compatiblity cannot be guaranteed.
The main UI's client calls /rest/habot/chat with a
`?useCardRegistry=false` option which has to be added
to the API to prevent saved cards from being reused.
This will be done in a separate PR.
The chat input box appears on the home page only if
the "habot" endpoint is present, by calling the root
/rest early to determine the version of the API and
its links (it's stored in the Vuex store for the
remainder of the session for easy access). It's also
possible to disable the feature on a per-device basis
with an option on the about page.
The 5 most recent unique queries will be retained for
quick recalling (also per-device, stored in the local
storage).
For charts, it simply opens the Analyzer window since
since image-related support in widgets is not yet done.
(altered the analyzer to be able to open it with a
predefined initial period).
The "create rule" skill featured in the HABot app with
its dedicated card is not supported.
Refactor OH access layer, add speech interface
Only a browser-based implementation
of speech recognition with
window.webkitSpeechRecognition is
implemented for now, the API is subject
to change.
Dynamic settings menu & sidebar depending on the available endpoints
Reload endpoints after an addon install/uninstall to refresh the UI
(this will allow e.g. service configuration menus and the HABot input box to
appear or disappear without reloading the page)
Signed-off-by: Yannick Schaus <github@schaus.net>
Add list items widgets:
- oh-label-item
- oh-toggle-item
- oh-slider-item
- oh-rollershutter-item
- oh-player-item
- oh-stepper-item
- oh-colorpicker-item
Most config options are forwarded to the system
widget displayed on the "after" slot, which may also be
defined in the widgets' definitions.
Move default standalone widget logic to dedicated JS file.
Default list widget logic.
Change the label of the standard library's card widgets.
Add standard list widgets to listWidget metadata editor
picker; add preview sheet.
Misc fixes in global app styles, analyzer.
Let the user choose the list item widget to add in an oh-list.
"Add from Model..." option in new widget action sheets.
Add a model treeview popup to add default widgets (standalone or list)
easily to a layout (block column or masonry) or a list, simply by
browsing the semantic model and picking items.
Other renames and file structure reorganizations.
Add a new action to show group members in a popup, using their
default list representation. Make it the default action for Group items,
for both standalone and list widgets.
Make semantic cards on the home page functional:
Use the default list widgets to render items in the card.
(order not considered for now, but visible and visibleTo
configured in the listWidget metadata might work to filter
out items based on an expression/the current user's roles?)
Remove warning messages.
Make cards (and headers) a little bit thinner.
Signed-off-by: Yannick Schaus <github@schaus.net>
Better filled bars defaults
Add per-device option to set the home page background
to the standard color (i.e. gray in light mode, no effect
in dark mode)
Consider safe area (fullscreen iOS) for map, plans, charts
Convert CSS remains to stylus, cleanups, fixes
Add page transition effect option for navigation
widget actions
(https://framework7.io/docs/view.html#custom-page-transitions)
Restyle theme/dark mode pickers
Signed-off-by: Yannick Schaus <github@schaus.net>
- Move visible computed property to widget-mixin
- Fix bug when visible is undefined but visibleTo is not
- Add conditional visibility evaluation for layout widgets (block, row, col)
- Move sidebar account controls to fixed slot (Hopefully prevents some glitches in iOS Safari.)
Signed-off-by: Yannick Schaus <github@schaus.net>
* Move the login hint in the sidebar
Displayed only when there are no pages - if there are, it means the admin
user already found the button.
Closes#254.
Change some label texts & empty overview icon.
Make the whole logo area clickable.
Display an indicator when there are no pages to display on the sidebar.
Signed-off-by: Yannick Schaus <github@schaus.net>
Move duplicated code in page editors and modals
to mixins.
Move the general page settings form to a common
component.
This also introduces two new common config parameters:
- `visibleTo` allows to restrict the visibility of
pages or widgets to certain users or roles. It
accepts an array with strings like:
`["user:user1", "role:administrator"]`
Multiple entries are "OR"ed - the component will be
displayed if any matches.
If the parameter is not present, the component
is visible by default (even to unauthenticated users).
This parameter is available to widgets which accept
expressions in their configuration (typically in
layout pages).
- `visible` allows to restrict the visibility of
a widget based on the result of the evaluation of an
expression. For example:
`visible: "=items.Item1.state == 'ON'"`
This allows to build dynamic pages e.g. by setting
this property on blocks, grid rows or columns, or
individual widgets which will appear or disappear
typically based on the state of an item.
This property is not evaluated for top-level pages or
widgets that don't support expressions (charts etc.).
Note that these only restrict the visibility and are not
to be considered as security measures.
Allow to specify `visibleTo` as a general page setting.
Contact-style pages list, allow to group by type
Add visibleTo indication and sidebar order badges
Add pages counter to settings menu
Remove highlight on segmented button controls
(rollershutter, player controls)
Minor lists layout fixes
Move widget config & code editors to components
Restore config sheets on plan & chart page editors
Signed-off-by: Yannick Schaus <github@schaus.net>
Depends on https://github.com/openhab/openhab-core/pull/1451.
Change the rules list to a "contacts" list with initials in
headers and a list index.
Add a lock icon to denote rules which cannot be edited with the
rule editor.
Strip all editing features in the rule editor when the rule is
not editable.
Move the module title/description suggestions to a mixin and add
the new group member triggers.
Fix bug, look & feel in tag editor.
Signed-off-by: Yannick Schaus <github@schaus.net>
- Fix router issues when page animations are disabled
- Change some texts and fix some issues on the about page.
- Remove debug leftover
Signed-off-by: Yannick Schaus <github@schaus.net>
- Remove unused language headers from HABotResource
- Remove redundant this references in HABotResource
Signed-off-by: Wouter Born <github@maindrain.net>
Leverage the chart component used in pages to
provide an interactive persistence analysis
for arbitrary items, including Numbers, Switches,
Contacts and others (and eventually save the
resulting chart as a page).
WIP: better tooltips (to complete in subsequent PRs
for other types of series).
Add trend lines to default quantifiable numbers cards.
Fix state trackers not properly closed:
The number of state tracker connections would increase when returning to
the thing details page from a link details page.
Also make sure there's only 1 state tracker SSE connection at a given
time - close them before opening a new one.
Decrease the level of most log messages to debug.
Add no-gap to oh-grid-row
Upgrade Framework7 to 5.7.2.
Remove old analyzer components
Add analyze to widget actions
Fix item parameter in multiple mode
No state preview for items being created in model
Better mobile flow when creating new items in tree view pages
Add analyze button for Dimmers
Signed-off-by: Yannick Schaus <github@schaus.net>
Move the UI tiles back to the right panel, and display
a placeholder in the home page's overview tab until a
layout page with an ID of "overview" has been created.
This is (normally?) temporary until a specially-designed
overview page has been implemented - discussion on
https://github.com/openhab/openhab-webui/issues/155).
Various styling fixes & clean up.
Move the onboarding cards to separate component
(not used for now).
Don't display the Back button in a page view if it's shown
on the sidebar.
Layout pages: switch the "add widget" action sheet from
grid to simple list with groups, headers and cancel button.
Signed-off-by: Yannick Schaus <github@schaus.net>
Remove the ability to close script editors with the ESC key
Save the code being edited when saving the rule (for instance
with Ctrl-S/Cmd-S)
Add Ctrl-R/Cmd-R keyboard shortcut to run the rule
Fix player controls & add oh-player-card as default for Player items
Don't display the title/track part of the player card until items
are set; otherwise only display the playback controls
Add the ability (unstable/not documented for now) to use standard
widgets in modals
Fix modal config not being considered in popover
Fix default slider control min/max bounds using stateDescription
auth: check the token validity when the app becomes visible again
and renew it if necessary
Remove test card widget
Fix rule module reordering
Signed-off-by: Yannick Schaus <github@schaus.net>
Add the ability to edit metadata from the items details page
and the semantic model page:
- Provide interactive forms for the alexa, ga, synonyms, widget,
listwidget, stateDescription, commandDescription namespaces
- Fallback to YAML view for other namespaces (or in a tab for
supported namespaces as an alternative).
Add "options" widget action to open an action sheet with a list
of command options.
Add default representation for items: look in the widget for
a preconfigured widget (custom or from the standard library),
or try to build a default live representation of the item's state
(WIP), considering its type, state/command descriptions and
other properties.
Change the "current state" part of the items details & link edit
pages with the default representation.
Add a convenient way to add or remove members to/from a group item.
Real-time state display to model and thing details pages
Add rollershutter system control and card to standard library
Add default state representation and metadata editing to
the items details pane in the model page
Misc fixes, improve mobile-friendliness of model page
Harmonize actions below cards, fix homepage hamburger menu
Signed-off-by: Yannick Schaus <github@schaus.net>