Container control buttons
⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules: https://github.com/louislam/dockge/blob/master/CONTRIBUTING.md
Tick the checkbox if you understand [x]:
- [x] I have read and understand the pull request rules.
Description
New Feature - Control of individual containers for starting, stopping, and restarting.
Fixes #(issue) Fixes having to restart or stop and start the entire stack when you just want to do one container
Type of change
- User interface (UI)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update (only to change a screenshot so the service buttons are shown)
Checklist
- [x] My code follows the style guidelines of this project
- [x] I ran ESLint and other linters for modified files (I didn't run it but the minor modifications kept to already used patterns and practices)
- [x] I have performed a self-review of my own code and tested it
- [x] I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
- [x] My changes generate no new warnings
- [ ] My code needed automated testing. I have added them (this is optional task)
Screenshots (if any)
I didn't have any of the errors coming up in the checks when i built it or when i ran the built docker container on my end. Most all of those errors appear to be code I did not modify so I'm not sure if that is relevant to these modifications.
Waiting for this!
@louislam why we don't merge this pr?
@louislam please merge this, this feature is the only feature I think is missing from dockge
Waiting for this to be in the Image.
@Chathula, @M3BAID I was curious about this being merged too...however, if you haven't forked and merged this yourself and curious to see controls, feel free to pull from my fork...I merged a bunch of PRs that looked interesting or at least the ones I was interested in...
Could this please be merged? This is a very much required feature that will really make dockge stand out.
I tried this when merged on my fork, and seem to have no effect on the containers ...
@Triskae not sure if anything changed as there has been some version changes to a lot of packages and I have not updated and tested my dockge docker build as I spent far longer than i'd like to admit getting it to build on my test system at the time. I did put a docker image up on docker hub thejericko/dockge:latest but like I said it's not the latest dockge version since the update was released right after I built that.
@Triskae not sure if anything changed as there has been some version changes to a lot of packages and I have not updated and tested my dockge docker build as I spent far longer than i'd like to admit getting it to build on my test system at the time. I did put a docker image up on docker hub thejericko/dockge:latest but like I said it's not the latest dockge version since the update was released right after I built that.
I understand, I will take a look if can make it work ! Or if you want, you can take a look too.
I spent far longer than i'd like to admit getting it to build on my test system
Ooooh yeah me too .... on macos with M2 Chip impossible for me to getting it to build, had to create a linux VM ....
FYI, when testing this I noticed that I'm getting quite a few JS warnings in my browser. Add the new "processing" prop and the "start-service", "stop-service" and "restart-service" events to the container component seemed to fix them (see https://github.com/tobi1449/dockge/commit/ee0c54b2e9ae7e56a00d97bcdaf8220204aef9e9).
It would be awesome to merge this
I'm also working on trying to get it to hide the buttons when there is only one container in a stack so I'll post the code if I do. It is much less intrusive without the bright yellow and red but it's also very redundant if the stack only has one container.
I figured out a pretty simple method to hide the controls in single container stacks. You can find the changes in Commit 789f25a on my fork.
Simply put by adding serviceCount() to compute:
serviceCount() {
return Object.keys(this.jsonObject.services).length;
},
we can add this.serviceCount > 1 to the v-if for each button and they will automatically hide in instances where a stack only has a single container.
Single Container Active:
Single Container Inactive:
Multi Container Active:
Multi Container Inactive:
~~@Triskae did you ever find a cause for the buttons not doing anything? I can't believe I didn't test them more before modifying it haha I kind of figured @tobi1449 changes were enough to make them work properly. Unfortunatly it didnt, pressing any of the buttons just greys them out.~~
~~My changes only effect button style and hiding the buttons when not needed so reverting those still gives me the same result as you.~~
Edit: I was attempting to use the buttons on containers controlled by an agent without this PR. Having this PR on each agent allows you to control containers from any agent without issue.
@Triskae did you ever find a cause for the buttons not doing anything? I can't believe I didn't test them more before modifying it haha I kind of figured @tobi1449 changes were enough to make them work properly. Unfortunatly it didnt, pressing any of the buttons just greys them out.
My changes only effect button style and hiding the buttons when not needed so reverting those still gives me the same result as you.
The buttons work in my fork:
Before I rebased to the newer 1.50, the v1.41 of my fork did have this problem and I can't remember but I believe whatever @tobi1449 did did fix it but other stuff was broken such as PR #623 and there was one other that wasn't working so instead of trying to fix and not knowing what else would break or was broken, I just started over and rebased to 1.50 only merging PRs I knew 100% worked or I could get working after merge.
@Triskae did you ever find a cause for the buttons not doing anything? I can't believe I didn't test them more before modifying it haha I kind of figured @tobi1449 changes were enough to make them work properly. Unfortunatly it didnt, pressing any of the buttons just greys them out. My changes only effect button style and hiding the buttons when not needed so reverting those still gives me the same result as you.
The buttons work in my fork:
Before I rebased to the newer 1.50, the v1.41 of my fork did have this problem and I can't remember but I believe whatever @tobi1449 did did fix it but other stuff was broken such as PR #623 and there was one other that wasn't working so instead of trying to fix and not knowing what else would break or was broken, I just started over and rebased to 1.50 only merging PRs I knew 100% worked or I could get working after merge.
Oh Interesting, let me clarify after seeing your example I enabled the buttons on single container stacks and yes they work great there. It seem the bug is in stacks with multiple containers do you have any to test with on your end?
Note: I've also done test with just this commit and see the same results. Works for a single container stack but not any of my multi container stacks.
@Dracrius yes, my buttons work fine with single and multi container stacks:
@Dracrius yes, my buttons work fine with single and multi container stacks:
Interestingly I have found a stack that also works perfectly fine. My own combo stack of headscale, headscale ui and tailscale works without issue with the independent control buttons. ~~I'm curious what could be causing it to not work on others.~~
Edit: I'm a fool it was a stack managed by another agent. I updated my other agent with the same image and this will solved the issue.
Hi is there a forked docker image with this changes it would make my life so much easiear :)
Hi is there a forked docker image with this changes it would make my life so much easiear :)
there sure is, unless you are already on my fork and still not working for you...in which case, nevermind LOL
@cmcooper1980 this is really cool, thanks! @louislam merging this PR would be awesome (there are other PRs also merged by @cmcooper1980 in the fork). It brings dockge to almost perfection (the "almost" being, selfishly, the ability to change the size of the columns :))
@cmcooper1980 i tryed your branch in past but UI was broken
thehere is possible fix but it is not inclooded unforchunatelly: https://github.com/louislam/dockge/pull/800
@cmcooper1980 i tryed your branch in past but UI was broken
thehere is possible fix but it is not inclooded unforchunatelly: #800
how long ago was the past? I haven't had an issue since rebased to 1.50 (there were some issues with previous version). Oh are you referring the to background/colored panel?
@cmcooper1980 i tryed your branch in past but UI was broken
thehere is possible fix but it is not inclooded unforchunatelly: #800
how long ago was the past? I haven't had an issue since rebased to 1.50 (there were some issues with previous version). Oh are you referring the to background/colored panel?
Hi, like some times back and yesterday I tested the latest build of yours :) functionality is definitely there but most of the tasks ended in error in console/ since I have many remote hosts and many containers UI felt broken...
Could it be that I switched official image for yours and did not do a clean install ?
Could it be that I switched official image for yours and did not do a clean install ?
I switched by changing the image name in the docker compose and it went flawlessly
It is a shame that this has not been merged into master. I'm afraid I'm going to have to switch to another docker management service as this one seems to be completely abandoned.
t is a shame that this has not been merged into master. I'm afraid I'm going to have to switch to another docker management service as this one seems to be completely abandoned.
It is not abandoned author is just taking its time you can see the same trend on UpTimeKuma container :) Probabli dooing this work in his free time so it is understandable :)
It is not abandoned author is just taking its time you can see the same trend on UpTimeKuma container :)
I had no idea that he was also the author of UptimeKuma!
Yeah, not abandoned...otherwise I think he'd have archived the project...plus those that are anxious for new features or fixes can try some of the communities' forks that have implemented some of the pull requests. @GamerClassN7, I actually tried to merge #800 previously and tried again yesterday, there is a conflict in the StackList.vue file which I removed and merged. Unfortunately, after the build and spin up the entire list of containers on the left goes missing. I tried different adjustments, however, I am not proficient in VUE to fix this...I'm not even completely sure it is strictly the StackList.vue file that may be causing it. I was successful in merging and testing #834 and #827, I was looking to merge a couple more before uploading an updated release...but probably best to keep this thread about this PR and other talk go into Discussions.
