Various misc fixes:

- Using the 'gettext' as oppose to '_', which is not defined
- Define missing variables
- Fixed escape character in string with double quote
- Removed some dead code in a test case
- Removed unnecessary self assignment

Includes some fixes for Accessibility improvements
- Use semantic markup to mark emphasized or special text
- Added hidden legend in <fieldset> for better screen reader support
This commit is contained in:
Ashesh Vashi
2020-04-08 14:14:25 +05:30
parent 8fe687eb55
commit d9f6baac72
15 changed files with 28 additions and 59 deletions

View File

@@ -8,9 +8,6 @@
##########################################################################
"""A blueprint module implementing the schema_diff frame."""
MODULE_NAME = 'schema_diff'
import simplejson as json
import pickle
import random
@@ -28,6 +25,8 @@ from pgadmin.tools.schema_diff.model import SchemaDiffModel
from config import PG_DEFAULT_DRIVER
from pgadmin.utils.driver import get_driver
MODULE_NAME = 'schema_diff'
class SchemaDiffModule(PgAdminModule):
"""
@@ -567,15 +566,16 @@ def check_version_compatibility(sid, tid):
tar_server = Server.query.filter_by(id=tid).first()
tar_manager = driver.connection_manager(tar_server.id)
target_conn = src_manager.connection()
if not (src_conn.connected() and target.connected()):
return False, gettext('Server(s) disconnected.')
if src_manager.server_type != tar_manager.server_type:
return False, gettext('Schema diff does not support the comparison '
'between Postgres Server and EDB Postgres '
'Advanced Server.')
if not (src_conn.connected() or src_conn.connected()):
return False, gettext('Server(s) disconnected.')
def get_round_val(x):
if x < 10000:
return x if x % 100 == 0 else x + 100 - x % 100