|
|
|
@ -17,6 +17,8 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
oldPassword = ''; |
|
|
|
|
allDatabaseTypes = getAllDatabaseTypes(); |
|
|
|
|
|
|
|
|
|
private schemas = [] as string[]; |
|
|
|
|
|
|
|
|
|
testStatus: any; |
|
|
|
|
advancedSet: any; |
|
|
|
|
formUser: any; |
|
|
|
@ -298,14 +300,33 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
invisible: !databaseType.hasSchema, |
|
|
|
|
name: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'), |
|
|
|
|
forms: [{ |
|
|
|
|
type: TextEditor, |
|
|
|
|
type: SingleSelectInsertCombo, |
|
|
|
|
width: 300, |
|
|
|
|
allowBlank: true, |
|
|
|
|
value: schema, |
|
|
|
|
watermark: BI.i18nText('Dec-Dcm_Connection_Form_Pattern'), |
|
|
|
|
ref: (_ref: any) => { |
|
|
|
|
this.form.schema = _ref; |
|
|
|
|
}, |
|
|
|
|
itemsCreator: (options: { |
|
|
|
|
keywords?: string[], |
|
|
|
|
selectedValues: string[], |
|
|
|
|
times: number, |
|
|
|
|
type: number, |
|
|
|
|
}, callback: Function) => { |
|
|
|
|
let schemas = this.schemas; |
|
|
|
|
if (options.selectedValues && options.selectedValues.length > 0) { |
|
|
|
|
schemas = schemas.filter(item => item !== options.selectedValues[0]); |
|
|
|
|
} |
|
|
|
|
callback({ |
|
|
|
|
items: schemas.map(item => { |
|
|
|
|
return { |
|
|
|
|
text: item, |
|
|
|
|
value: item, |
|
|
|
|
}; |
|
|
|
|
}), |
|
|
|
|
hasNext: false, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
@ -598,6 +619,9 @@ export class FormJdbc extends BI.Widget {
|
|
|
|
|
this.form.url.setValue(url.replace('hostname', host).replace(':port', port ? `:${port}` : '')); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public setSchemas(schemas: string[]) { |
|
|
|
|
this.schemas = schemas; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public getSubmitValue():Connection { |
|
|
|
|
const connectionData = this.options.formData.connectionData as ConnectionJDBC; |
|
|
|
|