Files
object-browser/portal-ui/build/static/js/4209.2f923e7c.chunk.js
2022-08-10 20:43:36 -07:00

2 lines
13 KiB
JavaScript

(self.webpackChunkportal_ui=self.webpackChunkportal_ui||[]).push([[4209],{59121:function(e,t,n){"use strict";n.r(t);var a=n(29439),o=n(1413),c=n(72791),l=n(61889),r=n(64554),s=n(95087),i=n(25469),d=n(60364),u=n(11135),h=n(25787),p=n(45248),m=n(26824),f=n(23814),x=n(92983),b=n(32291),g=n(34866),v=n(72426),k=n.n(v),Z=n(74794),C=n(38734),y=n(40603),w=n(21435),j=n(5172),I=n(80184),S=null;t.default=(0,h.Z)((function(e){return(0,u.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({sizeItem:{width:150},timeItem:{width:100}},f.OR),f.qg),f.bp),f.VX),{},{searchField:(0,o.Z)((0,o.Z)({},f.qg.searchField),{},{margin:"0 5px","&:first-of-type":{marginLeft:0},"&:last-of-type":{marginRight:0}}),tableWrapper:{height:"calc(100vh - 292px)"},inlineCheckboxes:(0,o.Z)((0,o.Z)({},f.IX.inlineCheckboxes),{},{alignItems:"center","@media (max-width: 900px)":{flexFlow:"column",alignItems:"flex-start"}}),formBox:{border:"1px solid #EAEAEA",padding:25,marginBottom:15},traceCheckedIcon:{width:"14px",height:"14px",marginLeft:"0px"},unCheckedIcon:{width:"14px",height:"14px"},separatorBar:{fontSize:16,fontWeight:700,paddingTop:19,"@media (max-width: 900px)":{display:"none"}}},(0,f.Bz)(e.spacing(4))))}))((function(e){var t=e.classes,n=(0,i.TL)(),o=(0,d.v9)((function(e){return e.trace.messages})),u=(0,d.v9)((function(e){return e.trace.traceStarted})),h=(0,c.useState)(""),f=(0,a.Z)(h,2),v=f[0],z=f[1],_=(0,c.useState)(""),T=(0,a.Z)(_,2),F=T[0],N=T[1],L=(0,c.useState)(""),M=(0,a.Z)(L,2),O=M[0],P=M[1],E=(0,c.useState)(""),B=(0,a.Z)(E,2),H=B[0],R=B[1],W=(0,c.useState)(0),A=(0,a.Z)(W,2),D=A[0],V=A[1],q=(0,c.useState)(!1),K=(0,a.Z)(q,2),U=K[0],Y=K[1],G=(0,c.useState)(!0),X=(0,a.Z)(G,2),J=X[0],Q=X[1],$=(0,c.useState)(!1),ee=(0,a.Z)($,2),te=ee[0],ne=ee[1],ae=(0,c.useState)(!1),oe=(0,a.Z)(ae,2),ce=oe[0],le=oe[1],re=(0,c.useState)(!1),se=(0,a.Z)(re,2),ie=se[0],de=se[1],ue=(0,c.useState)(!1),he=(0,a.Z)(ue,2),pe=he[0],me=he[1],fe=(0,c.useState)(!1),xe=(0,a.Z)(fe,2),be=xe[0],ge=xe[1];return(0,I.jsxs)(c.Fragment,{children:[(0,I.jsx)(b.Z,{label:"Trace"}),(0,I.jsx)(Z.Z,{children:(0,I.jsxs)(l.ZP,{className:t.formBox,children:[(0,I.jsxs)(l.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(u?"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)(g.Z,{checked:U,id:"all_calls",name:"all_calls",label:"All",onChange:function(e){Y(e.target.checked)},value:"all",disabled:u,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}}),(0,I.jsx)(g.Z,{checked:J||U,id:"s3_calls",name:"s3_calls",label:"S3",onChange:function(e){Q(e.target.checked)},value:"s3",disabled:u,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}}),(0,I.jsx)(g.Z,{checked:te||U,id:"internal_calls",name:"internal_calls",label:"Internal",onChange:function(e){ne(e.target.checked)},value:"internal",disabled:U||u,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}}),(0,I.jsx)(g.Z,{checked:ce||U,id:"storage_calls",name:"storage_calls",label:"Storage",onChange:function(e){le(e.target.checked)},value:"storage",disabled:U||u,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}}),(0,I.jsx)(g.Z,{checked:ie||U,id:"os_calls",name:"os_calls",label:"OS",onChange:function(e){de(e.target.checked)},value:"os",disabled:U||u,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)(y.Z,{tooltip:"More filter options",onClick:function(){ge(!be)},text:"Filters",icon:(0,I.jsx)(C.k1n,{}),color:"primary",variant:"outlined",className:"filters-toggle-button",style:{width:"118px",background:be?"rgba(8, 28, 66, 0.04)":""}}),!u&&(0,I.jsx)(y.Z,{text:"Start","data-test-id":"trace-start-button",icon:null,color:"primary",variant:"contained",onClick:function(){n((0,j.At)());var e=new URL(window.location.toString()),t=e.port,a="".concat(J?"s3,":"").concat(te?"internal,":"").concat(ce?"storage,":"").concat(ie?"os,":"");U&&(a="all");var o=new URL(document.baseURI).pathname,c=(0,m.x2)(e.protocol);S=new s.w3cwebsocket("".concat(c,"://").concat(e.hostname,":").concat(t).concat(o,"ws/trace?calls=").concat(a,"&threshold=").concat(D,"&onlyErrors=").concat(pe?"yes":"no","&statusCode=").concat(v,"&method=").concat(F,"&funcname=").concat(O,"&path=").concat(H));var l=null;if(null!==S)return S.onopen=function(){console.log("WebSocket Client Connected"),n((0,j.qv)(!0)),S.send("ok"),l=setInterval((function(){S.send("ok")}),1e4)},S.onmessage=function(e){var t=JSON.parse(e.data.toString());t.ptime=k()(t.time,"YYYY-MM-DD HH:mm:s.SSSS +0000 UTC").toDate(),t.key=Math.random(),n((0,j.ho)(t))},S.onclose=function(){clearInterval(l),console.log("connection closed by server"),n((0,j.qv)(!1))},function(){S.close(1e3),clearInterval(l),console.log("closing websockets"),(0,j.qv)(!1)}},style:{width:"118px"}}),u&&(0,I.jsx)(y.Z,{text:"Stop Trace","data-test-id":"trace-stop-button",icon:null,color:"primary",variant:"contained",onClick:function(){S.close(1e3),n((0,j.qv)(!1))},style:{width:"118px"}})]})]})]}),be?(0,I.jsxs)(l.ZP,{item:!0,className:"".concat(u?"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)(w.Z,{className:"orient-vertical",id:"trace-status-code",name:"trace-status-code",label:"Status Code",classes:{},placeholder:"e.g. 503",value:v,onChange:function(e){z(e.target.value)},disabled:u}),(0,I.jsx)(w.Z,{className:"orient-vertical",id:"trace-function-name",name:"trace-function-name",label:"Function Name",classes:{},placeholder:"e.g. FunctionName2055",value:O,onChange:function(e){P(e.target.value)},disabled:u}),(0,I.jsx)(w.Z,{className:"orient-vertical",id:"trace-method",name:"trace-method",label:"Method",classes:{},placeholder:"e.g. Method 2056",value:F,onChange:function(e){N(e.target.value)},disabled:u})]}),(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)(w.Z,{className:"orient-vertical",id:"trace-path",name:"trace-path",label:"Path",classes:{},placeholder:"e.g. my-bucket/my-prefix/*",value:H,onChange:function(e){R(e.target.value)},disabled:u})}),(0,I.jsx)(r.Z,{sx:{marginLeft:"15px"},children:(0,I.jsx)(w.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){V(parseInt(e.target.value))},disabled:u})})]}),(0,I.jsx)(r.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",marginTop:"40px"},children:(0,I.jsx)(g.Z,{checked:pe,id:"only_errors",name:"only_errors",label:"Display only Errors",onChange:function(e){me(e.target.checked)},value:"only_errors",disabled:u,overrideLabelClasses:"trace-checkbox-label",classes:{checkedIcon:t.traceCheckedIcon,unCheckedIcon:t.unCheckedIcon}})})]}):null,(0,I.jsx)(l.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)(l.ZP,{item:!0,xs:12,className:t.tableBlock,children:(0,I.jsx)(x.Z,{itemActions:[],columns:[{label:"Time",elementKey:"ptime",renderFunction:function(e){var t=new Date(e);return(0,p.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:p.ae,globalClass:t.sizeItem},{label:"Download",elementKey:"callStats.tx",renderFunction:p.ae,globalClass:t.sizeItem}],isLoading:!1,records:o,entityName:"Traces",idField:"api",customEmptyMessage:u?"No Traced elements received yet":"Trace is not started yet",customPaperHeight:t.tableWrapper,autoScrollToBottom:!0})})]})})]})}))},26824:function(e,t,n){"use strict";n.d(t,{HE:function(){return c},V9:function(){return a},ci:function(){return o},x2:function(){return l}});var a=1006,o=1008,c=1011,l=function(e){var t="ws";return"https:"===e&&(t="wss"),t}},26759:function(e,t,n){"use strict";var a=n(95318);t.Z=void 0;var o=a(n(45649)),c=n(80184),l=(0,o.default)((0,c.jsx)("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown");t.Z=l},70366:function(e,t,n){"use strict";var a=n(95318);t.Z=void 0;var o=a(n(45649)),c=n(80184),l=(0,o.default)((0,c.jsx)("path",{d:"m7 14 5-5 5 5z"}),"ArrowDropUp");t.Z=l},97911:function(e,t,n){"use strict";var a=n(95318);t.Z=void 0;var o=a(n(45649)),c=n(80184),l=(0,o.default)((0,c.jsx)("path",{d:"M14.67 5v14H9.33V5h5.34zm1 14H21V5h-5.33v14zm-7.34 0V5H3v14h5.33z"}),"ViewColumn");t.Z=l},94454:function(e,t,n){"use strict";n.d(t,{Z:function(){return I}});var a=n(4942),o=n(63366),c=n(87462),l=n(72791),r=n(94419),s=n(12065),i=n(97278),d=n(76189),u=n(80184),h=(0,d.Z)((0,u.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),p=(0,d.Z)((0,u.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),m=(0,d.Z)((0,u.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox"),f=n(14036),x=n(31402),b=n(66934),g=n(21217);function v(e){return(0,g.Z)("MuiCheckbox",e)}var k=(0,n(75878).Z)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary"]),Z=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size"],C=(0,b.ZP)(i.Z,{shouldForwardProp:function(e){return(0,b.FO)(e)||"classes"===e},name:"MuiCheckbox",slot:"Root",overridesResolver:function(e,t){var n=e.ownerState;return[t.root,n.indeterminate&&t.indeterminate,"default"!==n.color&&t["color".concat((0,f.Z)(n.color))]]}})((function(e){var t,n=e.theme,o=e.ownerState;return(0,c.Z)({color:n.palette.text.secondary},!o.disableRipple&&{"&:hover":{backgroundColor:(0,s.Fq)("default"===o.color?n.palette.action.active:n.palette[o.color].main,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==o.color&&(t={},(0,a.Z)(t,"&.".concat(k.checked,", &.").concat(k.indeterminate),{color:n.palette[o.color].main}),(0,a.Z)(t,"&.".concat(k.disabled),{color:n.palette.action.disabled}),t))})),y=(0,u.jsx)(p,{}),w=(0,u.jsx)(h,{}),j=(0,u.jsx)(m,{}),I=l.forwardRef((function(e,t){var n,a,s=(0,x.Z)({props:e,name:"MuiCheckbox"}),i=s.checkedIcon,d=void 0===i?y:i,h=s.color,p=void 0===h?"primary":h,m=s.icon,b=void 0===m?w:m,g=s.indeterminate,k=void 0!==g&&g,I=s.indeterminateIcon,S=void 0===I?j:I,z=s.inputProps,_=s.size,T=void 0===_?"medium":_,F=(0,o.Z)(s,Z),N=k?S:b,L=k?S:d,M=(0,c.Z)({},s,{color:p,indeterminate:k,size:T}),O=function(e){var t=e.classes,n=e.indeterminate,a=e.color,o={root:["root",n&&"indeterminate","color".concat((0,f.Z)(a))]},l=(0,r.Z)(o,v,t);return(0,c.Z)({},t,l)}(M);return(0,u.jsx)(C,(0,c.Z)({type:"checkbox",inputProps:(0,c.Z)({"data-indeterminate":k},z),icon:l.cloneElement(N,{fontSize:null!=(n=N.props.fontSize)?n:T}),checkedIcon:l.cloneElement(L,{fontSize:null!=(a=L.props.fontSize)?a:T}),ownerState:M,ref:t},F,{classes:O}))}))},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__}}()},26769:function(e,t,n){var a=n(39066),o=n(93629),c=n(43141);e.exports=function(e){return"string"==typeof e||!o(e)&&c(e)&&"[object String]"==a(e)}},95087:function(e,t,n){var a;if("object"===typeof globalThis)a=globalThis;else try{a=n(94210)}catch(r){}finally{if(a||"undefined"===typeof window||(a=window),!a)throw new Error("Could not determine global this")}var o=a.WebSocket||a.MozWebSocket,c=n(51496);function l(e,t){return t?new o(e,t):new o(e)}o&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(l,e,{get:function(){return o[e]}})})),e.exports={w3cwebsocket:o?l:null,version:c}},51496:function(e,t,n){e.exports=n(19794).version},19794:function(e){"use strict";e.exports={version:"1.0.34"}}}]);
//# sourceMappingURL=4209.2f923e7c.chunk.js.map