mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Switch withProperties to be withProps (#16380)
* Transition to withProps in arc * Transition to withProps inputbox * Transition to withProps in checkbox * Transition to withProps text * Transition to withProps in declarative table * Transition to withProps hyperlink * Transition to withProps in button * Transition to withProps radiobutton * Transition to withProps in input * Transition to withProps button * Transition to withProps in text * Transition to withProps image * Transition to withProps declare table * Transition to withProps in table * Transition to withProps radio button * Transition to withProps in image * Transition to withProps radio button * Transition to withProps in commit * Transition to withProps div cont * Transition to withProps in comp * Transition to withProps radio card * Transition to withProps in comp icon * Transition to withProps card * Transition to withProps list
This commit is contained in:
@@ -31,11 +31,11 @@ export class DeploymentProfilePage extends ResourceTypePage {
|
||||
public initialize(): void {
|
||||
this.pageObject.registerContent(async (view: azdata.ModelView): Promise<void> => {
|
||||
this._container = view.modelBuilder.flexContainer().withLayout({ flexFlow: 'column' }).component();
|
||||
const hintText = view.modelBuilder.text().withProperties<azdata.TextComponentProperties>({
|
||||
const hintText = view.modelBuilder.text().withProps({
|
||||
value: localize('deployCluster.ProfileHintText', "Note: The settings of the deployment profile can be customized in later steps.")
|
||||
}).component();
|
||||
const container = createFlexContainer(view, [this._container, hintText], false);
|
||||
this._loadingComponent = view.modelBuilder.loadingComponent().withItem(container).withProperties<azdata.LoadingComponentProperties>({
|
||||
this._loadingComponent = view.modelBuilder.loadingComponent().withItem(container).withProps({
|
||||
loading: true,
|
||||
loadingText: localize('deployCluster.loadingProfiles', "Loading profiles"),
|
||||
loadingCompletedText: localize('deployCluster.loadingProfilesCompleted', "Loading profiles completed"),
|
||||
@@ -121,7 +121,7 @@ export class DeploymentProfilePage extends ResourceTypePage {
|
||||
const groupName = 'profileGroup';
|
||||
const radioButtons = profiles.map(profile => {
|
||||
const checked = profile.profileName === defaultProfile;
|
||||
const radioButton = view.modelBuilder.radioButton().withProperties<azdata.RadioButtonProperties>({
|
||||
const radioButton = view.modelBuilder.radioButton().withProps({
|
||||
label: profile.profileName,
|
||||
checked: checked,
|
||||
name: groupName
|
||||
@@ -147,7 +147,7 @@ export class DeploymentProfilePage extends ResourceTypePage {
|
||||
[localize('deployCluster.hdfsLabel', "HDFS + Spark"), ...profiles.map(profile => profile.hdfsReplicas.toString())]
|
||||
];
|
||||
|
||||
return view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
||||
return view.modelBuilder.table().withProps({
|
||||
columns: [this.createDescriptionColumn(localize('deployCluster.ServiceName', "Service")), ...this.createProfileColumns(profiles)],
|
||||
data: data,
|
||||
title: serviceScaleTableTitle,
|
||||
@@ -162,7 +162,7 @@ export class DeploymentProfilePage extends ResourceTypePage {
|
||||
[localize('deployCluster.dataStorageType', "Data"), ...profiles.map(profile => profile.controllerDataStorageSize.toString())],
|
||||
[localize('deployCluster.logsStorageType', "Logs"), ...profiles.map(profile => profile.controllerLogsStorageSize.toString())]
|
||||
];
|
||||
return view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
||||
return view.modelBuilder.table().withProps({
|
||||
columns: [this.createDescriptionColumn(localize('deployCluster.StorageType', "Storage type")), ...this.createProfileColumns(profiles)],
|
||||
data: data,
|
||||
title: storageTableTitle,
|
||||
@@ -184,7 +184,7 @@ export class DeploymentProfilePage extends ResourceTypePage {
|
||||
data.push([localize('deployCluster.hadr', "High Availability"), ...profiles.map(profile => profile.sqlServerReplicas > 1 ? YesText : NoText)]);
|
||||
}
|
||||
|
||||
return view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
||||
return view.modelBuilder.table().withProps({
|
||||
columns: [this.createDescriptionColumn(localize('deployCluster.featureText', "Feature")), ...this.createProfileColumns(profiles)],
|
||||
data: data,
|
||||
title: featureTableTitle,
|
||||
|
||||
@@ -302,7 +302,7 @@ export class ServiceSettingsPage extends ResourceTypePage {
|
||||
this.onNewInputComponentCreated(VariableNames.SQLServerLogsStorageSize_VariableName, sqlServerMasterLogsStorageClaimSizeInputInfo);
|
||||
|
||||
const storageSettingTable = view.modelBuilder.declarativeTable()
|
||||
.withProperties<azdata.DeclarativeTableProperties>(
|
||||
.withProps(
|
||||
{
|
||||
columns: [
|
||||
this.createStorageSettingColumn(localize('deployCluster.ServiceName', "Service name"), false),
|
||||
|
||||
@@ -358,7 +358,7 @@ export class SummaryPage extends ResourceTypePage {
|
||||
};
|
||||
|
||||
const storageTableTitle = localize('deployCluster.StorageSettings', "Storage settings");
|
||||
const storageTable = this.view.modelBuilder.table().withProperties<azdata.TableComponentProperties>({
|
||||
const storageTable = this.view.modelBuilder.table().withProps({
|
||||
title: storageTableTitle,
|
||||
ariaLabel: storageTableTitle,
|
||||
data: [
|
||||
|
||||
@@ -96,7 +96,7 @@ export class TargetClusterContextPage extends ResourceTypePage {
|
||||
this.errorLoadingClustersLabel = this.view!.modelBuilder.text().withProps({ value: localize('deployCluster.errorLoadingClustersText', "No cluster information is found in the config file or an error ocurred while loading the config file") }).component();
|
||||
this.clusterContextList = this.view!.modelBuilder.divContainer().component();
|
||||
this.clusterContextLoadingComponent = this.view!.modelBuilder.loadingComponent().withItem(this.clusterContextList).component();
|
||||
this.existingClusterControl = this.view!.modelBuilder.divContainer().withProperties<azdata.DivContainerProperties>({ clickable: false }).component();
|
||||
this.existingClusterControl = this.view!.modelBuilder.divContainer().withProps({ clickable: false }).component();
|
||||
let clusterContextContainer = this.view!.modelBuilder.flexContainer().withLayout({ flexFlow: 'row', alignItems: 'start' }).component();
|
||||
clusterContextContainer.addItem(this.clusterContextsLabel, { flex: '0 0 auto' });
|
||||
clusterContextContainer.addItem(this.clusterContextLoadingComponent, { flex: '0 0 auto', CSSStyles: { 'width': '400px', 'margin-left': '10px', 'margin-top': '10px' } });
|
||||
@@ -150,7 +150,7 @@ export class TargetClusterContextPage extends ResourceTypePage {
|
||||
if (clusterContexts.length !== 0) {
|
||||
self.wizard.model.setPropertyValue(KubeConfigPath_VariableName, configPath);
|
||||
let options = clusterContexts.map(clusterContext => {
|
||||
let option = this.view!.modelBuilder.radioButton().withProperties<azdata.RadioButtonProperties>({
|
||||
let option = this.view!.modelBuilder.radioButton().withProps({
|
||||
label: clusterContext.name,
|
||||
checked: clusterContext.isCurrentContext,
|
||||
name: ClusterRadioButtonGroupName
|
||||
|
||||
Reference in New Issue
Block a user