weave-gitops
weave-gitops copied to clipboard
Add listObjects, make sources table use it
This means that the list view and the detail view for sources is driven by the same code. To make it happen, I had to:
- Add type directly as a property. My hacks to transform KindKustomization to Kustomization using a spread operator came back to haunt me when this made the object be not-the-right-object. But we can just add it on the object.
- Make
sourceRef
actually return undefined when it's not set. We actually use?.
intentionally here and I was breaking it. - Add UIDs - they're needed by #2649.
listObjects
is really just copied from one of the many existing list
methods, and then changed to use the same type converter as
getObject.
This means that to add new kind
s - e.g. for notifications - the only backend change we should need is to put them in core/server/primarykinds.go
and listing, getting, and getting events should all work.