hawtio / hawtio-next

Next generation Hawtio UI console
https://hawt.io
Apache License 2.0
7 stars 22 forks source link

Navigation doesn't work properly in the plugins involves Tree #903

Open mmelko opened 5 months ago

mmelko commented 5 months ago

This might be caused by resolution of the path, where selected mbeans aren't included into the path, so i.e source of the route1 is translated to [host]/hawtio/camel/source. So when we paste this link to the browser we are automatically redirected to the root of the camel plugin with the context table.

Similar behaviour when we selected different mbean of the same type. Instead of perceive the selected tab it's automatically redirected to the first tab.

tadayosi commented 5 months ago

@mmelko Look at how Hawtio v2 did for the persistent navigation. I remember it used query parameters such as ?nid= for keeping the current mbean location. That said, I don't think using query params is a good design in 2024. So the first thing we should do would be to design how we encode the path location into URL. Do you have any ideas?

tadayosi commented 5 months ago

I wouldn't say it's a bug so let me change it to enhancement.

mmelko commented 5 months ago

Sure, I marked is a bug because the functionality is lacking compared to v2.

My idea from top of my head is to use path param and mbean names (i.e [host]/hawtio/camel/source/routes) That would require extending either current context or create new with something like searchNode and then obtain the objectName.

tadayosi commented 5 months ago

@mmelko Hmm, then how do we encode the selected node into the path? Should we still use a query parameter for the node selection?

mmelko commented 5 months ago

so bad example .. routes would be the name of the mbean (not the object name). so for route1 the path would look like [host]/hawtio/camel/source/route1 That's how I'd like to see it.