rmountjoy92 / DashMachine

Another web application bookmark dashboard, with fun features.
GNU General Public License v3.0
1.24k stars 119 forks source link

[Enhancement] Environment variables #169

Open dferrandizmont opened 4 years ago

dferrandizmont commented 4 years ago

Hello, how about adding environment variables?

I'd love to change between local address (192.168.X.XXX) to an external address with just some kind of switch or a dropdown like Postman has.

Thanks for this awesome home page!

rmountjoy92 commented 4 years ago

Hey thanks! :)

Do you mean like enviroment variables when the docker image is set up?

dferrandizmont commented 4 years ago

Hello! :)

No no, what I mean is something like Postman has, for example, in the config

[Home Assistant]
prefix = {{ envPrefix }}
url = {{ homeAssistantUrl }}
icon = static/images/apps/home-assistant.png
description = Open source home automation that puts local control and privacy first
open_in = new_tab
tags = Home

[Bitwarden]
prefix = {{ bitwardenPrefix }}
url = {{ bitwardenUrl }}
icon = static/images/apps/bitwarden.png
description = A free and open-source password management service
open_in = new_tab
tags = Secure 

and then, somewhere in the config, have some kind of config where I can say

[Home environment]
envPrefix = http://
homeAssistantUrl = 192.168.1.XX:5214
jenkinsUrl = 192.168.1.XX:5888
bitwardenPrefix = https://
bitwardenUrl = 192.168.1.XX:3005

[Office environment]
envPrefix = https://
homeAssistantUrl = myhomeassistant.com
jenkinsUrl = myjenkins.com
bitwardenPrefix = https://
bitwardenUrl = mybitwarden.com

and then, in the UI, somewhere a dropdown to chose which environment I want to use.

Dunno if I have explain myself.

auanasgheps commented 4 years ago

Well at this point Dashmachine could use the IP of your login to determine if you are in LAN and apply default addresses, or if there's no match use the "fallback" URLs

dferrandizmont commented 4 years ago

I like this behavior, but what about applying http or https ? Could be customized too.