CloudMigrations: add Library Element as a valid migration resource type (#93781)

This commit is contained in:
Matheus Macabu
2024-09-26 15:29:28 +02:00
committed by GitHub
parent afe464bc20
commit 14abf2dab3
8 changed files with 17 additions and 16 deletions
+4 -3
View File
@@ -119,9 +119,10 @@ type MigrateDataResponseItemDTO struct {
type MigrateDataType string
const (
DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER"
DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER"
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
)
// swagger:enum ItemStatus
@@ -4,12 +4,6 @@ import "time"
type MigrateDataType string
const (
DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER"
)
type MigrateDataRequestDTO struct {
Items []MigrateDataRequestItemDTO `json:"items"`
}
+4 -3
View File
@@ -79,9 +79,10 @@ type CloudMigrationResource struct {
type MigrateDataType string
const (
DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER"
DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER"
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
)
type ItemStatus string
+2 -1
View File
@@ -5434,7 +5434,8 @@
"enum": [
"DASHBOARD",
"DATASOURCE",
"FOLDER"
"FOLDER",
"LIBRARY_ELEMENT"
]
}
}
+2 -1
View File
@@ -16886,7 +16886,8 @@
"enum": [
"DASHBOARD",
"DATASOURCE",
"FOLDER"
"FOLDER",
"LIBRARY_ELEMENT"
]
}
}
@@ -157,7 +157,7 @@ export type MigrateDataResponseItemDto = {
message?: string;
refId: string;
status: 'OK' | 'WARNING' | 'ERROR' | 'PENDING' | 'UNKNOWN';
type: 'DASHBOARD' | 'DATASOURCE' | 'FOLDER';
type: 'DASHBOARD' | 'DATASOURCE' | 'FOLDER' | 'LIBRARY_ELEMENT';
};
export type SnapshotResourceStats = {
statuses?: {
@@ -35,6 +35,8 @@ function ResourceInfo({ data }: { data: ResourceTableItem }) {
return <DatasourceInfo data={data} />;
case 'FOLDER':
return <FolderInfo data={data} />;
case 'LIBRARY_ELEMENT':
return null;
}
}
+2 -1
View File
@@ -7112,7 +7112,8 @@
"enum": [
"DASHBOARD",
"DATASOURCE",
"FOLDER"
"FOLDER",
"LIBRARY_ELEMENT"
],
"type": "string"
}