mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-25 01:13:40 +01:00
5807d76c2f
* Add support for HideURL UI config parameter * Redact whole URL when hide-url parameter is set to true * Add integration test for hide-url functionality * Document the hide-url config parameter in README * Apply suggestions from code review Co-authored-by: TwiN <twin@linux.com> * Update test to have client config with 1ms timeout * Re-align README tables * Update core/endpoint_test.go * Update core/endpoint_test.go Co-authored-by: TwiN <twin@linux.com>
21 lines
737 B
Go
21 lines
737 B
Go
package ui
|
|
|
|
// Config is the UI configuration for core.Endpoint
|
|
type Config struct {
|
|
// HideHostname whether to hide the hostname in the Result
|
|
HideHostname bool `yaml:"hide-hostname"`
|
|
// HideURL whether to ensure the URL is not displayed in the results. Useful if the URL contains a token.
|
|
HideURL bool `yaml:"hide-url"`
|
|
// DontResolveFailedConditions whether to resolve failed conditions in the Result for display in the UI
|
|
DontResolveFailedConditions bool `yaml:"dont-resolve-failed-conditions"`
|
|
}
|
|
|
|
// GetDefaultConfig retrieves the default UI configuration
|
|
func GetDefaultConfig() *Config {
|
|
return &Config{
|
|
HideHostname: false,
|
|
HideURL: false,
|
|
DontResolveFailedConditions: false,
|
|
}
|
|
}
|