@ -1,19 +1,19 @@
import { shortcut } from '@core/core' ;
import { shortcut } from '@core/core' ;
import { CollapseXtype , EVENT_CHANGE } from 'src/modules/components/collapse/collapse' ;
import { Collapse , EVENT_CHANGE } from 'src/modules/components/collapse/collapse' ;
import { FormItemXtype } from '../../components/form_item/form_item' ;
import { FormItem } from '../../components/form_item/form_item' ;
import { Connection , ConnectionJDBC , ConnectionPoolJDBC } from 'src/modules/crud/crud.typings' ;
import { Connection , ConnectionJDBC , ConnectionPoolJDBC } from 'src/modules/crud/crud.typings' ;
import { connectionType } from '@constants/env' ;
import { connectionType } from '@constants/env' ;
import { CONNECT_CHARSET , CONNECTION_LAYOUT , INT_MAX_VALUE , INT_MIN_VALUE } from '@constants/constant' ;
import { CONNECT_CHARSET , CONNECTION_LAYOUT , INT_MAX_VALUE , INT_MIN_VALUE } from '@constants/constant' ;
import { getAllDatabaseTypes , getJdbcDatabaseType , resolveUrlInfo , splitUrl } from '../../../../app.service' ;
import { getAllDatabaseTypes , getJdbcDatabaseType , resolveUrlInfo , splitUrl } from '../../../../app.service' ;
import { TextCheckerXtype } from '../../../../components/text_checker/text_checker' ;
import { TextChecker } from '../../../../components/text_checker/text_checker' ;
import { ApiFactory } from 'src/modules/crud/apiFactory' ;
import { ApiFactory } from 'src/modules/crud/apiFactory' ;
import { Editor , EditorIconCheckCombo , Label , TextAreaEditor , TextEditor , TextValueCombo , VerticalLayout } from '@fui/core' ;
import { Editor , EditorIconCheckCombo , Label , TextAreaEditor , TextEditor , TextValueCombo , VerticalLayout } from '@fui/core' ;
import { FormItem } from '../../../connection/components/form_item/form_item' ;
const api = new ApiFactory ( ) . create ( ) ;
const api = new ApiFactory ( ) . create ( ) ;
export const FormJdbcXtype = 'dec.dcm.maintain.form.jdbc' ;
@shortcut ( )
@shortcut ( FormJdbcXtype )
export class FormJdbc extends BI . Widget {
export class FormJdbc extends BI . Widget {
static xtype = 'dec.dcm.maintain.form.jdbc' ;
props = {
props = {
formData : { } as Connection ,
formData : { } as Connection ,
}
}
@ -77,22 +77,22 @@ export class FormJdbc extends BI.Widget {
vgap ,
vgap ,
items : [
items : [
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Name' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Name' ) ,
forms : [ {
forms : [ {
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'connection-name' ,
$value : 'connection-name' ,
width : 300 ,
width : 300 ,
value : connectionName ,
value : connectionName ,
allowBlank : true ,
allowBlank : true ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . connectionName = _ref ;
this . form . connectionName = _ref ;
} ,
} ,
watermark : BI.i18nText ( 'Dec-Dcm_Data_Connections' ) ,
watermark : BI.i18nText ( 'Dec-Dcm_Data_Connections' ) ,
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Driver' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Driver' ) ,
forms : [ {
forms : [ {
type : BI . EditorIconCheckCombo . xtype ,
type : BI . EditorIconCheckCombo . xtype ,
@ -121,7 +121,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Name' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Name' ) ,
forms : [ {
forms : [ {
type : BI . TextEditor . xtype ,
type : BI . TextEditor . xtype ,
@ -142,7 +142,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Host' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Host' ) ,
forms : [ {
forms : [ {
type : BI . TextEditor . xtype ,
type : BI . TextEditor . xtype ,
@ -163,10 +163,10 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Port' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Port' ) ,
forms : [ {
forms : [ {
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'database-port' ,
$value : 'database-port' ,
width : 300 ,
width : 300 ,
allowBlank : true ,
allowBlank : true ,
@ -177,7 +177,7 @@ export class FormJdbc extends BI.Widget {
checker : ( value : string ) = > this . checkInteger ( value ) ,
checker : ( value : string ) = > this . checkInteger ( value ) ,
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . port = _ref ;
this . form . port = _ref ;
} ,
} ,
listeners : [ {
listeners : [ {
@ -189,7 +189,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_AuthType' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_AuthType' ) ,
invisible : ! databaseType . kerberos ,
invisible : ! databaseType . kerberos ,
forms : [ {
forms : [ {
@ -226,7 +226,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_UserName' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_UserName' ) ,
invisible : ! ! authType ,
invisible : ! ! authType ,
ref : ( _ref : FormItem ) = > {
ref : ( _ref : FormItem ) = > {
@ -245,7 +245,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Password' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Password' ) ,
invisible : ! ! authType ,
invisible : ! ! authType ,
ref : ( _ref : FormItem ) = > {
ref : ( _ref : FormItem ) = > {
@ -268,7 +268,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Principal' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Principal' ) ,
invisible : ! authType ,
invisible : ! authType ,
ref : ( _ref : FormItem ) = > {
ref : ( _ref : FormItem ) = > {
@ -287,7 +287,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_KeyPath' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_KeyPath' ) ,
invisible : ! authType ,
invisible : ! authType ,
ref : ( _ref : FormItem ) = > {
ref : ( _ref : FormItem ) = > {
@ -318,7 +318,7 @@ export class FormJdbc extends BI.Widget {
} ,
} ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_OriginalCharsetName' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_OriginalCharsetName' ) ,
forms : [ {
forms : [ {
type : BI . TextValueCombo . xtype ,
type : BI . TextValueCombo . xtype ,
@ -332,7 +332,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
invisible : ! databaseType . hasSchema ,
invisible : ! databaseType . hasSchema ,
height : 64 ,
height : 64 ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Pattern' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Pattern' ) ,
@ -373,7 +373,7 @@ export class FormJdbc extends BI.Widget {
bgap : 8 ,
bgap : 8 ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_URL' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_URL' ) ,
forms : [ {
forms : [ {
type : BI . TextEditor . xtype ,
type : BI . TextEditor . xtype ,
@ -397,7 +397,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : CollapseX type ,
type : Collapse . x type,
bgap : - 15 ,
bgap : - 15 ,
width : 70 ,
width : 70 ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Advanced_Setting' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Advanced_Setting' ) ,
@ -420,11 +420,11 @@ export class FormJdbc extends BI.Widget {
} ,
} ,
items : [
items : [
{
{
type : FormItemX type ,
type : FormItem . x type,
tgap : 15 ,
tgap : 15 ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Initial_Size' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Initial_Size' ) ,
forms : [ {
forms : [ {
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'initial-size' ,
$value : 'initial-size' ,
width : 300 ,
width : 300 ,
allowBlank : false ,
allowBlank : false ,
@ -435,16 +435,16 @@ export class FormJdbc extends BI.Widget {
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
watermark : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Initial_Size' ) ,
watermark : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Initial_Size' ) ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . initialSize = _ref ;
this . form . initialSize = _ref ;
} ,
} ,
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Max_Active' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Max_Active' ) ,
forms : [ {
forms : [ {
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'max-active' ,
$value : 'max-active' ,
width : 300 ,
width : 300 ,
allowBlank : false ,
allowBlank : false ,
@ -455,16 +455,16 @@ export class FormJdbc extends BI.Widget {
checker : ( value : string ) = > this . checkInteger ( value ) ,
checker : ( value : string ) = > this . checkInteger ( value ) ,
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . maxActive = _ref ;
this . form . maxActive = _ref ;
} ,
} ,
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Max_Idle' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Max_Idle' ) ,
forms : [ {
forms : [ {
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'max-idle' ,
$value : 'max-idle' ,
width : 300 ,
width : 300 ,
allowBlank : false ,
allowBlank : false ,
@ -475,16 +475,16 @@ export class FormJdbc extends BI.Widget {
checker : ( value : string ) = > this . checkInteger ( value ) ,
checker : ( value : string ) = > this . checkInteger ( value ) ,
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . maxIdle = _ref ;
this . form . maxIdle = _ref ;
} ,
} ,
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Min_Idle' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Min_Idle' ) ,
forms : [ {
forms : [ {
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'min-idle' ,
$value : 'min-idle' ,
width : 300 ,
width : 300 ,
allowBlank : false ,
allowBlank : false ,
@ -495,17 +495,17 @@ export class FormJdbc extends BI.Widget {
checker : ( value : string ) = > this . checkInteger ( value ) ,
checker : ( value : string ) = > this . checkInteger ( value ) ,
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . minIdle = _ref ;
this . form . minIdle = _ref ;
} ,
} ,
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Max_Wait' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Max_Wait' ) ,
forms : [
forms : [
{
{
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'max-wait' ,
$value : 'max-wait' ,
width : 300 ,
width : 300 ,
allowBlank : false ,
allowBlank : false ,
@ -516,7 +516,7 @@ export class FormJdbc extends BI.Widget {
checker : ( value : string ) = > this . checkInteger ( value ) ,
checker : ( value : string ) = > this . checkInteger ( value ) ,
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . maxWait = _ref ;
this . form . maxWait = _ref ;
} ,
} ,
} ,
} ,
@ -529,7 +529,7 @@ export class FormJdbc extends BI.Widget {
] ,
] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_SQL_Validation_Query' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_SQL_Validation_Query' ) ,
forms : [ {
forms : [ {
type : BI . TextAreaEditor . xtype ,
type : BI . TextAreaEditor . xtype ,
@ -546,7 +546,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Connection-Check' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Connection-Check' ) ,
forms : [ {
forms : [ {
type : BI . TextValueCombo . xtype ,
type : BI . TextValueCombo . xtype ,
@ -562,7 +562,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Test_On_Return' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Test_On_Return' ) ,
forms : [ {
forms : [ {
type : BI . TextValueCombo . xtype ,
type : BI . TextValueCombo . xtype ,
@ -578,7 +578,7 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Test_While_Idle' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Test_While_Idle' ) ,
forms : [ {
forms : [ {
type : BI . TextValueCombo . xtype ,
type : BI . TextValueCombo . xtype ,
@ -594,11 +594,11 @@ export class FormJdbc extends BI.Widget {
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Test_Between_Eviction_Millis' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Test_Between_Eviction_Millis' ) ,
forms : [
forms : [
{
{
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'test-between-evicition-millis' ,
$value : 'test-between-evicition-millis' ,
width : 300 ,
width : 300 ,
allowBlank : false ,
allowBlank : false ,
@ -609,7 +609,7 @@ export class FormJdbc extends BI.Widget {
checker : ( value : string ) = > this . checkNumber ( value ) ,
checker : ( value : string ) = > this . checkNumber ( value ) ,
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . timeBetweenEvictionRunsMillis = _ref ;
this . form . timeBetweenEvictionRunsMillis = _ref ;
} ,
} ,
} ,
} ,
@ -622,10 +622,10 @@ export class FormJdbc extends BI.Widget {
] ,
] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Tests_PerEviction_Run_Num' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Tests_PerEviction_Run_Num' ) ,
forms : [ {
forms : [ {
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'test-pereviction-run-num' ,
$value : 'test-pereviction-run-num' ,
width : 300 ,
width : 300 ,
allowBlank : false ,
allowBlank : false ,
@ -636,17 +636,17 @@ export class FormJdbc extends BI.Widget {
checker : ( value : string ) = > this . checkInteger ( value ) ,
checker : ( value : string ) = > this . checkInteger ( value ) ,
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . numTestsPerEvictionRun = _ref ;
this . form . numTestsPerEvictionRun = _ref ;
} ,
} ,
} ] ,
} ] ,
} ,
} ,
{
{
type : FormItemX type ,
type : FormItem . x type,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Min_Evictable_Idle_Time_Millis' ) ,
name : BI.i18nText ( 'Dec-Dcm_Connection_Form_Database_Min_Evictable_Idle_Time_Millis' ) ,
forms : [
forms : [
{
{
type : TextCheckerX type ,
type : TextChecker . x type,
$value : 'min-evictable-idle-time-millis' ,
$value : 'min-evictable-idle-time-millis' ,
width : 300 ,
width : 300 ,
allowBlank : false ,
allowBlank : false ,
@ -657,7 +657,7 @@ export class FormJdbc extends BI.Widget {
checker : ( value : string ) = > this . checkInteger ( value ) ,
checker : ( value : string ) = > this . checkInteger ( value ) ,
autoFix : true ,
autoFix : true ,
} , valueRangeConfig ] ,
} , valueRangeConfig ] ,
ref : ( _ref : any ) = > {
ref : ( _ref : TextChecker ) = > {
this . form . minEvictableIdleTimeMillis = _ref ;
this . form . minEvictableIdleTimeMillis = _ref ;
} ,
} ,
} ,
} ,