From 7207013abcdb85b2ba1a2503983c00450f21d04a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 26 Nov 2018 16:43:52 -0500 Subject: [PATCH] Have httpapi be able to accept initial size on consoles consoles and shells can now put into the body parameters including the width and height. --- confluent_server/confluent/httpapi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/confluent_server/confluent/httpapi.py b/confluent_server/confluent/httpapi.py index 2a4d2fe6..0ca7a6e1 100644 --- a/confluent_server/confluent/httpapi.py +++ b/confluent_server/confluent/httpapi.py @@ -496,6 +496,8 @@ def resourcehandler_backend(env, start_response): skipreplay = False if 'skipreplay' in querydict and querydict['skipreplay']: skipreplay = True + width = querydict.get('width', 80) + height = querydict.get('height', 24) datacallback = None async = None if 'HTTP_CONFLUENTASYNCID' in env: @@ -507,13 +509,13 @@ def resourcehandler_backend(env, start_response): consession = shellserver.ShellSession( node=nodename, configmanager=cfgmgr, username=authorized['username'], skipreplay=skipreplay, - datacallback=datacallback + datacallback=datacallback, width=width, height=height ) else: consession = consoleserver.ConsoleSession( node=nodename, configmanager=cfgmgr, username=authorized['username'], skipreplay=skipreplay, - datacallback=datacallback + datacallback=datacallback, width=width, height=height ) except exc.NotFoundException: start_response("404 Not found", headers)