-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidget_exports.ts
More file actions
83 lines (79 loc) · 2.17 KB
/
widget_exports.ts
File metadata and controls
83 lines (79 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance
* with the License. A copy of the License is located at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* or in the 'license' file accompanying this file. This file is distributed on an 'AS IS' BASIS, WITHOUT WARRANTIES
* OR CONDITIONS OF ANY KIND, express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
/**
* @description cloudwatch widgets for apache workload
* @author @aws-solutions
*/
import { IExplorerWidget, ILogWidget, IMetricWidget } from "../generics";
import {
ApacheLogWidgets,
ApacheExplorerWidget,
ApacheMetricWidgets,
} from "./apache_exports";
import {
NginxLogWidgets,
NginxExplorerWidget,
NginxMetricWidgets,
} from "./nginx_exports";
import {
PumaLogWidgets,
PumaExplorerWidget,
PumaMetricWidgets,
} from "./puma_exports";
// add exports for new workload as needed
/**
* @description interface for workload widgets
*/
interface IWorkloadWidget {
LogWidgets: ILogWidget[];
ExplorerWidget: IExplorerWidget;
MetricWidgets: IMetricWidget[];
}
/**
* @description widgets for supported workloads, extend for more workloads
*/
export const WorkloadWidgets: { [key: string]: IWorkloadWidget } = {
/**
* @description widgets for Apache workload
*/
Apache: {
LogWidgets: ApacheLogWidgets,
ExplorerWidget: ApacheExplorerWidget,
MetricWidgets: ApacheMetricWidgets,
},
/**
* @description widgets for Nginx workload
*/
Nginx: {
LogWidgets: NginxLogWidgets,
ExplorerWidget: NginxExplorerWidget,
MetricWidgets: NginxMetricWidgets,
},
/**
* @description widgets for Puma workload
*/
Puma: {
LogWidgets: PumaLogWidgets,
ExplorerWidget: PumaExplorerWidget,
MetricWidgets: PumaMetricWidgets,
},
/**
* @description widgets for the new workload
* this can be extended
WorkloadName: {
LogWidgets: <Workload>LogWidgets,
ExplorerWidget: <Workload>ExplorerWidget,
MetricWidgets: <Workload>MetricWidgets,
},
*/
};