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

[FEATURE-REQUEST] Action Buttons to execute web hooks #383

Open
marcbria opened this issue Dec 26, 2021 · 14 comments
Open

[FEATURE-REQUEST] Action Buttons to execute web hooks #383

marcbria opened this issue Dec 26, 2021 · 14 comments
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change 📌 Keep Open [ISSUE][PR] Prevent auto-closing

Comments

@marcbria
Copy link

Is your feature request related to a problem? If so, please describe.

Would be nice to be able to associate server actions to items so dashy could turn into a docker management tool.

Describe the solution you'd like

If dashy could associate to each item one or more icons to run docker and docker-compose commands... it will make possible to stop, rise or restart containers. If dashy can call bash scripts, we can make much more complex actions like container backups, application upgrades, etc.

To avoid security issues, it would only be possible for admin users.

Priority

Medium (Would be very useful)

Is this something you would be keen to implement

No response

@marcbria marcbria added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label Dec 26, 2021
@liss-bot

This comment has been minimized.

@Lissy93 Lissy93 reopened this Dec 26, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Dec 26, 2021

Heya @marcbria - Thanks for your suggestion :) Apologies that the ticket was closed.
I'm actually working on dynamic content and actions at the moment (in PR: #382, see examples) which should be merged within the next week. And soon you will be able to execute actions through webhooks and API access.
...But turning Dashy into a full Docker management console might be a bit out of scope.

It would require access to the Docker daemon socket, and exposing /var/run/docker.sock comes with a lot of security considerations, so the best approach would be separation of concern - use a specialised app that does nothing but Docker management (like Portainer, Dozzle, cAdvisor, ShipYard, LazyDocker etc). And then use a dashboard app, like Dashy as a central dashboard.

@Lissy93 Lissy93 mentioned this issue Dec 26, 2021
6 tasks
@Lissy93 Lissy93 added the 🛑 Out of Scope [ISSUE] Feature request that cannot be implemented label Dec 26, 2021
@Lissy93 Lissy93 closed this as completed Dec 26, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Dec 29, 2021

Hiya @marcbria
Just to let you know that support for dynamic content is now merged in #382. Once you've updated to V 1.9.4, take a look at the Widget Docs for a usage guide.

There isn't a Docker management widget, and because of the reasons listed above, I won't be building an official one. But everything should be in place for you to implement this if it's something you're still interested in. Feel free to reach out if you need any support with that :)

@marcbria
Copy link
Author

Hi @Lissy93, nothing to sorry about. Instead of this, let me thanks you a lot for this wonderful project.

I'm actually working on dynamic content and actions at the moment (in PR: #382, see examples) which should be merged within the next week. And soon you will be able to execute actions through webhooks and API access.
That's really impressive. I didn't know dashy was able to do all this. Great work and thanks to share it.

...But turning Dashy into a full Docker management console might be a bit out of scope.
I full agree, but that is not what I am proposing. I'm sorry if I didn't make myself clear... English is not my mother tongue.
What I'm suggesting is extending dashy to associate action-buttons to items.

Following the first unix philosophy maxima that defines that we should "make each program do one thing well" I see dashy as a frontend design tool able to call different "backends".

Then, we have "backend" tools like node-RED or flogo, that are able to run actions in our servers to do the docker management (or whatever you like to run) as they can be called from a single url.

What I'm suggesting here is extend Dashy with a new kind of widget (or extend item syntax) to be able to create "items" with multiple (arbitrary) "buttons" that will be able to release the potential of all those backends.

To illustrate it better what I have in mind, this is a mockup I took from the dashboard I like to build:

imagen

In this case, I have a row with some classic docker-managment buttons (pause, stop, restart) and then a second line with some tool-specific actions that will be performed by flogo calling a bash script (backup, duplicate, anonimize&send, notifications).

As said... I'm not not sure if this will fit well as a new widget or will be easier as item new attributes.

Actually, I'm more of a devOps guy and my coding skills are very rusty (I don't know anything about the current frameworks like nodeJS, vue.js) so I don't know if what I suggest is a feasible task or if it means major changes in your code.

It was just an idea for you to consider, because honestly, I think it opens a new hotizon for the tool to continue to grow in potential.

Cheers and thanks again for sharing your impressive work as free source software,
m.

@Lissy93 Lissy93 changed the title Run bash scripts [FEATURE-REQUEST] Action Buttons to execute web hooks Dec 30, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Dec 30, 2021

Got it, that makes perfect sense now - And I love the idea! I can definitely implement that :)

I think a lot of services (like NODE-Red) support web-hooks, which like you mentioned can execute actions just by hitting a URL, so that would probably be how I would build this.

I'm going to reopen and rename the issue, to keep track of it. Will update you here once it's finished. Might not be until mid-January though, as I lots on at work at the moment :/

@Lissy93 Lissy93 reopened this Dec 30, 2021
@Lissy93 Lissy93 removed the 🛑 Out of Scope [ISSUE] Feature request that cannot be implemented label Dec 30, 2021
@marcbria
Copy link
Author

Wow... I admit I was convinced I wouldn't be able to convey how interesting this feature could be for Dashy and the community.

Thanks for listening. You're great Lissy.

From my side there is absolutely no rush... and just for considering the proposal I already feel indebted. :-)

When you have something (and I insist that there is no hurry), I can help testing the new functionality, making a first attempt of documentation (although my English is not good, a documentation draft could be better than nothing), helping with the translations to es_ES or ca_ES or being your "sparring" to evaluate if the configuration is clear enough for the end users...

If you want to extend the thread to clarify here how it will work (widget or item attributes? minimal viable product? what config params will be accepted?) just need to ask.

In short: Whatever you need, throw me a mention right here, please.

Thanks again for the fantastic project,
m.

@Lissy93
Copy link
Owner

Lissy93 commented Dec 30, 2021

Thank you so much :) I will keep you updated :)

@liss-bot
Copy link
Collaborator

This issue has gone 6 weeks without an update. To keep the ticket open, please indicate that it is still relevant in a comment below. Otherwise it will be closed in 5 working days.

@liss-bot liss-bot added the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Jan 30, 2022
@Lissy93
Copy link
Owner

Lissy93 commented Jan 30, 2022

/keep-open

@Lissy93 Lissy93 removed the ⚰️ Stale [ISSUE] [PR] No activity for over 1 month label Jan 30, 2022
@liss-bot liss-bot added the 📌 Keep Open [ISSUE][PR] Prevent auto-closing label Jan 30, 2022
@nickm324
Copy link

Any progress on this?

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Apr 16, 2022
@Lissy93
Copy link
Owner

Lissy93 commented Apr 16, 2022

Not yet, am working on multi-page support at the moment, then multi-media widgets.
You interested?

@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Apr 16, 2022
@nickm324
Copy link

Not yet, am working on multi-page support at the moment, then multi-media widgets. You interested?

What could I do to help?

@liss-bot liss-bot added the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Apr 16, 2022
@liss-bot liss-bot removed the 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending label Apr 17, 2022
@rogerwilko1
Copy link

Hi @Lissy93, really appreciate all you’ve done to create and maintain this project. I just wanted to touch base to see if either the API Response widget or @marcbria’s idea has had any movement since your last update or if it’s on the horizon?

I have an API webhook that when accessed/navigated to by a remote client does some stuff server side and returns nothing (not the same server as the one hosting Dashy). I could just make a conventional icon and have it navigate to the webhook URL on click, but I don’t want to have the user able to see the API key in their address bar. Either the API Response widget or being able to execute a cURL request or execute a shell script remotely on click would allow me to implement this without leaking the API key to everyone that uses the Dashy panel. Alternatively, is there another easy enough way of doing this (is this something that can be implemented without too much of a headache by making my own widget? It’s amateur hour when it comes to me and JS.)

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Jan 17, 2023
asterling8516 pushed a commit to asterling8516/dashy that referenced this issue Nov 23, 2023
@VicVegas1
Copy link

I to need this, so my office staff can unlock doors.

@liss-bot liss-bot added 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending and removed 👤 Awaiting Maintainer Response [ISSUE] Response from repo author is pending labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change 📌 Keep Open [ISSUE][PR] Prevent auto-closing
Projects
None yet
Development

No branches or pull requests

7 participants
@Lissy93 @marcbria @nickm324 @liss-bot @VicVegas1 @rogerwilko1 and others