Add prerequisites box in target selection page (#25931)
This commit is contained in:
Родитель
3030473980
Коммит
413877ea81
|
@ -442,14 +442,23 @@ export function LOGIN_WIZARD_TITLE(instanceName: string): string {
|
|||
return localize('sql-migration.login.wizard.title', "Migrate logins from '{0}' to Azure SQL", instanceName);
|
||||
}
|
||||
export const LOGIN_MIGRATIONS_TARGET_SELECTION_PAGE_DESCRIPTION = localize('sql.login.migration.wizard.target.description', "Select the target Azure SQL Managed Instance, Azure SQL VM, or Azure SQL database(s) where you want to migrate your logins.");
|
||||
export const LOGIN_MIGRATIONS_TARGET_SELECTION_PAGE_PREVIEW_WARNING = localize('sql.login.migration.wizard.target.data.migration.warning', "Please note that login migration feature is in public preview mode.");
|
||||
export const LOGIN_MIGRATIONS_TARGET_SELECTION_PAGE_PREVIEW_WARNING = localize('sql.login.migration.wizard.target.data.migration.warning', "Please note that login migration feature is in public preview.");
|
||||
export const LOGIN_MIGRATIONS_TARGET_SELECTION_PAGE_DATA_MIGRATION_WARNING = localize('sql.login.migration.wizard.target.data.migration.warning', "We recommend migrating your databases(s) to the Azure SQL target before starting the login migration to avoid failures in the process. Nevertheless, you can run this migration process whenever want you want if your goal is to update the user mapping for recently migrated databases.\n\n If the source and database names are not the same, then it is possible that some permissions may not be applied properly.");
|
||||
export function LOGIN_MIGRATIONS_TARGET_SELECTION_PAGE_PERMISSIONS_WARNING(userName: string, instanceName: string): string {
|
||||
if (!userName || !userName.length) {
|
||||
return localize('sql.login.migration.wizard.target.permission.warning', "Please ensure that the current user has sysadmin permissions to get all login information for the current instance ({0}).", instanceName);
|
||||
return localize('sql.login.migration.wizard.target.permission.warning', "Please ensure that the current user has Sysadmin permissions to get all login information for the current instance ({0}).", instanceName);
|
||||
}
|
||||
return localize('sql.login.migration.wizard.target.permission.warning', "Please ensure that the current user ({0}) has sysadmin permissions to get all login information for the current instance ({1}).", userName, instanceName);
|
||||
return localize('sql.login.migration.wizard.target.permission.warning', "Please ensure that the current user ({0}) has Sysadmin permissions to get all login information for the current instance ({1}).", userName, instanceName);
|
||||
}
|
||||
export const LOGIN_MIGRATIONS_PRE_REQ_TITLE = localize('login.migration.pre.req.title', "Login migration pre-requisites:");
|
||||
export const LOGIN_MIGRATIONS_PRE_REQ_SUBTITLE = localize('login.migration.pre.req.subtitle', "Before you start your login migration to Azure SQL, check the list of pre-requites below:");
|
||||
export const LOGIN_MIGRATIONS_PRE_REQ_1 = localize('login.migration.pre.req.1', "You must successfully migrate all your databases to the target before starting the login migration else the migration will fail.");
|
||||
export const LOGIN_MIGRATIONS_PRE_REQ_2 = localize('login.migration.pre.req.2', "The source and target databases names must be same otherwise permissions may not be applied properly.");
|
||||
export const LOGIN_MIGRATIONS_PRE_REQ_3 = localize('login.migration.pre.req.3', "Login migration requires 'Sysadmin' permissions on both source and target.");
|
||||
export const LOGIN_MIGRATIONS_PRE_REQ_4 = localize('login.migration.pre.req.4', "Source and target must be connected.");
|
||||
export const LOGIN_MIGRATIONS_PRE_REQ_5 = localize('login.migration.pre.req.5', "For Windows account migration, ensure the target has 'Read' permissions on Microsoft Entra and ensure domain federation between local AD and Microsoft Entra ID.");
|
||||
export const LOGIN_MIGRATIONS_PRE_REQ_INFO = localize('login.migration.pre.req.info', "For more details about login migrations to Azure SQL, {0}.");
|
||||
export const VIEW_TUTORIAL = localize('login.migration.pre.req.view.tutorial', "see the tutorial");
|
||||
export const LOGIN_MIGRATIONS_TARGET_TYPE_SELECTION_TITLE = localize('sql.login.migration.wizard.target.type.title', "Azure SQL target type");
|
||||
export const LOGIN_MIGRATIONS_MI_TEXT = localize('sql.login.migration.mi.title', "Azure SQL Managed Instance");
|
||||
export const LOGIN_MIGRATIONS_DB_TEXT = localize('sql.login.migration.db.title', "Azure SQL Database");
|
||||
|
|
|
@ -267,7 +267,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
|||
public _perfDataCollectionErrors!: string[];
|
||||
public _perfDataCollectionIsCollecting!: boolean;
|
||||
|
||||
public _aadDomainName!: string;
|
||||
public _aadDomainName: string = "";
|
||||
public _loginMigrationModel: LoginMigrationModel;
|
||||
|
||||
public readonly _refreshGetSkuRecommendationIntervalInMinutes = 10;
|
||||
|
|
|
@ -69,13 +69,6 @@ export class LoginMigrationTargetSelectionPage extends MigrationWizardPage {
|
|||
CSSStyles: { ...styles.BODY_CSS }
|
||||
}).component();
|
||||
|
||||
const loginMigrationInfoBox = this._view.modelBuilder.infoBox()
|
||||
.withProps({
|
||||
style: 'information',
|
||||
text: constants.LOGIN_MIGRATIONS_TARGET_SELECTION_PAGE_DATA_MIGRATION_WARNING,
|
||||
CSSStyles: { ...styles.BODY_CSS }
|
||||
}).component();
|
||||
|
||||
const hasSysAdminPermissions: boolean = await isSourceConnectionSysAdmin();
|
||||
const connectionProfile: azdata.connection.ConnectionProfile = await getSourceConnectionProfile();
|
||||
const permissionsInfoBox = this._view.modelBuilder.infoBox()
|
||||
|
@ -97,10 +90,67 @@ export class LoginMigrationTargetSelectionPage extends MigrationWizardPage {
|
|||
CSSStyles: { ...styles.BODY_CSS, 'margin': '0' }
|
||||
}).component();
|
||||
|
||||
const preRequisiteListTitle = view.modelBuilder.text()
|
||||
.withProps({
|
||||
value: constants.LOGIN_MIGRATIONS_PRE_REQ_TITLE,
|
||||
CSSStyles: {
|
||||
...styles.LABEL_CSS,
|
||||
'margin': '0px',
|
||||
}
|
||||
}).component();
|
||||
|
||||
const preRequisiteListSubTitle = view.modelBuilder.text()
|
||||
.withProps({
|
||||
value: constants.LOGIN_MIGRATIONS_PRE_REQ_SUBTITLE,
|
||||
CSSStyles: {
|
||||
...styles.BODY_CSS,
|
||||
'margin-top': '10px',
|
||||
}
|
||||
}).component();
|
||||
|
||||
const preRequisiteListElement = view.modelBuilder.text()
|
||||
.withProps({
|
||||
value: [
|
||||
constants.LOGIN_MIGRATIONS_PRE_REQ_1,
|
||||
constants.LOGIN_MIGRATIONS_PRE_REQ_2,
|
||||
constants.LOGIN_MIGRATIONS_PRE_REQ_3,
|
||||
constants.LOGIN_MIGRATIONS_PRE_REQ_4,
|
||||
constants.LOGIN_MIGRATIONS_PRE_REQ_5
|
||||
],
|
||||
CSSStyles: {
|
||||
...styles.BODY_CSS,
|
||||
'padding-left': '20px',
|
||||
}
|
||||
}).component();
|
||||
|
||||
const preRequisiteListInfoBox = this._view.modelBuilder.infoBox()
|
||||
.withProps({
|
||||
style: 'information',
|
||||
text: constants.LOGIN_MIGRATIONS_PRE_REQ_INFO,
|
||||
CSSStyles: { ...styles.BODY_CSS },
|
||||
links: [
|
||||
{ text: constants.VIEW_TUTORIAL, url: 'https://learn.microsoft.com/en-us/azure/dms/tutorial-login-migration-ads' },
|
||||
]
|
||||
}).component();
|
||||
|
||||
const preReqContainer = view.modelBuilder.flexContainer()
|
||||
.withItems([
|
||||
preRequisiteListTitle,
|
||||
preRequisiteListSubTitle,
|
||||
preRequisiteListElement,
|
||||
preRequisiteListInfoBox])
|
||||
.withLayout({ flexFlow: 'column' })
|
||||
.component();
|
||||
|
||||
const tasksContainer = view.modelBuilder.flexContainer()
|
||||
.withLayout({
|
||||
flexFlow: 'row',
|
||||
width: '100%',
|
||||
}).component();
|
||||
|
||||
const form = this._view.modelBuilder.formContainer()
|
||||
.withFormItems([
|
||||
{ component: loginMigrationPreviewInfoBox },
|
||||
{ component: loginMigrationInfoBox },
|
||||
{ component: permissionsInfoBox },
|
||||
{ component: this._pageDescription },
|
||||
{ component: this.createAzureSqlTargetTypeDropdown() },
|
||||
|
@ -111,12 +161,17 @@ export class LoginMigrationTargetSelectionPage extends MigrationWizardPage {
|
|||
CSSStyles: { 'padding-top': '0' }
|
||||
}).component();
|
||||
|
||||
tasksContainer.addItem(form, {});
|
||||
tasksContainer.addItems(
|
||||
[preReqContainer],
|
||||
{ CSSStyles: { 'margin': '10px' } });
|
||||
|
||||
this._disposables.push(
|
||||
this._view.onClosed(e => {
|
||||
this._disposables.forEach(
|
||||
d => { try { d.dispose(); } catch { } });
|
||||
}));
|
||||
await this._view.initializeModel(form);
|
||||
await this._view.initializeModel(tasksContainer);
|
||||
}
|
||||
|
||||
public async onPageEnter(pageChangeInfo: azdata.window.WizardPageChangeInfo): Promise<void> {
|
||||
|
|
Загрузка…
Ссылка в новой задаче