mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-23 01:06:31 -06:00
1) Ensure that JSON strings as comments should be added properly for all the objects. Fixes #3582
2) Fixed alignment issue of columns in definition section of Index node. Fixes #4121
This commit is contained in:
parent
a25bb2b7db
commit
024cfd2fab
@ -15,7 +15,9 @@ Features
|
|||||||
Bug fixes
|
Bug fixes
|
||||||
*********
|
*********
|
||||||
|
|
||||||
|
| `Bug #3582 <https://redmine.postgresql.org/issues/3582>`_ - Ensure that JSON strings as comments should be added properly for all the objects.
|
||||||
| `Bug #3938 <https://redmine.postgresql.org/issues/3938>`_ - Added support for Default Partition.
|
| `Bug #3938 <https://redmine.postgresql.org/issues/3938>`_ - Added support for Default Partition.
|
||||||
| `Bug #4104 <https://redmine.postgresql.org/issues/4104>`_ - Ensure that record should be add/edited for root partition table with primary keys.
|
| `Bug #4104 <https://redmine.postgresql.org/issues/4104>`_ - Ensure that record should be add/edited for root partition table with primary keys.
|
||||||
|
| `Bug #4121 <https://redmine.postgresql.org/issues/4121>`_ - Fixed alignment issue of columns in definition section of Index node.
|
||||||
| `Bug #4138 <https://redmine.postgresql.org/issues/4138>`_ - Fix an issue where the dropdown becomes misaligned/displaced.
|
| `Bug #4138 <https://redmine.postgresql.org/issues/4138>`_ - Fix an issue where the dropdown becomes misaligned/displaced.
|
||||||
| `Bug #4161 <https://redmine.postgresql.org/issues/4161>`_ - Ensure that parameters of procedures for EPAS server 10 and below should be set/reset properly.
|
| `Bug #4161 <https://redmine.postgresql.org/issues/4161>`_ - Ensure that parameters of procedures for EPAS server 10 and below should be set/reset properly.
|
@ -805,7 +805,12 @@ class DatabaseView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comments',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
status, res = self.get_sql(gid, sid, data, did)
|
status, res = self.get_sql(gid, sid, data, did)
|
||||||
|
@ -555,7 +555,12 @@ class ForeignDataWrapperView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
try:
|
try:
|
||||||
|
@ -578,7 +578,12 @@ class ForeignServerView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
try:
|
try:
|
||||||
|
@ -558,7 +558,12 @@ class LanguageView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
try:
|
try:
|
||||||
|
@ -724,7 +724,12 @@ It may have been removed by another user.
|
|||||||
data = dict()
|
data = dict()
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -602,7 +602,12 @@ class CollationView(PGChildNodeView):
|
|||||||
data = dict()
|
data = dict()
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -612,7 +612,12 @@ class FtsConfigurationView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -607,7 +607,12 @@ class FtsDictionaryView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -534,7 +534,12 @@ class FtsParserView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -507,7 +507,12 @@ class FtsTemplateView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -538,7 +538,12 @@ class SequenceView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -909,7 +909,12 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings):
|
|||||||
|
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
@ -1036,7 +1041,12 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings):
|
|||||||
|
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
@ -1223,7 +1233,12 @@ class TableView(BaseTableView, DataTypeReader, VacuumSettings):
|
|||||||
res = None
|
res = None
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -495,7 +495,12 @@ class CheckConstraintView(PGChildNodeView):
|
|||||||
|
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
@ -762,7 +767,12 @@ class CheckConstraintView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -558,7 +558,12 @@ class ExclusionConstraintView(PGChildNodeView):
|
|||||||
|
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
@ -788,7 +793,12 @@ class ExclusionConstraintView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -563,7 +563,12 @@ class ForeignKeyConstraintView(PGChildNodeView):
|
|||||||
|
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
@ -827,7 +832,12 @@ class ForeignKeyConstraintView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -576,7 +576,12 @@ class IndexConstraintView(PGChildNodeView):
|
|||||||
|
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
@ -828,7 +833,12 @@ class IndexConstraintView(PGChildNodeView):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -621,7 +621,12 @@ class IndexesView(PGChildNodeView):
|
|||||||
|
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
@ -826,7 +831,12 @@ class IndexesView(PGChildNodeView):
|
|||||||
data = dict()
|
data = dict()
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -230,6 +230,7 @@ define('pgadmin.node.index', [
|
|||||||
hasSQL: true,
|
hasSQL: true,
|
||||||
hasDepends: true,
|
hasDepends: true,
|
||||||
hasStatistics: true,
|
hasStatistics: true,
|
||||||
|
width: pgBrowser.stdW.md + 'px',
|
||||||
statsPrettifyFields: [gettext('Size'), gettext('Index size')],
|
statsPrettifyFields: [gettext('Size'), gettext('Index size')],
|
||||||
Init: function() {
|
Init: function() {
|
||||||
/* Avoid mulitple registration of menus */
|
/* Avoid mulitple registration of menus */
|
||||||
|
@ -619,7 +619,12 @@ class TriggerView(PGChildNodeView):
|
|||||||
|
|
||||||
for k, v in data.items():
|
for k, v in data.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except (ValueError, TypeError, KeyError):
|
except (ValueError, TypeError, KeyError):
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
@ -827,7 +832,12 @@ class TriggerView(PGChildNodeView):
|
|||||||
data = dict()
|
data = dict()
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -647,7 +647,12 @@ class ViewNode(PGChildNodeView, VacuumSettings):
|
|||||||
data = {}
|
data = {}
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('comment',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
|
||||||
|
@ -457,7 +457,12 @@ class TablespaceView(PGChildNodeView):
|
|||||||
data = dict()
|
data = dict()
|
||||||
for k, v in request.args.items():
|
for k, v in request.args.items():
|
||||||
try:
|
try:
|
||||||
data[k] = json.loads(v, encoding='utf-8')
|
# comments should be taken as is because if user enters a
|
||||||
|
# json comment it is parsed by loads which should not happen
|
||||||
|
if k in ('description',):
|
||||||
|
data[k] = v
|
||||||
|
else:
|
||||||
|
data[k] = json.loads(v, encoding='utf-8')
|
||||||
except ValueError as ve:
|
except ValueError as ve:
|
||||||
current_app.logger.exception(ve)
|
current_app.logger.exception(ve)
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
Loading…
Reference in New Issue
Block a user