Skip to content

Commit

Permalink
Adding prompt to create firewall rule if connection through dialog hi…
Browse files Browse the repository at this point in the history
…ts that. (#18465)

* checkpoint

* loc

* fleshing out UX

* loc cleanup

* hooking up VSC token -> STS account conversion

* before refactor

* loc

* fixing race condition

* adding telemetry
  • Loading branch information
Benjin authored Dec 4, 2024
1 parent 7fb0472 commit 0a45a5e
Show file tree
Hide file tree
Showing 14 changed files with 776 additions and 178 deletions.
18 changes: 17 additions & 1 deletion localization/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,14 @@
"Delete": "Delete",
"Filter Settings": "Filter Settings",
"Cancel": "Cancel",
"Close": "Close",
"Are you sure?": "Are you sure?",
"Are you sure you want to {0}?/{0} is the action being confirmed": {
"message": "Are you sure you want to {0}?",
"comment": [
"{0} is the action being confirmed"
]
},
"Close": "Close",
"Error": "Error",
"Clear All": "Clear All",
"OK": "OK",
Expand Down Expand Up @@ -214,6 +214,9 @@
"Note: A self-signed certificate offers only limited protection and is not a recommended practice for production environments. Do you want to enable 'Trust server certificate' on this connection and retry?": "Note: A self-signed certificate offers only limited protection and is not a recommended practice for production environments. Do you want to enable 'Trust server certificate' on this connection and retry?",
"Read more": "Read more",
"Enable 'Trust Server Certificate'": "Enable 'Trust Server Certificate'",
"Create a new firewall rule": "Create a new firewall rule",
"A firewall rule is required to access this server.": "A firewall rule is required to access this server.",
"Add Firewall Rule": "Add Firewall Rule",
"Select a {0} for filtering/{0} is the type of the dropdown's contents, e.g 'resource group' or 'server'": {
"message": "Select a {0} for filtering",
"comment": [
Expand Down Expand Up @@ -762,6 +765,19 @@
"{0} is the connection name"
]
},
"Error loading Azure account information for tenant ID '{0}'/{0} is the tenant ID": {
"message": "Error loading Azure account information for tenant ID '{0}'",
"comment": [
"{0} is the tenant ID"
]
},
"Error creating firewall rule {0}. Check your Azure account settings and try again. Error: {1}/{0} is the rule info in format 'name (startIp - endIp)'{1} is the error message": {
"message": "Error creating firewall rule {0}. Check your Azure account settings and try again. Error: {1}",
"comment": [
"{0} is the rule info in format 'name (startIp - endIp)'",
"{1} is the error message"
]
},
"How likely it is that you would recommend the MSSQL extension to a friend or colleague?": "How likely it is that you would recommend the MSSQL extension to a friend or colleague?",
"What can we do to improve?": "What can we do to improve?",
"Take Survey": "Take Survey",
Expand Down
18 changes: 18 additions & 0 deletions localization/xliff/vscode-mssql.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<trans-unit id="++CODE++08fef8ce26bbc554c749504c8d169642c3039345674331079add345b808e96a7">
<source xml:lang="en">A SQL editor must have focus before executing this command</source>
</trans-unit>
<trans-unit id="++CODE++6ab58ce9ca23e017bf594366b66b620458a5580640ddaf3aebf96f3c8fdf0977">
<source xml:lang="en">A firewall rule is required to access this server.</source>
</trans-unit>
<trans-unit id="++CODE++880a0618dd92395efe1446e54fe5d50854c148586fdc14f5da8aecda61c827ae">
<source xml:lang="en">A predefined global default value for the column or binding.</source>
</trans-unit>
Expand Down Expand Up @@ -39,6 +42,9 @@
<trans-unit id="++CODE++d72d67f0f765e5584e6db8bd1e591a84914d23ff29e9f5b20d8b39125091fca0">
<source xml:lang="en">Add Connection</source>
</trans-unit>
<trans-unit id="++CODE++079cd7244ce7f3c0fe474c025b5ff8e58c3678fba1ed67f0120416ac0071df85">
<source xml:lang="en">Add Firewall Rule</source>
</trans-unit>
<trans-unit id="++CODE++09857ad18f3cf066330f9fc08318e41f71ecb7b7d71f12bd1dd3b9d050db4ca0">
<source xml:lang="en">Add a Microsoft Entra account...</source>
</trans-unit>
Expand Down Expand Up @@ -339,6 +345,9 @@
<trans-unit id="++CODE++0d5e7861b9a1710c8e1d2347dbb8d4dde272143bbeca537d216474ef7bd9193f">
<source xml:lang="en">Create Firewall Rule</source>
</trans-unit>
<trans-unit id="++CODE++4cbb437498e0de07f05b633c28f811c67840a2f67e956543557c6085560869e3">
<source xml:lang="en">Create a new firewall rule</source>
</trans-unit>
<trans-unit id="++CODE++60c0c05c936ef432e55dd4ea862b5dd1d454413310190ddaef63ef2dbbf75c03">
<source xml:lang="en">Credential Error: An error occurred while attempting to refresh account credentials. Please re-authenticate.</source>
</trans-unit>
Expand Down Expand Up @@ -465,6 +474,15 @@
<trans-unit id="++CODE++480311d3f925f85184b69381dc5f05bb2607e6beb8d354ffe58276a0cd1dd5d9">
<source xml:lang="en">Error connecting to: </source>
</trans-unit>
<trans-unit id="++CODE++268604d30ba8caf436360709d0933805fb33fe3c3bb87a0782ce8c393ecf7da4">
<source xml:lang="en">Error creating firewall rule {0}. Check your Azure account settings and try again. Error: {1}</source>
<note>{0} is the rule info in format &apos;name (startIp - endIp)&apos;
{1} is the error message</note>
</trans-unit>
<trans-unit id="++CODE++8f53a6df59ae589cf0996134e10ad383f8914500648095194f2d16cc2427954b">
<source xml:lang="en">Error loading Azure account information for tenant ID &apos;{0}&apos;</source>
<note>{0} is the tenant ID</note>
</trans-unit>
<trans-unit id="++CODE++5a50d3034b36e62aa3eaca3fc11e55b184039c652bfdfe1ffb032321677bd530">
<source xml:lang="en">Error loading Azure databases for subscription {0} ({1}). Confirm that you have permission.</source>
<note>{0} is the subscription name
Expand Down
1 change: 1 addition & 0 deletions src/connectionconfig/connectionConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
*--------------------------------------------------------------------------------------------*/

export const connectionCertValidationFailedErrorCode = -2146893019;
export const connectionFirewallErrorCode = 40615;
Loading

0 comments on commit 0a45a5e

Please sign in to comment.