-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An extension cannot reliably ask Lens to activate a cluster #1759
Comments
@Nokel81 and @jim-docker FYI |
Can you set Store.clusterStore.activeClusterId in an extension in 4.0.0? I get
|
Seems to be working OK: https://github.com/Mirantis/lens-extension-cc/blob/master/src/cc/store/ClusterActionsProvider.js#L356 I haven't noticed that -- but maybe that's a TypeScript error? I'm running JS in this case. https://github.com/lensapp/lens/blob/master/src/extensions/stores/cluster-store.ts#L20-L29 shows there's a getter and a setter, so not sure why you'd have trouble. Just doing that alone isn't "enough" for me, though. Still have to call |
Ah, I was using rc version of the extensions api, builds with 4.0.2, as you know :) |
I have a branch (https://github.com/lensapp/lens/tree/issue-1759) with my changes. I'll be putting up a PR tomorrow some time. |
@Nokel81 Reminder about ^^^ 🙂 |
@stefcameron thanks for the reminder, I was on PTO. There is a few items I want to clean up before making that change directly. |
After some hacking, this seems to work, although it doesn't always work (not sure why):
I noticed that
clusterStore
does not provide asetActive(clusterId)
similar toworkspaceStore.setActive(wsId)
where the latter, when called, activates the workspace AND switches to it.On the surface, it would be seem logical to have
clusterStore.setActive(clusterId)
, and when called, Lens activates the cluster AND switches the view to it.Note that today, just doing
Store.clusterStore.activeClusterId = clusterId
will only activate (or at least, seem to) the cluster (by putting a white square behind its icon in the left sidebar, like what happens when you click the icon), however it does NOT also navigate to that cluster.The text was updated successfully, but these errors were encountered: