mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Adding support for blob containers in migration extension (#15516)
* Adding support for blob containers and infoboxes * vbumping migration for May month release. * setting resotered count to 0 when the active backupsets is empty. * Removing unnecessary ! * Excluding readme gif from the vsix package * Removing info box as it not needed now. * Removing all the changes to migration mode page for the infobox
This commit is contained in:
3
extensions/sql-migration/.vscodeignore
Normal file
3
extensions/sql-migration/.vscodeignore
Normal file
@@ -0,0 +1,3 @@
|
||||
src/**
|
||||
tsconfig.json
|
||||
images/ADSMigration.gif
|
||||
5
extensions/sql-migration/images/info.svg
Normal file
5
extensions/sql-migration/images/info.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.09961 16.1C12.5179 16.1 16.0996 12.5183 16.0996 8.09998C16.0996 3.6817 12.5179 0.0999756 8.09961 0.0999756C3.68133 0.0999756 0.0996094 3.6817 0.0996094 8.09998C0.0996094 12.5183 3.68133 16.1 8.09961 16.1Z" fill="#015CDA"/>
|
||||
<path d="M7.99978 5.56499C8.80004 5.56499 9.44878 4.91625 9.44878 4.11599C9.44878 3.31573 8.80004 2.66699 7.99978 2.66699C7.19952 2.66699 6.55078 3.31573 6.55078 4.11599C6.55078 4.91625 7.19952 5.56499 7.99978 5.56499Z" fill="white"/>
|
||||
<path d="M9.10039 13.9871V6.98706H6.91139L6.90039 13.9871H9.10039Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 656 B |
@@ -1,11 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="456.51" height="500">
|
||||
<path fill="#6bbcda" d="M396 84.97h-1.67A92.9 92.9 0 0 0 223.08 43.5a87.38 87.38 0 0 0-17.27-1.87 83.1 83.1 0 0 0 0 166.22H396A61.43 61.43 0 0 0 396 85z"/>
|
||||
<path fill="#8acae1" d="M248.52 67.2a92.8 92.8 0 0 1 19.13 2.06 91.78 91.78 0 0 1 93.99-47.41A92.92 92.92 0 0 0 223.12 43.5a87.38 87.38 0 0 0-17.27-1.87 83.1 83.1 0 0 0-35.49 158.15 88.46 88.46 0 0 1-10.96-42.94 89.43 89.43 0 0 1 89.12-89.63z"/>
|
||||
<path fill="#50a7e1" d="M0 180v244.97c0 41.26 64.83 74.68 144.87 74.88V236.02z"/>
|
||||
<path fill="#c0d557" d="M102.9 124.73a97.96 97.96 0 0 1 .56-10.45C43.65 123.24 0 151.07 0 184.1c0 40.34 64.83 73.01 144.87 73.01V208.2a104.02 104.02 0 0 1-41.97-83.46z"/>
|
||||
<path fill="#c0d557" d="M260.78 228.18h-54.97A101.67 101.67 0 0 1 144.86 208v48.96h.2a214.78 214.78 0 0 0 115.72-28.8z"/>
|
||||
<path fill="#1e80c6" d="M252.04 371.76l.75-1.69 6.93-16.62.74-1.69 7.17-17.22 17.07 7.29 1.68.75 3.71 1.48v-115.5h-29.3a216.96 216.96 0 0 1-115.72 28.93h-.2v117.44h105.88zM259.48 458.76l-6.93-16.8-.74-1.67-7.05-17.37 17.27-7.1 1.66-.74 7.07-3c-.2-2.05-.2-3.92-.2-5.97s0-4.29.2-6.53l-7.07-3-1.3-.55H144.87v103.25h.2a208.94 208.94 0 0 0 118.12-31.36l-3.16-7.85z"/>
|
||||
<path fill="#fff" d="M262.08 396.21L245 388.94l5.94-14.38H132.25l-16.71 40.89L65 275.41 27.99 376.24H0v17.74h42.54l23.4-65.1 51.08 143.2 26.93-75.6h118.5z"/>
|
||||
<path fill="#0e4da7" d="M434.07 424.58a72.75 72.75 0 0 0 2.23-18.1 79.83 79.83 0 0 0-2.04-17.75l20.43-8.4 1.68-.74-.75-1.7-6.93-16.8-.75-1.67-1.67.75-20.43 8.4a74.29 74.29 0 0 0-25.07-25.4l8.54-20.54.75-1.67-1.68-.75-16.52-6.93-1.68-.75-.66 1.72-8.55 20.54a72.03 72.03 0 0 0-18-2.24 78.95 78.95 0 0 0-17.68 2L336.98 314l-.79-1.62-1.68.75-16.71 6.92-1.67.75.74 1.68 8.3 20.54a74.27 74.27 0 0 0-25.26 25.2l-9.7-4.16-10.77-4.49-1.68-.74-.73 1.69-6.93 16.62-.74 1.69 1.67.74 20.43 8.6a65.72 65.72 0 0 0-1.3 5.96c-.37 2.05-.55 4.5-.75 6.72v.18a47.18 47.18 0 0 0-.18 5.04 24.52 24.52 0 0 0 .18 3.73 5.04 5.04 0 0 0 .2 1.69c0 .55.18 1.12.18 1.87a43.3 43.3 0 0 0 1.1 7.1 16.14 16.14 0 0 0 .75 3.16l-1.1.38-19.4 8.02-1.67.74.75 1.7 6.92 16.8.75 1.67 1.66-.75 20.43-8.39a74.33 74.33 0 0 0 25.09 25.39l-8.55 20.54-.75 1.68 1.68.75 16.52 6.92 1.68.75.75-1.69 8.53-20.53a72.82 72.82 0 0 0 18 2.23 78.95 78.95 0 0 0 17.65-2.05l8.32 20.54.74 1.68 1.68-.75 16.7-6.92 1.68-.74-.73-1.69-8.31-20.54a74.27 74.27 0 0 0 25.26-25.2l20.43 8.6 1.68.74.73-1.69 6.93-16.62.75-1.7-1.68-.74zm-71.33 33.24a51.56 51.56 0 0 1-40.48-83.1l.19-.19a51.35 51.35 0 1 1 40.3 83.3z"/>
|
||||
<path fill="#fff" d="M322.63 374.56h-.18l-.2.18s0 .2-.17.2z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.5 KiB |
@@ -2,7 +2,7 @@
|
||||
"name": "sql-migration",
|
||||
"displayName": "%displayName%",
|
||||
"description": "%description%",
|
||||
"version": "0.0.13",
|
||||
"version": "0.1.0",
|
||||
"publisher": "Microsoft",
|
||||
"preview": true,
|
||||
"license": "https://raw.githubusercontent.com/Microsoft/azuredatastudio/main/LICENSE.txt",
|
||||
|
||||
@@ -29,6 +29,7 @@ export class IconPathHelper {
|
||||
public static sqlDatabaseWarningLogo: IconPath;
|
||||
public static cancel: IconPath;
|
||||
public static warning: IconPath;
|
||||
public static info: IconPath;
|
||||
|
||||
public static setExtensionContext(context: vscode.ExtensionContext) {
|
||||
IconPathHelper.copy = {
|
||||
@@ -103,5 +104,9 @@ export class IconPathHelper {
|
||||
light: context.asAbsolutePath('images/warning.svg'),
|
||||
dark: context.asAbsolutePath('images/warning.svg')
|
||||
};
|
||||
IconPathHelper.info = {
|
||||
light: context.asAbsolutePath('images/info.svg'),
|
||||
dark: context.asAbsolutePath('images/infoBox.svg')
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export const DATABASE_BACKUP_PAGE_TITLE = localize('sql.migration.database.page.
|
||||
export const DATABASE_BACKUP_PAGE_DESCRIPTION = localize('sql.migration.database.page.description', "Select the location of your database backups to use for migration.");
|
||||
|
||||
export const DATABASE_BACKUP_NC_NETWORK_SHARE_RADIO_LABEL = localize('sql.migration.nc.network.share.radio.label', "My database backups are on a network share");
|
||||
export const DATABASE_BACKUP_NC_BLOB_STORAGE_RADIO_LABEL = localize('sql.migration.nc.blob.storage.radio.label', "My database backups are in an Azure Storage Blob Container (Coming soon)");
|
||||
export const DATABASE_BACKUP_NC_BLOB_STORAGE_RADIO_LABEL = localize('sql.migration.nc.blob.storage.radio.label', "My database backups are in an Azure Storage Blob Container");
|
||||
export const DATABASE_BACKUP_NC_FILE_SHARE_RADIO_LABEL = localize('sql.migration.nc.file.share.radio.label', "My database backups are in an Azure Storage File Share (Coming soon)");
|
||||
|
||||
|
||||
@@ -160,6 +160,7 @@ export const AUTHENTICATION_KEYS = localize('sql.migration.authentication.types'
|
||||
export function SQL_MIGRATION_SERVICE_DETAILS_HEADER(sqlMigrationServiceName: string) {
|
||||
return localize('sql.migration.service.header', "Azure Database Migration Service \"{0}\" details:`", sqlMigrationServiceName);
|
||||
}
|
||||
export const DMS_PORTAL_INFO = localize('sql.migration.dms.portal.info', "Please note that any existing Azure Database Migration Service (DMS) in Azure portal will not show up in Azure Data Studio. DMS created in Azure Data Studio will not be visible in Azure portal yet.");
|
||||
|
||||
// create migration service dialog
|
||||
export const CREATE_MIGRATION_SERVICE_TITLE = localize('sql.migration.services.dialog.title', "Create Azure Database Migration Service");
|
||||
|
||||
@@ -515,7 +515,15 @@ export class MigrationCutoverDialog {
|
||||
|
||||
this._migrationStatus.value = migrationStatusTextValue ?? '---';
|
||||
this._fullBackupFile.value = fullBackupFileName! ?? '-';
|
||||
this._backupLocation.value = this._model._migration.migrationContext.properties.backupConfiguration?.sourceLocation?.fileShare?.path! ?? '-';
|
||||
let backupLocation;
|
||||
|
||||
// Displaying storage accounts and blob container for azure blob backups.
|
||||
if (this._model._migration.migrationContext.properties.backupConfiguration.sourceLocation?.azureBlob) {
|
||||
backupLocation = `${this._model._migration.migrationContext.properties.backupConfiguration.sourceLocation.azureBlob.storageAccountResourceId.split('/').pop()} - ${this._model._migration.migrationContext.properties.backupConfiguration.sourceLocation.azureBlob.blobContainerName}`;
|
||||
} else {
|
||||
backupLocation = this._model._migration.migrationContext.properties.backupConfiguration?.sourceLocation?.fileShare?.path! ?? '-';
|
||||
}
|
||||
this._backupLocation.value = backupLocation ?? '-';
|
||||
|
||||
this._lastAppliedLSN.value = lastAppliedSSN! ?? '-';
|
||||
this._lastAppliedBackupFile.value = this._model.migrationStatus.properties.migrationStatusDetails?.lastRestoredFilename ?? '-';
|
||||
@@ -538,7 +546,7 @@ export class MigrationCutoverDialog {
|
||||
});
|
||||
|
||||
if (migrationStatusTextValue === MigrationStatus.InProgress) {
|
||||
const restoredCount = (this._model.migrationStatus.properties.migrationStatusDetails?.activeBackupSets.filter(a => a.listOfBackupFiles[0].status === 'Restored'))?.length!;
|
||||
const restoredCount = (this._model.migrationStatus.properties.migrationStatusDetails?.activeBackupSets?.filter(a => a.listOfBackupFiles[0].status === 'Restored'))?.length ?? 0;
|
||||
if (restoredCount > 0) {
|
||||
this._cutoverButton.enabled = true;
|
||||
}
|
||||
|
||||
@@ -115,7 +115,6 @@ export class DatabaseBackupPage extends MigrationWizardPage {
|
||||
.withProps({
|
||||
name: buttonGroup,
|
||||
label: constants.DATABASE_BACKUP_NC_BLOB_STORAGE_RADIO_LABEL,
|
||||
enabled: false,
|
||||
CSSStyles: {
|
||||
'font-size': '13px'
|
||||
}
|
||||
|
||||
@@ -57,6 +57,15 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
|
||||
this._statusLoadingComponent = view.modelBuilder.loadingComponent().withItem(this.createDMSDetailsContainer()).component();
|
||||
|
||||
const dmsPortalInfo = this._view.modelBuilder.infoBox().withProps({
|
||||
text: constants.DMS_PORTAL_INFO,
|
||||
style: 'information',
|
||||
CSSStyles: {
|
||||
'font-size': '13px'
|
||||
},
|
||||
width: WIZARD_INPUT_COMPONENT_WIDTH
|
||||
}).component();
|
||||
|
||||
this._form = view.modelBuilder.formContainer()
|
||||
.withFormItems(
|
||||
[
|
||||
@@ -66,6 +75,9 @@ export class IntergrationRuntimePage extends MigrationWizardPage {
|
||||
{
|
||||
component: createNewMigrationService
|
||||
},
|
||||
{
|
||||
component: dmsPortalInfo
|
||||
},
|
||||
{
|
||||
component: this._statusLoadingComponent
|
||||
}
|
||||
|
||||
@@ -10,16 +10,19 @@ import { MigrationMode, MigrationStateModel, StateChangeEvent } from '../models/
|
||||
import * as constants from '../constants/strings';
|
||||
|
||||
export class MigrationModePage extends MigrationWizardPage {
|
||||
private _view!: azdata.ModelView;
|
||||
|
||||
constructor(wizard: azdata.window.Wizard, migrationStateModel: MigrationStateModel) {
|
||||
super(wizard, azdata.window.createWizardPage(constants.DATABASE_BACKUP_MIGRATION_MODE_LABEL, 'MigrationModePage'), migrationStateModel);
|
||||
this.wizardPage.description = constants.DATABASE_BACKUP_MIGRATION_MODE_DESCRIPTION;
|
||||
}
|
||||
|
||||
protected async registerContent(view: azdata.ModelView): Promise<void> {
|
||||
this._view = view;
|
||||
const form = view.modelBuilder.formContainer()
|
||||
.withFormItems(
|
||||
[
|
||||
this.migrationModeContainer(view),
|
||||
this.migrationModeContainer(),
|
||||
]
|
||||
);
|
||||
await view.initializeModel(form.component());
|
||||
@@ -38,10 +41,10 @@ export class MigrationModePage extends MigrationWizardPage {
|
||||
protected async handleStateChange(e: StateChangeEvent): Promise<void> {
|
||||
}
|
||||
|
||||
private migrationModeContainer(view: azdata.ModelView): azdata.FormComponent {
|
||||
private migrationModeContainer(): azdata.FormComponent {
|
||||
const buttonGroup = 'cutoverContainer';
|
||||
|
||||
const onlineButton = view.modelBuilder.radioButton().withProps({
|
||||
const onlineButton = this._view.modelBuilder.radioButton().withProps({
|
||||
label: constants.DATABASE_BACKUP_MIGRATION_MODE_ONLINE_LABEL,
|
||||
name: buttonGroup,
|
||||
CSSStyles: {
|
||||
@@ -51,7 +54,7 @@ export class MigrationModePage extends MigrationWizardPage {
|
||||
checked: true
|
||||
}).component();
|
||||
|
||||
const onlineDescription = view.modelBuilder.text().withProps({
|
||||
const onlineDescription = this._view.modelBuilder.text().withProps({
|
||||
value: constants.DATABASE_BACKUP_MIGRATION_MODE_ONLINE_DESCRIPTION,
|
||||
CSSStyles: {
|
||||
'font-size': '13px',
|
||||
@@ -67,7 +70,7 @@ export class MigrationModePage extends MigrationWizardPage {
|
||||
}
|
||||
});
|
||||
|
||||
const offlineButton = view.modelBuilder.radioButton().withProps({
|
||||
const offlineButton = this._view.modelBuilder.radioButton().withProps({
|
||||
label: constants.DATABASE_BACKUP_MIGRATION_MODE_OFFLINE_LABEL,
|
||||
name: buttonGroup,
|
||||
CSSStyles: {
|
||||
@@ -76,7 +79,7 @@ export class MigrationModePage extends MigrationWizardPage {
|
||||
},
|
||||
}).component();
|
||||
|
||||
const offlineDescription = view.modelBuilder.text().withProps({
|
||||
const offlineDescription = this._view.modelBuilder.text().withProps({
|
||||
value: constants.DATABASE_BACKUP_MIGRATION_MODE_OFFLINE_DESCRIPTION,
|
||||
CSSStyles: {
|
||||
'font-size': '13px',
|
||||
@@ -93,7 +96,7 @@ export class MigrationModePage extends MigrationWizardPage {
|
||||
}
|
||||
});
|
||||
|
||||
const flexContainer = view.modelBuilder.flexContainer().withItems(
|
||||
const flexContainer = this._view.modelBuilder.flexContainer().withItems(
|
||||
[
|
||||
onlineButton,
|
||||
onlineDescription,
|
||||
|
||||
Reference in New Issue
Block a user