From c7223843f0a9c75c20e87483f75760b138ee6437 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Tue, 31 Jul 2018 13:36:02 -0700 Subject: [PATCH 01/19] Clean up the Weather module's API credentials loading Now prioritizes API key configuration in the config file over ENV vars. --- weatherservices/weather/widget.go | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/weatherservices/weather/widget.go b/weatherservices/weather/widget.go index 48062285..fcfb3904 100644 --- a/weatherservices/weather/widget.go +++ b/weatherservices/weather/widget.go @@ -1,13 +1,13 @@ package weather import ( - "fmt" + //"fmt" "os" owm "github.com/briandowns/openweathermap" "github.com/gdamore/tcell" "github.com/rivo/tview" - "github.com/senorprogrammer/wtf/logger" + //"github.com/senorprogrammer/wtf/logger" "github.com/senorprogrammer/wtf/wtf" ) @@ -43,14 +43,10 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget { app: app, pages: pages, - APIKey: os.Getenv("WTF_OWM_API_KEY"), - Idx: 0, + Idx: 0, } - if widget.APIKey == "" { - logger.Log("loading weather API key from config") - widget.APIKey = wtf.Config.UString(fmt.Sprintf("wtf.mods.%s.apiKey", configKey), "") - } + widget.loadAPICredentials() widget.View.SetInputCapture(widget.keyboardIntercept) @@ -188,6 +184,15 @@ func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey { } } +// loadAPICredentials loads the API authentication credentials for this module +// First checks to see if they're in the config file. If not, checks the ENV var +func (widget *Widget) loadAPICredentials() { + widget.APIKey = wtf.Config.UString( + "wtf.mods.weather.apiKey", + os.Getenv("WTF_OWM_API_KEY"), + ) +} + func (widget *Widget) showHelp() { closeFunc := func() { widget.pages.RemovePage("help") From 0a019ff8369650acb0fdc73b7dd370d0f58f6687 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Tue, 31 Jul 2018 13:58:08 -0700 Subject: [PATCH 02/19] Clean up the GitHub module's API credentials loading --- github/github_repo.go | 24 ++++++++++++++++++++---- weatherservices/weather/widget.go | 2 -- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/github/github_repo.go b/github/github_repo.go index 80640f5a..7bf210f7 100644 --- a/github/github_repo.go +++ b/github/github_repo.go @@ -6,6 +6,7 @@ import ( "os" ghb "github.com/google/go-github/github" + "github.com/senorprogrammer/wtf/wtf" "golang.org/x/oauth2" ) @@ -22,14 +23,12 @@ type GithubRepo struct { func NewGithubRepo(name, owner string) *GithubRepo { repo := GithubRepo{ - apiKey: os.Getenv("WTF_GITHUB_TOKEN"), - baseURL: os.Getenv("WTF_GITHUB_BASE_URL"), - uploadURL: os.Getenv("WTF_GITHUB_UPLOAD_URL"), - Name: name, Owner: owner, } + repo.loadAPICredentials() + return &repo } @@ -91,6 +90,23 @@ func (repo *GithubRepo) githubClient() (*ghb.Client, error) { return ghb.NewClient(oauthClient), nil } +func (repo *GithubRepo) loadAPICredentials() { + repo.apiKey = wtf.Config.UString( + "wtf.mods.github.apiKey", + os.Getenv("WTF_GITHUB_TOKEN"), + ) + + repo.baseURL = wtf.Config.UString( + "wtf.mods.github.baseURL", + os.Getenv("WTF_GITHUB_BASE_URL"), + ) + + repo.uploadURL = wtf.Config.UString( + "wtf.mods.github.uploadURL", + os.Getenv("WTF_GITHUB_UPLOAD_URL"), + ) +} + // myPullRequests returns a list of pull requests created by username on this repo func (repo *GithubRepo) myPullRequests(username string) []*ghb.PullRequest { prs := []*ghb.PullRequest{} diff --git a/weatherservices/weather/widget.go b/weatherservices/weather/widget.go index fcfb3904..2d7448e3 100644 --- a/weatherservices/weather/widget.go +++ b/weatherservices/weather/widget.go @@ -1,13 +1,11 @@ package weather import ( - //"fmt" "os" owm "github.com/briandowns/openweathermap" "github.com/gdamore/tcell" "github.com/rivo/tview" - //"github.com/senorprogrammer/wtf/logger" "github.com/senorprogrammer/wtf/wtf" ) From ddd3eb9625e4d1d085f0cad954b3a45c06df1b21 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Tue, 31 Jul 2018 14:03:12 -0700 Subject: [PATCH 03/19] Clean up the Jira module's API credentials loading --- jira/client.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jira/client.go b/jira/client.go index b28ec616..231f6746 100644 --- a/jira/client.go +++ b/jira/client.go @@ -57,11 +57,17 @@ func buildJql(key string, value string) string { func jiraRequest(path string) (*http.Response, error) { url := fmt.Sprintf("%s%s", wtf.Config.UString("wtf.mods.jira.domain"), path) + apiKey := wtf.Config.UString( + "wtf.mods.jira.apiKey", + os.Getenv("WTF_JIRA_API_KEY"), + ) + req, err := http.NewRequest("GET", url, nil) if err != nil { return nil, err } - req.SetBasicAuth(wtf.Config.UString("wtf.mods.jira.email"), os.Getenv("WTF_JIRA_API_KEY")) + //req.SetBasicAuth(wtf.Config.UString("wtf.mods.jira.email"), os.Getenv("WTF_JIRA_API_KEY")) + req.SetBasicAuth(wtf.Config.UString("wtf.mods.jira.email"), apiKey) verifyServerCertificate := wtf.Config.UBool("wtf.mods.jira.verifyServerCertificate", true) httpClient := &http.Client{Transport: &http.Transport{ From a1c528e4d5e2a9339cb3564dbafd2819602c46b3 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Tue, 31 Jul 2018 14:17:30 -0700 Subject: [PATCH 04/19] Clean up the NewRelic module's API credentials loading --- newrelic/client.go | 11 +++++++++-- newrelic/widget.go | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/newrelic/client.go b/newrelic/client.go index f88d4e3e..e3937338 100644 --- a/newrelic/client.go +++ b/newrelic/client.go @@ -8,7 +8,7 @@ import ( ) func Application() (*nr.Application, error) { - client := nr.NewClient(os.Getenv("WTF_NEW_RELIC_API_KEY")) + client := nr.NewClient(apiKey()) application, err := client.GetApplication(wtf.Config.UInt("wtf.mods.newrelic.applicationId")) if err != nil { @@ -19,7 +19,7 @@ func Application() (*nr.Application, error) { } func Deployments() ([]nr.ApplicationDeployment, error) { - client := nr.NewClient(os.Getenv("WTF_NEW_RELIC_API_KEY")) + client := nr.NewClient(apiKey()) opts := &nr.ApplicationDeploymentOptions{Page: 1} deployments, err := client.GetApplicationDeployments(wtf.Config.UInt("wtf.mods.newrelic.applicationId"), opts) @@ -29,3 +29,10 @@ func Deployments() ([]nr.ApplicationDeployment, error) { return deployments, nil } + +func apiKey() string { + return wtf.Config.UString( + "wtf.mods.newrelic.apiKey", + os.Getenv("WTF_NEW_RELIC_API_KEY"), + ) +} diff --git a/newrelic/widget.go b/newrelic/widget.go index 8c4fd8b7..84bdb6bf 100644 --- a/newrelic/widget.go +++ b/newrelic/widget.go @@ -31,7 +31,7 @@ func (widget *Widget) Refresh() { } widget.UpdateRefreshedAt() - widget.View.SetTitle(fmt.Sprintf("%s- [green]%s[white]", widget.Name, appName)) + widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - [green]%s[white]", widget.Name, appName))) widget.View.Clear() var content string From f880c0ef1907196a93490206c23930b19429b526 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Tue, 31 Jul 2018 14:21:02 -0700 Subject: [PATCH 05/19] Clean up the OpsGenie module's API credentials loading --- opsgenie/client.go | 12 ++++++++++-- opsgenie/widget.go | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/opsgenie/client.go b/opsgenie/client.go index 59ba2b90..b2a980cf 100644 --- a/opsgenie/client.go +++ b/opsgenie/client.go @@ -5,6 +5,8 @@ import ( "fmt" "net/http" "os" + + "github.com/senorprogrammer/wtf/wtf" ) type OnCallResponse struct { @@ -28,16 +30,22 @@ type Parent struct { /* -------------------- Exported Functions -------------------- */ func Fetch() (*OnCallResponse, error) { - apiKey := os.Getenv("WTF_OPS_GENIE_API_KEY") scheduleUrl := "https://api.opsgenie.com/v2/schedules/on-calls?flat=true" - response, err := opsGenieRequest(scheduleUrl, apiKey) + response, err := opsGenieRequest(scheduleUrl, apiKey()) return response, err } /* -------------------- Unexported Functions -------------------- */ +func apiKey() string { + return wtf.Config.UString( + "wtf.mods.opsgenie.apiKey", + os.Getenv("WTF_OPS_GENIE_API_KEY"), + ) +} + func opsGenieRequest(url string, apiKey string) (*OnCallResponse, error) { req, err := http.NewRequest("GET", url, nil) if err != nil { diff --git a/opsgenie/widget.go b/opsgenie/widget.go index c95b7dcd..aab56db3 100644 --- a/opsgenie/widget.go +++ b/opsgenie/widget.go @@ -25,7 +25,7 @@ func (widget *Widget) Refresh() { data, err := Fetch() widget.UpdateRefreshedAt() - widget.View.SetTitle(widget.Name) + widget.View.SetTitle(widget.ContextualTitle(widget.Name)) var content string if err != nil { From 4e905700b93adac881215836ec1b0060c56c4655 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Tue, 31 Jul 2018 14:30:29 -0700 Subject: [PATCH 06/19] Clean up the Todoist module's API credentials loading --- todoist/widget.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/todoist/widget.go b/todoist/widget.go index 6ee4f202..c10da595 100644 --- a/todoist/widget.go +++ b/todoist/widget.go @@ -44,7 +44,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages) *Widget { pages: pages, } - todoist.Token = os.Getenv("WTF_TODOIST_TOKEN") + widget.loadAPICredentials() widget.projects = loadProjects() widget.View.SetInputCapture(widget.keyboardIntercept) @@ -170,7 +170,13 @@ func (w *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey { return event } -// TODO: Rename this List to Projects so the internal can be Checklist +func (widget *Widget) loadAPICredentials() { + todoist.Token = wtf.Config.UString( + "wtf.mods.todoist.apiKey", + os.Getenv("WTF_TODOIST_TOKEN"), + ) +} + func loadProjects() []*Project { projects := []*Project{} From 9059b73c5194f46ad66bd11d2e806bf90e606d17 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Tue, 31 Jul 2018 14:34:18 -0700 Subject: [PATCH 07/19] Clean up the BambooHR module's API credentials loading --- bamboohr/client.go | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/bamboohr/client.go b/bamboohr/client.go index fd8664d0..532342bd 100644 --- a/bamboohr/client.go +++ b/bamboohr/client.go @@ -4,6 +4,8 @@ import ( "encoding/xml" "fmt" "os" + + "github.com/senorprogrammer/wtf/wtf" ) // A Client represents the data required to connect to the BambooHR API @@ -16,11 +18,13 @@ type Client struct { // NewClient creates and returns a new BambooHR client func NewClient(url string) *Client { client := Client{ - apiBase: url, - apiKey: os.Getenv("WTF_BAMBOO_HR_TOKEN"), - subdomain: os.Getenv("WTF_BAMBOO_HR_SUBDOMAIN"), + apiBase: url, + //apiKey: os.Getenv("WTF_BAMBOO_HR_TOKEN"), + //subdomain: os.Getenv("WTF_BAMBOO_HR_SUBDOMAIN"), } + client.loadAPICredentials() + return &client } @@ -60,3 +64,15 @@ func (client *Client) away(startDate, endDate string) (cal Calendar, err error) return } + +func (client *Client) loadAPICredentials() { + client.apiKey = wtf.Config.UString( + "wtf.mods.bamboohr.apiKey", + os.Getenv("WTF_BAMBOO_HR_TOKEN"), + ) + + client.subdomain = wtf.Config.UString( + "wtf.mods.bamboohr.subdomain", + os.Getenv("WTF_BAMBOO_HR_SUBDOMAIN"), + ) +} From ebad879e0ac4c8f193866f9ea5612f7f71a3b919 Mon Sep 17 00:00:00 2001 From: Chris Cummer Date: Tue, 31 Jul 2018 14:48:26 -0700 Subject: [PATCH 08/19] Add new documentation for config API key modules --- _site/content/posts/modules/bamboohr.md | 18 +++++----- _site/content/posts/modules/github.md | 32 +++++++++--------- _site/content/posts/modules/jira.md | 10 +++--- _site/content/posts/modules/newrelic.md | 10 +++--- _site/content/posts/modules/opsgenie.md | 10 +++--- _site/content/posts/modules/todoist.md | 11 +++--- docs/index.xml | 45 +++++++++++++------------ docs/posts/index.xml | 45 +++++++++++++------------ docs/posts/modules/bamboohr/index.html | 20 +++++------ docs/posts/modules/github/index.html | 32 +++++++++--------- docs/posts/modules/jira/index.html | 10 +++--- docs/posts/modules/newrelic/index.html | 10 +++--- docs/posts/modules/opsgenie/index.html | 10 +++--- docs/posts/modules/todoist/index.html | 11 +++--- 14 files changed, 129 insertions(+), 145 deletions(-) diff --git a/_site/content/posts/modules/bamboohr.md b/_site/content/posts/modules/bamboohr.md index 2ca3e35f..6d75f242 100644 --- a/_site/content/posts/modules/bamboohr.md +++ b/_site/content/posts/modules/bamboohr.md @@ -12,14 +12,6 @@ Connects to the BambooHR API and displays who will be Away today. wtf/bamboohr/ ``` -## Required ENV Variables - -Key: `WTF_BAMBOO_HR_TOKEN`
-Value: Your BambooHR API token. - -Key: `WTF_BAMBOO_HR_SUBDOMAIN`
-Value: Your BambooHR API subdomain name. - ## Keyboard Commands None. @@ -28,6 +20,7 @@ None. ```yaml bamboohr: + apiKey: "3276d7155dd9ee27b8b14f8743a408a9" enabled: true position: top: 0 @@ -35,12 +28,16 @@ bamboohr: height: 2 width: 1 refreshInterval: 900 + subdomain: "testco" ``` ### Attributes +`apiKey`
+Value: Your BambooHR API token. + `enabled`
-Determines whether or not this module is executed and if its data displayed onscreen.
+Whether or not this module is executed and if its data displayed onscreen.
Values: `true`, `false`. `position`
@@ -49,3 +46,6 @@ Defines where in the grid this module's widget will be displayed.
`refreshInterval`
How often, in seconds, this module will update its data.
Values: Any positive integer, `0..n`. + +`subdomain`
+Value: Your BambooHR API subdomain name. diff --git a/_site/content/posts/modules/github.md b/_site/content/posts/modules/github.md index 3c54b776..bc80f930 100644 --- a/_site/content/posts/modules/github.md +++ b/_site/content/posts/modules/github.md @@ -23,22 +23,6 @@ All open pull requests created by you. wtf/github/ ``` -## GitHub Required ENV Variables - -Key: `WTF_GITHUB_TOKEN`
-Action: Your GitHub API token. - -## GitHub Enterprise Required ENV Variables - -Key: `WTF_GITHUB_TOKEN`
-Action: Your GitHub API token. - -Key: `WTF_GITHUB_BASE_URL`
-Action: Your GitHub Enterprise API URL. - -Key: `WTF_GITHUB_UPLOAD_URL`
-Action: Your GitHub Enterprise upload URL (often the same as API URL). - ## Keyboard Commands Key: `/`
@@ -60,6 +44,8 @@ wtf/github/ ```yaml github: + apiKey: "3276d7155dd9ee27b8b14f8743a408a9" + baseURL: "" enabled: true enableStatus: true position: @@ -71,13 +57,21 @@ github: repositories: wesker-api: "UmbrellaCorp" wtf: "senorprogrammer" + uploadURL: "" username: "senorprogrammer" ``` ### Attributes +`apiKey`
+Value: Your GitHub API token. + +`baseURL`
+_Optional_
+Value: Your GitHub Enterprise API URL. + `enabled`
-Determines whether or not this module is executed and if its data displayed onscreen.
+Whether or not this module is executed and if its data displayed onscreen.
Values: `true`, `false`. `enableStatus`
@@ -98,6 +92,10 @@ for.
Key: The name of the repository.
Value: The name of the account or organization that owns the repository. +`uploadURL`
+_Optional_
+Value: Your GitHub Enterprise upload URL (often the same as API URL). + `username`
Your GitHub username. Used to figure out which review requests you've been added to. diff --git a/_site/content/posts/modules/jira.md b/_site/content/posts/modules/jira.md index 081f4a31..71a6f988 100644 --- a/_site/content/posts/modules/jira.md +++ b/_site/content/posts/modules/jira.md @@ -14,11 +14,6 @@ Displays all Jira issues assigned to you for the specified project. wtf/jira/ ``` -## Required ENV Variables - -Key: `WTF_JIRA_API_KEY`
-Value: Your Jira API key. - ## Keyboard Commands Key: `[return]`
@@ -42,6 +37,7 @@ wtf/jira/ ```yaml jira: + apiKey: "3276d7155dd9ee27b8b14f8743a408a9" colors: rows: even: "lightblue" @@ -68,6 +64,7 @@ configuration (note the difference in `project`): ```yaml jira: + apiKey: "3276d7155dd9ee27b8b14f8743a408a9" colors: rows: even: "lightblue" @@ -89,6 +86,9 @@ jira: ### Attributes +`apiKey`
+Value: Your Jira API key. + `colors.rows.even`
Define the foreground color for even-numbered rows.
Values: Any X11 diff --git a/_site/content/posts/modules/newrelic.md b/_site/content/posts/modules/newrelic.md index e7eb1fbc..9d2881d3 100644 --- a/_site/content/posts/modules/newrelic.md +++ b/_site/content/posts/modules/newrelic.md @@ -15,12 +15,6 @@ monitored application: deploy ID, deploy time, and who deployed it. wtf/newrelic/ ``` -## Required ENV Variables - -Key: `WTF_NEW_RELIC_API_KEY`
-Value: Your
New Relic API -token. - ## Keyboard Commands None. @@ -29,6 +23,7 @@ None. ```yaml newrelic: + apiKey: "3276d7155dd9ee27b8b14f8743a408a9" applicationId: 10549735 deployCount: 6 enabled: true @@ -42,6 +37,9 @@ newrelic: ### Attributes +`apiKey`
+Value: Your New Relic API token. + `applicationId`
The integer ID of the New Relic application you wish to report on.
diff --git a/_site/content/posts/modules/opsgenie.md b/_site/content/posts/modules/opsgenie.md index 5d34d4be..ac18411b 100644 --- a/_site/content/posts/modules/opsgenie.md +++ b/_site/content/posts/modules/opsgenie.md @@ -15,12 +15,6 @@ and who's currently on call. wtf/opsgenie/ ``` -## Required ENV Variables - -Key: `WTF_OPS_GENIE_API_KEY`
-Value: Your OpsGenie -API token. - ## Keyboard Commands None. @@ -29,6 +23,7 @@ None. ```yaml opsgenie: + apiKey: "3276d7155dd9ee27b8b14f8743a408a9" displayEmpty: false enabled: true position: @@ -41,6 +36,9 @@ opsgenie: ### Attributes +`apiKey` < br /> +Value: Your OpsGenie API token. + `displayEmpty`
Whether schedules with no assigned person on-call should be displayed.
Values: `true`, `false`. diff --git a/_site/content/posts/modules/todoist.md b/_site/content/posts/modules/todoist.md index 9381b5b8..9326313d 100644 --- a/_site/content/posts/modules/todoist.md +++ b/_site/content/posts/modules/todoist.md @@ -16,13 +16,6 @@ Displays all items on specified project. wtf/todoist/ ``` -## Required ENV Variables - -Key: `WTF_TODOIST_TOKEN`
-Value: Your Todoist API Token.
- -_You can get your API Token at: todoist.com/prefs/integrations._ - ## Keyboard Commands Key: `h`
@@ -62,6 +55,7 @@ _You can get your API Token at: todoist.com/prefs/integrations._ ```yaml todoist: + apiKey: "3276d7155dd9ee27b8b14f8743a408a9" enabled: true position: top: 0 @@ -75,6 +69,9 @@ todoist: ### Attributes +`apiKey`
+Value: Your Todoist API token. + `enabled`
Determines whether or not this module is executed and if its data displayed onscreen.
Values: `true`, `false`. diff --git a/docs/index.xml b/docs/index.xml index 5a8d124a..c36ed99b 100644 --- a/docs/index.xml +++ b/docs/index.xml @@ -49,12 +49,13 @@ position Defines where in the grid this module&rsquo;s widget will be displa https://wtfutil.com/posts/modules/todoist/ Added in v0.0.11. Displays all items on specified project. -Source Code wtf/todoist/ Required ENV Variables Key: WTF_TODOIST_TOKEN Value: Your Todoist API Token. You can get your API Token at: todoist.com/prefs/integrations. -Keyboard Commands Key: h Action: Show the previous project. +Source Code wtf/todoist/ Keyboard Commands Key: h Action: Show the previous project. Key: ← Action: Show the previous project. Key: l Action: Show the next project. Key: → Action: Show the next project. -Key: j Action: Select the next item in the list. +Key: j Action: Select the next item in the list. +Key: ↓ Action: Select the next item in the list. +Key: k Action: Select the previous item in the list. @@ -339,12 +340,12 @@ Key: j Action: Select the next item in the list. https://wtfutil.com/posts/modules/jira/ Displays all Jira issues assigned to you for the specified project. -Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key. -Keyboard Commands Key: [return] Action: Open the selected issue in the browser. +Source Code wtf/jira/ Keyboard Commands Key: [return] Action: Open the selected issue in the browser. Key: j Action: Select the next item in the list. Key: k Action: Select the previous item in the list. Key: ↓ Action: Select the next item in the list. -Key: ↑ Action: Select the previous item in the list. +Key: ↑ Action: Select the previous item in the list. +Configuration Single Jira Project jira:apiKey:&#34;3276d7155dd9ee27b8b14f8743a408a9&#34;colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp. @@ -382,10 +383,11 @@ Configuration gcal:colors:title:&#34;red&#34;description:&#34;lightb Displays information about your git repositories hosted on GitHub: Open Review Requests All open code review requests assigned to you. Open Pull Requests All open pull requests created by you. -Source Code wtf/github/ GitHub Required ENV Variables Key: WTF_GITHUB_TOKEN Action: Your GitHub API token. -GitHub Enterprise Required ENV Variables Key: WTF_GITHUB_TOKEN Action: Your GitHub API token. -Key: WTF_GITHUB_BASE_URL Action: Your GitHub Enterprise API URL. -Key: WTF_GITHUB_UPLOAD_URL Action: Your GitHub Enterprise upload URL (often the same as API URL). +Source Code wtf/github/ Keyboard Commands Key: / Action: Open/close the widget&rsquo;s help window. +Key: h Action: Show the previous git repository. +Key: l Action: Show the next git repository. +Key: ← Action: Show the previous git repository. +Key: → Action: Show the next git repository. @@ -438,10 +440,10 @@ filePath The path to the file to be displayed in the widget. https://wtfutil.com/posts/modules/newrelic/ Connects to the New Relic API and displays the last n deploys of the monitored application: deploy ID, deploy time, and who deployed it. -Source Code wtf/newrelic/ Required ENV Variables Key: WTF_NEW_RELIC_API_KEY Value: Your New Relic API token. -Keyboard Commands None. -Configuration newrelic:applicationId:10549735deployCount:6enabled:trueposition:top:4left:3height:1width:2refreshInterval:900 Attributes applicationId The integer ID of the New Relic application you wish to report on. Values: A positive integer, 0..n. -deployCount The number of past deploys to display on screen. +Source Code wtf/newrelic/ Keyboard Commands None. +Configuration newrelic:apiKey:&#34;3276d7155dd9ee27b8b14f8743a408a9&#34;applicationId:10549735deployCount:6enabled:trueposition:top:4left:3height:1width:2refreshInterval:900 Attributes apiKey Value: Your New Relic API token. +applicationId The integer ID of the New Relic application you wish to report on. Values: A positive integer, 0..n. +deployCount The number of past deploys to display on screen. Values: A positive integer, 0. @@ -451,9 +453,9 @@ deployCount The number of past deploys to display on screen. https://wtfutil.com/posts/modules/opsgenie/ Connects to the OpsGenie API and displays all your scheduled rotations and who&rsquo;s currently on call. -Source Code wtf/opsgenie/ Required ENV Variables Key: WTF_OPS_GENIE_API_KEY Value: Your OpsGenie API token. -Keyboard Commands None. -Configuration opsgenie:displayEmpty:falseenabled:trueposition:top:2left:1height:2width:1refreshInterval:21600 Attributes displayEmpty Whether schedules with no assigned person on-call should be displayed. Values: true, false. +Source Code wtf/opsgenie/ Keyboard Commands None. +Configuration opsgenie:apiKey:&#34;3276d7155dd9ee27b8b14f8743a408a9&#34;displayEmpty:falseenabled:trueposition:top:2left:1height:2width:1refreshInterval:21600 Attributes apiKey &lt; br /&gt; Value: Your OpsGenie API token. +displayEmpty Whether schedules with no assigned person on-call should be displayed. Values: true, false. enabled Whether or not this module is executed and if its data displayed onscreen. Values: true, false. position Where in the grid this module&rsquo;s widget will be displayed. @@ -475,11 +477,10 @@ Wifi Network The name of the current network Whether or not the network uses enc https://wtfutil.com/posts/modules/bamboohr/ Connects to the BambooHR API and displays who will be Away today. -Source Code wtf/bamboohr/ Required ENV Variables Key: WTF_BAMBOO_HR_TOKEN Value: Your BambooHR API token. -Key: WTF_BAMBOO_HR_SUBDOMAIN Value: Your BambooHR API subdomain name. -Keyboard Commands None. -Configuration bamboohr:enabled:trueposition:top:0left:1height:2width:1refreshInterval:900 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false. -position Defines where in the grid this module&rsquo;s widget will be displayed. refreshInterval How often, in seconds, this module will update its data. +Source Code wtf/bamboohr/ Keyboard Commands None. +Configuration bamboohr:apiKey:&#34;3276d7155dd9ee27b8b14f8743a408a9&#34;enabled:trueposition:top:0left:1height:2width:1refreshInterval:900subdomain:&#34;testco&#34; Attributes apiKey Value: Your BambooHR API token. +enabled Whether or not this module is executed and if its data displayed onscreen. Values: true, false. +position Defines where in the grid this module&rsquo;s widget will be displayed. refreshInterval How often, in seconds, this module will update its data. Values: Any positive integer, 0. diff --git a/docs/posts/index.xml b/docs/posts/index.xml index 1f86265b..24b26896 100644 --- a/docs/posts/index.xml +++ b/docs/posts/index.xml @@ -49,12 +49,13 @@ position Defines where in the grid this module&rsquo;s widget will be displa https://wtfutil.com/posts/modules/todoist/ Added in v0.0.11. Displays all items on specified project. -Source Code wtf/todoist/ Required ENV Variables Key: WTF_TODOIST_TOKEN Value: Your Todoist API Token. You can get your API Token at: todoist.com/prefs/integrations. -Keyboard Commands Key: h Action: Show the previous project. +Source Code wtf/todoist/ Keyboard Commands Key: h Action: Show the previous project. Key: ← Action: Show the previous project. Key: l Action: Show the next project. Key: → Action: Show the next project. -Key: j Action: Select the next item in the list. +Key: j Action: Select the next item in the list. +Key: ↓ Action: Select the next item in the list. +Key: k Action: Select the previous item in the list. @@ -339,12 +340,12 @@ Key: j Action: Select the next item in the list. https://wtfutil.com/posts/modules/jira/ Displays all Jira issues assigned to you for the specified project. -Source Code wtf/jira/ Required ENV Variables Key: WTF_JIRA_API_KEY Value: Your Jira API key. -Keyboard Commands Key: [return] Action: Open the selected issue in the browser. +Source Code wtf/jira/ Keyboard Commands Key: [return] Action: Open the selected issue in the browser. Key: j Action: Select the next item in the list. Key: k Action: Select the previous item in the list. Key: ↓ Action: Select the next item in the list. -Key: ↑ Action: Select the previous item in the list. +Key: ↑ Action: Select the previous item in the list. +Configuration Single Jira Project jira:apiKey:&#34;3276d7155dd9ee27b8b14f8743a408a9&#34;colors:rows:even:&#34;lightblue&#34;odd:&#34;white&#34;domain:&#34;https://umbrellacorp. @@ -382,10 +383,11 @@ Configuration gcal:colors:title:&#34;red&#34;description:&#34;lightb Displays information about your git repositories hosted on GitHub: Open Review Requests All open code review requests assigned to you. Open Pull Requests All open pull requests created by you. -Source Code wtf/github/ GitHub Required ENV Variables Key: WTF_GITHUB_TOKEN Action: Your GitHub API token. -GitHub Enterprise Required ENV Variables Key: WTF_GITHUB_TOKEN Action: Your GitHub API token. -Key: WTF_GITHUB_BASE_URL Action: Your GitHub Enterprise API URL. -Key: WTF_GITHUB_UPLOAD_URL Action: Your GitHub Enterprise upload URL (often the same as API URL). +Source Code wtf/github/ Keyboard Commands Key: / Action: Open/close the widget&rsquo;s help window. +Key: h Action: Show the previous git repository. +Key: l Action: Show the next git repository. +Key: ← Action: Show the previous git repository. +Key: → Action: Show the next git repository. @@ -438,10 +440,10 @@ filePath The path to the file to be displayed in the widget. https://wtfutil.com/posts/modules/newrelic/ Connects to the New Relic API and displays the last n deploys of the monitored application: deploy ID, deploy time, and who deployed it. -Source Code wtf/newrelic/ Required ENV Variables Key: WTF_NEW_RELIC_API_KEY Value: Your New Relic API token. -Keyboard Commands None. -Configuration newrelic:applicationId:10549735deployCount:6enabled:trueposition:top:4left:3height:1width:2refreshInterval:900 Attributes applicationId The integer ID of the New Relic application you wish to report on. Values: A positive integer, 0..n. -deployCount The number of past deploys to display on screen. +Source Code wtf/newrelic/ Keyboard Commands None. +Configuration newrelic:apiKey:&#34;3276d7155dd9ee27b8b14f8743a408a9&#34;applicationId:10549735deployCount:6enabled:trueposition:top:4left:3height:1width:2refreshInterval:900 Attributes apiKey Value: Your New Relic API token. +applicationId The integer ID of the New Relic application you wish to report on. Values: A positive integer, 0..n. +deployCount The number of past deploys to display on screen. Values: A positive integer, 0. @@ -451,9 +453,9 @@ deployCount The number of past deploys to display on screen. https://wtfutil.com/posts/modules/opsgenie/ Connects to the OpsGenie API and displays all your scheduled rotations and who&rsquo;s currently on call. -Source Code wtf/opsgenie/ Required ENV Variables Key: WTF_OPS_GENIE_API_KEY Value: Your OpsGenie API token. -Keyboard Commands None. -Configuration opsgenie:displayEmpty:falseenabled:trueposition:top:2left:1height:2width:1refreshInterval:21600 Attributes displayEmpty Whether schedules with no assigned person on-call should be displayed. Values: true, false. +Source Code wtf/opsgenie/ Keyboard Commands None. +Configuration opsgenie:apiKey:&#34;3276d7155dd9ee27b8b14f8743a408a9&#34;displayEmpty:falseenabled:trueposition:top:2left:1height:2width:1refreshInterval:21600 Attributes apiKey &lt; br /&gt; Value: Your OpsGenie API token. +displayEmpty Whether schedules with no assigned person on-call should be displayed. Values: true, false. enabled Whether or not this module is executed and if its data displayed onscreen. Values: true, false. position Where in the grid this module&rsquo;s widget will be displayed. @@ -475,11 +477,10 @@ Wifi Network The name of the current network Whether or not the network uses enc https://wtfutil.com/posts/modules/bamboohr/ Connects to the BambooHR API and displays who will be Away today. -Source Code wtf/bamboohr/ Required ENV Variables Key: WTF_BAMBOO_HR_TOKEN Value: Your BambooHR API token. -Key: WTF_BAMBOO_HR_SUBDOMAIN Value: Your BambooHR API subdomain name. -Keyboard Commands None. -Configuration bamboohr:enabled:trueposition:top:0left:1height:2width:1refreshInterval:900 Attributes enabled Determines whether or not this module is executed and if its data displayed onscreen. Values: true, false. -position Defines where in the grid this module&rsquo;s widget will be displayed. refreshInterval How often, in seconds, this module will update its data. +Source Code wtf/bamboohr/ Keyboard Commands None. +Configuration bamboohr:apiKey:&#34;3276d7155dd9ee27b8b14f8743a408a9&#34;enabled:trueposition:top:0left:1height:2width:1refreshInterval:900subdomain:&#34;testco&#34; Attributes apiKey Value: Your BambooHR API token. +enabled Whether or not this module is executed and if its data displayed onscreen. Values: true, false. +position Defines where in the grid this module&rsquo;s widget will be displayed. refreshInterval How often, in seconds, this module will update its data. Values: Any positive integer, 0. diff --git a/docs/posts/modules/bamboohr/index.html b/docs/posts/modules/bamboohr/index.html index f3b3a664..efe6ef24 100644 --- a/docs/posts/modules/bamboohr/index.html +++ b/docs/posts/modules/bamboohr/index.html @@ -141,31 +141,28 @@ height="0" width="0" style="display:none;visibility:hidden">

Source Code

wtf/bamboohr/
-

Required ENV Variables

- -

Key: WTF_BAMBOO_HR_TOKEN
-Value: Your BambooHR API token.

- -

Key: WTF_BAMBOO_HR_SUBDOMAIN
-Value: Your BambooHR API subdomain name.

-

Keyboard Commands

None.

Configuration

bamboohr:
+  apiKey: "3276d7155dd9ee27b8b14f8743a408a9"
   enabled: true
   position:
     top: 0
     left: 1
     height: 2
     width: 1
-  refreshInterval: 900
+ refreshInterval: 900 + subdomain: "testco"

Attributes

+

apiKey
+Value: Your BambooHR API token.

+

enabled
-Determines whether or not this module is executed and if its data displayed onscreen.
+Whether or not this module is executed and if its data displayed onscreen.
Values: true, false.

position
@@ -175,6 +172,9 @@ Defines where in the grid this module’s widget will be displayed.
Values: Any positive integer, 0..n.

+

subdomain
+Value: Your BambooHR API subdomain name.

+