Add StackableAnnotation and update wording

This commit is contained in:
Patrick Pacher 2020-10-20 12:40:20 +02:00 committed by Daniel
parent 8a39b73c9c
commit 45d8d7eaf9
5 changed files with 12 additions and 6 deletions

View file

@ -41,7 +41,7 @@ func registerConfig() error {
err := config.Register(&config.Option{ err := config.Register(&config.Option{
Name: "API Address", Name: "API Address",
Key: CfgDefaultListenAddressKey, Key: CfgDefaultListenAddressKey,
Description: "Define on which IP and port the API should listen on.", Description: "Defines the IP address and port for the internal HTTP database API.",
OptType: config.OptTypeString, OptType: config.OptTypeString,
ExpertiseLevel: config.ExpertiseLevelDeveloper, ExpertiseLevel: config.ExpertiseLevelDeveloper,
ReleaseLevel: config.ReleaseLevelStable, ReleaseLevel: config.ReleaseLevelStable,

View file

@ -41,7 +41,7 @@ func registerExpertiseLevelOption() {
expertiseLevelOption = &Option{ expertiseLevelOption = &Option{
Name: "Expertise Level", Name: "Expertise Level",
Key: expertiseLevelKey, Key: expertiseLevelKey,
Description: "The Expertise Level controls the perceived complexity. Higher settings will show you more complex settings and information. This might also affect various other things relying on this setting. Modified settings in higher expertise levels stay in effect when switching back. (Unlike the Release Level)", Description: "The Expertise Level controls the perceived complexity. Higher settings will enable more complex settings and information. This might also affect various other things relying on this setting. Modified settings in higher expertise levels stay in effect when switching back. (Unlike the Release Level)",
OptType: OptTypeString, OptType: OptTypeString,
ExpertiseLevel: ExpertiseLevelUser, ExpertiseLevel: ExpertiseLevelUser,
ReleaseLevel: ReleaseLevelStable, ReleaseLevel: ReleaseLevelStable,
@ -52,9 +52,9 @@ func registerExpertiseLevelOption() {
}, },
PossibleValues: []PossibleValue{ PossibleValues: []PossibleValue{
{ {
Name: "Easy", Name: "Simple",
Value: ExpertiseLevelNameUser, Value: ExpertiseLevelNameUser,
Description: "Easy application mode by hidding complex settings.", Description: "Simple application mode by hidding complex settings.",
}, },
{ {
Name: "Expert", Name: "Expert",

View file

@ -84,6 +84,12 @@ const (
// SubsystemAnnotation can be used to mark an option as part // SubsystemAnnotation can be used to mark an option as part
// of a module subsystem. // of a module subsystem.
SubsystemAnnotation = "safing/portbase:module:subsystem" SubsystemAnnotation = "safing/portbase:module:subsystem"
// StackableAnnotation can be set on configuration options that
// stack on top of the default (or otherwise related) options.
// The value of StackableAnnotaiton is expected to be a boolean but
// may be extended to hold references to other options in the
// future.
StackableAnnotation = "safing/portbase:options:stackable"
// QuickSettingAnnotation can be used to add quick settings to // QuickSettingAnnotation can be used to add quick settings to
// a configuration option. A quick setting can support the user // a configuration option. A quick setting can support the user
// by switching between pre-configured values. // by switching between pre-configured values.

View file

@ -39,7 +39,7 @@ func registerReleaseLevelOption() {
releaseLevelOption = &Option{ releaseLevelOption = &Option{
Name: "Release Level", Name: "Release Level",
Key: releaseLevelKey, Key: releaseLevelKey,
Description: "The Release Level changes which features are available to you. Some beta or experimental features are also available in the stable release channel. Unavailable settings are set to the default value.", Description: "The Release Level changes which features are available. Some beta or experimental features are also available in the stable release channel. Unavailable settings are set to the default value.",
OptType: OptTypeString, OptType: OptTypeString,
ExpertiseLevel: ExpertiseLevelExpert, ExpertiseLevel: ExpertiseLevelExpert,
ReleaseLevel: ReleaseLevelStable, ReleaseLevel: ReleaseLevelStable,

View file

@ -30,7 +30,7 @@ func init() {
module, module,
"config:template", // key space for configuration options registered "config:template", // key space for configuration options registered
&config.Option{ &config.Option{
Name: "Enable Template Subsystem", Name: "Template Subsystem",
Key: "config:subsystems/template", Key: "config:subsystems/template",
Description: "This option enables the Template Subsystem [TEMPLATE]", Description: "This option enables the Template Subsystem [TEMPLATE]",
OptType: config.OptTypeBool, OptType: config.OptTypeBool,