From d55b802d951c3b6fc1acd5fe292c154f7275bdb3 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 19 Aug 2025 10:50:04 +0800 Subject: [PATCH] bugfix --- wwwroot/connecthost.ui | 2 +- wwwroot/ws/connecthost.xterm | 30 ------------------------------ 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 wwwroot/ws/connecthost.xterm diff --git a/wwwroot/connecthost.ui b/wwwroot/connecthost.ui index d9e1b14..c872735 100644 --- a/wwwroot/connecthost.ui +++ b/wwwroot/connecthost.ui @@ -17,7 +17,7 @@ "term_options":{ "fontSize":24 }, - "ws_url":"{{entire_url('/wss/ws/connecthost.xterm')}}?hostid={{params_kw.id}}" + "ws_url":"{{entire_url('/wss/msp/connecthost.xterm')}}?hostid={{params_kw.id}}" } } } diff --git a/wwwroot/ws/connecthost.xterm b/wwwroot/ws/connecthost.xterm deleted file mode 100644 index cd1233a..0000000 --- a/wwwroot/ws/connecthost.xterm +++ /dev/null @@ -1,30 +0,0 @@ -debug(f'{params_kw=},') -userid = await get_user() -async def gethostinfo(sor, ns): - sql="""select a.* -from hostdev a -where a.id= ${id}$ - and ownerid=${userid} -""" - recs = await sor.sqlExe(sql,ns.copy()) - if len(recs) > 0: - r = recs[0] - r.username = r.user - if r.password: - r.password = password_decode(r.password) - if r.passphrase: - r.passphrase = password_decode(r.passphrase) - if r.jumperid: - r.jumperservers = await gethostinfo(sor, {'id':r.jumperid}) - return DictObject(**r) - -db = DBPools() -userid = await get_user() -dbname = get_module_dbname('msp') -async with db.sqlorContext(dbname) as sor: - ns = { - "ownerid":userid, - "id":params_kw.hostid - } - return await gethostinfo(sor, ns) -return None