diff --git a/src/modules/pages/connection/connection.ts b/src/modules/pages/connection/connection.ts index 4682418..8094b8d 100644 --- a/src/modules/pages/connection/connection.ts +++ b/src/modules/pages/connection/connection.ts @@ -79,6 +79,7 @@ export class Connection extends BI.Widget { right: [ { type: 'dec.connection.driver.entry', + invisible: !BI.Services.getService('dec.service.global').isAdmin(), from: '.dec-dcm', }, ], diff --git a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts index 4dc6d0e..eff5383 100644 --- a/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts +++ b/src/modules/pages/connection/connection_jdbc/connection_jdbc.ts @@ -23,6 +23,7 @@ export class ConnectionJdbc extends BI.Widget { const connectionData = this.model.connectionSelectedOne.connectionData as ConnectionJDBC; const { driver, + driverSource, database, user, originalCharsetName, @@ -45,7 +46,7 @@ export class ConnectionJdbc extends BI.Widget { { type: FormItem.xtype, name: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), - value: driver, + value: BI.isKey(driverSource) ? `${driver} (${driverSource})` : driver, }, { type: FormItem.xtype, @@ -182,9 +183,9 @@ export class ConnectionJdbc extends BI.Widget { unit: BI.i18nText('BI-Basic_Seconds'), }, { type: FormItem.xtype, - invisible: BI.parseInt(fetchSize) < 0, + invisible: fetchSize < 0 && fetchSize !== -2, name: 'Fetchsize', - value: fetchSize, + value: fetchSize === -2 ? '' : fetchSize, }, ], }, diff --git a/src/modules/pages/maintain/forms/components/form.jdbc.ts b/src/modules/pages/maintain/forms/components/form.jdbc.ts index c73ff73..d9fe88c 100644 --- a/src/modules/pages/maintain/forms/components/form.jdbc.ts +++ b/src/modules/pages/maintain/forms/components/form.jdbc.ts @@ -148,7 +148,8 @@ export class FormJdbc extends BI.Widget { const value = this.form.driver.getValue(); const connectionData = this.options.formData.connectionData as ConnectionJDBC; const connectionType = getJdbcDatabaseType(connectionData.database, connectionData.driver); - const url = connectionType.urls ? connectionType.urls[value.driver] : connectionType.url; + // DEC-2020 + const url = (connectionType.urls && connectionType.urls[value.driver]) || connectionType.url; this.form.url.setValue(url); const urlInfo = resolveUrlInfo(url, connectionData.database); this.form.host.setValue(urlInfo.host); @@ -712,7 +713,7 @@ export class FormJdbc extends BI.Widget { el: { type: BI.VerticalLayout.xtype, cls: 'bi-border-top', - invisible: BI.parseInt(fetchSize) < 0, + invisible: fetchSize < 0 && fetchSize !== -2, items: [ { el: { @@ -723,7 +724,7 @@ export class FormJdbc extends BI.Widget { $value: 'fetch-size', width: 300, allowBlank: true, - value: fetchSize, + value: fetchSize === -2 ? '' : fetchSize, watermark: 'Fetchsize', validationChecker: [{ errorText: BI.i18nText('Dec-Dcm_Connection_Check_Fetch_Size_Range'), @@ -857,7 +858,7 @@ export class FormJdbc extends BI.Widget { creator: Dec ? Dec.personal.username : '', principal: this.form.principal.getValue(), keyPath: this.form.keyPath.getValue(), - fetchSize: BI.parseInt(this.form.fetchSize.getValue()), + fetchSize: BI.isEmptyString(this.form.fetchSize.getValue()) ? -2 : BI.parseInt(this.form.fetchSize.getValue()), connectionPoolAttr: { initialSize: this.form.initialSize.getValue(), maxActive: this.form.maxActive.getValue(),