mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Chaning the name of server in deploy option if target is Azure (#18828)
This commit is contained in:
@@ -14,7 +14,7 @@ import { IDeploySettings } from '../models/IDeploySettings';
|
||||
import { DeploymentOptions } from 'mssql';
|
||||
import { IconPathHelper } from '../common/iconHelper';
|
||||
import { cssStyles } from '../common/uiConstants';
|
||||
import { getAgreementDisplayText, getConnectionName, getDockerBaseImages } from './utils';
|
||||
import { getAgreementDisplayText, getConnectionName, getDockerBaseImages, getPublishServerName } from './utils';
|
||||
import { TelemetryActions, TelemetryReporter, TelemetryViews } from '../common/telemetry';
|
||||
import { IDeployProfile } from '../models/deploy/deployProfile';
|
||||
import { Deferred } from '../common/promise';
|
||||
@@ -367,6 +367,7 @@ export class PublishDatabaseDialog {
|
||||
}
|
||||
|
||||
private createPublishTypeRadioButtons(view: azdataType.ModelView): azdataType.Component {
|
||||
const name = getPublishServerName(this.project.getProjectTargetVersion());
|
||||
const publishToLabel = view.modelBuilder.text().withProps({
|
||||
value: constants.publishTo,
|
||||
width: cssStyles.publishDialogLabelWidth
|
||||
@@ -374,7 +375,7 @@ export class PublishDatabaseDialog {
|
||||
this.existingServerRadioButton = view.modelBuilder.radioButton()
|
||||
.withProps({
|
||||
name: 'publishType',
|
||||
label: constants.publishToExistingServer
|
||||
label: constants.publishToExistingServer(name)
|
||||
}).component();
|
||||
|
||||
this.existingServerRadioButton.checked = true;
|
||||
@@ -385,7 +386,7 @@ export class PublishDatabaseDialog {
|
||||
this.dockerServerRadioButton = view.modelBuilder.radioButton()
|
||||
.withProps({
|
||||
name: 'publishType',
|
||||
label: constants.publishToDockerContainer
|
||||
label: constants.publishToDockerContainer(name)
|
||||
}).component();
|
||||
|
||||
this.dockerServerRadioButton.onDidChangeCheckedState((checked) => {
|
||||
@@ -539,10 +540,11 @@ export class PublishDatabaseDialog {
|
||||
}
|
||||
|
||||
private createLocalDbInfoRow(view: azdataType.ModelView): azdataType.FlexContainer {
|
||||
const name = getPublishServerName(this.project.getProjectTargetVersion());
|
||||
this.serverPortTextBox = view.modelBuilder.inputBox().withProps({
|
||||
value: constants.defaultPortNumber,
|
||||
ariaLabel: constants.serverPortNumber,
|
||||
placeHolder: constants.serverPortNumber,
|
||||
ariaLabel: constants.serverPortNumber(name),
|
||||
placeHolder: constants.serverPortNumber(name),
|
||||
width: cssStyles.publishDialogTextboxWidth,
|
||||
enabled: true,
|
||||
inputType: 'number',
|
||||
@@ -552,26 +554,26 @@ export class PublishDatabaseDialog {
|
||||
this.serverPortTextBox.onTextChanged(() => {
|
||||
this.tryEnableGenerateScriptAndOkButtons();
|
||||
});
|
||||
const serverPortRow = this.createFormRow(view, constants.serverPortNumber, this.serverPortTextBox);
|
||||
const serverPortRow = this.createFormRow(view, constants.serverPortNumber(name), this.serverPortTextBox);
|
||||
this.serverAdminPasswordTextBox = view.modelBuilder.inputBox().withProps({
|
||||
value: '',
|
||||
ariaLabel: constants.serverPassword,
|
||||
placeHolder: constants.serverPassword,
|
||||
ariaLabel: constants.serverPassword(name),
|
||||
placeHolder: constants.serverPassword(name),
|
||||
width: cssStyles.publishDialogTextboxWidth,
|
||||
enabled: true,
|
||||
inputType: 'password',
|
||||
validationErrorMessage: constants.invalidSQLPasswordMessage
|
||||
validationErrorMessage: constants.invalidSQLPasswordMessage(name)
|
||||
}).withValidation(component => !utils.isEmptyString(component.value) && utils.isValidSQLPassword(component.value || '')).component();
|
||||
|
||||
const serverPasswordRow = this.createFormRow(view, constants.serverPassword, this.serverAdminPasswordTextBox);
|
||||
const serverPasswordRow = this.createFormRow(view, constants.serverPassword(name), this.serverAdminPasswordTextBox);
|
||||
this.serverConfigAdminPasswordTextBox = view.modelBuilder.inputBox().withProps({
|
||||
value: '',
|
||||
ariaLabel: constants.confirmServerPassword,
|
||||
placeHolder: constants.confirmServerPassword,
|
||||
ariaLabel: constants.confirmServerPassword(name),
|
||||
placeHolder: constants.confirmServerPassword(name),
|
||||
width: cssStyles.publishDialogTextboxWidth,
|
||||
enabled: true,
|
||||
inputType: 'password',
|
||||
validationErrorMessage: constants.passwordNotMatch
|
||||
validationErrorMessage: constants.passwordNotMatch(name)
|
||||
}).withValidation(component => component.value === this.serverAdminPasswordTextBox?.value).component();
|
||||
this.serverAdminPasswordTextBox.onTextChanged(() => {
|
||||
this.tryEnableGenerateScriptAndOkButtons();
|
||||
@@ -582,18 +584,18 @@ export class PublishDatabaseDialog {
|
||||
this.serverConfigAdminPasswordTextBox.onTextChanged(() => {
|
||||
this.tryEnableGenerateScriptAndOkButtons();
|
||||
});
|
||||
const serverConfirmPasswordRow = this.createFormRow(view, constants.confirmServerPassword, this.serverConfigAdminPasswordTextBox);
|
||||
const serverConfirmPasswordRow = this.createFormRow(view, constants.confirmServerPassword(name), this.serverConfigAdminPasswordTextBox);
|
||||
|
||||
const baseImages = getDockerBaseImages();
|
||||
this.baseDockerImageDropDown = view.modelBuilder.dropDown().withProps({
|
||||
values: baseImages.map(x => x.name),
|
||||
ariaLabel: constants.baseDockerImage,
|
||||
ariaLabel: constants.baseDockerImage(name),
|
||||
width: cssStyles.publishDialogTextboxWidth,
|
||||
enabled: true
|
||||
}).component();
|
||||
|
||||
const agreementInfo = baseImages[0].agreementInfo;
|
||||
const dropDownRow = this.createFormRow(view, constants.baseDockerImage, this.baseDockerImageDropDown);
|
||||
const dropDownRow = this.createFormRow(view, constants.baseDockerImage(name), this.baseDockerImageDropDown);
|
||||
this.eulaCheckBox = view.modelBuilder.checkBox().withProps({
|
||||
ariaLabel: getAgreementDisplayText(agreementInfo),
|
||||
required: true
|
||||
|
||||
Reference in New Issue
Block a user