oddlama / nix-topology

🍁 Generate infrastructure and network diagrams directly from your NixOS configurations
https://oddlama.github.io/nix-topology
MIT License
490 stars 20 forks source link

Consolidation of Services Overview #14

Open JayRovacsek opened 5 months ago

JayRovacsek commented 5 months ago

Is there any objection to the project considering a consolidation of the services overview rendered in the main.svg output? I've got two options that could be considered below;

Minimise Current Output (replace behaviour)

I propose we could shift from the current view to one in which all hosts running the same service are listed under the service and details or info elements are visible only in the per-host card to reduce information on the one screen

First example of current view: 20240420_08h16m59s_grim

Compared to a proposed: 20240420_08h16m59s_grim_proposed

Second example of current view (that includes elements of detailed information): 20240420_08h17m19s_grim

Compared to a proposed: 20240420_08h17m19s_grim_proposed

Add Minimised Output (extend behaviour)

I propose we could apply the above option, however output the contents not over main.svg but in a minimal.svg or alike - upside of-course is non-breaking behaviour, however it might lead to increased eval/build times if issues such as https://github.com/oddlama/nix-topology/issues/6 are caused by the number and size of images.

An addendum to increasing the default outputs could be increased drv options to build from; such as:

nix build .\#topology.x86_64-linux.config.output
# vs
nix build .\#topology.x86_64-linux.config.minimal-output
# or 
nix build .\#topology.x86_64-linux.config.output.passthru.minimal

Thanks in advance!

IogaMaster commented 5 months ago

I second this

oddlama commented 5 months ago

No objection at all. Consolidating these is a great way to reduce the waste of space. I actually wouldn't create a new output for this, just change the default.

I think consolidation in your first example is pretty much always better than not consolidating it. If there's info involved like in the second example, we could also consolidate it but still show the info behind the hostname? My initial intention for the overview was to have a quick way to see all the relevant domains.

host1            https://nextcloud.example.com
some-other-host  https://service.example.com

What do you think?

JayRovacsek commented 5 months ago

That sounds great @oddlama - sorry for the slow reply, if I get a moment to create the PR I'll link it here as well :grin: