mirror of
https://github.com/OpenMaxIO/openmaxio-object-browser
synced 2026-07-01 07:41:18 -07:00
2 lines
14 KiB
JavaScript
2 lines
14 KiB
JavaScript
(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[9121],{21435:function(e,t,a){"use strict";var n=a(29439),c=a(1413),o=a(72791),l=a(27391),s=a(61889),r=a(30829),i=a(20068),d=a(13400),u=a(20165),h=a(3579),x=a(11135),p=a(72455),f=a(25787),m=a(23814),b=a(29945),g=a(28182),v=a(80184),k=(0,p.Z)((function(e){return(0,x.Z)((0,c.Z)({},m.gM))}));function C(e){var t=k();return(0,v.jsx)(l.Z,(0,c.Z)({InputProps:{classes:t}},e))}t.Z=(0,f.Z)((function(e){return(0,x.Z)((0,c.Z)((0,c.Z)((0,c.Z)({},m.YI),m.Hr),{},{textBoxContainer:{flexGrow:1,position:"relative"},overlayAction:{position:"absolute",right:5,top:6,"& svg":{maxWidth:15,maxHeight:15},"&.withLabel":{top:5}}}))}))((function(e){var t=e.label,a=e.onChange,l=e.value,x=e.id,p=e.name,f=e.type,m=void 0===f?"text":f,k=e.autoComplete,Z=void 0===k?"off":k,j=e.disabled,y=void 0!==j&&j,w=e.multiline,I=void 0!==w&&w,S=e.tooltip,N=void 0===S?"":S,_=e.index,F=void 0===_?0:_,T=e.error,L=void 0===T?"":T,z=e.required,P=void 0!==z&&z,O=e.placeholder,E=void 0===O?"":O,M=e.min,A=e.max,W=e.overlayId,B=e.overlayIcon,R=void 0===B?null:B,K=e.overlayObject,q=void 0===K?null:K,D=e.extraInputProps,U=void 0===D?{}:D,H=e.overlayAction,G=e.noLabelMinWidth,V=void 0!==G&&G,J=e.pattern,X=void 0===J?"":J,Y=e.autoFocus,Q=void 0!==Y&&Y,$=e.classes,ee=e.className,te=void 0===ee?"":ee,ae=e.onKeyPress,ne=e.onFocus,ce=e.onPaste,oe=(0,c.Z)({"data-index":F},U),le=(0,o.useState)(!1),se=(0,n.Z)(le,2),re=se[0],ie=se[1];"number"===m&&M&&(oe.min=M),"number"===m&&A&&(oe.max=A),""!==X&&(oe.pattern=X);var de=R,ue=m;return"password"===m&&null===R&&(de=re?(0,v.jsx)(u.Z,{}):(0,v.jsx)(h.Z,{}),ue=re?"text":"password"),(0,v.jsx)(o.Fragment,{children:(0,v.jsxs)(s.ZP,{container:!0,className:(0,g.Z)(""!==te?te:"",""!==L?$.errorInField:$.inputBoxContainer),children:[""!==t&&(0,v.jsxs)(r.Z,{htmlFor:x,className:V?$.noMinWidthLabel:$.inputLabel,children:[(0,v.jsxs)("span",{children:[t,P?"*":""]}),""!==N&&(0,v.jsx)("div",{className:$.tooltipContainer,children:(0,v.jsx)(i.Z,{title:N,placement:"top-start",children:(0,v.jsx)("div",{className:$.tooltip,children:(0,v.jsx)(b.byK,{})})})})]}),(0,v.jsxs)("div",{className:$.textBoxContainer,children:[(0,v.jsx)(C,{id:x,name:p,fullWidth:!0,value:l,autoFocus:Q,disabled:y,onChange:a,type:ue,multiline:I,autoComplete:Z,inputProps:oe,error:""!==L,helperText:L,placeholder:E,className:$.inputRebase,onKeyPress:ae,onFocus:ne,onPaste:ce}),de&&(0,v.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==t?"withLabel":""),children:(0,v.jsx)(d.Z,{onClick:H?function(){H()}:function(){return ie(!re)},id:W,size:"small",disableFocusRipple:!1,disableRipple:!1,disableTouchRipple:!1,children:de})}),q&&(0,v.jsx)("div",{className:"".concat($.overlayAction," ").concat(""!==t?"withLabel":""),children:q})]})]})})}))},59121:function(e,t,a){"use strict";a.r(t);var n=a(29439),c=a(1413),o=a(72791),l=a(99779),s=a(61889),r=a(64554),i=a(95087),d=a(29945),u=a(81551),h=a(78687),x=a(11135),p=a(25787),f=a(45248),m=a(26824),b=a(23814),g=a(92983),v=a(34866),k=a(21435),C=a(5172),Z=a(27454),j=a(47974),y=a(99670),w=a(87995),I=a(80184),S=null;t.default=(0,p.Z)((function(e){return(0,x.Z)((0,c.Z)((0,c.Z)((0,c.Z)({sizeItem:{width:150},timeItem:{width:100}},b.OR),b.VX),{},{tableWrapper:{height:"calc(100vh - 292px)"},formBox:{border:"1px solid #EAEAEA",padding:25,marginBottom:15},traceCheckedIcon:{width:"14px",height:"14px",marginLeft:"0px"},unCheckedIcon:{width:"14px",height:"14px"}},b.Bz))}))((function(e){var t=e.classes,a=(0,u.TL)(),c=(0,h.v9)((function(e){return e.trace.messages})),x=(0,h.v9)((function(e){return e.trace.traceStarted})),p=(0,o.useState)(""),b=(0,n.Z)(p,2),N=b[0],_=b[1],F=(0,o.useState)(""),T=(0,n.Z)(F,2),L=T[0],z=T[1],P=(0,o.useState)(""),O=(0,n.Z)(P,2),E=O[0],M=O[1],A=(0,o.useState)(""),W=(0,n.Z)(A,2),B=W[0],R=W[1],K=(0,o.useState)(0),q=(0,n.Z)(K,2),D=q[0],U=q[1],H=(0,o.useState)(!1),G=(0,n.Z)(H,2),V=G[0],J=G[1],X=(0,o.useState)(!0),Y=(0,n.Z)(X,2),Q=Y[0],$=Y[1],ee=(0,o.useState)(!1),te=(0,n.Z)(ee,2),ae=te[0],ne=te[1],ce=(0,o.useState)(!1),oe=(0,n.Z)(ce,2),le=oe[0],se=oe[1],re=(0,o.useState)(!1),ie=(0,n.Z)(re,2),de=ie[0],ue=ie[1],he=(0,o.useState)(!1),xe=(0,n.Z)(he,2),pe=xe[0],fe=xe[1],me=(0,o.useState)(!1),be=(0,n.Z)(me,2),ge=be[0],ve=be[1];return(0,o.useEffect)((function(){a((0,w.Sc)("trace"))}),[]),(0,I.jsxs)(o.Fragment,{children:[(0,I.jsx)(j.Z,{label:"Trace",actions:(0,I.jsx)(y.Z,{})}),(0,I.jsx)(d.Xgh,{children:(0,I.jsxs)(s.ZP,{container:!0,spacing:1,className:t.formBox,children:[(0,I.jsxs)(s.ZP,{item:!0,xs:12,sx:{display:"flex",flexFlow:"column","& .trace-checkbox-label":{fontSize:"14px",fontWeight:"normal"}},children:[(0,I.jsx)(r.Z,{sx:{fontSize:"16px",fontWeight:600,padding:"20px 0px 20px 0"},children:"Calls to Trace"}),(0,I.jsxs)(r.Z,{className:"".concat(x?"inactive-state":""),sx:{display:"flex",alignItems:"center",justifyContent:"space-between","&.inactive-state .trace-checkbox-label":{color:"#a6a5a5"}},children:[(0,I.jsxs)(r.Z,{sx:{display:"flex",flexFlow:"row",gap:{md:"30px"},"& .trace-checked-icon":{border:"1px solid red"}},children:[(0,I.jsx)(v.Z,{checked:V,id:"all_calls",name:"all_calls",label:"All",onChange:function(e){J(e.target.checked)},value:"all",disabled:x,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}}),(0,I.jsx)(v.Z,{checked:Q||V,id:"s3_calls",name:"s3_calls",label:"S3",onChange:function(e){$(e.target.checked)},value:"s3",disabled:x,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}}),(0,I.jsx)(v.Z,{checked:ae||V,id:"internal_calls",name:"internal_calls",label:"Internal",onChange:function(e){ne(e.target.checked)},value:"internal",disabled:V||x,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}}),(0,I.jsx)(v.Z,{checked:le||V,id:"storage_calls",name:"storage_calls",label:"Storage",onChange:function(e){se(e.target.checked)},value:"storage",disabled:V||x,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}}),(0,I.jsx)(v.Z,{checked:de||V,id:"os_calls",name:"os_calls",label:"OS",onChange:function(e){ue(e.target.checked)},value:"os",disabled:V||x,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}})]}),(0,I.jsxs)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"15px"},children:[(0,I.jsx)(Z.Z,{tooltip:"More filter options",children:(0,I.jsx)(d.zxk,{id:"filter-toggle",onClick:function(){ve(!ge)},label:"Filters",icon:(0,I.jsx)(d.k1n,{}),variant:"regular",className:"filters-toggle-button",style:{width:"118px",background:ge?"rgba(8, 28, 66, 0.04)":""}})}),!x&&(0,I.jsx)(d.zxk,{id:"start-trace",label:"Start","data-test-id":"trace-start-button",variant:"callAction",onClick:function(){a((0,C.At)());var e=new URL(window.location.toString()),t=e.port,n="".concat(Q?"s3,":"").concat(ae?"internal,":"").concat(le?"storage,":"").concat(de?"os,":"");V&&(n="all");var c=new URL(document.baseURI).pathname,o=(0,m.x2)(e.protocol);S=new i.w3cwebsocket("".concat(o,"://").concat(e.hostname,":").concat(t).concat(c,"ws/trace?calls=").concat(n,"&threshold=").concat(D,"&onlyErrors=").concat(pe?"yes":"no","&statusCode=").concat(N,"&method=").concat(L,"&funcname=").concat(E,"&path=").concat(B));var s=null;if(null!==S)return S.onopen=function(){console.log("WebSocket Client Connected"),a((0,C.qv)(!0)),S.send("ok"),s=setInterval((function(){S.send("ok")}),1e4)},S.onmessage=function(e){var t=JSON.parse(e.data.toString());t.ptime=l.ou.fromISO(t.time).toJSDate(),t.key=Math.random(),a((0,C.ho)(t))},S.onclose=function(){clearInterval(s),console.log("connection closed by server"),a((0,C.qv)(!1))},function(){S.close(1e3),clearInterval(s),console.log("closing websockets"),(0,C.qv)(!1)}},style:{width:"118px"}}),x&&(0,I.jsx)(d.zxk,{id:"stop-trace",label:"Stop Trace","data-test-id":"trace-stop-button",variant:"callAction",onClick:function(){S.close(1e3),a((0,C.qv)(!1))},style:{width:"118px"}})]})]})]}),ge?(0,I.jsxs)(s.ZP,{item:!0,className:"".concat(x?"inactive-state":""),xs:12,sx:{marginTop:"25px",display:"flex",flexFlow:"column",background:"#FBFAFA",padding:"30px","&.inactive-state label":{color:"#a6a5a5"},"& .orient-vertical":{flexFlow:"column","& label":{marginBottom:"10px",fontWeight:600}},"& .trace-checkbox-label":{fontSize:"14px",fontWeight:"normal"}},children:[(0,I.jsxs)(r.Z,{sx:{gap:"30px",display:"grid",gridTemplateColumns:"1fr 1fr 1fr",width:"100%"},children:[(0,I.jsx)(k.Z,{className:"orient-vertical",id:"trace-status-code",name:"trace-status-code",label:"Status Code",classes:{},placeholder:"e.g. 503",value:N,onChange:function(e){_(e.target.value)},disabled:x}),(0,I.jsx)(k.Z,{className:"orient-vertical",id:"trace-function-name",name:"trace-function-name",label:"Function Name",classes:{},placeholder:"e.g. FunctionName2055",value:E,onChange:function(e){M(e.target.value)},disabled:x}),(0,I.jsx)(k.Z,{className:"orient-vertical",id:"trace-method",name:"trace-method",label:"Method",classes:{},placeholder:"e.g. Method 2056",value:L,onChange:function(e){z(e.target.value)},disabled:x})]}),(0,I.jsxs)(r.Z,{sx:{gap:"30px",display:"grid",gridTemplateColumns:"2fr 1fr",width:"100%",marginTop:"33px"},children:[(0,I.jsx)(r.Z,{flex:"2",style:{width:"calc( 100% + 10px)"},children:(0,I.jsx)(k.Z,{className:"orient-vertical",id:"trace-path",name:"trace-path",label:"Path",classes:{},placeholder:"e.g. my-bucket/my-prefix/*",value:B,onChange:function(e){R(e.target.value)},disabled:x})}),(0,I.jsx)(r.Z,{sx:{marginLeft:"15px"},children:(0,I.jsx)(k.Z,{className:"orient-vertical",id:"trace-fthreshold",name:"trace-fthreshold",label:"Response Threshold",type:"number",classes:{},placeholder:"e.g. website.io.3249.114.12",value:"".concat(D),onChange:function(e){U(parseInt(e.target.value))},disabled:x})})]}),(0,I.jsx)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginTop:"40px"},children:(0,I.jsx)(v.Z,{checked:pe,id:"only_errors",name:"only_errors",label:"Display only Errors",onChange:function(e){fe(e.target.checked)},value:"only_errors",disabled:x,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}})})]}):null,(0,I.jsx)(s.ZP,{item:!0,xs:12,children:(0,I.jsx)(r.Z,{sx:{fontSize:"16px",fontWeight:600,marginBottom:"30px",marginTop:"30px"},children:"Trace Results"})}),(0,I.jsx)(s.ZP,{item:!0,xs:12,className:t.tableBlock,children:(0,I.jsx)(g.Z,{itemActions:[],columns:[{label:"Time",elementKey:"ptime",renderFunction:function(e){var t=new Date(e);return(0,f.zk)(t)},globalClass:t.timeItem},{label:"Name",elementKey:"api"},{label:"Status",elementKey:"",renderFunction:function(e){return"".concat(e.statusCode," ").concat(e.statusMsg)},renderFullObject:!0},{label:"Location",elementKey:"configuration_id",renderFunction:function(e){return"".concat(e.host," ").concat(e.client)},renderFullObject:!0},{label:"Load Time",elementKey:"callStats.duration",globalClass:t.timeItem},{label:"Upload",elementKey:"callStats.rx",renderFunction:f.ae,globalClass:t.sizeItem},{label:"Download",elementKey:"callStats.tx",renderFunction:f.ae,globalClass:t.sizeItem}],isLoading:!1,records:c,entityName:"Traces",idField:"api",customEmptyMessage:x?"No Traced elements received yet":"Trace is not started yet",customPaperHeight:t.tableWrapper,autoScrollToBottom:!0})})]})})]})}))},26824:function(e,t,a){"use strict";a.d(t,{HE:function(){return o},V9:function(){return n},ci:function(){return c},x2:function(){return l}});var n=1006,c=1008,o=1011,l=function(e){var t="ws";return"https:"===e&&(t="wss"),t}},3579:function(e,t,a){"use strict";var n=a(64836);t.Z=void 0;var c=n(a(45649)),o=a(80184),l=(0,c.default)((0,o.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"}),"RemoveRedEye");t.Z=l},20165:function(e,t,a){"use strict";var n=a(64836);t.Z=void 0;var c=n(a(45649)),o=a(80184),l=(0,c.default)((0,o.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff");t.Z=l},94210:function(e){var t=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 t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},95087:function(e,t,a){var n;if("object"===typeof globalThis)n=globalThis;else try{n=a(94210)}catch(s){}finally{if(n||"undefined"===typeof window||(n=window),!n)throw new Error("Could not determine global this")}var c=n.WebSocket||n.MozWebSocket,o=a(51496);function l(e,t){return t?new c(e,t):new c(e)}c&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(l,e,{get:function(){return c[e]}})})),e.exports={w3cwebsocket:c?l:null,version:o}},51496:function(e,t,a){e.exports=a(19794).version},19794:function(e){"use strict";e.exports={version:"1.0.34"}}}]);
|
|
//# sourceMappingURL=9121.0c08c03c.chunk.js.map
|