mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Addressed comments left in a merged PR (#17307)
This commit is contained in:
@@ -170,8 +170,8 @@ export const dockerContainerNotRunningErrorMessage = localize('dockerContainerNo
|
|||||||
export const dockerContainerFailedToRunErrorMessage = localize('dockerContainerFailedToRunErrorMessage', "Failed to run the docker container");
|
export const dockerContainerFailedToRunErrorMessage = localize('dockerContainerFailedToRunErrorMessage', "Failed to run the docker container");
|
||||||
export const connectingToSqlServerOnDockerMessage = localize('connectingToSqlServerOnDockerMessage', "Connecting to SQL Server on Docker");
|
export const connectingToSqlServerOnDockerMessage = localize('connectingToSqlServerOnDockerMessage', "Connecting to SQL Server on Docker");
|
||||||
export const deployProjectFailedMessage = localize('deployProjectFailedMessage', "Failed to open a connection to the deployed database'");
|
export const deployProjectFailedMessage = localize('deployProjectFailedMessage', "Failed to open a connection to the deployed database'");
|
||||||
export const containerAlreadyExistForProject = localize('containerAlreadyExistForProject', "Other servers on container already exist for the project. Do you want to delete them?'");
|
export const containerAlreadyExistForProject = localize('containerAlreadyExistForProject', "Other servers on container already exist for the project. Do you want to delete them?");
|
||||||
export const checkoutOutputMessage = localize('checkoutOutputMessage', "Check output pane for more details.");
|
export const checkoutOutputMessage = localize('checkoutOutputMessage', "Check output pane for more details");
|
||||||
export function taskFailedError(taskName: string, err: string): string { return localize('taskFailedError.error', "Failed to complete task '{0}'. Error: {1}", taskName, err); }
|
export function taskFailedError(taskName: string, err: string): string { return localize('taskFailedError.error', "Failed to complete task '{0}'. Error: {1}", taskName, err); }
|
||||||
export function publishToContainerFailed(errorMessage: string) { return localize('publishToContainerFailed', "Failed to publish to container. {0}", errorMessage); }
|
export function publishToContainerFailed(errorMessage: string) { return localize('publishToContainerFailed', "Failed to publish to container. {0}", errorMessage); }
|
||||||
export function deployAppSettingUpdateFailed(appSetting: string) { return localize('deployAppSettingUpdateFailed', "Failed to update app setting '{0}'", appSetting); }
|
export function deployAppSettingUpdateFailed(appSetting: string) { return localize('deployAppSettingUpdateFailed', "Failed to update app setting '{0}'", appSetting); }
|
||||||
|
|||||||
@@ -561,14 +561,14 @@ export function isValidSQLPassword(password: string, userName: string = 'sa'): b
|
|||||||
|
|
||||||
export async function showErrorMessageWithOutputChannel(errorMessageFunc: (error: string) => string, error: any, outputChannel: vscode.OutputChannel): Promise<void> {
|
export async function showErrorMessageWithOutputChannel(errorMessageFunc: (error: string) => string, error: any, outputChannel: vscode.OutputChannel): Promise<void> {
|
||||||
const result = await vscode.window.showErrorMessage(errorMessageFunc(getErrorMessage(error)), constants.checkoutOutputMessage);
|
const result = await vscode.window.showErrorMessage(errorMessageFunc(getErrorMessage(error)), constants.checkoutOutputMessage);
|
||||||
if (result !== undefined) {
|
if (result === constants.checkoutOutputMessage) {
|
||||||
outputChannel.show();
|
outputChannel.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function showInfoMessageWithOutputChannel(message: string, outputChannel: vscode.OutputChannel): Promise<void> {
|
export async function showInfoMessageWithOutputChannel(message: string, outputChannel: vscode.OutputChannel): Promise<void> {
|
||||||
const result = await vscode.window.showInformationMessage(message, constants.checkoutOutputMessage);
|
const result = await vscode.window.showInformationMessage(message, constants.checkoutOutputMessage);
|
||||||
if (result !== undefined) {
|
if (result === constants.checkoutOutputMessage) {
|
||||||
outputChannel.show();
|
outputChannel.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export class DeployService {
|
|||||||
providerName: 'MSSQL',
|
providerName: 'MSSQL',
|
||||||
saveProfile: false,
|
saveProfile: false,
|
||||||
id: '',
|
id: '',
|
||||||
connectionName: `${profile.profileName}`,
|
connectionName: profile.profileName,
|
||||||
options: [],
|
options: [],
|
||||||
authenticationType: 'SqlLogin'
|
authenticationType: 'SqlLogin'
|
||||||
};
|
};
|
||||||
@@ -401,13 +401,9 @@ RUN ["/bin/bash", "/opt/commands/start.sh"]
|
|||||||
await fse.writeFile(filePath, content);
|
await fse.writeFile(filePath, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async getCurrentIds(commandToRun: string): Promise<string[]> {
|
|
||||||
const currentIds = await utils.executeCommand(commandToRun, this._outputChannel);
|
|
||||||
return currentIds ? currentIds.split(/\r?\n/) : [];
|
|
||||||
}
|
|
||||||
|
|
||||||
public async getCurrentDockerContainer(imageLabel: string): Promise<string[]> {
|
public async getCurrentDockerContainer(imageLabel: string): Promise<string[]> {
|
||||||
return await this.getCurrentIds(`docker ps -q -a --filter label=${imageLabel}`);
|
const currentIds = await utils.executeCommand(`docker ps -q -a --filter label=${imageLabel}`, this._outputChannel);
|
||||||
|
return currentIds ? currentIds.split(/\r?\n/) : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public async cleanDockerObjects(ids: string[], commandsToClean: string[]): Promise<void> {
|
public async cleanDockerObjects(ids: string[], commandsToClean: string[]): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user