This message was deleted.
# extensions
a
This message was deleted.
s
You might be interested in
Global Settings
Banners
and
Branding
pages (login image is in the latter)
From Rancher 2.9.0 you can also customise the log in page via writing a Rancher UI Extension
👀 1
m
Thank you, I'll take a look!
Hi @stocky-account-63046 I remember before that rancher has a documentation on how to use the store calls like management/findAll etc, but on the new documentation its gone.. do you have any idea where I can have cheatsheet for this or something? what I'm trying to do is to check if the user has access on some clusters or Fleet etc..
s
Our end goal is to have a nice typed API that extensions can use to access store and other dashboard functionality, however until then basic Vuex actions and getters can be used.
Unfortunately a lot of the documentation we had on those were internal facing, however made public. That's been corrected. There's is now a gap in docs for this kind of thing
in the short term... actions/getters are prefixed with stores •
management
- upstream cluster •
norman
- upstream cluster (old api, should be avoided) •
cluster
- current downstream cluster (this will change when navigating between downstream clusters) dispatching actions like
find
and
findAll
will check the store for the resource, if not found will go out and fetch, in both cases these async actions will return resource/s. using getters like
byId
and
all
will just return the individual or collection for the type requested. if it's not in the store it will return undefined (i think, or osme kind of falsy)
you should be able to find examples of how we use them in rancher/dashboard by searching things like
cluster/byId
or
management/findall
(that's not a great response, but we hope to improve soon)
m
hi Richard, thanks for your reponse! what I did to check if the user has access to a certain parts like FLEET, is by calling
management/schemaFor
using store getters.. e.g.
this.$store.getters['management/schemaFor'](FLEET.GIT_REPO)
s
that's correct! the ui will do the same. if a user cannot see the schema they cannot fetch the resource