mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CloudMigrations: Add data types for alerts resources (#94251)
This commit is contained in:
parent
d88be2819d
commit
9af095d730
@ -121,10 +121,15 @@ type MigrateDataResponseItemDTO struct {
|
||||
type MigrateDataType string
|
||||
|
||||
const (
|
||||
DashboardDataType MigrateDataType = "DASHBOARD"
|
||||
DatasourceDataType MigrateDataType = "DATASOURCE"
|
||||
FolderDataType MigrateDataType = "FOLDER"
|
||||
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
|
||||
DashboardDataType MigrateDataType = "DASHBOARD"
|
||||
DatasourceDataType MigrateDataType = "DATASOURCE"
|
||||
FolderDataType MigrateDataType = "FOLDER"
|
||||
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
|
||||
AlertRuleType MigrateDataType = "ALERT_RULE"
|
||||
ContactPointType MigrateDataType = "CONTACT_POINT"
|
||||
NotificationPolicyType MigrateDataType = "NOTIFICATION_POLICY"
|
||||
NotificationTemplateType MigrateDataType = "NOTIFICATION_TEMPLATE"
|
||||
MuteTimingType MigrateDataType = "MUTE_TIMING"
|
||||
)
|
||||
|
||||
// swagger:enum ItemStatus
|
||||
|
@ -81,10 +81,15 @@ type CloudMigrationResource struct {
|
||||
type MigrateDataType string
|
||||
|
||||
const (
|
||||
DashboardDataType MigrateDataType = "DASHBOARD"
|
||||
DatasourceDataType MigrateDataType = "DATASOURCE"
|
||||
FolderDataType MigrateDataType = "FOLDER"
|
||||
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
|
||||
DashboardDataType MigrateDataType = "DASHBOARD"
|
||||
DatasourceDataType MigrateDataType = "DATASOURCE"
|
||||
FolderDataType MigrateDataType = "FOLDER"
|
||||
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
|
||||
AlertRuleType MigrateDataType = "ALERT_RULE"
|
||||
ContactPointType MigrateDataType = "CONTACT_POINT"
|
||||
NotificationPolicyType MigrateDataType = "NOTIFICATION_POLICY"
|
||||
NotificationTemplateType MigrateDataType = "NOTIFICATION_TEMPLATE"
|
||||
MuteTimingType MigrateDataType = "MUTE_TIMING"
|
||||
)
|
||||
|
||||
type ItemStatus string
|
||||
|
@ -16931,7 +16931,12 @@
|
||||
"DASHBOARD",
|
||||
"DATASOURCE",
|
||||
"FOLDER",
|
||||
"LIBRARY_ELEMENT"
|
||||
"LIBRARY_ELEMENT",
|
||||
"ALERT_RULE",
|
||||
"CONTACT_POINT",
|
||||
"NOTIFICATION_POLICY",
|
||||
"NOTIFICATION_TEMPLATE",
|
||||
"MUTE_TIMING"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +169,16 @@ export type MigrateDataResponseItemDto = {
|
||||
parentName?: string;
|
||||
refId: string;
|
||||
status: 'OK' | 'WARNING' | 'ERROR' | 'PENDING' | 'UNKNOWN';
|
||||
type: 'DASHBOARD' | 'DATASOURCE' | 'FOLDER' | 'LIBRARY_ELEMENT';
|
||||
type:
|
||||
| 'DASHBOARD'
|
||||
| 'DATASOURCE'
|
||||
| 'FOLDER'
|
||||
| 'LIBRARY_ELEMENT'
|
||||
| 'ALERT_RULE'
|
||||
| 'CONTACT_POINT'
|
||||
| 'NOTIFICATION_POLICY'
|
||||
| 'NOTIFICATION_TEMPLATE'
|
||||
| 'MUTE_TIMING';
|
||||
};
|
||||
export type SnapshotResourceStats = {
|
||||
statuses?: {
|
||||
|
@ -37,6 +37,16 @@ function ResourceInfo({ data }: { data: ResourceTableItem }) {
|
||||
return <FolderInfo data={data} />;
|
||||
case 'LIBRARY_ELEMENT':
|
||||
return <LibraryElementInfo data={data} />;
|
||||
case 'ALERT_RULE':
|
||||
return null;
|
||||
case 'CONTACT_POINT':
|
||||
return null;
|
||||
case 'NOTIFICATION_POLICY':
|
||||
return null;
|
||||
case 'NOTIFICATION_TEMPLATE':
|
||||
return null;
|
||||
case 'MUTE_TIMING':
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7151,7 +7151,12 @@
|
||||
"DASHBOARD",
|
||||
"DATASOURCE",
|
||||
"FOLDER",
|
||||
"LIBRARY_ELEMENT"
|
||||
"LIBRARY_ELEMENT",
|
||||
"ALERT_RULE",
|
||||
"CONTACT_POINT",
|
||||
"NOTIFICATION_POLICY",
|
||||
"NOTIFICATION_TEMPLATE",
|
||||
"MUTE_TIMING"
|
||||
],
|
||||
"type": "string"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user