Commit Graph

309 Commits (55068a68b137c920c27c703ee66af25b1bb86be2)

Author SHA1 Message Date
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
Wouter Born 2dec14c257 Upgrade to SAT 0.9.0 (#176)
Signed-off-by: Wouter Born <github@maindrain.net>
2020-01-18 09:31:49 +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
Kai Kreuzer 7614869023 removed dashboard feature from ui add-ons (#164)
Signed-off-by: Kai Kreuzer <kai@openhab.org>
2020-01-03 11:30:01 +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
Wouter Born 368c4fc2e3 Reuse jaxb feature (#150)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-12-29 12:32:45 +01:00
Wouter Born 7a9ac42a42 Update SAT currentVersionRegex for 3.0.0 (#151)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-12-29 12:31:37 +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
Wouter Born c13c0055e7 Upgrade bnd to 4.3.0 (#140)
For bnd 4.3.0 release notes, see:

https://github.com/bndtools/bnd/wiki/Changes-in-4.3.0

Also note:

    The Bnd Maven plugins are now marked thread safe and can be used with -T.

It seems to work well so far as long as the features are build after the bundles so I've added the bundles BOM as dependency to the features POM.
We still need to make SAT thread safe (openhab/static-code-analysis#200).

When disabling SAT you can build using one thread per processor core by executing:

    mvn clean install -DskipChecks -T 1C

This significantly speeds up Maven builds and puts all your processor cores to good use. :-)

Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-11 20:01:29 +01:00
Wouter Born 556d6ff261 Upgrade to Karaf 4.2.7 (#139)
For Karaf 4.2.7 release notes, see:

https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12311140&version=12345539

Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-10 17:03:01 +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 bd9b5db691 Update to SAT 0.8.0 (#137)
Signed-off-by: Wouter Born <github@maindrain.net>
2019-11-03 22:38:24 +01:00