|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
import { shortcut } from '@core/core'; |
|
|
|
|
import { Vertical, TextEditor, TextValueCombo, Label, TextAreaEditor, Editor, SingleSelectInsertCombo, Left, TextButton } from 'ui'; |
|
|
|
|
import { Vertical, TextEditor, TextValueCombo, Label, TextAreaEditor, Editor, EdirotIconCheckCombo, Left, TextButton } from 'ui'; |
|
|
|
|
import { CollapseXtype, EVENT_CHANGE } from 'src/modules/components/collapse/collapse'; |
|
|
|
|
import { FormItemXtype } from '../../components/form_item/form_item'; |
|
|
|
|
import { Connection, ConnectionJDBC, ConnectionPoolJDBC } from 'src/modules/crud/crud.typings'; |
|
|
|
@ -85,29 +85,15 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
type: FormItemXtype, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Driver'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: SingleSelectInsertCombo, |
|
|
|
|
type: EdirotIconCheckCombo, |
|
|
|
|
width: 300, |
|
|
|
|
value: driver, |
|
|
|
|
ref: (_ref: any) => { |
|
|
|
|
this.form.driver = _ref; |
|
|
|
|
}, |
|
|
|
|
itemsCreator: (options: { |
|
|
|
|
keywords?: string[], |
|
|
|
|
selectedValues: string[], |
|
|
|
|
times: number, |
|
|
|
|
type: number, |
|
|
|
|
}, callback: Function) => { |
|
|
|
|
let drivers = this.getDrivers(); |
|
|
|
|
if (options.selectedValues.length > 0) { |
|
|
|
|
drivers = drivers.filter(item => item.text !== options.selectedValues[0]); |
|
|
|
|
} |
|
|
|
|
callback({ |
|
|
|
|
items: drivers, |
|
|
|
|
hasNext: false, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
items: this.getDrivers(), |
|
|
|
|
listeners: [{ |
|
|
|
|
eventName: BI.SingleSelectInsertCombo.EVENT_CONFIRM, |
|
|
|
|
eventName: BI.EditorIconCheckCombo.EVENT_CHANGE, |
|
|
|
|
action: () => { |
|
|
|
|
const value = this.form.driver.getValue(); |
|
|
|
|
const connectionData = this.options.formData.connectionData as ConnectionJDBC; |
|
|
|
@ -675,6 +661,7 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
text: connectionData.driver, |
|
|
|
|
value: connectionData.driver, |
|
|
|
|
}, |
|
|
|
|
...drivers, |
|
|
|
|
]; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|