RSC-Labs / backstage-highlights-plugin

Backstage Highlights Plugin is configurable and customizable plugin for viewing the most important information about your entity.
Mozilla Public License 2.0
5 stars 1 forks source link

getting 500 for catalog services that are not `Kind: services` #9

Closed nia-potato closed 1 month ago

nia-potato commented 1 month ago

Hi @radoslaw-sz , im back again :)

We have alot of custom Kind types, such as k8s-clusters, domains, or this even applies to location kinds, im assuming i am getting a 500 from the highlighs plugin because it cannot resolve the entity yaml file since it is not binded with gitlab/github annotation by default whatsoever.

Do you know how to prevent the highlights plugin from showing up if it is not a Kind: Service ? i know you dont have bandwith for this, so feel free to lmk where you would change to achieve this, and i can submit the PR.

Screenshot 2024-07-18 at 14 28 47

radoslaw-sz commented 1 month ago

hi @nia-potato - what about using EntitySwitch.Case? Example: https://github.com/backstage/backstage/blob/master/packages/app/src/components/catalog/EntityPage.tsx#L181. You can check if kind is X, and then decide whether show highlights.

nia-potato commented 1 month ago

that fixed it. thanks