This message was deleted.
# extensions
a
This message was deleted.
w
got it! Found the formatters!
s
I wish all questions were like this one. If the existing range of formatters don't quite cover your use case having custom ones within your extension might work. Let us know either way
w
I do believe the custom formatter worked when we tried it, but I'll of course follow up with more questions when we have them
One thing I've been fishing for is deeper guidance on accessing data from the existing data stores. We have the docs for custom stores (and I think a previous thread in here), but as far as effectively grabbing k8s objects could be helpful. (we're also digging through the epinio/other extensions for those patterns)
s
https://rancher.github.io/dashboard/code-base-works/api-resources-and-schemas
Vuex Stores
will have a large overview of the different stores and how to access resources via them. As long as your extension is in the Cluster Explorer area you should be able to fetch k8s stuff via the
cluster
store. Very roughly dispatching
find
actions will go out and fetch resources (if not found) and return
models
of them...
this.$store.dispatch('cluster/find', { type: WORKLOAD_TYPES.JOB, id: relationship.toId })
. using a getter will just fetch what's in the store already
this.$store.getters['cluster/all'](WORKLOAD_TYPES,JOB)
.
Epinio (mostly) has it's own weird and wonderful store to support it's own api and resource types. Harvester has a pseudo cluster store which should operate like the
cluster
store. You might have more luck that side with the elemental or kube warden extensions
w
ah beautiful
I think i was looking for that in the Stores section haha