@ -16,7 +16,7 @@ export class MaintainForm extends BI.Widget {
props = {
props = {
connectionType : '' ,
connectionType : '' ,
}
} ;
isEdit = false ;
isEdit = false ;
connectionName = '' ;
connectionName = '' ;
@ -55,7 +55,7 @@ export class MaintainForm extends BI.Widget {
testEvent : ( ) = > {
testEvent : ( ) = > {
this . testConnection ( ) ;
this . testConnection ( ) ;
} ,
} ,
}
} ;
render() {
render() {
const formData = BI . clone ( this . getFormData ( ) ) ;
const formData = BI . clone ( this . getFormData ( ) ) ;
@ -98,7 +98,7 @@ export class MaintainForm extends BI.Widget {
}
}
}
}
private getFormData ( ) : Connection {
private getFormData ( ) : Connection {
switch ( this . options . connectionType ) {
switch ( this . options . connectionType ) {
case connectionType . JDBC :
case connectionType . JDBC :
return this . getJdbcConnection ( ) ;
return this . getJdbcConnection ( ) ;
@ -111,7 +111,7 @@ export class MaintainForm extends BI.Widget {
}
}
}
}
private getJdbcConnection ( ) : Connection {
private getJdbcConnection ( ) : Connection {
const connectionName = this . getConnectionName ( ) ;
const connectionName = this . getConnectionName ( ) ;
let editConnection : Connection ;
let editConnection : Connection ;
let connectionData : ConnectionJDBC ;
let connectionData : ConnectionJDBC ;
@ -122,8 +122,10 @@ export class MaintainForm extends BI.Widget {
database : this.model.datebaseTypeSelectedOne.databaseType ,
database : this.model.datebaseTypeSelectedOne.databaseType ,
connectionName ,
connectionName ,
connectionPoolAttr : DEFAULT_JDBC_POOL ,
connectionPoolAttr : DEFAULT_JDBC_POOL ,
port : '' ,
port : '' ,
host : 'localhost' ,
host : 'localhost' ,
fetchSize : this.model.datebaseTypeSelectedOne.fetchSize ? ? - 1 ,
identity : BI.UUID ( ) ,
} ;
} ;
editConnection = {
editConnection = {
connectionId : '' ,
connectionId : '' ,
@ -143,7 +145,7 @@ export class MaintainForm extends BI.Widget {
return connection ;
return connection ;
}
}
private getJndiConnection ( ) : Connection {
private getJndiConnection ( ) : Connection {
if ( this . model . datebaseTypeSelected ) {
if ( this . model . datebaseTypeSelected ) {
return {
return {
connectionId : '' ,
connectionId : '' ,
@ -158,7 +160,7 @@ export class MaintainForm extends BI.Widget {
return this . model . connectionSelectedOne ;
return this . model . connectionSelectedOne ;
}
}
private getPluginConnection ( ) : Connection {
private getPluginConnection ( ) : Connection {
if ( ! this . model . datebaseTypeSelected ) {
if ( ! this . model . datebaseTypeSelected ) {
this . connectionName = this . model . connectionSelectedOne . connectionName ;
this . connectionName = this . model . connectionSelectedOne . connectionName ;
this . isEdit = true ;
this . isEdit = true ;
@ -174,7 +176,7 @@ export class MaintainForm extends BI.Widget {
} ;
} ;
}
}
private testValue ( ) : boolean {
private testValue ( ) : boolean {
const value = this . form . getSubmitValue ( ) ;
const value = this . form . getSubmitValue ( ) ;
if ( ! value . connectionName ) {
if ( ! value . connectionName ) {
this . setFromError ( BI . i18nText ( 'Dec-Dcm_Connection_ConnectionName_Cannt_Null' ) ) ;
this . setFromError ( BI . i18nText ( 'Dec-Dcm_Connection_ConnectionName_Cannt_Null' ) ) ;