2 lines
17 KiB
JavaScript
2 lines
17 KiB
JavaScript
"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[960],{25903:(t,e,n)=>{n.d(e,{A:()=>i});n(65043);var r=n(89923),a=n(70579);const i=t=>{let{icon:e=null,label:n=null}=t;return(0,a.jsxs)(r.azJ,{sx:{display:"flex",alignItems:"center",gap:5,marginTop:3},children:[(0,a.jsx)(r.azJ,{sx:{height:16,width:16,display:"flex",alignItems:"center"},children:e}),(0,a.jsx)(r.azJ,{children:n})]})}},960:(t,e,n)=>{n.r(e),n.d(e,{default:()=>it});var r=n(65043),a=n(89923),i=n(82291),o=n(87734),s=n(52185),l=n(6026),c=n(86150),u=n(21327),d=n(38643),p=n(88420),h=n(59101),f=n(11629),m=n.n(f),y=n(79686),x=n.n(y),v=n(19853),b=n.n(v),g=n(58387),j=n(68471),A=n(68892),S=n(94020),w=n(81519),k=n(38813),O=n(76307),P=n(240),E=n(6015),C=n(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 n,r,a=function(t,e){if(null==t)return{};var n,r,a={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(a[n]=t[n]);return a}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(a[n]=t[n])}return a}function I(){return I=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},I.apply(this,arguments)}function K(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function M(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?K(Object(n),!0).forEach((function(e){R(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,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 n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))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 n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function W(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,q(r.key),r)}}function L(t,e,n){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,n||[],J(t).constructor):e.apply(t,n))}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,n){return(e=q(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function q(t){var e=function(t,e){if("object"!=T(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=T(r))return r;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 n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return R(B(t=L(this,e,[].concat(r))),"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(n,r,a){var i=a.reduce((function(t,e){return t+e}));if(!i)return t.generateSimpleStrokeDasharray(r,n);for(var o=Math.floor(n/i),s=n%i,l=r-n,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 n,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),n=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 n=t.length%2!==0?[].concat(_(t),[0]):t,r=[],a=0;a<e;++a)r=[].concat(_(r),_(n));return r}},{key:"renderDotItem",value:function(t,e){var n;if(r.isValidElement(t))n=r.cloneElement(t,e);else if(m()(t))n=t(e);else{var a=(0,g.A)("recharts-line-dot","boolean"!==typeof t?t.className:"");n=r.createElement(A.c,I({},e,{className:a}))}return n}}],(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 n=this.props,a=n.points,i=n.xAxis,o=n.yAxis,s=n.layout,l=n.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 r.createElement(S.W,d,c.map((function(t){return r.cloneElement(t,{key:"bar-".concat(t.props.dataKey),data:a,xAxis:i,yAxis:o,layout:s,dataPointFormatter:u})})))}},{key:"renderDots",value:function(t,n,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,n){var r=M(M(M({key:"dot-".concat(n),r:3},c),u),{},{value:t.value,dataKey:l,cx:t.x,cy:t.y,index:n,payload:t.payload});return e.renderDotItem(o,r)})),p={clipPath:t?"url(#clipPath-".concat(n?"":"dots-").concat(a,")"):null};return r.createElement(S.W,I({className:"recharts-line-dots",key:"dots"},p),d)}},{key:"renderCurveStatically",value:function(t,e,n,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(n,")"):null,points:t},a),{},{type:o,layout:s,connectNulls:l});return r.createElement(j.I,I({},u,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(t,e){var n=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 r.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(r){var a=r.t;if(x){var s=x.length/i.length,l=i.map((function(t,e){var n=Math.floor(e*s);if(x[n]){var r=x[n],i=(0,O.Dj)(r.x,t.x),o=(0,O.Dj)(r.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 n.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=n.getStrokeDasharray(u,v,d)}else c=n.generateSimpleStrokeDasharray(v,u);return n.renderCurveStatically(i,t,e,{strokeDasharray:c})}))}},{key:"renderCurve",value:function(t,e){var n=this.props,r=n.points,a=n.isAnimationActive,i=this.state,o=i.prevPoints,s=i.totalLength;return a&&r&&r.length&&(!o&&s>0||!b()(o,r))?this.renderCurveWithAnimation(t,e):this.renderCurveStatically(r,t,e)}},{key:"render",value:function(){var t,e=this.props,n=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(n||!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 r.createElement(S.W,{className:v},b||j?r.createElement("defs",null,r.createElement("clipPath",{id:"clipPath-".concat(k)},r.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&&r.createElement("clipPath",{id:"clipPath-dots-".concat(k)},r.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(n.prototype,a),i&&W(n,i),Object.defineProperty(n,"prototype",{writable:!1}),e}(r.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,n=t.xAxis,r=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:n,ticks:a,bandSize:s,entry:t,index:e}),y:x()(l)?null:r.scale(l),value:l,payload:t}:{x:x()(l)?null:n.scale(l),y:(0,C.nb)({axis:r,ticks:i,bandSize:s,entry:t,index:e}),value:l,payload:t}})),layout:u},c)}));var U=n(3831),H=(0,p.gu)({chartName:"LineChart",GraphicalChild:Z,axisComponents:[{axisType:"xAxis",AxisComp:s.W},{axisType:"yAxis",AxisComp:l.h}],formatAxisMap:U.pr}),G=n(77938),$=n(99161),Q=n(64159),X=n(21383),Y=n(25903),tt=n(48793),et=n(55968),nt=n(56629),rt=n(53518),at=n(70579);const it=()=>{const t=(0,X.jL)(),[e,n]=(0,r.useState)("simple-tab-0"),[p,h]=(0,r.useState)(!0),[f,m]=(0,r.useState)(null),[y,x]=(0,r.useState)(!0),[v,b]=(0,r.useState)(null),[g,j]=(0,r.useState)(!0),[A,S]=(0,r.useState)(null),[w,k]=(0,r.useState)(!0),[O,P]=(0,r.useState)(null),[E,C]=(0,r.useState)(!0),D=(0,G._)($.Ms,[$.OV.KMS_STATUS]),T=(0,G._)($.Ms,[$.OV.KMS_METRICS])&&!p,F=(0,G._)($.Ms,[$.OV.KMS_APIS])&&!p,I=(0,G._)($.Ms,[$.OV.KMS_Version])&&!p;(0,r.useEffect)((()=>{D&&y&&nt.F.kms.kmsStatus().then((t=>{t.data&&(m(t.data),h("SecretKey"===t.data.name))})).catch((e=>{t((0,Q.C9)((0,rt.S)(e.error)))})).finally((()=>x(!1))),T&&g&&nt.F.kms.kmsMetrics().then((t=>{t.data&&b(t.data)})).catch((e=>{t((0,Q.C9)((0,rt.S)(e.error)))})).finally((()=>j(!1))),F&&w&&nt.F.kms.kmsapIs().then((t=>{t.data&&S(t.data)})).catch((e=>{t((0,Q.C9)((0,rt.S)(e.error)))})).finally((()=>k(!1))),I&&E&&nt.F.kms.kmsVersion().then((t=>{t.data&&P(t.data)})).catch((e=>{t((0,Q.C9)((0,rt.S)(e.error)))})).finally((()=>C(!1)))}),[t,D,y,T,g,F,w,I,E]);const K=(0,at.jsxs)(r.Fragment,{children:[(0,at.jsx)(a._xt,{children:"Status"}),(0,at.jsx)("br",{}),f&&(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:f.name}),O&&(0,at.jsx)(a.mZW,{label:"Version:",value:O.version}),(0,at.jsx)(a.mZW,{label:"Default Key ID:",value:f.defaultKeyID}),(0,at.jsx)(a.mZW,{label:"Key Management Service Endpoints:",value:(0,at.jsx)(r.Fragment,{children:f.endpoints&&f.endpoints.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)))})})]})})})})]}),M=(0,at.jsxs)(r.Fragment,{children:[(0,at.jsx)(a._xt,{children:"Supported API endpoints"}),(0,at.jsx)("br",{}),A&&(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:A.results.map(((t,e)=>(0,at.jsx)(Y.A,{icon:(0,at.jsx)(a.xhy,{}),label:"".concat(t.path," - ").concat(t.method)},e)))})})})})]}),_=(0,at.jsx)(r.Fragment,{children:v&&(0,at.jsxs)(r.Fragment,{children:[(0,at.jsx)("h3",{children:"API Requests"}),(0,at.jsxs)(i.E,{width:730,height:250,data:[{label:"Success",success:v.requestOK},{label:"Failures",failures:v.requestFail},{label:"Errors",errors:v.requestErr},{label:"Active",active:v.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:v.auditEvents},{label:"Errors",errors:v.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"}),v.latencyHistogram&&(0,at.jsxs)(H,{width:730,height:250,data:v.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,r.useEffect)((()=>{t((0,Q.ph)("kms_status"))}),[]),(0,at.jsxs)(r.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:e,onTabClick:t=>n(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:K})},{tabConfig:{label:"APIs",id:"simple-tab-1",disabled:!F},content:(0,at.jsx)(a.azJ,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:M})},{tabConfig:{label:"Metrics",id:"simple-tab-2",disabled:!T},content:(0,at.jsx)(a.azJ,{withBorders:!0,sx:{display:"flex",flexFlow:"column",padding:"43px"},children:_})}]})})]})}},82291:(t,e,n)=>{n.d(e,{E:()=>l});var r=n(88420),a=n(38643),i=n(52185),o=n(6026),s=n(3831),l=(0,r.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})}}]);
|
|
//# sourceMappingURL=960.fdc14172.chunk.js.map
|