mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user