mirror of
https://github.com/xcat2/confluent.git
synced 2026-09-05 12:37:56 +00:00
Fix web shell sessions
This commit is contained in:
@@ -767,8 +767,9 @@ class ConsoleSession(object):
|
||||
|
||||
@classmethod
|
||||
async def create(cls, node, configmanager, username, datacallback=None,
|
||||
skipreplay=False, direct=True, width=80, height=24):
|
||||
skipreplay=False, direct=True, width=80, height=24, sessionid=None):
|
||||
self = cls()
|
||||
self.sessionid = sessionid
|
||||
self.registered = False
|
||||
self.tenant = configmanager.tenant
|
||||
if not configmanager.is_node(node):
|
||||
|
||||
@@ -548,7 +548,7 @@ async def wsock_handler(req):
|
||||
auditlog.log(auditmsg)
|
||||
datacallback = datacallback_bound(clientsessid, rsp)
|
||||
if shellsession:
|
||||
consession = shellserver.ShellSession(
|
||||
consession = await shellserver.ShellSession.create(
|
||||
node=node, configmanager=cfgmgr,
|
||||
username=username, skipreplay=skipreplay,
|
||||
datacallback=datacallback,
|
||||
|
||||
@@ -124,10 +124,9 @@ class ShellSession(consoleserver.ConsoleSession):
|
||||
@classmethod
|
||||
async def create(cls, node, configmanager, username, datacallback=None,
|
||||
skipreplay=False, sessionid=None, width=80, height=24):
|
||||
self = await super().__init__(node, configmanager, username,
|
||||
self = await super().create(node, configmanager, username,
|
||||
datacallback, skipreplay,
|
||||
width=width, height=height)
|
||||
self.sessionid = sessionid
|
||||
width=width, height=height, sessionid=sessionid)
|
||||
return self
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user