UNPKG

unleash-server

Version:

Unleash is an enterprise ready feature flag service. It provides different strategies for handling feature flags.

6 lines • 21 kB
import{n as e,s as t,t as n}from"./jsx-runtime-ButemYzH.js";import{Ac as r,Al as i,Bs as a,Ca as o,Cd as s,Dd as c,El as l,Ks as u,Ol as ee,Ot as d,Ri as f,Sc as p,Us as te,Wa as m,Xd as h,Xl as g,Xs as _,Yu as v,Zl as y,_d as ne,cd as re,dd as ie,ji as ae,rd as b,ud as oe,xd as x,xl as se,yu as S}from"./index-B0RbDPtk.js";import{t as C}from"./enterpriseEdgeCloud-DI6o2DkU.js";import{t as w}from"./unknownify-D1gvOkgV.js";var T=t(e()),E={connectedEdges:[],revisionIds:[]},D=e=>{let{data:t,error:n,mutate:r}=i(ee(`api/admin/metrics/edges`),O,e);return(0,T.useMemo)(()=>{let e=!n&&!t;return t?.connectedEdges===void 0?Array.isArray(t)?{edgeObservability:{connectedEdges:t,revisionIds:[]},loading:e,refetch:()=>r(),error:n}:{edgeObservability:E,loading:e,refetch:()=>r(),error:n}:{edgeObservability:t,loading:e,refetch:()=>r(),error:n}},[t,n,r])},O=e=>fetch(e).then(r(`Connected Edges`)).then(e=>e.json()),k=d(),A=n(),j=ne((0,A.jsx)(`path`,{d:`M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2`}),`Circle`),M=x(`table`)(({theme:e})=>({width:`100%`,borderCollapse:`collapse`,fontSize:e.fontSizes.smallerBody,"& > thead":{borderBottom:`1px solid ${e.palette.text.primary}`},"& tr":{textAlign:`right`,"& > th:first-of-type, td:first-of-type":{textAlign:`left`}}})),N=x(`tr`)(({theme:e})=>({fontWeight:e.fontWeight.bold,"&&& > td":{paddingTop:e.spacing(1),"& > div":{display:`flex`,alignItems:`center`}}})),P=({instance:e})=>(0,A.jsxs)(M,{children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{children:`Latency (ms)`}),(0,A.jsx)(`th`,{children:`Avg`}),(0,A.jsx)(`th`,{children:`p99`})]})}),(0,A.jsxs)(`tbody`,{children:[(0,A.jsx)(N,{children:(0,A.jsx)(`td`,{colSpan:3,children:(0,A.jsxs)(`div`,{children:[`Upstream`,` `,(0,A.jsx)(o,{tooltip:`Latency measured for requests sent from this Edge instance to the configured upstream, i.e. Unleash or another Edge instance.`,size:`16px`})]})})}),(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:`Client Features`}),(0,A.jsx)(`td`,{children:e.upstreamFeaturesAverageLatencyMs}),(0,A.jsx)(`td`,{children:e.upstreamFeaturesP99LatencyMs})]}),(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:`Metrics`}),(0,A.jsx)(`td`,{children:e.upstreamMetricsAverageLatencyMs}),(0,A.jsx)(`td`,{children:e.upstreamMetricsP99LatencyMs})]}),(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:`Edge`}),(0,A.jsx)(`td`,{children:e.upstreamEdgeAverageLatencyMs}),(0,A.jsx)(`td`,{children:e.upstreamEdgeP99LatencyMs})]}),(0,A.jsx)(N,{children:(0,A.jsx)(`td`,{colSpan:3,children:(0,A.jsxs)(`div`,{children:[`Downstream`,` `,(0,A.jsx)(o,{tooltip:`Latency measured when serving requests from clients, i.e. SDKs or other Edge instances.`,size:`16px`})]})})}),(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:`Client Features`}),(0,A.jsx)(`td`,{children:e.clientFeaturesAverageLatencyMs}),(0,A.jsx)(`td`,{children:e.clientFeaturesP99LatencyMs})]}),(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`td`,{children:`Frontend`}),(0,A.jsx)(`td`,{children:e.frontendApiAverageLatencyMs}),(0,A.jsx)(`td`,{children:e.frontendApiP99LatencyMs})]})]})]}),F=x(`table`)(({theme:e})=>({width:`100%`,borderCollapse:`collapse`,fontSize:e.fontSizes.smallerBody,"& > thead":{borderBottom:`1px solid ${e.palette.text.primary}`},"& tr":{textAlign:`right`,"& > th:first-of-type, td:first-of-type":{textAlign:`left`},paddingTop:e.spacing(1)}})),I=x(`td`)(({theme:e})=>({paddingTop:e.spacing(1),maxWidth:`80px`,"& > div":{display:`flex`,alignItems:`center`,justifyContent:`end`}})),L=x(m)(({theme:e})=>({padding:e.spacing(0,1)})),R=e=>e.length===1?e[0]:`[]`,z=e=>`${R(e.projects)}:${e.environment}.***`,B=e=>e.length<=1||e.includes(`*`)?``:` Projects: ${e.join(`, `)} `,V=e=>`[${e.projects.join(`,`)}]:${e.environment}`,H=(e,t)=>{let n=new Set(e||[]),r=new Set(t);if(n.size!==r.size)return!1;for(let e of n)if(!r.has(e))return!1;return!0},U=(e,t)=>(e||[]).every(e=>t.has(e)),W=e=>e.find(e=>!e.projects||e.projects.length===0)?.revisionId??0,G=(e,t)=>{if(e.length===0)return;if(t.projects.includes(`*`))return Math.max(...e.map(e=>e.revisionId));let n=e.find(e=>H(e.projects,t.projects));if(n)return n.revisionId;let r=new Set(t.projects),i=e.filter(e=>U(e.projects,r));if(i.length!==0)return Math.max(...i.map(e=>e.revisionId))},K=(e,t)=>{let n=e.filter(e=>e.environment===t.environment),r=W(n),i=G(n.filter(e=>!!(e.projects&&e.projects.length>0)),t);return Math.max(i??0,r)},ce=e=>e<=0?`success`:e<5?`warning`:`error`,le=({edgeRevisionId:e,upstreamRevisionId:t})=>{let n=t-e;return(0,A.jsx)(S,{title:n<=0?`Edge feature configuration is up to date`:`Edge is ${n} revisions behind expected upstream revision for this token`,children:(0,A.jsx)(L,{color:ce(n),children:e})})},ue=({apiKeys:e,revisionIds:t})=>{let{locationSettings:n}=_();return!e||e.length===0?null:(0,A.jsxs)(F,{children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{children:`Token`}),(0,A.jsx)(`th`,{children:`Revision`})]})}),(0,A.jsx)(`tbody`,{children:e?.map(e=>{let r=z(e);return(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(I,{children:(0,A.jsx)(u,{title:r,children:r})}),(0,A.jsx)(I,{children:(0,A.jsxs)(`div`,{children:[(0,A.jsx)(le,{edgeRevisionId:e.revisionId,upstreamRevisionId:K(t,e)}),(0,A.jsx)(o,{tooltip:` Edge last updated this token: ${p(e.lastUpdated,n.locale)} ${B(e.projects)} `,size:`14px`})]})})]},V(e))})})]})},de=x(`div`)(({theme:e})=>({width:`100%`,borderRadius:e.shape.borderRadiusMedium,border:`1px solid`,borderColor:e.palette.secondary.border,backgroundColor:e.palette.secondary.light,display:`flex`,flexDirection:`column`,alignItems:`center`,padding:0,zIndex:1,marginTop:e.spacing(1)})),fe=x(ie)({width:`100%`,background:`transparent`,boxShadow:`none`}),pe=x(re,{shouldForwardProp:e=>e!==`connectionStatus`})(({theme:e,connectionStatus:t})=>({fontSize:e.fontSizes.smallBody,padding:e.spacing(1),minHeight:e.spacing(3),"& .MuiAccordionSummary-content":{alignItems:`center`,gap:e.spacing(1),margin:0,"&.Mui-expanded":{margin:0},"& svg":{fontSize:e.fontSizes.mainHeader,color:t===`Stale`?e.palette.warning.main:t===`Disconnected`?e.palette.error.main:e.palette.success.main}}})),me=x(oe)(({theme:e})=>({display:`flex`,flexDirection:`column`,fontSize:e.fontSizes.smallerBody,gap:e.spacing(2)})),q=x(`div`)(({theme:e})=>({display:`flex`,justifyContent:`space-between`,gap:e.spacing(2),"& > span":{display:`flex`,alignItems:`center`}})),he=x(m)(({theme:e})=>({padding:e.spacing(0,1)})),ge=({hosting:e})=>{switch(e){case`hosted`:return`Cloud`;case`enterprise-self-hosted`:return`Self-hosted`;default:return e?`Unknown: ${e}`:`Unknown`}},_e=({reportedAt:e})=>{let t=new Date(e).getTime(),n=(Date.now()-t)/1e3;return n>360?`Disconnected`:n>180?`Stale`:`Connected`},ve=({started:e,reportedAt:t,cpuUsage:n})=>{let r=Number(n);if(!r)return`No usage`;let i=new Date(e).getTime(),a=(new Date(t).getTime()-i)/1e3;return a===0?`No usage`:`${(r/a*100).toFixed(2)} %`},ye=({memoryUsage:e})=>{if(!e)return`No usage`;let t=[`B`,`KB`,`MB`,`GB`],n=e,r=0;for(;n>=1024&&r<t.length-1;)n/=1024,r++;return`${n.toFixed(2)} ${t[r]}`},be=({instance:e,revisionIds:t})=>{let{locationSettings:n}=_(),r=f(`enterpriseEdgeTokensList`),i=_e(e),a=p(e.started,n?.locale),s=p(e.reportedAt,n?.locale),c=ve(e),l=ye(e),u=c===`No usage`&&l===`No usage`&&(0,A.jsx)(`p`,{children:`Resource metrics are only available when running on Linux.`});return(0,A.jsx)(de,{children:(0,A.jsxs)(fe,{children:[(0,A.jsxs)(pe,{expandIcon:(0,A.jsx)(se,{}),connectionStatus:i,children:[(0,A.jsx)(S,{arrow:!0,title:`${i}. Last reported: ${s}`,children:(0,A.jsx)(j,{})}),e.id||e.instanceId]}),(0,A.jsxs)(me,{children:[(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`ID`}),(0,A.jsx)(`span`,{children:e.instanceId})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Upstream server`}),(0,A.jsx)(`span`,{children:e.connectedVia||`Unleash`})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Region`}),(0,A.jsx)(`span`,{children:e.region||`Unknown`})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Hosting`}),(0,A.jsx)(`span`,{children:ge(e)})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Version`}),(0,A.jsx)(`span`,{children:e.edgeVersion})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Status`}),(0,A.jsx)(he,{color:i===`Disconnected`?`error`:i===`Stale`?`warning`:`success`,children:i})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Start`}),(0,A.jsx)(`span`,{children:a})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Last report`}),(0,A.jsx)(`span`,{children:s})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`CPU`}),(0,A.jsxs)(`span`,{children:[c,` `,(0,A.jsx)(o,{tooltip:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{children:`CPU average usage since instance started.`}),u]}),size:`16px`})]})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Memory`}),(0,A.jsxs)(`span`,{children:[l,` `,(0,A.jsx)(o,{tooltip:(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`p`,{children:`Current memory usage.`}),u]}),size:`16px`})]})]}),(0,A.jsxs)(q,{children:[(0,A.jsx)(`strong`,{children:`Stream clients`}),(0,A.jsx)(`span`,{children:e.connectedStreamingClients})]}),(0,A.jsx)(q,{children:(0,A.jsx)(P,{instance:e})}),r&&(0,A.jsx)(q,{children:(0,A.jsx)(ue,{apiKeys:e.apiKeyRevisionIds,revisionIds:t})})]})]})})},J=`Unleash`,xe=x(`div`)(({theme:e})=>({marginBottom:e.spacing(18),display:`flex`,justifyContent:`center`})),Se=x(`div`)(({theme:e})=>({display:`flex`,justifyContent:`center`,gap:e.spacing(4),flexWrap:`wrap`,marginTop:e.spacing(2)})),Y=x(`div`)(({theme:e})=>({borderRadius:e.shape.borderRadiusMedium,border:`1px solid ${e.palette.secondary.border}`,backgroundColor:e.palette.secondary.light,display:`flex`,flexDirection:`column`,alignItems:`center`,padding:e.spacing(1.5),zIndex:1,marginTop:e.spacing(1),"& > svg":{width:e.spacing(9),height:e.spacing(9)}})),Ce=x(Y)(({theme:e})=>({backgroundColor:c(e.palette.background.paper,.75),position:`relative`})),we=x(m)({position:`absolute`,top:-13}),Te=x(b)(({theme:e})=>({marginTop:e.spacing(.5),fontWeight:e.fontWeight.bold})),Ee=x(b)(({theme:e})=>({fontSize:e.fontSizes.smallerBody,color:e.palette.text.secondary})),De=e=>e.reduce((e,t)=>(e.has(t.appName)||e.set(t.appName,{appName:t.appName,instances:[],groupTargets:new Set,level:0}),e.get(t.appName).instances.push(t),e),new Map),Oe=e=>{let t=new Map,n=r=>{if(t.has(r.appName))return t.get(r.appName);let i=0;return r.groupTargets.forEach(t=>{if(t!==J){let r=e.get(t);r&&(i=Math.max(i,n(r)+1))}}),t.set(r.appName,i),i};e.forEach(e=>{e.level=n(e)});let r=new Map;return e.forEach(e=>{let t=r.get(e.level)||[];t.push(e),r.set(e.level,t)}),r},ke=e=>{let t=De(e),n=new Map,r=new Map;return t.forEach(e=>{e.instances=e.instances.sort((e,t)=>e.instanceId.localeCompare(t.instanceId)).map((t,i)=>{let a=`${e.appName}-${i+1}`;return n.set(t.instanceId,a),r.set(a,e.appName),{...t,id:a}})}),t.forEach(e=>{e.instances=e.instances.map(e=>({...e,connectedVia:e.connectedVia?n.get(e.connectedVia)||e.connectedVia:J}));let t=new Set;e.instances.forEach(n=>{if(!n.connectedVia||n.connectedVia===J)t.add(J);else{let i=r.get(n.connectedVia);i&&i!==e.appName&&t.add(i)}}),e.groupTargets=t}),Oe(t)},Ae=e=>e.every(e=>e.hosting===`hosted`)?{hostingLabel:`Cloud`,hostingColor:`secondary`}:e.every(e=>e.hosting===`enterprise-self-hosted`)?{hostingLabel:`Self-hosted`,hostingColor:`info`}:e.every(e=>e.hosting===`hosted`||e.hosting===`enterprise-self-hosted`)?{hostingLabel:`Hybrid`,hostingColor:`warning`}:{hostingLabel:`Unknown`,hostingColor:`neutral`},je=({connectedEdges:e,revisionIds:t})=>{let n=s(),r=(0,T.useMemo)(()=>ke(e),[e]),i=Array.from(r.keys()).sort((e,t)=>e-t);return(0,A.jsxs)(k.ArcherContainer,{strokeColor:n.palette.text.primary,endShape:{arrow:{arrowLength:4,arrowThickness:4}},children:[(0,A.jsx)(xe,{children:(0,A.jsx)(k.ArcherElement,{id:J,children:(0,A.jsxs)(Y,{children:[(0,A.jsx)(l,{darkmode:(0,A.jsx)(g,{}),lightmode:(0,A.jsx)(y,{})}),(0,A.jsx)(b,{sx:{mt:1},children:J})]})})}),i.map(e=>(0,A.jsx)(Se,{children:r.get(e)?.map(({appName:e,groupTargets:r,instances:i})=>{let{hostingLabel:a,hostingColor:o}=Ae(i);return(0,A.jsx)(k.ArcherElement,{id:e,relations:Array.from(r).map(e=>({targetId:e,targetAnchor:`bottom`,sourceAnchor:`top`,style:{strokeColor:n.palette.secondary.border}})),children:(0,A.jsxs)(Ce,{children:[(0,A.jsx)(we,{color:o,children:a}),(0,A.jsx)(Te,{children:w(e)}),(0,A.jsxs)(Ee,{children:[i.length,` instance`,i.length!==1&&`s`]}),i.map(e=>(0,A.jsx)(be,{instance:e,revisionIds:t},e.instanceId))]})},e)})},e))]})},Me=e=>(0,A.jsxs)(`svg`,{width:312,height:144,viewBox:`0 0 312 144`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,...e,children:[(0,A.jsx)(`rect`,{width:312,height:144,rx:8,fill:`#F1F0FC`}),(0,A.jsxs)(`g`,{opacity:.2,children:[(0,A.jsx)(`circle`,{cx:155.933,cy:72.1494,r:59.9326,stroke:`#657A80`,strokeWidth:1.35669,strokeLinecap:`square`}),(0,A.jsx)(`ellipse`,{cx:155.933,cy:72.2595,rx:43.5873,ry:60.2595,stroke:`#657A80`,strokeWidth:1.35669,strokeLinecap:`square`}),(0,A.jsx)(`ellipse`,{cx:156.368,cy:72.1494,rx:27.2421,ry:59.9326,stroke:`#657A80`,strokeWidth:1.35669,strokeLinecap:`square`}),(0,A.jsx)(`ellipse`,{cx:156.369,cy:72.1494,rx:10.8968,ry:59.9326,stroke:`#657A80`,strokeWidth:1.35669,strokeLinecap:`square`})]}),(0,A.jsxs)(`g`,{opacity:.2,children:[(0,A.jsx)(`mask`,{id:`mask0_35832_1410`,style:{maskType:`alpha`},maskUnits:`userSpaceOnUse`,x:96,y:12,width:120,height:121,children:(0,A.jsx)(`circle`,{cx:155.933,cy:72.1494,r:59.2542,fill:`#92A1A5`,stroke:`#657A80`,strokeWidth:1.35669})}),(0,A.jsxs)(`g`,{mask:`url(#mask0_35832_1410)`,children:[(0,A.jsx)(`path`,{d:`M96 48.1777C96 48.1777 109.076 59.2925 155.933 59.2925C202.789 59.2925 215.865 48.1777 215.865 48.1777`,stroke:`#657A80`,strokeWidth:1.35669}),(0,A.jsx)(`path`,{d:`M96 28.3438C96 28.3438 109.076 45.7787 155.933 45.7787C202.789 45.7787 215.865 28.3438 215.865 28.3438`,stroke:`#657A80`,strokeWidth:1.35669}),(0,A.jsx)(`path`,{d:`M96 2.19141C96 2.19141 109.076 33.1384 155.933 33.1384C202.789 33.1384 215.865 2.19141 215.865 2.19141`,stroke:`#657A80`,strokeWidth:1.35669}),(0,A.jsx)(`path`,{d:`M96 -39.4336C96 -39.4336 109.076 21.3707 155.933 21.3707C202.789 21.3707 215.865 -39.4336 215.865 -39.4336`,stroke:`#657A80`,strokeWidth:1.35669}),(0,A.jsx)(`line`,{x1:96,y1:71.472,x2:215.865,y2:71.472,stroke:`#657A80`,strokeWidth:1.35669}),(0,A.jsx)(`path`,{d:`M215.867 95.6855C215.867 95.6855 202.79 84.5708 155.934 84.5708C109.078 84.5708 96.0016 95.6855 96.0016 95.6855`,stroke:`#657A80`,strokeWidth:1.35669}),(0,A.jsx)(`path`,{d:`M215.867 115.518C215.867 115.518 202.79 98.0826 155.934 98.0826C109.078 98.0826 96.0016 115.518 96.0016 115.518`,stroke:`#657A80`,strokeWidth:1.35669}),(0,A.jsx)(`path`,{d:`M215.867 141.672C215.867 141.672 202.79 110.725 155.934 110.725C109.078 110.725 96.0016 141.672 96.0016 141.672`,stroke:`#657A80`,strokeWidth:1.35669}),(0,A.jsx)(`path`,{d:`M215.866 183.297C215.866 183.297 202.79 122.493 155.934 122.493C109.078 122.493 96.0013 183.297 96.0013 183.297`,stroke:`#657A80`,strokeWidth:1.35669})]})]}),(0,A.jsx)(`rect`,{x:116.749,y:86.5273,width:58.1081,height:29.0541,rx:14.527,transform:`rotate(-180 116.749 86.5273)`,fill:`url(#paint0_linear_35832_1410)`}),(0,A.jsx)(`ellipse`,{cx:102.184,cy:71.9997,rx:14.565,ry:14.527,fill:`#817AFE`}),(0,A.jsx)(`path`,{d:`M106.258 67.9648H98.187V76.0354H106.258V67.9648Z`,fill:`white`}),(0,A.jsx)(`path`,{d:`M140.556 78.3887L140.232 70.291L133.381 74.6202L140.556 78.3887ZM121.749 69.1189L129.108 72.5139L128.369 64.4436L121.749 69.1189ZM137.182 73.0493L137.645 72.5217C136.53 71.5447 135.079 70.5495 133.191 69.6186L132.88 70.2481L132.57 70.8776C134.358 71.7589 135.705 72.6876 136.719 73.577L137.182 73.0493ZM132.88 70.2481L133.191 69.6186C131.302 68.6877 129.629 68.143 128.176 67.8544L128.039 68.5428L127.902 69.2312C129.225 69.4939 130.782 69.9964 132.57 70.8776L132.88 70.2481Z`,fill:`#6C65E5`}),(0,A.jsx)(`rect`,{x:147.284,y:55.7305,width:17.4324,height:32.5405,rx:3.48649,fill:`#1A4049`}),(0,A.jsx)(`path`,{d:`M171.444 78.3887L171.768 70.291L178.619 74.6202L171.444 78.3887ZM190.251 69.1189L182.892 72.5139L183.631 64.4436L190.251 69.1189ZM174.818 73.0493L174.355 72.5217C175.47 71.5447 176.921 70.5495 178.809 69.6186L179.12 70.2481L179.43 70.8776C177.642 71.7589 176.295 72.6876 175.281 73.577L174.818 73.0493ZM179.12 70.2481L178.809 69.6186C180.698 68.6877 182.371 68.143 183.824 67.8544L183.961 68.5428L184.098 69.2312C182.775 69.4939 181.218 69.9964 179.43 70.8776L179.12 70.2481Z`,fill:`#6C65E5`}),(0,A.jsx)(`rect`,{x:253.359,y:86.5273,width:58.1081,height:29.0541,rx:14.527,transform:`rotate(-180 253.359 86.5273)`,fill:`url(#paint1_linear_35832_1410)`}),(0,A.jsx)(`ellipse`,{cx:238.794,cy:71.9997,rx:14.565,ry:14.527,fill:`#1A4049`}),(0,A.jsx)(`path`,{d:`M242.867 67.9648H234.797V76.0354H242.867V67.9648Z`,fill:`#EDF0F1`}),(0,A.jsxs)(`defs`,{children:[(0,A.jsxs)(`linearGradient`,{id:`paint0_linear_35832_1410`,x1:116.737,y1:100.985,x2:174.889,y2:100.985,gradientUnits:`userSpaceOnUse`,children:[(0,A.jsx)(`stop`,{stopColor:`#1A4049`,stopOpacity:0}),(0,A.jsx)(`stop`,{offset:1,stopColor:`#0E1A1D`})]}),(0,A.jsxs)(`linearGradient`,{id:`paint1_linear_35832_1410`,x1:253.347,y1:100.985,x2:311.499,y2:100.985,gradientUnits:`userSpaceOnUse`,children:[(0,A.jsx)(`stop`,{stopColor:`#657A80`,stopOpacity:0}),(0,A.jsx)(`stop`,{offset:1,stopColor:`#1A4049`,stopOpacity:.75})]})]})]}),Ne=x(`div`)(({theme:e})=>({display:`flex`,flexDirection:`column`,gap:e.spacing(1),maxWidth:e.spacing(80),margin:`auto`})),Pe=x(`div`)(({theme:e})=>({display:`flex`,flexDirection:`row`,gap:e.spacing(2.5),marginTop:e.spacing(2.5)})),Fe=x(`div`)(({theme:e})=>({border:`1px solid ${e.palette.divider}`,borderRadius:e.shape.borderRadiusLarge,padding:e.spacing(3),flex:1,display:`flex`,flexDirection:`column`,gap:e.spacing(1.5)})),Ie=x(`div`)({"& > svg":{width:`auto`,maxWidth:`100%`,height:`auto`,display:`block`}}),Le=x(`ul`)(({theme:e})=>({listStyle:`none`,marginTop:e.spacing(1),marginBottom:e.spacing(1),paddingLeft:e.spacing(0),display:`flex`,flexDirection:`column`,gap:e.spacing(1)})),X=x(`li`)(({theme:e})=>({display:`flex`,alignItems:`center`,gap:e.spacing(1)})),Re=x(ae)(({theme:e})=>({color:e.palette.primary.main,fontSize:`18px`})),ze=x(`div`)(({theme:e})=>({display:`flex`,justifyContent:`flex-start`,margin:e.spacing(-.75)})),Be=()=>(0,A.jsxs)(Ne,{children:[(0,A.jsx)(b,{variant:`h3`,children:`Which version is right for you?`}),(0,A.jsxs)(b,{variant:`body2`,color:`text.secondary`,children:[`Unleash Enterprise Edge is a high-performance proxy engineered for scalability, resilience, and privacy. It acts as a shield between your SDKs and the Unleash API, allowing you to handle thousands of concurrent connections with zero impact on your primary instance. Contact`,` `,(0,A.jsx)(`a`,{href:`mailto:license@getunleash.io`,children:`license@getunleash.io`}),` `,`today to provision your private Enterprise Edge environment.`]}),(0,A.jsxs)(Pe,{children:[(0,A.jsx)(Z,{image:(0,A.jsx)(C,{}),title:`Cloud hosted`,description:`When you need to connect to Unleash from geographically distributed locations.`,bullets:[`Global infrastructure`,`No operational burden`,`Instant flag updates worldwide`],docsUrl:`https://docs.getunleash.io/deploy/hosting-options#cloud-hosted`}),(0,A.jsx)(Z,{image:(0,A.jsx)(Me,{}),title:`Self hosted`,description:`Ensure low latency and data sovereignty by running Enterprise Edge inside your private network.`,bullets:[`Ideal for PII heavy data`,`Optimized for minimal latency`,`Improved security`],docsUrl:`https://docs.getunleash.io/deploy/hosting-options#self-hosted`})]})]}),Z=({image:e,title:t,description:n,bullets:r,docsUrl:i})=>(0,A.jsxs)(Fe,{children:[(0,A.jsx)(Ie,{children:e}),(0,A.jsx)(b,{variant:`h3`,children:t}),(0,A.jsx)(b,{variant:`body2`,color:`text.secondary`,children:n}),(0,A.jsx)(Le,{children:r.map(e=>(0,A.jsxs)(X,{children:[(0,A.jsx)(Re,{}),` `,(0,A.jsx)(b,{variant:`body2`,color:`text.secondary`,children:e})]},e))}),(0,A.jsxs)(b,{variant:`body2`,color:`text.secondary`,children:[`Contact`,` `,(0,A.jsx)(`a`,{href:`mailto:license@getunleash.io`,children:`license@getunleash.io`}),` to get started.`]}),(0,A.jsx)(ze,{children:(0,A.jsx)(v,{component:h,to:i,size:`small`,sx:{fontSize:`14px`},rel:`noopener noreferrer`,target:`_blank`,children:`Read docs`})})]}),Ve=x(a)(({theme:e})=>({".body":{padding:e.spacing(0)}})),Q=x(`div`)(({theme:e})=>({padding:e.spacing(4)})),He=x(`hr`)(({theme:e})=>({border:`none`,height:`1px`,background:e.palette.divider,width:`100%`,margin:e.spacing(2,0)})),$=()=>{te(`Enterprise Edge`);let{edgeObservability:e}=D({refreshInterval:3e4}),t=e.connectedEdges.length>0;return(0,A.jsxs)(Ve,{header:`Enterprise Edge`,children:[t&&(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Q,{children:(0,A.jsx)(je,{connectedEdges:e.connectedEdges,revisionIds:e.revisionIds})}),(0,A.jsx)(He,{})]}),(0,A.jsx)(Q,{sx:{pb:t?6:4},children:(0,A.jsx)(Be,{})})]})};export{$ as EnterpriseEdge,$ as default};