* 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>
- Don't include the start time of the next period
- Don't include the first day of the next month in calendars
- Fix weekly aggregate series
- Fix rounding bug when abs(point) >= 1000
Signed-off-by: Yannick Schaus <github@schaus.net>
Split heavy dependencies away from the entrypoint
by using dynamic imports at critical places along with
some cleanup.
Also replace crypto-based `uuidv4()` by `f7.utils.id()`.
This reduces the main app.js by more than 25%
(from >2 MB to around 1.4 MB).
Add npm script to launch the Webpack bundle
analyzer (`npm run webpack-analyzer`) after a
production build.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Unlock administration pages after authorization
* Support PKCE (RFC 7636)
Depends on https://github.com/openhab/openhab-core/pull/1389.
Implements an OAuth2 authorization flow and token storage.
Hides the admin pages & links until the user is signed in
with an administrator role.
Signed-off-by: Yannick Schaus <github@schaus.net>
- Add colored indicator for current section in sidebar
- Filled (colored) navbars by default in Aurora theme
- Fix filled navbar on iOS
- Prevent f7 swipe back on iOS since Safari does it natively
- Improve routes to avoid switching sections, fix navigation
- Close on escape key hit for most popups
- Back link when navigating to a page from another page
- Edit link in page view (ultimately only when authorized...)
- Button to purge cache/service workers in about page
- Deindent block of code with shift-tab in CodeMirror
- Tweak colors in settings menu
- Hide the non-functional sitemaps from the sidebar (for now)
Signed-off-by: Yannick Schaus <github@schaus.net>
Widget infrastructure:
- Add Vuex & move state tracking to store
- Add actions mixin: navigate, open page/widget in modal,
send command, toggle item, open URL...
- Add support for including custom widgets in components
(pages and other widgets)
Config sheet & parameters:
- Add support for page/widget selection
- Add support for props configuration
Developer tools:
- Add menu
- Add widget editor
Code editor:
- Change CodeMirror theme in dark mode
Layout pages:
- Move context menus callbacks from events to context object
- Add Ctrl-R shortcut in design to toggle "run mode" (preview)
- Add ability to add custom widgets to layouts
Widgets:
- System library: add OhButton, OhLink, OhList, OhListItem,
OhPlayerControls, OhStepper, OhSwiper, OhSwiperSlide
- Standard library: improve OhLabelCard, add OhListCard,
OhPlayerCard, OhSliderCard, OhStepperCard, OhToggleCard
Misc:
- Allow Ctrl-S to save in rule editor, pages editors (sitemap,
layout), widget editor in create mode
- Add labels for keyboard shortcuts (in desktop mode only)
Signed-off-by: Yannick Schaus <github@schaus.net>
Mixins for widget components (expression parsing...)
& pages (state tracking with /rest/events/states)
Layout page designer with grid view & masonry + YAML
code editor.
Add layout pages to sidebar
A few basic widgets (to expand)
Widget sandbox in developer tools w/ YAML code view
Add YAML code view to rule editor
Don't save names and descriptions of rule module
if they match the suggestions
Signed-off-by: Yannick Schaus <github@schaus.net>
This adds a new Pages section as discussed in
https://github.com/openhab/openhab-webui/issues/155#issuecomment-586711180
with an editor for "managed" sitemaps stored
as UI components in the system:sitemap namespace.
A code view supporting the current sitemap DSL
is provided.
Sitemaps made with the UI don't support visibility
or color rules yet.
Signed-off-by: Yannick Schaus <github@schaus.net>
Move the Inbox concept, which is closely related to Things,
from the top-level to a level of indirection below the Things list.
Red badges and buttons are displayed to clearly highlight and
navigate to the Inbox when there is something in it.
Additionally, the number of inbox entries (auto-discovered things)
for a given binding is displayed in the "choose binding" page when
adding a thing.
Signed-off-by: Yannick Schaus <github@schaus.net>
Add information on how to start when there's nothing
to display on a page - a common UX pattern which helps
users figure out what they need to do.
https://uxdesign.cc/writing-empty-states-3e0279f39066https://material.io/design/communication/empty-states.html
Fix search in rules screens.
Adjust positions of lists across screens.
Detect when the rules engine is not installed and display
a message accordingly.
Signed-off-by: Yannick Schaus <github@schaus.net>
Shortcut to install new bindings when adding a thing
Inbox listens to SSE and refreshes automatically
Refresh constantly the discovery results when scanning
Fix search in manual thing type selection
Improve look & feel of add-on screens and sheet
Signed-off-by: Yannick Schaus <github@schaus.net>
After adding things after a series of pages, f7's router will sometimes
act up and display a backdrop on the main view and then freeze the UI,
only a page refresh would get it working back again.
These changes seem to help at least in these cases.
Signed-off-by: Yannick Schaus <github@schaus.net>
Fix a flaw in the channel list rendering
where a dynamically provided channel was
not appearing unless its type was extensible.
It was previously assumed that all
non-extensible channel types would appear
in the thing type's "channelGroups" or
"channels" property.
Some bindings have ChannelTypeProviders
which will define thing-specific channels
along with channel types which don't
appear on the thing type object. Example:
the "input" channel of the yamahareceiver
binding's zone thing.
The channel-list component now has a
mandatory "channelTypes" prop which must
be provided by the parent component. This
prop should contain an array of channel types
that can appear for the thing. It should be
retrieved using the /rest/channel-types API
call, eventually using the "prefixes" filter;
providing channel types prefixed by "system"
or the binding id should be enough.
This PR thus depends on:
https://github.com/openhab/openhab-core/pull/1340).
More filters were also added to relevant places.
In the "add equipment/points from thing"
screens, the prefix of the name suggestions
for the Point items will now be the name of the
parent Equipment if available (instead of the
normalized thing's label).
Signed-off-by: Yannick Schaus <github@schaus.net>
Actions are displayed as list buttons instead of FAB on large screens
Clear the selection in the tree by clicking in the blank area
Other minor fixes
Signed-off-by: Yannick Schaus <github@schaus.net>
* Cosmetic changes, handle static files in UIService
Restore the serving of static files through the UIService
(the Jetty handler doesn't seem to take precedence).
Add missing images for Basic UI and CometVisu,
cleanup temporary screenshot images.
Add description and author info for the Cordova app.
Rename "default UI" to "main UI".
Add version info in webapp initialization.
Adjust HABPanel dependencies.
Update README.md and CONTRIBUTING.md files.
Signed-off-by: Yannick Schaus <github@schaus.net>
This add the UI in its current state of development,
the intent is to test the integration in the distro
early. The other apps are listed on the home page by
calling the new REST endpoint introduced in
https://github.com/openhab/openhab-core/pull/1329
The onboarding wizard implementation is not complete
so it isn't possible to select a startup package with
the UI yet. The wizard steps will be discussed in a
separate issue; it should however be possible to install
addons as needed from the settings screen.
Signed-off-by: Yannick Schaus <github@schaus.net>
* Remove all dependencies to the dashboard UI
Migrate all dashboard tiles to the core tile functionality
(https://github.com/openhab/openhab-core/pull/1329)
Signed-off-by: Yannick Schaus <github@schaus.net>
Fixes all SAT errors in resources and tests reported by SAT 0.8.0-SNAPSHOT.
Related to: openhab/static-code-analysis#363
Signed-off-by: Wouter Born <github@maindrain.net>
Include a new complete Japanese translation (thanks to koui), and partial translations and fixes in Afrikaans, Arabic, Bulgarian, Korean, Lithuanian, Ukrainian.
Signed-off-by: Yannick Schaus <github@schaus.net>
This change broadcasts the 'openhab-update' event immediately, not waiting for
the result of the /rest/items request, if the items are already populated, when
OHService.reloadItems() is called. This improves the dashboard switching latency
significantly at the expanse of reliability - some widgets (e.g. slider) might
'flicker' slighly.
Signed-off-by: Yannick Schaus <github@schaus.net>
Discourse now seems to use relative "short URLs" redirects (`/uploads/short-url/...`) instead of linking to the absolute URL of the attachment on S3 (for new posts only, those created before are not affected).
Signed-off-by: Yannick Schaus <github@schaus.net>
After adding the nullness annotations to the automation the type
argument for the base module handler must be a non nullable one.
To apply the non-null annotation to the given type argument we mark the
whole class as non null by default.
Related to: https://github.com/openhab/openhab-core/pull/910
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
* fix iconset feature by using new groupId
* Fix SAT configuration
* fix further group IDs
Also-by: Wouter Born <github@maindrain.net>
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
* Add required JAXB dependencies for Java 11 in POMs and features
* Upgrade p2-maven-plugin
* Update .travis.yml to require succesful Java 11 builds
Signed-off-by: Wouter Born <github@maindrain.net>