Ensure all object types have a System XXX? property. Fixes #1257

This commit is contained in:
Aditya Toshniwal
2020-04-23 17:31:40 +05:30
committed by Akshay Joshi
parent 2b5c90e379
commit dfb74904ed
64 changed files with 281 additions and 35 deletions

View File

@@ -154,6 +154,11 @@ class ExtensionView(PGChildNodeView):
self.conn = self.manager.connection(did=kwargs['did'])
self.template_path = 'extensions/sql'
self.datlastsysoid = \
self.manager.db_info[kwargs['did']]['datlastsysoid'] \
if self.manager.db_info is not None and \
kwargs['did'] in self.manager.db_info else 0
return f(*args, **kwargs)
return wrap
@@ -238,6 +243,8 @@ class ExtensionView(PGChildNodeView):
gettext("Could not find the extension information.")
)
res['rows'][0]['is_sys_obj'] = (
res['rows'][0]['eid'] <= self.datlastsysoid)
return ajax_response(
response=res['rows'][0],
status=200

View File

@@ -228,8 +228,10 @@ define('pgadmin.node.extension', [
});
return res;
},
},
{
},{
id: 'is_sys_obj', label: gettext('System extension?'),
cell:'boolean', type: 'switch', mode: ['properties'],
},{
id: 'comment', label: gettext('Comment'), cell: 'string',
type: 'multiline', readonly: true,
},