Skip to content
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

Merge containers individually instead of all containers in a host #3716

Closed
garikkh opened this issue Mar 20, 2025 · 9 comments
Closed

Merge containers individually instead of all containers in a host #3716

garikkh opened this issue Mar 20, 2025 · 9 comments
Labels
enhancement New feature or request

Comments

@garikkh
Copy link
Contributor

garikkh commented Mar 20, 2025

Describe the feature you would like to see

Currently when connected to a host (or when using docker compose) you are able to merge all containers as part of that system. You can't however only merge a subset. If your system has for example 10 containers, but you only want to watch logs for 4 of them, you have 2 options: either have a merged view with all logs and a lot of bloat, or have 4 columns, which makes reading long logs hard.

Describe how you would like to see this feature implemented

It would be nice to have an icon on the sidebar next to each container to add to a "merged" set, and add/remove containers as needed.

I spent some time working on this myself, and have a basic POC in this video. I can continue working and fixing some edge cases/have a PR, but wanted to know if this is something that should be added.

2025-03-20.16-12-40.mp4

Describe any alternatives you've considered

No response

@garikkh garikkh added the enhancement New feature or request label Mar 20, 2025
@amir20
Copy link
Owner

amir20 commented Mar 20, 2025

You can "pin" containers and have a merged view.

Image

That does work, but I agree that it might not be intuitive. If you just want to be able join a subset then I think this option is good enough.

I think the intent is valuable and I would agree it would be nice addition. If you are willing to think about the UI and make something more intuitive then I am open to it.

For me, I don't think it would make sense to be part of the menu. Adding a lot of icons to the menu makes it confusing. I have noticed adding a lot of options in the left make it confusing for people to onboard. And also, joining containers might not be a common use case.

I propose you add an option to the drop down on the top right to add more containers to the current stream. I think it makes sense to choose the first container, then append other containers to it by making an explicit action. You can probably some how reuse the search dialog to search for other containers. Plus use some keyboard actions to make it very fast.

Finally, I can't see how you are implementing it. But you should care about the URL. When joining containers, the URL should become https://<URL>/merged/123,456,789. This way, if the browser is refreshed or the URL is shared, then the same containers are viewed. I would make sure that is done correctly.

@garikkh
Copy link
Contributor Author

garikkh commented Mar 20, 2025

You can "pin" containers and have a merged view.

This may sound silly but how do you pin containers?

I think the intent is valuable and I would agree it would be nice addition. If you are willing to think about the UI and make something more intuitive then I am open to it.

Overall I see your concerns on UI - I will experiment and try to find a good approach, since I don't know if I like the idea of adding it on the top right. How do you feel about having a context menu on the sidebar, that way you could right click and see text instead of just icons.

Finally, I can't see how you are implementing it. But you should care about the URL. When joining containers, the URL should become https:///merged/123,456,789. This way, if the browser is refreshed or the URL is shared, then the same containers are viewed. I would make sure that is done correctly.

Yeah, I noticed this URL, so that was my goal - but since my current design was highly reactive (sidebar icons change when added), I ended up doing both URL + a new store for merged container IDs. This was slightly buggy, but I liked it because I could save the URL and keep reopening merged views

@amir20
Copy link
Owner

amir20 commented Mar 20, 2025

I'll respond to your comment later. But for now...

Yeah, I noticed this URL, so that was my goal - but since my current design was highly reactive (sidebar icons change when added), I ended up doing both URL + a new store for merged container IDs. This was slightly buggy, but I liked it because I could save the URL and keep reopening merged views

That seems complicated if you are creating a store. You should just be able to change the URL and then keep adding containers. Then update the merged routes to watch the IDs and act properly.

@garikkh
Copy link
Contributor Author

garikkh commented Mar 21, 2025

This may sound silly but how do you pin containers?

I realized how to do this now... Not very intuitive but actually works very well for my use case.

I can still work on adding this merge functionality - see my comment above for context menu, it might even make sense to add the favorite action here too since I never noticed the star before.

@amir20
Copy link
Owner

amir20 commented Mar 21, 2025

I realized how to do this now... Not very intuitive but actually works very well for my use case.

Perhaps, making it more intuitive is time well spent.

On context menu: I do like it more than adding more icons because it's not in everybody's way. However, creating a right click solution in web is an anti-pattern. It's not very mobile friendly. Instead, maybe you can use a vertical 3 dot, similar to this. Then all options could be moved there.

Image

@amir20
Copy link
Owner

amir20 commented Mar 21, 2025

In fact, the options could be:

  • Pin
  • Add as vertical panel
  • Add to current stream

@amir20
Copy link
Owner

amir20 commented Mar 24, 2025

@garikkh do you plan to still work on this?

@garikkh
Copy link
Contributor Author

garikkh commented Mar 24, 2025

I don't have a lot of availability right now - this might be something I can look at next week, but I like the idea and would appreciate it on my setup

@amir20
Copy link
Owner

amir20 commented Mar 24, 2025

I spent some time working on this myself, and have a basic POC in this video. I can continue working and fixing some edge cases/have a PR, but wanted to know if this is something that should be added.

Sounded like you had something working? If so it shouldn't be too much work.

Since I won't be working on it personally, I'll close.

@amir20 amir20 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants