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
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 typeSingleValueWidgetProps
, 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