drakkan / sftpgo

@@ -1353,6 +1353,12 @@
Loading
1353 1353
		isSet = true
1354 1354
	}
1355 1355
1356 +
	defaultCSSPath, ok := os.LookupEnv(fmt.Sprintf("%s__DEFAULT_CSS", prefix))
1357 +
	if ok {
1358 +
		result.DefaultCSS = defaultCSSPath
1359 +
		isSet = true
1360 +
	}
1361 +
1356 1362
	extraCSS, ok := lookupStringListFromEnv(fmt.Sprintf("%s__EXTRA_CSS", prefix))
1357 1363
	if ok {
1358 1364
		result.ExtraCSS = extraCSS

@@ -332,6 +332,10 @@
Loading
332 332
	DisclaimerName string `json:"disclaimer_name" mapstructure:"disclaimer_name"`
333 333
	// Path to the HTML page for your disclaimer relative to "static_files_path".
334 334
	DisclaimerPath string `json:"disclaimer_path" mapstructure:"disclaimer_path"`
335 +
	// Path to a custom CSS file, relative to "static_files_path", which replaces
336 +
	// the SB Admin2 default CSS. This is useful, for example, if you rebuild
337 +
	// SB Admin2 CSS to use custom colors
338 +
	DefaultCSS string `json:"default_css" mapstructure:"default_css"`
335 339
	// Additional CSS file paths, relative to "static_files_path", to include
336 340
	ExtraCSS []string `json:"extra_css" mapstructure:"extra_css"`
337 341
}
@@ -355,6 +359,11 @@
Loading
355 359
	if b.DisclaimerPath != "" {
356 360
		b.DisclaimerPath = util.CleanPath(b.DisclaimerPath)
357 361
	}
362 +
	if b.DefaultCSS != "" {
363 +
		b.DefaultCSS = util.CleanPath(b.DefaultCSS)
364 +
	} else {
365 +
		b.DefaultCSS = "/css/sb-admin-2.min.css"
366 +
	}
358 367
	for idx := range b.ExtraCSS {
359 368
		b.ExtraCSS[idx] = util.CleanPath(b.ExtraCSS[idx])
360 369
	}
Files Coverage
common 99.92%
config 100.00%
ftpd 100.00%
httpd 99.97%
mfa 100.00%
sftpd 98.86%
telemetry 100.00%
webdavd 100.00%
command/command.go 100.00%
Project Totals (68 files) 99.80%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading