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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 17 additions and 16 deletions

View File

@ -122,6 +122,7 @@ const (
DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER"
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
)
// swagger:enum ItemStatus

View File

@ -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"`
}

View File

@ -82,6 +82,7 @@ const (
DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER"
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
)
type ItemStatus string

View File

@ -5434,7 +5434,8 @@
"enum": [
"DASHBOARD",
"DATASOURCE",
"FOLDER"
"FOLDER",
"LIBRARY_ELEMENT"
]
}
}

View File

@ -16886,7 +16886,8 @@
"enum": [
"DASHBOARD",
"DATASOURCE",
"FOLDER"
"FOLDER",
"LIBRARY_ELEMENT"
]
}
}

View File

@ -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?: {

View File

@ -35,6 +35,8 @@ function ResourceInfo({ data }: { data: ResourceTableItem }) {
return <DatasourceInfo data={data} />;
case 'FOLDER':
return <FolderInfo data={data} />;
case 'LIBRARY_ELEMENT':
return null;
}
}

View File

@ -7112,7 +7112,8 @@
"enum": [
"DASHBOARD",
"DATASOURCE",
"FOLDER"
"FOLDER",
"LIBRARY_ELEMENT"
],
"type": "string"
}