@grafana/plugin-types 0.0.52 → 0.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -40,11 +40,32 @@ export interface TimeRange {
|
|
|
40
40
|
to: DateTime;
|
|
41
41
|
raw: RawTimeRange;
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Union type of all supported service identifiers.
|
|
45
|
+
* Use this type to ensure type-safe service selection when passing `serviceId` to `ServiceDashboardExtensionProps`.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* ```typescript
|
|
49
|
+
* import { ServiceType, ServiceDashboardExtensionProps } from '@grafana/plugin-types/grafana-csp-app';
|
|
50
|
+
*
|
|
51
|
+
* const myService: ServiceType = 'AWS/EC2';
|
|
52
|
+
*
|
|
53
|
+
* const props: ServiceDashboardExtensionProps = {
|
|
54
|
+
* serviceId: myService,
|
|
55
|
+
* initialTimeRange: { from: 'now-1h', to: 'now' },
|
|
56
|
+
* // ...
|
|
57
|
+
* };
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
export type ServiceType = "AWS/EC2" | "AWS/RDS" | "AWS/S3" | "AWS/NetworkELB" | "AWS/ApplicationELB" | "AWS/SQS" | "AWS/Lambda" | "AWS/ECS" | "AWS/ApiGateway" | "AWS/DynamoDB" | "AWS/ElastiCache" | "AWS/Route53Resolver" | "AWS/BedrockAgentcore" | "AWS/Route53" | "Azure/PostgreSQLFlexibleServers" | "Azure/MySQLFlexibleServer" | "Azure/ContainerApps" | "GCP/CloudSQL" | "GCP/AlloyDB";
|
|
43
61
|
export type ServiceDashboardMetadata = {
|
|
44
62
|
instanceId?: string;
|
|
45
63
|
job?: string;
|
|
46
|
-
account_id?: string;
|
|
47
64
|
region?: string;
|
|
65
|
+
account_id?: string;
|
|
66
|
+
subscriptionName?: string;
|
|
67
|
+
resourceGroup?: string;
|
|
68
|
+
project_id?: string;
|
|
48
69
|
};
|
|
49
70
|
export type ServiceDashboardBackButton = {
|
|
50
71
|
visible: boolean;
|
|
@@ -55,6 +76,11 @@ export type ServiceDashboardExtensionProps = {
|
|
|
55
76
|
lokiDatasource?: string;
|
|
56
77
|
initialTimeRange: TimeRange;
|
|
57
78
|
onTimeRangeChange?: (timeRange: TimeRange) => void;
|
|
79
|
+
/**
|
|
80
|
+
* The service identifier for the dashboard to display.
|
|
81
|
+
* Use the `ServiceType` type for a list of valid service identifiers.
|
|
82
|
+
* @see {@link ServiceType}
|
|
83
|
+
*/
|
|
58
84
|
serviceId: string;
|
|
59
85
|
provider?: string;
|
|
60
86
|
metadata?: ServiceDashboardMetadata;
|