UNPKG

35 kBJavaScriptView Raw
1"use strict";
2var _a, _b, _c, _d, _e;
3Object.defineProperty(exports, "__esModule", { value: true });
4exports.LegendPosition = exports.Color = exports.Shading = exports.CustomWidget = exports.SingleValueWidget = exports.GraphWidget = exports.GraphWidgetView = exports.AlarmWidget = void 0;
5const jsiiDeprecationWarnings = require("../.warnings.jsii.js");
6const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
7const cdk = require("@aws-cdk/core");
8const rendering_1 = require("./private/rendering");
9const widget_1 = require("./widget");
10/**
11 * Display the metric associated with an alarm, including the alarm line
12 */
13class AlarmWidget extends widget_1.ConcreteWidget {
14 constructor(props) {
15 super(props.width || 6, props.height || 6);
16 try {
17 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_AlarmWidgetProps(props);
18 }
19 catch (error) {
20 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
21 Error.captureStackTrace(error, AlarmWidget);
22 }
23 throw error;
24 }
25 this.props = props;
26 }
27 toJson() {
28 return [{
29 type: 'metric',
30 width: this.width,
31 height: this.height,
32 x: this.x,
33 y: this.y,
34 properties: {
35 view: 'timeSeries',
36 title: this.props.title,
37 region: this.props.region || cdk.Aws.REGION,
38 annotations: {
39 alarms: [this.props.alarm.alarmArn],
40 },
41 yAxis: {
42 left: this.props.leftYAxis ?? undefined,
43 },
44 },
45 }];
46 }
47}
48exports.AlarmWidget = AlarmWidget;
49_a = JSII_RTTI_SYMBOL_1;
50AlarmWidget[_a] = { fqn: "@aws-cdk/aws-cloudwatch.AlarmWidget", version: "1.198.0" };
51/**
52 * Types of view
53 */
54var GraphWidgetView;
55(function (GraphWidgetView) {
56 /**
57 * Display as a line graph.
58 */
59 GraphWidgetView["TIME_SERIES"] = "timeSeries";
60 /**
61 * Display as a bar graph.
62 */
63 GraphWidgetView["BAR"] = "bar";
64 /**
65 * Display as a pie graph.
66 */
67 GraphWidgetView["PIE"] = "pie";
68})(GraphWidgetView = exports.GraphWidgetView || (exports.GraphWidgetView = {}));
69/**
70 * A dashboard widget that displays metrics
71 */
72class GraphWidget extends widget_1.ConcreteWidget {
73 constructor(props) {
74 super(props.width || 6, props.height || 6);
75 try {
76 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_GraphWidgetProps(props);
77 }
78 catch (error) {
79 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
80 Error.captureStackTrace(error, GraphWidget);
81 }
82 throw error;
83 }
84 this.props = props;
85 this.leftMetrics = props.left ?? [];
86 this.rightMetrics = props.right ?? [];
87 this.copyMetricWarnings(...this.leftMetrics, ...this.rightMetrics);
88 }
89 /**
90 * Add another metric to the left Y axis of the GraphWidget
91 *
92 * @param metric the metric to add
93 */
94 addLeftMetric(metric) {
95 try {
96 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_IMetric(metric);
97 }
98 catch (error) {
99 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
100 Error.captureStackTrace(error, this.addLeftMetric);
101 }
102 throw error;
103 }
104 this.leftMetrics.push(metric);
105 this.copyMetricWarnings(metric);
106 }
107 /**
108 * Add another metric to the right Y axis of the GraphWidget
109 *
110 * @param metric the metric to add
111 */
112 addRightMetric(metric) {
113 try {
114 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_IMetric(metric);
115 }
116 catch (error) {
117 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
118 Error.captureStackTrace(error, this.addRightMetric);
119 }
120 throw error;
121 }
122 this.rightMetrics.push(metric);
123 this.copyMetricWarnings(metric);
124 }
125 toJson() {
126 const horizontalAnnotations = [
127 ...(this.props.leftAnnotations || []).map(mapAnnotation('left')),
128 ...(this.props.rightAnnotations || []).map(mapAnnotation('right')),
129 ];
130 const metrics = rendering_1.allMetricsGraphJson(this.leftMetrics, this.rightMetrics);
131 return [{
132 type: 'metric',
133 width: this.width,
134 height: this.height,
135 x: this.x,
136 y: this.y,
137 properties: {
138 view: this.props.view ?? GraphWidgetView.TIME_SERIES,
139 title: this.props.title,
140 region: this.props.region || cdk.Aws.REGION,
141 stacked: this.props.stacked,
142 metrics: metrics.length > 0 ? metrics : undefined,
143 annotations: horizontalAnnotations.length > 0 ? { horizontal: horizontalAnnotations } : undefined,
144 yAxis: {
145 left: this.props.leftYAxis ?? undefined,
146 right: this.props.rightYAxis ?? undefined,
147 },
148 legend: this.props.legendPosition !== undefined ? { position: this.props.legendPosition } : undefined,
149 liveData: this.props.liveData,
150 setPeriodToTimeRange: this.props.setPeriodToTimeRange,
151 period: this.props.period?.toSeconds(),
152 stat: this.props.statistic,
153 },
154 }];
155 }
156}
157exports.GraphWidget = GraphWidget;
158_b = JSII_RTTI_SYMBOL_1;
159GraphWidget[_b] = { fqn: "@aws-cdk/aws-cloudwatch.GraphWidget", version: "1.198.0" };
160/**
161 * A dashboard widget that displays the most recent value for every metric
162 */
163class SingleValueWidget extends widget_1.ConcreteWidget {
164 constructor(props) {
165 super(props.width || 6, props.height || 3);
166 try {
167 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_SingleValueWidgetProps(props);
168 }
169 catch (error) {
170 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
171 Error.captureStackTrace(error, SingleValueWidget);
172 }
173 throw error;
174 }
175 this.props = props;
176 this.copyMetricWarnings(...props.metrics);
177 }
178 toJson() {
179 return [{
180 type: 'metric',
181 width: this.width,
182 height: this.height,
183 x: this.x,
184 y: this.y,
185 properties: {
186 view: 'singleValue',
187 title: this.props.title,
188 region: this.props.region || cdk.Aws.REGION,
189 metrics: rendering_1.allMetricsGraphJson(this.props.metrics, []),
190 setPeriodToTimeRange: this.props.setPeriodToTimeRange,
191 singleValueFullPrecision: this.props.fullPrecision,
192 },
193 }];
194 }
195}
196exports.SingleValueWidget = SingleValueWidget;
197_c = JSII_RTTI_SYMBOL_1;
198SingleValueWidget[_c] = { fqn: "@aws-cdk/aws-cloudwatch.SingleValueWidget", version: "1.198.0" };
199/**
200 * A CustomWidget shows the result of a AWS lambda function
201 */
202class CustomWidget extends widget_1.ConcreteWidget {
203 constructor(props) {
204 super(props.width ?? 6, props.height ?? 6);
205 try {
206 jsiiDeprecationWarnings._aws_cdk_aws_cloudwatch_CustomWidgetProps(props);
207 }
208 catch (error) {
209 if (process.env.JSII_DEBUG !== "1" && error.name === "DeprecationError") {
210 Error.captureStackTrace(error, CustomWidget);
211 }
212 throw error;
213 }
214 this.props = props;
215 }
216 toJson() {
217 return [{
218 type: 'custom',
219 width: this.width,
220 height: this.height,
221 x: this.x,
222 y: this.y,
223 properties: {
224 endpoint: this.props.functionArn,
225 params: this.props.params,
226 title: this.props.title,
227 updateOn: {
228 refresh: this.props.updateOnRefresh ?? true,
229 resize: this.props.updateOnResize ?? true,
230 timeRange: this.props.updateOnTimeRangeChange ?? true,
231 },
232 },
233 }];
234 }
235}
236exports.CustomWidget = CustomWidget;
237_d = JSII_RTTI_SYMBOL_1;
238CustomWidget[_d] = { fqn: "@aws-cdk/aws-cloudwatch.CustomWidget", version: "1.198.0" };
239/**
240 * Fill shading options that will be used with an annotation
241 */
242var Shading;
243(function (Shading) {
244 /**
245 * Don't add shading
246 */
247 Shading["NONE"] = "none";
248 /**
249 * Add shading above the annotation
250 */
251 Shading["ABOVE"] = "above";
252 /**
253 * Add shading below the annotation
254 */
255 Shading["BELOW"] = "below";
256})(Shading = exports.Shading || (exports.Shading = {}));
257/**
258 * A set of standard colours that can be used in annotations in a GraphWidget.
259 */
260class Color {
261 constructor() { }
262}
263exports.Color = Color;
264_e = JSII_RTTI_SYMBOL_1;
265Color[_e] = { fqn: "@aws-cdk/aws-cloudwatch.Color", version: "1.198.0" };
266/** blue - hex #1f77b4 */
267Color.BLUE = '#1f77b4';
268/** brown - hex #8c564b */
269Color.BROWN = '#8c564b';
270/** green - hex #2ca02c */
271Color.GREEN = '#2ca02c';
272/** grey - hex #7f7f7f */
273Color.GREY = '#7f7f7f';
274/** orange - hex #ff7f0e */
275Color.ORANGE = '#ff7f0e';
276/** pink - hex #e377c2 */
277Color.PINK = '#e377c2';
278/** purple - hex #9467bd */
279Color.PURPLE = '#9467bd';
280/** red - hex #d62728 */
281Color.RED = '#d62728';
282/**
283 * The position of the legend on a GraphWidget.
284 */
285var LegendPosition;
286(function (LegendPosition) {
287 /**
288 * Legend appears below the graph (default).
289 */
290 LegendPosition["BOTTOM"] = "bottom";
291 /**
292 * Add shading above the annotation
293 */
294 LegendPosition["RIGHT"] = "right";
295 /**
296 * Add shading below the annotation
297 */
298 LegendPosition["HIDDEN"] = "hidden";
299})(LegendPosition = exports.LegendPosition || (exports.LegendPosition = {}));
300function mapAnnotation(yAxis) {
301 return (a) => {
302 return { ...a, yAxis };
303 };
304}
305//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JhcGguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJncmFwaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQSxxQ0FBcUM7QUFHckMsbURBQTBEO0FBQzFELHFDQUEwQztBQXNGMUM7O0dBRUc7QUFDSCxNQUFhLFdBQVksU0FBUSx1QkFBYztJQUc3QyxZQUFZLEtBQXVCO1FBQ2pDLEtBQUssQ0FBQyxLQUFLLENBQUMsS0FBSyxJQUFJLENBQUMsRUFBRSxLQUFLLENBQUMsTUFBTSxJQUFJLENBQUMsQ0FBQyxDQUFDOzs7Ozs7K0NBSmxDLFdBQVc7Ozs7UUFLcEIsSUFBSSxDQUFDLEtBQUssR0FBRyxLQUFLLENBQUM7S0FDcEI7SUFFTSxNQUFNO1FBQ1gsT0FBTyxDQUFDO2dCQUNOLElBQUksRUFBRSxRQUFRO2dCQUNkLEtBQUssRUFBRSxJQUFJLENBQUMsS0FBSztnQkFDakIsTUFBTSxFQUFFLElBQUksQ0FBQyxNQUFNO2dCQUNuQixDQUFDLEVBQUUsSUFBSSxDQUFDLENBQUM7Z0JBQ1QsQ0FBQyxFQUFFLElBQUksQ0FBQ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