CloudMigrations: Add data types for alerts resources (#94251)

pull/94342/head
Matheus Macabu 1 year ago committed by GitHub
parent d88be2819d
commit 9af095d730
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      pkg/services/cloudmigration/api/dtos.go
  2. 13
      pkg/services/cloudmigration/model.go
  3. 7
      public/api-merged.json
  4. 11
      public/app/features/migrate-to-cloud/api/endpoints.gen.ts
  5. 10
      public/app/features/migrate-to-cloud/onprem/NameCell.tsx
  6. 7
      public/openapi3.json

@ -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…
Cancel
Save