github.com/minio/console@v1.4.1/web-app/build/static/js/960.494cc9da.chunk.js (about)

     1  "use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[960],{25903:(t,e,r)=>{r.d(e,{A:()=>i});r(65043);var n=r(89923),a=r(70579);const i=t=>{let{icon:e=null,label:r=null}=t;return(0,a.jsxs)(n.azJ,{sx:{display:"flex",alignItems:"center",gap:5,marginTop:3},children:[(0,a.jsx)(n.azJ,{sx:{height:16,width:16,display:"flex",alignItems:"center"},children:e}),(0,a.jsx)(n.azJ,{children:r})]})}},960:(t,e,r)=>{r.r(e),r.d(e,{default:()=>it});var n=r(65043),a=r(89923),i=r(82291),o=r(87734),s=r(52185),l=r(6026),c=r(86150),u=r(21327),d=r(38643),p=r(88420),h=r(59101),f=r(11629),m=r.n(f),y=r(79686),x=r.n(y),v=r(19853),b=r.n(v),g=r(58387),j=r(68471),A=r(68892),S=r(94020),w=r(81519),k=r(38813),O=r(76307),P=r(240),E=r(6015),C=r(20202),D=["type","layout","connectNulls","ref"];function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function F(t,e){if(null==t)return{};var r,n,a=function(t,e){if(null==t)return{};var r,n,a={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(a[r]=t[r]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(a[r]=t[r])}return a}function I(){return I=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},I.apply(this,arguments)}function K(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function M(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?K(Object(r),!0).forEach((function(e){R(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):K(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _(t){return function(t){if(Array.isArray(t))return N(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"===typeof t)return N(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function N(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function W(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,q(n.key),n)}}function L(t,e,r){return e=J(e),function(t,e){if(e&&("object"===T(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return B(t)}(t,z()?Reflect.construct(e,r||[],J(t).constructor):e.apply(t,r))}function z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(z=function(){return!!t})()}function J(t){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},J(t)}function B(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}function R(t,e,r){return(e=q(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function q(t){var e=function(t,e){if("object"!=T(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==T(e)?e:String(e)}var Z=function(t){function e(){var t;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];return R(B(t=L(this,e,[].concat(n))),"state",{isAnimationFinished:!0,totalLength:0}),R(B(t),"generateSimpleStrokeDasharray",(function(t,e){return"".concat(e,"px ").concat(t-e,"px")})),R(B(t),"getStrokeDasharray",(function(r,n,a){var i=a.reduce((function(t,e){return t+e}));if(!i)return t.generateSimpleStrokeDasharray(n,r);for(var o=Math.floor(r/i),s=r%i,l=n-r,c=[],u=0,d=0;u<a.length;d+=a[u],++u)if(d+a[u]>s){c=[].concat(_(a.slice(0,u)),[s-d]);break}var p=c.length%2===0?[0,l]:[l];return[].concat(_(e.repeat(a,o)),_(c),p).map((function(t){return"".concat(t,"px")})).join(", ")})),R(B(t),"id",(0,O.NF)("recharts-line-")),R(B(t),"pathRef",(function(e){t.mainCurve=e})),R(B(t),"handleAnimationEnd",(function(){t.setState({isAnimationFinished:!0}),t.props.onAnimationEnd&&t.props.onAnimationEnd()})),R(B(t),"handleAnimationStart",(function(){t.setState({isAnimationFinished:!1}),t.props.onAnimationStart&&t.props.onAnimationStart()})),t}var r,a,i;return function(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(e,t),r=e,i=[{key:"getDerivedStateFromProps",value:function(t,e){return t.animationId!==e.prevAnimationId?{prevAnimationId:t.animationId,curPoints:t.points,prevPoints:e.curPoints}:t.points!==e.curPoints?{curPoints:t.points}:null}},{key:"repeat",value:function(t,e){for(var r=t.length%2!==0?[].concat(_(t),[0]):t,n=[],a=0;a<e;++a)n=[].concat(_(n),_(r));return n}},{key:"renderDotItem",value:function(t,e){var r;if(n.isValidElement(t))r=n.cloneElement(t,e);else if(m()(t))r=t(e);else{var a=(0,g.A)("recharts-line-dot","boolean"!==typeof t?t.className:"");r=n.createElement(A.c,I({},e,{className:a}))}return r}}],(a=[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var t=this.getTotalLength();this.setState({totalLength:t})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var t=this.getTotalLength();t!==this.state.totalLength&&this.setState({totalLength:t})}}},{key:"getTotalLength",value:function(){var t=this.mainCurve;try{return t&&t.getTotalLength&&t.getTotalLength()||0}catch(e){return 0}}},{key:"renderErrorBar",value:function(t,e){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var r=this.props,a=r.points,i=r.xAxis,o=r.yAxis,s=r.layout,l=r.children,c=(0,P.aS)(l,k.u);if(!c)return null;var u=function(t,e){return{x:t.x,y:t.y,value:t.value,errorVal:(0,C.kr)(t.payload,e)}},d={clipPath:t?"url(#clipPath-".concat(e,")"):null};return n.createElement(S.W,d,c.map((function(t){return n.cloneElement(t,{key:"bar-".concat(t.props.dataKey),data:a,xAxis:i,yAxis:o,layout:s,dataPointFormatter:u})})))}},{key:"renderDots",value:function(t,r,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.dot,s=i.points,l=i.dataKey,c=(0,P.J9)(this.props,!1),u=(0,P.J9)(o,!0),d=s.map((function(t,r){var n=M(M(M({key:"dot-".concat(r),r:3},c),u),{},{value:t.value,dataKey:l,cx:t.x,cy:t.y,index:r,payload:t.payload});return e.renderDotItem(o,n)})),p={clipPath:t?"url(#clipPath-".concat(r?"":"dots-").concat(a,")"):null};return n.createElement(S.W,I({className:"recharts-line-dots",key:"dots"},p),d)}},{key:"renderCurveStatically",value:function(t,e,r,a){var i=this.props,o=i.type,s=i.layout,l=i.connectNulls,c=(i.ref,F(i,D)),u=M(M(M({},(0,P.J9)(c,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:e?"url(#clipPath-".concat(r,")"):null,points:t},a),{},{type:o,layout:s,connectNulls:l});return n.createElement(j.I,I({},u,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(t,e){var r=this,a=this.props,i=a.points,o=a.strokeDasharray,s=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,d=a.animationId,p=a.animateNewValues,f=a.width,m=a.height,y=this.state,x=y.prevPoints,v=y.totalLength;return n.createElement(h.Ay,{begin:l,duration:c,isActive:s,easing:u,from:{t:0},to:{t:1},key:"line-".concat(d),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},(function(n){var a=n.t;if(x){var s=x.length/i.length,l=i.map((function(t,e){var r=Math.floor(e*s);if(x[r]){var n=x[r],i=(0,O.Dj)(n.x,t.x),o=(0,O.Dj)(n.y,t.y);return M(M({},t),{},{x:i(a),y:o(a)})}if(p){var l=(0,O.Dj)(2*f,t.x),c=(0,O.Dj)(m/2,t.y);return M(M({},t),{},{x:l(a),y:c(a)})}return M(M({},t),{},{x:t.x,y:t.y})}));return r.renderCurveStatically(l,t,e)}var c,u=(0,O.Dj)(0,v)(a);if(o){var d="".concat(o).split(/[,\s]+/gim).map((function(t){return parseFloat(t)}));c=r.getStrokeDasharray(u,v,d)}else c=r.generateSimpleStrokeDasharray(v,u);return r.renderCurveStatically(i,t,e,{strokeDasharray:c})}))}},{key:"renderCurve",value:function(t,e){var r=this.props,n=r.points,a=r.isAnimationActive,i=this.state,o=i.prevPoints,s=i.totalLength;return a&&n&&n.length&&(!o&&s>0||!b()(o,n))?this.renderCurveWithAnimation(t,e):this.renderCurveStatically(n,t,e)}},{key:"render",value:function(){var t,e=this.props,r=e.hide,a=e.dot,i=e.points,o=e.className,s=e.xAxis,l=e.yAxis,c=e.top,u=e.left,d=e.width,p=e.height,h=e.isAnimationActive,f=e.id;if(r||!i||!i.length)return null;var m=this.state.isAnimationFinished,y=1===i.length,v=(0,g.A)("recharts-line",o),b=s&&s.allowDataOverflow,j=l&&l.allowDataOverflow,A=b||j,k=x()(f)?this.id:f,O=null!==(t=(0,P.J9)(a,!1))&&void 0!==t?t:{r:3,strokeWidth:2},E=O.r,C=void 0===E?3:E,D=O.strokeWidth,T=void 0===D?2:D,F=((0,P.ON)(a)?a:{}).clipDot,I=void 0===F||F,K=2*C+T;return n.createElement(S.W,{className:v},b||j?n.createElement("defs",null,n.createElement("clipPath",{id:"clipPath-".concat(k)},n.createElement("rect",{x:b?u:u-d/2,y:j?c:c-p/2,width:b?d:2*d,height:j?p:2*p})),!I&&n.createElement("clipPath",{id:"clipPath-dots-".concat(k)},n.createElement("rect",{x:u-K/2,y:c-K/2,width:d+K,height:p+K}))):null,!y&&this.renderCurve(A,k),this.renderErrorBar(A,k),(y||a)&&this.renderDots(A,I,k),(!h||m)&&w.Z.renderCallByParent(this.props,i))}}])&&W(r.prototype,a),i&&W(r,i),Object.defineProperty(r,"prototype",{writable:!1}),e}(n.PureComponent);R(Z,"displayName","Line"),R(Z,"defaultProps",{xAxisId:0,yAxisId:0,connectNulls:!1,activeDot:!0,dot:!0,legendType:"line",stroke:"#3182bd",strokeWidth:1,fill:"#fff",points:[],isAnimationActive:!E.m.isSsr,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",hide:!1,label:!1}),R(Z,"getComposedData",(function(t){var e=t.props,r=t.xAxis,n=t.yAxis,a=t.xAxisTicks,i=t.yAxisTicks,o=t.dataKey,s=t.bandSize,l=t.displayedData,c=t.offset,u=e.layout;return M({points:l.map((function(t,e){var l=(0,C.kr)(t,o);return"horizontal"===u?{x:(0,C.nb)({axis:r,ticks:a,bandSize:s,entry:t,index:e}),y:x()(l)?null:n.scale(l),value:l,payload:t}:{x:x()(l)?null:r.scale(l),y:(0,C.nb)({axis:n,ticks:i,bandSize:s,entry:t,index:e}),value:l,payload:t}})),layout:u},c)}));var U=r(3831),H=(0,p.gu)({chartName:"LineChart",GraphicalChild:Z,axisComponents:[{axisType:"xAxis",AxisComp:s.W},{axisType:"yAxis",AxisComp:l.h}],formatAxisMap:U.pr}),G=r(77938),$=r(99161),Q=r(64159),X=r(20554),Y=r(25903),tt=r(48793),et=r(55968),rt=r(56629),nt=r(53518),at=r(70579);const it=()=>{var t;const e=(0,X.jL)(),[r,p]=(0,n.useState)("simple-tab-0"),[h,f]=(0,n.useState)(!0),[m,y]=(0,n.useState)(null),[x,v]=(0,n.useState)(!0),[b,g]=(0,n.useState)(null),[j,A]=(0,n.useState)(!0),[S,w]=(0,n.useState)(null),[k,O]=(0,n.useState)(!0),[P,E]=(0,n.useState)(null),[C,D]=(0,n.useState)(!0),T=(0,G._)($.Ms,[$.OV.KMS_STATUS]),F=(0,G._)($.Ms,[$.OV.KMS_METRICS])&&!h,I=(0,G._)($.Ms,[$.OV.KMS_APIS])&&!h,K=(0,G._)($.Ms,[$.OV.KMS_Version])&&!h;(0,n.useEffect)((()=>{T&&x&&rt.F.kms.kmsStatus().then((t=>{t.data&&(y(t.data),f("SecretKey"===t.data.name))})).catch((t=>{e((0,Q.C9)((0,nt.S)(t.error)))})).finally((()=>v(!1))),F&&j&&rt.F.kms.kmsMetrics().then((t=>{t.data&&g(t.data)})).catch((t=>{e((0,Q.C9)((0,nt.S)(t.error)))})).finally((()=>A(!1))),I&&k&&rt.F.kms.kmsapIs().then((t=>{t.data&&w(t.data)})).catch((t=>{e((0,Q.C9)((0,nt.S)(t.error)))})).finally((()=>O(!1))),K&&C&&rt.F.kms.kmsVersion().then((t=>{t.data&&E(t.data)})).catch((t=>{e((0,Q.C9)((0,nt.S)(t.error)))})).finally((()=>D(!1)))}),[e,T,x,F,j,I,k,K,C]);const M=(0,at.jsxs)(n.Fragment,{children:[(0,at.jsx)(a._xt,{children:"Status"}),(0,at.jsx)("br",{}),m&&(0,at.jsx)(a.xA9,{container:!0,children:(0,at.jsx)(a.xA9,{item:!0,xs:12,children:(0,at.jsx)(a.azJ,{sx:{display:"grid",gap:2,gridTemplateColumns:"2fr 1fr",gridAutoFlow:"row",["@media (max-width: ".concat(a.nmC.sm,"px)")]:{gridTemplateColumns:"1fr",gridAutoFlow:"dense"}},children:(0,at.jsxs)(a.azJ,{sx:{display:"grid",gap:2,gridTemplateColumns:"2fr 1fr",gridAutoFlow:"row",["@media (max-width: ".concat(a.nmC.sm,"px)")]:{gridTemplateColumns:"1fr",gridAutoFlow:"dense"}},children:[(0,at.jsx)(a.mZW,{label:"Name:",value:m.name}),P&&(0,at.jsx)(a.mZW,{label:"Version:",value:P.version}),(0,at.jsx)(a.mZW,{label:"Default Key ID:",value:m.defaultKeyID}),(0,at.jsx)(a.mZW,{label:"Key Management Service Endpoints:",value:(0,at.jsx)(n.Fragment,{children:null===(t=m.endpoints)||void 0===t?void 0:t.map(((t,e)=>(0,at.jsx)(Y.A,{icon:"online"===t.status?(0,at.jsx)(a.xhy,{}):(0,at.jsx)(a.aaC,{}),label:t.url},e)))})})]})})})})]}),_=(0,at.jsxs)(n.Fragment,{children:[(0,at.jsx)(a._xt,{children:"Supported API endpoints"}),(0,at.jsx)("br",{}),S&&(0,at.jsx)(a.xA9,{container:!0,children:(0,at.jsx)(a.xA9,{item:!0,xs:12,children:(0,at.jsx)(a.mZW,{label:"",value:(0,at.jsx)(a.azJ,{sx:{display:"grid",gap:2,gridTemplateColumns:"2fr 1fr",gridAutoFlow:"row",["@media (max-width: ".concat(a.nmC.sm,"px)")]:{gridTemplateColumns:"1fr",gridAutoFlow:"dense"}},children:S.results.map(((t,e)=>(0,at.jsx)(Y.A,{icon:(0,at.jsx)(a.xhy,{}),label:"".concat(t.path," - ").concat(t.method)},e)))})})})})]}),N=(0,at.jsx)(n.Fragment,{children:b&&(0,at.jsxs)(n.Fragment,{children:[(0,at.jsx)("h3",{children:"API Requests"}),(0,at.jsxs)(i.E,{width:730,height:250,data:[{label:"Success",success:b.requestOK},{label:"Failures",failures:b.requestFail},{label:"Errors",errors:b.requestErr},{label:"Active",active:b.requestActive}],children:[(0,at.jsx)(o.d,{strokeDasharray:"3 3"}),(0,at.jsx)(s.W,{dataKey:"label"}),(0,at.jsx)(l.h,{}),(0,at.jsx)(c.m,{}),(0,at.jsx)(u.s,{}),(0,at.jsx)(d.y,{dataKey:"success",fill:"green"}),(0,at.jsx)(d.y,{dataKey:"failures",fill:"red"}),(0,at.jsx)(d.y,{dataKey:"errors",fill:"black"}),(0,at.jsx)(d.y,{dataKey:"active",fill:"#8884d8"})]}),(0,at.jsx)("h3",{children:"Events"}),(0,at.jsxs)(i.E,{width:730,height:250,data:[{label:"Audit",audit:b.auditEvents},{label:"Errors",errors:b.errorEvents}],children:[(0,at.jsx)(o.d,{strokeDasharray:"3 3"}),(0,at.jsx)(s.W,{dataKey:"label"}),(0,at.jsx)(l.h,{}),(0,at.jsx)(c.m,{}),(0,at.jsx)(u.s,{}),(0,at.jsx)(d.y,{dataKey:"audit",fill:"green"}),(0,at.jsx)(d.y,{dataKey:"errors",fill:"black"})]}),(0,at.jsx)("h3",{children:"Latency Histogram"}),b.latencyHistogram&&(0,at.jsxs)(H,{width:730,height:250,data:b.latencyHistogram.map((t=>({...t,duration:"".concat(t.duration/1e6,"ms")}))),margin:{top:5,right:30,left:20,bottom:5},children:[(0,at.jsx)(o.d,{strokeDasharray:"3 3"}),(0,at.jsx)(s.W,{dataKey:"duration"}),(0,at.jsx)(l.h,{}),(0,at.jsx)(c.m,{}),(0,at.jsx)(u.s,{}),(0,at.jsx)(Z,{type:"monotone",dataKey:"total",stroke:"#8884d8",name:"Requests that took T ms or less"})]})]})});return(0,n.useEffect)((()=>{e((0,Q.ph)("kms_status"))}),[]),(0,at.jsxs)(n.Fragment,{children:[(0,at.jsx)(tt.A,{label:"Key Management Service",actions:(0,at.jsx)(et.A,{})}),(0,at.jsx)(a.Mxu,{children:(0,at.jsx)(a.tUM,{currentTabOrPath:r,onTabClick:t=>p(t),options:[{tabConfig:{label:"Status",id:"simple-tab-0"},content:(0,at.jsx)(a.azJ,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:M})},{tabConfig:{label:"APIs",id:"simple-tab-1",disabled:!I},content:(0,at.jsx)(a.azJ,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:_})},{tabConfig:{label:"Metrics",id:"simple-tab-2",disabled:!F},content:(0,at.jsx)(a.azJ,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:N})}]})})]})}},82291:(t,e,r)=>{r.d(e,{E:()=>l});var n=r(88420),a=r(38643),i=r(52185),o=r(6026),s=r(3831),l=(0,n.gu)({chartName:"BarChart",GraphicalChild:a.y,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:i.W},{axisType:"yAxis",AxisComp:o.h}],formatAxisMap:s.pr})}}]);
     2  //# sourceMappingURL=960.494cc9da.chunk.js.map