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

@ -119,9 +119,10 @@ type MigrateDataResponseItemDTO struct {
type MigrateDataType string type MigrateDataType string
const ( const (
DashboardDataType MigrateDataType = "DASHBOARD" DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE" DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER" FolderDataType MigrateDataType = "FOLDER"
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
) )
// swagger:enum ItemStatus // swagger:enum ItemStatus

View File

@ -4,12 +4,6 @@ import "time"
type MigrateDataType string type MigrateDataType string
const (
DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER"
)
type MigrateDataRequestDTO struct { type MigrateDataRequestDTO struct {
Items []MigrateDataRequestItemDTO `json:"items"` Items []MigrateDataRequestItemDTO `json:"items"`
} }

View File

@ -79,9 +79,10 @@ type CloudMigrationResource struct {
type MigrateDataType string type MigrateDataType string
const ( const (
DashboardDataType MigrateDataType = "DASHBOARD" DashboardDataType MigrateDataType = "DASHBOARD"
DatasourceDataType MigrateDataType = "DATASOURCE" DatasourceDataType MigrateDataType = "DATASOURCE"
FolderDataType MigrateDataType = "FOLDER" FolderDataType MigrateDataType = "FOLDER"
LibraryElementDataType MigrateDataType = "LIBRARY_ELEMENT"
) )
type ItemStatus string type ItemStatus string

View File

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

View File

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

View File

@ -157,7 +157,7 @@ export type MigrateDataResponseItemDto = {
message?: string; message?: string;
refId: string; refId: string;
status: 'OK' | 'WARNING' | 'ERROR' | 'PENDING' | 'UNKNOWN'; status: 'OK' | 'WARNING' | 'ERROR' | 'PENDING' | 'UNKNOWN';
type: 'DASHBOARD' | 'DATASOURCE' | 'FOLDER'; type: 'DASHBOARD' | 'DATASOURCE' | 'FOLDER' | 'LIBRARY_ELEMENT';
}; };
export type SnapshotResourceStats = { export type SnapshotResourceStats = {
statuses?: { statuses?: {

View File

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

View File

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