"use strict";(self.webpackChunkray_dashboard_client=self.webpackChunkray_dashboard_client||[]).push([[591],{2591:function(t,a,n){n.r(a),n.d(a,{default:function(){return Z}});var c=n(885),e=n(8596),i=n(9526),r=n(1288),s=n(7146),u=n(1859),o=n(9095),d=n(2791),p=n(7689),l=n(2759),g=n(359),h=n(4569),f=n.n(h),m=n(184),j=(0,e.Z)((function(t){return{root:{padding:t.spacing(4),width:"100%"},table:{marginTop:t.spacing(4),padding:t.spacing(2)},pageMeta:{padding:t.spacing(2),marginTop:t.spacing(2)},search:{margin:t.spacing(1)}}})),Z=function(){var t=j(),a=(0,p.UO)(),n=a.cmd,e=a.ip,h=a.pid,Z=(0,d.useState)(),x=(0,c.Z)(Z,2),k=x[0],b=x[1],v=(0,d.useState)("gcutil"),w=(0,c.Z)(v,2),y=w[0],C=w[1],S=(0,d.useCallback)((function(){return function(t,a,n){return f().get("utils/jstat",{params:{ip:t,pid:a,options:n}})}(e,h,y).then((function(t){t.data.result?b(t.data.data.output):b(t.data.msg)})).catch((function(t){return b(t.toString())}))}),[e,h,y]);return(0,d.useEffect)((function(){switch(n){case"jstack":(function(t,a){return f().get("utils/jstack",{params:{ip:t,pid:a}})})(e,h).then((function(t){t.data.result?b(t.data.data.output):b(t.data.msg)})).catch((function(t){return b(t.toString())}));break;case"jmap":(function(t,a){return f().get("utils/jmap",{params:{ip:t,pid:a}})})(e,h).then((function(t){t.data.result?b(t.data.data.output):b(t.data.msg)})).catch((function(t){return b(t.toString())}));break;case"jstat":S();break;default:b("Command ".concat(n," is not supported."))}}),[n,S,e,h]),(0,m.jsxs)("div",{className:t.root,children:[(0,m.jsx)(g.Z,{title:n,children:"jstat"===n&&(0,m.jsx)(i.Z,{className:t.pageMeta,children:(0,m.jsxs)(r.Z,{container:!0,spacing:1,children:[(0,m.jsx)(r.Z,{item:!0,children:(0,m.jsx)(s.Z,{value:y,onChange:function(t){return C(t.target.value)},children:["class","compiler","gc","gccapacity","gcmetacapacity","gcnew","gcnewcapacity","gcold","gcoldcapacity","gcutil","gccause","printcompilation"].map((function(t){return(0,m.jsx)(u.Z,{value:t,children:t})}))})}),(0,m.jsx)(r.Z,{item:!0,children:(0,m.jsx)(o.Z,{onClick:S,children:"Execute"})})]})})}),(0,m.jsx)(g.Z,{title:"IP: ".concat(e," / Pid: ").concat(h),children:(0,m.jsx)(l.Z,{content:k||"loading",language:"prolog",height:800})})]})}}}]);
//# sourceMappingURL=591.7dd528b7.chunk.js.map