"use strict";(self.webpackChunkray_dashboard_client=self.webpackChunkray_dashboard_client||[]).push([[630],{2630:function(e,n,r){r.r(n),r.d(n,{default:function(){return b}});var i=r(885),a=r(8596),l=r(2206),o=r(9773),t=r(7631),d=r(6593),s=r(3486),c=r(2791),u="1.0.0",f=r(359),h=r(476),v=r(6641),j=r(1426),g=r(184),x=(0,a.Z)((function(e){return{root:{padding:e.spacing(2)},label:{fontWeight:"bold"}}})),Z=function(e,n){return"containerMemory"===e?(0,j.r)(1024*n*1024):JSON.stringify(n)},m=function(){var e=(0,c.useState)(),n=(0,i.Z)(e,2),r=n[0],a=n[1],l=(0,c.useState)([]),o=(0,i.Z)(l,2),t=o[0],d=o[1];return(0,c.useEffect)((function(){(0,h.U)("api/ray_config").then((function(e){var n,r;null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&null!==(r=n.data)&&void 0!==r&&r.config&&a(e.data.data.config)}))}),[]),(0,c.useEffect)((function(){(0,v.b)().then((function(e){var n,r;null!==e&&void 0!==e&&null!==(n=e.data)&&void 0!==n&&null!==(r=n.data)&&void 0!==r&&r.summary&&d(e.data.data.summary)}))}),[]),{rayConfig:r,nodes:t}},b=function(){var e=m().rayConfig,n=x();return(0,g.jsxs)("div",{className:n.root,children:[(0,g.jsxs)(f.Z,{title:(null===e||void 0===e?void 0:e.clusterName)||"SUMMARY",children:[(0,g.jsxs)("p",{children:["Dashboard Frontend Version: ",u]}),(null===e||void 0===e?void 0:e.imageUrl)&&(0,g.jsxs)("p",{children:["Image Url:"," ",(0,g.jsx)("a",{href:e.imageUrl,target:"_blank",rel:"noopener noreferrer",children:e.imageUrl})]}),(null===e||void 0===e?void 0:e.sourceCodeLink)&&(0,g.jsxs)("p",{children:["Source Code:"," ",(0,g.jsx)("a",{href:e.sourceCodeLink,target:"_blank",rel:"noopener noreferrer",children:e.sourceCodeLink})]})]}),e&&(0,g.jsx)(f.Z,{title:"Config",children:(0,g.jsxs)(l.Z,{children:[(0,g.jsxs)(o.Z,{children:[(0,g.jsx)(t.Z,{children:"Key"}),(0,g.jsx)(t.Z,{children:"Value"})]}),(0,g.jsx)(d.Z,{children:Object.entries(e).map((function(e){var r=(0,i.Z)(e,2),a=r[0],l=r[1];return(0,g.jsxs)(s.Z,{children:[(0,g.jsx)(t.Z,{className:n.label,children:a}),(0,g.jsx)(t.Z,{children:Z(a,l)})]})}))})]})})]})}}}]);
//# sourceMappingURL=630.770abc82.chunk.js.map