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

Spring board for known (+ custom) web applications #169

Open
MichaIng opened this issue Feb 24, 2022 · 14 comments
Open

Spring board for known (+ custom) web applications #169

MichaIng opened this issue Feb 24, 2022 · 14 comments
Labels
enhancement New feature or request

Comments

@MichaIng
Copy link
Collaborator

Since we have some users who want to use something like Heimdall, to have a page with tiles/links to various web applications, but Heimdall is difficult to implement into dietpi-software in a compatible way, probably we can implement it into DietPi-Dashboard:

  • We could scan for installed (dietpi-)software titles where we know the subpath or the port, and show a related tile with link (using the dashboard access host + known default port and/or subpath) and a hardcoded logo.
  • We could allow to edit the link, probably even the logo.
  • We could allow to add custom tiles with link and logo.
  • We could allow to reorder the tiles.

The last three parts would require a server-side storing of the info, so something which DietPi-Dashboard does not do at all. Of course it could be also done just via config.toml for now, so that it is possible to override the default link of a defined web application.

@TommySharpNZ
Copy link

I look forward to this functionality :-)

@ravenclaw900
Copy link
Owner

ravenclaw900 commented Feb 28, 2022

Personally, I still think it would be better to have a dedicated bookmarks dashboard application, however this detecting installed software from DietPi-Software would be nice. It would probably require putting the ports and web addresses of software in a more standardized place, though. Not sure about how to do server-side storage, a full database seems like too much, and I like the no dependencies. Maybe storing it in a JSON file, similar to Python's pickledb. It would also allow graph data to be saved, like in #153.

@MichaIng
Copy link
Collaborator Author

MichaIng commented Feb 28, 2022

Earlier or later, adding the ability to change config.toml settings via web interface would be great anyway. It could then also hold overrides for the known/default software ports and/or URLs (when running on a different machine or requiring a different host than the dashboard). Of course it would be also a dedicated config file if all in one is seen as an issue, not sure which format is best then, I personally don't like JSON because it is hard to edit manually and hard to grep/sed/awk. But of course there are processing libraries and tools available. For custom entries I however agree that TOML is not great either, requiring either custom sections or variable names with incrementing suffix or such, like spring_url_0, spring_url_1, spring_label_0, spring_color_0 or so (just examples of possibly interesting customisations).

@MichaIng
Copy link
Collaborator Author

A vote for this from the forum: https://dietpi.com/phpbb/viewtopic.php?t=10366

@ravenclaw900
Copy link
Owner

Before any work can be done on this, it would be great to have some kind of port database for DietPi-Software. Otherwise, users would need to add the software themselves (it seems like automatically getting the ports would be a big advantage over Heimdall). Pickledb now has feature flags to remove unneeded dependencies, so customizing and storing on the server could be done.

@MichaIng
Copy link
Collaborator Author

MichaIng commented May 13, 2022

ss -tlpn could be used to get process names which listen on specific TCP ports. Probably there is a Rust crate as well. Otherwise, I agree, a port database makes much sense, also to see port conflicts reliably when impending software. However, reasonably ports can always be changed, so probably it is even best to derive available software and related ports directly from ss, so we only need a list of known process names, and probably associated logos?

Ah, and then there are the port 80/443 webserver applications and their sub path. Okay probably better to parse /boot/dietpi/.installed then, as those cannot be detected in a generic way otherwise.

@ravenclaw900
Copy link
Owner

Currently that sounds like a good plan. It would probably not be stored as a markdown file, perhaps as JSON or YAML, which makes it easiest to write from the frontend.

@MichaIng
Copy link
Collaborator Author

Keeping the final implementation in mind, at least I wouldn't implement something "smaller" now which needs to be completely rewritten later, but only if the code can be easily extended for the final implementation. Just my 2 cents, to reduce coding overhead 😉.

@ravenclaw900
Copy link
Owner

This should be extendable, it would probably be how you would manually add software that's not automatically detected, and how it would be stored in the backend anyway.

@ravenclaw900
Copy link
Owner

I'll begin work on this as soon as I get #232 and #236 merged.

@TommySharpNZ
Copy link

Hi Team, any updates on this? I'd love to get rid of my docker setup that just hosts Heimdall... :-)

@TommySharpNZ
Copy link

I found another similar app that could be used for inspiration or even added to the installable software list?
https://github.com/benphelps/homepage

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

4 participants
@TommySharpNZ @MichaIng @ravenclaw900 and others