@@ -32,33 +32,34 @@ import (
32
32
33
33
// Config represents the configuration for the server.
34
34
type Config struct {
35
- Host string // Server host
36
- Port int // Server port
37
- DAGs string // Location of DAG files
38
- Executable string // Executable path
39
- WorkDir string // Default working directory
40
- IsBasicAuth bool // Enable basic auth
41
- BasicAuthUsername string // Basic auth username
42
- BasicAuthPassword string // Basic auth password
43
- LogEncodingCharset string // Log encoding charset
44
- LogDir string // Log directory
45
- DataDir string // Data directory
46
- SuspendFlagsDir string // Suspend flags directory
47
- AdminLogsDir string // Directory for admin logs
48
- BaseConfig string // Common config file for all DAGs.
49
- NavbarColor string // Navbar color for the web UI
50
- NavbarTitle string // Navbar title for the web UI
51
- Env sync.Map // Store environment variables
52
- TLS * TLS // TLS configuration
53
- IsAuthToken bool // Enable auth token for API
54
- AuthToken string // Auth token for API
55
- LatestStatusToday bool // Show latest status today or the latest status
56
- BasePath string // Base path for the server
57
- APIBaseURL string // Base URL for API
58
- Debug bool // Enable debug mode (verbose logging)
59
- LogFormat string // Log format
60
- TZ string // The server time zone
61
- Location * time.Location // The server location
35
+ Host string // Server host
36
+ Port int // Server port
37
+ DAGs string // Location of DAG files
38
+ Executable string // Executable path
39
+ WorkDir string // Default working directory
40
+ IsBasicAuth bool // Enable basic auth
41
+ BasicAuthUsername string // Basic auth username
42
+ BasicAuthPassword string // Basic auth password
43
+ LogEncodingCharset string // Log encoding charset
44
+ LogDir string // Log directory
45
+ DataDir string // Data directory
46
+ SuspendFlagsDir string // Suspend flags directory
47
+ AdminLogsDir string // Directory for admin logs
48
+ BaseConfig string // Common config file for all DAGs.
49
+ NavbarColor string // Navbar color for the web UI
50
+ NavbarTitle string // Navbar title for the web UI
51
+ Env sync.Map // Store environment variables
52
+ TLS * TLS // TLS configuration
53
+ IsAuthToken bool // Enable auth token for API
54
+ AuthToken string // Auth token for API
55
+ LatestStatusToday bool // Show latest status today or the latest status
56
+ BasePath string // Base path for the server
57
+ APIBaseURL string // Base URL for API
58
+ Debug bool // Enable debug mode (verbose logging)
59
+ LogFormat string // Log format
60
+ TZ string // The server time zone
61
+ Location * time.Location // The server location
62
+ MaxDashboardPageLimit int // The default page limit for the dashboard
62
63
}
63
64
64
65
type TLS struct {
@@ -184,6 +185,7 @@ func setupViper() error {
184
185
viper .SetDefault ("navbarTitle" , "Dagu" )
185
186
viper .SetDefault ("basePath" , "" )
186
187
viper .SetDefault ("apiBaseURL" , "/api/v1" )
188
+ viper .SetDefault ("maxDashboardPageLimit" , 100 )
187
189
188
190
// Set executable path
189
191
// This is used for invoking the workflow process on the server.
@@ -216,6 +218,7 @@ func bindEnvs() {
216
218
_ = viper .BindEnv ("basePath" , "DAGU_BASE_PATH" )
217
219
_ = viper .BindEnv ("apiBaseURL" , "DAGU_API_BASE_URL" )
218
220
_ = viper .BindEnv ("tz" , "DAGU_TZ" )
221
+ _ = viper .BindEnv ("maxDashboardPageLimit" , "DAGU_MAX_DASHBOARD_PAGE_LIMIT" )
219
222
220
223
// Basic authentication
221
224
_ = viper .BindEnv ("isBasicAuth" , "DAGU_IS_BASICAUTH" )
0 commit comments