Commit Graph

1535 Commits (eb41bdca8a1f82e5f8d9595465282e543dba6ef5)

Author SHA1 Message Date
Wouter Born 3ca51b0e35
Migrate to JUnit 5 (#300)
* 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>
2020-08-09 16:44:02 +02:00
Yannick Schaus a32668a652
Fix HABPanel REST resource not registered (#289)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-08-09 14:34:22 +02:00
Yannick Schaus 70b3b9f750
[Main UI] Include bridgeID in thingUID on manual creation (#298)
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_r426005622

Fixes #290.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-08-08 19:44:21 +02:00
Wouter Born 7453955770
Migrate to OpenAPI 3 annotations (#299)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-08-02 16:14:55 +02:00
Yannick Schaus 3c597f5ed7
Embed Swagger UI as a developer tool in the main UI (#297)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-07-24 22:40:47 +02:00
Kai Kreuzer 25f7d6c47c
adapted wording from extension to add-on (#295)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-07-23 17:17:11 +02:00
Yannick Schaus 04505bb876
[restdocs] Upgrade Swagger UI to 3.30.0 (#296)
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>
2020-07-22 17:57:18 +02:00
Kai Kreuzer 961bd65f68
Updates Swagger UI to version 3.28.0 (#294)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-07-21 20:32:55 +02:00
Yannick Schaus 899a8fdcf9
Fix item type not trimmed in lexer (#282)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-07-01 19:52:33 +02:00
Yannick Schaus 2d8dda50c9
Add oh-knob widget to system library (#288)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-07-01 19:50:57 +02:00
Yannick Schaus 8b4169eff7
Use distinct endpoint to save thing configuration (#287)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-06-22 20:35:08 +01:00
Chris Jackson 0732bb8f9d
Remove tag incorrectly added in previous PR (#284)
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
2020-06-22 12:55:29 +02:00
Chris Jackson 74be454d15
Fix conditional display of sections on settings page (#280)
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
2020-06-20 23:06:41 +02:00
Chris Jackson 58def6bc5d
Don't allow adding new bindings if not supported by server (#281)
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
2020-06-20 14:02:57 +02:00
Chris Jackson 82b36714e3
Fix duplicate thing state being printed (#279)
Signed-off-by: Chris Jackson <chris@cd-jackson.com>
2020-06-18 10:30:14 +02:00
Yannick Schaus 57ac4ab0dd
Fix points names in Add Points to Model scenario (#278)
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>
2020-06-17 20:12:37 +02:00
Yannick Schaus a41d91f926
Fix desktop HABot interim results regression (#277)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-06-17 13:30:50 +02:00
Yannick Schaus 23ba7caaf1
Config parameter options shown inline if 5 or less (#276)
Fix parameter not saved when unset & absent from payload on save.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-06-17 13:30:30 +02:00
Yannick Schaus 238a0aecee
Add Items from Thing: use model picker for parent group (#275)
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>
2020-06-17 13:30:07 +02:00
Dan Cunningham 98ab3be96b
Main UI Fix for selecting multiple items in the inbox (#273)
Signed-off-by: digitaldan <dan@digitaldan.com>
2020-06-16 18:13:14 +02:00
Yannick Schaus 2cf8d8cedf
Main UI HABot client on home page (#271)
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>
2020-06-15 22:18:42 +02:00
Yannick Schaus 19178a1386
Standard list item widgets; default widget logic for list display (#270)
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>
2020-06-10 22:56:31 +02:00
Yannick Schaus b0bdefe5b5
Misc style fixes (#265)
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>
2020-05-27 11:54:59 +02:00
Dan Cunningham e2da5cc16e
Auto selects the color default color scheme based on the system preference (#263)
Signed-off-by: digitaldan <dan@digitaldan.com>
2020-05-25 22:15:54 +02:00
Yannick Schaus 344fd6cd03
Conditional visibility fixes for widgets (#256)
- 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>
2020-05-25 11:59:21 +02:00
Yannick Schaus f50d480560
Add HomeKit metadata editor (#261)
Link to relevant docs on the supported third-party integrations using metadata

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-05-25 11:58:41 +02:00
Yannick Schaus 90ff071a72
REST docs: use the redirect URI as client ID (#257)
Depends on https://github.com/openhab/openhab-core/pull/1496

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-05-25 11:58:09 +02:00
Wouter Born 3513dadeb1
Fix ConfigurableService deprecations (#262)
Related to: openhab/openhab-core#1491

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-24 00:55:38 +02:00
Wouter Born 4d6a11ffcb
Add more null annotatons (#260)
Adds null annotations to:

* Default UI
* Basic UI
* HomeBuilder
* REST Docs
* Tiles

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-23 11:20:02 +02:00
Wouter Born 764925b0d3
Use constructor injection and update null annotations (#258)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-22 08:30:16 +02:00
Yannick Schaus 551fd92f46
Move the login hint in the sidebar (#255)
* 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>
2020-05-18 16:42:35 +02:00
lolodomo 32ca168e7f [basicui] Fix for selection widget when no mapping (#253)
Relative to #247

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2020-05-17 21:52:43 +02:00
Yannick Schaus cae84cf2c1
Refactor page editors, conditional visibility (#248)
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>
2020-05-17 17:51:30 +02:00
Yannick Schaus 66d73e32c4
Better support for non-editable rules (#243)
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>
2020-05-17 17:50:12 +02:00
Yannick Schaus 3527aaba86
Fix router issues when page animations are disabled (#252)
- 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>
2020-05-17 17:49:07 +02:00
Wouter Born 46962a874a
Add null annotations to REST resources (#249)
- Remove unused language headers from HABotResource
- Remove redundant this references in HABotResource

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-17 17:47:48 +02:00
Wouter Born aa05fab9d2
Migrate to JAX-RS Whiteboard (#242)
* Update REST Docs feature dependency
* Annotate habot for whiteboard
* Fix default UI classpath, fix null context ID warning
* Annotate cometvisu for whiteboard

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-15 14:03:44 +02:00
Yannick Schaus e624727564
Rewrite the Analyzer tool using oh-chart-page (#234)
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>
2020-05-12 19:51:36 +02:00
Wouter Born 937cf2456c
Infra improvements (#240)
* Update to SAT 0.10.0
* Add sortpom-maven-plugin configuration
* Sort POMs
* Add spotless-maven-plugin configuration
* Apply Spotless changes

Signed-off-by: Wouter Born <github@maindrain.net>
2020-05-08 21:33:24 +02:00
Tobias Bräutigam 5f72e38409
[cometvisu] adding rest api for cometvisu manager (#231)
Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
2020-05-08 20:39:16 +02:00
Yannick Schaus 6d12fe94fe
Display layout page as overview (#235)
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>
2020-04-27 09:16:55 +02:00
Yannick Schaus 8a41670ca4
nearley items parser: avoid recognizing item types in names (#237)
Fixes #233.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-04-27 09:08:09 +02:00
Yannick Schaus 82f2934f4d
Some improvements to rule editing, misc fixes (#232)
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>
2020-04-19 23:12:53 +02:00
Dan Cunningham aefda74919
avoid rendering markers on every view change (#228)
Signed-off-by: digitaldan <dan@digitaldan.com>
2020-04-19 20:56:13 +02:00
Yannick Schaus d5ad2bd5c1
Color picker control (#229)
Make toggle controls compatible with Color items/HSB values

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-04-19 00:47:06 +02:00
Yannick Schaus 6e003b410c
Items: metadata & group management, improve default rendering (#226)
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>
2020-04-18 19:18:02 +02:00
Yannick Schaus 9130557a24
Set the dev server API proxy target with an env variable (#222)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-04-18 19:10:32 +02:00
Christoph Weitkamp a06c7666f4
[ui] Adapted list of dimensions (#223)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-18 19:10:06 +02:00
Yannick Schaus 909226e272
Fix various chart range boundaries problems (#221)
- 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>
2020-04-15 19:07:15 +02:00
Christoph Weitkamp cb3a07b159
Use command options for rendering Switch and Selection elements (#217) (#220)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-04-14 22:40:06 +02:00
Yannick Schaus ca080036f3
Chart pages (#206)
Also-by: Dan Cunningham <dan@digitaldan.com>
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-04-13 00:25:24 +02:00
Wouter Born 54d7297039
Add null annotations to SubscriptionProvider (#214)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-04-12 16:51:18 +02:00
Yannick Schaus 73f743ae12
Fix rule creation bug (#213)
Introduced by #207 (wrong path param name).

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-04-07 08:47:28 +02:00
Dan Cunningham 99a29633ad
Allows markers to be visible at both min and max zoom levels. (#209)
Signed-off-by: digitaldan <dan@digitaldan.com>
2020-04-06 22:53:08 +02:00
Yannick Schaus b4df833899
Do not display empty channel group headers (#210)
Following discussion on https://github.com/openhab/openhab-core/issues/1402

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-04-04 21:38:22 +02:00
Dan Cunningham 723e55c162
Add zoom visibility property for floor plan markers (#208)
Additional zoom visibility property to markers to show/hide based on current zoom level.

Signed-off-by: digitaldan <dan@digitaldan.com>
2020-03-31 02:26:19 +02:00
Dan Cunningham e88b4ea95c
Adds ability to disable moving or zooming a floor plan. (#204)
Signed-off-by: digitaldan <dan@digitaldan.com>
2020-03-27 02:39:19 +01:00
Yannick Schaus 921ca198eb
Optimize webpack bundling (#207)
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>
2020-03-27 02:37:18 +01:00
Dan Cunningham 03d08e1df6
Add static path to proxy list to allow images and other assets through (#203)
Signed-off-by: digitaldan <dan@digitaldan.com>
2020-03-26 17:21:07 +01:00
Yannick Schaus f6a2feee49
OAuth2, hide administration pages until authorized (#200)
* 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>
2020-03-25 16:41:35 +01:00
Yannick Schaus 6804a55780
Use latest node & npm versions (#202)
* Use latest node & npm versions
* Fix the Basic UI build
* Upgrade frontend-maven-plugin, node-sass (HomeBuilder)

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-25 08:11:57 +01:00
Yannick Schaus 9ae7cdf3ef
Add floorplan pages (#199)
Fix location parameter map pickup
Fix attribution links on maps
Fix popover modals on map icons
Fix about page refresh/purge cache feature
Fix designers context menus cut off at bottom of page

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-06 22:40:09 +01:00
Yannick Schaus b9f2f3ddd3
New page types: tabs, maps; misc. fixes (#198)
Upgrade to Framework7 5.4.5
Add leaflet/vue2-leaflet dependencies

Widgets & pages:
- Add OhTabsPage, OhMapPage, OhTab,
  OhMapMarker, OhMapCircleMarker
- Add support for tabbed pages in modals
- Add theme, themeOptions, device, JSON
  to expression evaluation context

Page designers:
- Add rudimentary designers for tabs, map pages
  (to refactor)
- Import designer components dynamically
  (split into individual webpack chunks)
- Fix masonry menus z-index issues in editor (hopefully)

Config parameters:
- Add map picker for location contexts

Code editor:
- Add indent guides

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-05 18:59:42 +01:00
Yannick Schaus bcd161e774
Add some colors, improve navigation (#197)
- 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>
2020-03-03 13:12:10 +01:00
Yannick Schaus 726fc91b34
Masonry CSS fix (#196)
For some reason this doesn't translate correctly in production mode

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-03-02 12:04:41 +01:00
Yannick Schaus fa6c724974
Improvements in layout pages & other areas (#195)
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>
2020-03-02 01:44:49 +01:00
Yannick Schaus 67122c5a1c
Infrastructure for widgets, layout pages (#194)
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>
2020-02-27 00:03:54 +01:00
Yannick Schaus d7ae6036af
New Pages section & sitemap editor (#192)
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>
2020-02-23 21:28:18 +01:00
dependabot[bot] c332164944 Bump eslint in /bundles/org.openhab.ui.habpanel/web (#158)
Bumps [eslint](https://github.com/eslint/eslint) from 3.19.0 to 4.18.2.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v3.19.0...v4.18.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-02-09 15:16:06 +01:00
dependabot[bot] 15cf13e5bb
Bump axios from 0.17.1 to 0.18.1 in /bundles/org.openhab.ui.habot/web (#159)
Bumps [axios](https://github.com/axios/axios) from 0.17.1 to 0.18.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.18.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.17.1...v0.18.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-02-09 15:13:57 +01:00
Yannick Schaus 5223812bc1
Merge Inbox into the Things section (#190)
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>
2020-02-05 08:38:00 +01:00
Yannick Schaus ba7bc37051
Empty state placeholders (#188)
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-3e0279f39066
https://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>
2020-01-31 12:42:11 +01:00
Yannick Schaus 2e2356922a Fix add-on sheet step toggle links
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-01-30 10:49:55 +01:00
Yannick Schaus 2207b95217 Fix add-ons searchbar
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-01-30 10:49:55 +01:00
Yannick Schaus 7e165560b2 Add-on sheet details improvements
Clean up old add-on popup leftover.

Signed-off-by: Yannick Schaus <github@schaus.net>
2020-01-30 10:49:55 +01:00
Yannick Schaus 49c55b68ca Add binding configuration page & link
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-01-30 10:49:55 +01:00
Yannick Schaus 0ab0a0b691 Improve thing addition and add-ons management
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>
2020-01-30 10:49:55 +01:00
Yannick Schaus 2a03c40f9e
Try to fix routing bug after thing creation (#186)
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>
2020-01-29 10:57:48 +01:00
Yannick Schaus aa75037d9a Improve channel list logic (#185)
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>
2020-01-27 18:21:36 +01:00
Yannick Schaus 257c1a0c39 Minor cosmetic changes to the model builder (#183)
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>
2020-01-25 20:54:46 +01:00
Yannick Schaus cfb0ef67ee Restore HABPanel service config (#182)
Signed-off-by: Yannick Schaus <github@schaus.net>
2020-01-24 19:24:20 +01:00
Wouter Born aede657ec0 Remove dashboard leftovers (#181)
* Remove dashboard leftover
* Remove dashboard from CODEOWNERS file

Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-24 08:40:55 +01:00
Yannick Schaus bd52584b3e Cosmetic changes, handle static files in UIService (#180)
* 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>
2020-01-21 00:07:58 +01:00
Kai Kreuzer 0999145c81 removed dashboard as it has been replaced by new standard UI (#179)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-01-20 00:12:03 +01:00
Yannick Schaus ad27a717ed Add default UI bundle (#178)
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>
2020-01-19 17:20:17 +01:00
Yannick Schaus 81b1cc5aea Remove all dependencies to the dashboard UI (#175)
* 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>
2020-01-18 09:32:33 +01:00
Christoph Weitkamp 739987de03 Moved ESH-INF folders to OH-INF folders (#174)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2020-01-17 15:29:49 +01:00
Wouter Born e4460f5500 Switch to Java 11 and drop Java 8 support (#160)
* Switch to Java 11 and drop Java 8 support

Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-12 22:33:58 +01:00
Kai Kreuzer baadca6f15 fixed bundle symbolic name for HABPanel (#166)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-01-03 11:30:15 +01:00
Wouter Born 553c4b4deb Update copyright headers to 2020 (#161)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-01 18:04:49 +01:00
Kai Kreuzer 0a8ca96d6d
refactored namespace to org.openhab (#157)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-12-29 18:09:25 +01:00
Kai Kreuzer 0d51db2b54
Removed Paper UI, Classic UI and HABmin (#154)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2019-12-29 12:31:13 +01:00
jenkins 30dfe0d9ee [unleash-maven-plugin] Preparation for next development cycle. 2019-12-15 18:52:07 +00:00
Christoph Weitkamp 6ada19c3d0 Fixed font size for group value (#149)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-11-29 17:25:40 +01:00
lolodomo e1c150bfe1 [basicui] Implement color management for setpoint widgets (#147)
Fix openhab/openhab-core#1234

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-11-26 08:18:01 +01:00
Yannick Schaus 6d752a30f9 [habot] avoid feeding null or empty attributes to the trainer (#141)
Signed-off-by: Yannick Schaus <github@schaus.net>
2019-11-19 20:20:32 +01:00
dependabot[bot] 9cdfdda52e Bump bower from 1.8.4 to 1.8.8 in /bundles/org.openhab.ui.habmin (#135)
Bumps [bower](https://github.com/bower/bower) from 1.8.4 to 1.8.8.
- [Release notes](https://github.com/bower/bower/releases)
- [Changelog](https://github.com/bower/bower/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bower/bower/compare/v1.8.4...v1.8.8)

Signed-off-by: dependabot[bot] <support@github.com>
2019-11-07 17:22:55 +01:00
Wouter Born c101937616 Update sitemap model imports (#138)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-07 17:22:10 +01:00
Wouter Born c1b83e3b46 Fix SAT errors in resources and tests (#136)
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>
2019-11-03 11:53:16 +01:00
Wouter Born a0ef10303b Fix build by adding null annotations (#134)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-27 17:35:05 +01:00
Wouter Born a45c187018 Use SAT 0.7.0, fix errors and feature file warning (#131)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-21 22:39:10 +02:00
Yannick Schaus a6b978f170 [habpanel] Port over translations from Crowdin (#82)
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>
2019-10-16 12:39:09 +02:00
Christoph Weitkamp fca2365008 Changed pid from 'org.eclipse.smarthome.core.i18nprovider' to 'org.eclipse.smarthome.i18n' (#127)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-16 08:57:31 +02:00
Yannick Schaus c09ce6ef4f [habpanel] Filter out unnecessary SSE events (#128)
This should help improve the performance for large installations,
or when the event bus is busy.

Signed-off-by: Yannick Schaus <github@schaus.net>
2019-10-16 08:45:38 +02:00
Yannick Schaus 33307aa446 [habpanel] Send early update events (#129)
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>
2019-10-16 08:45:05 +02:00
Christoph Weitkamp bb1f8e6a44 Fixed POM XML Shema Definition path (#125)
Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-10-12 10:21:28 +02:00
Hilbrand Bouwkamp 2802fff739 Updated schema location from smarthome -> openHAB (#124)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
2019-10-11 02:25:08 -07:00
Yannick Schaus 45614b2a27 [habpanel] Update dependencies, 5-col selection widget fix (#106) (#116)
Also-by: Alari Truuts <Alariii@gmail.com>
Signed-off-by: Yannick Schaus <github@schaus.net>
2019-09-05 17:58:50 +02:00
Yannick Schaus ac54f10ea6 [habpanel] Widget gallery: handle short attachment urls (#115)
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>
2019-09-04 20:43:10 +02:00
curlyel bfce718042 Providing modified icons for <motion> (#112)
Providing modified icons for <motion> suitable for both, bright _dark_ themes.

Signed-off-by: curlyel <curlyel@t-online.de>
2019-09-03 21:07:16 +02:00
lolodomo 4b69dcc9da [classicui] Remove iconType configuration setting (#113)
Icon type is now SVG by default.
Customized icons, even in only PNG format, are still handled.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-09-03 21:06:34 +02:00
lolodomo 742fc0b96d [basicui] Remove iconType configuration setting (#114)
Icon type is now SVG by default.
Customized icons, even in only PNG format, are still handled.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-09-03 21:06:13 +02:00
lolodomo c5b3049ef7 [ClassicUI] Render switch element with slide switch for switch item with state options (#95)
Signed-off-by: Laurent Garnioer <lg.hc@free.fr>
2019-08-23 08:20:08 +02:00
lolodomo ec52cb0eaa [BasicUI] Render switch element with slide switch for switch item with state options (#94)
Signed-off-by: Laurent Garnier <lg.hc]@free.fr>
2019-08-23 08:19:49 +02:00
lolodomo 835d6dad6d [BasicUI] Ignore too big item state when updating widget icon (#98)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-22 20:54:26 +02:00
lolodomo 747cd4758b [ClassicUI] mapview: handle UNDEF state (#102)
Signed-off-by : Laurent Garnier <lg.hc@free.fr>
2019-08-22 20:53:34 +02:00
lolodomo 81aab7ddeb [BasicUI] mapview : handle refresh and UNDEF state (#101)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-22 20:52:07 +02:00
lolodomo dab87c9f31 [BasicUI] Fix dynamic update of frame visibility (#103)
Fix #92

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-22 20:30:26 +02:00
lolodomo a21a658aae [ClassicUI] Move WEB images in the expected directory (#100)
Fix #99

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
2019-08-16 18:11:59 +02:00
Markus Rathgeb b351043063 use bnd annotations to not interfere with derived props (#90)
Fixes: https://github.com/openhab/openhab-webui/issues/89

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-08-01 09:08:00 +03:00
Markus Rathgeb aaab65d8bf HABot: fix nullness (#85)
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>
2019-07-10 11:19:16 +02:00
Christoph Weitkamp 914f213520 [paper] Add kind to dynamically created channels (#84)
- Add kind to dynamically created channels

Fixes https://github.com/openhab/openhab2-addons/issues/5410

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
2019-07-03 13:33:39 +02:00
Wouter Born 732eb92418 [paper] Sort serial port parameter options (#80)
When you have many serial ports its easier to find them in a sorted list.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-14 09:44:53 +02:00
Wouter Born f3ba1429a9 Adapt POMs to follow common layout (#72)
* Update features GAV
* Update project names

Signed-off-by: Wouter Born <github@maindrain.net>
2019-06-05 21:58:11 +02:00
Yannick Schaus dcf9eb5c2b [habot] Suppress verbose messages during training (#74)
Signed-off-by: Yannick Schaus <github@schaus.net>
2019-05-29 14:00:13 +02:00
Luciano bbf8724abb [habot] Italian Translation (#61)
Signed-off-by: Luciano Legovich <llegovich@yahoo.it>
2019-05-29 01:22:55 +02:00
Wouter Born 98d8b0a3bd [paper] Hide command options for read only items (#68)
Hides the command options (added in https://github.com/eclipse/smarthome/pull/5131) for controls of read only items.

Signed-off-by: Wouter Born <github@maindrain.net>
2019-05-27 16:03:19 +02:00
Markus Rathgeb 4ee9f0540a fix code for new storage service handling (#63)
Related to: https://github.com/openhab/openhab-core/pull/787

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-02 21:34:57 +02:00
Markus Rathgeb 28c86adeeb fix nullness constraint violations (#64)
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-05-02 21:34:03 +02:00
Markus Rathgeb 1a36cd4915 add (wrongly) ignored directory to Basic UI resources (#58)
Fixes: https://github.com/openhab/openhab-webui/issues/57

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-15 23:26:33 +02:00
Markus Rathgeb 557e4fae4e Paper UI: restore customization support (#54)
Fixes: https://github.com/openhab/openhab-webui/issues/53

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-11 21:25:56 +02:00
Markus Rathgeb dc1480397b fix some group IDs (#52)
* 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>
2019-04-11 10:27:35 +02:00
Wouter Born 2878a59cea Fix Java 11 build (#41)
* 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>
2019-04-05 15:29:17 +02:00
Markus Rathgeb c404650cd7 fix groupId of inter reactor dependency
Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-05 15:28:46 +02:00
Markus Rathgeb 249e33b2f8 improve Maven + Bnd layout and settings (#44)
https://github.com/openhab/openhab-webui/issues/38

Signed-off-by: Markus Rathgeb <maggu2810@gmail.com>
2019-04-05 08:28:49 +02:00