Skip to content

Commit

Permalink
Merge branch 'master' into copyPaste/tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya Bist committed Dec 12, 2019
2 parents d5cb210 + 5ae0fe6 commit 081cd78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
6 changes: 0 additions & 6 deletions localization/xliff/enu/constants/localizedConstants.enu.xlf
Expand Up @@ -236,9 +236,6 @@
<trans-unit id="msgPromptRetryFirewallRuleNotSignedIn">
<source xml:lang="en">Your client IP address does not have access to the server. Sign in to an Azure account and create a new firewall rule to enable access.</source>
</trans-unit>
<trans-unit id="msgPromptRetryFirewallRuleNotActivated">
<source xml:lang="en">Your client IP address does not have access to the server. Activate the Azure Account extension and sign in to an Azure account and create a new firewall rule to enable access.</source>
</trans-unit>
<trans-unit id="msgPromptRetryFirewallRuleSignedIn">
<source xml:lang="en">Account signed In. Create new firewall rule? </source>
</trans-unit>
Expand Down Expand Up @@ -266,9 +263,6 @@
<trans-unit id="downloadAndInstallLabel">
<source xml:lang="en">Download and Install</source>
</trans-unit>
<trans-unit id="activateLabel">
<source xml:lang="en">Activate</source>
</trans-unit>
<trans-unit id="createFirewallRuleLabel">
<source xml:lang="en">Create Firewall Rule</source>
</trans-unit>
Expand Down
20 changes: 5 additions & 15 deletions src/views/connectionUI.ts
Expand Up @@ -507,17 +507,8 @@ export class ConnectionUI {
} else {
// If the extension exists but not active
if (this._vscodeWrapper.azureAccountExtension) {
// Prompt user to activate the extension
let selection = await this._vscodeWrapper.showInformationMessage(LocalizedConstants.msgPromptRetryFirewallRuleNotActivated,
LocalizedConstants.activateLabel);
if (selection === LocalizedConstants.activateLabel) {
let activated = await this._vscodeWrapper.azureAccountExtension.activate();
if (activated) {
this.showAzureExtensionActivated();
return this.handleFirewallError(uri, profile, ipAddress);
}
}
return false;
await this._vscodeWrapper.azureAccountExtension.activate();
return this.handleExtensionActivation();
} else {
// Show recommendation to download the azure account extension
const selection = await this._vscodeWrapper.showInformationMessage(LocalizedConstants.msgPromptRetryFirewallRuleExtNotInstalled,
Expand All @@ -528,7 +519,7 @@ export class ConnectionUI {
// Activate the Azure Account extension and call the function again
if (this._vscodeWrapper.azureAccountExtension) {
await this._vscodeWrapper.azureAccountExtension.activate();
await this.showAzureExtensionActivated();
await this.handleExtensionActivation();
}
});
}
Expand All @@ -538,7 +529,7 @@ export class ConnectionUI {
}

/**
* Save a connection profile using the connection store.
* Save a connection profile using the connection store
*/
private saveProfile(profile: IConnectionProfile): Promise<IConnectionProfile> {
return this._connectionStore.saveProfile(profile);
Expand Down Expand Up @@ -582,7 +573,7 @@ export class ConnectionUI {
});
}

private async showAzureExtensionActivated(): Promise<boolean> {
private async handleExtensionActivation(): Promise<boolean> {
if (!this._vscodeWrapper.isAccountSignedIn) {
const result = await this._vscodeWrapper.showInformationMessage(LocalizedConstants.msgPromptAzureExtensionActivatedNotSignedIn,
LocalizedConstants.signInLabel);
Expand All @@ -591,7 +582,6 @@ export class ConnectionUI {
}
return false;
} else {
await this._vscodeWrapper.showInformationMessage(LocalizedConstants.msgPromptAzureExtensionActivatedSignedIn);
return true;
}
}
Expand Down

0 comments on commit 081cd78

Please sign in to comment.