-
-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new settings menu for persistence #2229
Conversation
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
Job #1337: Bundle Size — 15.84MiB (+0.52%).Important Bundle introduced 1 and removed 1 duplicate package – View changed duplicate packages Warning Bundle introduced 13 new packages: @jsep-plugin/regex, @jsep-plugin/arrow, @jsep-plugin/object and 10 more – View changed packages Bundle metrics
Bundle size by type
View job #1337 report View mherwege:settings branch activity |
While I second your PR, I disagree on not removing the existing persistence link. As both are shown, it is a little bit irritating, which one to use. Therefore I vote to remove the old link under system settings. |
@hmerk Fine with removing it from the systems settings menu if nobody else objects. What about the link at the top of the persistence add-on? |
If it is easier to access via your new menu, it could be removed as well. |
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
I think it is easy to access from the new menu, but I also think it still has its place in the add-on configuration screen. Configuring persistence kind of falls in between configuring an add-on and a system wide configuration. And I rather have 2 places with the option, so a user finds it where they are looking for it. Therefore I changed the link to a button there, making it more obvious. |
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Good to give the persistence configuration more visibility.
I have changed a few things:
- Remove space between transformations and persistence setting entries. The space above the transformations is meant to separate 1st- from 2nd-level configuration.
- Update the empty state placeholder wording.
- Use a redirect link for the documentation button. This way we can easily adjust where this button links to without having to change the code.
- Fix dirty check (alert when unsaved changed on leave) not working.
- Minor code refactoring in the load method. From my POV there is no catch required as no 404 should occur because the
org.openhab.persistence
service should always be available. - Align the style to general MainUI styling & Replace the plus button with an "add" list entry or a new button on the empty state placeholder:
Thanks. |
Persistence policies can be configured from the UI. However, it is difficult to find, and one needs to know where to look. Apart from a documentation issue, I think persistence is core enough to merrit its own entry in the settings, so it becomes more prominent.
See for example here: https://community.openhab.org/t/after-reboot-string-values-are-empty/152064/16
This adds a persistence entry below transformations to the settings menu.
The new persistence config page allows to set the default persistence, and links to defining the policies for each installed persistence add-on.
There also is a "add" list entry to install more persistence add-ons.
If none is installed, it will explain persistence and link to the docs and the add-on store.
The default persistence settings has been removed from the system settings, and the link to the persistence policy config from the add-on settings page has been converted to a button.