1. Syntax error displayed If the table is not available and the user tries to use the blank option. Fixes #6793

2. Not able to add Parameters for Functions and Procedures.
3. For the procedure, the Volatility option should be disabled in some cases. Fixes #6799
This commit is contained in:
Pradip Parkale 2021-09-28 10:37:47 +05:30 committed by Akshay Joshi
parent 15ecf5d821
commit d616cb88aa
3 changed files with 5 additions and 5 deletions

View File

@ -705,7 +705,7 @@ class PublicationView(PGChildNodeView, SchemaDiffObjectCompare):
sid: Server ID
did: Database ID
"""
res = [{'label': '', 'value': ''}]
res = []
sql = render_template("/".join([self.template_path,
'get_all_tables.sql']),

View File

@ -27,7 +27,7 @@ def get_tables(self):
self.server_id) + '/' +
str(self.db_id) + '/',
content_type='html/json')
return [tables.json['data'][1]['value']]
return [tables.json['data'][0]['value']]
def create_publication_api(self):

View File

@ -307,7 +307,7 @@ export default class FunctionSchema extends BaseUISchema {
{'label': 'VOLATILE', 'value': 'v'},
{'label': 'STABLE', 'value': 's'},
{'label': 'IMMUTABLE', 'value': 'i'},
], disabled: obj.inCatalog(),
], disabled: (!(this.type === 'procedure')) ? obj.inCatalog() : obj.isGreaterThan95,
controlProps: {allowClear: false},
},{
id: 'proretset', label: gettext('Returns a set?'), type: 'switch',
@ -342,7 +342,7 @@ export default class FunctionSchema extends BaseUISchema {
},{
id: 'procost', label: gettext('Estimated cost'), group: gettext('Options'),
cell:'string', type: 'text', deps: ['lanname'],
disabled: (!(this.type === 'procedure')) ? obj.inCatalog(): obj.isGreaterThan95,
disabled: obj.inCatalog(),
},{
id: 'prorows', label: gettext('Estimated rows'), type: 'text',
deps: ['proretset'], visible: obj.isVisible,
@ -381,7 +381,7 @@ export default class FunctionSchema extends BaseUISchema {
id: 'variables', label: '', type: 'collection',
group: gettext('Parameters'),
schema: this.getNodeVariableSchema(),
mode: ['edit', 'create'], canAdd: obj.inCatalog(), canEdit: false,
mode: ['edit', 'create'], canAdd: true, canEdit: false,
canDelete: true,
},
{