1) Ensure that the zoom level should be set for the newly opened window.

2) Ensure that if the zoom level is changed on the main window then it should
   be applicable for all the opened windows.

refs #6271
This commit is contained in:
Akshay Joshi
2021-03-22 17:50:26 +05:30
parent 723d97971d
commit 2872b5c5d3
9 changed files with 59 additions and 18 deletions

View File

@@ -1060,22 +1060,24 @@ def lock_layout():
@blueprint.route("/signal_runtime", endpoint="signal_runtime",
methods=["POST"])
def signal_runtime():
data = None
# If not runtime then no need to send signal
if current_app.PGADMIN_RUNTIME:
data = None
if hasattr(request.data, 'decode'):
data = request.data.decode('utf-8')
if hasattr(request.data, 'decode'):
data = request.data.decode('utf-8')
if data != '':
data = json.loads(data)
if data != '':
data = json.loads(data)
# Add Info Handler to current app just to send signal to runtime
tmp_handler = logging.StreamHandler()
tmp_handler.setLevel(logging.INFO)
current_app.logger.addHandler(tmp_handler)
# Send signal to runtime
current_app.logger.info(data['command'])
# Remove the temporary handler
current_app.logger.removeHandler(tmp_handler)
# Add Info Handler to current app just to send signal to runtime
tmp_handler = logging.StreamHandler()
tmp_handler.setLevel(logging.INFO)
current_app.logger.addHandler(tmp_handler)
# Send signal to runtime
current_app.logger.info(data['command'])
# Remove the temporary handler
current_app.logger.removeHandler(tmp_handler)
return make_json_response()