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

[Bug] Custom Target is no longer deletable from topology view #1251

Closed tthvo closed 5 months ago

tthvo commented 5 months ago

Current Behavior

image

There are no delete button for custom targets.

Expected Behavior

Custom Target should be deletable from topology view through quick action menu.

Steps To Reproduce

Environment

- OS: Fedora
- Environment: Local smoketest with `docker-compose`.

Anything else?

The same behaviour when deploying on k8s.

andrewazores commented 5 months ago

Probably related to/same as https://github.com/cryostatio/cryostat3/issues/406

tthvo commented 5 months ago

Oh actually, I am seeing that the front-end expects the custom target to have nodeType to be CustomTarget according to its allowList:

https://github.com/cryostatio/cryostat-web/blob/2e0357d39fef152c3f8dab320c35e865b41a6032/src/app/Topology/Actions/utils.tsx#L114

Currently, for cryostat3, the custom target has nodeType JVM. Should it be CustomTarget instead like previously?

andrewazores commented 5 months ago

Ah, I see.

I think that's an OK fix in the short term, but longer term I would rather it use the JVM nodeType and have the front-end determine which nodes are deletable some other way. Maybe by checking the REALM annotation?

tthvo commented 5 months ago

I think that's an OK fix in the short term, but longer term I would rather it use the JVM nodeType and have the front-end determine which nodes are deletable some other way. Maybe by checking the REALM annotation?

Yeah, check for REALM annotation sounds good to me! I can help see if there can be a quick change on the front-end...