mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-08 17:24:01 -05:00
Change service installation messages to not steal focus (#6227)
* Change service installation messages to not steal focus * Undo unnecessary changes to localized strings in serviceClient.ts * Add default case for missing server event types
This commit is contained in:
@@ -109,10 +109,10 @@ export class ServiceClient {
|
||||
private generateHandleServerProviderEvent(): EventAndListener {
|
||||
let dots = 0;
|
||||
return (e: string, ...args: any[]) => {
|
||||
this.outputChannel.show();
|
||||
this.statusView.show();
|
||||
switch (e) {
|
||||
case Events.INSTALL_START:
|
||||
this.outputChannel.show(true);
|
||||
this.statusView.show();
|
||||
this.outputChannel.appendLine(localize('installingServiceDetailed', 'Installing {0} service to {1}', Constants.serviceName, args[0]));
|
||||
this.statusView.text = localize('installingService', 'Installing Service');
|
||||
break;
|
||||
@@ -121,7 +121,7 @@ export class ServiceClient {
|
||||
break;
|
||||
case Events.DOWNLOAD_START:
|
||||
this.outputChannel.appendLine(localize('downloadingService', 'Downloading {0}', args[0]));
|
||||
this.outputChannel.append(`(${Math.ceil(args[1] / 1024)} KB)`);
|
||||
this.outputChannel.append(localize('downloadingServiceSize', '({0} KB)', Math.ceil(args[1] / 1024).toLocaleString(vscode.env.language)));
|
||||
this.statusView.text = localize('downloadingServiceStatus', 'Downloading Service');
|
||||
break;
|
||||
case Events.DOWNLOAD_PROGRESS:
|
||||
@@ -135,6 +135,7 @@ export class ServiceClient {
|
||||
this.outputChannel.appendLine(localize('downloadingServiceComplete', 'Done!'));
|
||||
break;
|
||||
default:
|
||||
console.error(`Unknown event from Server Provider ${e}`);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -362,20 +362,20 @@ function generateServerOptions(executablePath: string): ServerOptions {
|
||||
function generateHandleServerProviderEvent() {
|
||||
let dots = 0;
|
||||
return (e: string, ...args: any[]) => {
|
||||
outputChannel.show();
|
||||
statusView.show();
|
||||
switch (e) {
|
||||
case Events.INSTALL_START:
|
||||
outputChannel.appendLine(`Installing ${Constants.serviceName} service to ${args[0]}`);
|
||||
statusView.text = 'Installing Service';
|
||||
outputChannel.show(true);
|
||||
statusView.show();
|
||||
outputChannel.appendLine(localize('installingServiceChannelMsg', 'Installing {0} service to {1}', Constants.serviceName, args[0]));
|
||||
statusView.text = localize('installingServiceStatusMsg', 'Installing Service');
|
||||
break;
|
||||
case Events.INSTALL_END:
|
||||
outputChannel.appendLine('Installed');
|
||||
outputChannel.appendLine(localize('installedServiceChannelMsg', 'Installed'));
|
||||
break;
|
||||
case Events.DOWNLOAD_START:
|
||||
outputChannel.appendLine(`Downloading ${args[0]}`);
|
||||
outputChannel.append(`(${Math.ceil(args[1] / 1024)} KB)`);
|
||||
statusView.text = 'Downloading Service';
|
||||
outputChannel.appendLine(localize('downloadingServiceChannelMsg', 'Downloading {0}', args[0]));
|
||||
outputChannel.append(localize('downloadingServiceSizeChannelMsg', '({0} KB)', Math.ceil(args[1] / 1024).toLocaleString(vscode.env.language)));
|
||||
statusView.text = localize('downloadingServiceStatusMsg', 'Downloading Service');
|
||||
break;
|
||||
case Events.DOWNLOAD_PROGRESS:
|
||||
let newDots = Math.ceil(args[0] / 5);
|
||||
@@ -385,7 +385,10 @@ function generateHandleServerProviderEvent() {
|
||||
}
|
||||
break;
|
||||
case Events.DOWNLOAD_END:
|
||||
outputChannel.appendLine('Done!');
|
||||
outputChannel.appendLine(localize('downloadServiceDoneChannelMsg', 'Done!'));
|
||||
break;
|
||||
default:
|
||||
console.error(`Unknown event from Server Provider ${e}`);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user