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.
 
 
 
 
 
fms/plugin/popup/_next/static/chunks/pages/index-e05dda18f04fa62a.js

1 lines
19 KiB

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[405],{8312:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return s(3238)}])},3238:function(e,t,s){"use strict";s.r(t),s.d(t,{TabEnum:function(){return u},default:function(){return eW}});var n,a,l,r,i,o,c,u,d=s(5893),m=s(9008),h=s.n(m),p=s(1502),x=s.n(p),j=s(7294),g=s(4148),y=s(5405),Z=s(4945),b=s(9602),f=s(6865),P=s(8037),k=s(2141),C=s(3257),v=s(2810),w=s(6851),S=s(7758),T=s(3845),_=s(3340),E=s(7357),A=s(8456),O=s(447),R=s(2474),I=s(2882),N=s(7906),U=s(3184),L=s(3816),F=s(3252),K=s(295),H=s(1458),M=s(3946),D=s(8896),G=s(3321),B=s(657),V=s(1425),W=s(6514),z=s(7645),J=s(7632);function X(e){let{open:t,title:s,agreeCallback:n,modifyCallback:a,closeCallback:l,children:r}=e,i=(0,J.Z)();return(0,d.jsxs)(B.Z,{open:t,onClose:l,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,d.jsx)(z.Z,{children:s}),(0,d.jsx)(W.Z,{children:r}),(0,d.jsxs)(V.Z,{children:[n&&(0,d.jsx)(G.Z,{onClick:()=>n(i),autoFocus:!0,children:"Agree"}),a&&(0,d.jsx)(G.Z,{onClick:a,children:"Modify"}),l&&(0,d.jsx)(G.Z,{onClick:l,children:"Disagree"})]})]})}(n=i||(i={})).Wait="wait",n.Running="running",n.Cancelled="cancelled",n.Error="error",n.Success="success";let q=j.createContext({}),Q=q.Provider;function Y(e){let{optionList:t,setOptionList:s}=(0,j.useContext)(q),n=n=>{let a={...t};a[e.name]=n.target.value,s(a)};return(0,d.jsxs)("span",{children:[e.shortcut?"-":"--",e.acceptValue?"":e.shortcut||e.name,e.acceptValue&&(0,d.jsx)(R.Z,{label:e.shortcut||e.name,onInput:n,size:"small",variant:"outlined"}),"\xa0"]})}var $=s(5201),ee=s(7709),et=s(9840),es=s(5071),en=s(9334);function ea(e){let{optionList:t}=e,{optionList:s,setOptionList:n}=(0,j.useContext)(q),[a,l]=(0,j.useState)([]),[r,i]=(0,j.useState)(Object.keys(s)||[]);if((0,j.useEffect)(()=>{let e=[];t.forEach((t,s,n)=>{r.find(e=>e===t.name)&&e.push(t)}),l(e);let s={};t.forEach((e,t,n)=>{r.find(t=>t===e.name)&&(s[e.name]=!e.acceptValue||"")}),n(s)},[r]),!t.length)return(0,d.jsx)(d.Fragment,{});let o=e=>{let{target:{value:t}}=e;i("string"==typeof t?t.split(","):t)};return(0,d.jsxs)(d.Fragment,{children:[t.length>0&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)($.Z,{value:r,label:"Options",multiple:!0,displayEmpty:!0,onChange:o,input:(0,d.jsx)(ee.Z,{}),renderValue:e=>"Options",size:"small",children:t.map((e,t)=>(0,d.jsxs)(et.Z,{value:e.name,children:[(0,d.jsx)(es.Z,{checked:r.indexOf(e.name)>-1}),(0,d.jsx)(en.Z,{primary:e.name})]},t))}),"\xa0"]}),a.map((e,t)=>(0,d.jsx)(Y,{...e},t))]})}function el(e){let{argumentList:t,setArgumentList:s}=(0,j.useContext)(q),[n,a]=(0,j.useState)(t[e.name]||"");(0,j.useEffect)(()=>{let a={...t};a[e.name]=n,s(a)},[n]);let l=e=>{a(e.target.value)};return(0,d.jsxs)("span",{children:[(0,d.jsx)(R.Z,{onInput:l,label:e.name,value:n,size:"small",variant:"outlined"}),"\xa0"]})}function er(e){let{argumentList:t}=e,{argumentList:s}=(0,j.useContext)(q),[n,a]=(0,j.useState)(t);return((0,j.useEffect)(()=>{let e=[];for(let n of t)if(e.push(n),!s[n.name])break;a(e)},[s]),t.length)?(0,d.jsxs)(d.Fragment,{children:["--\xa0",n.map((e,t)=>(0,d.jsx)(el,{...e},t))]}):(0,d.jsx)(d.Fragment,{})}function ei(e){let{command:t,callback:s,optionsParams:n,argumentsParams:a}=e,[l,r]=(0,j.useState)(n||{}),[i,o]=(0,j.useState)(a||{});return(0,j.useEffect)(()=>{s&&s(t.name,l,i)},[l,i]),(0,d.jsx)(Q,{value:{optionList:l,setOptionList:r,argumentList:i,setArgumentList:o},children:(0,d.jsx)("div",{children:(0,d.jsxs)("div",{title:t.description,children:[(0,d.jsx)(ea,{optionList:t.options}),(0,d.jsx)(er,{argumentList:t.arguments})]})})})}var eo=s(6886);(a=o||(o={})).GET="GET",a.POST="POST",a.PUT="PUT",a.PATCH="PATCH";let ec=e=>o.GET===e;class eu{}class ed{debouncing(e){return this.grabContext().debouncing=e,this}useMemory(e){let t=this.grabContext();return t.useMemory=!0,t.memoryKey=e,this}async send(e,t){var s;if(null===this.baseUrl)throw Error("Base url not defined!");let n=this.context;if(this.context=null,null==n?void 0:n.useMemory){let a=(null==n?void 0:n.memoryKey)||e.url;if(void 0!==this.memory[a])return this.memory[a]}let l="".concat(this.baseUrl).concat(e.url),{url:r,data:i}=this.processAttributes(l,t);if(ec(e.method)&&(r+="?"+new URLSearchParams(i)),"undefined"!=typeof localStorage){let o=localStorage.getItem("token");localStorage.getItem(o||"")}let c={...e.contentType?{"Content-Type":e.contentType}:{},"X-Plugin-Token":"passw0rd"};this.authentication&&(c[this.authentication.key]=this.authentication.token());let u=await fetch(r,{method:e.method.toString(),headers:c,body:ec(e.method)?null:JSON.stringify(i)}),d={responseData:(null===(s=u.headers.get("Content-Type"))||void 0===s?void 0:s.toString().includes("application/json"))?await u.json():await u.text(),headers:u.headers};if(null==n?void 0:n.useMemory){let m=(null==n?void 0:n.memoryKey)||e.url;this.memory[m]=d}return d}processAttributes(e,t){for(let s in t)e.indexOf("{"+s+"}")>-1&&(e=e.replace("{"+s+"}",t[s]),delete t[s]);return{url:e,data:t}}grabContext(){return this.context?this.context:this.context=new eu}constructor(e){this.baseUrl=null,this.authentication=null,this.context=null,this.memory={},this.baseUrl=e.baseUrl||null,this.authentication=e.authentication||null}}let em=new class{constructor(){this.method=o.GET,this.url="/system-monitoring/processes",this.contentType=null}},eh=new class{constructor(){this.method=o.GET,this.url="/system-monitoring/commands",this.contentType=null}},ep=new class{constructor(){this.method=o.POST,this.url="/system-monitoring/commands/{commandName}/run",this.contentType="application/json;charset=utf-8"}},ex=new class{constructor(){this.method=o.POST,this.url="/system-monitoring/processes/{id}/repeat",this.contentType=null}},ej=new class{constructor(){this.method=o.POST,this.url="/system-monitoring/processes/{id}/approve",this.contentType=null}},eg=new class{constructor(){this.method=o.GET,this.url="/system-monitoring/processes/{id}/output",this.contentType=null}},ey=new class{constructor(){this.method=o.POST,this.url="/system-monitoring/processes/{id}/play",this.contentType=null}},eZ=new class{constructor(){this.method=o.POST,this.url="/system-monitoring/processes/{id}/pause",this.contentType=null}},eb=new class{constructor(){this.method=o.POST,this.url="/system-monitoring/processes/{id}/stop",this.contentType=null}},ef=new class{constructor(){this.method=o.POST,this.url="/system-monitoring/processes/{id}/kill",this.contentType=null}},eP=new class{constructor(){this.method=o.GET,this.url="/system-monitoring/commands/{commandName}",this.contentType=null}},ek=new class{constructor(){this.method=o.POST,this.url="/system-monitoring/processes/{id}/unlock",this.contentType=null}};class eC extends ed{async getCommands(){let{responseData:e,headers:t}=await this.send(eh,{});return{data:e,headers:t}}async getCommand(e){let{responseData:t,headers:s}=await this.send(eP,{commandName:e});return{data:t,headers:s}}async runCommand(e){let{headers:t}=await this.send(ep,e);return{data:null,headers:t}}async getProcesses(e){let{responseData:t,headers:s}=await this.send(em,e);return{data:t,headers:s}}async approveProcess(e){let{responseData:t,headers:s}=await this.send(ej,e);return{data:t,headers:s}}async unlockProcess(e){let{responseData:t,headers:s}=await this.send(ek,e);return{data:t,headers:s}}async repeatProcess(e){let{responseData:t,headers:s}=await this.send(ex,e);return{data:t,headers:s}}async getProcessOutput(e){let{responseData:t,headers:s}=await this.send(eg,e);return{data:t,headers:s}}async playProcess(e){let{headers:t}=await this.send(ey,{id:e});return{data:null,headers:t}}async pauseProcess(e){let{headers:t}=await this.send(eZ,{id:e});return{data:null,headers:t}}async stopProcess(e){let{headers:t}=await this.send(eb,{id:e});return{data:null,headers:t}}async killProcess(e){let{headers:t}=await this.send(ef,{id:e});return{data:null,headers:t}}}var ev=s(7889);class ew{token(){return"Bearer ".concat(this._token)}constructor(e){this.key="Authorization",this._token=e}}var eS=s(4085);let eT=(e,t)=>{let s={};return t&&(s={authentication:new ew(t)}),new eC({baseUrl:(null==e?void 0:e.host)||"localhost",...s})};function e_(){let{token:e}=(0,j.useContext)(ev.Z),[t,s]=(0,j.useState)(eT(e,(0,eS.gn)()));return(0,j.useEffect)(()=>{s(eT(e,(0,eS.gn)()))},[e]),t}function eE(){let{token:e}=(0,j.useContext)(ev.Z),[t,s]=(0,j.useState)([]),[n,a]=(0,j.useState)([]),[l,r]=(0,j.useState)(0),[o,u]=(0,j.useState)(0),[m,h]=(0,j.useState)(""),[p,x]=(0,j.useState)(""),[G,B]=(0,j.useState)(!0),[V,W]=(0,j.useState)(!0),[z,J]=(0,j.useState)(null),[q,Q]=(0,j.useState)(null),[Y,$]=(0,j.useState)(null),[ee,et]=(0,j.useState)({}),[es,en]=(0,j.useState)({}),ea=e_(),el=n.map((e,t)=>e.name);el.push("");let er=async()=>{let{data:e}=await ea.useMemory().getCommands();a(e)};(0,j.useEffect)(()=>{er()},[]);let ec=!1,eu=async()=>{if(ec)return;ec=!0;let e={};m&&"None"!==m&&(e.type=m.toLowerCase()),p&&(e.name=p);let{data:t,headers:n}=await ea.getProcesses({...e,page:l+1,limit:20});s(t),u(Number(n.get("X-Pagination-Count"))),B(!1),ec=!1},ed=async e=>{let{data:t}=await ea.getProcessOutput({id:e.id}),s=document.createElement("a"),n=new Blob([t],{type:"plain/text"});s.href=URL.createObjectURL(n),s.download="".concat(e.id,".txt"),s.click()};(0,j.useEffect)(()=>{let e=setInterval(()=>eu(),1e3);return()=>clearInterval(e)},[l,p,m]),(0,j.useEffect)(()=>{null===z&&($(null),Q(null))},[z]);let em=e=>e.cancelledAt||e.completedAt,eh=e=>e.cancelledAt,ep=e=>e.startedAt&&!em(e),ex=e=>e.name+" "+JSON.stringify(e.options)+" "+JSON.stringify(e.arguments),ej=(e,t)=>{r(t)},eg=(e,t)=>{$(e),J(t)},ey=!1,eZ=async e=>{!ey&&Y&&(ey=!0,z===c.Run&&await ea.runCommand({commandName:Y.name,options:ee,arguments:es,requestId:e}),z===c.Approve&&await ea.approveProcess({id:Y.id}),z===c.Unlock&&await ea.unlockProcess({id:Y.id}),z===c.Repeat&&await ea.repeatProcess({id:Y.id,requestId:e}),ey=!1,J(null))},eb=(e,t,s)=>{et(t),en(s)};return G?(0,d.jsx)(E.Z,{sx:{display:"flex",marginTop:"200px"},children:(0,d.jsx)(A.Z,{})}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsxs)(eo.ZP,{container:!0,children:[(0,d.jsx)(eo.ZP,{item:!0,xs:1,children:(0,d.jsx)(O.Z,{value:m,onChange:(e,t)=>{h(t||""),B(!0)},disablePortal:!0,options:["None","Running","History","Locked","Need_Approve",""],renderInput:e=>(0,d.jsx)(R.Z,{...e,label:"Type"})})}),(0,d.jsx)(eo.ZP,{item:!0,xs:3,children:(0,d.jsx)(O.Z,{sx:{marginLeft:5},value:p,onChange:(e,t)=>{x(t||""),B(!0)},disablePortal:!0,options:el,renderInput:e=>(0,d.jsx)(R.Z,{...e,label:"Commands"})})})]}),(0,d.jsx)(I.Z,{children:(0,d.jsxs)(N.Z,{children:[(0,d.jsx)(U.Z,{children:(0,d.jsxs)(L.Z,{children:[(0,d.jsx)(F.Z,{children:"Name"}),(0,d.jsx)(F.Z,{children:"Progress"}),(0,d.jsx)(F.Z,{children:"Status"}),(0,d.jsx)(F.Z,{children:"Action"}),(0,d.jsx)(F.Z,{children:"Created"})]})}),(0,d.jsx)(K.Z,{children:t.map((t,s)=>(0,d.jsxs)(L.Z,{children:[(0,d.jsx)(F.Z,{title:ex(t),children:t.name}),(0,d.jsxs)(F.Z,{children:[!t.progress&&!em(t)&&ep(t)&&(0,d.jsx)(H.Z,{}),!t.progress&&!em(t)&&!ep(t)&&(0,d.jsx)(H.Z,{variant:"determinate",value:0}),!t.progress&&em(t)&&!eh(t)&&(0,d.jsx)(H.Z,{variant:"determinate",value:100}),!t.progress&&em(t)&&eh(t)&&(0,d.jsx)(H.Z,{variant:"determinate",value:0}),t.progress&&(0,d.jsx)(H.Z,{variant:"determinate",value:t.progress.percent}),t.progress&&(0,d.jsxs)("span",{children:["".concat(t.progress.progress)," / ","".concat(t.progress.total)," - ",t.progress.percent,"% [",t.progress.memory,"] / ",t.progress.remaining]}),t.canPlay&&(0,d.jsx)(M.Z,{onClick:()=>eg(t,c.Play),title:"Play","aria-label":"Play",children:(0,d.jsx)(b.Z,{})}),t.canPause&&(0,d.jsx)(M.Z,{onClick:()=>eg(t,c.Pause),title:"Pause","aria-label":"Pause",children:(0,d.jsx)(Z.Z,{})}),t.canStop&&(0,d.jsx)(M.Z,{onClick:()=>eg(t,c.Stop),title:"Stop","aria-label":"Stop",children:(0,d.jsx)(y.Z,{})})]}),(0,d.jsxs)(F.Z,{children:[i.Error===t.status&&(0,d.jsx)(M.Z,{title:"Error","aria-label":"Error",children:(0,d.jsx)(k.Z,{})}),i.Success===t.status&&(0,d.jsx)(M.Z,{title:"Success","aria-label":"Success",children:(0,d.jsx)(P.Z,{})}),i.Running===t.status&&(0,d.jsx)(M.Z,{title:"Running","aria-label":"Running",children:(0,d.jsx)(v.Z,{})}),i.Cancelled===t.status&&(0,d.jsx)(M.Z,{title:"Cancelled","aria-label":"Cancelled",children:(0,d.jsx)(y.Z,{})}),i.Wait===t.status&&(0,d.jsx)(M.Z,{title:"Wait","aria-label":"Wait",children:(0,d.jsx)(f.Z,{})}),t.lock&&(0,d.jsx)(M.Z,{title:"Locked","aria-label":"Locked",children:(0,d.jsx)(T.Z,{})})]}),(0,d.jsxs)(F.Z,{children:[t.canUnlock&&e&&(null==e?void 0:e.permissions.indexOf("unlock_process"))>-1&&(0,d.jsx)(M.Z,{onClick:()=>eg(t,c.Unlock),title:"Unlock","aria-label":"Unlock",children:(0,d.jsx)(_.Z,{})}),t.canApprove&&e&&(null==e?void 0:e.permissions.indexOf("approve_process"))>-1&&(0,d.jsx)(M.Z,{onClick:()=>eg(t,c.Approve),title:"Approve","aria-label":"Approve",children:(0,d.jsx)(S.Z,{})}),t.canRepeat&&e&&(null==e?void 0:e.permissions.indexOf("run_command"))>-1&&(0,d.jsx)(M.Z,{onClick:()=>eg(t,c.Repeat),title:"Repeat","aria-label":"Repeat",children:(0,d.jsx)(C.Z,{})}),t.canKill&&e&&(null==e?void 0:e.permissions.indexOf("kill_process"))>-1&&(0,d.jsx)(M.Z,{onClick:()=>eg(t,c.Kill),title:"Kill","aria-label":"Kill",children:(0,d.jsx)(g.Z,{})}),(null==t?void 0:t.outputId)&&(0,d.jsx)(M.Z,{title:"Output",onClick:()=>ed(t),"aria-label":"Output",children:(0,d.jsx)(w.Z,{})})]}),(0,d.jsx)(F.Z,{title:new Date(t.createdAt).toLocaleString(),children:new Date(t.createdAt).toLocaleString()})]},t.id))})]})}),(0,d.jsx)(D.Z,{component:"div",count:o,rowsPerPage:20,rowsPerPageOptions:[10,20,50,100],page:l,onPageChange:ej}),Y&&(0,d.jsx)(X,{title:Y.name,open:c.Repeat===z,agreeCallback:eZ,modifyCallback:async()=>{J(c.Run),W(!0);let{data:e}=await ea.getCommand(Y.name);Q(e),W(!1)},closeCallback:()=>{J(null)},children:"Reply?"}),Y&&(0,d.jsxs)(X,{title:Y.name,open:c.Run===z,agreeCallback:eZ,closeCallback:()=>{J(null)},children:[V&&(0,d.jsx)(E.Z,{sx:{display:"flex"},children:(0,d.jsx)(A.Z,{})}),!V&&!!q&&c.Run===z&&(0,d.jsx)(ei,{command:q,optionsParams:Y.options,argumentsParams:Y.arguments,callback:eb})]}),Y&&(0,d.jsx)(X,{title:Y.name,open:c.Approve===z,agreeCallback:eZ,closeCallback:()=>{J(null)},children:"Approve?"}),Y&&(0,d.jsx)(X,{title:Y.name,open:c.Unlock===z,agreeCallback:eZ,closeCallback:()=>{J(null)},children:"Unlock?"}),Y&&(0,d.jsx)(X,{title:"Are you sure?",open:!!z&&[c.Play,c.Pause,c.Stop,c.Kill].indexOf(z)>-1,agreeCallback:async()=>{c.Play===z&&await ea.playProcess(Y.id),c.Pause===z&&await ea.pauseProcess(Y.id),c.Stop===z&&await ea.stopProcess(Y.id),c.Kill===z&&await ea.killProcess(Y.id),J(null)},closeCallback:()=>{J(null)},children:Y.name})]})}(l=c||(c={}))[l.Run=0]="Run",l[l.Repeat=1]="Repeat",l[l.Stop=2]="Stop",l[l.Kill=3]="Kill",l[l.Play=4]="Play",l[l.Pause=5]="Pause",l[l.Approve=6]="Approve",l[l.Unlock=7]="Unlock";var eA=s(8409),eO=s(44),eR=s(1076),eI=s.n(eR);let eN=j.createContext({}),eU=eN.Provider;var eL=s(6307);function eF(){let{setTab:e}=(0,j.useContext)(eN),[t,s]=(0,j.useState)([]),[n,a]=(0,j.useState)(null),[l,r]=(0,j.useState)({}),[i,o]=(0,j.useState)({}),[c,m]=(0,j.useState)(""),[h,p]=(0,j.useState)(!1),x=e_(),g=async()=>{let{data:e}=await x.useMemory().getCommands();s(e)};(0,j.useEffect)(()=>{g()},[]),(0,j.useEffect)(()=>{a(t.filter(e=>e.name===c)[0]||null)},[c]);let y=t.map((e,t)=>e.name);y.push("");let Z=(e,t,s)=>{r(t),o(s)},b=!1,f=async t=>{n&&!b&&(b=!0,await x.runCommand({commandName:n.name,options:l,arguments:i,requestId:t}),b=!1,e(u.Processes))};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("br",{}),(0,d.jsxs)("div",{className:eI().autocomplete,children:[(0,d.jsx)(O.Z,{value:c,onChange:(e,t)=>{m(t)},disablePortal:!0,id:"combo-box-demo",options:y,renderInput:e=>(0,d.jsx)(R.Z,{...e,label:"Commands"})}),(0,d.jsx)(M.Z,{onClick:()=>n&&p(!0),title:"Execute","aria-label":"Execute",children:(0,d.jsx)(eL.Z,{color:n?"primary":"inherit"})})]}),n&&(0,d.jsx)(X,{title:n.name,open:h,agreeCallback:f,closeCallback:()=>p(!1),children:(0,d.jsx)(ei,{command:n,callback:Z})})]})}var eK=s(7598),eH=s(5147),eM=s(437),eD=s(6628),eG=s(4808);let eB={position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"100%",bgcolor:"background.paper",border:"2px solid #000",boxShadow:24,p:4};function eV(){let{token:e,tokens:t,addToken:s,deleteToken:n,switchToken:a}=(0,j.useContext)(ev.Z),[l,r]=(0,j.useState)(!1),[i,o]=(0,j.useState)(!1),c=t.map((e,t)=>({...e,label:"".concat(e.host," [").concat(e.id,"]")}));return(0,j.useEffect)(()=>{r(!e)},[e]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(eo.ZP,{container:!0,children:[(0,d.jsx)(eo.ZP,{item:!0,xs:2,children:(0,d.jsx)(O.Z,{freeSolo:!0,value:{...e,label:(null==e?void 0:e.host)?"".concat(e.host," [").concat(e.id,"]"):""},onChange:(e,t)=>{console.log("newValue",t),(null==t?void 0:t.id)&&a(null==t?void 0:t.id)},disablePortal:!0,options:c,renderInput:e=>(0,d.jsx)(R.Z,{...e,label:"Tokens"})})}),(0,d.jsxs)(eo.ZP,{item:!0,xs:1,children:[(0,d.jsx)(M.Z,{onClick:()=>r(!0),title:"Add new token","aria-label":"Add new token",children:(0,d.jsx)(eH.Z,{})}),(0,d.jsx)(M.Z,{onClick:()=>o(!0),title:"Delete current token","aria-label":"Add new token",children:(0,d.jsx)(g.Z,{})})]})]}),(0,d.jsx)(eM.Z,{"aria-labelledby":"transition-modal-title","aria-describedby":"transition-modal-description",open:l,onClose:()=>r(!1),closeAfterTransition:!0,slots:{backdrop:eG.Z},slotProps:{backdrop:{timeout:500}},children:(0,d.jsx)(eD.Z,{in:l,children:(0,d.jsx)(E.Z,{sx:eB,children:(0,d.jsx)(eK.Z,{placeholder:"Pass JWT token",minRows:25,style:{width:"100%"},onInput:e=>{s(e.target.value)&&r(!1)}})})})}),(0,d.jsx)(X,{title:"Delete curent token",open:i,agreeCallback:async()=>{let t=(null==e?void 0:e.id)||null;t&&n(t),o(!1)},closeCallback:()=>{o(!1)},children:"Confirm?"})]})}function eW(){let{token:e}=(0,j.useContext)(ev.Z),[t,s]=(0,j.useState)(u.Processes),n=(e,t)=>s(t);return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(h(),{children:[(0,d.jsx)("title",{children:"System monitoring"}),(0,d.jsx)("meta",{name:"description",content:"System monitoring service"}),(0,d.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,d.jsx)("link",{rel:"icon",href:"/favicon.ico"})]}),(0,d.jsxs)("main",{className:x().main,children:[(0,d.jsx)(eV,{}),e&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(eA.Z,{value:t,onChange:n,variant:"scrollable",scrollButtons:!0,allowScrollButtonsMobile:!0,"aria-label":"scrollable force tabs example",children:[(0,d.jsx)(eO.Z,{value:u.Commands,label:"Commands"}),(0,d.jsx)(eO.Z,{value:u.Processes,label:"Processes"})]}),(0,d.jsxs)(eU,{value:{tab:t,setTab:s},children:[t===u.Commands&&(0,d.jsx)(eF,{}),t===u.Processes&&(0,d.jsx)(eE,{})]})]})]})]})}(r=u||(u={}))[r.Commands=0]="Commands",r[r.Processes=1]="Processes"},1076:function(e){e.exports={autocomplete:"styles_autocomplete__ix2hI"}},1502:function(e){e.exports={main:"Home_main__nLjiQ",tasks:"Home_tasks__KFfHM",task:"Home_task__4_d_Z",tabPanel:"Home_tabPanel__c8pAj",tabPanelItem:"Home_tabPanelItem__83uu5",tabPanelItemActive:"Home_tabPanelItemActive__nTDuS"}}},function(e){e.O(0,[317,774,888,179],function(){return e(e.s=8312)}),_N_E=e.O()}]);