Ignore SQLAlchemy vulnerability as it is ignored by the upstream too.

Fix BigAnimal database versions by type. #5637
This commit is contained in:
Khushboo Vashi
2022-12-13 15:57:43 +05:30
committed by GitHub
parent 1fabf7f494
commit d9fba3a186
4 changed files with 19 additions and 11 deletions

View File

@@ -108,11 +108,11 @@ export function BigAnimalDatabase(props) {
return url_for('biganimal.db_types');
}
}),
db_versions: ()=>getNodeAjaxOptions('biganimal_db_versions', pgAdmin.Browser.Nodes['server'], props.nodeInfo, props.nodeData, {
db_versions: (db_type)=>getNodeAjaxOptions('biganimal_db_versions', pgAdmin.Browser.Nodes['server'], props.nodeInfo, props.nodeData, {
useCache:false,
cacheNode: 'server',
customGenerateUrl: ()=>{
return url_for('biganimal.db_versions');
return url_for('biganimal.db_versions', {'db_type': db_type || 'pg'});
}
}),
server_groups: ()=>getNodeListById(pgAdmin.Browser.Nodes['server_group'], props.nodeInfo, props.nodeData),

View File

@@ -538,9 +538,16 @@ class BigAnimalDatabaseSchema extends BaseUISchema {
options: this.fieldOptions.db_types,
noEmpty: true, orientation: 'vertical',
},{
id: 'postgres_version', label: gettext('PostgreSQL version'), type: 'select',
mode: ['create'], noEmpty: true,
id: 'postgres_version', label: gettext('PostgreSQL version'),
mode: ['create'], noEmpty: true, deps: ['database_type'],
options: this.fieldOptions.db_versions,
type: (state) => {
return {
type: 'select',
options: ()=>this.fieldOptions.db_versions(state.database_type),
optionsReloadBasis: state.database_type,
};
},
},{
id: 'password', label: gettext('Database password'), type: 'password',
mode: ['create'], noEmpty: true,