You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
14 KiB
1 lines
14 KiB
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{6187:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var r=t(5893),o=t(6265),i=t(7294),s=t(5258),c=t(1120),a=t(7748),l=t(282),u=[{text:"Files",image:"/pngs/files_on.png",uri:"/striker?files=true"},{text:"Tasks",image:"/pngs/tasks_no-jobs_icon.png",uri:"/striker?jobs=true"},{text:"Configure",image:"/pngs/configure_icon_on.png",uri:"/striker?configure=true"},{text:"Striker",image:"/pngs/striker_icon_on.png",uri:"/striker?striker=true"},{text:"Anvil",image:"/pngs/anvil_icon_on.png",uri:"/striker?anvil=true"},{text:"Email",image:"/pngs/email_on.png",uri:"/striker?email=true"},{text:"Logout",image:"/pngs/users_icon_on.png",uri:"/striker?logout=true"},{text:"Help",image:"/pngs/help_icon_on.png",uri:"https://alteeve.com/w/Support"}],d={width:"40em",height:"40em"},p=t(8788),f=t(7159),x=t(2822),m=t(998),h=t(5517),g=t(7623),b=t(442),j=t(4724);function v(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function y(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var w=(0,c.Z)((function(){return(0,g.Z)({list:{width:"200px"},divider:{background:p.d},text:{paddingTop:".5em",paddingLeft:"1.5em"},dashboardButton:{paddingLeft:".1em"},dashboardIcon:{fontSize:"2.3em",color:p.s7}})})),Z=function(e){var n=e.open,t=e.setOpen,o=w();return(0,r.jsx)(f.ZP,{BackdropProps:{invisible:!0},anchor:"left",open:n,onClose:function(){return t(!n)},children:(0,r.jsx)("div",{role:"presentation",children:(0,r.jsxs)(x.Z,{className:o.list,children:[(0,r.jsx)(m.Z,{button:!0,children:(0,r.jsx)(j.z,{text:"Admin"})}),(0,r.jsx)(h.Z,{className:o.divider}),(0,r.jsx)(m.Z,{button:!0,component:"a",href:"/index.html",children:(0,r.jsxs)(a.Z,{display:"flex",flexDirection:"row",width:"100%",children:[(0,r.jsx)(a.Z,{className:o.dashboardButton,children:(0,r.jsx)(b.Z,{className:o.dashboardIcon})}),(0,r.jsx)(a.Z,{flexGrow:1,className:o.text,children:(0,r.jsx)(j.A,{text:"Dashboard"})})]})}),u.map((function(e){return(0,r.jsx)(m.Z,{button:!0,component:"a",href:-1!==e.uri.search(/^https?:/)?e.uri:"".concat("/cgi-bin").concat(e.uri),children:(0,r.jsxs)(a.Z,{display:"flex",flexDirection:"row",width:"100%",children:[(0,r.jsx)(a.Z,{children:(0,r.jsx)("img",y({alt:"",src:e.image},d),"icon")}),(0,r.jsx)(a.Z,{flexGrow:1,className:o.text,children:(0,r.jsx)(j.A,{text:e.text})})]})},e.image)}))]})})})};function k(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function C(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?k(Object(t),!0).forEach((function(n){(0,o.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):k(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var N=(0,c.Z)((function(e){return{appBar:{paddingTop:e.spacing(.5),paddingBottom:e.spacing(.5),paddingLeft:e.spacing(3),paddingRight:e.spacing(3),borderBottom:"solid 1px",borderBottomColor:p.hM},input:{height:"2.8em",width:"30vw",backgroundColor:e.palette.secondary.main,borderRadius:p.n_},barElement:{padding:0},iconBox:(0,o.Z)({},e.breakpoints.down("sm"),{display:"none"}),searchBar:(0,o.Z)({},e.breakpoints.down("sm"),{flexGrow:1,paddingLeft:"15vw"}),icons:{paddingLeft:".1em",paddingRight:".1em"}}})),_=function(){var e=N(),n=(0,i.useState)(!1),t=n[0],o=n[1];return(0,r.jsxs)(s.Z,{position:"static",className:e.appBar,children:[(0,r.jsxs)(a.Z,{display:"flex",justifyContent:"space-between",flexDirection:"row",children:[(0,r.jsx)(a.Z,{className:e.barElement,children:(0,r.jsx)(l.Z,{onClick:function(){return o(!t)},children:(0,r.jsx)("img",{alt:"",src:"/pngs/logo.png",width:"160",height:"40"})})}),(0,r.jsx)(a.Z,{className:"".concat(e.barElement," ").concat(e.iconBox),children:u.map((function(n){return(0,r.jsx)("a",{href:-1!==n.uri.search(/^https?:/)?n.uri:"".concat("/cgi-bin").concat(n.uri),children:(0,r.jsx)("img",C(C({alt:"",src:n.image},d),{},{className:e.icons}),"icon")},n.uri)}))})]}),(0,r.jsx)(Z,{open:t,setOpen:o})]})}},2108:function(e,n,t){"use strict";t.d(n,{Lg:function(){return u},s_:function(){return p},V9:function(){return a}});var r=t(5893),o=t(7748),i=t(1120),s=t(8788),c=(0,i.Z)((function(){return{innerHeader:{position:"relative",padding:"0 .7em"},header:{top:"-.3em",left:"-.3em",padding:"1.4em 0",position:"absolute",content:'""',borderColor:s.d,borderWidth:"1px",borderRadius:s.n_,borderStyle:"solid",width:"100%"}}})),a=function(e){var n=e.children,t=c();return(0,r.jsxs)(o.Z,{className:t.innerHeader,whiteSpace:"pre-wrap",children:[(0,r.jsx)("div",{className:t.header}),n]})},l=(0,i.Z)((function(){return{innerBody:{borderWidth:"1px",borderRadius:s.n_,borderStyle:"solid",borderColor:s.d,marginTop:"1.4em",marginBottom:"1.4em",paddingBottom:0,position:"relative"}}})),u=function(e){var n=e.children,t=l();return(0,r.jsx)(o.Z,{className:t.innerBody,children:n})},d=(0,i.Z)((function(){return{paper:{padding:"2.1em",backgroundColor:s.v9,opacity:.8,zIndex:999},container:{margin:"1em",position:"relative"},square:{content:'""',position:"absolute",width:"2.1em",height:"2.1em",border:"1px",borderColor:s.lD,borderWidth:"1px",borderRadius:s.n_,borderStyle:"solid",padding:0,margin:0},topSquare:{top:"-.3em",left:"-.3em"},bottomSquare:{bottom:"-.3em",right:"-.3em"},"@global":{"*::-webkit-scrollbar":{width:".6em"},"*::-webkit-scrollbar-track":{backgroundColor:s.v9},"*::-webkit-scrollbar-thumb":{backgroundColor:s.lD,outline:"1px solid transparent",borderRadius:s.n_}}}})),p=function(e){var n=e.children,t=d();return(0,r.jsxs)("div",{className:t.container,children:[(0,r.jsx)("div",{className:"".concat(t.square," ").concat(t.topSquare)}),(0,r.jsx)("div",{className:"".concat(t.square," ").concat(t.bottomSquare)}),(0,r.jsx)("div",{className:t.paper,children:n})]})}},6061:function(e,n,t){"use strict";var r=t(5893),o=t(1120),i=t(5477),s=t(8788),c=(0,o.Z)((function(){return{root:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:"3em"},spinner:{color:s.lD,variant:"indeterminate",size:"50em"}}}));n.Z=function(){var e=c();return(0,r.jsx)("div",{className:e.root,children:(0,r.jsx)(i.Z,{className:e.spinner})})}},4724:function(e,n,t){"use strict";t.d(n,{A:function(){return d},z:function(){return a}});var r=t(5893),o=t(2318),i=t(4670),s=t(8788),c=(0,i.Z)({root:{color:s.lD}})(o.Z),a=function(e){var n=e.text;return(0,r.jsx)(c,{variant:"h4",children:n})},l=(0,t(1120).Z)((function(){return{selected:{color:s.lD},unselected:{color:s.UZ}}})),u=function(e){var n=e.text,t=e.selected,i=l();return(0,r.jsx)(o.Z,{variant:"subtitle1",className:t?i.selected:i.unselected,children:n})};u.defaultProps={selected:!0};var d=u},8870:function(e,n){"use strict";n.Z=function(e,n){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}},3871:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return L}});var r=t(5893),o=t(6265),i=t(7294),s=t(1163),c=t(9008),a=t(7748),l=t(1120),u=t(809),d=t.n(u),p=t(2447),f=t(5152),x=t(5675),m=t(5639),h=t(2318),g=t(282),b=t(366),j=t(2617),v=t(7812),y=t(2108),w=t(8788),Z="0xffe3",k="0xffe9",C=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[Z,k,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[Z,k,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[Z,k,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[Z,k,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[Z,k,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[Z,k,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[Z,k,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[Z,k,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[Z,k,"0xffc6"]}],N=t(8870),_=function(){var e=(0,p.Z)(d().mark((function e(n,t,r){var o,i,s;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,i=setTimeout((function(){return o.abort()}),r),e.next=4,fetch(n,{method:"PUT",headers:{"Content-Type":"application/json","Keep-Alive":"timeout=120"},signal:o.signal,body:JSON.stringify(t)});case 4:return s=e.sent,clearTimeout(i),e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})));return function(n,t,r){return e.apply(this,arguments)}}(),O=t(4724),B=t(6061),D=(0,f.default)((function(){return Promise.all([t.e(204),t.e(340)]).then(t.bind(t,340))}),{ssr:!1,loadableGenerated:{webpack:function(){return[340]},modules:["../components/Display/FullSize.tsx -> ./VncDisplay"]}}),S=(0,l.Z)((function(){return{displayBox:{width:"75vw",height:"75vh",paddingTop:"1em",paddingBottom:0,paddingLeft:0,paddingRight:0},spinnerBox:{flexDirection:"column",width:"75vw",height:"75vh",alignItems:"center",justifyContent:"center"},closeButton:{borderRadius:8,backgroundColor:w.hM,"&:hover":{backgroundColor:w.hM}},keyboardButton:{borderRadius:8,backgroundColor:w.lD,"&:hover":{backgroundColor:w.lD}},closeBox:{paddingBottom:"1em",paddingLeft:".7em",paddingRight:0},buttonsBox:{paddingTop:0},keysItem:{backgroundColor:w.lD,paddingRight:"3em","&:hover":{backgroundColor:w.lD}},buttonText:{color:w.E5}}})),P=function(e){var n=e.setMode,t=e.uuid,o=e.serverName,s=(0,i.useState)(null),c=s[0],l=s[1],u=(0,i.useRef)(),f=(0,i.useRef)(void 0),Z=(0,i.useState)(void 0),k=Z[0],P=Z[1],T=(0,i.useState)(!1),E=T[0],A=T[1],R=S();(0,i.useEffect)((function(){f.current=window.location.hostname,k||(0,p.Z)(d().mark((function e(){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,_("".concat("/cgi-bin","/manage_vnc_pipes"),{server_uuid:t,is_open:!0},12e4);case 3:return n=e.sent,e.t0=P,e.next=7,n.json();case 7:e.t1=e.sent,(0,e.t0)(e.t1),e.next=14;break;case 11:e.prev=11,e.t2=e.catch(0),A(!0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))()}),[t,k,E]);var F=function(){var e=(0,p.Z)(d().mark((function e(){return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,N.Z)("".concat("/cgi-bin","/manage_vnc_pipes"),{server_uuid:t,is_open:!1});case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,r.jsxs)(y.s_,{children:[(0,r.jsx)(a.Z,{flexGrow:1,children:(0,r.jsx)(O.z,{text:"Server: ".concat(o)})}),k?(0,r.jsxs)(a.Z,{display:"flex",className:R.displayBox,children:[(0,r.jsx)(D,{rfb:u,url:"".concat(k.protocol,"://").concat(f.current,":").concat(k.forward_port),viewOnly:!1,focusOnClick:!1,clipViewport:!1,dragViewport:!1,scaleViewport:!0,resizeSession:!0,showDotCursor:!1,background:"",qualityLevel:6,compressionLevel:2}),(0,r.jsxs)(a.Z,{children:[(0,r.jsx)(a.Z,{className:R.closeBox,children:(0,r.jsx)(v.Z,{className:R.closeButton,style:{color:w.lD},component:"span",onClick:function(){F(),n(!0)},children:(0,r.jsx)(b.Z,{})})}),(0,r.jsxs)(a.Z,{className:R.closeBox,children:[(0,r.jsx)(v.Z,{className:R.keyboardButton,style:{color:w.E5},component:"span",onClick:function(e){l(e.currentTarget)},children:(0,r.jsx)(j.Z,{})}),(0,r.jsx)(x.Z,{anchorEl:c,keepMounted:!0,open:Boolean(c),onClose:function(){return l(null)},children:C.map((function(e){var n=e.keys,t=e.scans;return(0,r.jsx)(m.Z,{onClick:function(){return function(e){if(u.current){if(e.length){for(var n=0;n<=e.length-1;n+=1)u.current.sendKey(e[n],1);for(var t=e.length-1;t>=0;t-=1)u.current.sendKey(e[t],0)}else u.current.sendCtrlAltDel();l(null)}}(t)},className:R.keysItem,children:(0,r.jsx)(h.Z,{variant:"subtitle1",children:n})},n)}))})]})]})]}):(0,r.jsx)(a.Z,{display:"flex",className:R.spinnerBox,children:E?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.Z,{style:{paddingBottom:"2em"},children:(0,r.jsx)(O.z,{text:"There was a problem connecting to the server, please try again"})}),(0,r.jsx)(g.Z,{variant:"contained",onClick:function(){A(!1)},style:{textTransform:"none"},children:(0,r.jsx)(h.Z,{className:R.buttonText,variant:"subtitle1",children:"Reconnect"})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(O.z,{text:"Establishing connection with ".concat(o)}),(0,r.jsx)(O.z,{text:"This may take a few minutes"}),(0,r.jsx)(B.Z,{})]})})]})},T=t(306),E=t(4849),A=(0,l.Z)((function(){return{displayBox:{padding:0,paddingTop:".7em",width:"100%"},fullScreenButton:{borderRadius:8,backgroundColor:w.lD,"&:hover":{backgroundColor:w.lD}},fullScreenBox:{paddingLeft:"1em",padding:0},imageButton:{padding:0,color:w.lD},imageIcon:{borderRadius:8,padding:0,backgroundColor:w.s7,fontSize:"8em"}}})),R=function(e){var n=e.setMode,t=e.serverName,o=A();return(0,r.jsxs)(y.s_,{children:[(0,r.jsx)(a.Z,{flexGrow:1,children:(0,r.jsx)(O.z,{text:"Server: ".concat(t)})}),(0,r.jsxs)(a.Z,{display:"flex",className:o.displayBox,children:[(0,r.jsx)(a.Z,{children:(0,r.jsx)(v.Z,{className:o.imageButton,style:{color:w.E5},component:"span",onClick:function(){return n(!1)},children:(0,r.jsx)(E.Z,{className:o.imageIcon})})}),(0,r.jsx)(a.Z,{className:o.fullScreenBox,children:(0,r.jsx)(v.Z,{className:o.fullScreenButton,style:{color:w.E5},component:"span",onClick:function(){return n(!1)},children:(0,r.jsx)(T.Z,{})})})]})]})},F=t(6187),z=(0,l.Z)((function(e){return{preview:(0,o.Z)({width:"25%",height:"100%"},e.breakpoints.down("md"),{width:"100%"}),fullView:{display:"flex",flexDirection:"row",width:"100%",justifyContent:"center"}}})),L=function(){var e=(0,i.useState)(!0),n=e[0],t=e[1],o=z(),l=(0,s.useRouter)().query,u=l.uuid,d=l.server_name;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.default,{children:(0,r.jsx)("title",{children:d})}),(0,r.jsx)(F.Z,{}),"string"===typeof u&&(n?(0,r.jsx)(a.Z,{className:o.preview,children:(0,r.jsx)(R,{setMode:t,serverName:d})}):(0,r.jsx)(a.Z,{className:o.fullView,children:(0,r.jsx)(P,{setMode:t,uuid:u,serverName:d})}))]})}},8954:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/server",function(){return t(3871)}])}},function(e){e.O(0,[774,642,643,888,179],(function(){return n=8954,e(e.s=n);var n}));var n=e.O();_N_E=n}]); |