in ui/src/app/components/prepare-migration/prepare-migration.component.ts [305:404]
initializeFromLocalStorage() {
if (localStorage.getItem(MigrationDetails.MigrationMode) != null) {
this.selectedMigrationMode = localStorage.getItem(MigrationDetails.MigrationMode) as string
}
if (localStorage.getItem(MigrationDetails.MigrationType) != null) {
this.selectedMigrationType = localStorage.getItem(MigrationDetails.MigrationType) as string
}
if (localStorage.getItem(MigrationDetails.isForeignKeySkipped) != null) {
this.isForeignKeySkipped = localStorage.getItem(MigrationDetails.isForeignKeySkipped) === 'true'
}
if (localStorage.getItem(MigrationDetails.IsMigrationInProgress) != null) {
this.isMigrationInProgress =
(localStorage.getItem(MigrationDetails.IsMigrationInProgress) as string) === 'true'
this.subscribeMigrationProgress()
}
if (localStorage.getItem(MigrationDetails.IsTargetDetailSet) != null) {
this.isTargetDetailSet =
(localStorage.getItem(MigrationDetails.IsTargetDetailSet) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.IsSourceConnectionProfileSet) != null) {
this.isSourceConnectionProfileSet =
(localStorage.getItem(MigrationDetails.IsSourceConnectionProfileSet) as string) === 'true'
}
if (localStorage.getItem(Datastream.IsDatastreamConfigSet) != null) {
this.isDatastreamConfigurationSet = (localStorage.getItem(Datastream.IsDatastreamConfigSet) as string === 'true')
}
if (localStorage.getItem(Gcs.IsGcsConfigSet) != null) {
this.isGcsConfigurationSet = (localStorage.getItem(Gcs.IsGcsConfigSet) as string === 'true')
}
if (localStorage.getItem(Dataflow.IsDataflowConfigSet) != null) {
this.isDataflowConfigurationSet = (localStorage.getItem(Dataflow.IsDataflowConfigSet) as string === 'true')
}
if (localStorage.getItem(MigrationDetails.IsGcsMetadataPathSet) != null) {
this.isGcsMetadataDetailSet = (localStorage.getItem(MigrationDetails.IsGcsMetadataPathSet) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.IsTargetConnectionProfileSet) != null) {
this.isTargetConnectionProfileSet =
(localStorage.getItem(MigrationDetails.IsTargetConnectionProfileSet) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.IsSourceDetailsSet) != null) {
this.isSourceDetailsSet =
(localStorage.getItem(MigrationDetails.IsSourceDetailsSet) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.IsMigrationDetailSet) != null) {
this.isMigrationDetailSet =
(localStorage.getItem(MigrationDetails.IsMigrationDetailSet) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.HasSchemaMigrationStarted) != null) {
this.hasSchemaMigrationStarted =
(localStorage.getItem(MigrationDetails.HasSchemaMigrationStarted) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.HasDataMigrationStarted) != null) {
this.hasDataMigrationStarted =
(localStorage.getItem(MigrationDetails.HasDataMigrationStarted) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.DataMigrationProgress) != null) {
this.dataMigrationProgress = parseInt(
localStorage.getItem(MigrationDetails.DataMigrationProgress) as string
)
}
if (localStorage.getItem(MigrationDetails.SchemaMigrationProgress) != null) {
this.schemaMigrationProgress = parseInt(
localStorage.getItem(MigrationDetails.SchemaMigrationProgress) as string
)
}
if (localStorage.getItem(MigrationDetails.DataProgressMessage) != null) {
this.dataProgressMessage = localStorage.getItem(
MigrationDetails.DataProgressMessage
) as string
}
if (localStorage.getItem(MigrationDetails.SchemaProgressMessage) != null) {
this.schemaProgressMessage = localStorage.getItem(
MigrationDetails.SchemaProgressMessage
) as string
}
if (localStorage.getItem(MigrationDetails.ForeignKeyProgressMessage) != null) {
this.foreignKeyProgressMessage = localStorage.getItem(
MigrationDetails.ForeignKeyProgressMessage
) as string
}
if (localStorage.getItem(MigrationDetails.ForeignKeyUpdateProgress) != null) {
this.foreignKeyUpdateProgress = parseInt(
localStorage.getItem(MigrationDetails.ForeignKeyUpdateProgress) as string
)
}
if (localStorage.getItem(MigrationDetails.HasForeignKeyUpdateStarted) != null) {
this.hasForeignKeyUpdateStarted =
(localStorage.getItem(MigrationDetails.HasForeignKeyUpdateStarted) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.GeneratingResources) != null) {
this.generatingResources =
(localStorage.getItem(MigrationDetails.GeneratingResources) as string) === 'true'
}
if (localStorage.getItem(MigrationDetails.NumberOfShards) != null) {
this.numberOfShards = localStorage.getItem(MigrationDetails.NumberOfShards) as string
}
if (localStorage.getItem(MigrationDetails.NumberOfInstances) != null) {
this.numberOfInstances = localStorage.getItem(MigrationDetails.NumberOfInstances) as string
}
}