mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add more settings helpers to widgets
This commit is contained in:
parent
7413ffabb1
commit
c1eb75de1a
@ -12,8 +12,8 @@ const defaultTitle = "BambooHR"
|
|||||||
type Settings struct {
|
type Settings struct {
|
||||||
common *cfg.Common
|
common *cfg.Common
|
||||||
|
|
||||||
apiKey string
|
apiKey string `help:"Your BambooHR API token."`
|
||||||
subdomain string
|
subdomain string `help:"Your BambooHR API subdomain name."`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||||
|
@ -12,7 +12,7 @@ const defaultTitle = "CircleCI"
|
|||||||
type Settings struct {
|
type Settings struct {
|
||||||
common *cfg.Common
|
common *cfg.Common
|
||||||
|
|
||||||
apiKey string
|
apiKey string `help:"Your CircleCI API token."`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||||
|
@ -19,10 +19,10 @@ type Settings struct {
|
|||||||
colors
|
colors
|
||||||
common *cfg.Common
|
common *cfg.Common
|
||||||
|
|
||||||
dateFormat string
|
dateFormat string `help:"The format of the date string for all clocks." values:"Any valid Go date layout which is handled by Time.Format. Defaults to Jan 2."`
|
||||||
timeFormat string
|
timeFormat string `help:"The format of the time string for all clocks." values:"Any valid Go time layout which is handled by Time.Format. Defaults to 15:04 MST."`
|
||||||
locations map[string]interface{}
|
locations map[string]interface{} `help:"Defines the timezones for the world clocks that you want to display. key is a unique label that will be displayed in the UI. value is a timezone name." values:"Any TZ database timezone."`
|
||||||
sort string
|
sort string `help:"Defines the display order of the clocks in the widget." values:"'alphabetical' or 'chronological'. 'alphabetical' will sort in acending order by key, 'chronological' will sort in ascending order by date/time."`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||||
|
@ -11,8 +11,8 @@ const defaultTitle = "CmdRunner"
|
|||||||
type Settings struct {
|
type Settings struct {
|
||||||
common *cfg.Common
|
common *cfg.Common
|
||||||
|
|
||||||
args []string
|
args []string `help:"The arguments to the command, with each item as an element in an array. Example: for curl -I cisco.com, the arguments array would be ["-I", "cisco.com"]."`
|
||||||
cmd string
|
cmd string `help:"The terminal command to be run, withouth the arguments. Ie: ping, whoami, curl."`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSettingsFromYAML(name string, moduleConfig *config.Config, globalConfig *config.Config) *Settings {
|
func NewSettingsFromYAML(name string, moduleConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||||
|
@ -12,9 +12,9 @@ const defaultTitle = "DataDog"
|
|||||||
type Settings struct {
|
type Settings struct {
|
||||||
common *cfg.Common
|
common *cfg.Common
|
||||||
|
|
||||||
apiKey string
|
apiKey string `help:"Your Datadog API key."`
|
||||||
applicationKey string
|
applicationKey string `help:"Your Datadog Application key."`
|
||||||
tags []interface{}
|
tags []interface{} `help:"Array of tags you want to query monitors by."`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user