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

UI for health checks #2420

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

UI for health checks #2420

wants to merge 2 commits into from

Conversation

seime
Copy link
Contributor

@seime seime commented Feb 27, 2024

Starting point for a UI that shows issues with the users installation.

First out is broken links.

Depends on openhab/openhab-core#4115

Signed-off-by: Arne Seime <arne.seime@gmail.com>
@seime seime requested a review from a team as a code owner February 27, 2024 19:05
Copy link

relativeci bot commented Feb 27, 2024

Job #1890: Bundle Size — 10.56MiB (+0.06%).

f886cd0(current) vs 4a0054a main#1889(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  Change 3 changes Regression 1 regression
                 Current
Job #1890
     Baseline
Job #1889
Regression  Initial JS 1.86MiB(+0.05%) 1.86MiB
No change  Initial CSS 607.87KiB 607.87KiB
Change  Cache Invalidation 24.52% 18.3%
No change  Chunks 223 223
No change  Assets 246 246
Change  Modules 2867(+0.21%) 2861
No change  Duplicate Modules 141 141
No change  Duplicate Code 1.73% 1.73%
No change  Packages 95 95
No change  Duplicate Packages 2 2
Bundle size by type  Change 1 change Regression 1 regression
                 Current
Job #1890
     Baseline
Job #1889
Regression  JS 8.75MiB (+0.07%) 8.75MiB
Not changed  CSS 890.07KiB 890.07KiB
Not changed  Fonts 526.1KiB 526.1KiB
Not changed  Media 295.6KiB 295.6KiB
Not changed  IMG 140.74KiB 140.74KiB
Not changed  HTML 1.24KiB 1.24KiB
Not changed  Other 871B 871B

View job #1890 reportView seime:health_checks branch activityView project dashboard

@florian-h05 florian-h05 added enhancement New feature or request main ui Main UI awaiting other PR Depends on another PR labels Feb 28, 2024
@florian-h05 florian-h05 removed the awaiting other PR Depends on another PR label Mar 24, 2024
@ghys
Copy link
Member

ghys commented Mar 30, 2024

Thanks @seime - I had the same thoughts a few years ago.
My conclusion was that as most issues can be identified on the server, they should then be collected and processed on the server, not the client.

In practice you'd have perhaps a /rest/issues/scan API call which will run code on the server that will identify issues like:

  • orphan links (missing item or channel)
  • items with invalid parent group names
  • expressions in Pages or config props referencing unknown items
  • etc.

then you could get some details about the issue (/rest/issues/1234), its resolution options ('Remove Group1 from Item1 definition', 'Dismiss this issue for now', 'Ignore/delete this issue') and execute a resolution (/rest/issues/1234/resolve).

It would be up to server code in a Java class to detect, report, store (in a registry), prevent duplicates, and eventually resolve a particular kind of issue. That is, every kind of issue would have its own class able to detect it, report it, offer options to solve it, and exercise one of these options.

And with OSGi we would be able to introduce and inject new types of issues - ie. an OH binding could run its own diagnostics and insert its own issues.

@seime
Copy link
Contributor Author

seime commented Mar 30, 2024

Yes, there is plenty to do in this space, and I was thinking a bit of the same. Actually started on a separate rest endpoint, but then reverted it.

WDYT about starting small and improve and refactor over time - opposed to crafting a whole new set of backend features just to get started?

@seime
Copy link
Contributor Author

seime commented Apr 16, 2024

@ghys ☝️

@florian-h05
Copy link
Contributor

@ghys Can you please comment on

WDYT about starting small and improve and refactor over time - opposed to crafting a whole new set of backend features just to get started?

and let me know if you are fine with this in general, so I can review it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request main ui Main UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants