serverless-plugin-cloudwatch
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "serverless-plugin-cloudwatch", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Generate CloudWatch Dashboard including widgets with configured metrics", | ||
@@ -5,0 +5,0 @@ "main": "src/DashboardPlugin.js", |
@@ -22,6 +22,4 @@ 'use strict' | ||
const lambdaConfig = this.getLambdaConfig() | ||
this.logger(`dev log: create widgets for ${this.functions}, ${Object.values(this.functions)}`) | ||
const functionNames = this.getFunctionNames() | ||
// there must at least one entry of widgets with a not empty metrics array | ||
this.logger(`dev log: functionNames ${functionNames}`) | ||
if (ArrayUtil.notEmpty(functionNames, lambdaConfig.widgets[0].metrics)) { | ||
@@ -69,3 +67,3 @@ return this.doCreateLambdaWidgets(functionNames, lambdaConfig) | ||
getFunctionNames () { | ||
const allEnabled = this.getConfig().enabled | ||
const allEnabled = this.getLambdaConfig().enabled | ||
const isEnabled = functionEnabled => (allEnabled && functionEnabled !== false) || functionEnabled | ||
@@ -75,3 +73,6 @@ | ||
.filter(f => isEnabled(f.dashboard)) | ||
.map(f => f.name) | ||
.map(f => { | ||
this.logger(`Dev Log Functionnames: ${f} name ${f.name} object key 0 ${Object.keys(f)[0]} object key 1 ${Object.keys(f)[0]}` ) | ||
f.name | ||
} ) | ||
} | ||
@@ -78,0 +79,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
33959
765