Skip to content
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

[rest] Allow skipping ignored things in inbox #4108

Merged
merged 4 commits into from Mar 15, 2024

Conversation

seime
Copy link
Contributor

@seime seime commented Feb 23, 2024

This PR adds a default filter to skip ignored inbox items.
Most of the calls from MainUI uses inbox data only to show the number of non-ignored inbox items. On any decent sized installation, the inbox contains hundreds of ignored items that currently is being transferred.

Only when an optional request parameter is passed, the ignored entires are returned.

This PR will be followed by a companion PR in the MainUI repo shortly.

@J-N-K
Copy link
Member

J-N-K commented Mar 10, 2024

In general that sounds like a good idea, but wouldn't it make sense to have the default true to keep backward compatibility?

@seime
Copy link
Contributor Author

seime commented Mar 10, 2024

Maybe, but of the about 4 places in MainUI it was being used, only 1 usage needed the ignored ones.

I'm not aware of any other places that utilize this API other than MainUI, but obviosly I cannot be sure. Are you aware of any?

@J-N-K
Copy link
Member

J-N-K commented Mar 10, 2024

I'm not sure if 3rd party services (like HABApp) use these parts of the API. But in general we should avoid unnecessary breaking changes.

@spacemanspiff2007
Copy link
Contributor

spacemanspiff2007 commented Mar 10, 2024

Thanks for thinking about the HABApp users.
Currently we do not use the thing inbox, only the available things.
So we would be unaffected by these changes.

Signed-off-by: Arne Seime <arne.seime@gmail.com>
Signed-off-by: Arne Seime <arne.seime@gmail.com>
Signed-off-by: Arne Seime <arne.seime@gmail.com>
@seime seime force-pushed the skip_ignored_things_in_inbox branch from 7f3abd9 to 180e4a3 Compare March 10, 2024 19:16
Signed-off-by: Arne Seime <arne.seime@gmail.com>
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@J-N-K J-N-K added the enhancement An enhancement or new feature of the Core label Mar 15, 2024
@J-N-K J-N-K added this to the 4.2 milestone Mar 15, 2024
@J-N-K J-N-K merged commit 137cc5e into openhab:main Mar 15, 2024
3 checks passed
@J-N-K J-N-K changed the title [rest] Skip ignored things in inbox by default [rest] Allow skipping ignored things in inbox Mar 15, 2024
florian-h05 pushed a commit to openhab/openhab-webui that referenced this pull request Mar 18, 2024
Depends on openhab/openhab-core#4108.

In most places, the inbox content is loaded only to show a count of items in inbox.
For any decent size systems the inbox may contain hundreds of entries that are ignored,
which equates to lots of unnecessary data being transferred and processed in the browser.

---------

Signed-off-by: Arne Seime <arne.seime@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants