Files
openmaxio-object-browser/portal-ui/build/static/js/3832.2169fe42.chunk.js
Alex 7a14f0c012 Release v0.23.1 (#2648)
Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
2023-02-08 18:20:55 -08:00

2 lines
12 KiB
JavaScript

(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[3832],{63832:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return z}});var o=t(29439),i=t(1413),r=t(72791),l=t(95087),s=t(75952),a=t(11135),c=t(25787),d=t(78687),u=t(4834),h=t(61889),g=t(68096),x=t(58406),f=t(23786),p=t(99779),j=t(81207),m=t(25469),v=t(26824),y=t(23814),b=t(74794),Z=t(59114),w=t(35527),S=t(79836),C=t(53382),T=t(39281),k=t(35855),A=t(53994),L=t(56125),F=t(64554),O=t(20890),N=t(26181),M=t.n(N),R=t(80184),_=function(e){var n=e.log,t=(0,r.useState)(!1),i=(0,o.Z)(t,2),l=i[0],a=i[1],c=function(e){return M()(n,e,"")},d="",u=c("ConsoleMsg"),h=c("error.message");""!==u?d=u:""!==h&&(d=h);var g=(d||"").replace(/\u2501|\u250f|\u2513|\u2503|\u2517|\u251b/g,"");g=g.replace(/([^\x20-\x7F])/g,"");var x=(0,R.jsx)(r.Fragment,{});""!==u?x=function(e){var n=e.ConsoleMsg;return n=(n=n.replace(/\x1B/g," ")).replace(/((\[[0-9;]+m))/g,""),(0,R.jsx)("div",{style:{display:"table",tableLayout:"fixed",width:"100%",paddingLeft:10,paddingRight:10},children:(0,R.jsx)("div",{style:{display:"table-cell",whiteSpace:"nowrap",textOverflow:"ellipsis",overflowX:"auto"},children:(0,R.jsx)("pre",{children:n})})})}(n):""!==h&&(x=function(e){var n={color:"#C83B51",fontWeight:400,fontFamily:"monospace",fontSize:"12px"},t={fontFamily:"monospace",fontSize:"12px"},o=function(n){return M()(e,n,"")};return(0,R.jsxs)(r.Fragment,{children:[(0,R.jsxs)("div",{children:[(0,R.jsx)("b",{style:t,children:"API:\xa0"}),(0,R.jsx)("span",{style:n,children:o("api.name")})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("b",{style:t,children:"Time:\xa0"}),(0,R.jsx)("span",{style:n,children:o("time").toString()})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("b",{style:t,children:"DeploymentID:\xa0"}),(0,R.jsx)("span",{style:n,children:o("deploymentid")})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("b",{style:t,children:"RequestID:\xa0"}),(0,R.jsx)("span",{style:n,children:o("requestID")})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("b",{style:t,children:"RemoteHost:\xa0"}),(0,R.jsx)("span",{style:n,children:o("remotehost")})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("b",{style:t,children:"UserAgent:\xa0"}),(0,R.jsx)("span",{style:n,children:o("userAgent")})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("b",{style:t,children:"Error:\xa0"}),(0,R.jsx)("span",{style:n,children:o("error.message")})]}),(0,R.jsx)("br",{}),(0,R.jsx)("div",{children:(0,R.jsx)("b",{style:t,children:"Backtrace:\xa0"})}),(e.error.source||[]).map((function(e,o){return(0,R.jsxs)("div",{children:[(0,R.jsxs)("b",{style:t,children:[o,":\xa0"]}),(0,R.jsx)("span",{style:n,children:e})]})}))]})}(n)),g=(g||"").replace(/((\[[0-9;]+m))/g,"");var f=p.ou.fromJSDate(n.time),j=(0,R.jsx)(r.Fragment,{children:f.toFormat("yyyy/MM/dd HH:mm:ss (ZZZZ)")});return 1===n.time.getFullYear()&&(j=(0,R.jsx)(r.Fragment,{children:"n/a"})),(0,R.jsxs)(r.Fragment,{children:[(0,R.jsxs)(k.Z,{sx:{"& > *":{borderBottom:"unset"},cursor:"pointer",borderLeft:"0",borderRight:"0"},style:{backgroundColor:"#FDFDFD"},children:[(0,R.jsx)(A.Z,{onClick:function(){return a(!l)},style:{width:200,color:"#989898",fontSize:12},children:(0,R.jsxs)(F.Z,{sx:{"& .min-icon":{width:12,marginRight:1},fontWeight:"bold",lineHeight:1},children:[(0,R.jsx)(s.AeX,{}),j]})}),(0,R.jsx)(A.Z,{onClick:function(){return a(!l)},style:{width:200,color:"#989898",fontSize:12},children:(0,R.jsx)(F.Z,{sx:{"& .min-icon":{width:12,marginRight:1},fontWeight:"bold",lineHeight:1},children:n.errKind})}),(0,R.jsx)(A.Z,{onClick:function(){return a(!l)},children:(0,R.jsx)("div",{style:{display:"table",tableLayout:"fixed",width:"100%",paddingLeft:10,paddingRight:10},children:(0,R.jsx)("div",{style:{display:"table-cell",whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},children:g})})}),(0,R.jsx)(A.Z,{onClick:function(){return a(!l)},style:{width:40},children:(0,R.jsx)(F.Z,{sx:{"& .min-icon":{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"2px"},"&:hover .min-icon":{fill:"#eaeaea"}},children:l?(0,R.jsx)(s.Ekf,{}):(0,R.jsx)(s._f_,{})})})]}),l?(0,R.jsxs)(k.Z,{children:[(0,R.jsx)(A.Z,{style:{paddingBottom:0,paddingTop:0,width:200,textTransform:"uppercase",verticalAlign:"top",textAlign:"right",color:"#8399AB",fontWeight:"bold"},children:(0,R.jsx)(L.Z,{in:l,timeout:"auto",unmountOnExit:!0,children:(0,R.jsx)("div",{style:{marginTop:10},children:"Log Details"})})}),(0,R.jsx)(A.Z,{colSpan:2,style:{paddingBottom:0,paddingTop:0},children:(0,R.jsx)(L.Z,{in:l,timeout:"auto",unmountOnExit:!0,children:(0,R.jsx)(F.Z,{sx:{margin:1},children:(0,R.jsx)(O.Z,{style:{background:"#efefef",border:"1px solid #dedede",padding:4,fontSize:14,color:"#666666"},children:x})})})}),(0,R.jsx)(A.Z,{style:{paddingBottom:0,paddingTop:0,width:40}})]}):null]},n.time.toString())},E=t(69129),I=(0,t(72455).Z)((function(e){return(0,a.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({logList:{background:"#fff",minHeight:400,height:"calc(100vh - 200px)",overflow:"auto",fontSize:13,borderRadius:4},logerror_tab:{color:"#A52A2A",paddingLeft:25},nodeField:{width:"100%"}},y.OR),{},{actionsTray:(0,i.Z)((0,i.Z)({},y.OR.actionsTray),{},{marginBottom:0})},y.qg),y.IX),y.Bz))})),P=(0,c.Z)((function(e){return(0,a.Z)({root:{lineHeight:"50px","label + &":{marginTop:e.spacing(3)},"& .MuiSelect-select:focus":{backgroundColor:"transparent"}}})}))(u.ZP),D=null,z=function(){var e=(0,m.TL)(),n=I(),t=(0,d.v9)((function(e){return e.logs.logMessages})),i=(0,d.v9)((function(e){return e.logs.logsStarted})),a=(0,r.useState)(""),c=(0,o.Z)(a,2),u=c[0],y=c[1],k=(0,r.useState)([""]),A=(0,o.Z)(k,2),L=A[0],F=A[1],O=(0,r.useState)("all"),N=(0,o.Z)(O,2),M=N[0],z=N[1],B=(0,r.useState)("Select user agent"),H=(0,o.Z)(B,2),U=H[0],W=H[1],X=(0,r.useState)(["All User Agents"]),q=(0,o.Z)(X,2),G=q[0],J=q[1],K=(0,r.useState)("all"),Q=(0,o.Z)(K,2),V=Q[0],Y=Q[1],$=(0,r.useState)(!1),ee=(0,o.Z)($,2),ne=ee[0],te=ee[1],oe=u.toLowerCase(),ie=t.filter((function(e){return(e.userAgent===U||"All User Agents"===U||"Select user agent"===U)&&(""===u||(e.ConsoleMsg.toLowerCase().indexOf(oe)>=0||(!!(e.error&&e.error.source&&e.error.source.filter((function(e){return e.toLowerCase().indexOf(oe)>=0})).length>0)||(!!(e.error&&e.error.message.toLowerCase().indexOf(oe)>=0)||!!(e.api&&e.api.name.toLowerCase().indexOf(oe)>=0)))))}));return(0,r.useEffect)((function(){te(!0),j.Z.invoke("GET","/api/v1/nodes").then((function(e){F(e),te(!1)})).catch((function(e){te(!1)}))}),[]),(0,R.jsxs)(r.Fragment,{children:[(0,R.jsx)(s.mr1,{label:"Logs"}),(0,R.jsx)(b.Z,{children:(0,R.jsxs)(h.ZP,{container:!0,spacing:1,children:[(0,R.jsx)(h.ZP,{item:!0,xs:4,children:ne?(0,R.jsx)("h3",{children:" Loading nodes"}):(0,R.jsx)(g.Z,{variant:"outlined",className:n.nodeField,children:(0,R.jsxs)(x.Z,{id:"node",name:"node","data-test-id":"node-selector",value:M,onChange:function(e){z(e.target.value)},className:n.searchField,disabled:ne||i,input:(0,R.jsx)(P,{}),placeholder:"Select Node",children:[(0,R.jsx)(f.Z,{value:"all",children:"All Nodes"},"select-node-all"),L.map((function(e){return(0,R.jsx)(f.Z,{value:e,children:e},"select-node-name-".concat(e))}))]})})}),(0,R.jsx)(h.ZP,{item:!0,xs:3,children:(0,R.jsx)(g.Z,{variant:"outlined",className:n.nodeField,children:(0,R.jsxs)(x.Z,{id:"logType",name:"logType","data-test-id":"log-type",value:V,onChange:function(e){Y(e.target.value)},className:n.searchField,disabled:ne||i,input:(0,R.jsx)(P,{}),placeholder:"Select Log Type",children:[(0,R.jsx)(f.Z,{value:"all",children:"All Log Types"},"all-log-types"),(0,R.jsx)(f.Z,{value:"minio",children:"MinIO"},"minio-log-type"),(0,R.jsx)(f.Z,{value:"application",children:"Application"},"app-log-type")]})})}),(0,R.jsx)(h.ZP,{item:!0,xs:3,children:G.length>1&&(0,R.jsx)(g.Z,{variant:"outlined",className:n.nodeField,children:(0,R.jsxs)(x.Z,{id:"userAgent",name:"userAgent","data-test-id":"user-agent",value:U,onChange:function(e){W(e.target.value)},className:n.searchField,disabled:G.length<1||i,input:(0,R.jsx)(P,{}),children:[(0,R.jsx)(f.Z,{value:U,disabled:!0,children:"Select User Agent"},"select-user-agent-default"),G.map((function(e){return(0,R.jsx)(f.Z,{value:e,children:e},"select-user-agent-".concat(e))}))]})})}),(0,R.jsxs)(h.ZP,{item:!0,xs:2,sx:{display:"flex",justifyContent:"flex-end"},children:[!i&&(0,R.jsx)(s.zxk,{id:"start-logs",type:"submit",variant:"callAction",disabled:!1,onClick:function(){e((0,E.i1)());var n=new URL(window.location.toString()),t=n.port,o=(0,v.x2)(n.protocol),i=new URL(document.baseURI).pathname;D=new l.w3cwebsocket("".concat(o,"://").concat(n.hostname,":").concat(t).concat(i,"ws/console/?logType=").concat(V,"&node=").concat("Select node"===M?"":M));var r=null;if(null!==D)return D.onopen=function(){console.log("WebSocket Client Connected"),e((0,E.v0)(!0)),D.send("ok"),r=setInterval((function(){D.send("ok")}),1e4)},D.onmessage=function(n){var t=JSON.parse(n.data.toString()),o=!0;""===t.level&&""===t.errKind&&"00:00:00 UTC 01/01/0001"===t.time&&""===t.ConsoleMsg&&""===t.node&&(o=!1);var i=p.ou.fromFormat(t.time,"HH:mm:ss UTC MM/dd/yyyy").toJSDate();t.time=i,t.key=Math.random(),G.indexOf(t.userAgent)<0&&void 0!==t.userAgent&&(G.push(t.userAgent),J(G)),o&&e((0,E.Qo)(t))},D.onclose=function(){clearInterval(r),console.log("connection closed by server"),e((0,E.v0)(!1))},function(){D.close(1e3),clearInterval(r),console.log("closing websockets"),e((0,E.v0)(!1))}},label:"Start Logs"}),i&&(0,R.jsx)(s.zxk,{id:"stop-logs",type:"button",variant:"callAction",onClick:function(){null!==D&&void 0!==D&&(D.close(1e3),e((0,E.v0)(!1)))},label:"Stop Logs"})]}),(0,R.jsx)(h.ZP,{item:!0,xs:12,className:n.actionsTray,children:(0,R.jsx)(Z.Z,{placeholder:"Filter",onChange:function(e){y(e)},value:u})}),(0,R.jsx)(h.ZP,{item:!0,xs:12,children:(0,R.jsx)("div",{id:"logs-container",className:n.logList,"data-test-id":"logs-list-container",children:(0,R.jsxs)(T.Z,{component:w.Z,children:[(0,R.jsx)(S.Z,{"aria-label":"collapsible table",children:(0,R.jsx)(C.Z,{children:ie.map((function(e){return(0,R.jsx)(_,{log:e})}))})}),0===ie.length&&(0,R.jsx)("div",{style:{padding:20,textAlign:"center"},children:"No logs to display"})]})})})]})})]})}},26824:function(e,n,t){"use strict";t.d(n,{HE:function(){return r},V9:function(){return o},ci:function(){return i},x2:function(){return l}});var o=1006,i=1008,r=1011,l=function(e){var n="ws";return"https:"===e&&(n="wss"),n}},39281:function(e,n,t){"use strict";t.d(n,{Z:function(){return p}});var o=t(87462),i=t(63366),r=t(72791),l=t(28182),s=t(94419),a=t(31402),c=t(66934),d=t(75878),u=t(21217);function h(e){return(0,u.Z)("MuiTableContainer",e)}(0,d.Z)("MuiTableContainer",["root"]);var g=t(80184),x=["className","component"],f=(0,c.ZP)("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:function(e,n){return n.root}})({width:"100%",overflowX:"auto"}),p=r.forwardRef((function(e,n){var t=(0,a.Z)({props:e,name:"MuiTableContainer"}),r=t.className,c=t.component,d=void 0===c?"div":c,u=(0,i.Z)(t,x),p=(0,o.Z)({},t,{component:d}),j=function(e){var n=e.classes;return(0,s.Z)({root:["root"]},h,n)}(p);return(0,g.jsx)(f,(0,o.Z)({ref:n,as:d,className:(0,l.Z)(j.root,r),ownerState:p},u))}))},94210:function(e){var n=function(){if("object"===typeof self&&self)return self;if("object"===typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"===typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},95087:function(e,n,t){var o;if("object"===typeof globalThis)o=globalThis;else try{o=t(94210)}catch(s){}finally{if(o||"undefined"===typeof window||(o=window),!o)throw new Error("Could not determine global this")}var i=o.WebSocket||o.MozWebSocket,r=t(51496);function l(e,n){return n?new i(e,n):new i(e)}i&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(l,e,{get:function(){return i[e]}})})),e.exports={w3cwebsocket:i?l:null,version:r}},51496:function(e,n,t){e.exports=t(19794).version},19794:function(e){"use strict";e.exports={version:"1.0.34"}}}]);
//# sourceMappingURL=3832.2169fe42.chunk.js.map