Added fetch logic for controllers (#14380)

* . Added fetch logic for controllers (no need to create a new one everytime)
. Fixed retention logic

* Fix field reloading logic.
Fixed localized string
Removing hardcoded colors
This commit is contained in:
Aasim Khan
2021-02-22 19:00:39 -08:00
committed by GitHub
parent 9daaa1c58b
commit d21ee4dc9e
11 changed files with 570 additions and 310 deletions

View File

@@ -6,7 +6,7 @@ import * as azdata from 'azdata';
import * as vscode from 'vscode';
import * as mssql from '../../../mssql';
import { MigrationStateModel } from '../models/stateMachine';
import { SourceConfigurationPage } from './sourceConfigurationPage';
// import { SourceConfigurationPage } from './sourceConfigurationPage';
import { WIZARD_TITLE } from '../models/strings';
import { MigrationWizardPage } from '../models/migrationWizardPage';
import { SKURecommendationPage } from './skuRecommendationPage';
@@ -36,7 +36,7 @@ export class WizardController {
const wizard = azdata.window.createWizard(WIZARD_TITLE, 'wide');
wizard.generateScriptButton.enabled = false;
wizard.generateScriptButton.hidden = true;
const sourceConfigurationPage = new SourceConfigurationPage(wizard, stateModel);
// const sourceConfigurationPage = new SourceConfigurationPage(wizard, stateModel);
const skuRecommendationPage = new SKURecommendationPage(wizard, stateModel);
// const subscriptionSelectionPage = new SubscriptionSelectionPage(wizard, stateModel);
const azureAccountsPage = new AccountsSelectionPage(wizard, stateModel);
@@ -49,7 +49,7 @@ export class WizardController {
// subscriptionSelectionPage,
azureAccountsPage,
tempTargetSelectionPage,
sourceConfigurationPage,
// sourceConfigurationPage,
skuRecommendationPage,
databaseBackupPage,
integrationRuntimePage,
@@ -88,3 +88,45 @@ export class WizardController {
});
}
}
export function createInformationRow(view: azdata.ModelView, label: string, value: string): azdata.FlexContainer {
return view.modelBuilder.flexContainer()
.withLayout(
{
flexFlow: 'row',
alignItems: 'center',
})
.withItems(
[
creaetLabelTextComponent(view, label),
createTextCompononent(view, value)
],
{
CSSStyles: { 'margin-right': '5px' }
})
.component();
}
export function createHeadingTextComponent(view: azdata.ModelView, value: string): azdata.TextComponent {
const component = createTextCompononent(view, value);
component.updateCssStyles({
'font-size': '13px',
'font-weight': 'bold'
});
return component;
}
export function creaetLabelTextComponent(view: azdata.ModelView, value: string): azdata.TextComponent {
const component = createTextCompononent(view, value);
component.updateCssStyles({
'width': '250px'
});
return component;
}
export function createTextCompononent(view: azdata.ModelView, value: string): azdata.TextComponent {
return view.modelBuilder.text().withProps({
value: value
}).component();
}