mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 13:23:07 +01:00
feat: release check mode (#4095)
This commit is contained in:
@@ -26,6 +26,7 @@ type Args struct {
|
||||
DisableAvatars bool `arg:"--disable-avatars,env:DOZZLE_DISABLE_AVATARS" default:"false" help:"disables avatars for authenticated users."`
|
||||
FilterStrings []string `arg:"env:DOZZLE_FILTER,--filter,separate" help:"filters docker containers using Docker syntax."`
|
||||
Filter map[string][]string `arg:"-"`
|
||||
ReleaseCheckMode string `arg:"--release-check-mode,env:DOZZLE_RELEASE_CHECK_MODE" default:"automatic" help:"sets the release check mode. When manual, releases will not be automatically fetched."`
|
||||
RemoteHost []string `arg:"env:DOZZLE_REMOTE_HOST,--remote-host,separate" help:"list of hosts to connect remotely"`
|
||||
RemoteAgent []string `arg:"env:DOZZLE_REMOTE_AGENT,--remote-agent,separate" help:"list of agents to connect remotely"`
|
||||
NoAnalytics bool `arg:"--no-analytics,env:DOZZLE_NO_ANALYTICS" help:"disables anonymous analytics"`
|
||||
|
||||
@@ -52,6 +52,7 @@ func (h *handler) executeTemplate(w http.ResponseWriter, req *http.Request) {
|
||||
config["enableActions"] = h.config.EnableActions
|
||||
config["enableShell"] = h.config.EnableShell
|
||||
config["disableAvatars"] = h.config.DisableAvatars
|
||||
config["releaseCheckMode"] = h.config.ReleaseCheckMode
|
||||
}
|
||||
|
||||
if user != nil {
|
||||
|
||||
@@ -17,6 +17,13 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
|
||||
type ReleaseCheckMode string
|
||||
|
||||
const (
|
||||
Automatic ReleaseCheckMode = "automatic"
|
||||
Manual ReleaseCheckMode = "manual"
|
||||
)
|
||||
|
||||
type AuthProvider string
|
||||
|
||||
const (
|
||||
@@ -27,17 +34,18 @@ const (
|
||||
|
||||
// Config is a struct for configuring the web service
|
||||
type Config struct {
|
||||
Base string
|
||||
Addr string
|
||||
Version string
|
||||
Hostname string
|
||||
NoAnalytics bool
|
||||
Dev bool
|
||||
Authorization Authorization
|
||||
EnableActions bool
|
||||
EnableShell bool
|
||||
DisableAvatars bool
|
||||
Labels container.ContainerLabels
|
||||
Base string
|
||||
Addr string
|
||||
Version string
|
||||
Hostname string
|
||||
NoAnalytics bool
|
||||
Dev bool
|
||||
Authorization Authorization
|
||||
EnableActions bool
|
||||
EnableShell bool
|
||||
DisableAvatars bool
|
||||
ReleaseCheckMode ReleaseCheckMode
|
||||
Labels container.ContainerLabels
|
||||
}
|
||||
|
||||
type Authorization struct {
|
||||
|
||||
Reference in New Issue
Block a user