Closed leomindez closed 1 year ago
@rlamana
I would like to know if that is the right way to implement the command. I was wondering how to add the listener to get the status value. Could you give me some clues about it?
@leomindez For the listener part, the status command executes and dies, there is no watcher parameter or similar. We need to include some sort of polling to keep the status updated. You have an example of that when refreshing the current Okteto context here: https://github.com/okteto/docker-desktop-extension/blob/main/client/src/contexts/Okteto.context.tsx#L95
My suggestion is to call the API function you created from the contexts/Okteto.context.tsx
file, just like with the example above. That should keep the state updated for the react component to consume, instead of calling the API directly from the component.
Closing this PR in favor of https://github.com/okteto/docker-desktop-extension/pull/81
74
Add status command to listen the changes and display view to notify user
@rlamana