formulahendry / vscode-docker-explorer

Docker Explorer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.docker-explorer
MIT License
48 stars 20 forks source link

Refresh container list after making a status change #15

Closed aharpervc closed 7 years ago

aharpervc commented 7 years ago

Fixes #12

aharpervc commented 7 years ago

Pretty sure this is all that is needed?

formulahendry commented 7 years ago

@aharpervc Executor.runInTerminal() is an async function, so this change will not take effect.

aharpervc commented 7 years ago

I see. What's the fix?

formulahendry commented 7 years ago

There need more code refactoring without using runInTerminal. One option is using child_process.execSync API. One thing I am curious is that why you would like disable the auto-refresh. Is there any side effect of it? With the auto-refresh, we don't need to refresh container after any operation is done. 😄

aharpervc commented 7 years ago

I often keep "Docker for Win/Mac" turned off, so this creates problems with the cli tool can't talk to that service. Also I run quite a few instances of VS Code so that's a lot of notices and failing processes spawning all the time. Plus, I don't often change container state except when developing inside of VS Code, so it's not like the auto refresh would tell me about something I didn't just do manually. But since the UI doesn't refresh after taking a manual action with this extension, I have to manually click refresh every time.

formulahendry commented 7 years ago

Thanks @aharpervc for the detailed info. In that case, it seems that the only side effect of auto-refresh is that it will show error message for each VS Code instance. Therefore, a quick turnaround is to provide an option to allow user to let extension not show the error message. What's your thought about this?

aharpervc commented 7 years ago

Sure, that would help. You'd also have processes needlessly running and dying in the background unceasingly, but that's probably not that big of a deal.

formulahendry commented 7 years ago

16 is opened. Closing this PR. Would you like to send a new PR to implement #16 or let me implement that?

aharpervc commented 7 years ago

I have no idea how notifications work, so go for it.