mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 01:25:37 -05:00
Migration wizard skeleton setup (#11758)
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { MigrationWizardPage } from '../models/migrationWizardPage';
|
||||
import { SOURCE_CONFIGURATION_PAGE_TITLE } from '../models/strings';
|
||||
import { MigrationStateModel } from '../models/stateMachine';
|
||||
|
||||
export class SourceConfigurationPage extends MigrationWizardPage {
|
||||
constructor(migrationStateModel: MigrationStateModel) {
|
||||
super(azdata.window.createWizardPage(SOURCE_CONFIGURATION_PAGE_TITLE), migrationStateModel);
|
||||
}
|
||||
|
||||
public async registerWizardContent(): Promise<void> {
|
||||
return new Promise<void>(async (resolve, reject) => {
|
||||
this.wizardPage.registerContent(async (view) => {
|
||||
try {
|
||||
await this.registerContent(view);
|
||||
resolve();
|
||||
} catch (ex) {
|
||||
reject(ex);
|
||||
} finally {
|
||||
reject(new Error());
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private async registerContent(view: azdata.ModelView) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,10 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as azdata from 'azdata';
|
||||
import { WIZARD_TITLE } from '../models/strings';
|
||||
import { SourceConfigurationPage } from './sourceConfigurationPage';
|
||||
import { MigrationStateModel } from '../models/stateMachine';
|
||||
|
||||
export class WizardController {
|
||||
constructor() {
|
||||
@@ -9,6 +13,12 @@ export class WizardController {
|
||||
}
|
||||
|
||||
public async openWizard(): Promise<void> {
|
||||
}
|
||||
|
||||
public async createWizard(): Promise<void> {
|
||||
azdata.window.createWizard(WIZARD_TITLE, 'wide');
|
||||
const stateModel = new MigrationStateModel({} as azdata.IConnectionProfile);
|
||||
new SourceConfigurationPage(stateModel);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user