1 | import { IAlarm } from './alarm-base';
|
2 | import { AlarmState } from './alarm-rule';
|
3 | import { ConcreteWidget } from './widget';
|
4 | /**
|
5 | * The sort possibilities for AlarmStatusWidgets
|
6 | */
|
7 | export declare enum AlarmStatusWidgetSortBy {
|
8 | /**
|
9 | * Choose DEFAULT to sort them in alphabetical order by alarm name.
|
10 | */
|
11 | DEFAULT = "default",
|
12 | /**
|
13 | * Choose STATE_UPDATED_TIMESTAMP to sort them first by alarm state, with alarms in ALARM state first,
|
14 | * INSUFFICIENT_DATA alarms next, and OK alarms last.
|
15 | * Within each group, the alarms are sorted by when they last changed state, with more recent state changes listed first.
|
16 | */
|
17 | STATE_UPDATED_TIMESTAMP = "stateUpdatedTimestamp",
|
18 | /**
|
19 | * Choose TIMESTAMP to sort them by the time when the alarms most recently changed state,
|
20 | * no matter the current alarm state.
|
21 | * The alarm that changed state most recently is listed first.
|
22 | */
|
23 | TIMESTAMP = "timestamp"
|
24 | }
|
25 | /**
|
26 | * Properties for an Alarm Status Widget
|
27 | */
|
28 | export interface AlarmStatusWidgetProps {
|
29 | /**
|
30 | * CloudWatch Alarms to show in widget
|
31 | */
|
32 | readonly alarms: IAlarm[];
|
33 | /**
|
34 | * The title of the widget
|
35 | *
|
36 | * @default 'Alarm Status'
|
37 | */
|
38 | readonly title?: string;
|
39 | /**
|
40 | * Width of the widget, in a grid of 24 units wide
|
41 | *
|
42 | * @default 6
|
43 | */
|
44 | readonly width?: number;
|
45 | /**
|
46 | * Height of the widget
|
47 | *
|
48 | * @default 3
|
49 | */
|
50 | readonly height?: number;
|
51 | /**
|
52 | * Specifies how to sort the alarms in the widget.
|
53 | *
|
54 | * @default - alphabetical order
|
55 | */
|
56 | readonly sortBy?: AlarmStatusWidgetSortBy;
|
57 | /**
|
58 | * Use this field to filter the list of alarms displayed in the widget to only those alarms currently in the specified states.
|
59 | * You can specify one or more alarm states in the value for this field.
|
60 | * The alarm states that you can specify are ALARM, INSUFFICIENT_DATA, and OK.
|
61 | *
|
62 | * If you omit this field or specify an empty array, all the alarms specifed in alarms are displayed.
|
63 | *
|
64 | * @default - all the alarms specified in alarms are displayed.
|
65 | */
|
66 | readonly states?: AlarmState[];
|
67 | }
|
68 | /**
|
69 | * A dashboard widget that displays alarms in a grid view
|
70 | */
|
71 | export declare class AlarmStatusWidget extends ConcreteWidget {
|
72 | private readonly props;
|
73 | constructor(props: AlarmStatusWidgetProps);
|
74 | position(x: number, y: number): void;
|
75 | toJson(): any[];
|
76 | }
|