cdklabs / cdk-monitoring-constructs

Easy-to-use CDK constructs for monitoring your AWS infrastructure
https://constructs.dev/packages/cdk-monitoring-constructs
Apache License 2.0
480 stars 70 forks source link

fix: Add missing graph properties for single-value custom widgets #327

Closed edisongustavo closed 1 year ago

edisongustavo commented 1 year ago

CustomWidgets with a Single Value type didn't have all properties correctly set, such as the title.

The createGraphWidget() method is safe to be called like this because although its props: GraphWidgetProps parameter is not directly compatible with type type SingleValueWidgetProps, the parameters are being filled in CustomMonitoring.createCustomMetricGroupWidgets(), which only contains fields from their common supertype (MetricWidgetProps), therefore making the fields compatible.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license