mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Cleaner config format and added simple_config.yml example
This commit is contained in:
committed by
Chris Cummer
parent
948d5acb2a
commit
27a267b123
@@ -9,7 +9,7 @@ import (
|
||||
func Application() (*nr.Application, error) {
|
||||
client := nr.NewClient(os.Getenv("WTF_NEW_RELIC_API_KEY"))
|
||||
|
||||
application, err := client.GetApplication(Config.UInt("wtf.newrelic.applicationId"))
|
||||
application, err := client.GetApplication(Config.UInt("wtf.mods.newrelic.applicationId"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -21,7 +21,7 @@ func Deployments() ([]nr.ApplicationDeployment, error) {
|
||||
client := nr.NewClient(os.Getenv("WTF_NEW_RELIC_API_KEY"))
|
||||
|
||||
opts := &nr.ApplicationDeploymentOptions{Page: 1}
|
||||
deployments, err := client.GetApplicationDeployments(Config.UInt("wtf.newrelic.applicationId"), opts)
|
||||
deployments, err := client.GetApplicationDeployments(Config.UInt("wtf.mods.newrelic.applicationId"), opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ func (widget *Widget) contentFrom(deploys []nr.ApplicationDeployment) string {
|
||||
|
||||
revisions = append(revisions, deploy.Revision)
|
||||
|
||||
if len(revisions) == Config.UInt("wtf.newrelic.deployCount", 5) {
|
||||
if len(revisions) == Config.UInt("wtf.mods.newrelic.deployCount", 5) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user