-
-
Notifications
You must be signed in to change notification settings - Fork 257
Main UI: Visualize semantic model tree in item details screen #3227
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
base: main
Are you sure you want to change the base?
Conversation
#3232 Bundle Size — 11.33MiB (+0.39%).aefbbf3(current) vs 204ca25 main#3231(baseline) Warning Bundle contains 2 duplicate packages – View duplicate packages Bundle metrics
Bundle size by type
Bundle analysis report Branch mherwege:sub_model Project dashboard Generated by RelativeCI Documentation Report issue |
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Signed-off-by: Mark Herwege <[email protected]>
Absolutely a concern, as you've identified :)
I'm not sure we can rely only on the fact that the data retrieved repeatedly would be cached to say "it's all okay". |
So what are the options then?
Any other suggestions? |
Please don't ragequit, it's a good feature, I just struggle how to implement it correctly :) I have understood recently that you can't rely on client caches only.
It could work but it's a very specific API, will it have an use outside of that screen? |
That’s not at all what I meant. I am much less experienced then you though, and I don’t see an easy solution.
There actually already is a very specific one I believe is mostly there for this screen: get all children (recursive), including the dynamic data. It could be extended to get the parents as well. I was already looking into that, also because there still is a mismatch. On the item screen, the direct children have a state (from that API), but not the parents. I get these trough the model static data request, so without state. |
Signed-off-by: Mark Herwege <[email protected]>
@ghys With the last commit, I now use an adjusted REST API to only retrieve the item model information. Therefore this requires openhab/openhab-core#4861 |
Closes #3217
This is not ready for merging as it heavily relies on #3165, #3178 and #3223. All the code from these PR's is included in this one, so it is fully functional. It should be rebased once the other PR's have been reviewed.
This PR extends the item details screen to show part of the model the item is in, from the top, down to all its children. The tree is opened up to the level of the item. Clicking on a level in the tree, will take you to the related item.
With this PR, the terminology discussion from #3211 becomes less critical as the terminology is replaced by a graphical representation of the model with all information in it.
Below is how it looks like.
Note the Parent Group and Child Group sections will contain all semantic and non-semantic direct parent and child groups.
A concern may be this is introducing a load of the full model for each item. The REST API call only retrieves static data, therefore I believe it is cached and should not continuously pass the full payload over the network. In my tests with over 1000 items, I didn't see a strong negative performance impact, but it may depend on the system. An improvement could be to move the filtering to OH core with an extra REST parameter. However, this will also make caching less relevant.