dashboard: add the ability to use a remote dashboard, serve only local files: assets and eventualy public.json (to override given ones)
This commit is contained in:
parent
8c754fe265
commit
b205409679
3 changed files with 154 additions and 20 deletions
|
@ -72,6 +72,8 @@ func main() {
|
|||
flag.StringVar(&DashboardDir, "dashbord", "./DASHBOARD", "Base directory where save public JSON files")
|
||||
flag.StringVar(&TeamsDir, "teams", "./TEAMS", "Base directory where save teams JSON files")
|
||||
flag.StringVar(&settings.SettingsDir, "settings", settings.SettingsDir, "Base directory where load and save settings")
|
||||
var fwdr = flag.String("forwarder", "", "URL of another dashboard where send traffic to, except static assets")
|
||||
flag.BoolVar(&fwdPublicJson, "fwdpublicjson", fwdPublicJson, "Also forward public.json files to forwarder")
|
||||
flag.Parse()
|
||||
|
||||
log.SetPrefix("[public] ")
|
||||
|
@ -95,6 +97,9 @@ func main() {
|
|||
tmp := ""
|
||||
baseURL = &tmp
|
||||
}
|
||||
if fwdr != nil && len(*fwdr) > 0 {
|
||||
forwarder = fwdr
|
||||
}
|
||||
|
||||
// Prepare graceful shutdown
|
||||
interrupt := make(chan os.Signal, 1)
|
||||
|
|
Reference in a new issue