polar icon indicating copy to clipboard operation
polar copied to clipboard

Feat/persistent-docker-network

Open amovfx opened this issue 2 years ago • 9 comments

-NewNetwork now has an input to create/attach to an external docker network -NetworkActions now has a modal for the user to create/attach/clear to an external docker network.

Closes #(issue number goes here) https://github.com/jamaljsr/polar/issues/525

Description

Allows for polar to attach or create an external docker network.

Steps to Test

  1. Create a new network.

  2. Fill out the Docker External Network field

  3. Check the docker-compose file or docker network ls

  4. In a current network, go to docker options in the hamburger menu of NetworkActions.

  5. In the modal, name your docker network. Hit okay

  6. Check the docker-compose file or docker network ls.

A status icon is also visible.

amovfx avatar Jun 09 '23 18:06 amovfx

ANd just a heads up, this is a prototype, I dont have any tests or anything written yet.

amovfx avatar Jun 09 '23 18:06 amovfx

Apologies for the delay in reviewing this. I've been traveling. I'll test this out and provide feedback by the end of the week. Thanks for tackling this issue.

jamaljsr avatar Jun 14 '23 15:06 jamaljsr

Hey, @jamaljsr could I get a quick review on its current roughed in ui? I'm worried it might be going out of scope.

Questions: Should new network have the ability to create or attach a docker network. While remaining unattached and having used this feature already on my current project, this is something I like.

Screenshot 2023-09-17 at 5 47 38 PM

Is this badge a good idea? Screenshot 2023-09-17 at 5 47 57 PM

Docker options, I think this is appropriate place for them while providing a place extend docker features. Screenshot 2023-09-17 at 5 49 44 PM

Screenshot 2023-09-17 at 5 50 01 PM

amovfx avatar Sep 18 '23 00:09 amovfx

Hey @amovfx thanks for the updates. I'll take a look at this in the next few days.

jamaljsr avatar Sep 19 '23 20:09 jamaljsr

I have tested the functionality. Great job querying for the list of existing networks. That's a great touch 👌

I do have some suggestions for improvement:

  1. When creating a new network, we should hide the external network field under a collapsible Advanced Options section. Since 99% of users will never use this, I don't think it should be front and center.
  2. I'm not a fan of the badge next to the network name. These messages would look better as alerts on the canvas, similar to this
    image
  3. Adding the Docker Options item to the dropdown menu is great placement. I would just suggest to put it above the Delete option. It's better UX to have delete at the bottom.
  4. I created a new Polar network and specified an existing docker network. Afterwards, I went to the Docker Options modal but the network I chose was not pre-filled in the dropdown.

jamaljsr avatar Sep 23 '23 15:09 jamaljsr

Awesome feedback. Will make these adjustments asap. Thanks.

amovfx avatar Sep 25 '23 21:09 amovfx

Made these changes if you want to give them a look over and give the thumbs up. I'm going start doing a code review and a git squash. This one got pretty hairy so I'll probably need quite a bit of feedback on the review to bring it up to spec.

amovfx avatar Sep 26 '23 22:09 amovfx

Hey @jamaljsr, Looking forward to your review.

I think this is the start of docker functionality. I have a couple branches of this PR to prototype some behavior that is helping my project that is interacting with docker more. Right now docker service actions are being called from the network store. This has me wondering if a store/model/docker.ts is going to be required.

amovfx avatar Sep 27 '23 23:09 amovfx

Hi @amovfx do you plan on continuing to work on this PR?

kelvinator07 avatar Jun 26 '24 13:06 kelvinator07