Updates
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[890],{25292:function(e,l,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/shell",function(){return s(30904)}])},40806:function(e,l,s){"use strict";s.d(l,{Z:function(){return h}});var n=s(85893),r=s(93452),t=s(76242),i=s(36969),a=s(25808),c=s(94495),u=s(57493),o=s(94655),d=s(3668),f=s(60),p=s(67294),m=s(98388);function h(e){let{url:l,wrapperProps:s,title:h,...x}=e,{loading:j,setLoading:g}=(0,a.Z)();return(0,n.jsx)(r.Z,{...s,className:(0,m.m6)("p-0",null==s?void 0:s.className),children:(0,n.jsxs)(f.Z,{className:"gap-0",children:[(0,n.jsxs)(o.Z,{className:"p-4 w-full justify-between",children:[(0,n.jsx)(o.Z,{children:h?(0,n.jsx)(p.Fragment,{children:(0,n.jsx)(d.Z,{size:"small",variant:"faded",children:h})}):null}),(0,n.jsxs)(o.Z,{children:[(0,n.jsx)(c.Z,{title:"Open Full Screen",variant:"ghost",className:"p-1!",href:l,target:"_blank",children:(0,n.jsx)(i.Z,{name:"ArrowUpRight",size:20})}),(0,n.jsx)(c.Z,{title:"Refresh Iframe",variant:"ghost",className:"p-1!",loading:j,onClick:()=>{g(!0),setTimeout(()=>{g(!1)},2e3)},loadingProps:{size:"smaller"},children:(0,n.jsx)(i.Z,{name:"RotateCcw",size:18})})]})]}),(0,n.jsx)("hr",{}),j?(0,n.jsx)(u.Z,{className:"w-full p-10 h-[400px]",children:(0,n.jsx)(t.Z,{})}):(0,n.jsx)("iframe",{...x,src:l,className:(0,m.m6)("w-full h-[400px]",x.className)})]})})}},30904:function(e,l,s){"use strict";s.r(l),s.d(l,{__N_SSP:function(){return g},default:function(){return v}});var n=s(85893),r=s(67294),t=s(5606),i=s(60705),a=s(33028),c=s(60),u=s(71077),o=s(76242),d=s(57493),f=s(40806),p=s(25808);function m(e){let{paradigm:l}=e,{pageProps:s,ws:i}=(0,r.useContext)(t.AppContext),{user:a}=s,m=a.super_admin?"root":a.username,h="pm2-logs"==l?"pm2 logs":a.super_admin?"bash":m?"su - ".concat(m,' -c "bash"'):void 0,{data:x}=(0,u.Z)(),[j,g]=(0,r.useState)(),{refresh:v,setRefresh:Z}=(0,p.Z)(),N=(0,r.useRef)(!1);function w(){(null==j?void 0:j.port)&&i.sendData({event:"client:kill-port",port:j.port})}return(0,r.useEffect)(()=>{if((null==i?void 0:i.socket)&&!N.current)return i.sendData({event:"pm2-logs"==l?"client:relay-pm2-logs":"client:relay-shell",cmd:h}),N.current=!0,function(){w()}},[i,v]),(0,r.useEffect)(()=>{N.current&&(w(),g(void 0),N.current=!1,Z(e=>e+1))},[]),(0,r.useEffect)(()=>{!j&&("shell"==l&&(null==x?void 0:x.event)=="server:relay-shell"&&(null==x?void 0:x.ttyd)||"pm2-logs"==l&&(null==x?void 0:x.event)=="server:relay-pm2-logs"&&(null==x?void 0:x.ttyd))&&setTimeout(()=>{g(x.ttyd?{...x.ttyd,href:"".concat(window.location.origin).concat(x.ttyd.url)}:void 0)},2e3)},[x]),(0,n.jsxs)(c.Z,{className:"gap-0 w-full",children:[(null==j?void 0:j.url)&&j.port?(0,n.jsx)(c.Z,{className:"gap-0",children:(0,n.jsx)(f.Z,{url:null==j?void 0:j.url,title:"pm2-logs"==l?"Admin Logs":"Relay Shell",wrapperProps:{className:"border-none"}})}):(0,n.jsx)(d.Z,{className:"p-10 h-[460px]",children:(0,n.jsx)(o.Z,{})}),(0,n.jsx)("hr",{})]})}function h(){let{pageProps:e}=(0,r.useContext)(t.AppContext),{user:l}=e;return(0,n.jsxs)(c.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:[(0,n.jsx)(c.Z,{className:"grid-cell w-full",children:(0,n.jsx)(m,{paradigm:"shell"})}),l.super_admin?(0,n.jsx)(c.Z,{className:"grid-cell w-full",children:(0,n.jsx)(m,{paradigm:"pm2-logs"})}):null]})}function x(){let{pageProps:e}=(0,r.useContext)(t.AppContext);return(0,n.jsxs)(r.Fragment,{children:[(0,n.jsx)(a.Z,{title:"Shell",description:(0,n.jsx)(n.Fragment,{children:"Access the relay server shell"})}),(0,n.jsx)(i.Z,{}),(0,n.jsx)(h,{})]})}var j=s(89350),g=!0;function v(){return(0,n.jsx)(j.Z,{children:(0,n.jsx)(x,{})})}},93452:function(e,l,s){"use strict";s.d(l,{Z:function(){return t}});var n=s(85893),r=s(98388);function t(e){let{spacing:l,componentRef:s,...t}=e;return(0,n.jsx)("div",{...t,className:(0,r.m6)("relative flex items-center gap-2 border border-solid rounded-default","border-slate-200 dark:border-white/10",l?"normal"==l?"px-3 py-2":"tight"==l?"px-2 py-1":"":"px-3 py-2","twui-border",t.className),ref:s,children:t.children})}},57493:function(e,l,s){"use strict";s.d(l,{Z:function(){return t}});var n=s(85893),r=s(98388);function t(e){let{...l}=e;return(0,n.jsx)("div",{...l,className:(0,r.m6)("flex flex-col items-center justify-center gap-4 p-2 w-full","h-full twui-center",l.className),children:l.children})}},9008:function(e,l,s){e.exports=s(23867)}},function(e){e.O(0,[662,75,664,433,7,910,888,774,179],function(){return e(e.s=25292)}),_N_E=e.O()}]);
|
||||
@@ -1 +0,0 @@
|
||||
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[890],{25292:function(e,l,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/shell",function(){return n(30904)}])},40806:function(e,l,n){"use strict";n.d(l,{Z:function(){return x}});var s=n(85893),r=n(93452),t=n(76242),i=n(36969),c=n(25808),a=n(94495),u=n(57493),o=n(94655),d=n(3668),p=n(60),f=n(67294),m=n(98388);function x(e){let{url:l,wrapperProps:n,title:x,...h}=e,{loading:j,setLoading:g}=(0,c.Z)();return(0,s.jsx)(r.Z,{...n,className:(0,m.m6)("p-0",null==n?void 0:n.className),children:(0,s.jsxs)(p.Z,{className:"gap-0",children:[(0,s.jsxs)(o.Z,{className:"p-4 w-full justify-between",children:[(0,s.jsx)(o.Z,{children:x?(0,s.jsx)(f.Fragment,{children:(0,s.jsx)(d.Z,{size:"small",variant:"faded",children:x})}):null}),(0,s.jsxs)(o.Z,{children:[(0,s.jsx)(a.Z,{title:"Open Full Screen",variant:"ghost",className:"p-1!",onClick:()=>{window.open(l,"__blank")},children:(0,s.jsx)(i.Z,{name:"ArrowUpRight",size:20})}),(0,s.jsx)(a.Z,{title:"Refresh Iframe",variant:"ghost",className:"p-1!",loading:j,onClick:()=>{g(!0),setTimeout(()=>{g(!1)},2e3)},loadingProps:{size:"smaller"},children:(0,s.jsx)(i.Z,{name:"RotateCcw",size:18})})]})]}),(0,s.jsx)("hr",{}),j?(0,s.jsx)(u.Z,{className:"w-full p-10 h-[400px]",children:(0,s.jsx)(t.Z,{})}):(0,s.jsx)("iframe",{...h,src:l,className:(0,m.m6)("w-full h-[400px]",h.className)})]})})}},30904:function(e,l,n){"use strict";n.r(l),n.d(l,{__N_SSP:function(){return g},default:function(){return v}});var s=n(85893),r=n(67294),t=n(5606),i=n(60705),c=n(33028),a=n(60),u=n(71077),o=n(76242),d=n(57493),p=n(40806),f=n(25808);function m(e){let{paradigm:l}=e,{pageProps:n,ws:i}=(0,r.useContext)(t.AppContext),{user:c}=n,m=c.super_admin?"root":c.username,x="pm2-logs"==l?"pm2 logs":c.super_admin?"bash":m?"su - ".concat(m,' -c "bash"'):void 0,{data:h}=(0,u.Z)(),[j,g]=(0,r.useState)(),{refresh:v,setRefresh:Z}=(0,f.Z)(),N=(0,r.useRef)(!1);function w(){(null==j?void 0:j.port)&&i.sendData({event:"client:kill-port",port:j.port})}return(0,r.useEffect)(()=>{if((null==i?void 0:i.socket)&&!N.current)return i.sendData({event:"pm2-logs"==l?"client:relay-pm2-logs":"client:relay-shell",cmd:x}),N.current=!0,function(){w()}},[i,v]),(0,r.useEffect)(()=>{N.current&&(w(),g(void 0),N.current=!1,Z(e=>e+1))},[]),(0,r.useEffect)(()=>{!j&&("shell"==l&&(null==h?void 0:h.event)=="server:relay-shell"&&(null==h?void 0:h.ttyd)||"pm2-logs"==l&&(null==h?void 0:h.event)=="server:relay-pm2-logs"&&(null==h?void 0:h.ttyd))&&setTimeout(()=>{g(h.ttyd?{...h.ttyd,href:"".concat(window.location.origin).concat(h.ttyd.url)}:void 0)},2e3)},[h]),(0,s.jsxs)(a.Z,{className:"gap-0 w-full",children:[(null==j?void 0:j.url)&&j.port?(0,s.jsx)(a.Z,{className:"gap-0",children:(0,s.jsx)(p.Z,{url:null==j?void 0:j.url,title:"pm2-logs"==l?"Admin Logs":"Relay Shell",wrapperProps:{className:"border-none"}})}):(0,s.jsx)(d.Z,{className:"p-10 h-[460px]",children:(0,s.jsx)(o.Z,{})}),(0,s.jsx)("hr",{})]})}function x(){let{pageProps:e}=(0,r.useContext)(t.AppContext),{user:l}=e;return(0,s.jsxs)(a.Z,{className:"w-full nested-grid-frame xl:grid-cols-2",children:[(0,s.jsx)(a.Z,{className:"grid-cell w-full",children:(0,s.jsx)(m,{paradigm:"shell"})}),l.super_admin?(0,s.jsx)(a.Z,{className:"grid-cell w-full",children:(0,s.jsx)(m,{paradigm:"pm2-logs"})}):null]})}function h(){let{pageProps:e}=(0,r.useContext)(t.AppContext);return(0,s.jsxs)(r.Fragment,{children:[(0,s.jsx)(c.Z,{title:"Shell",description:(0,s.jsx)(s.Fragment,{children:"Access the relay server shell"})}),(0,s.jsx)(i.Z,{}),(0,s.jsx)(x,{})]})}var j=n(89350),g=!0;function v(){return(0,s.jsx)(j.Z,{children:(0,s.jsx)(h,{})})}},93452:function(e,l,n){"use strict";n.d(l,{Z:function(){return t}});var s=n(85893),r=n(98388);function t(e){let{spacing:l,componentRef:n,...t}=e;return(0,s.jsx)("div",{...t,className:(0,r.m6)("relative flex items-center gap-2 border border-solid rounded-default","border-slate-200 dark:border-white/10",l?"normal"==l?"px-3 py-2":"tight"==l?"px-2 py-1":"":"px-3 py-2","twui-border",t.className),ref:n,children:t.children})}},57493:function(e,l,n){"use strict";n.d(l,{Z:function(){return t}});var s=n(85893),r=n(98388);function t(e){let{...l}=e;return(0,s.jsx)("div",{...l,className:(0,r.m6)("flex flex-col items-center justify-center gap-4 p-2 w-full","h-full twui-center",l.className),children:l.children})}},9008:function(e,l,n){e.exports=n(23867)}},function(e){e.O(0,[662,75,664,433,7,910,888,774,179],function(){return e(e.s=25292)}),_N_E=e.O()}]);
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user