Merge pull request #11252 from Budibase/backmerge-20230717
Backmerge from master
This commit is contained in:
commit
7674eb3ef9
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"version": "2.8.10-alpha.4",
|
"version": "2.8.11",
|
||||||
"npmClient": "yarn",
|
"npmClient": "yarn",
|
||||||
"packages": [
|
"packages": [
|
||||||
"packages/*"
|
"packages/*"
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
{#if open}
|
{#if open}
|
||||||
<div class="overlay" on:mousedown|self={() => (open = false)} />
|
<div class="overlay" on:mousedown|self={() => (open = false)} />
|
||||||
<div
|
<div
|
||||||
transition:fly={{ y: -20, duration: 200 }}
|
transition:fly|local={{ y: -20, duration: 200 }}
|
||||||
class="spectrum-Popover spectrum-Popover--bottom is-open"
|
class="spectrum-Popover spectrum-Popover--bottom is-open"
|
||||||
>
|
>
|
||||||
<ul class="spectrum-Menu" role="listbox">
|
<ul class="spectrum-Menu" role="listbox">
|
||||||
|
|
|
@ -233,8 +233,11 @@ class SqlServerIntegration extends Sql implements DatasourcePlus {
|
||||||
try {
|
try {
|
||||||
// if encrypt is undefined, then default is to encrypt
|
// if encrypt is undefined, then default is to encrypt
|
||||||
const encrypt = this.config.encrypt === undefined || this.config.encrypt
|
const encrypt = this.config.encrypt === undefined || this.config.encrypt
|
||||||
const clientCfg: MSSQLConfig & sqlServer.config = {
|
const clientCfg: sqlServer.config = {
|
||||||
...this.config,
|
user: this.config.user,
|
||||||
|
password: this.config.password,
|
||||||
|
server: this.config.server,
|
||||||
|
database: this.config.database,
|
||||||
port: +this.config.port,
|
port: +this.config.port,
|
||||||
options: {
|
options: {
|
||||||
encrypt,
|
encrypt,
|
||||||
|
@ -244,11 +247,11 @@ class SqlServerIntegration extends Sql implements DatasourcePlus {
|
||||||
if (encrypt) {
|
if (encrypt) {
|
||||||
clientCfg.options!.trustServerCertificate = true
|
clientCfg.options!.trustServerCertificate = true
|
||||||
}
|
}
|
||||||
delete clientCfg.encrypt
|
|
||||||
|
|
||||||
switch (this.config.authType) {
|
switch (this.config.authType) {
|
||||||
case MSSQLConfigAuthType.AZURE_ACTIVE_DIRECTORY:
|
case MSSQLConfigAuthType.AZURE_ACTIVE_DIRECTORY:
|
||||||
const { clientId, tenantId, clientSecret } = this.config.adConfig
|
const { clientId, tenantId, clientSecret } =
|
||||||
|
this.config.adConfig || {}
|
||||||
const clientApp = new ConfidentialClientApplication({
|
const clientApp = new ConfidentialClientApplication({
|
||||||
auth: {
|
auth: {
|
||||||
clientId,
|
clientId,
|
||||||
|
@ -269,7 +272,8 @@ class SqlServerIntegration extends Sql implements DatasourcePlus {
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case MSSQLConfigAuthType.NTLM:
|
case MSSQLConfigAuthType.NTLM:
|
||||||
const { domain, trustServerCertificate } = this.config.ntlmConfig
|
const { domain, trustServerCertificate } =
|
||||||
|
this.config.ntlmConfig || {}
|
||||||
clientCfg.authentication = {
|
clientCfg.authentication = {
|
||||||
type: "ntlm",
|
type: "ntlm",
|
||||||
options: {
|
options: {
|
||||||
|
@ -277,8 +281,9 @@ class SqlServerIntegration extends Sql implements DatasourcePlus {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
clientCfg.options ??= {}
|
clientCfg.options ??= {}
|
||||||
clientCfg.options.trustServerCertificate = trustServerCertificate
|
clientCfg.options.trustServerCertificate = !!trustServerCertificate
|
||||||
break
|
break
|
||||||
|
case null:
|
||||||
case undefined:
|
case undefined:
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue