cryostatio / cryostat-web

Web front-end for Cryostat: Secure JDK Flight Recorder management for containerized JVMs
https://cryostat.io/
Other
10 stars 20 forks source link

[Story] Automated Rules view for evaluating matchExpressions and indicating matched targets #376

Open andrewazores opened 2 years ago

andrewazores commented 2 years ago

Parent https://github.com/cryostatio/cryostat-web/issues/435

andrewazores commented 2 years ago

Conceptually, something like the OpenShift Console developer topology view. The application graph nodes would highlight in different colours or otherwise indicate whether they match the entered matchExpression. Pushing to 2.2.0.

andrewazores commented 1 year ago

Pushed to 2.3.0.

tthvo commented 1 year ago

@andrewazores just came across this. How is this idea fitting the current topology view in #891?

andrewazores commented 1 year ago

I think this will probably get pushed back again, to 2.4.0 .

Basically, if there is some visualization of the discovered targets, then there should also be a way to display that visualization that somehow highlights or filters targets by ones that are matched by a given matchExpression. In a Topology view that could look like highlighting the matches or fading out the non-matches. In a list view that could be reordering the elements so that all the matches are at the top, and all the non-matches are at the bottom and faded/disabled.

With that, it should then be possible to update this visualization dynamically as the given matchExpression changes. So if I have a blank matchExpression then every target is faded. If I type true, every target is highlighted.

This would be used in views like the Automated Rules or Stored Credentials creation forms, to help users to tailor a matchExpression to the subset of targets that make sense for their usecase. There could be an additional section in the UI that contains this target visualization and dynamically updates as the expression is modified.

Specifically for the Topology view that you are working on, I think some minimized version of that topology graph could be the visualization I'm describing above. The minimized version would not need to be interactable at all - no way to add new targets, no way to view full resources details for a target, etc. Just simply the discovery view rendering as a visual aid component and the only additional details for a target being the ones that can be matched by the expression, ie the alias, connection URL, annotations/labels, and JVM hash ID.

tthvo commented 1 year ago

Just a question about template select in Rule create form here: Looks like we are fetching templates for the selected target. But when moving to a "topology graph view" of the target, users will be seeing many target of the same time. Should we get the common templates among targets the match expression matches?

Screenshot from 2023-03-16 14-54-48

andrewazores commented 1 year ago

That sounds like it makes sense, just do a set intersection.