Local modifications to ClusterLabs/Anvil by Alteeve
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 line
9.8 KiB

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[753],{8954:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/server",function(){return t(8266)}])},8336:function(e,n){"use strict";n.Z=function(e,n){return fetch(e,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}},8266:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return W}});var r=t(5893),o=t(7294),c=t(1163),s=t(9008),a=t(7357),i=t(1496),l=t(4051),u=t.n(l),d=t(5152),f=t(3946),p=t(7850),x=t(40),h=t(5861),v=t(3321),m=t(594),g=t(1846),w=t(9203),y=t(7169),b="0xffe3",j="0xffe9",k=[{keys:"Ctrl + Alt + Delete",scans:[]},{keys:"Ctrl + Alt + F1",scans:[b,j,"0xffbe"]},{keys:"Ctrl + Alt + F2",scans:[b,j,"0xffbf"]},{keys:"Ctrl + Alt + F3",scans:[b,j,"0xffc0"]},{keys:"Ctrl + Alt + F4",scans:[b,j,"0xffc1"]},{keys:"Ctrl + Alt + F5",scans:[b,j,"0xffc2"]},{keys:"Ctrl + Alt + F6",scans:[b,j,"0xffc3"]},{keys:"Ctrl + Alt + F7",scans:[b,j,"0xffc4"]},{keys:"Ctrl + Alt + F8",scans:[b,j,"0xffc5"]},{keys:"Ctrl + Alt + F9",scans:[b,j,"0xffc6"]}],B=t(8336);function C(e,n,t,r,o,c,s){try{var a=e[c](s),i=a.value}catch(l){return void t(l)}a.done?n(i):Promise.resolve(i).then(r,o)}var Z=function(){var e,n=(e=u().mark((function e(n,t,r){var o,c,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=new AbortController,c=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(c),e.abrupt("return",s);case 7:case"end":return e.stop()}}),e)})),function(){var n=this,t=arguments;return new Promise((function(r,o){var c=e.apply(n,t);function s(e){C(c,r,o,s,a,"next",e)}function a(e){C(c,r,o,s,a,"throw",e)}s(void 0)}))});return function(e,t,r){return n.apply(this,arguments)}}(),N=Z,_=t(3430),T=t(2152);function S(e,n,t,r,o,c,s){try{var a=e[c](s),i=a.value}catch(l){return void t(l)}a.done?n(i):Promise.resolve(i).then(r,o)}function P(e){return function(){var n=this,t=arguments;return new Promise((function(r,o){var c=e.apply(n,t);function s(e){S(c,r,o,s,a,"next",e)}function a(e){S(c,r,o,s,a,"throw",e)}s(void 0)}))}}function E(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var A="FullSize",D={displayBox:"".concat(A,"-displayBox"),spinnerBox:"".concat(A,"-spinnerBox"),closeButton:"".concat(A,"-closeButton"),keyboardButton:"".concat(A,"-keyboardButton"),closeBox:"".concat(A,"-closeBox"),buttonsBox:"".concat(A,"-buttonsBox"),keysItem:"".concat(A,"-keysItem"),buttonText:"".concat(A,"-buttonText")},I=(0,i.ZP)("div")((function(){var e;return E(e={},"& .".concat(D.displayBox),{width:"75vw",height:"75vh",paddingTop:"1em",paddingBottom:0,paddingLeft:0,paddingRight:0}),E(e,"& .".concat(D.spinnerBox),{flexDirection:"column",width:"75vw",height:"75vh",alignItems:"center",justifyContent:"center"}),E(e,"& .".concat(D.closeButton),{borderRadius:8,backgroundColor:y.hM,"&:hover":{backgroundColor:y.hM}}),E(e,"& .".concat(D.keyboardButton),{borderRadius:8,backgroundColor:y.lD,"&:hover":{backgroundColor:y.lD}}),E(e,"& .".concat(D.closeBox),{paddingBottom:"1em",paddingLeft:".7em",paddingRight:0}),E(e,"& .".concat(D.buttonsBox),{paddingTop:0}),E(e,"& .".concat(D.keysItem),{backgroundColor:y.lD,paddingRight:"3em","&:hover":{backgroundColor:y.lD}}),E(e,"& .".concat(D.buttonText),{color:y.E5}),e})),O=(0,d.default)((function(){return Promise.all([t.e(460),t.e(665)]).then(t.bind(t,4665))}),{loadableGenerated:{webpack:function(){return[4665]}},ssr:!1}),F=function(e){var n=e.setMode,t=e.uuid,c=e.serverName,s=(0,o.useState)(null),i=s[0],l=s[1],d=(0,o.useRef)(),b=(0,o.useRef)(void 0),j=(0,o.useState)(void 0),C=j[0],Z=j[1],S=(0,o.useState)(!1),E=S[0],A=S[1];(0,o.useEffect)((function(){b.current=window.location.hostname,C||P(u().mark((function e(){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,N("".concat("/cgi-bin","/manage_vnc_pipes"),{server_uuid:t,is_open:!0},12e4);case 3:return n=e.