diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_auth.js b/spinifex/services/spinifexui/frontend/dist/assets/_auth.js index 342c64efc..41bf9a088 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_auth.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_auth.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./link.js";import{tn as o}from"./cluster-config.js";import{t as s}from"./createLucideIcon.js";import{t as c}from"./chevron-down.js";import{t as l}from"./chevron-right.js";import{a as u,c as d,i as f,n as p,o as m,r as ee,s as h,t as g}from"./waypoints.js";import{n as te}from"./admin-context.js";import{A as _,M as v,_ as y,d as b,l as x,n as S,p as C,w}from"./ec2.js";import{n as T}from"./s32.js";import{t as E}from"./page-heading.js";import{a as D,c as O,i as k,l as A,n as ne,o as j,s as M,t as N}from"./alert-dialog.js";import{t as P}from"./state-badge.js";import{r as re,t as ie}from"./admin.js";import{t as ae}from"./badge.js";import{a as F,n as I,o as L,r as R,s as oe,t as z}from"./card.js";var B=s(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),V=s(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),H=s(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),se=s(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),ce=s(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),U=s(`ship`,[[`path`,{d:`M12 10.189V14`,key:`1p8cqu`}],[`path`,{d:`M12 2v3`,key:`qbqxhf`}],[`path`,{d:`M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6`,key:`qpkstq`}],[`path`,{d:`M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76`,key:`7tigtc`}],[`path`,{d:`M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1924j5`}]]),W=r(),G=e(n(),1),K=t(),le=[{name:`Air-gap Support`,key:`airgap`},{name:`NVIDIA Bluefield DPU`,key:`bluefield`},{name:`NVIDIA MIG Support`,key:`mig`}];function q(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function J(){let e=(0,W.c)(110),{isAdmin:t,version:n,license:r}=te(),[a,o]=(0,G.useState)(!1),s;e[0]===t?s=e[1]:(s={...ie,enabled:t},e[0]=t,e[1]=s);let{data:u}=i(s),d;e[2]===t?d=e[3]:(d={...re,enabled:t},e[2]=t,e[3]=d);let{data:f}=i(d);if(!t||!n)return null;let p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,ne;if(e[4]!==r||e[5]!==u?.cluster_mode||e[6]!==u?.nodes||e[7]!==n.arch||e[8]!==n.commit||e[9]!==n.os||e[10]!==n.version||e[11]!==f?.vms){g=u?.nodes??[];let t;e[31]===f?.vms?t=e[32]:(t=f?.vms??[],e[31]=f?.vms,e[32]=t);let i=t,a=u?.cluster_mode??`single-node`;h=r===`open-source`;let o=g[0]?.region??null,s=g.reduce(pe,0),c=g.reduce(fe,0),l=g.reduce(de,0),d=g.reduce(ue,0);C=`mb-6 space-y-4`,b=`grid grid-cols-1 gap-4 md:grid-cols-3`;let te;e[33]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,K.jsx)(L,{className:`pb-2`,children:(0,K.jsxs)(oe,{className:`flex items-center gap-2 text-sm`,children:[(0,K.jsx)(ce,{className:`size-3.5`}),`Spinifex Info`]})}),e[33]=te):te=e[33];let j;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Version`}),e[34]=j):j=e[34];let M;e[35]===n.version?M=e[36]:(M=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[j,(0,K.jsx)(`span`,{className:`font-mono`,children:n.version})]}),e[35]=n.version,e[36]=M);let N;e[37]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Commit`}),e[37]=N):N=e[37];let P;e[38]===n.commit?P=e[39]:(P=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[N,(0,K.jsx)(`span`,{className:`font-mono`,children:n.commit})]}),e[38]=n.commit,e[39]=P);let re;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Platform`}),e[40]=re):re=e[40];let ie;e[41]!==n.arch||e[42]!==n.os?(ie=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[re,(0,K.jsxs)(`span`,{children:[n.os,`/`,n.arch]})]}),e[41]=n.arch,e[42]=n.os,e[43]=ie):ie=e[43],x=(0,K.jsxs)(z,{children:[te,(0,K.jsxs)(R,{className:`space-y-1 text-xs`,children:[M,P,ie,o&&(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Region`}),(0,K.jsx)(`span`,{children:o})]})]})]});let F;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,K.jsx)(L,{className:`pb-2`,children:(0,K.jsx)(oe,{className:`text-sm`,children:`License & Support`})}),e[44]=F):F=e[44];let I;e[45]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`License`}),e[45]=I):I=e[45];let B=h?`secondary`:`default`,V=h?`Open Source (AGPLv3)`:`Commercial`,H;e[46]!==B||e[47]!==V?(H=(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[I,(0,K.jsx)(ae,{variant:B,children:V})]}),e[46]=B,e[47]=V,e[48]=H):H=e[48];let se;e[49]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Support`}),e[49]=se):se=e[49];let U=h?`Community`:`Standard`,W;e[50]===U?W=e[51]:(W=(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[se,(0,K.jsx)(`span`,{children:U})]}),e[50]=U,e[51]=W);let G;e[52]===h?G=e[53]:(G=h&&(0,K.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-2 block text-xs font-medium text-primary hover:underline`,children:`Upgrade to Commercial →`}),e[52]=h,e[53]=G),e[54]!==H||e[55]!==W||e[56]!==G?(S=(0,K.jsxs)(z,{children:[F,(0,K.jsxs)(R,{className:`space-y-2 text-xs`,children:[H,W,G]})]}),e[54]=H,e[55]=W,e[56]=G,e[57]=S):S=e[57],m=z,e[58]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,K.jsx)(L,{className:`pb-2`,children:(0,K.jsxs)(oe,{className:`flex items-center gap-2 text-sm`,children:[(0,K.jsx)(ee,{className:`size-3.5`}),`Cluster Status`]})}),e[58]=y):y=e[58],p=R,k=`space-y-2 text-xs`,e[59]===a?A=e[60]:(A=(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,K.jsx)(ae,{variant:`outline`,children:a})}),e[59]=a,e[60]=A);let le;e[61]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Nodes`}),e[61]=le):le=e[61],ne=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[le,(0,K.jsx)(`span`,{children:g.length})]});let q;e[62]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Instances`}),e[62]=q):q=e[62],e[63]===i.length?_=e[64]:(_=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[q,(0,K.jsx)(`span`,{children:i.length})]}),e[63]=i.length,e[64]=_);let J;e[65]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`vCPU`}),e[65]=J):J=e[65],v=(0,K.jsxs)(`div`,{className:`flex justify-between`,children:[J,(0,K.jsxs)(`span`,{children:[c,` / `,s]})]}),D=`flex justify-between`,e[66]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`Memory`}),e[66]=O):O=e[66],w=d.toFixed(1),T=` / `,E=l.toFixed(1),e[4]=r,e[5]=u?.cluster_mode,e[6]=u?.nodes,e[7]=n.arch,e[8]=n.commit,e[9]=n.os,e[10]=n.version,e[11]=f?.vms,e[12]=p,e[13]=m,e[14]=h,e[15]=g,e[16]=_,e[17]=v,e[18]=y,e[19]=b,e[20]=x,e[21]=S,e[22]=C,e[23]=w,e[24]=T,e[25]=E,e[26]=D,e[27]=O,e[28]=k,e[29]=A,e[30]=ne}else p=e[12],m=e[13],h=e[14],g=e[15],_=e[16],v=e[17],y=e[18],b=e[19],x=e[20],S=e[21],C=e[22],w=e[23],T=e[24],E=e[25],D=e[26],O=e[27],k=e[28],A=e[29],ne=e[30];let j;e[67]!==w||e[68]!==T||e[69]!==E?(j=(0,K.jsxs)(`span`,{children:[w,T,E,` GB`]}),e[67]=w,e[68]=T,e[69]=E,e[70]=j):j=e[70];let M;e[71]!==j||e[72]!==D||e[73]!==O?(M=(0,K.jsxs)(`div`,{className:D,children:[O,j]}),e[71]=j,e[72]=D,e[73]=O,e[74]=M):M=e[74];let N;e[75]!==p||e[76]!==_||e[77]!==v||e[78]!==M||e[79]!==k||e[80]!==A||e[81]!==ne?(N=(0,K.jsxs)(p,{className:k,children:[A,ne,_,v,M]}),e[75]=p,e[76]=_,e[77]=v,e[78]=M,e[79]=k,e[80]=A,e[81]=ne,e[82]=N):N=e[82];let P;e[83]!==m||e[84]!==y||e[85]!==N?(P=(0,K.jsxs)(m,{children:[y,N]}),e[83]=m,e[84]=y,e[85]=N,e[86]=P):P=e[86];let F;e[87]!==b||e[88]!==x||e[89]!==S||e[90]!==P?(F=(0,K.jsxs)(`div`,{className:b,children:[x,S,P]}),e[87]=b,e[88]=x,e[89]=S,e[90]=P,e[91]=F):F=e[91];let I;e[92]!==g||e[93]!==a?(I=g.length>0&&(0,K.jsxs)(z,{children:[(0,K.jsx)(L,{className:`pb-0`,children:(0,K.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 text-sm font-medium`,onClick:()=>o(!a),children:[a?(0,K.jsx)(c,{className:`size-3.5`}):(0,K.jsx)(l,{className:`size-3.5`}),`Nodes (`,g.length,`)`]})}),a&&(0,K.jsx)(R,{className:`pt-2`,children:(0,K.jsx)(me,{nodes:g})})]}),e[92]=g,e[93]=a,e[94]=I):I=e[94];let B;e[95]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,K.jsx)(L,{className:`pb-2`,children:(0,K.jsx)(oe,{className:`text-sm`,children:`Commercial Add-ons`})}),e[95]=B):B=e[95];let V;e[96]===h?V=e[97]:(V=le.map(e=>(0,K.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,K.jsx)(`span`,{className:h?`text-muted-foreground`:void 0,children:e.name}),h?(0,K.jsx)(se,{className:`size-3 text-muted-foreground`}):(0,K.jsx)(ae,{variant:`outline`,className:`text-[0.625rem]`,children:`Active`})]},e.key)),e[96]=h,e[97]=V);let H;e[98]===V?H=e[99]:(H=(0,K.jsx)(`div`,{className:`space-y-2`,children:V}),e[98]=V,e[99]=H);let U;e[100]===h?U=e[101]:(U=h&&(0,K.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-3 block text-xs font-medium text-primary hover:underline`,children:`Learn more about commercial features →`}),e[100]=h,e[101]=U);let q;e[102]!==H||e[103]!==U?(q=(0,K.jsxs)(z,{children:[B,(0,K.jsxs)(R,{children:[H,U]})]}),e[102]=H,e[103]=U,e[104]=q):q=e[104];let J;return e[105]!==C||e[106]!==F||e[107]!==I||e[108]!==q?(J=(0,K.jsxs)(`div`,{className:C,children:[F,I,q]}),e[105]=C,e[106]=F,e[107]=I,e[108]=q,e[109]=J):J=e[109],J}function ue(e,t){return e+t.alloc_mem_gb}function de(e,t){return e+t.total_mem_gb}function fe(e,t){return e+t.alloc_vcpu}function pe(e,t){return e+t.total_vcpu}function me(e){let t=(0,W.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,K.jsx)(`thead`,{children:(0,K.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,K.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,K.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(he),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,K.jsx)(`div`,{className:`overflow-x-auto`,children:(0,K.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,K.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function he(e){return(0,K.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,K.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,K.jsx)(ae,{variant:e.status===`Ready`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,K.jsxs)(`div`,{className:`flex gap-1`,children:[e.nats_role&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`nats:`,e.nats_role]}),e.predastore_role&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`ps:`,e.predastore_role]})]})}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:q(e.uptime)}),(0,K.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,K.jsx)(`td`,{className:`py-1.5`,children:(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.services.length})})]},e.node)}var ge=`console.spx3.com`,_e=`spinifex:v1:sandbox-welcome`,ve=[{to:`/ec2/run-instances`,icon:(0,K.jsx)(h,{className:`size-3.5`}),label:`Launch an instance`,hint:`Boot a VM on real hardware`},{to:`/s3/ls`,icon:(0,K.jsx)(H,{className:`size-3.5`}),label:`Create a bucket`,hint:`S3-compatible object storage`},{to:`/ec2/describe-vpcs`,icon:(0,K.jsx)(u,{className:`size-3.5`}),label:`Networking`,hint:`VPCs, subnets and security groups`},{to:`/eks/list-clusters`,icon:(0,K.jsx)(U,{className:`size-3.5`}),label:`Kubernetes`,hint:`Managed EKS-compatible clusters`},{to:`/iam/list-users`,icon:(0,K.jsx)(m,{className:`size-3.5`}),label:`Access keys`,hint:`Credentials for the AWS CLI and SDKs`}];function ye(){try{return localStorage.getItem(_e)!==null}catch{}return!1}function be(){try{localStorage.setItem(_e,`1`)}catch{}}function xe(){let e=(0,W.c)(7),[t,n]=(0,G.useState)(Se),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{e||be(),n(e)},e[0]=r):r=e[0];let i=r,o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,K.jsxs)(M,{children:[(0,K.jsx)(O,{children:(0,K.jsx)(V,{className:`text-primary`})}),(0,K.jsx)(A,{children:`Welcome to the Mulga sandbox`}),(0,K.jsx)(D,{children:`You have a real account on a shared evaluation cluster. The APIs are the AWS ones, so the CLI and the SDKs work against it unchanged. Resources here may be reclaimed, so please don't keep anything you need in it.`})]}),e[1]=o):o=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(`div`,{className:`space-y-0.5`,children:ve.map(e=>(0,K.jsxs)(a,{className:`flex items-center gap-2 rounded-md px-2 py-1.5 text-xs hover:bg-muted`,onClick:()=>i(!1),to:e.to,children:[e.icon,(0,K.jsx)(`span`,{className:`font-medium`,children:e.label}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.hint})]},e.to))}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,K.jsx)(`a`,{className:`text-xs text-muted-foreground underline underline-offset-3 hover:text-foreground sm:mr-auto sm:self-center`,href:`https://docs.mulgadc.com`,rel:`noreferrer`,target:`_blank`,children:`Read the docs`}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsxs)(k,{className:`max-w-lg`,children:[o,s,(0,K.jsxs)(j,{children:[c,(0,K.jsx)(ne,{onClick:()=>i(!1),children:`Get started`})]})]}),e[4]=l):l=e[4];let u;return e[5]===t?u=e[6]:(u=(0,K.jsx)(N,{onOpenChange:i,open:t,children:l}),e[5]=t,e[6]=u),u}function Se(){return window.location.hostname===ge&&!ye()}var Y=5;function Ce(){let e=(0,W.c)(12),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(E,{title:`Dashboard`}),n=(0,K.jsx)(xe,{}),r=(0,K.jsx)(J,{}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(we,{})}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(je,{})}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Ie,{})}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Re,{})}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Be,{})}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(He,{})}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(We,{})}),e[9]=u):u=e[9];let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Je,{})}),e[10]=d):d=e[10];let f;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,K.jsxs)(K.Fragment,{children:[t,n,r,(0,K.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[i,a,o,s,c,l,u,d,(0,K.jsx)(G.Suspense,{fallback:(0,K.jsx)(X,{}),children:(0,K.jsx)(Ke,{})})]})]}),e[11]=f):f=e[11],f}function X(){let e=(0,W.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,K.jsx)(L,{children:(0,K.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded bg-muted`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,K.jsxs)(z,{children:[t,(0,K.jsx)(R,{children:(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(`div`,{className:`h-3 w-48 animate-pulse rounded bg-muted`}),(0,K.jsx)(`div`,{className:`h-3 w-36 animate-pulse rounded bg-muted`})]})})]}),e[1]=n):n=e[1],n}function Z(e){let t=(0,W.c)(16),{title:n,icon:r,count:i,to:o,children:s}=e,c;t[0]!==r||t[1]!==n?(c=(0,K.jsxs)(oe,{className:`flex items-center gap-2`,children:[r,n]}),t[0]=r,t[1]=n,t[2]=c):c=t[2];let l;t[3]===i?l=t[4]:(l=(0,K.jsx)(I,{children:(0,K.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-0.5 text-xs font-semibold tabular-nums`,children:i})}),t[3]=i,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,K.jsxs)(L,{children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]===s?d=t[9]:(d=(0,K.jsx)(R,{children:s}),t[8]=s,t[9]=d);let f;t[10]===o?f=t[11]:(f=(0,K.jsx)(F,{children:(0,K.jsx)(a,{to:o,className:`text-xs font-medium text-primary hover:underline`,children:`View all →`})}),t[10]=o,t[11]=f);let p;return t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,K.jsxs)(z,{children:[u,d,f]}),t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function Q(e){let t=(0,W.c)(2),{total:n}=e;if(n<=Y)return null;let r=n-Y,i;return t[0]===r?i=t[1]:(i=(0,K.jsxs)(`p`,{className:`mt-1 text-[0.625rem] text-muted-foreground`,children:[`+`,r,` more`]}),t[0]=r,t[1]=i),i}function $(e){let t=(0,W.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,K.jsx)(`div`,{className:`flex items-center justify-between py-0.5 text-xs`,children:n}),t[0]=n,t[1]=r),r}function we(){let e=(0,W.c)(16),{data:t}=i(x),n,r,a,o,s;if(e[0]!==t?.Reservations){let i=t?.Reservations?.flatMap(Ae)??[];n=i.filter(ke),a=i.filter(Oe),o=i.filter(De),r=i.filter(Ee),s=[...a,...r].slice(0,Y),e[0]=t?.Reservations,e[1]=n,e[2]=r,e[3]=a,e[4]=o,e[5]=s}else n=e[1],r=e[2],a=e[3],o=e[4],s=e[5];let c=s,l;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,K.jsx)(h,{className:`size-3.5`}),e[6]=l):l=e[6];let u;e[7]!==n.length||e[8]!==c||e[9]!==r||e[10]!==a||e[11]!==o?(u=n.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-3 text-[0.625rem] text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[a.length,` running`]}),(0,K.jsxs)(`span`,{children:[o.length,` stopped`]})]}),(0,K.jsx)(`div`,{className:`space-y-0.5`,children:c.map(Te)}),(0,K.jsx)(Q,{total:a.length+r.length})]}),e[7]=n.length,e[8]=c,e[9]=r,e[10]=a,e[11]=o,e[12]=u):u=e[12];let d;return e[13]!==n.length||e[14]!==u?(d=(0,K.jsx)(Z,{title:`Instances`,icon:l,count:n.length,to:`/ec2/describe-instances`,children:u}),e[13]=n.length,e[14]=u,e[15]=d):d=e[15],d}function Te(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.InstanceId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.InstanceType})]},e.InstanceId)}function Ee(e){return e.State?.Name===`pending`}function De(e){return e.State?.Name===`stopped`}function Oe(e){return e.State?.Name===`running`}function ke(e){return e.State?.Name!==`terminated`}function Ae(e){return e.Instances??[]}function je(){let e=(0,W.c)(3),{data:t}=i(_),n;if(e[0]!==t?.Volumes){let r=t?.Volumes??[],i=r.reduce(Fe,0),a=r.filter(Pe),o=r.filter(Ne),s=r.slice(0,Y),c;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,K.jsx)(B,{className:`size-3.5`}),e[2]=c):c=e[2],n=(0,K.jsx)(Z,{title:`Volumes`,icon:c,count:r.length,to:`/ec2/describe-volumes`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No volumes`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`mb-2 flex gap-3 text-[0.625rem] text-muted-foreground`,children:[(0,K.jsxs)(`span`,{children:[i,` GiB total`]}),(0,K.jsxs)(`span`,{children:[a.length,` in-use`]}),(0,K.jsxs)(`span`,{children:[o.length,` available`]})]}),(0,K.jsx)(`div`,{className:`space-y-0.5`,children:s.map(Me)}),(0,K.jsx)(Q,{total:r.length})]})}),e[0]=t?.Volumes,e[1]=n}else n=e[1];return n}function Me(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.VolumeId}),(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.Size,` GiB`]}),(0,K.jsx)(P,{state:e.State})]})]},e.VolumeId)}function Ne(e){return e.State===`available`}function Pe(e){return e.State===`in-use`}function Fe(e,t){return e+(t.Size??0)}function Ie(){let e=(0,W.c)(3),{data:t}=i(v),n;if(e[0]!==t?.Vpcs){let r=t?.Vpcs??[],i=r.slice(0,Y),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(u,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,K.jsx)(Z,{title:`VPCs`,icon:a,count:r.length,to:`/ec2/describe-vpcs`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No VPCs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Le),(0,K.jsx)(Q,{total:r.length})]})}),e[0]=t?.Vpcs,e[1]=n}else n=e[1];return n}function Le(e){let t=o(e.Tags);return(0,K.jsxs)($,{children:[(0,K.jsxs)(`span`,{className:`font-mono`,children:[e.VpcId,t&&(0,K.jsxs)(`span`,{className:`ml-1 font-sans text-muted-foreground`,children:[`(`,t,`)`]})]}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.CidrBlock})]},e.VpcId)}function Re(){let e=(0,W.c)(3),{data:t}=i(C),n;if(e[0]!==t?.KeyPairs){let r=t?.KeyPairs??[],i=r.slice(0,Y),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(m,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,K.jsx)(Z,{title:`Key Pairs`,icon:a,count:r.length,to:`/ec2/describe-key-pairs`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No key pairs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(ze),(0,K.jsx)(Q,{total:r.length})]})}),e[0]=t?.KeyPairs,e[1]=n}else n=e[1];return n}function ze(e){return(0,K.jsx)($,{children:(0,K.jsx)(`span`,{className:`font-mono`,children:e.KeyName})},e.KeyPairId)}function Be(){let e=(0,W.c)(3),{data:t}=i(T),n;if(e[0]!==t?.Buckets){let r=t?.Buckets??[],i=r.slice(0,Y),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(H,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,K.jsx)(Z,{title:`S3 Buckets`,icon:a,count:r.length,to:`/s3/ls`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No buckets`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Ve),(0,K.jsx)(Q,{total:r.length})]})}),e[0]=t?.Buckets,e[1]=n}else n=e[1];return n}function Ve(e){return(0,K.jsx)($,{children:(0,K.jsx)(`span`,{className:`font-mono`,children:e.Name})},e.Name)}function He(){let e=(0,W.c)(3),{data:t}=i(w),n;if(e[0]!==t?.SecurityGroups){let r=t?.SecurityGroups??[],i=r.slice(0,Y),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(p,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,K.jsx)(Z,{title:`Security Groups`,icon:a,count:r.length,to:`/ec2/describe-security-groups`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Ue),(0,K.jsx)(Q,{total:r.length})]})}),e[0]=t?.SecurityGroups,e[1]=n}else n=e[1];return n}function Ue(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.GroupName}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.VpcId})]},e.GroupId)}function We(){let e=(0,W.c)(3),{data:t}=i(y),n;if(e[0]!==t?.NatGateways){let r=t?.NatGateways??[],i=r.slice(0,Y),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(g,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,K.jsx)(Z,{title:`NAT Gateways`,icon:a,count:r.length,to:`/ec2/describe-nat-gateways`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No NAT gateways`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Ge),(0,K.jsx)(Q,{total:r.length})]})}),e[0]=t?.NatGateways,e[1]=n}else n=e[1];return n}function Ge(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.NatGatewayId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.State})]},e.NatGatewayId)}function Ke(){let e=(0,W.c)(3),{data:t}=i(b),n;if(e[0]!==t?.InternetGateways){let r=t?.InternetGateways??[],i=r.slice(0,Y),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(f,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,K.jsx)(Z,{title:`Internet Gateways`,icon:a,count:r.length,to:`/ec2/describe-internet-gateways`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No internet gateways`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(qe),(0,K.jsx)(Q,{total:r.length})]})}),e[0]=t?.InternetGateways,e[1]=n}else n=e[1];return n}function qe(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.InternetGatewayId}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.Attachments?.[0]?.VpcId?`attached`:`detached`})]},e.InternetGatewayId)}function Je(){let e=(0,W.c)(3),{data:t}=i(S),n;if(e[0]!==t?.Addresses){let r=t?.Addresses??[],i=r.slice(0,Y),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,K.jsx)(d,{className:`size-3.5`}),e[2]=a):a=e[2],n=(0,K.jsx)(Z,{title:`Elastic IPs`,icon:a,count:r.length,to:`/ec2/describe-addresses`,children:r.length===0?(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No Elastic IPs`}):(0,K.jsxs)(`div`,{className:`space-y-0.5`,children:[i.map(Ye),(0,K.jsx)(Q,{total:r.length})]})}),e[0]=t?.Addresses,e[1]=n}else n=e[1];return n}function Ye(e){return(0,K.jsxs)($,{children:[(0,K.jsx)(`span`,{className:`font-mono`,children:e.PublicIp}),(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:e.AssociationId?`associated`:`available`})]},e.AllocationId)}export{Ce as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./link.js";import{tn as o}from"./cluster-config.js";import{t as s}from"./createLucideIcon.js";import{t as c}from"./chevron-down.js";import{t as l}from"./chevron-right.js";import{a as u,c as d,i as f,n as p,o as m,r as ee,s as h,t as te}from"./waypoints.js";import{n as ne}from"./admin-context.js";import{A as re,M as g,_,d as v,l as ie,n as y,p as ae,w as oe}from"./ec2.js";import{n as se}from"./s32.js";import{t as b}from"./page-heading.js";import{a as x,c as S,i as C,l as w,n as T,o as E,s as ce,t as D}from"./alert-dialog.js";import{t as O}from"./state-badge.js";import{r as le,t as ue}from"./admin.js";import{t as de}from"./badge.js";import{a as k,n as A,o as j,r as M,s as fe,t as N}from"./card.js";var P=s(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),F=s(`flask-conical`,[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]),I=s(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),L=s(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),pe=s(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),R=s(`ship`,[[`path`,{d:`M12 10.189V14`,key:`1p8cqu`}],[`path`,{d:`M12 2v3`,key:`qbqxhf`}],[`path`,{d:`M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6`,key:`qpkstq`}],[`path`,{d:`M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76`,key:`7tigtc`}],[`path`,{d:`M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1`,key:`1924j5`}]]),z=r(),B=e(n(),1),V=t(),me=[{name:`Air-gap Support`,key:`airgap`},{name:`NVIDIA Bluefield DPU`,key:`bluefield`},{name:`NVIDIA MIG Support`,key:`mig`}];function H(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function U(){let e=(0,z.c)(129),{isAdmin:t,version:n,license:r}=ne(),[a,o]=(0,B.useState)(!1),s;e[0]===t?s=e[1]:(s={...ue,enabled:t},e[0]=t,e[1]=s);let{data:u}=i(s),d;e[2]===t?d=e[3]:(d={...le,enabled:t},e[2]=t,e[3]=d);let{data:f}=i(d);if(!t||!n)return null;let p;e[4]===u?.nodes?p=e[5]:(p=u?.nodes??[],e[4]=u?.nodes,e[5]=p);let m=p,h;e[6]===f?.vms?h=e[7]:(h=f?.vms??[],e[6]=f?.vms,e[7]=h);let te=h,re=u?.cluster_mode??`single-node`,g=r===`open-source`,_=m[0]?.region??null,v;e[8]===m?v=e[9]:(v=m.reduce(ve,0),e[8]=m,e[9]=v);let ie=v,y;e[10]===m?y=e[11]:(y=m.reduce(_e,0),e[10]=m,e[11]=y);let ae=y,oe,se,b,x,S,C,w,T,E,ce,D,O,k,A,P,F,I;if(e[12]!==ae||e[13]!==re||e[14]!==g||e[15]!==m||e[16]!==_||e[17]!==ie||e[18]!==n.arch||e[19]!==n.commit||e[20]!==n.os||e[21]!==n.version||e[22]!==te.length){let t=m.reduce(ge,0),r=m.reduce(he,0);k=`mb-6 space-y-4`,ce=`grid grid-cols-1 gap-4 md:grid-cols-3`;let i;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsx)(j,{className:`pb-2`,children:(0,V.jsxs)(fe,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsx)(pe,{className:`size-3.5`}),`Spinifex Info`]})}),e[40]=i):i=e[40];let a;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Version`}),e[41]=a):a=e[41];let o;e[42]===n.version?o=e[43]:(o=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[a,(0,V.jsx)(`span`,{className:`font-mono`,children:n.version})]}),e[42]=n.version,e[43]=o);let s;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Commit`}),e[44]=s):s=e[44];let c;e[45]===n.commit?c=e[46]:(c=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[s,(0,V.jsx)(`span`,{className:`font-mono`,children:n.commit})]}),e[45]=n.commit,e[46]=c);let l;e[47]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Platform`}),e[47]=l):l=e[47];let u;e[48]!==n.arch||e[49]!==n.os?(u=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[l,(0,V.jsxs)(`span`,{children:[n.os,`/`,n.arch]})]}),e[48]=n.arch,e[49]=n.os,e[50]=u):u=e[50];let d;e[51]===_?d=e[52]:(d=_&&(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Region`}),(0,V.jsx)(`span`,{children:_})]}),e[51]=_,e[52]=d),e[53]!==o||e[54]!==c||e[55]!==u||e[56]!==d?(D=(0,V.jsxs)(N,{children:[i,(0,V.jsxs)(M,{className:`space-y-1 text-xs`,children:[o,c,u,d]})]}),e[53]=o,e[54]=c,e[55]=u,e[56]=d,e[57]=D):D=e[57];let f;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,V.jsx)(j,{className:`pb-2`,children:(0,V.jsx)(fe,{className:`text-sm`,children:`License & Support`})}),e[58]=f):f=e[58];let p;e[59]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`License`}),e[59]=p):p=e[59];let h=g?`secondary`:`default`,ne=g?`Open Source (AGPLv3)`:`Commercial`,v;e[60]!==h||e[61]!==ne?(v=(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[p,(0,V.jsx)(de,{variant:h,children:ne})]}),e[60]=h,e[61]=ne,e[62]=v):v=e[62];let y;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Support`}),e[63]=y):y=e[63];let le=g?`Community`:`Standard`,ue;e[64]===le?ue=e[65]:(ue=(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[y,(0,V.jsx)(`span`,{children:le})]}),e[64]=le,e[65]=ue);let L;e[66]===g?L=e[67]:(L=g&&(0,V.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-2 block text-xs font-medium text-primary hover:underline`,children:`Upgrade to Commercial →`}),e[66]=g,e[67]=L),e[68]!==v||e[69]!==ue||e[70]!==L?(O=(0,V.jsxs)(N,{children:[f,(0,V.jsxs)(M,{className:`space-y-2 text-xs`,children:[v,ue,L]})]}),e[68]=v,e[69]=ue,e[70]=L,e[71]=O):O=e[71],se=N,e[72]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,V.jsx)(j,{className:`pb-2`,children:(0,V.jsxs)(fe,{className:`flex items-center gap-2 text-sm`,children:[(0,V.jsx)(ee,{className:`size-3.5`}),`Cluster Status`]})}),e[72]=E):E=e[72],oe=M,x=`space-y-2 text-xs`,e[73]===re?S=e[74]:(S=(0,V.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,V.jsx)(de,{variant:`outline`,children:re})}),e[73]=re,e[74]=S);let R;e[75]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Nodes`}),e[75]=R):R=e[75],e[76]===m.length?C=e[77]:(C=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[R,(0,V.jsx)(`span`,{children:m.length})]}),e[76]=m.length,e[77]=C);let z;e[78]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Instances`}),e[78]=z):z=e[78],e[79]===te.length?w=e[80]:(w=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[z,(0,V.jsx)(`span`,{children:te.length})]}),e[79]=te.length,e[80]=w);let B;e[81]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`vCPU`}),e[81]=B):B=e[81],e[82]!==ae||e[83]!==ie?(T=(0,V.jsxs)(`div`,{className:`flex justify-between`,children:[B,(0,V.jsxs)(`span`,{children:[ae,` / `,ie]})]}),e[82]=ae,e[83]=ie,e[84]=T):T=e[84],I=`flex justify-between`,e[85]===Symbol.for(`react.memo_cache_sentinel`)?(b=(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:`Memory`}),e[85]=b):b=e[85],A=r.toFixed(1),P=` / `,F=t.toFixed(1),e[12]=ae,e[13]=re,e[14]=g,e[15]=m,e[16]=_,e[17]=ie,e[18]=n.arch,e[19]=n.commit,e[20]=n.os,e[21]=n.version,e[22]=te.length,e[23]=oe,e[24]=se,e[25]=b,e[26]=x,e[27]=S,e[28]=C,e[29]=w,e[30]=T,e[31]=E,e[32]=ce,e[33]=D,e[34]=O,e[35]=k,e[36]=A,e[37]=P,e[38]=F,e[39]=I}else oe=e[23],se=e[24],b=e[25],x=e[26],S=e[27],C=e[28],w=e[29],T=e[30],E=e[31],ce=e[32],D=e[33],O=e[34],k=e[35],A=e[36],P=e[37],F=e[38],I=e[39];let R;e[86]!==A||e[87]!==P||e[88]!==F?(R=(0,V.jsxs)(`span`,{children:[A,P,F,` GB`]}),e[86]=A,e[87]=P,e[88]=F,e[89]=R):R=e[89];let H;e[90]!==b||e[91]!==R||e[92]!==I?(H=(0,V.jsxs)(`div`,{className:I,children:[b,R]}),e[90]=b,e[91]=R,e[92]=I,e[93]=H):H=e[93];let U;e[94]!==oe||e[95]!==x||e[96]!==S||e[97]!==C||e[98]!==w||e[99]!==T||e[100]!==H?(U=(0,V.jsxs)(oe,{className:x,children:[S,C,w,T,H]}),e[94]=oe,e[95]=x,e[96]=S,e[97]=C,e[98]=w,e[99]=T,e[100]=H,e[101]=U):U=e[101];let W;e[102]!==se||e[103]!==E||e[104]!==U?(W=(0,V.jsxs)(se,{children:[E,U]}),e[102]=se,e[103]=E,e[104]=U,e[105]=W):W=e[105];let G;e[106]!==ce||e[107]!==D||e[108]!==O||e[109]!==W?(G=(0,V.jsxs)(`div`,{className:ce,children:[D,O,W]}),e[106]=ce,e[107]=D,e[108]=O,e[109]=W,e[110]=G):G=e[110];let K;e[111]!==m||e[112]!==a?(K=m.length>0&&(0,V.jsxs)(N,{children:[(0,V.jsx)(j,{className:`pb-0`,children:(0,V.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 text-sm font-medium`,onClick:()=>o(!a),children:[a?(0,V.jsx)(c,{className:`size-3.5`}):(0,V.jsx)(l,{className:`size-3.5`}),`Nodes (`,m.length,`)`]})}),a&&(0,V.jsx)(M,{className:`pt-2`,children:(0,V.jsx)(ye,{nodes:m})})]}),e[111]=m,e[112]=a,e[113]=K):K=e[113];let be;e[114]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,V.jsx)(j,{className:`pb-2`,children:(0,V.jsx)(fe,{className:`text-sm`,children:`Commercial Add-ons`})}),e[114]=be):be=e[114];let q;e[115]===g?q=e[116]:(q=me.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center justify-between text-xs`,children:[(0,V.jsx)(`span`,{className:g?`text-muted-foreground`:void 0,children:e.name}),g?(0,V.jsx)(L,{className:`size-3 text-muted-foreground`}):(0,V.jsx)(de,{variant:`outline`,className:`text-[0.625rem]`,children:`Active`})]},e.key)),e[115]=g,e[116]=q);let J;e[117]===q?J=e[118]:(J=(0,V.jsx)(`div`,{className:`space-y-2`,children:q}),e[117]=q,e[118]=J);let xe;e[119]===g?xe=e[120]:(xe=g&&(0,V.jsx)(`a`,{href:`https://mulgadc.com/purchase`,target:`_blank`,rel:`noopener noreferrer`,className:`mt-3 block text-xs font-medium text-primary hover:underline`,children:`Learn more about commercial features →`}),e[119]=g,e[120]=xe);let Se;e[121]!==J||e[122]!==xe?(Se=(0,V.jsxs)(N,{children:[be,(0,V.jsxs)(M,{children:[J,xe]})]}),e[121]=J,e[122]=xe,e[123]=Se):Se=e[123];let Y;return e[124]!==k||e[125]!==G||e[126]!==K||e[127]!==Se?(Y=(0,V.jsxs)(`div`,{className:k,children:[G,K,Se]}),e[124]=k,e[125]=G,e[126]=K,e[127]=Se,e[128]=Y):Y=e[128],Y}function he(e,t){return e+t.alloc_mem_gb}function ge(e,t){return e+t.total_mem_gb}function _e(e,t){return e+t.alloc_vcpu}function ve(e,t){return e+t.total_vcpu}function ye(e){let t=(0,z.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,V.jsx)(`thead`,{children:(0,V.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,V.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,V.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(W),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,V.jsx)(`div`,{className:`overflow-x-auto`,children:(0,V.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,V.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function W(e){return(0,V.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,V.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,V.jsx)(de,{variant:e.status===`Ready`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,V.jsxs)(`div`,{className:`flex gap-1`,children:[e.nats_role&&(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[`nats:`,e.nats_role]}),e.predastore_role&&(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[`ps:`,e.predastore_role]})]})}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:H(e.uptime)}),(0,V.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,V.jsx)(`td`,{className:`py-1.5`,children:(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.services.length})})]},e.node)}var G=`console.spx3.com`,K=`spinifex:v1:sandbox-welcome`,be=[{to:`/ec2/run-instances`,icon:(0,V.jsx)(h,{className:`size-3.5`}),label:`Launch an instance`,hint:`Boot a VM on real hardware`},{to:`/s3/ls`,icon:(0,V.jsx)(I,{className:`size-3.5`}),label:`Create a bucket`,hint:`S3-compatible object storage`},{to:`/ec2/describe-vpcs`,icon:(0,V.jsx)(u,{className:`size-3.5`}),label:`Networking`,hint:`VPCs, subnets and security groups`},{to:`/eks/list-clusters`,icon:(0,V.jsx)(R,{className:`size-3.5`}),label:`Kubernetes`,hint:`Managed EKS-compatible clusters`},{to:`/iam/list-users`,icon:(0,V.jsx)(m,{className:`size-3.5`}),label:`Access keys`,hint:`Credentials for the AWS CLI and SDKs`}];function q(){try{return localStorage.getItem(K)!==null}catch{}return!1}function J(){try{localStorage.setItem(K,`1`)}catch{}}function xe(){let e=(0,z.c)(7),[t,n]=(0,B.useState)(Se),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=e=>{e||J(),n(e)},e[0]=r):r=e[0];let i=r,o;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,V.jsxs)(ce,{children:[(0,V.jsx)(S,{children:(0,V.jsx)(F,{className:`text-primary`})}),(0,V.jsx)(w,{children:`Welcome to the Mulga sandbox`}),(0,V.jsx)(x,{children:`You have a real account on a shared evaluation cluster. The APIs are the AWS ones, so the CLI and the SDKs work against it unchanged. Resources here may be reclaimed, so please don't keep anything you need in it.`})]}),e[1]=o):o=e[1];let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsx)(`div`,{className:`space-y-0.5`,children:be.map(e=>(0,V.jsxs)(a,{className:`flex items-center gap-2 rounded-md px-2 py-1.5 text-xs hover:bg-muted`,onClick:()=>i(!1),to:e.to,children:[e.icon,(0,V.jsx)(`span`,{className:`font-medium`,children:e.label}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.hint})]},e.to))}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(`a`,{className:`text-xs text-muted-foreground underline underline-offset-3 hover:text-foreground sm:mr-auto sm:self-center`,href:`https://docs.mulgadc.com`,rel:`noreferrer`,target:`_blank`,children:`Read the docs`}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,V.jsxs)(C,{className:`max-w-lg`,children:[o,s,(0,V.jsxs)(E,{children:[c,(0,V.jsx)(T,{onClick:()=>i(!1),children:`Get started`})]})]}),e[4]=l):l=e[4];let u;return e[5]===t?u=e[6]:(u=(0,V.jsx)(D,{onOpenChange:i,open:t,children:l}),e[5]=t,e[6]=u),u}function Se(){return window.location.hostname===G&&!q()}var Y=5;function Ce(){let e=(0,z.c)(12),t,n,r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(b,{title:`Dashboard`}),n=(0,V.jsx)(xe,{}),r=(0,V.jsx)(U,{}),e[0]=t,e[1]=n,e[2]=r):(t=e[0],n=e[1],r=e[2]);let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(we,{})}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(je,{})}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(Ie,{})}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(Re,{})}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(Be,{})}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(He,{})}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(We,{})}),e[9]=u):u=e[9];let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(Je,{})}),e[10]=d):d=e[10];let f;return e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,V.jsxs)(V.Fragment,{children:[t,n,r,(0,V.jsxs)(`div`,{className:`grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3`,children:[i,a,o,s,c,l,u,d,(0,V.jsx)(B.Suspense,{fallback:(0,V.jsx)(X,{}),children:(0,V.jsx)(Ke,{})})]})]}),e[11]=f):f=e[11],f}function X(){let e=(0,z.c)(2),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,V.jsx)(j,{children:(0,V.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded bg-muted`})}),e[0]=t):t=e[0];let n;return e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsxs)(N,{children:[t,(0,V.jsx)(M,{children:(0,V.jsxs)(`div`,{className:`space-y-2`,children:[(0,V.jsx)(`div`,{className:`h-3 w-48 animate-pulse rounded bg-muted`}),(0,V.jsx)(`div`,{className:`h-3 w-36 animate-pulse rounded bg-muted`})]})})]}),e[1]=n):n=e[1],n}function Z(e){let t=(0,z.c)(16),{title:n,icon:r,count:i,to:o,children:s}=e,c;t[0]!==r||t[1]!==n?(c=(0,V.jsxs)(fe,{className:`flex items-center gap-2`,children:[r,n]}),t[0]=r,t[1]=n,t[2]=c):c=t[2];let l;t[3]===i?l=t[4]:(l=(0,V.jsx)(A,{children:(0,V.jsx)(`span`,{className:`rounded-md bg-muted px-2 py-0.5 text-xs font-semibold tabular-nums`,children:i})}),t[3]=i,t[4]=l);let u;t[5]!==c||t[6]!==l?(u=(0,V.jsxs)(j,{children:[c,l]}),t[5]=c,t[6]=l,t[7]=u):u=t[7];let d;t[8]===s?d=t[9]:(d=(0,V.jsx)(M,{children:s}),t[8]=s,t[9]=d);let f;t[10]===o?f=t[11]:(f=(0,V.jsx)(k,{children:(0,V.jsx)(a,{to:o,className:`text-xs font-medium text-primary hover:underline`,children:`View all →`})}),t[10]=o,t[11]=f);let p;return t[12]!==u||t[13]!==d||t[14]!==f?(p=(0,V.jsxs)(N,{children:[u,d,f]}),t[12]=u,t[13]=d,t[14]=f,t[15]=p):p=t[15],p}function Q(e){let t=(0,z.c)(2),{total:n}=e;if(n<=Y)return null;let r=n-Y,i;return t[0]===r?i=t[1]:(i=(0,V.jsxs)(`p`,{className:`mt-1 text-[0.625rem] text-muted-foreground`,children:[`+`,r,` more`]}),t[0]=r,t[1]=i),i}function $(e){let t=(0,z.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,V.jsx)(`div`,{className:`flex items-center justify-between py-0.5 text-xs`,children:n}),t[0]=n,t[1]=r),r}function we(){let e=(0,z.c)(16),{data:t}=i(ie),n,r,a,o,s;if(e[0]!==t?.Reservations){let i=t?.Reservations?.flatMap(Ae)??[];n=i.filter(ke),a=i.filter(Oe),o=i.filter(De),r=i.filter(Ee),s=[...a,...r].slice(0,Y),e[0]=t?.Reservations,e[1]=n,e[2]=r,e[3]=a,e[4]=o,e[5]=s}else n=e[1],r=e[2],a=e[3],o=e[4],s=e[5];let c=s,l;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,V.jsx)(h,{className:`size-3.5`}),e[6]=l):l=e[6];let u;e[7]!==n.length||e[8]!==c||e[9]!==r||e[10]!==a||e[11]!==o?(u=n.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`mb-2 flex gap-3 text-[0.625rem] text-muted-foreground`,children:[(0,V.jsxs)(`span`,{children:[a.length,` running`]}),(0,V.jsxs)(`span`,{children:[o.length,` stopped`]})]}),(0,V.jsx)(`div`,{className:`space-y-0.5`,children:c.map(Te)}),(0,V.jsx)(Q,{total:a.length+r.length})]}),e[7]=n.length,e[8]=c,e[9]=r,e[10]=a,e[11]=o,e[12]=u):u=e[12];let d;return e[13]!==n.length||e[14]!==u?(d=(0,V.jsx)(Z,{title:`Instances`,icon:l,count:n.length,to:`/ec2/describe-instances`,children:u}),e[13]=n.length,e[14]=u,e[15]=d):d=e[15],d}function Te(e){return(0,V.jsxs)($,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.InstanceId}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.InstanceType})]},e.InstanceId)}function Ee(e){return e.State?.Name===`pending`}function De(e){return e.State?.Name===`stopped`}function Oe(e){return e.State?.Name===`running`}function ke(e){return e.State?.Name!==`terminated`}function Ae(e){return e.Instances??[]}function je(){let e=(0,z.c)(14),{data:t}=i(re),n;e[0]===t?.Volumes?n=e[1]:(n=t?.Volumes??[],e[0]=t?.Volumes,e[1]=n);let r=n,a;e[2]===r?a=e[3]:(a=r.reduce(Fe,0),e[2]=r,e[3]=a);let o=a,s;e[4]===r?s=e[5]:(s=r.filter(Pe),e[4]=r,e[5]=s);let c=s,l;e[6]===r?l=e[7]:(l=r.filter(Ne),e[6]=r,e[7]=l);let u=l,d;if(e[8]!==u||e[9]!==c||e[10]!==o||e[11]!==r){let t=r.slice(0,Y),n;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(P,{className:`size-3.5`}),e[13]=n):n=e[13],d=(0,V.jsx)(Z,{title:`Volumes`,icon:n,count:r.length,to:`/ec2/describe-volumes`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No volumes`}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`mb-2 flex gap-3 text-[0.625rem] text-muted-foreground`,children:[(0,V.jsxs)(`span`,{children:[o,` GiB total`]}),(0,V.jsxs)(`span`,{children:[c.length,` in-use`]}),(0,V.jsxs)(`span`,{children:[u.length,` available`]})]}),(0,V.jsx)(`div`,{className:`space-y-0.5`,children:t.map(Me)}),(0,V.jsx)(Q,{total:r.length})]})}),e[8]=u,e[9]=c,e[10]=o,e[11]=r,e[12]=d}else d=e[12];return d}function Me(e){return(0,V.jsxs)($,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.VolumeId}),(0,V.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,V.jsxs)(`span`,{className:`text-muted-foreground`,children:[e.Size,` GiB`]}),(0,V.jsx)(O,{state:e.State})]})]},e.VolumeId)}function Ne(e){return e.State===`available`}function Pe(e){return e.State===`in-use`}function Fe(e,t){return e+(t.Size??0)}function Ie(){let e=(0,z.c)(5),{data:t}=i(g),n;e[0]===t?.Vpcs?n=e[1]:(n=t?.Vpcs??[],e[0]=t?.Vpcs,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(u,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,V.jsx)(Z,{title:`VPCs`,icon:n,count:r.length,to:`/ec2/describe-vpcs`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No VPCs`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Le),(0,V.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Le(e){let t=o(e.Tags);return(0,V.jsxs)($,{children:[(0,V.jsxs)(`span`,{className:`font-mono`,children:[e.VpcId,t&&(0,V.jsxs)(`span`,{className:`ml-1 font-sans text-muted-foreground`,children:[`(`,t,`)`]})]}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.CidrBlock})]},e.VpcId)}function Re(){let e=(0,z.c)(5),{data:t}=i(ae),n;e[0]===t?.KeyPairs?n=e[1]:(n=t?.KeyPairs??[],e[0]=t?.KeyPairs,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(m,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,V.jsx)(Z,{title:`Key Pairs`,icon:n,count:r.length,to:`/ec2/describe-key-pairs`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No key pairs`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(ze),(0,V.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function ze(e){return(0,V.jsx)($,{children:(0,V.jsx)(`span`,{className:`font-mono`,children:e.KeyName})},e.KeyPairId)}function Be(){let e=(0,z.c)(5),{data:t}=i(se),n;e[0]===t?.Buckets?n=e[1]:(n=t?.Buckets??[],e[0]=t?.Buckets,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(I,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,V.jsx)(Z,{title:`S3 Buckets`,icon:n,count:r.length,to:`/s3/ls`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No buckets`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ve),(0,V.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ve(e){return(0,V.jsx)($,{children:(0,V.jsx)(`span`,{className:`font-mono`,children:e.Name})},e.Name)}function He(){let e=(0,z.c)(5),{data:t}=i(oe),n;e[0]===t?.SecurityGroups?n=e[1]:(n=t?.SecurityGroups??[],e[0]=t?.SecurityGroups,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(p,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,V.jsx)(Z,{title:`Security Groups`,icon:n,count:r.length,to:`/ec2/describe-security-groups`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ue),(0,V.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ue(e){return(0,V.jsxs)($,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.GroupName}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.VpcId})]},e.GroupId)}function We(){let e=(0,z.c)(5),{data:t}=i(_),n;e[0]===t?.NatGateways?n=e[1]:(n=t?.NatGateways??[],e[0]=t?.NatGateways,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(te,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,V.jsx)(Z,{title:`NAT Gateways`,icon:n,count:r.length,to:`/ec2/describe-nat-gateways`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No NAT gateways`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ge),(0,V.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ge(e){return(0,V.jsxs)($,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.NatGatewayId}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.State})]},e.NatGatewayId)}function Ke(){let e=(0,z.c)(5),{data:t}=i(v),n;e[0]===t?.InternetGateways?n=e[1]:(n=t?.InternetGateways??[],e[0]=t?.InternetGateways,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(f,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,V.jsx)(Z,{title:`Internet Gateways`,icon:n,count:r.length,to:`/ec2/describe-internet-gateways`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No internet gateways`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(qe),(0,V.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function qe(e){return(0,V.jsxs)($,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.InternetGatewayId}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.Attachments?.[0]?.VpcId?`attached`:`detached`})]},e.InternetGatewayId)}function Je(){let e=(0,z.c)(5),{data:t}=i(y),n;e[0]===t?.Addresses?n=e[1]:(n=t?.Addresses??[],e[0]=t?.Addresses,e[1]=n);let r=n,a;if(e[2]!==r){let t=r.slice(0,Y),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,V.jsx)(d,{className:`size-3.5`}),e[4]=n):n=e[4],a=(0,V.jsx)(Z,{title:`Elastic IPs`,icon:n,count:r.length,to:`/ec2/describe-addresses`,children:r.length===0?(0,V.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No Elastic IPs`}):(0,V.jsxs)(`div`,{className:`space-y-0.5`,children:[t.map(Ye),(0,V.jsx)(Q,{total:r.length})]})}),e[2]=r,e[3]=a}else a=e[3];return a}function Ye(e){return(0,V.jsxs)($,{children:[(0,V.jsx)(`span`,{className:`font-mono`,children:e.PublicIp}),(0,V.jsx)(`span`,{className:`text-muted-foreground`,children:e.AssociationId?`associated`:`available`})]},e.AllocationId)}export{Ce as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName3.js b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName3.js index 89c2572eb..6450e7876 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName3.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName3.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./link.js";import{t as s}from"./useNavigate.js";import{t as c}from"./back-link.js";import{t as l}from"./trash-2.js";import{t as u}from"./button.js";import{t as d}from"./input.js";import{O as f,c as p,p as m,w as h}from"./ec2.js";import{i as g,r as _,s as v,t as y}from"./ecs.js";import{i as b,l as x,o as S,r as C,u as w}from"./ecs2.js";import{t as T}from"./_clusterName2.js";import{t as ee}from"./error-banner.js";import{t as E}from"./page-heading.js";import{a as D,t as O}from"./field.js";import{a as k,i as A,l as j,n as te,o as M,r as N,s as P,t as F}from"./alert-dialog.js";import{t as I}from"./delete-confirmation-dialog.js";import{n as L,t as R}from"./detail-row.js";import{t as z}from"./state-badge.js";import{t as B}from"./gpu-instance-type-select.js";import{i as V,n as ne,r as H,t as re}from"./tabs.js";var U=r(),W=e(n(),1),G=t(),K=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function q({clusterName:e,open:t,onOpenChange:n}){let r=S(),{data:a}=i(f),{data:o}=i(h),{data:s}=i(m),{data:c}=i(p),l=a?.Subnets??[],u=o?.SecurityGroups??[],g=s?.KeyPairs??[],_=c?.InstanceTypes??[],[v,y]=(0,W.useState)(`t3.small`),[b,x]=(0,W.useState)(1),[C,w]=(0,W.useState)(``),[T,E]=(0,W.useState)(``),[I,L]=(0,W.useState)(``);function R(e){e||(y(`t3.small`),x(1),w(``),E(``),L(``),r.reset()),n(e)}async function z(){try{await r.mutateAsync({Cluster:e,InstanceType:v||void 0,Count:b,SubnetID:C,SecurityGroupID:T,KeyName:I||void 0}),R(!1)}catch{}}let V=r.isPending||C===``||T===``;return(0,G.jsx)(F,{onOpenChange:R,open:t,children:(0,G.jsxs)(A,{className:`max-h-[85vh] overflow-y-auto`,children:[(0,G.jsxs)(P,{children:[(0,G.jsx)(j,{children:`Provision EC2 capacity`}),(0,G.jsxs)(k,{children:[`Launch container instances into cluster “`,e,`”. They register automatically once booted.`]})]}),(0,G.jsxs)(`div`,{className:`space-y-4`,children:[(0,G.jsxs)(O,{children:[(0,G.jsx)(D,{children:(0,G.jsx)(`label`,{htmlFor:`provision-instance-type`,children:`Instance type`})}),(0,G.jsx)(B,{id:`provision-instance-type`,instanceTypes:_,onValueChange:y,value:v})]}),(0,G.jsxs)(O,{children:[(0,G.jsx)(D,{children:(0,G.jsx)(`label`,{htmlFor:`provision-count`,children:`Count`})}),(0,G.jsx)(d,{id:`provision-count`,max:10,min:1,onChange:e=>x(Number(e.target.value)),type:`number`,value:b})]}),(0,G.jsxs)(O,{children:[(0,G.jsx)(D,{children:(0,G.jsx)(`label`,{htmlFor:`provision-subnet`,children:`Subnet`})}),(0,G.jsxs)(`select`,{className:K,id:`provision-subnet`,onChange:e=>w(e.target.value),value:C,children:[(0,G.jsx)(`option`,{value:``,children:`Select a subnet`}),l.map(e=>(0,G.jsxs)(`option`,{value:e.SubnetId??``,children:[e.SubnetId,` (`,e.CidrBlock,e.AvailabilityZone?`, ${e.AvailabilityZone}`:``,`)`]},e.SubnetId))]})]}),(0,G.jsxs)(O,{children:[(0,G.jsx)(D,{children:(0,G.jsx)(`label`,{htmlFor:`provision-sg`,children:`Security group`})}),(0,G.jsxs)(`select`,{className:K,id:`provision-sg`,onChange:e=>E(e.target.value),value:T,children:[(0,G.jsx)(`option`,{value:``,children:`Select a security group`}),u.map(e=>(0,G.jsxs)(`option`,{value:e.GroupId??``,children:[e.GroupId,` (`,e.GroupName,`)`]},e.GroupId))]})]}),(0,G.jsxs)(O,{children:[(0,G.jsx)(D,{children:(0,G.jsx)(`label`,{htmlFor:`provision-key`,children:`Key pair`})}),(0,G.jsxs)(`select`,{className:K,id:`provision-key`,onChange:e=>L(e.target.value),value:I,children:[(0,G.jsx)(`option`,{value:``,children:`None`}),g.map(e=>(0,G.jsx)(`option`,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId))]})]})]}),r.error&&(0,G.jsx)(ee,{error:r.error instanceof Error?r.error:void 0,msg:`Failed to provision capacity.`}),(0,G.jsxs)(M,{children:[(0,G.jsx)(N,{children:`Cancel`}),(0,G.jsx)(te,{disabled:V,onClick:e=>{e.preventDefault(),z()},children:r.isPending?`Provisioning…`:`Provision`})]})]})})}var J={drain:`Drain`,activate:`Activate`,deregister:`Deregister`},Y={drain:`Draining force-stops the service-owned tasks on this instance so it can be retired.`,activate:`This returns the instance to ACTIVE so the scheduler can place tasks on it again.`,deregister:`This force-removes the container instance record. Any tasks it still holds are stopped.`};function ie(e){let t=(0,U.c)(28),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=_(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=w(),s=b(),[c,l]=(0,W.useState)(null),[d,f]=(0,W.useState)(!1),p;t[2]!==n||t[3]!==s||t[4]!==c||t[5]!==o?(p=function(){if(!c)return;let e=()=>l(null);if(c.action===`deregister`){s.mutate({cluster:n,containerInstance:c.arn},{onSuccess:e});return}o.mutate({cluster:n,containerInstance:c.arn,status:c.action===`drain`?`DRAINING`:`ACTIVE`},{onSuccess:e})},t[2]=n,t[3]=s,t[4]=c,t[5]=o,t[6]=p):p=t[6];let m=p,h=o.isError||s.isError,g=o.error??s.error,v=o.isPending||s.isPending,y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,G.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,G.jsx)(u,{onClick:()=>f(!0),size:`sm`,children:`Provision EC2 capacity`})}),t[7]=y):y=t[7];let x;t[8]!==g||t[9]!==h?(x=h&&(0,G.jsx)(ee,{error:g instanceof Error?g:void 0,msg:`Container instance action failed.`}),t[8]=g,t[9]=h,t[10]=x):x=t[10];let S;t[11]===i?S=t[12]:(S=i.length===0?(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:`No container instances found.`}):(0,G.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`EC2 Instance`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,G.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,G.jsx)(`tbody`,{children:i.map(e=>{let t=e.containerInstanceArn??``,n=e.status===`DRAINING`;return(0,G.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,G.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.ec2InstanceId}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:(0,G.jsx)(z,{state:e.status})}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:e.runningTasksCount??0}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingTasksCount??0}),(0,G.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,G.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,G.jsx)(u,{"aria-label":n?`Activate container instance`:`Drain container instance`,onClick:()=>l({arn:t,action:n?`activate`:`drain`}),size:`sm`,variant:`outline`,children:n?`Activate`:`Drain`}),(0,G.jsx)(u,{onClick:()=>l({arn:t,action:`deregister`}),size:`sm`,variant:`destructive`,children:`Deregister`})]})})]},t)})})]})}),t[11]=i,t[12]=S);let C;t[13]!==n||t[14]!==d?(C=(0,G.jsx)(q,{clusterName:n,onOpenChange:f,open:d}),t[13]=n,t[14]=d,t[15]=C):C=t[15];let T=c?J[c.action]:`Confirm`,E=c?Y[c.action]:``,D;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>!e&&l(null),t[16]=D):D=t[16];let O=c!==null,k;t[17]!==m||t[18]!==v||t[19]!==O||t[20]!==T||t[21]!==E?(k=(0,G.jsx)(I,{confirmLabel:T,description:E,isPending:v,onConfirm:m,onOpenChange:D,open:O,title:`Container instance`}),t[17]=m,t[18]=v,t[19]=O,t[20]=T,t[21]=E,t[22]=k):k=t[22];let A;return t[23]!==k||t[24]!==x||t[25]!==S||t[26]!==C?(A=(0,G.jsxs)(G.Fragment,{children:[y,x,S,C,k]}),t[23]=k,t[24]=x,t[25]=S,t[26]=C,t[27]=A):A=t[27],A}function X(e){return e?.split(`/`).at(-1)??``}function ae(e){let t=(0,U.c)(13),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=g(n),t[0]=n,t[1]=r);let{data:i}=a(r),s;t[2]===n?s=t[3]:(s={cluster:n},t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,G.jsx)(u,{size:`sm`,children:`Create service`}),t[4]=c):c=t[4];let l;t[5]===s?l=t[6]:(l=(0,G.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,G.jsx)(o,{search:s,to:`/ecs/create-service`,children:c})}),t[5]=s,t[6]=l);let d;t[7]!==n||t[8]!==i?(d=i.length===0?(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:`No services found.`}):(0,G.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`})]})}),(0,G.jsx)(`tbody`,{children:i.map(e=>(0,G.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,G.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,G.jsx)(o,{className:`underline`,params:{clusterName:n,serviceName:e.serviceName??``},to:`/ecs/list-clusters/$clusterName/services/$serviceName`,children:e.serviceName})}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:(0,G.jsx)(z,{state:e.status})}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0}),(0,G.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:X(e.taskDefinition)})]},e.serviceArn??e.serviceName))})]})}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let f;return t[10]!==l||t[11]!==d?(f=(0,G.jsxs)(G.Fragment,{children:[l,d]}),t[10]=l,t[11]=d,t[12]=f):f=t[12],f}function Z(e){return e?.split(`/`).at(-1)??``}function oe(e){let t=(0,U.c)(27),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=v(n),t[0]=n,t[1]=r);let{data:i}=a(r),s=x(),[c,l]=(0,W.useState)(null),d;t[2]!==n||t[3]!==c||t[4]!==s?(d=function(){c&&s.mutate({cluster:n,task:c},{onSuccess:()=>l(null)})},t[2]=n,t[3]=c,t[4]=s,t[5]=d):d=t[5];let f=d,p;t[6]===n?p=t[7]:(p={cluster:n},t[6]=n,t[7]=p);let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,G.jsx)(u,{size:`sm`,children:`Run task`}),t[8]=m):m=t[8];let h;t[9]===p?h=t[10]:(h=(0,G.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,G.jsx)(o,{search:p,to:`/ecs/run-task`,children:m})}),t[9]=p,t[10]=h);let g;t[11]!==s.error||t[12]!==s.isError?(g=s.isError&&(0,G.jsx)(ee,{error:s.error instanceof Error?s.error:void 0,msg:`Failed to stop task.`}),t[11]=s.error,t[12]=s.isError,t[13]=g):g=t[13];let _;t[14]!==n||t[15]!==i?(_=i.length===0?(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,G.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired Status`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Group`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,G.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,G.jsx)(`tbody`,{children:i.map(e=>{let t=Z(e.taskArn),r=e.lastStatus!==`STOPPED`;return(0,G.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,G.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,G.jsx)(o,{className:`underline`,params:{clusterName:n,taskId:t},to:`/ecs/list-clusters/$clusterName/tasks/$taskId`,children:t})}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:(0,G.jsx)(z,{state:e.lastStatus})}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredStatus}),(0,G.jsx)(`td`,{className:`px-4 py-2`,children:e.group}),(0,G.jsx)(`td`,{className:`px-4 py-2 text-right`,children:r&&(0,G.jsx)(u,{onClick:()=>l(e.taskArn??t),size:`sm`,variant:`destructive`,children:`Stop`})})]},t)})})]})}),t[14]=n,t[15]=i,t[16]=_):_=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&l(null),t[17]=y):y=t[17];let b=c!==null,S;t[18]!==f||t[19]!==s.isPending||t[20]!==b?(S=(0,G.jsx)(I,{confirmLabel:`Stop task`,description:`This stops the task and releases its ENI and reserved capacity.`,isPending:s.isPending,onConfirm:f,onOpenChange:y,open:b,pendingLabel:`Stopping…`,title:`Stop task`}),t[18]=f,t[19]=s.isPending,t[20]=b,t[21]=S):S=t[21];let C;return t[22]!==S||t[23]!==h||t[24]!==g||t[25]!==_?(C=(0,G.jsxs)(G.Fragment,{children:[h,g,_,S]}),t[22]=S,t[23]=h,t[24]=g,t[25]=_,t[26]=C):C=t[26],C}function Q(e){let t=(0,U.c)(70),{clusterName:n}=e,r=s(),[i,o]=(0,W.useState)(!1),d;t[0]===n?d=t[1]:(d=y(n),t[0]=n,t[1]=d);let{data:f}=a(d),p=C(),m;t[2]!==n||t[3]!==p||t[4]!==r?(m=function(){p.mutate(n,{onSuccess:()=>{r({to:`/ecs/list-clusters`})}})},t[2]=n,t[3]=p,t[4]=r,t[5]=m):m=t[5];let h=m;if(!f){let e;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(c,{to:`/ecs/list-clusters`,children:`Clusters`}),t[6]=e):e=t[6];let r;t[7]===n?r=t[8]:(r=(0,G.jsx)(E,{subtitle:`Cluster Details`,title:n}),t[7]=n,t[8]=r);let i;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:`Cluster not found.`}),t[9]=i):i=t[9];let a;return t[10]===r?a=t[11]:(a=(0,G.jsxs)(G.Fragment,{children:[e,r,i]}),t[10]=r,t[11]=a),a}let g;t[12]===f.tags?g=t[13]:(g=f.tags??[],t[12]=f.tags,t[13]=g);let _=g,v;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,G.jsx)(c,{to:`/ecs/list-clusters`,children:`Clusters`}),t[14]=v):v=t[14];let b;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>o(!0),t[15]=b):b=t[15];let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,G.jsxs)(u,{onClick:b,size:`sm`,variant:`destructive`,children:[(0,G.jsx)(l,{className:`size-4`}),`Delete`]}),t[16]=x):x=t[16];let S;t[17]===f.status?S=t[18]:(S=(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x,(0,G.jsx)(z,{state:f.status})]}),t[17]=f.status,t[18]=S);let w;t[19]!==n||t[20]!==S?(w=(0,G.jsx)(E,{actions:S,subtitle:`Cluster Details`,title:n}),t[19]=n,t[20]=S,t[21]=w):w=t[21];let T;t[22]!==p.error||t[23]!==p.isError?(T=p.isError&&(0,G.jsx)(ee,{error:p.error instanceof Error?p.error:void 0,msg:`Failed to delete cluster.`}),t[22]=p.error,t[23]=p.isError,t[24]=T):T=t[24];let D;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,G.jsx)(L.Header,{children:`Overview`}),t[25]=D):D=t[25];let O;t[26]===f.clusterArn?O=t[27]:(O=(0,G.jsx)(R,{label:`ARN`,value:f.clusterArn}),t[26]=f.clusterArn,t[27]=O);let k;t[28]===f.status?k=t[29]:(k=(0,G.jsx)(R,{label:`Status`,value:f.status}),t[28]=f.status,t[29]=k);let A=String(f.activeServicesCount??0),j;t[30]===A?j=t[31]:(j=(0,G.jsx)(R,{label:`Active services`,value:A}),t[30]=A,t[31]=j);let te=String(f.runningTasksCount??0),M;t[32]===te?M=t[33]:(M=(0,G.jsx)(R,{label:`Running tasks`,value:te}),t[32]=te,t[33]=M);let N=String(f.pendingTasksCount??0),P;t[34]===N?P=t[35]:(P=(0,G.jsx)(R,{label:`Pending tasks`,value:N}),t[34]=N,t[35]=P);let F=String(f.registeredContainerInstancesCount??0),B;t[36]===F?B=t[37]:(B=(0,G.jsx)(R,{label:`Registered instances`,value:F}),t[36]=F,t[37]=B);let K;t[38]!==O||t[39]!==k||t[40]!==j||t[41]!==M||t[42]!==P||t[43]!==B?(K=(0,G.jsxs)(L,{children:[D,(0,G.jsxs)(L.Content,{children:[O,k,j,M,P,B]})]}),t[38]=O,t[39]=k,t[40]=j,t[41]=M,t[42]=P,t[43]=B,t[44]=K):K=t[44];let q;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,G.jsxs)(ne,{children:[(0,G.jsx)(V,{value:`services`,children:`Services`}),(0,G.jsx)(V,{value:`tasks`,children:`Tasks`}),(0,G.jsx)(V,{value:`infrastructure`,children:`Infrastructure`}),(0,G.jsx)(V,{value:`tags`,children:`Tags`})]}),t[45]=q):q=t[45];let J;t[46]===n?J=t[47]:(J=(0,G.jsx)(H,{value:`services`,children:(0,G.jsx)(ae,{clusterName:n})}),t[46]=n,t[47]=J);let Y;t[48]===n?Y=t[49]:(Y=(0,G.jsx)(H,{value:`tasks`,children:(0,G.jsx)(oe,{clusterName:n})}),t[48]=n,t[49]=Y);let X;t[50]===n?X=t[51]:(X=(0,G.jsx)(H,{value:`infrastructure`,children:(0,G.jsx)(ie,{clusterName:n})}),t[50]=n,t[51]=X);let Z;t[52]===_?Z=t[53]:(Z=(0,G.jsx)(H,{value:`tags`,children:_.length===0?(0,G.jsx)(`p`,{className:`text-muted-foreground`,children:`No tags.`}):(0,G.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,G.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,G.jsx)(`thead`,{children:(0,G.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Key`}),(0,G.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Value`})]})}),(0,G.jsx)(`tbody`,{children:_.map(se)})]})})}),t[52]=_,t[53]=Z);let Q;t[54]!==J||t[55]!==Y||t[56]!==X||t[57]!==Z?(Q=(0,G.jsxs)(re,{className:`mt-6`,defaultValue:`services`,children:[q,J,Y,X,Z]}),t[54]=J,t[55]=Y,t[56]=X,t[57]=Z,t[58]=Q):Q=t[58];let ce=`This permanently deletes cluster "${n}" and force-stops every task it holds. This cannot be undone.`,$;t[59]!==p.isPending||t[60]!==h||t[61]!==i||t[62]!==ce?($=(0,G.jsx)(I,{description:ce,isPending:p.isPending,onConfirm:h,onOpenChange:o,open:i,title:`Delete cluster`}),t[59]=p.isPending,t[60]=h,t[61]=i,t[62]=ce,t[63]=$):$=t[63];let le;return t[64]!==K||t[65]!==Q||t[66]!==$||t[67]!==w||t[68]!==T?(le=(0,G.jsxs)(G.Fragment,{children:[v,w,T,K,Q,$]}),t[64]=K,t[65]=Q,t[66]=$,t[67]=w,t[68]=T,t[69]=le):le=t[69],le}function se(e){return(0,G.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,G.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.key}),(0,G.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.value})]},e.key)}function ce(){let e=(0,U.c)(2),{clusterName:t}=T.useParams(),n;return e[0]===t?n=e[1]:(n=(0,G.jsx)(Q,{clusterName:t}),e[0]=t,e[1]=n),n}export{ce as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./link.js";import{t as s}from"./useNavigate.js";import{t as c}from"./back-link.js";import{t as l}from"./trash-2.js";import{t as u}from"./button.js";import{t as d}from"./input.js";import{O as f,c as p,p as m,w as h}from"./ec2.js";import{i as g,r as _,s as v,t as y}from"./ecs.js";import{i as b,l as x,o as S,r as C,u as w}from"./ecs2.js";import{t as T}from"./_clusterName2.js";import{t as ee}from"./error-banner.js";import{t as E}from"./page-heading.js";import{a as D,t as O}from"./field.js";import{a as k,i as A,l as j,n as te,o as M,r as ne,s as N,t as re}from"./alert-dialog.js";import{t as P}from"./delete-confirmation-dialog.js";import{n as ie,t as F}from"./detail-row.js";import{t as I}from"./state-badge.js";import{t as L}from"./gpu-instance-type-select.js";import{i as R,n as ae,r as z,t as oe}from"./tabs.js";var B=r(),V=e(n(),1),H=t(),U=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function W(e){let t=(0,B.c)(79),{clusterName:n,open:r,onOpenChange:a}=e,o=S(),{data:s}=i(f),{data:c}=i(h),{data:l}=i(m),{data:u}=i(p),g;t[0]===s?.Subnets?g=t[1]:(g=s?.Subnets??[],t[0]=s?.Subnets,t[1]=g);let _=g,v;t[2]===c?.SecurityGroups?v=t[3]:(v=c?.SecurityGroups??[],t[2]=c?.SecurityGroups,t[3]=v);let y=v,b;t[4]===l?.KeyPairs?b=t[5]:(b=l?.KeyPairs??[],t[4]=l?.KeyPairs,t[5]=b);let x=b,C;t[6]===u?.InstanceTypes?C=t[7]:(C=u?.InstanceTypes??[],t[6]=u?.InstanceTypes,t[7]=C);let w=C,[T,E]=(0,V.useState)(`t3.small`),[P,ie]=(0,V.useState)(1),[F,I]=(0,V.useState)(``),[R,ae]=(0,V.useState)(``),[z,oe]=(0,V.useState)(``),W;t[8]!==a||t[9]!==o?(W=function(e){e||(E(`t3.small`),ie(1),I(``),ae(``),oe(``),o.reset()),a(e)},t[8]=a,t[9]=o,t[10]=W):W=t[10];let J=W,Y;t[11]!==n||t[12]!==P||t[13]!==J||t[14]!==T||t[15]!==z||t[16]!==o||t[17]!==R||t[18]!==F?(Y=async function(){try{await o.mutateAsync({Cluster:n,InstanceType:T||void 0,Count:P,SubnetID:F,SecurityGroupID:R,KeyName:z||void 0}),J(!1)}catch{}},t[11]=n,t[12]=P,t[13]=J,t[14]=T,t[15]=z,t[16]=o,t[17]=R,t[18]=F,t[19]=Y):Y=t[19];let se=Y,X=o.isPending||F===``||R===``,ce;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(ce=(0,H.jsx)(j,{children:`Provision EC2 capacity`}),t[20]=ce):ce=t[20];let Z;t[21]===n?Z=t[22]:(Z=(0,H.jsxs)(N,{children:[ce,(0,H.jsxs)(k,{children:[`Launch container instances into cluster “`,n,`”. They register automatically once booted.`]})]}),t[21]=n,t[22]=Z);let le;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(le=(0,H.jsx)(D,{children:(0,H.jsx)(`label`,{htmlFor:`provision-instance-type`,children:`Instance type`})}),t[23]=le):le=t[23];let Q;t[24]!==T||t[25]!==w?(Q=(0,H.jsxs)(O,{children:[le,(0,H.jsx)(L,{id:`provision-instance-type`,instanceTypes:w,onValueChange:E,value:T})]}),t[24]=T,t[25]=w,t[26]=Q):Q=t[26];let ue;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,H.jsx)(D,{children:(0,H.jsx)(`label`,{htmlFor:`provision-count`,children:`Count`})}),t[27]=ue):ue=t[27];let de;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(de=e=>ie(Number(e.target.value)),t[28]=de):de=t[28];let fe;t[29]===P?fe=t[30]:(fe=(0,H.jsxs)(O,{children:[ue,(0,H.jsx)(d,{id:`provision-count`,max:10,min:1,onChange:de,type:`number`,value:P})]}),t[29]=P,t[30]=fe);let pe;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(pe=(0,H.jsx)(D,{children:(0,H.jsx)(`label`,{htmlFor:`provision-subnet`,children:`Subnet`})}),t[31]=pe):pe=t[31];let me;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(me=e=>I(e.target.value),t[32]=me):me=t[32];let he;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,H.jsx)(`option`,{value:``,children:`Select a subnet`}),t[33]=he):he=t[33];let ge;t[34]===_?ge=t[35]:(ge=_.map(q),t[34]=_,t[35]=ge);let _e;t[36]!==F||t[37]!==ge?(_e=(0,H.jsxs)(O,{children:[pe,(0,H.jsxs)(`select`,{className:U,id:`provision-subnet`,onChange:me,value:F,children:[he,ge]})]}),t[36]=F,t[37]=ge,t[38]=_e):_e=t[38];let ve;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,H.jsx)(D,{children:(0,H.jsx)(`label`,{htmlFor:`provision-sg`,children:`Security group`})}),t[39]=ve):ve=t[39];let ye;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(ye=e=>ae(e.target.value),t[40]=ye):ye=t[40];let be;t[41]===Symbol.for(`react.memo_cache_sentinel`)?(be=(0,H.jsx)(`option`,{value:``,children:`Select a security group`}),t[41]=be):be=t[41];let xe;t[42]===y?xe=t[43]:(xe=y.map(K),t[42]=y,t[43]=xe);let Se;t[44]!==R||t[45]!==xe?(Se=(0,H.jsxs)(O,{children:[ve,(0,H.jsxs)(`select`,{className:U,id:`provision-sg`,onChange:ye,value:R,children:[be,xe]})]}),t[44]=R,t[45]=xe,t[46]=Se):Se=t[46];let Ce;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,H.jsx)(D,{children:(0,H.jsx)(`label`,{htmlFor:`provision-key`,children:`Key pair`})}),t[47]=Ce):Ce=t[47];let we;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(we=e=>oe(e.target.value),t[48]=we):we=t[48];let Te;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,H.jsx)(`option`,{value:``,children:`None`}),t[49]=Te):Te=t[49];let Ee;t[50]===x?Ee=t[51]:(Ee=x.map(G),t[50]=x,t[51]=Ee);let $;t[52]!==z||t[53]!==Ee?($=(0,H.jsxs)(O,{children:[Ce,(0,H.jsxs)(`select`,{className:U,id:`provision-key`,onChange:we,value:z,children:[Te,Ee]})]}),t[52]=z,t[53]=Ee,t[54]=$):$=t[54];let De;t[55]!==Q||t[56]!==fe||t[57]!==_e||t[58]!==Se||t[59]!==$?(De=(0,H.jsxs)(`div`,{className:`space-y-4`,children:[Q,fe,_e,Se,$]}),t[55]=Q,t[56]=fe,t[57]=_e,t[58]=Se,t[59]=$,t[60]=De):De=t[60];let Oe;t[61]===o.error?Oe=t[62]:(Oe=o.error&&(0,H.jsx)(ee,{error:o.error instanceof Error?o.error:void 0,msg:`Failed to provision capacity.`}),t[61]=o.error,t[62]=Oe);let ke;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(ke=(0,H.jsx)(ne,{children:`Cancel`}),t[63]=ke):ke=t[63];let Ae;t[64]===se?Ae=t[65]:(Ae=e=>{e.preventDefault(),se()},t[64]=se,t[65]=Ae);let je=o.isPending?`Provisioning…`:`Provision`,Me;t[66]!==X||t[67]!==Ae||t[68]!==je?(Me=(0,H.jsxs)(M,{children:[ke,(0,H.jsx)(te,{disabled:X,onClick:Ae,children:je})]}),t[66]=X,t[67]=Ae,t[68]=je,t[69]=Me):Me=t[69];let Ne;t[70]!==De||t[71]!==Oe||t[72]!==Me||t[73]!==Z?(Ne=(0,H.jsxs)(A,{className:`max-h-[85vh] overflow-y-auto`,children:[Z,De,Oe,Me]}),t[70]=De,t[71]=Oe,t[72]=Me,t[73]=Z,t[74]=Ne):Ne=t[74];let Pe;return t[75]!==J||t[76]!==r||t[77]!==Ne?(Pe=(0,H.jsx)(re,{onOpenChange:J,open:r,children:Ne}),t[75]=J,t[76]=r,t[77]=Ne,t[78]=Pe):Pe=t[78],Pe}function G(e){return(0,H.jsx)(`option`,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function K(e){return(0,H.jsxs)(`option`,{value:e.GroupId??``,children:[e.GroupId,` (`,e.GroupName,`)`]},e.GroupId)}function q(e){return(0,H.jsxs)(`option`,{value:e.SubnetId??``,children:[e.SubnetId,` (`,e.CidrBlock,e.AvailabilityZone?`, ${e.AvailabilityZone}`:``,`)`]},e.SubnetId)}var J={drain:`Drain`,activate:`Activate`,deregister:`Deregister`},Y={drain:`Draining force-stops the service-owned tasks on this instance so it can be retired.`,activate:`This returns the instance to ACTIVE so the scheduler can place tasks on it again.`,deregister:`This force-removes the container instance record. Any tasks it still holds are stopped.`};function se(e){let t=(0,B.c)(28),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=_(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=w(),s=b(),[c,l]=(0,V.useState)(null),[d,f]=(0,V.useState)(!1),p;t[2]!==n||t[3]!==s||t[4]!==c||t[5]!==o?(p=function(){if(!c)return;let e=()=>l(null);if(c.action===`deregister`){s.mutate({cluster:n,containerInstance:c.arn},{onSuccess:e});return}o.mutate({cluster:n,containerInstance:c.arn,status:c.action===`drain`?`DRAINING`:`ACTIVE`},{onSuccess:e})},t[2]=n,t[3]=s,t[4]=c,t[5]=o,t[6]=p):p=t[6];let m=p,h=o.isError||s.isError,g=o.error??s.error,v=o.isPending||s.isPending,y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,H.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,H.jsx)(u,{onClick:()=>f(!0),size:`sm`,children:`Provision EC2 capacity`})}),t[7]=y):y=t[7];let x;t[8]!==g||t[9]!==h?(x=h&&(0,H.jsx)(ee,{error:g instanceof Error?g:void 0,msg:`Container instance action failed.`}),t[8]=g,t[9]=h,t[10]=x):x=t[10];let S;t[11]===i?S=t[12]:(S=i.length===0?(0,H.jsx)(`p`,{className:`text-muted-foreground`,children:`No container instances found.`}):(0,H.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,H.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`EC2 Instance`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,H.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,H.jsx)(`tbody`,{children:i.map(e=>{let t=e.containerInstanceArn??``,n=e.status===`DRAINING`;return(0,H.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,H.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.ec2InstanceId}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:(0,H.jsx)(I,{state:e.status})}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:e.runningTasksCount??0}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingTasksCount??0}),(0,H.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,H.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,H.jsx)(u,{"aria-label":n?`Activate container instance`:`Drain container instance`,onClick:()=>l({arn:t,action:n?`activate`:`drain`}),size:`sm`,variant:`outline`,children:n?`Activate`:`Drain`}),(0,H.jsx)(u,{onClick:()=>l({arn:t,action:`deregister`}),size:`sm`,variant:`destructive`,children:`Deregister`})]})})]},t)})})]})}),t[11]=i,t[12]=S);let C;t[13]!==n||t[14]!==d?(C=(0,H.jsx)(W,{clusterName:n,onOpenChange:f,open:d}),t[13]=n,t[14]=d,t[15]=C):C=t[15];let T=c?J[c.action]:`Confirm`,E=c?Y[c.action]:``,D;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>!e&&l(null),t[16]=D):D=t[16];let O=c!==null,k;t[17]!==m||t[18]!==v||t[19]!==O||t[20]!==T||t[21]!==E?(k=(0,H.jsx)(P,{confirmLabel:T,description:E,isPending:v,onConfirm:m,onOpenChange:D,open:O,title:`Container instance`}),t[17]=m,t[18]=v,t[19]=O,t[20]=T,t[21]=E,t[22]=k):k=t[22];let A;return t[23]!==k||t[24]!==x||t[25]!==S||t[26]!==C?(A=(0,H.jsxs)(H.Fragment,{children:[y,x,S,C,k]}),t[23]=k,t[24]=x,t[25]=S,t[26]=C,t[27]=A):A=t[27],A}function X(e){return e?.split(`/`).at(-1)??``}function ce(e){let t=(0,B.c)(13),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=g(n),t[0]=n,t[1]=r);let{data:i}=a(r),s;t[2]===n?s=t[3]:(s={cluster:n},t[2]=n,t[3]=s);let c;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,H.jsx)(u,{size:`sm`,children:`Create service`}),t[4]=c):c=t[4];let l;t[5]===s?l=t[6]:(l=(0,H.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,H.jsx)(o,{search:s,to:`/ecs/create-service`,children:c})}),t[5]=s,t[6]=l);let d;t[7]!==n||t[8]!==i?(d=i.length===0?(0,H.jsx)(`p`,{className:`text-muted-foreground`,children:`No services found.`}):(0,H.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,H.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Running`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Pending`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task Definition`})]})}),(0,H.jsx)(`tbody`,{children:i.map(e=>(0,H.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,H.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,H.jsx)(o,{className:`underline`,params:{clusterName:n,serviceName:e.serviceName??``},to:`/ecs/list-clusters/$clusterName/services/$serviceName`,children:e.serviceName})}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:(0,H.jsx)(I,{state:e.status})}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredCount??0}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:e.runningCount??0}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:e.pendingCount??0}),(0,H.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:X(e.taskDefinition)})]},e.serviceArn??e.serviceName))})]})}),t[7]=n,t[8]=i,t[9]=d):d=t[9];let f;return t[10]!==l||t[11]!==d?(f=(0,H.jsxs)(H.Fragment,{children:[l,d]}),t[10]=l,t[11]=d,t[12]=f):f=t[12],f}function Z(e){return e?.split(`/`).at(-1)??``}function le(e){let t=(0,B.c)(27),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=v(n),t[0]=n,t[1]=r);let{data:i}=a(r),s=x(),[c,l]=(0,V.useState)(null),d;t[2]!==n||t[3]!==c||t[4]!==s?(d=function(){c&&s.mutate({cluster:n,task:c},{onSuccess:()=>l(null)})},t[2]=n,t[3]=c,t[4]=s,t[5]=d):d=t[5];let f=d,p;t[6]===n?p=t[7]:(p={cluster:n},t[6]=n,t[7]=p);let m;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,H.jsx)(u,{size:`sm`,children:`Run task`}),t[8]=m):m=t[8];let h;t[9]===p?h=t[10]:(h=(0,H.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,H.jsx)(o,{search:p,to:`/ecs/run-task`,children:m})}),t[9]=p,t[10]=h);let g;t[11]!==s.error||t[12]!==s.isError?(g=s.isError&&(0,H.jsx)(ee,{error:s.error instanceof Error?s.error:void 0,msg:`Failed to stop task.`}),t[11]=s.error,t[12]=s.isError,t[13]=g):g=t[13];let _;t[14]!==n||t[15]!==i?(_=i.length===0?(0,H.jsx)(`p`,{className:`text-muted-foreground`,children:`No tasks found.`}):(0,H.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,H.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Task`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Last Status`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Desired Status`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Group`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,H.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,H.jsx)(`tbody`,{children:i.map(e=>{let t=Z(e.taskArn),r=e.lastStatus!==`STOPPED`;return(0,H.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,H.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:(0,H.jsx)(o,{className:`underline`,params:{clusterName:n,taskId:t},to:`/ecs/list-clusters/$clusterName/tasks/$taskId`,children:t})}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:(0,H.jsx)(I,{state:e.lastStatus})}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:e.desiredStatus}),(0,H.jsx)(`td`,{className:`px-4 py-2`,children:e.group}),(0,H.jsx)(`td`,{className:`px-4 py-2 text-right`,children:r&&(0,H.jsx)(u,{onClick:()=>l(e.taskArn??t),size:`sm`,variant:`destructive`,children:`Stop`})})]},t)})})]})}),t[14]=n,t[15]=i,t[16]=_):_=t[16];let y;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&l(null),t[17]=y):y=t[17];let b=c!==null,S;t[18]!==f||t[19]!==s.isPending||t[20]!==b?(S=(0,H.jsx)(P,{confirmLabel:`Stop task`,description:`This stops the task and releases its ENI and reserved capacity.`,isPending:s.isPending,onConfirm:f,onOpenChange:y,open:b,pendingLabel:`Stopping…`,title:`Stop task`}),t[18]=f,t[19]=s.isPending,t[20]=b,t[21]=S):S=t[21];let C;return t[22]!==S||t[23]!==h||t[24]!==g||t[25]!==_?(C=(0,H.jsxs)(H.Fragment,{children:[h,g,_,S]}),t[22]=S,t[23]=h,t[24]=g,t[25]=_,t[26]=C):C=t[26],C}function Q(e){let t=(0,B.c)(70),{clusterName:n}=e,r=s(),[i,o]=(0,V.useState)(!1),d;t[0]===n?d=t[1]:(d=y(n),t[0]=n,t[1]=d);let{data:f}=a(d),p=C(),m;t[2]!==n||t[3]!==p||t[4]!==r?(m=function(){p.mutate(n,{onSuccess:()=>{r({to:`/ecs/list-clusters`})}})},t[2]=n,t[3]=p,t[4]=r,t[5]=m):m=t[5];let h=m;if(!f){let e;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,H.jsx)(c,{to:`/ecs/list-clusters`,children:`Clusters`}),t[6]=e):e=t[6];let r;t[7]===n?r=t[8]:(r=(0,H.jsx)(E,{subtitle:`Cluster Details`,title:n}),t[7]=n,t[8]=r);let i;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,H.jsx)(`p`,{className:`text-muted-foreground`,children:`Cluster not found.`}),t[9]=i):i=t[9];let a;return t[10]===r?a=t[11]:(a=(0,H.jsxs)(H.Fragment,{children:[e,r,i]}),t[10]=r,t[11]=a),a}let g;t[12]===f.tags?g=t[13]:(g=f.tags??[],t[12]=f.tags,t[13]=g);let _=g,v;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,H.jsx)(c,{to:`/ecs/list-clusters`,children:`Clusters`}),t[14]=v):v=t[14];let b;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>o(!0),t[15]=b):b=t[15];let x;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,H.jsxs)(u,{onClick:b,size:`sm`,variant:`destructive`,children:[(0,H.jsx)(l,{className:`size-4`}),`Delete`]}),t[16]=x):x=t[16];let S;t[17]===f.status?S=t[18]:(S=(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[x,(0,H.jsx)(I,{state:f.status})]}),t[17]=f.status,t[18]=S);let w;t[19]!==n||t[20]!==S?(w=(0,H.jsx)(E,{actions:S,subtitle:`Cluster Details`,title:n}),t[19]=n,t[20]=S,t[21]=w):w=t[21];let T;t[22]!==p.error||t[23]!==p.isError?(T=p.isError&&(0,H.jsx)(ee,{error:p.error instanceof Error?p.error:void 0,msg:`Failed to delete cluster.`}),t[22]=p.error,t[23]=p.isError,t[24]=T):T=t[24];let D;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,H.jsx)(ie.Header,{children:`Overview`}),t[25]=D):D=t[25];let O;t[26]===f.clusterArn?O=t[27]:(O=(0,H.jsx)(F,{label:`ARN`,value:f.clusterArn}),t[26]=f.clusterArn,t[27]=O);let k;t[28]===f.status?k=t[29]:(k=(0,H.jsx)(F,{label:`Status`,value:f.status}),t[28]=f.status,t[29]=k);let A=String(f.activeServicesCount??0),j;t[30]===A?j=t[31]:(j=(0,H.jsx)(F,{label:`Active services`,value:A}),t[30]=A,t[31]=j);let te=String(f.runningTasksCount??0),M;t[32]===te?M=t[33]:(M=(0,H.jsx)(F,{label:`Running tasks`,value:te}),t[32]=te,t[33]=M);let ne=String(f.pendingTasksCount??0),N;t[34]===ne?N=t[35]:(N=(0,H.jsx)(F,{label:`Pending tasks`,value:ne}),t[34]=ne,t[35]=N);let re=String(f.registeredContainerInstancesCount??0),L;t[36]===re?L=t[37]:(L=(0,H.jsx)(F,{label:`Registered instances`,value:re}),t[36]=re,t[37]=L);let U;t[38]!==O||t[39]!==k||t[40]!==j||t[41]!==M||t[42]!==N||t[43]!==L?(U=(0,H.jsxs)(ie,{children:[D,(0,H.jsxs)(ie.Content,{children:[O,k,j,M,N,L]})]}),t[38]=O,t[39]=k,t[40]=j,t[41]=M,t[42]=N,t[43]=L,t[44]=U):U=t[44];let W;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,H.jsxs)(ae,{children:[(0,H.jsx)(R,{value:`services`,children:`Services`}),(0,H.jsx)(R,{value:`tasks`,children:`Tasks`}),(0,H.jsx)(R,{value:`infrastructure`,children:`Infrastructure`}),(0,H.jsx)(R,{value:`tags`,children:`Tags`})]}),t[45]=W):W=t[45];let G;t[46]===n?G=t[47]:(G=(0,H.jsx)(z,{value:`services`,children:(0,H.jsx)(ce,{clusterName:n})}),t[46]=n,t[47]=G);let K;t[48]===n?K=t[49]:(K=(0,H.jsx)(z,{value:`tasks`,children:(0,H.jsx)(le,{clusterName:n})}),t[48]=n,t[49]=K);let q;t[50]===n?q=t[51]:(q=(0,H.jsx)(z,{value:`infrastructure`,children:(0,H.jsx)(se,{clusterName:n})}),t[50]=n,t[51]=q);let J;t[52]===_?J=t[53]:(J=(0,H.jsx)(z,{value:`tags`,children:_.length===0?(0,H.jsx)(`p`,{className:`text-muted-foreground`,children:`No tags.`}):(0,H.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,H.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,H.jsx)(`thead`,{children:(0,H.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Key`}),(0,H.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Value`})]})}),(0,H.jsx)(`tbody`,{children:_.map(ue)})]})})}),t[52]=_,t[53]=J);let Y;t[54]!==G||t[55]!==K||t[56]!==q||t[57]!==J?(Y=(0,H.jsxs)(oe,{className:`mt-6`,defaultValue:`services`,children:[W,G,K,q,J]}),t[54]=G,t[55]=K,t[56]=q,t[57]=J,t[58]=Y):Y=t[58];let X=`This permanently deletes cluster "${n}" and force-stops every task it holds. This cannot be undone.`,Z;t[59]!==p.isPending||t[60]!==h||t[61]!==i||t[62]!==X?(Z=(0,H.jsx)(P,{description:X,isPending:p.isPending,onConfirm:h,onOpenChange:o,open:i,title:`Delete cluster`}),t[59]=p.isPending,t[60]=h,t[61]=i,t[62]=X,t[63]=Z):Z=t[63];let Q;return t[64]!==U||t[65]!==Y||t[66]!==Z||t[67]!==w||t[68]!==T?(Q=(0,H.jsxs)(H.Fragment,{children:[v,w,T,U,Y,Z]}),t[64]=U,t[65]=Y,t[66]=Z,t[67]=w,t[68]=T,t[69]=Q):Q=t[69],Q}function ue(e){return(0,H.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,H.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.key}),(0,H.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.value})]},e.key)}function de(){let e=(0,B.c)(2),{clusterName:t}=T.useParams(),n;return e[0]===t?n=e[1]:(n=(0,H.jsx)(Q,{clusterName:t}),e[0]=t,e[1]=n),n}export{de as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName4.js b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName4.js index 2ed571de8..7a97acc51 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_clusterName4.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_clusterName4.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./link.js";import{t as s}from"./useNavigate.js";import{Qt as c,t as l}from"./cluster-config.js";import{t as u}from"./back-link.js";import{t as d}from"./circle-arrow-up.js";import{n as f,t as p}from"./_clusterName.js";import{t as m}from"./cli-command-panel.js";import{t as h}from"./trash-2.js";import{t as g}from"./triangle-alert.js";import{t as _}from"./button.js";import{t as v}from"./input.js";import{O as y,c as b}from"./ec2.js";import{C as x,S,T as C,_ as w,b as T,c as E,f as D,h as O,i as k,l as A,m as j,n as M,p as N,r as P,s as F,u as I,v as L,w as R,x as z,y as B}from"./eks.js";import{a as V,i as H,l as U,n as W,o as G,r as K,s as ee,t as q,u as te}from"./eks2.js";import{y as ne}from"./iam2.js";import{a as re,i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./error-banner.js";import{t as ce}from"./page-heading.js";import{a as J,n as le,r as ue,t as Y}from"./field.js";import{i as de,l as fe,n as pe,o as me,r as he,s as ge,t as _e}from"./alert-dialog.js";import{t as ve}from"./delete-confirmation-dialog.js";import{n as X,t as Z}from"./detail-row.js";import{n as ye,t as be}from"./gpu-instance-type-select.js";import{t as xe}from"./badge.js";import{i as Se,n as Ce,r as we,t as Te}from"./tabs.js";import{t as Ee}from"./json-editor.js";var De=r(),Q=e(n(),1),$=t();function Oe(e){return e?.split(`/`).pop()??e??``}function ke(e){let t=(0,De.c)(55),{clusterName:n,principalArn:r,onDelete:a}=e,o;t[0]!==n||t[1]!==r?(o=W(n,r),t[0]=n,t[1]=r,t[2]=o):o=t[2];let{data:s}=i(o),c;t[3]!==n||t[4]!==r?(c=G(n,r),t[3]=n,t[4]=r,t[5]=c):c=t[5];let{data:l}=i(c),u=N(),d=S(),[f,p]=(0,Q.useState)(M[0].arn),m=s?.accessEntry,g;t[6]===l?.associatedAccessPolicies?g=t[7]:(g=l?.associatedAccessPolicies??[],t[6]=l?.associatedAccessPolicies,t[7]=g);let v=g,y;t[8]===r?y=t[9]:(y=(0,$.jsx)(`span`,{className:`truncate font-mono text-xs`,children:r}),t[8]=r,t[9]=y);let b;t[10]!==a||t[11]!==r?(b=()=>a(r),t[10]=a,t[11]=r,t[12]=b):b=t[12];let x;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(h,{className:`size-4`}),t[13]=x):x=t[13];let C;t[14]===b?C=t[15]:(C=(0,$.jsx)(_,{onClick:b,size:`icon`,variant:`ghost`,children:x}),t[14]=b,t[15]=C);let w;t[16]!==y||t[17]!==C?(w=(0,$.jsx)(X.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[y,C]})}),t[16]=y,t[17]=C,t[18]=w):w=t[18];let T=m?.type,E;t[19]===T?E=t[20]:(E=(0,$.jsx)(Z,{label:`Type`,value:T}),t[19]=T,t[20]=E);let D;t[21]===m?D=t[22]:(D=m?.kubernetesGroups?.length?m.kubernetesGroups.join(`, `):`—`,t[21]=m,t[22]=D);let O;t[23]===D?O=t[24]:(O=(0,$.jsx)(Z,{label:`Kubernetes groups`,value:D}),t[23]=D,t[24]=O);let k;t[25]!==v||t[26]!==n||t[27]!==d||t[28]!==r?(k=v.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:v.map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`span`,{children:Oe(e.policyArn)}),(0,$.jsx)(_,{onClick:()=>d.mutate({clusterName:n,principalArn:r,policyArn:e.policyArn??``}),size:`sm`,variant:`ghost`,children:`Remove`})]},e.policyArn))}):`—`,t[25]=v,t[26]=n,t[27]=d,t[28]=r,t[29]=k):k=t[29];let A;t[30]===k?A=t[31]:(A=(0,$.jsx)(Z,{label:`Access policies`,value:k}),t[30]=k,t[31]=A);let j;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(j=e=>p(e.target.value),t[32]=j):j=t[32];let P;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(P=M.map(Ae),t[33]=P):P=t[33];let F;t[34]===f?F=t[35]:(F=(0,$.jsx)(`select`,{"aria-label":`Access policy`,className:`h-7 flex-1 rounded-md border border-input bg-input/20 px-2 text-sm`,onChange:j,value:f,children:P}),t[34]=f,t[35]=F);let I;t[36]!==u||t[37]!==n||t[38]!==f||t[39]!==r?(I=()=>u.mutate({clusterName:n,principalArn:r,policyArn:f,accessScopeType:`cluster`}),t[36]=u,t[37]=n,t[38]=f,t[39]=r,t[40]=I):I=t[40];let L;t[41]!==u.isPending||t[42]!==I?(L=(0,$.jsx)(_,{disabled:u.isPending,onClick:I,size:`sm`,children:`Associate`}),t[41]=u.isPending,t[42]=I,t[43]=L):L=t[43];let R;t[44]!==F||t[45]!==L?(R=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 pt-2`,children:[F,L]}),t[44]=F,t[45]=L,t[46]=R):R=t[46];let z;t[47]!==E||t[48]!==O||t[49]!==A||t[50]!==R?(z=(0,$.jsxs)(X.Content,{children:[E,O,A,R]}),t[47]=E,t[48]=O,t[49]=A,t[50]=R,t[51]=z):z=t[51];let B;return t[52]!==z||t[53]!==w?(B=(0,$.jsxs)(X,{children:[w,z]}),t[52]=z,t[53]=w,t[54]=B):B=t[54],B}function Ae(e){return(0,$.jsx)(`option`,{value:e.arn,children:e.name},e.arn)}function je(e){let t=(0,De.c)(41),{clusterName:n,open:r,onOpenChange:i}=e,a=j(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:oe(A),defaultValues:{principalArn:``,kubernetesGroups:``}},t[0]=o):o=t[0];let{formState:s,handleSubmit:c,register:l,reset:u}=ie(o),{errors:d}=s,f;t[1]!==n||t[2]!==a||t[3]!==i||t[4]!==u?(f=async e=>{await a.mutateAsync({clusterName:n,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups.split(`,`).map(Me).filter(Boolean)}),u(),i(!1)},t[1]=n,t[2]=a,t[3]=i,t[4]=u,t[5]=f):f=t[5];let p=f,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(ge,{children:(0,$.jsx)(fe,{children:`Add access entry`})}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ae-principal`,children:`IAM principal ARN`})}),t[7]=h):h=t[7];let g=!!d.principalArn,_;t[8]===l?_=t[9]:(_=l(`principalArn`),t[8]=l,t[9]=_);let y;t[10]!==g||t[11]!==_?(y=(0,$.jsx)(v,{"aria-invalid":g,id:`ae-principal`,placeholder:`arn:aws:iam::000000000000:role/my-role`,..._}),t[10]=g,t[11]=_,t[12]=y):y=t[12];let b;t[13]===d.principalArn?b=t[14]:(b=(0,$.jsx)(ue,{errors:[d.principalArn]}),t[13]=d.principalArn,t[14]=b);let x;t[15]!==y||t[16]!==b?(x=(0,$.jsxs)(Y,{children:[h,y,b]}),t[15]=y,t[16]=b,t[17]=x):x=t[17];let S;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ae-groups`,children:`Kubernetes groups`})}),t[18]=S):S=t[18];let C;t[19]===l?C=t[20]:(C=l(`kubernetesGroups`),t[19]=l,t[20]=C);let w;t[21]===C?w=t[22]:(w=(0,$.jsxs)(Y,{children:[S,(0,$.jsx)(v,{id:`ae-groups`,placeholder:`system:masters`,...C})]}),t[21]=C,t[22]=w);let T;t[23]!==x||t[24]!==w?(T=(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-access-entry-form`,children:[x,w]}),t[23]=x,t[24]=w,t[25]=T):T=t[25];let E;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(he,{children:`Cancel`}),t[26]=E):E=t[26];let D;t[27]!==c||t[28]!==p?(D=e=>{e.preventDefault(),c(p)()},t[27]=c,t[28]=p,t[29]=D):D=t[29];let O=a.isPending?`Creating…`:`Create`,k;t[30]!==a.isPending||t[31]!==D||t[32]!==O?(k=(0,$.jsxs)(me,{children:[E,(0,$.jsx)(pe,{disabled:a.isPending,onClick:D,children:O})]}),t[30]=a.isPending,t[31]=D,t[32]=O,t[33]=k):k=t[33];let M;t[34]!==T||t[35]!==k?(M=(0,$.jsxs)(de,{children:[m,T,k]}),t[34]=T,t[35]=k,t[36]=M):M=t[36];let N;return t[37]!==i||t[38]!==r||t[39]!==M?(N=(0,$.jsx)(_e,{onOpenChange:i,open:r,children:M}),t[37]=i,t[38]=r,t[39]=M,t[40]=N):N=t[40],N}function Me(e){return e.trim()}function Ne(e){let t=(0,De.c)(25),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=q(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=L(),[s,c]=(0,Q.useState)(!1),[l,u]=(0,Q.useState)(),d;t[2]===i.accessEntries?d=t[3]:(d=i.accessEntries??[],t[2]=i.accessEntries,t[3]=d);let f=d,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(_,{onClick:()=>c(!0),size:`sm`,children:`Add access entry`})}),t[4]=p):p=t[4];let m;t[5]!==n||t[6]!==f?(m=f.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:f.map(e=>(0,$.jsx)(ke,{clusterName:n,onDelete:u,principalArn:e},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No access entries.`}),t[5]=n,t[6]=f,t[7]=m):m=t[7];let h;t[8]!==n||t[9]!==s?(h=(0,$.jsx)(je,{clusterName:n,onOpenChange:c,open:s}),t[8]=n,t[9]=s,t[10]=h):h=t[10];let g=`Delete access entry for "${l??``}"?`,v;t[11]!==n||t[12]!==o||t[13]!==l?(v=()=>{l&&o.mutate({clusterName:n,principalArn:l},{onSuccess:()=>u(void 0)})},t[11]=n,t[12]=o,t[13]=l,t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&u(void 0),t[15]=y):y=t[15];let b=l!==void 0,x;t[16]!==o.isPending||t[17]!==g||t[18]!==v||t[19]!==b?(x=(0,$.jsx)(ve,{description:g,isPending:o.isPending,onConfirm:v,onOpenChange:y,open:b,title:`Delete access entry`}),t[16]=o.isPending,t[17]=g,t[18]=v,t[19]=b,t[20]=x):x=t[20];let S;return t[21]!==x||t[22]!==m||t[23]!==h?(S=(0,$.jsxs)($.Fragment,{children:[p,m,h,x]}),t[21]=x,t[22]=m,t[23]=h,t[24]=S):S=t[24],S}var Pe=new Set([`CREATING`,`UPDATING`,`DELETING`]),Fe=5e3,Ie=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function Le(e){let t=(0,De.c)(97),{clusterName:n,catalog:r,installed:i,open:a,onOpenChange:o}=e,s=O(),c;t[0]===i?c=t[1]:(c=new Set(i),t[0]=i,t[1]=c);let l=c,u;t[2]===l?u=t[3]:(u=e=>!l.has(e.addonName??``),t[2]=l,t[3]=u);let d=r.filter(u),f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f={resolver:oe(I),defaultValues:{addonName:``,addonVersion:``,serviceAccountRoleArn:``,configurationValues:``}},t[4]=f):f=t[4];let{control:p,formState:m,handleSubmit:h,register:g,reset:_,setValue:y}=ie(f),{errors:b}=m,x;t[5]===p?x=t[6]:(x={control:p,name:`addonName`},t[5]=p,t[6]=x);let S=re(x),C;t[7]===p?C=t[8]:(C={control:p,name:`addonVersion`},t[7]=p,t[8]=C);let w=re(C),T;t[9]===S?T=t[10]:(T=e=>e.addonName===S,t[9]=S,t[10]=T);let E=r.find(T)?.addonVersions??[],D;t[11]===w?D=t[12]:(D=e=>e.addonVersion===w,t[11]=w,t[12]=D);let k=E.find(D)?.requiresIamPermissions??!1,A;t[13]!==r||t[14]!==y?(A=e=>{let t=r.find(t=>t.addonName===e)?.addonVersions?.[0]?.addonVersion??``;y(`addonName`,e,{shouldValidate:!0}),y(`addonVersion`,t,{shouldValidate:!0})},t[13]=r,t[14]=y,t[15]=A):A=t[15];let j=A,M;t[16]!==n||t[17]!==s||t[18]!==o||t[19]!==_?(M=async e=>{await s.mutateAsync({clusterName:n,addonName:e.addonName,addonVersion:e.addonVersion||void 0,serviceAccountRoleArn:e.serviceAccountRoleArn.trim()||void 0,configurationValues:e.configurationValues.trim()||void 0}),_(),o(!1)},t[16]=n,t[17]=s,t[18]=o,t[19]=_,t[20]=M):M=t[20];let N=M,P=_e,F=de,L;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(ge,{children:(0,$.jsx)(fe,{children:`Add add-on`})}),t[21]=L):L=t[21];let R;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`addon-name`,children:`Add-on`})}),t[22]=R):R=t[22];let z=!!b.addonName,B;t[23]===j?B=t[24]:(B=e=>j(e.target.value),t[23]=j,t[24]=B);let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(`option`,{value:``,children:`Select add-on`}),t[25]=V):V=t[25];let H=d.map(ze),U;t[26]!==S||t[27]!==z||t[28]!==B||t[29]!==H?(U=(0,$.jsxs)(`select`,{"aria-invalid":z,className:Ie,id:`addon-name`,onChange:B,value:S,children:[V,H]}),t[26]=S,t[27]=z,t[28]=B,t[29]=H,t[30]=U):U=t[30];let W;t[31]===b.addonName?W=t[32]:(W=(0,$.jsx)(ue,{errors:[b.addonName]}),t[31]=b.addonName,t[32]=W);let G;t[33]!==U||t[34]!==W?(G=(0,$.jsxs)(Y,{children:[R,U,W]}),t[33]=U,t[34]=W,t[35]=G):G=t[35];let K=Y,ee;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`addon-version`,children:`Version`})}),t[36]=ee):ee=t[36];let q=!!b.addonVersion,te=Ie,ne=E.length===0,se;t[37]===y?se=t[38]:(se=e=>y(`addonVersion`,e.target.value,{shouldValidate:!0}),t[37]=y,t[38]=se);let ce=E.map(Re),le;t[39]!==w||t[40]!==q||t[41]!==te||t[42]!==ne||t[43]!==se||t[44]!==ce?(le=(0,$.jsx)(`select`,{"aria-invalid":q,className:te,disabled:ne,id:`addon-version`,onChange:se,value:w,children:ce}),t[39]=w,t[40]=q,t[41]=te,t[42]=ne,t[43]=se,t[44]=ce,t[45]=le):le=t[45];let ve;t[46]===b.addonVersion?ve=t[47]:(ve=(0,$.jsx)(ue,{errors:[b.addonVersion]}),t[46]=b.addonVersion,t[47]=ve);let X;t[48]!==K||t[49]!==ee||t[50]!==le||t[51]!==ve?(X=(0,$.jsxs)(K,{children:[ee,le,ve]}),t[48]=K,t[49]=ee,t[50]=le,t[51]=ve,t[52]=X):X=t[52];let Z;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`addon-role`,children:`Service account IAM role ARN`})}),t[53]=Z):Z=t[53];let ye;t[54]===g?ye=t[55]:(ye=g(`serviceAccountRoleArn`),t[54]=g,t[55]=ye);let be;t[56]===ye?be=t[57]:(be=(0,$.jsx)(v,{id:`addon-role`,placeholder:`arn:aws:iam::…:role/…`,...ye}),t[56]=ye,t[57]=be);let xe;t[58]===k?xe=t[59]:(xe=k&&(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This add-on needs IAM permissions — provide an IRSA role ARN.`}),t[58]=k,t[59]=xe);let Se;t[60]!==be||t[61]!==xe?(Se=(0,$.jsxs)(Y,{children:[Z,be,xe]}),t[60]=be,t[61]=xe,t[62]=Se):Se=t[62];let Ce;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Ce=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`addon-config`,children:`Configuration values (JSON)`})}),t[63]=Ce):Ce=t[63];let we;t[64]===b.configurationValues?we=t[65]:(we=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,$.jsx)(Ee,{error:!!b.configurationValues,id:`addon-config`,onBlur:n,onChange:r,placeholder:`{"replicaCount": 2}`,ref:i,rows:4,value:a})},t[64]=b.configurationValues,t[65]=we);let Te;t[66]!==p||t[67]!==we?(Te=(0,$.jsx)(ae,{control:p,name:`configurationValues`,render:we}),t[66]=p,t[67]=we,t[68]=Te):Te=t[68];let Q;t[69]===b.configurationValues?Q=t[70]:(Q=(0,$.jsx)(ue,{errors:[b.configurationValues]}),t[69]=b.configurationValues,t[70]=Q);let Oe;t[71]!==Te||t[72]!==Q?(Oe=(0,$.jsxs)(Y,{children:[Ce,Te,Q]}),t[71]=Te,t[72]=Q,t[73]=Oe):Oe=t[73];let ke;t[74]!==G||t[75]!==X||t[76]!==Se||t[77]!==Oe?(ke=(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-addon-form`,children:[G,X,Se,Oe]}),t[74]=G,t[75]=X,t[76]=Se,t[77]=Oe,t[78]=ke):ke=t[78];let Ae;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(Ae=(0,$.jsx)(he,{children:`Cancel`}),t[79]=Ae):Ae=t[79];let je;t[80]!==h||t[81]!==N?(je=e=>{e.preventDefault(),h(N)()},t[80]=h,t[81]=N,t[82]=je):je=t[82];let Me=s.isPending?`Adding…`:`Add`,Ne;t[83]!==s.isPending||t[84]!==je||t[85]!==Me?(Ne=(0,$.jsxs)(me,{children:[Ae,(0,$.jsx)(pe,{disabled:s.isPending,onClick:je,children:Me})]}),t[83]=s.isPending,t[84]=je,t[85]=Me,t[86]=Ne):Ne=t[86];let Pe;t[87]!==F||t[88]!==L||t[89]!==ke||t[90]!==Ne?(Pe=(0,$.jsxs)(F,{className:`max-h-[85vh] overflow-y-auto`,children:[L,ke,Ne]}),t[87]=F,t[88]=L,t[89]=ke,t[90]=Ne,t[91]=Pe):Pe=t[91];let Fe;return t[92]!==P||t[93]!==o||t[94]!==a||t[95]!==Pe?(Fe=(0,$.jsx)(P,{onOpenChange:o,open:a,children:Pe}),t[92]=P,t[93]=o,t[94]=a,t[95]=Pe,t[96]=Fe):Fe=t[96],Fe}function Re(e,t){return(0,$.jsxs)(`option`,{value:e.addonVersion??``,children:[e.addonVersion,t===0?` (latest)`:``]},e.addonVersion)}function ze(e){return(0,$.jsx)(`option`,{value:e.addonName??``,children:e.addonName},e.addonName)}function Be(e){let t=(0,De.c)(48),{clusterName:n,addonName:r,current:i,versions:a,open:o,onOpenChange:s}=e,c=R(),[l,u]=(0,Q.useState)(i.addonVersion??``),[d,f]=(0,Q.useState)(i.serviceAccountRoleArn??``),[p,m]=(0,Q.useState)(i.configurationValues??``),[h,g]=(0,Q.useState)(),[_,y]=(0,Q.useState)(o);o!==_&&(y(o),o&&(u(i.addonVersion??``),f(i.serviceAccountRoleArn??``),m(i.configurationValues??``),g(void 0)));let b;t[0]!==r||t[1]!==n||t[2]!==p||t[3]!==s||t[4]!==d||t[5]!==c||t[6]!==l?(b=()=>{let e=F.safeParse(p);if(!e.success){g(e.error.issues[0]?.message??`Configuration must be valid JSON`);return}g(void 0),c.mutate({clusterName:n,addonName:r,addonVersion:l||void 0,serviceAccountRoleArn:d.trim()||void 0,configurationValues:p.trim()||void 0},{onSuccess:()=>s(!1)})},t[0]=r,t[1]=n,t[2]=p,t[3]=s,t[4]=d,t[5]=c,t[6]=l,t[7]=b):b=t[7];let x=b,S;t[8]===r?S=t[9]:(S=(0,$.jsx)(ge,{children:(0,$.jsxs)(fe,{children:[`Update `,r]})}),t[8]=r,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-version`,children:`Version`})}),t[10]=C):C=t[10];let w=a.length===0,T;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>u(e.target.value),t[11]=T):T=t[11];let E;t[12]===a?E=t[13]:(E=a.map(Ve),t[12]=a,t[13]=E);let D;t[14]!==w||t[15]!==E||t[16]!==l?(D=(0,$.jsxs)(Y,{children:[C,(0,$.jsx)(`select`,{className:Ie,disabled:w,id:`update-addon-version`,onChange:T,value:l,children:E})]}),t[14]=w,t[15]=E,t[16]=l,t[17]=D):D=t[17];let O;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-role`,children:`Service account IAM role ARN`})}),t[18]=O):O=t[18];let k;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>f(e.target.value),t[19]=k):k=t[19];let A;t[20]===d?A=t[21]:(A=(0,$.jsxs)(Y,{children:[O,(0,$.jsx)(v,{id:`update-addon-role`,onChange:k,placeholder:`arn:aws:iam::…:role/…`,value:d})]}),t[20]=d,t[21]=A);let j;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`update-addon-config`,children:`Configuration values (JSON)`})}),t[22]=j):j=t[22];let M=!!h,N;t[23]!==p||t[24]!==M?(N=(0,$.jsxs)(Y,{children:[j,(0,$.jsx)(Ee,{error:M,id:`update-addon-config`,onChange:m,rows:4,value:p})]}),t[23]=p,t[24]=M,t[25]=N):N=t[25];let P;t[26]!==A||t[27]!==N||t[28]!==D?(P=(0,$.jsxs)(`div`,{className:`space-y-4`,children:[D,A,N]}),t[26]=A,t[27]=N,t[28]=D,t[29]=P):P=t[29];let I;t[30]===h?I=t[31]:(I=h&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:h}),t[30]=h,t[31]=I);let L;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsx)(he,{children:`Cancel`}),t[32]=L):L=t[32];let z;t[33]===x?z=t[34]:(z=e=>{e.preventDefault(),x()},t[33]=x,t[34]=z);let B=c.isPending?`Updating…`:`Update`,V;t[35]!==z||t[36]!==B||t[37]!==c.isPending?(V=(0,$.jsxs)(me,{children:[L,(0,$.jsx)(pe,{disabled:c.isPending,onClick:z,children:B})]}),t[35]=z,t[36]=B,t[37]=c.isPending,t[38]=V):V=t[38];let H;t[39]!==P||t[40]!==I||t[41]!==V||t[42]!==S?(H=(0,$.jsxs)(de,{className:`max-h-[85vh] overflow-y-auto`,children:[S,P,I,V]}),t[39]=P,t[40]=I,t[41]=V,t[42]=S,t[43]=H):H=t[43];let U;return t[44]!==s||t[45]!==o||t[46]!==H?(U=(0,$.jsx)(_e,{onOpenChange:s,open:o,children:H}),t[44]=s,t[45]=o,t[46]=H,t[47]=U):U=t[47],U}function Ve(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function He(e){let t=(0,De.c)(53),{clusterName:n,addonName:r,catalog:a,onDelete:o}=e,s;t[0]!==r||t[1]!==n?(s=K(n,r),t[0]=r,t[1]=n,t[2]=s):s=t[2];let c;t[3]===s?c=t[4]:(c={...s,refetchInterval:We},t[3]=s,t[4]=c);let{data:l}=i(c),[u,f]=(0,Q.useState)(!1),p=l?.addon,m=p?.health?.issues?.[0]?.message,g;t[5]!==r||t[6]!==a?(g=a.find(e=>e.addonName===r)?.addonVersions?.map(Ue).filter(Boolean)??[],t[5]=r,t[6]=a,t[7]=g):g=t[7];let v=g,y;t[8]===r?y=t[9]:(y=(0,$.jsx)(`span`,{children:r}),t[8]=r,t[9]=y);let b=p?.status,x;t[10]===b?x=t[11]:(x=E(b),t[10]=b,t[11]=x);let S=p?.status??`UNKNOWN`,C;t[12]!==x||t[13]!==S?(C=(0,$.jsx)(xe,{variant:x,children:S}),t[12]=x,t[13]=S,t[14]=C):C=t[14];let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>f(!0),t[15]=w):w=t[15];let T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,$.jsx)(_,{"aria-label":`Update add-on`,onClick:w,size:`icon`,variant:`ghost`,children:(0,$.jsx)(d,{className:`size-4`})}),t[16]=T):T=t[16];let D;t[17]!==r||t[18]!==o?(D=()=>o(r),t[17]=r,t[18]=o,t[19]=D):D=t[19];let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(h,{className:`size-4`}),t[20]=O):O=t[20];let k;t[21]===D?k=t[22]:(k=(0,$.jsx)(_,{"aria-label":`Remove add-on`,onClick:D,size:`icon`,variant:`ghost`,children:O}),t[21]=D,t[22]=k);let A;t[23]!==k||t[24]!==C?(A=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[C,T,k]}),t[23]=k,t[24]=C,t[25]=A):A=t[25];let j;t[26]!==A||t[27]!==y?(j=(0,$.jsx)(X.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[y,A]})}),t[26]=A,t[27]=y,t[28]=j):j=t[28];let M=p?.addonVersion,N;t[29]===M?N=t[30]:(N=(0,$.jsx)(Z,{label:`Version`,value:M}),t[29]=M,t[30]=N);let P=p?.serviceAccountRoleArn,F;t[31]===P?F=t[32]:(F=(0,$.jsx)(Z,{label:`IRSA role`,value:P}),t[31]=P,t[32]=F);let I;t[33]===m?I=t[34]:(I=m&&(0,$.jsx)(Z,{label:`Issue`,value:(0,$.jsx)(`span`,{className:`text-destructive`,children:m})}),t[33]=m,t[34]=I);let L;t[35]!==N||t[36]!==F||t[37]!==I?(L=(0,$.jsxs)(X.Content,{children:[N,F,I]}),t[35]=N,t[36]=F,t[37]=I,t[38]=L):L=t[38];let R=p?.addonVersion,z=p?.serviceAccountRoleArn,B=p?.configurationValues,V;t[39]!==R||t[40]!==z||t[41]!==B?(V={addonVersion:R,serviceAccountRoleArn:z,configurationValues:B},t[39]=R,t[40]=z,t[41]=B,t[42]=V):V=t[42];let H;t[43]!==r||t[44]!==n||t[45]!==u||t[46]!==V||t[47]!==v?(H=(0,$.jsx)(Be,{addonName:r,clusterName:n,current:V,onOpenChange:f,open:u,versions:v}),t[43]=r,t[44]=n,t[45]=u,t[46]=V,t[47]=v,t[48]=H):H=t[48];let U;return t[49]!==j||t[50]!==L||t[51]!==H?(U=(0,$.jsxs)(X,{children:[j,L,H]}),t[49]=j,t[50]=L,t[51]=H,t[52]=U):U=t[52],U}function Ue(e){return e.addonVersion??``}function We(e){return Pe.has(e.state.data?.addon?.status??``)?Fe:!1}function Ge(e){let t=(0,De.c)(31),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=V(n),t[0]=n,t[1]=r);let{data:o}=a(r),{data:s}=i(H),c=B(),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(),p;t[2]===o.addons?p=t[3]:(p=o.addons??[],t[2]=o.addons,t[3]=p);let m=p,h;t[4]===s?.addons?h=t[5]:(h=s?.addons??[],t[4]=s?.addons,t[5]=h);let g=h,v;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Add-on manifests are staged; activation completes when the cluster reports the workload ready.`}),t[6]=v):v=t[6];let y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,$.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-4`,children:[v,(0,$.jsx)(_,{onClick:()=>u(!0),size:`sm`,children:`Add add-on`})]}),t[7]=y):y=t[7];let b;t[8]!==m||t[9]!==g||t[10]!==n?(b=m.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:m.map(e=>(0,$.jsx)(He,{addonName:e,catalog:g,clusterName:n,onDelete:f},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No add-ons installed.`}),t[8]=m,t[9]=g,t[10]=n,t[11]=b):b=t[11];let x;t[12]!==m||t[13]!==g||t[14]!==n||t[15]!==l?(x=(0,$.jsx)(Le,{catalog:g,clusterName:n,installed:m,onOpenChange:u,open:l}),t[12]=m,t[13]=g,t[14]=n,t[15]=l,t[16]=x):x=t[16];let S=`Remove add-on "${d??``}" from the cluster?`,C;t[17]!==n||t[18]!==c||t[19]!==d?(C=()=>{d&&c.mutate({clusterName:n,addonName:d},{onSuccess:()=>f(void 0)})},t[17]=n,t[18]=c,t[19]=d,t[20]=C):C=t[20];let w;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>!e&&f(void 0),t[21]=w):w=t[21];let T=d!==void 0,E;t[22]!==c.isPending||t[23]!==T||t[24]!==S||t[25]!==C?(E=(0,$.jsx)(ve,{confirmLabel:`Remove`,description:S,isPending:c.isPending,onConfirm:C,onOpenChange:w,open:T,pendingLabel:`Removing…`,title:`Remove add-on`}),t[22]=c.isPending,t[23]=T,t[24]=S,t[25]=C,t[26]=E):E=t[26];let D;return t[27]!==E||t[28]!==b||t[29]!==x?(D=(0,$.jsxs)($.Fragment,{children:[y,b,x,E]}),t[27]=E,t[28]=b,t[29]=x,t[30]=D):D=t[30],D}function Ke(e){let t=(0,De.c)(6),{to:n,id:r}=e,i;t[0]===r?i=t[1]:(i={id:r},t[0]=r,t[1]=i);let a;return t[2]!==r||t[3]!==i||t[4]!==n?(a=(0,$.jsx)(o,{className:`font-mono text-primary underline-offset-2 hover:underline`,params:i,to:n,children:r}),t[2]=r,t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function qe(e){let t=(0,De.c)(45),{cluster:n}=e,r=n?.resourcesVpcConfig,i;t[0]===r?.subnetIds?i=t[1]:(i=r?.subnetIds??[],t[0]=r?.subnetIds,t[1]=i);let a=i,o;t[2]===r?.securityGroupIds?o=t[3]:(o=r?.securityGroupIds??[],t[2]=r?.securityGroupIds,t[3]=o);let s=o,c;t[4]===r?.publicAccessCidrs?c=t[5]:(c=r?.publicAccessCidrs??[],t[4]=r?.publicAccessCidrs,t[5]=c);let l=c,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(X.Header,{children:`VPC`}),t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=r?.vpcId?(0,$.jsx)(Ke,{id:r.vpcId,to:`/ec2/describe-vpcs/$id`}):void 0,t[7]=r,t[8]=d);let f;t[9]===d?f=t[10]:(f=(0,$.jsx)(Z,{label:`VPC`,value:d}),t[9]=d,t[10]=f);let p=n?.endpoint,m;t[11]===p?m=t[12]:(m=(0,$.jsx)(Z,{label:`API server endpoint`,value:p}),t[11]=p,t[12]=m);let h=r?.endpointPublicAccess?`Enabled`:`Disabled`,g;t[13]===h?g=t[14]:(g=(0,$.jsx)(Z,{label:`Public access`,value:h}),t[13]=h,t[14]=g);let _=r?.endpointPrivateAccess?`Enabled`:`Disabled`,v;t[15]===_?v=t[16]:(v=(0,$.jsx)(Z,{label:`Private access`,value:_}),t[15]=_,t[16]=v);let y;t[17]!==l||t[18]!==r?.endpointPublicAccess?(y=r?.endpointPublicAccess&&(0,$.jsx)(Z,{label:`Public access CIDRs`,value:l.length>0?(0,$.jsx)(`div`,{className:`space-y-1 font-mono text-xs`,children:l.map(Xe)}):`Any (0.0.0.0/0)`}),t[17]=l,t[18]=r?.endpointPublicAccess,t[19]=y):y=t[19];let b;t[20]!==g||t[21]!==v||t[22]!==y||t[23]!==f||t[24]!==m?(b=(0,$.jsxs)(X,{children:[u,(0,$.jsxs)(X.Content,{children:[f,m,g,v,y]})]}),t[20]=g,t[21]=v,t[22]=y,t[23]=f,t[24]=m,t[25]=b):b=t[25];let x;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(X.Header,{children:`Subnets`}),t[26]=x):x=t[26];let S;t[27]===a?S=t[28]:(S=(0,$.jsxs)(X,{children:[x,(0,$.jsx)(X.Content,{children:a.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:a.map(Ye)}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets.`})})]}),t[27]=a,t[28]=S);let C;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(X.Header,{children:`Security groups`}),t[29]=C):C=t[29];let w;t[30]===r?w=t[31]:(w=r?.clusterSecurityGroupId?(0,$.jsx)(Ke,{id:r.clusterSecurityGroupId,to:`/ec2/describe-security-groups/$id`}):void 0,t[30]=r,t[31]=w);let T;t[32]===w?T=t[33]:(T=(0,$.jsx)(Z,{label:`Cluster security group`,value:w}),t[32]=w,t[33]=T);let E;t[34]===s?E=t[35]:(E=s.length>0?(0,$.jsx)(`div`,{className:`space-y-1`,children:s.map(Je)}):`—`,t[34]=s,t[35]=E);let D;t[36]===E?D=t[37]:(D=(0,$.jsx)(Z,{label:`Additional security groups`,value:E}),t[36]=E,t[37]=D);let O;t[38]!==T||t[39]!==D?(O=(0,$.jsxs)(X,{children:[C,(0,$.jsxs)(X.Content,{children:[T,D]})]}),t[38]=T,t[39]=D,t[40]=O):O=t[40];let k;return t[41]!==b||t[42]!==S||t[43]!==O?(k=(0,$.jsxs)($.Fragment,{children:[b,S,O]}),t[41]=b,t[42]=S,t[43]=O,t[44]=k):k=t[44],k}function Je(e){return(0,$.jsx)(Ke,{id:e,to:`/ec2/describe-security-groups/$id`},e)}function Ye(e){return(0,$.jsx)(Ke,{id:e,to:`/ec2/describe-subnets/$id`},e)}function Xe(e){return(0,$.jsx)(`div`,{children:e},e)}function Ze(e){return!!e&&(e.endsWith(`_GPU`)||e.endsWith(`_NVIDIA`))}function Qe(e,t){let n=t.find(t=>t.InstanceType===e);return!!n&&ye(n)}function $e(e){let t=(0,De.c)(44),{clusterName:n,nodegroupName:r,current:i,open:a,onOpenChange:o}=e,s=x(),[c,l]=(0,Q.useState)(i.minSize??0),[u,d]=(0,Q.useState)(i.desiredSize??0),[f,p]=(0,Q.useState)(i.maxSize??0),[m,h]=(0,Q.useState)(),[g,_]=(0,Q.useState)(a);a!==g&&(_(a),a&&(l(i.minSize??0),d(i.desiredSize??0),p(i.maxSize??0),h(void 0)));let y;t[0]!==n||t[1]!==u||t[2]!==f||t[3]!==c||t[4]!==r||t[5]!==o||t[6]!==s?(y=()=>{if(!(c<=u&&u<=f)){h(`Sizes must satisfy min ≤ desired ≤ max`);return}s.mutate({clusterName:n,nodegroupName:r,minSize:c,desiredSize:u,maxSize:f},{onSuccess:()=>o(!1)})},t[0]=n,t[1]=u,t[2]=f,t[3]=c,t[4]=r,t[5]=o,t[6]=s,t[7]=y):y=t[7];let b=y,S;t[8]===r?S=t[9]:(S=(0,$.jsx)(ge,{children:(0,$.jsxs)(fe,{children:[`Scale `,r]})}),t[8]=r,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`scale-min`,children:`Min`})}),t[10]=C):C=t[10];let w;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>l(Number(e.target.value)),t[11]=w):w=t[11];let T;t[12]===c?T=t[13]:(T=(0,$.jsxs)(Y,{children:[C,(0,$.jsx)(v,{id:`scale-min`,onChange:w,type:`number`,value:c})]}),t[12]=c,t[13]=T);let E;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`scale-desired`,children:`Desired`})}),t[14]=E):E=t[14];let D;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>d(Number(e.target.value)),t[15]=D):D=t[15];let O;t[16]===u?O=t[17]:(O=(0,$.jsxs)(Y,{children:[E,(0,$.jsx)(v,{id:`scale-desired`,onChange:D,type:`number`,value:u})]}),t[16]=u,t[17]=O);let k;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`scale-max`,children:`Max`})}),t[18]=k):k=t[18];let A;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>p(Number(e.target.value)),t[19]=A):A=t[19];let j;t[20]===f?j=t[21]:(j=(0,$.jsxs)(Y,{children:[k,(0,$.jsx)(v,{id:`scale-max`,onChange:A,type:`number`,value:f})]}),t[20]=f,t[21]=j);let M;t[22]!==j||t[23]!==T||t[24]!==O?(M=(0,$.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[T,O,j]}),t[22]=j,t[23]=T,t[24]=O,t[25]=M):M=t[25];let N;t[26]===m?N=t[27]:(N=m&&(0,$.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:m}),t[26]=m,t[27]=N);let P;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(he,{children:`Cancel`}),t[28]=P):P=t[28];let F;t[29]===b?F=t[30]:(F=e=>{e.preventDefault(),b()},t[29]=b,t[30]=F);let I=s.isPending?`Scaling…`:`Scale`,L;t[31]!==s.isPending||t[32]!==F||t[33]!==I?(L=(0,$.jsxs)(me,{children:[P,(0,$.jsx)(pe,{disabled:s.isPending,onClick:F,children:I})]}),t[31]=s.isPending,t[32]=F,t[33]=I,t[34]=L):L=t[34];let R;t[35]!==M||t[36]!==N||t[37]!==L||t[38]!==S?(R=(0,$.jsxs)(de,{children:[S,M,N,L]}),t[35]=M,t[36]=N,t[37]=L,t[38]=S,t[39]=R):R=t[39];let z;return t[40]!==o||t[41]!==a||t[42]!==R?(z=(0,$.jsx)(_e,{onOpenChange:o,open:a,children:R}),t[40]=o,t[41]=a,t[42]=R,t[43]=z):z=t[43],z}function et(e){let t=(0,De.c)(71),{clusterName:n,clusterVersion:r,nodegroupName:a,onDelete:o}=e,s;t[0]!==n||t[1]!==a?(s=U(n,a),t[0]=n,t[1]=a,t[2]=s):s=t[2];let{data:c}=i(s),l=C(),u=c?.nodegroup,p=u?.scalingConfig,[m,g]=(0,Q.useState)(!1),[v,y]=(0,Q.useState)(!1),b=!!r&&!!u?.version&&u.version!==r,x=u?.amiType,S;t[3]===x?S=t[4]:(S=Ze(x),t[3]=x,t[4]=S);let w=S,T;t[5]===a?T=t[6]:(T=(0,$.jsx)(`span`,{children:a}),t[5]=a,t[6]=T);let E;t[7]===w?E=t[8]:(E=w&&(0,$.jsx)(xe,{variant:`secondary`,children:`GPU`}),t[7]=w,t[8]=E);let D;t[9]!==T||t[10]!==E?(D=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[T,E]}),t[9]=T,t[10]=E,t[11]=D):D=t[11];let O;t[12]===b?O=t[13]:(O=b&&(0,$.jsx)(_,{"aria-label":`Update node group version`,onClick:()=>y(!0),size:`icon`,variant:`ghost`,children:(0,$.jsx)(d,{className:`size-4`})}),t[12]=b,t[13]=O);let k;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>g(!0),t[14]=k):k=t[14];let A;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(_,{"aria-label":`Scale node group`,onClick:k,size:`icon`,variant:`ghost`,children:(0,$.jsx)(f,{className:`size-4`})}),t[15]=A):A=t[15];let j;t[16]!==a||t[17]!==o?(j=()=>o(a),t[16]=a,t[17]=o,t[18]=j):j=t[18];let M;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,$.jsx)(h,{className:`size-4`}),t[19]=M):M=t[19];let N;t[20]===j?N=t[21]:(N=(0,$.jsx)(_,{"aria-label":`Delete node group`,onClick:j,size:`icon`,variant:`ghost`,children:M}),t[20]=j,t[21]=N);let P;t[22]!==N||t[23]!==O?(P=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[O,A,N]}),t[22]=N,t[23]=O,t[24]=P):P=t[24];let F;t[25]!==P||t[26]!==D?(F=(0,$.jsx)(X.Header,{children:(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[D,P]})}),t[25]=P,t[26]=D,t[27]=F):F=t[27];let I=u?.status,L;t[28]===I?L=t[29]:(L=(0,$.jsx)(Z,{label:`Status`,value:I}),t[28]=I,t[29]=L);let R=b?`${u?.version} (cluster on ${r})`:u?.version,z;t[30]===R?z=t[31]:(z=(0,$.jsx)(Z,{label:`Kubernetes version`,value:R}),t[30]=R,t[31]=z);let B;t[32]===u?.instanceTypes?B=t[33]:(B=u?.instanceTypes?.join(`, `),t[32]=u?.instanceTypes,t[33]=B);let V;t[34]===B?V=t[35]:(V=(0,$.jsx)(Z,{label:`Instance types`,value:B}),t[34]=B,t[35]=V);let H=u?.amiType,W;t[36]===H?W=t[37]:(W=(0,$.jsx)(Z,{label:`AMI type`,value:H}),t[36]=H,t[37]=W);let G=u?.capacityType,K;t[38]===G?K=t[39]:(K=(0,$.jsx)(Z,{label:`Capacity type`,value:G}),t[38]=G,t[39]=K);let ee=p?`${p.minSize} / ${p.desiredSize} / ${p.maxSize}`:void 0,q;t[40]===ee?q=t[41]:(q=(0,$.jsx)(Z,{label:`Scaling (min / desired / max)`,value:ee}),t[40]=ee,t[41]=q);let te;t[42]!==L||t[43]!==z||t[44]!==V||t[45]!==W||t[46]!==K||t[47]!==q?(te=(0,$.jsxs)(X.Content,{children:[L,z,V,W,K,q]}),t[42]=L,t[43]=z,t[44]=V,t[45]=W,t[46]=K,t[47]=q,t[48]=te):te=t[48];let ne;t[49]===p?ne=t[50]:(ne=p??{},t[49]=p,t[50]=ne);let re;t[51]!==n||t[52]!==a||t[53]!==m||t[54]!==ne?(re=(0,$.jsx)($e,{clusterName:n,current:ne,nodegroupName:a,onOpenChange:g,open:m}),t[51]=n,t[52]=a,t[53]=m,t[54]=ne,t[55]=re):re=t[55];let ie=`Update node group "${a}" from ${u?.version} to ${r}? Nodes are replaced in a rolling update.`,ae;t[56]!==n||t[57]!==r||t[58]!==a||t[59]!==l?(ae=()=>l.mutate({clusterName:n,nodegroupName:a,version:r},{onSuccess:()=>y(!1)}),t[56]=n,t[57]=r,t[58]=a,t[59]=l,t[60]=ae):ae=t[60];let oe;t[61]!==v||t[62]!==ie||t[63]!==ae||t[64]!==l.isPending?(oe=(0,$.jsx)(ve,{confirmLabel:`Update`,description:ie,isPending:l.isPending,onConfirm:ae,onOpenChange:y,open:v,title:`Update node group version`}),t[61]=v,t[62]=ie,t[63]=ae,t[64]=l.isPending,t[65]=oe):oe=t[65];let se;return t[66]!==F||t[67]!==te||t[68]!==re||t[69]!==oe?(se=(0,$.jsxs)(X,{children:[F,te,re,oe]}),t[66]=F,t[67]=te,t[68]=re,t[69]=oe,t[70]=se):se=t[70],se}function tt(e){let t=(0,De.c)(143),{clusterName:n,vpcId:r,open:a,onOpenChange:o}=e,{data:s}=i(ne),{data:c}=i(y),{data:l}=i(b),u=w(),d;t[0]===s?.Roles?d=t[1]:(d=s?.Roles??[],t[0]=s?.Roles,t[1]=d);let f=d,p;t[2]===r?p=t[3]:(p=e=>e.VpcId===r,t[2]=r,t[3]=p);let m=(c?.Subnets??[]).filter(p),h;t[4]===l?.InstanceTypes?h=t[5]:(h=l?.InstanceTypes??[],t[4]=l?.InstanceTypes,t[5]=h);let g=h,_;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(_=oe(D),t[6]=_):_=t[6];let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:_,defaultValues:{nodegroupName:``,nodeRole:``,subnetIds:[],instanceTypes:`t3.medium`,amiType:`AL2_x86_64`,capacityType:`ON_DEMAND`,diskSize:20,minSize:1,desiredSize:2,maxSize:3}},t[7]=x):x=t[7];let{control:S,formState:C,handleSubmit:T,register:E,reset:O,setValue:A}=ie(x),{errors:j}=C,M;t[8]===S?M=t[9]:(M={control:S,name:`subnetIds`},t[8]=S,t[9]=M);let N=re(M),F;t[10]===N?F=t[11]:(F=new Set(N),t[10]=N,t[11]=F);let I=F,L;t[12]===S?L=t[13]:(L={control:S,name:`instanceTypes`},t[12]=S,t[13]=L);let R=re(L),z;t[14]!==g||t[15]!==R?(z=Qe(R,g),t[14]=g,t[15]=R,t[16]=z):z=t[16];let B=z,V;t[17]!==N||t[18]!==A?(V=e=>{let t=N.includes(e)?N.filter(t=>t!==e):[...N,e];A(`subnetIds`,t,{shouldValidate:!0})},t[17]=N,t[18]=A,t[19]=V):V=t[19];let H=V,U;t[20]!==n||t[21]!==u||t[22]!==o||t[23]!==O?(U=async e=>{await u.mutateAsync({clusterName:n,nodegroupName:e.nodegroupName,nodeRole:e.nodeRole,subnetIds:e.subnetIds,instanceTypes:e.instanceTypes.split(`,`).map(at).filter(Boolean),amiType:e.amiType,capacityType:e.capacityType,diskSize:e.diskSize,minSize:e.minSize,desiredSize:e.desiredSize,maxSize:e.maxSize}),O(),o(!1)},t[20]=n,t[21]=u,t[22]=o,t[23]=O,t[24]=U):U=t[24];let W=U,G=_e,K=de,ee;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,$.jsx)(ge,{children:(0,$.jsx)(fe,{children:`Add node group`})}),t[25]=ee):ee=t[25];let q;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-name`,children:`Name`})}),t[26]=q):q=t[26];let te=!!j.nodegroupName,se;t[27]===E?se=t[28]:(se=E(`nodegroupName`),t[27]=E,t[28]=se);let ce;t[29]!==te||t[30]!==se?(ce=(0,$.jsx)(v,{"aria-invalid":te,id:`ng-name`,placeholder:`my-nodegroup`,...se}),t[29]=te,t[30]=se,t[31]=ce):ce=t[31];let ve;t[32]===j.nodegroupName?ve=t[33]:(ve=(0,$.jsx)(ue,{errors:[j.nodegroupName]}),t[32]=j.nodegroupName,t[33]=ve);let X;t[34]!==ce||t[35]!==ve?(X=(0,$.jsxs)(Y,{children:[q,ce,ve]}),t[34]=ce,t[35]=ve,t[36]=X):X=t[36];let Z;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(Z=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-role`,children:`Node IAM role`})}),t[37]=Z):Z=t[37];let ye=!!j.nodeRole,xe;t[38]===E?xe=t[39]:(xe=E(`nodeRole`),t[38]=E,t[39]=xe);let Se;t[40]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,$.jsx)(`option`,{value:``,children:`Select role`}),t[40]=Se):Se=t[40];let Ce;t[41]===f?Ce=t[42]:(Ce=f.map(it),t[41]=f,t[42]=Ce);let we;t[43]!==ye||t[44]!==xe||t[45]!==Ce?(we=(0,$.jsxs)(`select`,{"aria-invalid":ye,className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-role`,...xe,children:[Se,Ce]}),t[43]=ye,t[44]=xe,t[45]=Ce,t[46]=we):we=t[46];let Te;t[47]===j.nodeRole?Te=t[48]:(Te=(0,$.jsx)(ue,{errors:[j.nodeRole]}),t[47]=j.nodeRole,t[48]=Te);let Ee;t[49]!==we||t[50]!==Te?(Ee=(0,$.jsxs)(Y,{children:[Z,we,Te]}),t[49]=we,t[50]=Te,t[51]=Ee):Ee=t[51];let Q=Y,Oe;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,$.jsx)(J,{children:`Subnets`}),t[52]=Oe):Oe=t[52];let ke=m.length===0?(0,$.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the cluster VPC.`}):(0,$.jsx)(`div`,{className:`space-y-1`,children:m.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,$.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:I.has(e.SubnetId??``),onChange:()=>H(e.SubnetId??``),type:`checkbox`}),(0,$.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` · `,e.CidrBlock]})]},e.SubnetId))}),Ae;t[53]===j.subnetIds?Ae=t[54]:(Ae=(0,$.jsx)(ue,{errors:[j.subnetIds]}),t[53]=j.subnetIds,t[54]=Ae);let je;t[55]!==Q||t[56]!==Oe||t[57]!==ke||t[58]!==Ae?(je=(0,$.jsxs)(Q,{children:[Oe,ke,Ae]}),t[55]=Q,t[56]=Oe,t[57]=ke,t[58]=Ae,t[59]=je):je=t[59];let Me;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(Me=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-instance-type`,children:`Instance type`})}),t[60]=Me):Me=t[60];let Ne;t[61]!==j.instanceTypes||t[62]!==g?(Ne=e=>{let{field:t}=e;return(0,$.jsx)(be,{"aria-invalid":!!j.instanceTypes,id:`ng-instance-type`,instanceTypes:g,onValueChange:t.onChange,value:t.value})},t[61]=j.instanceTypes,t[62]=g,t[63]=Ne):Ne=t[63];let Pe;t[64]!==S||t[65]!==Ne?(Pe=(0,$.jsx)(ae,{control:S,name:`instanceTypes`,render:Ne}),t[64]=S,t[65]=Ne,t[66]=Pe):Pe=t[66];let Fe;t[67]===B?Fe=t[68]:(Fe=B&&(0,$.jsxs)(le,{children:[`GPU node AMI is auto-selected for this instance type. This node group is tainted `,(0,$.jsx)(`code`,{children:`nvidia.com/gpu=present:NoSchedule`}),` `,`by default, so ordinary pods won't schedule onto GPU workers.`]}),t[67]=B,t[68]=Fe);let Ie;t[69]===j.instanceTypes?Ie=t[70]:(Ie=(0,$.jsx)(ue,{errors:[j.instanceTypes]}),t[69]=j.instanceTypes,t[70]=Ie);let Le;t[71]!==Pe||t[72]!==Fe||t[73]!==Ie?(Le=(0,$.jsxs)(Y,{children:[Me,Pe,Fe,Ie]}),t[71]=Pe,t[72]=Fe,t[73]=Ie,t[74]=Le):Le=t[74];let Re;t[75]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-ami`,children:`AMI type`})}),t[75]=Re):Re=t[75];let ze;t[76]===E?ze=t[77]:(ze=E(`amiType`),t[76]=E,t[77]=ze);let Be;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(Be=P.map(rt),t[78]=Be):Be=t[78];let Ve;t[79]===ze?Ve=t[80]:(Ve=(0,$.jsxs)(Y,{children:[Re,(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-ami`,...ze,children:Be})]}),t[79]=ze,t[80]=Ve);let He;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-capacity`,children:`Capacity type`})}),t[81]=He):He=t[81];let Ue;t[82]===E?Ue=t[83]:(Ue=E(`capacityType`),t[82]=E,t[83]=Ue);let We;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(We=k.map(nt),t[84]=We):We=t[84];let Ge;t[85]===Ue?Ge=t[86]:(Ge=(0,$.jsxs)(Y,{children:[He,(0,$.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-capacity`,...Ue,children:We})]}),t[85]=Ue,t[86]=Ge);let Ke;t[87]!==Ve||t[88]!==Ge?(Ke=(0,$.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[Ve,Ge]}),t[87]=Ve,t[88]=Ge,t[89]=Ke):Ke=t[89];let qe;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-disk`,children:`Disk (GB)`})}),t[90]=qe):qe=t[90];let Je;t[91]===E?Je=t[92]:(Je=E(`diskSize`,{valueAsNumber:!0}),t[91]=E,t[92]=Je);let Ye;t[93]===Je?Ye=t[94]:(Ye=(0,$.jsxs)(Y,{children:[qe,(0,$.jsx)(v,{id:`ng-disk`,type:`number`,...Je})]}),t[93]=Je,t[94]=Ye);let Xe;t[95]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-min`,children:`Min`})}),t[95]=Xe):Xe=t[95];let Ze;t[96]===E?Ze=t[97]:(Ze=E(`minSize`,{valueAsNumber:!0}),t[96]=E,t[97]=Ze);let $e;t[98]===Ze?$e=t[99]:($e=(0,$.jsxs)(Y,{children:[Xe,(0,$.jsx)(v,{id:`ng-min`,type:`number`,...Ze})]}),t[98]=Ze,t[99]=$e);let et;t[100]===Symbol.for(`react.memo_cache_sentinel`)?(et=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-desired`,children:`Desired`})}),t[100]=et):et=t[100];let tt;t[101]===E?tt=t[102]:(tt=E(`desiredSize`,{valueAsNumber:!0}),t[101]=E,t[102]=tt);let ot;t[103]===tt?ot=t[104]:(ot=(0,$.jsxs)(Y,{children:[et,(0,$.jsx)(v,{id:`ng-desired`,type:`number`,...tt})]}),t[103]=tt,t[104]=ot);let st;t[105]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,$.jsx)(J,{children:(0,$.jsx)(`label`,{htmlFor:`ng-max`,children:`Max`})}),t[105]=st):st=t[105];let ct;t[106]===E?ct=t[107]:(ct=E(`maxSize`,{valueAsNumber:!0}),t[106]=E,t[107]=ct);let lt;t[108]===ct?lt=t[109]:(lt=(0,$.jsxs)(Y,{children:[st,(0,$.jsx)(v,{id:`ng-max`,type:`number`,...ct})]}),t[108]=ct,t[109]=lt);let ut;t[110]!==Ye||t[111]!==$e||t[112]!==ot||t[113]!==lt?(ut=(0,$.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[Ye,$e,ot,lt]}),t[110]=Ye,t[111]=$e,t[112]=ot,t[113]=lt,t[114]=ut):ut=t[114];let dt;t[115]===j.desiredSize?dt=t[116]:(dt=(0,$.jsx)(ue,{errors:[j.desiredSize]}),t[115]=j.desiredSize,t[116]=dt);let ft;t[117]!==X||t[118]!==Ee||t[119]!==je||t[120]!==Le||t[121]!==Ke||t[122]!==ut||t[123]!==dt?(ft=(0,$.jsxs)(`form`,{className:`space-y-4`,id:`add-nodegroup-form`,children:[X,Ee,je,Le,Ke,ut,dt]}),t[117]=X,t[118]=Ee,t[119]=je,t[120]=Le,t[121]=Ke,t[122]=ut,t[123]=dt,t[124]=ft):ft=t[124];let pt;t[125]===Symbol.for(`react.memo_cache_sentinel`)?(pt=(0,$.jsx)(he,{children:`Cancel`}),t[125]=pt):pt=t[125];let mt;t[126]!==T||t[127]!==W?(mt=e=>{e.preventDefault(),T(W)()},t[126]=T,t[127]=W,t[128]=mt):mt=t[128];let ht=u.isPending?`Creating…`:`Create`,gt;t[129]!==u.isPending||t[130]!==mt||t[131]!==ht?(gt=(0,$.jsxs)(me,{children:[pt,(0,$.jsx)(pe,{disabled:u.isPending,onClick:mt,children:ht})]}),t[129]=u.isPending,t[130]=mt,t[131]=ht,t[132]=gt):gt=t[132];let _t;t[133]!==K||t[134]!==ee||t[135]!==ft||t[136]!==gt?(_t=(0,$.jsxs)(K,{className:`max-h-[85vh] overflow-y-auto`,children:[ee,ft,gt]}),t[133]=K,t[134]=ee,t[135]=ft,t[136]=gt,t[137]=_t):_t=t[137];let vt;return t[138]!==G||t[139]!==o||t[140]!==a||t[141]!==_t?(vt=(0,$.jsx)(G,{onOpenChange:o,open:a,children:_t}),t[138]=G,t[139]=o,t[140]=a,t[141]=_t,t[142]=vt):vt=t[142],vt}function nt(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function rt(e){return(0,$.jsx)(`option`,{value:e,children:e},e)}function it(e){return(0,$.jsx)(`option`,{value:e.Arn??``,children:e.RoleName},e.Arn)}function at(e){return e.trim()}function ot(e){let t=(0,De.c)(27),{clusterName:n,clusterVersion:r,vpcId:i}=e,o;t[0]===n?o=t[1]:(o=te(n),t[0]=n,t[1]=o);let{data:s}=a(o),c=z(),[l,u]=(0,Q.useState)(!1),[d,f]=(0,Q.useState)(),p;t[2]===s.nodegroups?p=t[3]:(p=s.nodegroups??[],t[2]=s.nodegroups,t[3]=p);let m=p,h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,$.jsx)(_,{onClick:()=>u(!0),size:`sm`,children:`Add node group`})}),t[4]=h):h=t[4];let g;t[5]!==n||t[6]!==r||t[7]!==m?(g=m.length>0?(0,$.jsx)(`div`,{className:`space-y-4`,children:m.map(e=>(0,$.jsx)(et,{clusterName:n,clusterVersion:r,nodegroupName:e,onDelete:f},e))}):(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:`No node groups.`}),t[5]=n,t[6]=r,t[7]=m,t[8]=g):g=t[8];let v;t[9]!==n||t[10]!==l||t[11]!==i?(v=(0,$.jsx)(tt,{clusterName:n,onOpenChange:u,open:l,vpcId:i}),t[9]=n,t[10]=l,t[11]=i,t[12]=v):v=t[12];let y=`Delete node group "${d??``}"? This terminates its nodes.`,b;t[13]!==n||t[14]!==c||t[15]!==d?(b=()=>{d&&c.mutate({clusterName:n,nodegroupName:d},{onSuccess:()=>f(void 0)})},t[13]=n,t[14]=c,t[15]=d,t[16]=b):b=t[16];let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>!e&&f(void 0),t[17]=x):x=t[17];let S=d!==void 0,C;t[18]!==c.isPending||t[19]!==y||t[20]!==b||t[21]!==S?(C=(0,$.jsx)(ve,{description:y,isPending:c.isPending,onConfirm:b,onOpenChange:x,open:S,title:`Delete node group`}),t[18]=c.isPending,t[19]=y,t[20]=b,t[21]=S,t[22]=C):C=t[22];let w;return t[23]!==C||t[24]!==g||t[25]!==v?(w=(0,$.jsxs)($.Fragment,{children:[h,g,v,C]}),t[23]=C,t[24]=g,t[25]=v,t[26]=w):w=t[26],w}function st(e){switch(e??``){case`ACTIVE`:return`default`;case`FAILED`:return`destructive`;default:return`secondary`}}function ct(e){let t=(0,De.c)(134),{clusterName:n}=e,r=s(),[i,o]=(0,Q.useState)(!1),d;t[0]===n?d=t[1]:(d=ee(n),t[0]=n,t[1]=d);let{data:f}=a(d),p=T(),{cluster:v}=f,y,b,x,S,C,w,E,D,O,k,A,j,M,N,P,F,I,L;if(t[2]!==v?.arn||t[3]!==v?.health?.issues||t[4]!==v?.status||t[5]!==n||t[6]!==p||t[7]!==r){let e=v?.health?.issues??[],i;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(i={type:`bin`,value:`aws eks update-kubeconfig`},t[26]=i):i=t[26];let a;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(a={type:`flag`,value:` --name `},t[27]=a):a=t[27];let s;t[28]===n?s=t[29]:(s={type:`value`,value:n},t[28]=n,t[29]=s);let c;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(c={type:`flag`,value:` --region `},t[30]=c):c=t[30];let d;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(d={type:`value`,value:l()},t[31]=d):d=t[31];let f;t[32]===s?f=t[33]:(f={label:`Configure kubectl`,parts:[i,a,s,c,d]},t[32]=s,t[33]=f);let m;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(m={label:`Verify access`,parts:[{type:`bin`,value:`kubectl get nodes`}]},t[34]=m):m=t[34];let T;t[35]===f?T=t[36]:(T=[f,m],t[35]=f,t[36]=T),E=T;let R;t[37]!==n||t[38]!==p||t[39]!==r?(R=function(){p.mutate(n,{onSuccess:()=>{r({to:`/eks/list-clusters`})}})},t[37]=n,t[38]=p,t[39]=r,t[40]=R):R=t[40],w=R,t[41]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(u,{to:`/eks/list-clusters`,children:`Clusters`}),t[41]=D):D=t[41];let z;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(z=()=>o(!0),t[42]=z):z=t[42];let B;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,$.jsxs)(_,{onClick:z,size:`sm`,variant:`destructive`,children:[(0,$.jsx)(h,{className:`size-4`}),`Delete`]}),t[43]=B):B=t[43];let V=v?.status,H;t[44]===V?H=t[45]:(H=st(V),t[44]=V,t[45]=H);let U=v?.status??`UNKNOWN`,W;t[46]!==H||t[47]!==U?(W=(0,$.jsx)(xe,{variant:H,children:U}),t[46]=H,t[47]=U,t[48]=W):W=t[48];let G=e.length>0&&(0,$.jsxs)(xe,{variant:`destructive`,children:[(0,$.jsx)(g,{className:`size-3`}),e.length===1?`1 health issue`:`${e.length} health issues`]}),K;t[49]!==W||t[50]!==G?(K=(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[B,W,G]}),t[49]=W,t[50]=G,t[51]=K):K=t[51],t[52]!==n||t[53]!==K?(O=(0,$.jsx)(ce,{actions:K,subtitle:`Cluster Details`,title:n}),t[52]=n,t[53]=K,t[54]=O):O=t[54],t[55]!==p.error||t[56]!==p.isError?(k=p.isError&&(0,$.jsx)(se,{error:p.error instanceof Error?p.error:void 0,msg:`Failed to delete cluster.`}),t[55]=p.error,t[56]=p.isError,t[57]=k):k=t[57],C=Te,I=`overview`,t[58]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,$.jsxs)(Ce,{children:[(0,$.jsx)(Se,{value:`overview`,children:`Overview`}),(0,$.jsx)(Se,{value:`compute`,children:`Compute`}),(0,$.jsx)(Se,{value:`addons`,children:`Add-ons`}),(0,$.jsx)(Se,{value:`access`,children:`Access`}),(0,$.jsx)(Se,{value:`networking`,children:`Networking`}),(0,$.jsx)(Se,{value:`connect`,children:`Connect`})]}),t[58]=L):L=t[58],S=we,F=`overview`,x=X,t[59]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,$.jsx)(X.Header,{children:`Cluster`}),t[59]=P):P=t[59],b=X.Content;let ee=v?.arn;t[60]===ee?M=t[61]:(M=(0,$.jsx)(Z,{label:`ARN`,value:ee}),t[60]=ee,t[61]=M);let q=v?.status;t[62]===q?N=t[63]:(N=(0,$.jsx)(Z,{label:`Status`,value:q}),t[62]=q,t[63]=N),y=Z,A=`Health`,j=e.length>0?e.map(lt).filter(Boolean).join(`; `):`OK`,t[2]=v?.arn,t[3]=v?.health?.issues,t[4]=v?.status,t[5]=n,t[6]=p,t[7]=r,t[8]=y,t[9]=b,t[10]=x,t[11]=S,t[12]=C,t[13]=w,t[14]=E,t[15]=D,t[16]=O,t[17]=k,t[18]=A,t[19]=j,t[20]=M,t[21]=N,t[22]=P,t[23]=F,t[24]=I,t[25]=L}else y=t[8],b=t[9],x=t[10],S=t[11],C=t[12],w=t[13],E=t[14],D=t[15],O=t[16],k=t[17],A=t[18],j=t[19],M=t[20],N=t[21],P=t[22],F=t[23],I=t[24],L=t[25];let R;t[64]!==y||t[65]!==A||t[66]!==j?(R=(0,$.jsx)(y,{label:A,value:j}),t[64]=y,t[65]=A,t[66]=j,t[67]=R):R=t[67];let z=v?.version,B;t[68]===z?B=t[69]:(B=(0,$.jsx)(Z,{label:`Kubernetes version`,value:z}),t[68]=z,t[69]=B);let V=v?.platformVersion,H;t[70]===V?H=t[71]:(H=(0,$.jsx)(Z,{label:`Platform version`,value:V}),t[70]=V,t[71]=H);let U=v?.endpoint,W;t[72]===U?W=t[73]:(W=(0,$.jsx)(Z,{label:`Endpoint`,value:U}),t[72]=U,t[73]=W);let G=v?.identity?.oidc?.issuer,K;t[74]===G?K=t[75]:(K=(0,$.jsx)(Z,{label:`OIDC issuer`,value:G}),t[74]=G,t[75]=K);let q=v?.resourcesVpcConfig?.vpcId,te;t[76]===q?te=t[77]:(te=(0,$.jsx)(Z,{label:`VPC`,value:q}),t[76]=q,t[77]=te);let ne=v?.createdAt,re;t[78]===ne?re=t[79]:(re=c(ne),t[78]=ne,t[79]=re);let ie;t[80]===re?ie=t[81]:(ie=(0,$.jsx)(Z,{label:`Created at`,value:re}),t[80]=re,t[81]=ie);let ae;t[82]!==b||t[83]!==R||t[84]!==B||t[85]!==H||t[86]!==W||t[87]!==K||t[88]!==te||t[89]!==ie||t[90]!==M||t[91]!==N?(ae=(0,$.jsxs)(b,{children:[M,N,R,B,H,W,K,te,ie]}),t[82]=b,t[83]=R,t[84]=B,t[85]=H,t[86]=W,t[87]=K,t[88]=te,t[89]=ie,t[90]=M,t[91]=N,t[92]=ae):ae=t[92];let oe;t[93]!==x||t[94]!==ae||t[95]!==P?(oe=(0,$.jsxs)(x,{children:[P,ae]}),t[93]=x,t[94]=ae,t[95]=P,t[96]=oe):oe=t[96];let J;t[97]!==S||t[98]!==oe||t[99]!==F?(J=(0,$.jsx)(S,{value:F,children:oe}),t[97]=S,t[98]=oe,t[99]=F,t[100]=J):J=t[100];let le=v?.version,ue=v?.resourcesVpcConfig?.vpcId,Y;t[101]!==n||t[102]!==le||t[103]!==ue?(Y=(0,$.jsx)(we,{value:`compute`,children:(0,$.jsx)(ot,{clusterName:n,clusterVersion:le,vpcId:ue})}),t[101]=n,t[102]=le,t[103]=ue,t[104]=Y):Y=t[104];let de;t[105]===n?de=t[106]:(de=(0,$.jsx)(we,{value:`addons`,children:(0,$.jsx)(Ge,{clusterName:n})}),t[105]=n,t[106]=de);let fe;t[107]===n?fe=t[108]:(fe=(0,$.jsx)(we,{value:`access`,children:(0,$.jsx)(Ne,{clusterName:n})}),t[107]=n,t[108]=fe);let pe;t[109]===v?pe=t[110]:(pe=(0,$.jsx)(we,{value:`networking`,children:(0,$.jsx)(qe,{cluster:v})}),t[109]=v,t[110]=pe);let me;t[111]===E?me=t[112]:(me=(0,$.jsx)(we,{value:`connect`,children:(0,$.jsx)(m,{commands:E})}),t[111]=E,t[112]=me);let he;t[113]!==C||t[114]!==J||t[115]!==Y||t[116]!==de||t[117]!==fe||t[118]!==pe||t[119]!==me||t[120]!==I||t[121]!==L?(he=(0,$.jsxs)(C,{defaultValue:I,children:[L,J,Y,de,fe,pe,me]}),t[113]=C,t[114]=J,t[115]=Y,t[116]=de,t[117]=fe,t[118]=pe,t[119]=me,t[120]=I,t[121]=L,t[122]=he):he=t[122];let ge=`This permanently deletes cluster "${n}" and its control plane. This cannot be undone.`,_e;t[123]!==p.isPending||t[124]!==w||t[125]!==i||t[126]!==ge?(_e=(0,$.jsx)(ve,{description:ge,isPending:p.isPending,onConfirm:w,onOpenChange:o,open:i,title:`Delete cluster`}),t[123]=p.isPending,t[124]=w,t[125]=i,t[126]=ge,t[127]=_e):_e=t[127];let ye;return t[128]!==D||t[129]!==O||t[130]!==k||t[131]!==he||t[132]!==_e?(ye=(0,$.jsxs)($.Fragment,{children:[D,O,k,he,_e]}),t[128]=D,t[129]=O,t[130]=k,t[131]=he,t[132]=_e,t[133]=ye):ye=t[133],ye}function lt(e){return e.message}function ut(){let e=(0,De.c)(2),{clusterName:t}=p.useParams(),n;return e[0]===t?n=e[1]:(n=(0,$.jsx)(ct,{clusterName:t}),e[0]=t,e[1]=n),n}export{ut as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./link.js";import{t as s}from"./useNavigate.js";import{Qt as c,t as l}from"./cluster-config.js";import{t as u}from"./back-link.js";import{t as d}from"./circle-arrow-up.js";import{n as f,t as p}from"./_clusterName.js";import{t as m}from"./cli-command-panel.js";import{t as h}from"./trash-2.js";import{t as g}from"./triangle-alert.js";import{t as _}from"./button.js";import{t as v}from"./input.js";import{O as y,c as b}from"./ec2.js";import{C as x,S,T as C,_ as w,b as T,c as E,f as D,h as O,i as k,l as A,m as j,n as M,p as N,r as P,s as F,u as I,v as L,w as R,x as z,y as B}from"./eks.js";import{a as V,i as H,l as U,n as W,o as ee,r as te,s as ne,t as G,u as re}from"./eks2.js";import{y as ie}from"./iam2.js";import{a as ae,i as oe,n as se,t as ce}from"./zod.js";import{t as le}from"./error-banner.js";import{t as ue}from"./page-heading.js";import{a as K,n as de,r as fe,t as q}from"./field.js";import{i as pe,l as me,n as he,o as ge,r as _e,s as ve,t as ye}from"./alert-dialog.js";import{t as be}from"./delete-confirmation-dialog.js";import{n as J,t as Y}from"./detail-row.js";import{n as xe,t as Se}from"./gpu-instance-type-select.js";import{t as Ce}from"./badge.js";import{i as we,n as Te,r as Ee,t as De}from"./tabs.js";import{t as Oe}from"./json-editor.js";var ke=r(),X=e(n(),1),Z=t();function Ae(e){return e?.split(`/`).pop()??e??``}function Q(e){let t=(0,ke.c)(55),{clusterName:n,principalArn:r,onDelete:a}=e,o;t[0]!==n||t[1]!==r?(o=W(n,r),t[0]=n,t[1]=r,t[2]=o):o=t[2];let{data:s}=i(o),c;t[3]!==n||t[4]!==r?(c=ee(n,r),t[3]=n,t[4]=r,t[5]=c):c=t[5];let{data:l}=i(c),u=N(),d=S(),[f,p]=(0,X.useState)(M[0].arn),m=s?.accessEntry,g;t[6]===l?.associatedAccessPolicies?g=t[7]:(g=l?.associatedAccessPolicies??[],t[6]=l?.associatedAccessPolicies,t[7]=g);let v=g,y;t[8]===r?y=t[9]:(y=(0,Z.jsx)(`span`,{className:`truncate font-mono text-xs`,children:r}),t[8]=r,t[9]=y);let b;t[10]!==a||t[11]!==r?(b=()=>a(r),t[10]=a,t[11]=r,t[12]=b):b=t[12];let x;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(h,{className:`size-4`}),t[13]=x):x=t[13];let C;t[14]===b?C=t[15]:(C=(0,Z.jsx)(_,{onClick:b,size:`icon`,variant:`ghost`,children:x}),t[14]=b,t[15]=C);let w;t[16]!==y||t[17]!==C?(w=(0,Z.jsx)(J.Header,{children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[y,C]})}),t[16]=y,t[17]=C,t[18]=w):w=t[18];let T=m?.type,E;t[19]===T?E=t[20]:(E=(0,Z.jsx)(Y,{label:`Type`,value:T}),t[19]=T,t[20]=E);let D;t[21]===m?D=t[22]:(D=m?.kubernetesGroups?.length?m.kubernetesGroups.join(`, `):`—`,t[21]=m,t[22]=D);let O;t[23]===D?O=t[24]:(O=(0,Z.jsx)(Y,{label:`Kubernetes groups`,value:D}),t[23]=D,t[24]=O);let k;t[25]!==v||t[26]!==n||t[27]!==d||t[28]!==r?(k=v.length>0?(0,Z.jsx)(`div`,{className:`space-y-1`,children:v.map(e=>(0,Z.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,Z.jsx)(`span`,{children:Ae(e.policyArn)}),(0,Z.jsx)(_,{onClick:()=>d.mutate({clusterName:n,principalArn:r,policyArn:e.policyArn??``}),size:`sm`,variant:`ghost`,children:`Remove`})]},e.policyArn))}):`—`,t[25]=v,t[26]=n,t[27]=d,t[28]=r,t[29]=k):k=t[29];let A;t[30]===k?A=t[31]:(A=(0,Z.jsx)(Y,{label:`Access policies`,value:k}),t[30]=k,t[31]=A);let j;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(j=e=>p(e.target.value),t[32]=j):j=t[32];let P;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(P=M.map(je),t[33]=P):P=t[33];let F;t[34]===f?F=t[35]:(F=(0,Z.jsx)(`select`,{"aria-label":`Access policy`,className:`h-7 flex-1 rounded-md border border-input bg-input/20 px-2 text-sm`,onChange:j,value:f,children:P}),t[34]=f,t[35]=F);let I;t[36]!==u||t[37]!==n||t[38]!==f||t[39]!==r?(I=()=>u.mutate({clusterName:n,principalArn:r,policyArn:f,accessScopeType:`cluster`}),t[36]=u,t[37]=n,t[38]=f,t[39]=r,t[40]=I):I=t[40];let L;t[41]!==u.isPending||t[42]!==I?(L=(0,Z.jsx)(_,{disabled:u.isPending,onClick:I,size:`sm`,children:`Associate`}),t[41]=u.isPending,t[42]=I,t[43]=L):L=t[43];let R;t[44]!==F||t[45]!==L?(R=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2 pt-2`,children:[F,L]}),t[44]=F,t[45]=L,t[46]=R):R=t[46];let z;t[47]!==E||t[48]!==O||t[49]!==A||t[50]!==R?(z=(0,Z.jsxs)(J.Content,{children:[E,O,A,R]}),t[47]=E,t[48]=O,t[49]=A,t[50]=R,t[51]=z):z=t[51];let B;return t[52]!==z||t[53]!==w?(B=(0,Z.jsxs)(J,{children:[w,z]}),t[52]=z,t[53]=w,t[54]=B):B=t[54],B}function je(e){return(0,Z.jsx)(`option`,{value:e.arn,children:e.name},e.arn)}function $(e){let t=(0,ke.c)(41),{clusterName:n,open:r,onOpenChange:i}=e,a=j(),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:ce(A),defaultValues:{principalArn:``,kubernetesGroups:``}},t[0]=o):o=t[0];let{formState:s,handleSubmit:c,register:l,reset:u}=oe(o),{errors:d}=s,f;t[1]!==n||t[2]!==a||t[3]!==i||t[4]!==u?(f=async e=>{await a.mutateAsync({clusterName:n,principalArn:e.principalArn,kubernetesGroups:e.kubernetesGroups.split(`,`).map(Me).filter(Boolean)}),u(),i(!1)},t[1]=n,t[2]=a,t[3]=i,t[4]=u,t[5]=f):f=t[5];let p=f,m;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Z.jsx)(ve,{children:(0,Z.jsx)(me,{children:`Add access entry`})}),t[6]=m):m=t[6];let h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ae-principal`,children:`IAM principal ARN`})}),t[7]=h):h=t[7];let g=!!d.principalArn,_;t[8]===l?_=t[9]:(_=l(`principalArn`),t[8]=l,t[9]=_);let y;t[10]!==g||t[11]!==_?(y=(0,Z.jsx)(v,{"aria-invalid":g,id:`ae-principal`,placeholder:`arn:aws:iam::000000000000:role/my-role`,..._}),t[10]=g,t[11]=_,t[12]=y):y=t[12];let b;t[13]===d.principalArn?b=t[14]:(b=(0,Z.jsx)(fe,{errors:[d.principalArn]}),t[13]=d.principalArn,t[14]=b);let x;t[15]!==y||t[16]!==b?(x=(0,Z.jsxs)(q,{children:[h,y,b]}),t[15]=y,t[16]=b,t[17]=x):x=t[17];let S;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ae-groups`,children:`Kubernetes groups`})}),t[18]=S):S=t[18];let C;t[19]===l?C=t[20]:(C=l(`kubernetesGroups`),t[19]=l,t[20]=C);let w;t[21]===C?w=t[22]:(w=(0,Z.jsxs)(q,{children:[S,(0,Z.jsx)(v,{id:`ae-groups`,placeholder:`system:masters`,...C})]}),t[21]=C,t[22]=w);let T;t[23]!==x||t[24]!==w?(T=(0,Z.jsxs)(`form`,{className:`space-y-4`,id:`add-access-entry-form`,children:[x,w]}),t[23]=x,t[24]=w,t[25]=T):T=t[25];let E;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(_e,{children:`Cancel`}),t[26]=E):E=t[26];let D;t[27]!==c||t[28]!==p?(D=e=>{e.preventDefault(),c(p)()},t[27]=c,t[28]=p,t[29]=D):D=t[29];let O=a.isPending?`Creating…`:`Create`,k;t[30]!==a.isPending||t[31]!==D||t[32]!==O?(k=(0,Z.jsxs)(ge,{children:[E,(0,Z.jsx)(he,{disabled:a.isPending,onClick:D,children:O})]}),t[30]=a.isPending,t[31]=D,t[32]=O,t[33]=k):k=t[33];let M;t[34]!==T||t[35]!==k?(M=(0,Z.jsxs)(pe,{children:[m,T,k]}),t[34]=T,t[35]=k,t[36]=M):M=t[36];let N;return t[37]!==i||t[38]!==r||t[39]!==M?(N=(0,Z.jsx)(ye,{onOpenChange:i,open:r,children:M}),t[37]=i,t[38]=r,t[39]=M,t[40]=N):N=t[40],N}function Me(e){return e.trim()}function Ne(e){let t=(0,ke.c)(25),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=G(n),t[0]=n,t[1]=r);let{data:i}=a(r),o=L(),[s,c]=(0,X.useState)(!1),[l,u]=(0,X.useState)(),d;t[2]===i.accessEntries?d=t[3]:(d=i.accessEntries??[],t[2]=i.accessEntries,t[3]=d);let f=d,p;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Z.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,Z.jsx)(_,{onClick:()=>c(!0),size:`sm`,children:`Add access entry`})}),t[4]=p):p=t[4];let m;t[5]!==n||t[6]!==f?(m=f.length>0?(0,Z.jsx)(`div`,{className:`space-y-4`,children:f.map(e=>(0,Z.jsx)(Q,{clusterName:n,onDelete:u,principalArn:e},e))}):(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:`No access entries.`}),t[5]=n,t[6]=f,t[7]=m):m=t[7];let h;t[8]!==n||t[9]!==s?(h=(0,Z.jsx)($,{clusterName:n,onOpenChange:c,open:s}),t[8]=n,t[9]=s,t[10]=h):h=t[10];let g=`Delete access entry for "${l??``}"?`,v;t[11]!==n||t[12]!==o||t[13]!==l?(v=()=>{l&&o.mutate({clusterName:n,principalArn:l},{onSuccess:()=>u(void 0)})},t[11]=n,t[12]=o,t[13]=l,t[14]=v):v=t[14];let y;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>!e&&u(void 0),t[15]=y):y=t[15];let b=l!==void 0,x;t[16]!==o.isPending||t[17]!==g||t[18]!==v||t[19]!==b?(x=(0,Z.jsx)(be,{description:g,isPending:o.isPending,onConfirm:v,onOpenChange:y,open:b,title:`Delete access entry`}),t[16]=o.isPending,t[17]=g,t[18]=v,t[19]=b,t[20]=x):x=t[20];let S;return t[21]!==x||t[22]!==m||t[23]!==h?(S=(0,Z.jsxs)(Z.Fragment,{children:[p,m,h,x]}),t[21]=x,t[22]=m,t[23]=h,t[24]=S):S=t[24],S}var Pe=new Set([`CREATING`,`UPDATING`,`DELETING`]),Fe=5e3,Ie=`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`;function Le(e){let t=(0,ke.c)(97),{clusterName:n,catalog:r,installed:i,open:a,onOpenChange:o}=e,s=O(),c;t[0]===i?c=t[1]:(c=new Set(i),t[0]=i,t[1]=c);let l=c,u;t[2]===l?u=t[3]:(u=e=>!l.has(e.addonName??``),t[2]=l,t[3]=u);let d=r.filter(u),f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f={resolver:ce(I),defaultValues:{addonName:``,addonVersion:``,serviceAccountRoleArn:``,configurationValues:``}},t[4]=f):f=t[4];let{control:p,formState:m,handleSubmit:h,register:g,reset:_,setValue:y}=oe(f),{errors:b}=m,x;t[5]===p?x=t[6]:(x={control:p,name:`addonName`},t[5]=p,t[6]=x);let S=ae(x),C;t[7]===p?C=t[8]:(C={control:p,name:`addonVersion`},t[7]=p,t[8]=C);let w=ae(C),T;t[9]===S?T=t[10]:(T=e=>e.addonName===S,t[9]=S,t[10]=T);let E=r.find(T)?.addonVersions??[],D;t[11]===w?D=t[12]:(D=e=>e.addonVersion===w,t[11]=w,t[12]=D);let k=E.find(D)?.requiresIamPermissions??!1,A;t[13]!==r||t[14]!==y?(A=e=>{let t=r.find(t=>t.addonName===e)?.addonVersions?.[0]?.addonVersion??``;y(`addonName`,e,{shouldValidate:!0}),y(`addonVersion`,t,{shouldValidate:!0})},t[13]=r,t[14]=y,t[15]=A):A=t[15];let j=A,M;t[16]!==n||t[17]!==s||t[18]!==o||t[19]!==_?(M=async e=>{await s.mutateAsync({clusterName:n,addonName:e.addonName,addonVersion:e.addonVersion||void 0,serviceAccountRoleArn:e.serviceAccountRoleArn.trim()||void 0,configurationValues:e.configurationValues.trim()||void 0}),_(),o(!1)},t[16]=n,t[17]=s,t[18]=o,t[19]=_,t[20]=M):M=t[20];let N=M,P=ye,F=pe,L;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(ve,{children:(0,Z.jsx)(me,{children:`Add add-on`})}),t[21]=L):L=t[21];let R;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`addon-name`,children:`Add-on`})}),t[22]=R):R=t[22];let z=!!b.addonName,B;t[23]===j?B=t[24]:(B=e=>j(e.target.value),t[23]=j,t[24]=B);let V;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,Z.jsx)(`option`,{value:``,children:`Select add-on`}),t[25]=V):V=t[25];let H=d.map(ze),U;t[26]!==S||t[27]!==z||t[28]!==B||t[29]!==H?(U=(0,Z.jsxs)(`select`,{"aria-invalid":z,className:Ie,id:`addon-name`,onChange:B,value:S,children:[V,H]}),t[26]=S,t[27]=z,t[28]=B,t[29]=H,t[30]=U):U=t[30];let W;t[31]===b.addonName?W=t[32]:(W=(0,Z.jsx)(fe,{errors:[b.addonName]}),t[31]=b.addonName,t[32]=W);let ee;t[33]!==U||t[34]!==W?(ee=(0,Z.jsxs)(q,{children:[R,U,W]}),t[33]=U,t[34]=W,t[35]=ee):ee=t[35];let te=q,ne;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`addon-version`,children:`Version`})}),t[36]=ne):ne=t[36];let G=!!b.addonVersion,re=Ie,ie=E.length===0,le;t[37]===y?le=t[38]:(le=e=>y(`addonVersion`,e.target.value,{shouldValidate:!0}),t[37]=y,t[38]=le);let ue=E.map(Re),de;t[39]!==w||t[40]!==G||t[41]!==re||t[42]!==ie||t[43]!==le||t[44]!==ue?(de=(0,Z.jsx)(`select`,{"aria-invalid":G,className:re,disabled:ie,id:`addon-version`,onChange:le,value:w,children:ue}),t[39]=w,t[40]=G,t[41]=re,t[42]=ie,t[43]=le,t[44]=ue,t[45]=de):de=t[45];let be;t[46]===b.addonVersion?be=t[47]:(be=(0,Z.jsx)(fe,{errors:[b.addonVersion]}),t[46]=b.addonVersion,t[47]=be);let J;t[48]!==te||t[49]!==ne||t[50]!==de||t[51]!==be?(J=(0,Z.jsxs)(te,{children:[ne,de,be]}),t[48]=te,t[49]=ne,t[50]=de,t[51]=be,t[52]=J):J=t[52];let Y;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`addon-role`,children:`Service account IAM role ARN`})}),t[53]=Y):Y=t[53];let xe;t[54]===g?xe=t[55]:(xe=g(`serviceAccountRoleArn`),t[54]=g,t[55]=xe);let Se;t[56]===xe?Se=t[57]:(Se=(0,Z.jsx)(v,{id:`addon-role`,placeholder:`arn:aws:iam::…:role/…`,...xe}),t[56]=xe,t[57]=Se);let Ce;t[58]===k?Ce=t[59]:(Ce=k&&(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`This add-on needs IAM permissions — provide an IRSA role ARN.`}),t[58]=k,t[59]=Ce);let we;t[60]!==Se||t[61]!==Ce?(we=(0,Z.jsxs)(q,{children:[Y,Se,Ce]}),t[60]=Se,t[61]=Ce,t[62]=we):we=t[62];let Te;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`addon-config`,children:`Configuration values (JSON)`})}),t[63]=Te):Te=t[63];let Ee;t[64]===b.configurationValues?Ee=t[65]:(Ee=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,Z.jsx)(Oe,{error:!!b.configurationValues,id:`addon-config`,onBlur:n,onChange:r,placeholder:`{"replicaCount": 2}`,ref:i,rows:4,value:a})},t[64]=b.configurationValues,t[65]=Ee);let De;t[66]!==p||t[67]!==Ee?(De=(0,Z.jsx)(se,{control:p,name:`configurationValues`,render:Ee}),t[66]=p,t[67]=Ee,t[68]=De):De=t[68];let X;t[69]===b.configurationValues?X=t[70]:(X=(0,Z.jsx)(fe,{errors:[b.configurationValues]}),t[69]=b.configurationValues,t[70]=X);let Ae;t[71]!==De||t[72]!==X?(Ae=(0,Z.jsxs)(q,{children:[Te,De,X]}),t[71]=De,t[72]=X,t[73]=Ae):Ae=t[73];let Q;t[74]!==ee||t[75]!==J||t[76]!==we||t[77]!==Ae?(Q=(0,Z.jsxs)(`form`,{className:`space-y-4`,id:`add-addon-form`,children:[ee,J,we,Ae]}),t[74]=ee,t[75]=J,t[76]=we,t[77]=Ae,t[78]=Q):Q=t[78];let je;t[79]===Symbol.for(`react.memo_cache_sentinel`)?(je=(0,Z.jsx)(_e,{children:`Cancel`}),t[79]=je):je=t[79];let $;t[80]!==h||t[81]!==N?($=e=>{e.preventDefault(),h(N)()},t[80]=h,t[81]=N,t[82]=$):$=t[82];let Me=s.isPending?`Adding…`:`Add`,Ne;t[83]!==s.isPending||t[84]!==$||t[85]!==Me?(Ne=(0,Z.jsxs)(ge,{children:[je,(0,Z.jsx)(he,{disabled:s.isPending,onClick:$,children:Me})]}),t[83]=s.isPending,t[84]=$,t[85]=Me,t[86]=Ne):Ne=t[86];let Pe;t[87]!==F||t[88]!==L||t[89]!==Q||t[90]!==Ne?(Pe=(0,Z.jsxs)(F,{className:`max-h-[85vh] overflow-y-auto`,children:[L,Q,Ne]}),t[87]=F,t[88]=L,t[89]=Q,t[90]=Ne,t[91]=Pe):Pe=t[91];let Fe;return t[92]!==P||t[93]!==o||t[94]!==a||t[95]!==Pe?(Fe=(0,Z.jsx)(P,{onOpenChange:o,open:a,children:Pe}),t[92]=P,t[93]=o,t[94]=a,t[95]=Pe,t[96]=Fe):Fe=t[96],Fe}function Re(e,t){return(0,Z.jsxs)(`option`,{value:e.addonVersion??``,children:[e.addonVersion,t===0?` (latest)`:``]},e.addonVersion)}function ze(e){return(0,Z.jsx)(`option`,{value:e.addonName??``,children:e.addonName},e.addonName)}function Be(e){let t=(0,ke.c)(48),{clusterName:n,addonName:r,current:i,versions:a,open:o,onOpenChange:s}=e,c=R(),[l,u]=(0,X.useState)(i.addonVersion??``),[d,f]=(0,X.useState)(i.serviceAccountRoleArn??``),[p,m]=(0,X.useState)(i.configurationValues??``),[h,g]=(0,X.useState)(),[_,y]=(0,X.useState)(o);o!==_&&(y(o),o&&(u(i.addonVersion??``),f(i.serviceAccountRoleArn??``),m(i.configurationValues??``),g(void 0)));let b;t[0]!==r||t[1]!==n||t[2]!==p||t[3]!==s||t[4]!==d||t[5]!==c||t[6]!==l?(b=()=>{let e=F.safeParse(p);if(!e.success){g(e.error.issues[0]?.message??`Configuration must be valid JSON`);return}g(void 0),c.mutate({clusterName:n,addonName:r,addonVersion:l||void 0,serviceAccountRoleArn:d.trim()||void 0,configurationValues:p.trim()||void 0},{onSuccess:()=>s(!1)})},t[0]=r,t[1]=n,t[2]=p,t[3]=s,t[4]=d,t[5]=c,t[6]=l,t[7]=b):b=t[7];let x=b,S;t[8]===r?S=t[9]:(S=(0,Z.jsx)(ve,{children:(0,Z.jsxs)(me,{children:[`Update `,r]})}),t[8]=r,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`update-addon-version`,children:`Version`})}),t[10]=C):C=t[10];let w=a.length===0,T;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>u(e.target.value),t[11]=T):T=t[11];let E;t[12]===a?E=t[13]:(E=a.map(Ve),t[12]=a,t[13]=E);let D;t[14]!==w||t[15]!==E||t[16]!==l?(D=(0,Z.jsxs)(q,{children:[C,(0,Z.jsx)(`select`,{className:Ie,disabled:w,id:`update-addon-version`,onChange:T,value:l,children:E})]}),t[14]=w,t[15]=E,t[16]=l,t[17]=D):D=t[17];let O;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`update-addon-role`,children:`Service account IAM role ARN`})}),t[18]=O):O=t[18];let k;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(k=e=>f(e.target.value),t[19]=k):k=t[19];let A;t[20]===d?A=t[21]:(A=(0,Z.jsxs)(q,{children:[O,(0,Z.jsx)(v,{id:`update-addon-role`,onChange:k,placeholder:`arn:aws:iam::…:role/…`,value:d})]}),t[20]=d,t[21]=A);let j;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`update-addon-config`,children:`Configuration values (JSON)`})}),t[22]=j):j=t[22];let M=!!h,N;t[23]!==p||t[24]!==M?(N=(0,Z.jsxs)(q,{children:[j,(0,Z.jsx)(Oe,{error:M,id:`update-addon-config`,onChange:m,rows:4,value:p})]}),t[23]=p,t[24]=M,t[25]=N):N=t[25];let P;t[26]!==A||t[27]!==N||t[28]!==D?(P=(0,Z.jsxs)(`div`,{className:`space-y-4`,children:[D,A,N]}),t[26]=A,t[27]=N,t[28]=D,t[29]=P):P=t[29];let I;t[30]===h?I=t[31]:(I=h&&(0,Z.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:h}),t[30]=h,t[31]=I);let L;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Z.jsx)(_e,{children:`Cancel`}),t[32]=L):L=t[32];let z;t[33]===x?z=t[34]:(z=e=>{e.preventDefault(),x()},t[33]=x,t[34]=z);let B=c.isPending?`Updating…`:`Update`,V;t[35]!==z||t[36]!==B||t[37]!==c.isPending?(V=(0,Z.jsxs)(ge,{children:[L,(0,Z.jsx)(he,{disabled:c.isPending,onClick:z,children:B})]}),t[35]=z,t[36]=B,t[37]=c.isPending,t[38]=V):V=t[38];let H;t[39]!==P||t[40]!==I||t[41]!==V||t[42]!==S?(H=(0,Z.jsxs)(pe,{className:`max-h-[85vh] overflow-y-auto`,children:[S,P,I,V]}),t[39]=P,t[40]=I,t[41]=V,t[42]=S,t[43]=H):H=t[43];let U;return t[44]!==s||t[45]!==o||t[46]!==H?(U=(0,Z.jsx)(ye,{onOpenChange:s,open:o,children:H}),t[44]=s,t[45]=o,t[46]=H,t[47]=U):U=t[47],U}function Ve(e){return(0,Z.jsx)(`option`,{value:e,children:e},e)}function He(e){let t=(0,ke.c)(53),{clusterName:n,addonName:r,catalog:a,onDelete:o}=e,s;t[0]!==r||t[1]!==n?(s=te(n,r),t[0]=r,t[1]=n,t[2]=s):s=t[2];let c;t[3]===s?c=t[4]:(c={...s,refetchInterval:We},t[3]=s,t[4]=c);let{data:l}=i(c),[u,f]=(0,X.useState)(!1),p=l?.addon,m=p?.health?.issues?.[0]?.message,g;t[5]!==r||t[6]!==a?(g=a.find(e=>e.addonName===r)?.addonVersions?.map(Ue).filter(Boolean)??[],t[5]=r,t[6]=a,t[7]=g):g=t[7];let v=g,y;t[8]===r?y=t[9]:(y=(0,Z.jsx)(`span`,{children:r}),t[8]=r,t[9]=y);let b=p?.status,x;t[10]===b?x=t[11]:(x=E(b),t[10]=b,t[11]=x);let S=p?.status??`UNKNOWN`,C;t[12]!==x||t[13]!==S?(C=(0,Z.jsx)(Ce,{variant:x,children:S}),t[12]=x,t[13]=S,t[14]=C):C=t[14];let w;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>f(!0),t[15]=w):w=t[15];let T;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,Z.jsx)(_,{"aria-label":`Update add-on`,onClick:w,size:`icon`,variant:`ghost`,children:(0,Z.jsx)(d,{className:`size-4`})}),t[16]=T):T=t[16];let D;t[17]!==r||t[18]!==o?(D=()=>o(r),t[17]=r,t[18]=o,t[19]=D):D=t[19];let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Z.jsx)(h,{className:`size-4`}),t[20]=O):O=t[20];let k;t[21]===D?k=t[22]:(k=(0,Z.jsx)(_,{"aria-label":`Remove add-on`,onClick:D,size:`icon`,variant:`ghost`,children:O}),t[21]=D,t[22]=k);let A;t[23]!==k||t[24]!==C?(A=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[C,T,k]}),t[23]=k,t[24]=C,t[25]=A):A=t[25];let j;t[26]!==A||t[27]!==y?(j=(0,Z.jsx)(J.Header,{children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[y,A]})}),t[26]=A,t[27]=y,t[28]=j):j=t[28];let M=p?.addonVersion,N;t[29]===M?N=t[30]:(N=(0,Z.jsx)(Y,{label:`Version`,value:M}),t[29]=M,t[30]=N);let P=p?.serviceAccountRoleArn,F;t[31]===P?F=t[32]:(F=(0,Z.jsx)(Y,{label:`IRSA role`,value:P}),t[31]=P,t[32]=F);let I;t[33]===m?I=t[34]:(I=m&&(0,Z.jsx)(Y,{label:`Issue`,value:(0,Z.jsx)(`span`,{className:`text-destructive`,children:m})}),t[33]=m,t[34]=I);let L;t[35]!==N||t[36]!==F||t[37]!==I?(L=(0,Z.jsxs)(J.Content,{children:[N,F,I]}),t[35]=N,t[36]=F,t[37]=I,t[38]=L):L=t[38];let R=p?.addonVersion,z=p?.serviceAccountRoleArn,B=p?.configurationValues,V;t[39]!==R||t[40]!==z||t[41]!==B?(V={addonVersion:R,serviceAccountRoleArn:z,configurationValues:B},t[39]=R,t[40]=z,t[41]=B,t[42]=V):V=t[42];let H;t[43]!==r||t[44]!==n||t[45]!==u||t[46]!==V||t[47]!==v?(H=(0,Z.jsx)(Be,{addonName:r,clusterName:n,current:V,onOpenChange:f,open:u,versions:v}),t[43]=r,t[44]=n,t[45]=u,t[46]=V,t[47]=v,t[48]=H):H=t[48];let U;return t[49]!==j||t[50]!==L||t[51]!==H?(U=(0,Z.jsxs)(J,{children:[j,L,H]}),t[49]=j,t[50]=L,t[51]=H,t[52]=U):U=t[52],U}function Ue(e){return e.addonVersion??``}function We(e){return Pe.has(e.state.data?.addon?.status??``)?Fe:!1}function Ge(e){let t=(0,ke.c)(31),{clusterName:n}=e,r;t[0]===n?r=t[1]:(r=V(n),t[0]=n,t[1]=r);let{data:o}=a(r),{data:s}=i(H),c=B(),[l,u]=(0,X.useState)(!1),[d,f]=(0,X.useState)(),p;t[2]===o.addons?p=t[3]:(p=o.addons??[],t[2]=o.addons,t[3]=p);let m=p,h;t[4]===s?.addons?h=t[5]:(h=s?.addons??[],t[4]=s?.addons,t[5]=h);let g=h,v;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Add-on manifests are staged; activation completes when the cluster reports the workload ready.`}),t[6]=v):v=t[6];let y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsxs)(`div`,{className:`mb-4 flex items-center justify-between gap-4`,children:[v,(0,Z.jsx)(_,{onClick:()=>u(!0),size:`sm`,children:`Add add-on`})]}),t[7]=y):y=t[7];let b;t[8]!==m||t[9]!==g||t[10]!==n?(b=m.length>0?(0,Z.jsx)(`div`,{className:`space-y-4`,children:m.map(e=>(0,Z.jsx)(He,{addonName:e,catalog:g,clusterName:n,onDelete:f},e))}):(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:`No add-ons installed.`}),t[8]=m,t[9]=g,t[10]=n,t[11]=b):b=t[11];let x;t[12]!==m||t[13]!==g||t[14]!==n||t[15]!==l?(x=(0,Z.jsx)(Le,{catalog:g,clusterName:n,installed:m,onOpenChange:u,open:l}),t[12]=m,t[13]=g,t[14]=n,t[15]=l,t[16]=x):x=t[16];let S=`Remove add-on "${d??``}" from the cluster?`,C;t[17]!==n||t[18]!==c||t[19]!==d?(C=()=>{d&&c.mutate({clusterName:n,addonName:d},{onSuccess:()=>f(void 0)})},t[17]=n,t[18]=c,t[19]=d,t[20]=C):C=t[20];let w;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>!e&&f(void 0),t[21]=w):w=t[21];let T=d!==void 0,E;t[22]!==c.isPending||t[23]!==T||t[24]!==S||t[25]!==C?(E=(0,Z.jsx)(be,{confirmLabel:`Remove`,description:S,isPending:c.isPending,onConfirm:C,onOpenChange:w,open:T,pendingLabel:`Removing…`,title:`Remove add-on`}),t[22]=c.isPending,t[23]=T,t[24]=S,t[25]=C,t[26]=E):E=t[26];let D;return t[27]!==E||t[28]!==b||t[29]!==x?(D=(0,Z.jsxs)(Z.Fragment,{children:[y,b,x,E]}),t[27]=E,t[28]=b,t[29]=x,t[30]=D):D=t[30],D}function Ke(e){let t=(0,ke.c)(6),{to:n,id:r}=e,i;t[0]===r?i=t[1]:(i={id:r},t[0]=r,t[1]=i);let a;return t[2]!==r||t[3]!==i||t[4]!==n?(a=(0,Z.jsx)(o,{className:`font-mono text-primary underline-offset-2 hover:underline`,params:i,to:n,children:r}),t[2]=r,t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function qe(e){let t=(0,ke.c)(45),{cluster:n}=e,r=n?.resourcesVpcConfig,i;t[0]===r?.subnetIds?i=t[1]:(i=r?.subnetIds??[],t[0]=r?.subnetIds,t[1]=i);let a=i,o;t[2]===r?.securityGroupIds?o=t[3]:(o=r?.securityGroupIds??[],t[2]=r?.securityGroupIds,t[3]=o);let s=o,c;t[4]===r?.publicAccessCidrs?c=t[5]:(c=r?.publicAccessCidrs??[],t[4]=r?.publicAccessCidrs,t[5]=c);let l=c,u;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Z.jsx)(J.Header,{children:`VPC`}),t[6]=u):u=t[6];let d;t[7]===r?d=t[8]:(d=r?.vpcId?(0,Z.jsx)(Ke,{id:r.vpcId,to:`/ec2/describe-vpcs/$id`}):void 0,t[7]=r,t[8]=d);let f;t[9]===d?f=t[10]:(f=(0,Z.jsx)(Y,{label:`VPC`,value:d}),t[9]=d,t[10]=f);let p=n?.endpoint,m;t[11]===p?m=t[12]:(m=(0,Z.jsx)(Y,{label:`API server endpoint`,value:p}),t[11]=p,t[12]=m);let h=r?.endpointPublicAccess?`Enabled`:`Disabled`,g;t[13]===h?g=t[14]:(g=(0,Z.jsx)(Y,{label:`Public access`,value:h}),t[13]=h,t[14]=g);let _=r?.endpointPrivateAccess?`Enabled`:`Disabled`,v;t[15]===_?v=t[16]:(v=(0,Z.jsx)(Y,{label:`Private access`,value:_}),t[15]=_,t[16]=v);let y;t[17]!==l||t[18]!==r?.endpointPublicAccess?(y=r?.endpointPublicAccess&&(0,Z.jsx)(Y,{label:`Public access CIDRs`,value:l.length>0?(0,Z.jsx)(`div`,{className:`space-y-1 font-mono text-xs`,children:l.map(Xe)}):`Any (0.0.0.0/0)`}),t[17]=l,t[18]=r?.endpointPublicAccess,t[19]=y):y=t[19];let b;t[20]!==g||t[21]!==v||t[22]!==y||t[23]!==f||t[24]!==m?(b=(0,Z.jsxs)(J,{children:[u,(0,Z.jsxs)(J.Content,{children:[f,m,g,v,y]})]}),t[20]=g,t[21]=v,t[22]=y,t[23]=f,t[24]=m,t[25]=b):b=t[25];let x;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Z.jsx)(J.Header,{children:`Subnets`}),t[26]=x):x=t[26];let S;t[27]===a?S=t[28]:(S=(0,Z.jsxs)(J,{children:[x,(0,Z.jsx)(J.Content,{children:a.length>0?(0,Z.jsx)(`div`,{className:`space-y-1`,children:a.map(Ye)}):(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets.`})})]}),t[27]=a,t[28]=S);let C;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(J.Header,{children:`Security groups`}),t[29]=C):C=t[29];let w;t[30]===r?w=t[31]:(w=r?.clusterSecurityGroupId?(0,Z.jsx)(Ke,{id:r.clusterSecurityGroupId,to:`/ec2/describe-security-groups/$id`}):void 0,t[30]=r,t[31]=w);let T;t[32]===w?T=t[33]:(T=(0,Z.jsx)(Y,{label:`Cluster security group`,value:w}),t[32]=w,t[33]=T);let E;t[34]===s?E=t[35]:(E=s.length>0?(0,Z.jsx)(`div`,{className:`space-y-1`,children:s.map(Je)}):`—`,t[34]=s,t[35]=E);let D;t[36]===E?D=t[37]:(D=(0,Z.jsx)(Y,{label:`Additional security groups`,value:E}),t[36]=E,t[37]=D);let O;t[38]!==T||t[39]!==D?(O=(0,Z.jsxs)(J,{children:[C,(0,Z.jsxs)(J.Content,{children:[T,D]})]}),t[38]=T,t[39]=D,t[40]=O):O=t[40];let k;return t[41]!==b||t[42]!==S||t[43]!==O?(k=(0,Z.jsxs)(Z.Fragment,{children:[b,S,O]}),t[41]=b,t[42]=S,t[43]=O,t[44]=k):k=t[44],k}function Je(e){return(0,Z.jsx)(Ke,{id:e,to:`/ec2/describe-security-groups/$id`},e)}function Ye(e){return(0,Z.jsx)(Ke,{id:e,to:`/ec2/describe-subnets/$id`},e)}function Xe(e){return(0,Z.jsx)(`div`,{children:e},e)}function Ze(e){return!!e&&(e.endsWith(`_GPU`)||e.endsWith(`_NVIDIA`))}function Qe(e,t){let n=t.find(t=>t.InstanceType===e);return!!n&&xe(n)}function $e(e){let t=(0,ke.c)(44),{clusterName:n,nodegroupName:r,current:i,open:a,onOpenChange:o}=e,s=x(),[c,l]=(0,X.useState)(i.minSize??0),[u,d]=(0,X.useState)(i.desiredSize??0),[f,p]=(0,X.useState)(i.maxSize??0),[m,h]=(0,X.useState)(),[g,_]=(0,X.useState)(a);a!==g&&(_(a),a&&(l(i.minSize??0),d(i.desiredSize??0),p(i.maxSize??0),h(void 0)));let y;t[0]!==n||t[1]!==u||t[2]!==f||t[3]!==c||t[4]!==r||t[5]!==o||t[6]!==s?(y=()=>{if(!(c<=u&&u<=f)){h(`Sizes must satisfy min ≤ desired ≤ max`);return}s.mutate({clusterName:n,nodegroupName:r,minSize:c,desiredSize:u,maxSize:f},{onSuccess:()=>o(!1)})},t[0]=n,t[1]=u,t[2]=f,t[3]=c,t[4]=r,t[5]=o,t[6]=s,t[7]=y):y=t[7];let b=y,S;t[8]===r?S=t[9]:(S=(0,Z.jsx)(ve,{children:(0,Z.jsxs)(me,{children:[`Scale `,r]})}),t[8]=r,t[9]=S);let C;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`scale-min`,children:`Min`})}),t[10]=C):C=t[10];let w;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(w=e=>l(Number(e.target.value)),t[11]=w):w=t[11];let T;t[12]===c?T=t[13]:(T=(0,Z.jsxs)(q,{children:[C,(0,Z.jsx)(v,{id:`scale-min`,onChange:w,type:`number`,value:c})]}),t[12]=c,t[13]=T);let E;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`scale-desired`,children:`Desired`})}),t[14]=E):E=t[14];let D;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>d(Number(e.target.value)),t[15]=D):D=t[15];let O;t[16]===u?O=t[17]:(O=(0,Z.jsxs)(q,{children:[E,(0,Z.jsx)(v,{id:`scale-desired`,onChange:D,type:`number`,value:u})]}),t[16]=u,t[17]=O);let k;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`scale-max`,children:`Max`})}),t[18]=k):k=t[18];let A;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(A=e=>p(Number(e.target.value)),t[19]=A):A=t[19];let j;t[20]===f?j=t[21]:(j=(0,Z.jsxs)(q,{children:[k,(0,Z.jsx)(v,{id:`scale-max`,onChange:A,type:`number`,value:f})]}),t[20]=f,t[21]=j);let M;t[22]!==j||t[23]!==T||t[24]!==O?(M=(0,Z.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[T,O,j]}),t[22]=j,t[23]=T,t[24]=O,t[25]=M):M=t[25];let N;t[26]===m?N=t[27]:(N=m&&(0,Z.jsx)(`p`,{className:`mt-2 text-xs text-destructive`,children:m}),t[26]=m,t[27]=N);let P;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Z.jsx)(_e,{children:`Cancel`}),t[28]=P):P=t[28];let F;t[29]===b?F=t[30]:(F=e=>{e.preventDefault(),b()},t[29]=b,t[30]=F);let I=s.isPending?`Scaling…`:`Scale`,L;t[31]!==s.isPending||t[32]!==F||t[33]!==I?(L=(0,Z.jsxs)(ge,{children:[P,(0,Z.jsx)(he,{disabled:s.isPending,onClick:F,children:I})]}),t[31]=s.isPending,t[32]=F,t[33]=I,t[34]=L):L=t[34];let R;t[35]!==M||t[36]!==N||t[37]!==L||t[38]!==S?(R=(0,Z.jsxs)(pe,{children:[S,M,N,L]}),t[35]=M,t[36]=N,t[37]=L,t[38]=S,t[39]=R):R=t[39];let z;return t[40]!==o||t[41]!==a||t[42]!==R?(z=(0,Z.jsx)(ye,{onOpenChange:o,open:a,children:R}),t[40]=o,t[41]=a,t[42]=R,t[43]=z):z=t[43],z}function et(e){let t=(0,ke.c)(71),{clusterName:n,clusterVersion:r,nodegroupName:a,onDelete:o}=e,s;t[0]!==n||t[1]!==a?(s=U(n,a),t[0]=n,t[1]=a,t[2]=s):s=t[2];let{data:c}=i(s),l=C(),u=c?.nodegroup,p=u?.scalingConfig,[m,g]=(0,X.useState)(!1),[v,y]=(0,X.useState)(!1),b=!!r&&!!u?.version&&u.version!==r,x=u?.amiType,S;t[3]===x?S=t[4]:(S=Ze(x),t[3]=x,t[4]=S);let w=S,T;t[5]===a?T=t[6]:(T=(0,Z.jsx)(`span`,{children:a}),t[5]=a,t[6]=T);let E;t[7]===w?E=t[8]:(E=w&&(0,Z.jsx)(Ce,{variant:`secondary`,children:`GPU`}),t[7]=w,t[8]=E);let D;t[9]!==T||t[10]!==E?(D=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[T,E]}),t[9]=T,t[10]=E,t[11]=D):D=t[11];let O;t[12]===b?O=t[13]:(O=b&&(0,Z.jsx)(_,{"aria-label":`Update node group version`,onClick:()=>y(!0),size:`icon`,variant:`ghost`,children:(0,Z.jsx)(d,{className:`size-4`})}),t[12]=b,t[13]=O);let k;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(k=()=>g(!0),t[14]=k):k=t[14];let A;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Z.jsx)(_,{"aria-label":`Scale node group`,onClick:k,size:`icon`,variant:`ghost`,children:(0,Z.jsx)(f,{className:`size-4`})}),t[15]=A):A=t[15];let j;t[16]!==a||t[17]!==o?(j=()=>o(a),t[16]=a,t[17]=o,t[18]=j):j=t[18];let M;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Z.jsx)(h,{className:`size-4`}),t[19]=M):M=t[19];let N;t[20]===j?N=t[21]:(N=(0,Z.jsx)(_,{"aria-label":`Delete node group`,onClick:j,size:`icon`,variant:`ghost`,children:M}),t[20]=j,t[21]=N);let P;t[22]!==N||t[23]!==O?(P=(0,Z.jsxs)(`div`,{className:`flex items-center gap-1`,children:[O,A,N]}),t[22]=N,t[23]=O,t[24]=P):P=t[24];let F;t[25]!==P||t[26]!==D?(F=(0,Z.jsx)(J.Header,{children:(0,Z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[D,P]})}),t[25]=P,t[26]=D,t[27]=F):F=t[27];let I=u?.status,L;t[28]===I?L=t[29]:(L=(0,Z.jsx)(Y,{label:`Status`,value:I}),t[28]=I,t[29]=L);let R=b?`${u?.version} (cluster on ${r})`:u?.version,z;t[30]===R?z=t[31]:(z=(0,Z.jsx)(Y,{label:`Kubernetes version`,value:R}),t[30]=R,t[31]=z);let B;t[32]===u?.instanceTypes?B=t[33]:(B=u?.instanceTypes?.join(`, `),t[32]=u?.instanceTypes,t[33]=B);let V;t[34]===B?V=t[35]:(V=(0,Z.jsx)(Y,{label:`Instance types`,value:B}),t[34]=B,t[35]=V);let H=u?.amiType,W;t[36]===H?W=t[37]:(W=(0,Z.jsx)(Y,{label:`AMI type`,value:H}),t[36]=H,t[37]=W);let ee=u?.capacityType,te;t[38]===ee?te=t[39]:(te=(0,Z.jsx)(Y,{label:`Capacity type`,value:ee}),t[38]=ee,t[39]=te);let ne=p?`${p.minSize} / ${p.desiredSize} / ${p.maxSize}`:void 0,G;t[40]===ne?G=t[41]:(G=(0,Z.jsx)(Y,{label:`Scaling (min / desired / max)`,value:ne}),t[40]=ne,t[41]=G);let re;t[42]!==L||t[43]!==z||t[44]!==V||t[45]!==W||t[46]!==te||t[47]!==G?(re=(0,Z.jsxs)(J.Content,{children:[L,z,V,W,te,G]}),t[42]=L,t[43]=z,t[44]=V,t[45]=W,t[46]=te,t[47]=G,t[48]=re):re=t[48];let ie;t[49]===p?ie=t[50]:(ie=p??{},t[49]=p,t[50]=ie);let ae;t[51]!==n||t[52]!==a||t[53]!==m||t[54]!==ie?(ae=(0,Z.jsx)($e,{clusterName:n,current:ie,nodegroupName:a,onOpenChange:g,open:m}),t[51]=n,t[52]=a,t[53]=m,t[54]=ie,t[55]=ae):ae=t[55];let oe=`Update node group "${a}" from ${u?.version} to ${r}? Nodes are replaced in a rolling update.`,se;t[56]!==n||t[57]!==r||t[58]!==a||t[59]!==l?(se=()=>l.mutate({clusterName:n,nodegroupName:a,version:r},{onSuccess:()=>y(!1)}),t[56]=n,t[57]=r,t[58]=a,t[59]=l,t[60]=se):se=t[60];let ce;t[61]!==v||t[62]!==oe||t[63]!==se||t[64]!==l.isPending?(ce=(0,Z.jsx)(be,{confirmLabel:`Update`,description:oe,isPending:l.isPending,onConfirm:se,onOpenChange:y,open:v,title:`Update node group version`}),t[61]=v,t[62]=oe,t[63]=se,t[64]=l.isPending,t[65]=ce):ce=t[65];let le;return t[66]!==F||t[67]!==re||t[68]!==ae||t[69]!==ce?(le=(0,Z.jsxs)(J,{children:[F,re,ae,ce]}),t[66]=F,t[67]=re,t[68]=ae,t[69]=ce,t[70]=le):le=t[70],le}function tt(e){let t=(0,ke.c)(145),{clusterName:n,vpcId:r,open:a,onOpenChange:o}=e,{data:s}=i(ie),{data:c}=i(y),{data:l}=i(b),u=w(),d;t[0]===s?.Roles?d=t[1]:(d=s?.Roles??[],t[0]=s?.Roles,t[1]=d);let f=d,p;t[2]===c?.Subnets?p=t[3]:(p=c?.Subnets??[],t[2]=c?.Subnets,t[3]=p);let m;t[4]===r?m=t[5]:(m=e=>e.VpcId===r,t[4]=r,t[5]=m);let h=p.filter(m),g;t[6]===l?.InstanceTypes?g=t[7]:(g=l?.InstanceTypes??[],t[6]=l?.InstanceTypes,t[7]=g);let _=g,x;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(x=ce(D),t[8]=x):x=t[8];let S;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:x,defaultValues:{nodegroupName:``,nodeRole:``,subnetIds:[],instanceTypes:`t3.medium`,amiType:`AL2_x86_64`,capacityType:`ON_DEMAND`,diskSize:20,minSize:1,desiredSize:2,maxSize:3}},t[9]=S):S=t[9];let{control:C,formState:T,handleSubmit:E,register:O,reset:A,setValue:j}=oe(S),{errors:M}=T,N;t[10]===C?N=t[11]:(N={control:C,name:`subnetIds`},t[10]=C,t[11]=N);let F=ae(N),I;t[12]===F?I=t[13]:(I=new Set(F),t[12]=F,t[13]=I);let L=I,R;t[14]===C?R=t[15]:(R={control:C,name:`instanceTypes`},t[14]=C,t[15]=R);let z=ae(R),B;t[16]!==_||t[17]!==z?(B=Qe(z,_),t[16]=_,t[17]=z,t[18]=B):B=t[18];let V=B,H;t[19]!==F||t[20]!==j?(H=e=>{let t=F.includes(e)?F.filter(t=>t!==e):[...F,e];j(`subnetIds`,t,{shouldValidate:!0})},t[19]=F,t[20]=j,t[21]=H):H=t[21];let U=H,W;t[22]!==n||t[23]!==u||t[24]!==o||t[25]!==A?(W=async e=>{await u.mutateAsync({clusterName:n,nodegroupName:e.nodegroupName,nodeRole:e.nodeRole,subnetIds:e.subnetIds,instanceTypes:e.instanceTypes.split(`,`).map(at).filter(Boolean),amiType:e.amiType,capacityType:e.capacityType,diskSize:e.diskSize,minSize:e.minSize,desiredSize:e.desiredSize,maxSize:e.maxSize}),A(),o(!1)},t[22]=n,t[23]=u,t[24]=o,t[25]=A,t[26]=W):W=t[26];let ee=W,te=ye,ne=pe,G;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,Z.jsx)(ve,{children:(0,Z.jsx)(me,{children:`Add node group`})}),t[27]=G):G=t[27];let re;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-name`,children:`Name`})}),t[28]=re):re=t[28];let le=!!M.nodegroupName,ue;t[29]===O?ue=t[30]:(ue=O(`nodegroupName`),t[29]=O,t[30]=ue);let be;t[31]!==le||t[32]!==ue?(be=(0,Z.jsx)(v,{"aria-invalid":le,id:`ng-name`,placeholder:`my-nodegroup`,...ue}),t[31]=le,t[32]=ue,t[33]=be):be=t[33];let J;t[34]===M.nodegroupName?J=t[35]:(J=(0,Z.jsx)(fe,{errors:[M.nodegroupName]}),t[34]=M.nodegroupName,t[35]=J);let Y;t[36]!==be||t[37]!==J?(Y=(0,Z.jsxs)(q,{children:[re,be,J]}),t[36]=be,t[37]=J,t[38]=Y):Y=t[38];let xe;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(xe=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-role`,children:`Node IAM role`})}),t[39]=xe):xe=t[39];let Ce=!!M.nodeRole,we;t[40]===O?we=t[41]:(we=O(`nodeRole`),t[40]=O,t[41]=we);let Te;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(Te=(0,Z.jsx)(`option`,{value:``,children:`Select role`}),t[42]=Te):Te=t[42];let Ee;t[43]===f?Ee=t[44]:(Ee=f.map(it),t[43]=f,t[44]=Ee);let De;t[45]!==Ce||t[46]!==we||t[47]!==Ee?(De=(0,Z.jsxs)(`select`,{"aria-invalid":Ce,className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-role`,...we,children:[Te,Ee]}),t[45]=Ce,t[46]=we,t[47]=Ee,t[48]=De):De=t[48];let Oe;t[49]===M.nodeRole?Oe=t[50]:(Oe=(0,Z.jsx)(fe,{errors:[M.nodeRole]}),t[49]=M.nodeRole,t[50]=Oe);let X;t[51]!==De||t[52]!==Oe?(X=(0,Z.jsxs)(q,{children:[xe,De,Oe]}),t[51]=De,t[52]=Oe,t[53]=X):X=t[53];let Ae=q,Q;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,Z.jsx)(K,{children:`Subnets`}),t[54]=Q):Q=t[54];let je=h.length===0?(0,Z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the cluster VPC.`}):(0,Z.jsx)(`div`,{className:`space-y-1`,children:h.map(e=>(0,Z.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,Z.jsx)(`input`,{"aria-label":`Subnet ${e.SubnetId}`,checked:L.has(e.SubnetId??``),onChange:()=>U(e.SubnetId??``),type:`checkbox`}),(0,Z.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` · `,e.CidrBlock]})]},e.SubnetId))}),$;t[55]===M.subnetIds?$=t[56]:($=(0,Z.jsx)(fe,{errors:[M.subnetIds]}),t[55]=M.subnetIds,t[56]=$);let Me;t[57]!==Ae||t[58]!==Q||t[59]!==je||t[60]!==$?(Me=(0,Z.jsxs)(Ae,{children:[Q,je,$]}),t[57]=Ae,t[58]=Q,t[59]=je,t[60]=$,t[61]=Me):Me=t[61];let Ne;t[62]===Symbol.for(`react.memo_cache_sentinel`)?(Ne=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-instance-type`,children:`Instance type`})}),t[62]=Ne):Ne=t[62];let Pe;t[63]!==M.instanceTypes||t[64]!==_?(Pe=e=>{let{field:t}=e;return(0,Z.jsx)(Se,{"aria-invalid":!!M.instanceTypes,id:`ng-instance-type`,instanceTypes:_,onValueChange:t.onChange,value:t.value})},t[63]=M.instanceTypes,t[64]=_,t[65]=Pe):Pe=t[65];let Fe;t[66]!==C||t[67]!==Pe?(Fe=(0,Z.jsx)(se,{control:C,name:`instanceTypes`,render:Pe}),t[66]=C,t[67]=Pe,t[68]=Fe):Fe=t[68];let Ie;t[69]===V?Ie=t[70]:(Ie=V&&(0,Z.jsxs)(de,{children:[`GPU node AMI is auto-selected for this instance type. This node group is tainted `,(0,Z.jsx)(`code`,{children:`nvidia.com/gpu=present:NoSchedule`}),` `,`by default, so ordinary pods won't schedule onto GPU workers.`]}),t[69]=V,t[70]=Ie);let Le;t[71]===M.instanceTypes?Le=t[72]:(Le=(0,Z.jsx)(fe,{errors:[M.instanceTypes]}),t[71]=M.instanceTypes,t[72]=Le);let Re;t[73]!==Fe||t[74]!==Ie||t[75]!==Le?(Re=(0,Z.jsxs)(q,{children:[Ne,Fe,Ie,Le]}),t[73]=Fe,t[74]=Ie,t[75]=Le,t[76]=Re):Re=t[76];let ze;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-ami`,children:`AMI type`})}),t[77]=ze):ze=t[77];let Be;t[78]===O?Be=t[79]:(Be=O(`amiType`),t[78]=O,t[79]=Be);let Ve;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=P.map(rt),t[80]=Ve):Ve=t[80];let He;t[81]===Be?He=t[82]:(He=(0,Z.jsxs)(q,{children:[ze,(0,Z.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-ami`,...Be,children:Ve})]}),t[81]=Be,t[82]=He);let Ue;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-capacity`,children:`Capacity type`})}),t[83]=Ue):Ue=t[83];let We;t[84]===O?We=t[85]:(We=O(`capacityType`),t[84]=O,t[85]=We);let Ge;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=k.map(nt),t[86]=Ge):Ge=t[86];let Ke;t[87]===We?Ke=t[88]:(Ke=(0,Z.jsxs)(q,{children:[Ue,(0,Z.jsx)(`select`,{className:`h-7 w-full rounded-md border border-input bg-input/20 px-2 text-sm`,id:`ng-capacity`,...We,children:Ge})]}),t[87]=We,t[88]=Ke);let qe;t[89]!==He||t[90]!==Ke?(qe=(0,Z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[He,Ke]}),t[89]=He,t[90]=Ke,t[91]=qe):qe=t[91];let Je;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-disk`,children:`Disk (GB)`})}),t[92]=Je):Je=t[92];let Ye;t[93]===O?Ye=t[94]:(Ye=O(`diskSize`,{valueAsNumber:!0}),t[93]=O,t[94]=Ye);let Xe;t[95]===Ye?Xe=t[96]:(Xe=(0,Z.jsxs)(q,{children:[Je,(0,Z.jsx)(v,{id:`ng-disk`,type:`number`,...Ye})]}),t[95]=Ye,t[96]=Xe);let Ze;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-min`,children:`Min`})}),t[97]=Ze):Ze=t[97];let $e;t[98]===O?$e=t[99]:($e=O(`minSize`,{valueAsNumber:!0}),t[98]=O,t[99]=$e);let et;t[100]===$e?et=t[101]:(et=(0,Z.jsxs)(q,{children:[Ze,(0,Z.jsx)(v,{id:`ng-min`,type:`number`,...$e})]}),t[100]=$e,t[101]=et);let tt;t[102]===Symbol.for(`react.memo_cache_sentinel`)?(tt=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-desired`,children:`Desired`})}),t[102]=tt):tt=t[102];let ot;t[103]===O?ot=t[104]:(ot=O(`desiredSize`,{valueAsNumber:!0}),t[103]=O,t[104]=ot);let st;t[105]===ot?st=t[106]:(st=(0,Z.jsxs)(q,{children:[tt,(0,Z.jsx)(v,{id:`ng-desired`,type:`number`,...ot})]}),t[105]=ot,t[106]=st);let ct;t[107]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,Z.jsx)(K,{children:(0,Z.jsx)(`label`,{htmlFor:`ng-max`,children:`Max`})}),t[107]=ct):ct=t[107];let lt;t[108]===O?lt=t[109]:(lt=O(`maxSize`,{valueAsNumber:!0}),t[108]=O,t[109]=lt);let ut;t[110]===lt?ut=t[111]:(ut=(0,Z.jsxs)(q,{children:[ct,(0,Z.jsx)(v,{id:`ng-max`,type:`number`,...lt})]}),t[110]=lt,t[111]=ut);let dt;t[112]!==Xe||t[113]!==et||t[114]!==st||t[115]!==ut?(dt=(0,Z.jsxs)(`div`,{className:`grid grid-cols-4 gap-3`,children:[Xe,et,st,ut]}),t[112]=Xe,t[113]=et,t[114]=st,t[115]=ut,t[116]=dt):dt=t[116];let ft;t[117]===M.desiredSize?ft=t[118]:(ft=(0,Z.jsx)(fe,{errors:[M.desiredSize]}),t[117]=M.desiredSize,t[118]=ft);let pt;t[119]!==Y||t[120]!==X||t[121]!==Me||t[122]!==Re||t[123]!==qe||t[124]!==dt||t[125]!==ft?(pt=(0,Z.jsxs)(`form`,{className:`space-y-4`,id:`add-nodegroup-form`,children:[Y,X,Me,Re,qe,dt,ft]}),t[119]=Y,t[120]=X,t[121]=Me,t[122]=Re,t[123]=qe,t[124]=dt,t[125]=ft,t[126]=pt):pt=t[126];let mt;t[127]===Symbol.for(`react.memo_cache_sentinel`)?(mt=(0,Z.jsx)(_e,{children:`Cancel`}),t[127]=mt):mt=t[127];let ht;t[128]!==E||t[129]!==ee?(ht=e=>{e.preventDefault(),E(ee)()},t[128]=E,t[129]=ee,t[130]=ht):ht=t[130];let gt=u.isPending?`Creating…`:`Create`,_t;t[131]!==u.isPending||t[132]!==ht||t[133]!==gt?(_t=(0,Z.jsxs)(ge,{children:[mt,(0,Z.jsx)(he,{disabled:u.isPending,onClick:ht,children:gt})]}),t[131]=u.isPending,t[132]=ht,t[133]=gt,t[134]=_t):_t=t[134];let vt;t[135]!==ne||t[136]!==G||t[137]!==pt||t[138]!==_t?(vt=(0,Z.jsxs)(ne,{className:`max-h-[85vh] overflow-y-auto`,children:[G,pt,_t]}),t[135]=ne,t[136]=G,t[137]=pt,t[138]=_t,t[139]=vt):vt=t[139];let yt;return t[140]!==te||t[141]!==o||t[142]!==a||t[143]!==vt?(yt=(0,Z.jsx)(te,{onOpenChange:o,open:a,children:vt}),t[140]=te,t[141]=o,t[142]=a,t[143]=vt,t[144]=yt):yt=t[144],yt}function nt(e){return(0,Z.jsx)(`option`,{value:e,children:e},e)}function rt(e){return(0,Z.jsx)(`option`,{value:e,children:e},e)}function it(e){return(0,Z.jsx)(`option`,{value:e.Arn??``,children:e.RoleName},e.Arn)}function at(e){return e.trim()}function ot(e){let t=(0,ke.c)(27),{clusterName:n,clusterVersion:r,vpcId:i}=e,o;t[0]===n?o=t[1]:(o=re(n),t[0]=n,t[1]=o);let{data:s}=a(o),c=z(),[l,u]=(0,X.useState)(!1),[d,f]=(0,X.useState)(),p;t[2]===s.nodegroups?p=t[3]:(p=s.nodegroups??[],t[2]=s.nodegroups,t[3]=p);let m=p,h;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Z.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,Z.jsx)(_,{onClick:()=>u(!0),size:`sm`,children:`Add node group`})}),t[4]=h):h=t[4];let g;t[5]!==n||t[6]!==r||t[7]!==m?(g=m.length>0?(0,Z.jsx)(`div`,{className:`space-y-4`,children:m.map(e=>(0,Z.jsx)(et,{clusterName:n,clusterVersion:r,nodegroupName:e,onDelete:f},e))}):(0,Z.jsx)(`p`,{className:`text-muted-foreground`,children:`No node groups.`}),t[5]=n,t[6]=r,t[7]=m,t[8]=g):g=t[8];let v;t[9]!==n||t[10]!==l||t[11]!==i?(v=(0,Z.jsx)(tt,{clusterName:n,onOpenChange:u,open:l,vpcId:i}),t[9]=n,t[10]=l,t[11]=i,t[12]=v):v=t[12];let y=`Delete node group "${d??``}"? This terminates its nodes.`,b;t[13]!==n||t[14]!==c||t[15]!==d?(b=()=>{d&&c.mutate({clusterName:n,nodegroupName:d},{onSuccess:()=>f(void 0)})},t[13]=n,t[14]=c,t[15]=d,t[16]=b):b=t[16];let x;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(x=e=>!e&&f(void 0),t[17]=x):x=t[17];let S=d!==void 0,C;t[18]!==c.isPending||t[19]!==y||t[20]!==b||t[21]!==S?(C=(0,Z.jsx)(be,{description:y,isPending:c.isPending,onConfirm:b,onOpenChange:x,open:S,title:`Delete node group`}),t[18]=c.isPending,t[19]=y,t[20]=b,t[21]=S,t[22]=C):C=t[22];let w;return t[23]!==C||t[24]!==g||t[25]!==v?(w=(0,Z.jsxs)(Z.Fragment,{children:[h,g,v,C]}),t[23]=C,t[24]=g,t[25]=v,t[26]=w):w=t[26],w}function st(e){switch(e??``){case`ACTIVE`:return`default`;case`FAILED`:return`destructive`;default:return`secondary`}}function ct(e){let t=(0,ke.c)(101),{clusterName:n}=e,r=s(),[i,o]=(0,X.useState)(!1),d;t[0]===n?d=t[1]:(d=ne(n),t[0]=n,t[1]=d);let{data:f}=a(d),p=T(),{cluster:v}=f,y;t[2]===v?.health?.issues?y=t[3]:(y=v?.health?.issues??[],t[2]=v?.health?.issues,t[3]=y);let b=y,x;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(x={type:`bin`,value:`aws eks update-kubeconfig`},t[4]=x):x=t[4];let S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S={type:`flag`,value:` --name `},t[5]=S):S=t[5];let C;t[6]===n?C=t[7]:(C={type:`value`,value:n},t[6]=n,t[7]=C);let w;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(w={type:`flag`,value:` --region `},t[8]=w):w=t[8];let E;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(E={type:`value`,value:l()},t[9]=E):E=t[9];let D;t[10]===C?D=t[11]:(D={label:`Configure kubectl`,parts:[x,S,C,w,E]},t[10]=C,t[11]=D);let O;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(O={label:`Verify access`,parts:[{type:`bin`,value:`kubectl get nodes`}]},t[12]=O):O=t[12];let k;t[13]===D?k=t[14]:(k=[D,O],t[13]=D,t[14]=k);let A=k,j;t[15]!==n||t[16]!==p||t[17]!==r?(j=function(){p.mutate(n,{onSuccess:()=>{r({to:`/eks/list-clusters`})}})},t[15]=n,t[16]=p,t[17]=r,t[18]=j):j=t[18];let M=j,N;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Z.jsx)(u,{to:`/eks/list-clusters`,children:`Clusters`}),t[19]=N):N=t[19];let P;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(P=()=>o(!0),t[20]=P):P=t[20];let F;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Z.jsxs)(_,{onClick:P,size:`sm`,variant:`destructive`,children:[(0,Z.jsx)(h,{className:`size-4`}),`Delete`]}),t[21]=F):F=t[21];let I=v?.status,L;t[22]===I?L=t[23]:(L=st(I),t[22]=I,t[23]=L);let R=v?.status??`UNKNOWN`,z;t[24]!==L||t[25]!==R?(z=(0,Z.jsx)(Ce,{variant:L,children:R}),t[24]=L,t[25]=R,t[26]=z):z=t[26];let B;t[27]===b.length?B=t[28]:(B=b.length>0&&(0,Z.jsxs)(Ce,{variant:`destructive`,children:[(0,Z.jsx)(g,{className:`size-3`}),b.length===1?`1 health issue`:`${b.length} health issues`]}),t[27]=b.length,t[28]=B);let V;t[29]!==z||t[30]!==B?(V=(0,Z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[F,z,B]}),t[29]=z,t[30]=B,t[31]=V):V=t[31];let H;t[32]!==n||t[33]!==V?(H=(0,Z.jsx)(ue,{actions:V,subtitle:`Cluster Details`,title:n}),t[32]=n,t[33]=V,t[34]=H):H=t[34];let U;t[35]!==p.error||t[36]!==p.isError?(U=p.isError&&(0,Z.jsx)(le,{error:p.error instanceof Error?p.error:void 0,msg:`Failed to delete cluster.`}),t[35]=p.error,t[36]=p.isError,t[37]=U):U=t[37];let W;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Z.jsxs)(Te,{children:[(0,Z.jsx)(we,{value:`overview`,children:`Overview`}),(0,Z.jsx)(we,{value:`compute`,children:`Compute`}),(0,Z.jsx)(we,{value:`addons`,children:`Add-ons`}),(0,Z.jsx)(we,{value:`access`,children:`Access`}),(0,Z.jsx)(we,{value:`networking`,children:`Networking`}),(0,Z.jsx)(we,{value:`connect`,children:`Connect`})]}),t[38]=W):W=t[38];let ee;t[39]===Symbol.for(`react.memo_cache_sentinel`)?(ee=(0,Z.jsx)(J.Header,{children:`Cluster`}),t[39]=ee):ee=t[39];let te=v?.arn,G;t[40]===te?G=t[41]:(G=(0,Z.jsx)(Y,{label:`ARN`,value:te}),t[40]=te,t[41]=G);let re=v?.status,ie;t[42]===re?ie=t[43]:(ie=(0,Z.jsx)(Y,{label:`Status`,value:re}),t[42]=re,t[43]=ie);let ae;t[44]===b?ae=t[45]:(ae=b.length>0?b.map(lt).filter(Boolean).join(`; `):`OK`,t[44]=b,t[45]=ae);let oe;t[46]===ae?oe=t[47]:(oe=(0,Z.jsx)(Y,{label:`Health`,value:ae}),t[46]=ae,t[47]=oe);let se=v?.version,ce;t[48]===se?ce=t[49]:(ce=(0,Z.jsx)(Y,{label:`Kubernetes version`,value:se}),t[48]=se,t[49]=ce);let K=v?.platformVersion,de;t[50]===K?de=t[51]:(de=(0,Z.jsx)(Y,{label:`Platform version`,value:K}),t[50]=K,t[51]=de);let fe=v?.endpoint,q;t[52]===fe?q=t[53]:(q=(0,Z.jsx)(Y,{label:`Endpoint`,value:fe}),t[52]=fe,t[53]=q);let pe=v?.identity?.oidc?.issuer,me;t[54]===pe?me=t[55]:(me=(0,Z.jsx)(Y,{label:`OIDC issuer`,value:pe}),t[54]=pe,t[55]=me);let he=v?.resourcesVpcConfig?.vpcId,ge;t[56]===he?ge=t[57]:(ge=(0,Z.jsx)(Y,{label:`VPC`,value:he}),t[56]=he,t[57]=ge);let _e=v?.createdAt,ve;t[58]===_e?ve=t[59]:(ve=c(_e),t[58]=_e,t[59]=ve);let ye;t[60]===ve?ye=t[61]:(ye=(0,Z.jsx)(Y,{label:`Created at`,value:ve}),t[60]=ve,t[61]=ye);let xe;t[62]!==G||t[63]!==ie||t[64]!==oe||t[65]!==ce||t[66]!==de||t[67]!==q||t[68]!==me||t[69]!==ge||t[70]!==ye?(xe=(0,Z.jsx)(Ee,{value:`overview`,children:(0,Z.jsxs)(J,{children:[ee,(0,Z.jsxs)(J.Content,{children:[G,ie,oe,ce,de,q,me,ge,ye]})]})}),t[62]=G,t[63]=ie,t[64]=oe,t[65]=ce,t[66]=de,t[67]=q,t[68]=me,t[69]=ge,t[70]=ye,t[71]=xe):xe=t[71];let Se=v?.version,Oe=v?.resourcesVpcConfig?.vpcId,Ae;t[72]!==n||t[73]!==Se||t[74]!==Oe?(Ae=(0,Z.jsx)(Ee,{value:`compute`,children:(0,Z.jsx)(ot,{clusterName:n,clusterVersion:Se,vpcId:Oe})}),t[72]=n,t[73]=Se,t[74]=Oe,t[75]=Ae):Ae=t[75];let Q;t[76]===n?Q=t[77]:(Q=(0,Z.jsx)(Ee,{value:`addons`,children:(0,Z.jsx)(Ge,{clusterName:n})}),t[76]=n,t[77]=Q);let je;t[78]===n?je=t[79]:(je=(0,Z.jsx)(Ee,{value:`access`,children:(0,Z.jsx)(Ne,{clusterName:n})}),t[78]=n,t[79]=je);let $;t[80]===v?$=t[81]:($=(0,Z.jsx)(Ee,{value:`networking`,children:(0,Z.jsx)(qe,{cluster:v})}),t[80]=v,t[81]=$);let Me;t[82]===A?Me=t[83]:(Me=(0,Z.jsx)(Ee,{value:`connect`,children:(0,Z.jsx)(m,{commands:A})}),t[82]=A,t[83]=Me);let Pe;t[84]!==xe||t[85]!==Ae||t[86]!==Q||t[87]!==je||t[88]!==$||t[89]!==Me?(Pe=(0,Z.jsxs)(De,{defaultValue:`overview`,children:[W,xe,Ae,Q,je,$,Me]}),t[84]=xe,t[85]=Ae,t[86]=Q,t[87]=je,t[88]=$,t[89]=Me,t[90]=Pe):Pe=t[90];let Fe=`This permanently deletes cluster "${n}" and its control plane. This cannot be undone.`,Ie;t[91]!==p.isPending||t[92]!==M||t[93]!==i||t[94]!==Fe?(Ie=(0,Z.jsx)(be,{description:Fe,isPending:p.isPending,onConfirm:M,onOpenChange:o,open:i,title:`Delete cluster`}),t[91]=p.isPending,t[92]=M,t[93]=i,t[94]=Fe,t[95]=Ie):Ie=t[95];let Le;return t[96]!==H||t[97]!==U||t[98]!==Pe||t[99]!==Ie?(Le=(0,Z.jsxs)(Z.Fragment,{children:[N,H,U,Pe,Ie]}),t[96]=H,t[97]=U,t[98]=Pe,t[99]=Ie,t[100]=Le):Le=t[100],Le}function lt(e){return e.message}function ut(){let e=(0,ke.c)(2),{clusterName:t}=p.useParams(),n;return e[0]===t?n=e[1]:(n=(0,Z.jsx)(ct,{clusterName:t}),e[0]=t,e[1]=n),n}export{ut as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id24.js b/spinifex/services/spinifexui/frontend/dist/assets/_id24.js index effc98725..c2e5d9bdc 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id24.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id24.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./link.js";import{Qt as s,en as c}from"./cluster-config.js";import{t as l}from"./createLucideIcon.js";import{t as u}from"./back-link.js";import{c as d,i as f,n as p,s as m,t as h}from"./select.js";import{t as g}from"./rotate-cw.js";import{t as _}from"./trash-2.js";import{t as v}from"./button.js";import{t as y}from"./input.js";import{n as b}from"./admin-context.js";import{a as x,c as S,i as C,s as w}from"./ec2.js";import{J as T,K as E,W as D,Z as O,d as k,i as A,it as j,nt as M,rt as N}from"./ec22.js";import{f as P}from"./iam2.js";import{t as ee}from"./_id5.js";import{t as F}from"./error-banner.js";import{t as te}from"./page-heading.js";import{a as I,t as L}from"./field.js";import{a as R,i as z,l as ne,n as B,o as V,r as H,s as U,t as W}from"./alert-dialog.js";import{t as G}from"./delete-confirmation-dialog.js";import{n as K,t as q}from"./detail-row.js";import{t as J}from"./state-badge.js";import{t as re}from"./ami-details.js";import{t as ie}from"./gpu-instance-type-select.js";import{r as ae}from"./admin.js";import{t as Y}from"./textarea.js";var oe=l(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),X=l(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),se=l(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),ce=l(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),le=l(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Z=e(n(),1),Q=t();function ue({instanceId:e,open:t,onOpenChange:n}){let r=k(),[i,a]=(0,Z.useState)(``),[o,s]=(0,Z.useState)(``),[c,l]=(0,Z.useState)(null);function u(e){e||(a(``),s(``),l(null)),n(e)}async function d(){try{let t=await r.mutateAsync({instanceId:e,name:i,description:o||void 0});l(t.ImageId??null),a(``),s(``)}catch{}}return(0,Q.jsx)(W,{onOpenChange:u,open:t,children:(0,Q.jsxs)(z,{children:[(0,Q.jsxs)(U,{children:[(0,Q.jsx)(ne,{children:c?`Image Created`:`Create Image (AMI)`}),(0,Q.jsx)(R,{children:c?`Image "${c}" was created successfully.`:`Create an AMI from instance "${e}".`})]}),!c&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(L,{children:[(0,Q.jsx)(I,{children:(0,Q.jsx)(`label`,{htmlFor:`imageName`,children:`Name`})}),(0,Q.jsx)(y,{id:`imageName`,onChange:e=>a(e.target.value),placeholder:`my-image`,value:i})]}),(0,Q.jsxs)(L,{children:[(0,Q.jsx)(I,{children:(0,Q.jsx)(`label`,{htmlFor:`imageDescription`,children:`Description`})}),(0,Q.jsx)(Y,{id:`imageDescription`,onChange:e=>s(e.target.value),placeholder:`Optional description`,rows:2,value:o})]})]}),(0,Q.jsxs)(V,{children:[(0,Q.jsx)(H,{children:c?`Close`:`Cancel`}),!c&&(0,Q.jsx)(B,{disabled:r.isPending||!i.trim(),onClick:d,children:r.isPending?`Creating…`:`Create Image`})]})]})})}var $=r();function de(e){let t=(0,$.c)(22),{gpu:n}=e;if(!n)return null;let r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,Q.jsx)(K.Header,{children:`GPU`}),t[0]=r):r=t[0];let i;t[1]===n.model?i=t[2]:(i=(0,Q.jsx)(q,{label:`Model`,value:n.model}),t[1]=n.model,t[2]=i);let a;t[3]===n.vram_mib?a=t[4]:(a=c(n.vram_mib),t[3]=n.vram_mib,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,Q.jsx)(q,{label:`VRAM`,value:a}),t[5]=a,t[6]=o);let s=n.profile?`MIG slice`:`PCIe passthrough`,l;t[7]===s?l=t[8]:(l=(0,Q.jsx)(q,{label:`Attachment`,value:s}),t[7]=s,t[8]=l);let u;t[9]===n.profile?u=t[10]:(u=n.profile&&(0,Q.jsx)(q,{label:`Profile`,value:n.profile}),t[9]=n.profile,t[10]=u);let d;t[11]===n.mdev_path?d=t[12]:(d=n.mdev_path&&(0,Q.jsx)(q,{label:`Mdev path`,value:n.mdev_path}),t[11]=n.mdev_path,t[12]=d);let f;t[13]===n.pci_address?f=t[14]:(f=n.pci_address&&(0,Q.jsx)(q,{label:`PCI address`,value:n.pci_address}),t[13]=n.pci_address,t[14]=f);let p;return t[15]!==i||t[16]!==o||t[17]!==l||t[18]!==u||t[19]!==d||t[20]!==f?(p=(0,Q.jsxs)(K,{children:[r,(0,Q.jsxs)(K.Content,{children:[i,o,l,u,d,f]})]}),t[15]=i,t[16]=o,t[17]=l,t[18]=u,t[19]=d,t[20]=f,t[21]=p):p=t[21],p}function fe(e){let t=(0,$.c)(31),{instanceId:n}=e,r;t[0]===n?r=t[1]:(r=C(n),t[0]=n,t[1]=r);let{data:a}=i(r),{data:s}=i(P),c=A(),l=D(),[u,f]=(0,Z.useState)(``),g;t[2]===a?.IamInstanceProfileAssociations?g=t[3]:(g=a?.IamInstanceProfileAssociations?.find(me),t[2]=a?.IamInstanceProfileAssociations,t[3]=g);let _=g,y;t[4]===s?.InstanceProfiles?y=t[5]:(y=s?.InstanceProfiles??[],t[4]=s?.InstanceProfiles,t[5]=y);let b=y,x;t[6]!==c||t[7]!==n||t[8]!==u?(x=async()=>{u&&(await c.mutateAsync({instanceId:n,instanceProfileName:u}),f(``))},t[6]=c,t[7]=n,t[8]=u,t[9]=x):x=t[9];let S=x,w;t[10]!==_||t[11]!==l||t[12]!==n?(w=async()=>{_?.AssociationId&&await l.mutateAsync({associationId:_.AssociationId,instanceId:n})},t[10]=_,t[11]=l,t[12]=n,t[13]=w):w=t[13];let T=w,E;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,Q.jsx)(K.Header,{children:`IAM Role`}),t[14]=E):E=t[14];let O;t[15]===c.error?O=t[16]:(O=c.error&&(0,Q.jsx)(`div`,{className:`col-span-2`,children:(0,Q.jsx)(F,{error:c.error,msg:`Failed to associate instance profile`})}),t[15]=c.error,t[16]=O);let k;t[17]===l.error?k=t[18]:(k=l.error&&(0,Q.jsx)(`div`,{className:`col-span-2`,children:(0,Q.jsx)(F,{error:l.error,msg:`Failed to disassociate instance profile`})}),t[17]=l.error,t[18]=k);let j;t[19]!==c.isPending||t[20]!==_||t[21]!==l.isPending||t[22]!==S||t[23]!==T||t[24]!==b||t[25]!==u?(j=_?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(q,{label:`Instance Profile ARN`,value:_.IamInstanceProfile?.Arn}),(0,Q.jsx)(q,{label:`State`,value:(0,Q.jsx)(J,{state:_.State})}),(0,Q.jsx)(`div`,{className:`col-span-2 flex justify-end`,children:(0,Q.jsx)(v,{disabled:l.isPending,onClick:T,size:`sm`,variant:`destructive`,children:l.isPending?`Detaching…`:`Detach`})})]}):(0,Q.jsxs)(`div`,{className:`col-span-2 space-y-3`,children:[(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No instance profile is associated. Associate one to flow role credentials to this instance via IMDS.`}),b.length>0?(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsxs)(h,{onValueChange:e=>f(e??``),value:u,children:[(0,Q.jsx)(m,{className:`w-full`,children:(0,Q.jsx)(d,{placeholder:`Select an instance profile`})}),(0,Q.jsx)(p,{children:b.map(pe)})]}),(0,Q.jsx)(v,{disabled:!u||c.isPending,onClick:S,size:`sm`,children:c.isPending?`Associating…`:`Associate`})]}):(0,Q.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No instance profiles exist.`,` `,(0,Q.jsx)(o,{className:`text-primary hover:underline`,to:`/iam/create-instance-profile`,children:`Create one`}),` `,`first.`]})]}),t[19]=c.isPending,t[20]=_,t[21]=l.isPending,t[22]=S,t[23]=T,t[24]=b,t[25]=u,t[26]=j):j=t[26];let M;return t[27]!==O||t[28]!==k||t[29]!==j?(M=(0,Q.jsxs)(K,{children:[E,(0,Q.jsxs)(K.Content,{children:[O,k,j]})]}),t[27]=O,t[28]=k,t[29]=j,t[30]=M):M=t[30],M}function pe(e){return(0,Q.jsx)(f,{value:e.InstanceProfileName??``,children:e.InstanceProfileName},e.InstanceProfileName)}function me(e){return e.State===`associating`||e.State===`associated`}var he=new Set([`pending`,`stopping`,`shutting-down`,`terminated`]);function ge(e){let t=(0,$.c)(43),{instanceId:n,state:r}=e,i=M(),a=N(),o=O(),s=j(),[c,l]=(0,Z.useState)(!1),u=he.has(r??``),d;t[0]!==n||t[1]!==s?(d=()=>{s.mutate(n,{onSettled:()=>l(!1)})},t[0]=n,t[1]=s,t[2]=d):d=t[2];let f=d;if(u&&r!==`terminated`){let e;return t[3]===r?e=t[4]:(e=(0,Q.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,Q.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Instance is `,r,`. Actions will be available once the operation completes.`]})}),t[3]=r,t[4]=e),e}if(r===`terminated`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,Q.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`This instance has been terminated and cannot be managed.`})}),t[5]=e):e=t[5],e}let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,Q.jsx)(`h2`,{className:`mb-4 font-semibold`,children:`Instance Actions`}),t[6]=p):p=t[6];let m;t[7]===i.error?m=t[8]:(m=i.error&&(0,Q.jsx)(F,{error:i.error,msg:`Failed to start instance`}),t[7]=i.error,t[8]=m);let h;t[9]===a.error?h=t[10]:(h=a.error&&(0,Q.jsx)(F,{error:a.error,msg:`Failed to stop instance`}),t[9]=a.error,t[10]=h);let y;t[11]===o.error?y=t[12]:(y=o.error&&(0,Q.jsx)(F,{error:o.error,msg:`Failed to reboot instance`}),t[11]=o.error,t[12]=y);let b;t[13]===s.error?b=t[14]:(b=s.error&&(0,Q.jsx)(F,{error:s.error,msg:`Failed to terminate instance`}),t[13]=s.error,t[14]=b);let x;t[15]!==n||t[16]!==i||t[17]!==r?(x=r===`stopped`&&(0,Q.jsxs)(v,{disabled:i.isPending,onClick:()=>i.mutate(n),size:`sm`,variant:`default`,children:[(0,Q.jsx)(se,{className:`size-4`}),i.isPending?`Starting`:`Start`]}),t[15]=n,t[16]=i,t[17]=r,t[18]=x):x=t[18];let S;t[19]!==n||t[20]!==o||t[21]!==r||t[22]!==a?(S=r===`running`&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(v,{disabled:a.isPending,onClick:()=>a.mutate(n),size:`sm`,variant:`outline`,children:[(0,Q.jsx)(X,{className:`size-4`}),a.isPending?`Stopping`:`Stop`]}),(0,Q.jsxs)(v,{disabled:o.isPending,onClick:()=>o.mutate(n),size:`sm`,variant:`outline`,children:[(0,Q.jsx)(g,{className:`size-4`}),o.isPending?`Rebooting`:`Reboot`]})]}),t[19]=n,t[20]=o,t[21]=r,t[22]=a,t[23]=S):S=t[23];let C;t[24]!==r||t[25]!==s.isPending?(C=(r===`stopped`||r===`running`)&&(0,Q.jsxs)(v,{disabled:s.isPending,onClick:()=>l(!0),size:`sm`,variant:`destructive`,children:[(0,Q.jsx)(_,{className:`size-4`}),s.isPending?`Terminating`:`Terminate`]}),t[24]=r,t[25]=s.isPending,t[26]=C):C=t[26];let w;t[27]!==x||t[28]!==S||t[29]!==C?(w=(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[x,S,C]}),t[27]=x,t[28]=S,t[29]=C,t[30]=w):w=t[30];let T=`Are you sure you want to terminate the instance "${n}"? This action cannot be undone.`,E;t[31]!==f||t[32]!==c||t[33]!==T||t[34]!==s.isPending?(E=(0,Q.jsx)(G,{confirmLabel:`Terminate`,description:T,isPending:s.isPending,onConfirm:f,onOpenChange:l,open:c,pendingLabel:`Terminating…`,title:`Terminate Instance`}),t[31]=f,t[32]=c,t[33]=T,t[34]=s.isPending,t[35]=E):E=t[35];let D;return t[36]!==w||t[37]!==E||t[38]!==m||t[39]!==h||t[40]!==y||t[41]!==b?(D=(0,Q.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[p,m,h,y,b,w,E]}),t[36]=w,t[37]=E,t[38]=m,t[39]=h,t[40]=y,t[41]=b,t[42]=D):D=t[42],D}function _e(){let{id:e}=ee.useParams(),{isAdmin:t}=b(),{data:n}=a(w(e)),r=n.Reservations?.[0]?.Instances?.[0],{data:c}=a(x(r?.ImageId)),l=c?.Images?.[0],{data:d}=a(S),{data:f}=i({...ae,enabled:t,refetchInterval:5e3}),p=f?.vms?.find(t=>t.instance_id===e),m=T(),h=E(),[g,_]=(0,Z.useState)(!1),[y,C]=(0,Z.useState)(``),[D,O]=(0,Z.useState)(!1),[k,A]=(0,Z.useState)(null),[j,M]=(0,Z.useState)(!1);if(!r?.InstanceId)return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(u,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,Q.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance not found.`})]});let N=s(r.LaunchTime),P=r.State?.Name===`running`,G=r.State?.Name===`stopped`;async function Y(){try{await m.mutateAsync({instanceId:e,instanceType:y}),_(!1),C(``)}catch{}}async function X(){try{let t=await h.mutateAsync(e),n=t.Output?atob(t.Output):`(no output)`;A(n),O(!0)}catch{}}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(u,{to:`/ec2/describe-instances`,children:`Back to instances`}),m.error&&(0,Q.jsx)(F,{error:m.error,msg:`Failed to modify instance`}),h.error&&(0,Q.jsx)(F,{error:h.error,msg:`Failed to get console output`}),(0,Q.jsxs)(`div`,{className:`space-y-6`,children:[(0,Q.jsx)(te,{actions:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[P&&(0,Q.jsxs)(v,{disabled:h.isPending,onClick:X,size:`sm`,variant:`outline`,children:[(0,Q.jsx)(le,{className:`size-4`}),h.isPending?`Fetching…`:`View Console`]}),(P||G)&&(0,Q.jsxs)(v,{onClick:()=>M(!0),size:`sm`,variant:`outline`,children:[(0,Q.jsx)(oe,{className:`size-4`}),`Create Image`]}),G&&(0,Q.jsxs)(v,{onClick:()=>{C(r.InstanceType??``),_(!0)},size:`sm`,variant:`outline`,children:[(0,Q.jsx)(ce,{className:`size-4`}),`Modify Instance`]}),(0,Q.jsx)(J,{state:r.State?.Name})]}),subtitle:`Instance Details`,title:r.InstanceId}),(0,Q.jsx)(ge,{instanceId:r.InstanceId,state:r.State?.Name}),D&&k!==null&&(0,Q.jsxs)(K,{children:[(0,Q.jsx)(K.Header,{children:(0,Q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[`Console Output`,(0,Q.jsx)(v,{onClick:()=>{O(!1),A(null)},size:`sm`,variant:`ghost`,children:`Hide`})]})}),(0,Q.jsx)(`div`,{className:`p-4`,children:(0,Q.jsx)(`pre`,{className:`max-h-96 overflow-y-auto rounded bg-muted p-3 font-mono text-xs whitespace-pre-wrap`,children:k})})]}),(0,Q.jsxs)(K,{children:[(0,Q.jsx)(K.Header,{children:`Instance Information`}),(0,Q.jsxs)(K.Content,{children:[(0,Q.jsx)(q,{label:`Instance ID`,value:r.InstanceId}),(0,Q.jsx)(q,{label:`Instance Type`,value:r.InstanceType}),(0,Q.jsx)(q,{label:`Instance State`,value:r.State?.Name}),(0,Q.jsx)(q,{label:`State Code`,value:r.State?.Code?.toString()}),(0,Q.jsx)(q,{label:`Launch Time`,value:N}),(0,Q.jsx)(q,{label:`Availability Zone`,value:r.Placement?.AvailabilityZone}),(0,Q.jsx)(q,{label:`Placement Group`,value:r.Placement?.GroupName?(0,Q.jsx)(o,{className:`text-primary hover:underline`,to:`/ec2/describe-placement-groups`,children:r.Placement.GroupName}):void 0})]})]}),(r.PrivateIpAddress||r.PublicIpAddress||r.VpcId||r.SubnetId||r.SecurityGroups&&r.SecurityGroups.length>0)&&(0,Q.jsxs)(K,{children:[(0,Q.jsx)(K.Header,{children:`Network & Security`}),(0,Q.jsxs)(K.Content,{children:[(0,Q.jsx)(q,{label:`Private IP Address`,value:r.PrivateIpAddress}),(0,Q.jsx)(q,{label:`Public IP Address`,value:r.PublicIpAddress}),(0,Q.jsx)(q,{label:`Private DNS`,value:r.PrivateDnsName}),(0,Q.jsx)(q,{label:`Public DNS`,value:r.PublicDnsName}),(0,Q.jsx)(q,{label:`VPC ID`,value:r.VpcId?(0,Q.jsx)(o,{className:`text-primary hover:underline`,params:{id:r.VpcId},to:`/ec2/describe-vpcs/$id`,children:r.VpcId}):void 0}),(0,Q.jsx)(q,{label:`Subnet ID`,value:r.SubnetId?(0,Q.jsx)(o,{className:`text-primary hover:underline`,params:{id:r.SubnetId},to:`/ec2/describe-subnets/$id`,children:r.SubnetId}):void 0}),(0,Q.jsx)(q,{label:`Key Name`,value:r.KeyName}),(0,Q.jsx)(q,{label:`Security Groups`,value:r.SecurityGroups?.map(e=>e.GroupName).join(`, `)})]})]}),(0,Q.jsx)(fe,{instanceId:r.InstanceId}),t&&(0,Q.jsx)(de,{gpu:p?.gpu}),r.BlockDeviceMappings&&r.BlockDeviceMappings.length>0&&(0,Q.jsxs)(K,{children:[(0,Q.jsx)(K.Header,{children:`Block Device Mappings`}),r.BlockDeviceMappings.map(e=>(0,Q.jsxs)(K.Content,{children:[(0,Q.jsx)(q,{label:`Device Name`,value:e.DeviceName}),(0,Q.jsx)(q,{label:`Volume ID`,value:e.Ebs?.VolumeId?(0,Q.jsx)(o,{className:`text-primary hover:underline`,params:{id:e.Ebs.VolumeId},to:`/ec2/describe-volumes/$id`,children:e.Ebs.VolumeId}):void 0}),(0,Q.jsx)(q,{label:`Status`,value:e.Ebs?.Status}),(0,Q.jsx)(q,{label:`Attach Time`,value:s(e.Ebs?.AttachTime)}),(0,Q.jsx)(q,{label:`Delete on Termination`,value:e.Ebs?.DeleteOnTermination?`Yes`:`No`})]},e.DeviceName))]}),l&&(0,Q.jsx)(re,{image:l})]}),(0,Q.jsx)(W,{onOpenChange:e=>{e||(_(!1),C(``))},open:g,children:(0,Q.jsxs)(z,{children:[(0,Q.jsxs)(U,{children:[(0,Q.jsx)(ne,{children:`Modify Instance`}),(0,Q.jsxs)(R,{children:[`Select a new instance type for "`,r.InstanceId,`". The instance must be stopped to modify its attributes.`]})]}),(0,Q.jsxs)(L,{children:[(0,Q.jsx)(I,{children:(0,Q.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,Q.jsx)(ie,{className:`w-full`,id:`instanceType`,instanceTypes:d.InstanceTypes??[],onValueChange:C,value:y})]}),(0,Q.jsxs)(V,{children:[(0,Q.jsx)(H,{children:`Cancel`}),(0,Q.jsx)(B,{disabled:m.isPending||!y||y===r.InstanceType,onClick:Y,children:m.isPending?`Saving…`:`Save Changes`})]})]})}),(0,Q.jsx)(ue,{instanceId:r.InstanceId,onOpenChange:M,open:j})]})}export{_e as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./link.js";import{Qt as s,en as c}from"./cluster-config.js";import{t as l}from"./createLucideIcon.js";import{t as u}from"./back-link.js";import{c as d,i as f,n as p,s as m,t as h}from"./select.js";import{t as g}from"./rotate-cw.js";import{t as _}from"./trash-2.js";import{t as v}from"./button.js";import{t as y}from"./input.js";import{n as b}from"./admin-context.js";import{a as x,c as S,i as C,s as w}from"./ec2.js";import{J as T,K as E,W as D,Z as O,d as k,i as ee,it as A,nt as j,rt as te}from"./ec22.js";import{f as ne}from"./iam2.js";import{t as re}from"./_id5.js";import{t as M}from"./error-banner.js";import{t as ie}from"./page-heading.js";import{a as ae,t as oe}from"./field.js";import{a as se,i as ce,l as le,n as ue,o as de,r as fe,s as pe,t as me}from"./alert-dialog.js";import{t as he}from"./delete-confirmation-dialog.js";import{n as N,t as P}from"./detail-row.js";import{t as ge}from"./state-badge.js";import{t as _e}from"./ami-details.js";import{t as ve}from"./gpu-instance-type-select.js";import{r as ye}from"./admin.js";import{t as be}from"./textarea.js";var xe=l(`image-plus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),Se=l(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),Ce=l(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),we=l(`settings-2`,[[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`path`,{d:`M19 7h-9`,key:`6i9tg`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),Te=l(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Ee=r(),F=e(n(),1),I=t();function De(e){let t=(0,Ee.c)(36),{instanceId:n,open:r,onOpenChange:i}=e,a=k(),[o,s]=(0,F.useState)(``),[c,l]=(0,F.useState)(``),[u,d]=(0,F.useState)(null),f;t[0]===i?f=t[1]:(f=function(e){e||(s(``),l(``),d(null)),i(e)},t[0]=i,t[1]=f);let p=f,m;t[2]!==a||t[3]!==c||t[4]!==o||t[5]!==n?(m=async function(){try{let e=await a.mutateAsync({instanceId:n,name:o,description:c||void 0});d(e.ImageId??null),s(``),l(``)}catch{}},t[2]=a,t[3]=c,t[4]=o,t[5]=n,t[6]=m):m=t[6];let h=m,g=u?`Image Created`:`Create Image (AMI)`,_;t[7]===g?_=t[8]:(_=(0,I.jsx)(le,{children:g}),t[7]=g,t[8]=_);let v=u?`Image "${u}" was created successfully.`:`Create an AMI from instance "${n}".`,b;t[9]===v?b=t[10]:(b=(0,I.jsx)(se,{children:v}),t[9]=v,t[10]=b);let x;t[11]!==_||t[12]!==b?(x=(0,I.jsxs)(pe,{children:[_,b]}),t[11]=_,t[12]=b,t[13]=x):x=t[13];let S;t[14]!==u||t[15]!==c||t[16]!==o?(S=!u&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(oe,{children:[(0,I.jsx)(ae,{children:(0,I.jsx)(`label`,{htmlFor:`imageName`,children:`Name`})}),(0,I.jsx)(y,{id:`imageName`,onChange:e=>s(e.target.value),placeholder:`my-image`,value:o})]}),(0,I.jsxs)(oe,{children:[(0,I.jsx)(ae,{children:(0,I.jsx)(`label`,{htmlFor:`imageDescription`,children:`Description`})}),(0,I.jsx)(be,{id:`imageDescription`,onChange:e=>l(e.target.value),placeholder:`Optional description`,rows:2,value:c})]})]}),t[14]=u,t[15]=c,t[16]=o,t[17]=S):S=t[17];let C=u?`Close`:`Cancel`,w;t[18]===C?w=t[19]:(w=(0,I.jsx)(fe,{children:C}),t[18]=C,t[19]=w);let T;t[20]!==a||t[21]!==u||t[22]!==h||t[23]!==o?(T=!u&&(0,I.jsx)(ue,{disabled:a.isPending||!o.trim(),onClick:h,children:a.isPending?`Creating…`:`Create Image`}),t[20]=a,t[21]=u,t[22]=h,t[23]=o,t[24]=T):T=t[24];let E;t[25]!==w||t[26]!==T?(E=(0,I.jsxs)(de,{children:[w,T]}),t[25]=w,t[26]=T,t[27]=E):E=t[27];let D;t[28]!==E||t[29]!==x||t[30]!==S?(D=(0,I.jsxs)(ce,{children:[x,S,E]}),t[28]=E,t[29]=x,t[30]=S,t[31]=D):D=t[31];let O;return t[32]!==p||t[33]!==r||t[34]!==D?(O=(0,I.jsx)(me,{onOpenChange:p,open:r,children:D}),t[32]=p,t[33]=r,t[34]=D,t[35]=O):O=t[35],O}function Oe(e){let t=(0,Ee.c)(22),{gpu:n}=e;if(!n)return null;let r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,I.jsx)(N.Header,{children:`GPU`}),t[0]=r):r=t[0];let i;t[1]===n.model?i=t[2]:(i=(0,I.jsx)(P,{label:`Model`,value:n.model}),t[1]=n.model,t[2]=i);let a;t[3]===n.vram_mib?a=t[4]:(a=c(n.vram_mib),t[3]=n.vram_mib,t[4]=a);let o;t[5]===a?o=t[6]:(o=(0,I.jsx)(P,{label:`VRAM`,value:a}),t[5]=a,t[6]=o);let s=n.profile?`MIG slice`:`PCIe passthrough`,l;t[7]===s?l=t[8]:(l=(0,I.jsx)(P,{label:`Attachment`,value:s}),t[7]=s,t[8]=l);let u;t[9]===n.profile?u=t[10]:(u=n.profile&&(0,I.jsx)(P,{label:`Profile`,value:n.profile}),t[9]=n.profile,t[10]=u);let d;t[11]===n.mdev_path?d=t[12]:(d=n.mdev_path&&(0,I.jsx)(P,{label:`Mdev path`,value:n.mdev_path}),t[11]=n.mdev_path,t[12]=d);let f;t[13]===n.pci_address?f=t[14]:(f=n.pci_address&&(0,I.jsx)(P,{label:`PCI address`,value:n.pci_address}),t[13]=n.pci_address,t[14]=f);let p;return t[15]!==i||t[16]!==o||t[17]!==l||t[18]!==u||t[19]!==d||t[20]!==f?(p=(0,I.jsxs)(N,{children:[r,(0,I.jsxs)(N.Content,{children:[i,o,l,u,d,f]})]}),t[15]=i,t[16]=o,t[17]=l,t[18]=u,t[19]=d,t[20]=f,t[21]=p):p=t[21],p}function ke(e){let t=(0,Ee.c)(31),{instanceId:n}=e,r;t[0]===n?r=t[1]:(r=C(n),t[0]=n,t[1]=r);let{data:a}=i(r),{data:s}=i(ne),c=ee(),l=D(),[u,f]=(0,F.useState)(``),g;t[2]===a?.IamInstanceProfileAssociations?g=t[3]:(g=a?.IamInstanceProfileAssociations?.find(je),t[2]=a?.IamInstanceProfileAssociations,t[3]=g);let _=g,y;t[4]===s?.InstanceProfiles?y=t[5]:(y=s?.InstanceProfiles??[],t[4]=s?.InstanceProfiles,t[5]=y);let b=y,x;t[6]!==c||t[7]!==n||t[8]!==u?(x=async()=>{u&&(await c.mutateAsync({instanceId:n,instanceProfileName:u}),f(``))},t[6]=c,t[7]=n,t[8]=u,t[9]=x):x=t[9];let S=x,w;t[10]!==_||t[11]!==l||t[12]!==n?(w=async()=>{_?.AssociationId&&await l.mutateAsync({associationId:_.AssociationId,instanceId:n})},t[10]=_,t[11]=l,t[12]=n,t[13]=w):w=t[13];let T=w,E;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,I.jsx)(N.Header,{children:`IAM Role`}),t[14]=E):E=t[14];let O;t[15]===c.error?O=t[16]:(O=c.error&&(0,I.jsx)(`div`,{className:`col-span-2`,children:(0,I.jsx)(M,{error:c.error,msg:`Failed to associate instance profile`})}),t[15]=c.error,t[16]=O);let k;t[17]===l.error?k=t[18]:(k=l.error&&(0,I.jsx)(`div`,{className:`col-span-2`,children:(0,I.jsx)(M,{error:l.error,msg:`Failed to disassociate instance profile`})}),t[17]=l.error,t[18]=k);let A;t[19]!==c.isPending||t[20]!==_||t[21]!==l.isPending||t[22]!==S||t[23]!==T||t[24]!==b||t[25]!==u?(A=_?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(P,{label:`Instance Profile ARN`,value:_.IamInstanceProfile?.Arn}),(0,I.jsx)(P,{label:`State`,value:(0,I.jsx)(ge,{state:_.State})}),(0,I.jsx)(`div`,{className:`col-span-2 flex justify-end`,children:(0,I.jsx)(v,{disabled:l.isPending,onClick:T,size:`sm`,variant:`destructive`,children:l.isPending?`Detaching…`:`Detach`})})]}):(0,I.jsxs)(`div`,{className:`col-span-2 space-y-3`,children:[(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No instance profile is associated. Associate one to flow role credentials to this instance via IMDS.`}),b.length>0?(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,I.jsxs)(h,{onValueChange:e=>f(e??``),value:u,children:[(0,I.jsx)(m,{className:`w-full`,children:(0,I.jsx)(d,{placeholder:`Select an instance profile`})}),(0,I.jsx)(p,{children:b.map(Ae)})]}),(0,I.jsx)(v,{disabled:!u||c.isPending,onClick:S,size:`sm`,children:c.isPending?`Associating…`:`Associate`})]}):(0,I.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`No instance profiles exist.`,` `,(0,I.jsx)(o,{className:`text-primary hover:underline`,to:`/iam/create-instance-profile`,children:`Create one`}),` `,`first.`]})]}),t[19]=c.isPending,t[20]=_,t[21]=l.isPending,t[22]=S,t[23]=T,t[24]=b,t[25]=u,t[26]=A):A=t[26];let j;return t[27]!==O||t[28]!==k||t[29]!==A?(j=(0,I.jsxs)(N,{children:[E,(0,I.jsxs)(N.Content,{children:[O,k,A]})]}),t[27]=O,t[28]=k,t[29]=A,t[30]=j):j=t[30],j}function Ae(e){return(0,I.jsx)(f,{value:e.InstanceProfileName??``,children:e.InstanceProfileName},e.InstanceProfileName)}function je(e){return e.State===`associating`||e.State===`associated`}var L=new Set([`pending`,`stopping`,`shutting-down`,`terminated`]);function Me(e){let t=(0,Ee.c)(43),{instanceId:n,state:r}=e,i=j(),a=te(),o=O(),s=A(),[c,l]=(0,F.useState)(!1),u=L.has(r??``),d;t[0]!==n||t[1]!==s?(d=()=>{s.mutate(n,{onSettled:()=>l(!1)})},t[0]=n,t[1]=s,t[2]=d):d=t[2];let f=d;if(u&&r!==`terminated`){let e;return t[3]===r?e=t[4]:(e=(0,I.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,I.jsxs)(`p`,{className:`text-center text-sm text-muted-foreground`,children:[`Instance is `,r,`. Actions will be available once the operation completes.`]})}),t[3]=r,t[4]=e),e}if(r===`terminated`){let e;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,I.jsx)(`div`,{className:`rounded-lg border bg-muted/50 p-4`,children:(0,I.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:`This instance has been terminated and cannot be managed.`})}),t[5]=e):e=t[5],e}let p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,I.jsx)(`h2`,{className:`mb-4 font-semibold`,children:`Instance Actions`}),t[6]=p):p=t[6];let m;t[7]===i.error?m=t[8]:(m=i.error&&(0,I.jsx)(M,{error:i.error,msg:`Failed to start instance`}),t[7]=i.error,t[8]=m);let h;t[9]===a.error?h=t[10]:(h=a.error&&(0,I.jsx)(M,{error:a.error,msg:`Failed to stop instance`}),t[9]=a.error,t[10]=h);let y;t[11]===o.error?y=t[12]:(y=o.error&&(0,I.jsx)(M,{error:o.error,msg:`Failed to reboot instance`}),t[11]=o.error,t[12]=y);let b;t[13]===s.error?b=t[14]:(b=s.error&&(0,I.jsx)(M,{error:s.error,msg:`Failed to terminate instance`}),t[13]=s.error,t[14]=b);let x;t[15]!==n||t[16]!==i||t[17]!==r?(x=r===`stopped`&&(0,I.jsxs)(v,{disabled:i.isPending,onClick:()=>i.mutate(n),size:`sm`,variant:`default`,children:[(0,I.jsx)(Ce,{className:`size-4`}),i.isPending?`Starting`:`Start`]}),t[15]=n,t[16]=i,t[17]=r,t[18]=x):x=t[18];let S;t[19]!==n||t[20]!==o||t[21]!==r||t[22]!==a?(S=r===`running`&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(v,{disabled:a.isPending,onClick:()=>a.mutate(n),size:`sm`,variant:`outline`,children:[(0,I.jsx)(Se,{className:`size-4`}),a.isPending?`Stopping`:`Stop`]}),(0,I.jsxs)(v,{disabled:o.isPending,onClick:()=>o.mutate(n),size:`sm`,variant:`outline`,children:[(0,I.jsx)(g,{className:`size-4`}),o.isPending?`Rebooting`:`Reboot`]})]}),t[19]=n,t[20]=o,t[21]=r,t[22]=a,t[23]=S):S=t[23];let C;t[24]!==r||t[25]!==s.isPending?(C=(r===`stopped`||r===`running`)&&(0,I.jsxs)(v,{disabled:s.isPending,onClick:()=>l(!0),size:`sm`,variant:`destructive`,children:[(0,I.jsx)(_,{className:`size-4`}),s.isPending?`Terminating`:`Terminate`]}),t[24]=r,t[25]=s.isPending,t[26]=C):C=t[26];let w;t[27]!==x||t[28]!==S||t[29]!==C?(w=(0,I.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[x,S,C]}),t[27]=x,t[28]=S,t[29]=C,t[30]=w):w=t[30];let T=`Are you sure you want to terminate the instance "${n}"? This action cannot be undone.`,E;t[31]!==f||t[32]!==c||t[33]!==T||t[34]!==s.isPending?(E=(0,I.jsx)(he,{confirmLabel:`Terminate`,description:T,isPending:s.isPending,onConfirm:f,onOpenChange:l,open:c,pendingLabel:`Terminating…`,title:`Terminate Instance`}),t[31]=f,t[32]=c,t[33]=T,t[34]=s.isPending,t[35]=E):E=t[35];let D;return t[36]!==w||t[37]!==E||t[38]!==m||t[39]!==h||t[40]!==y||t[41]!==b?(D=(0,I.jsxs)(`div`,{className:`rounded-lg border bg-card p-4`,children:[p,m,h,y,b,w,E]}),t[36]=w,t[37]=E,t[38]=m,t[39]=h,t[40]=y,t[41]=b,t[42]=D):D=t[42],D}function R(){let e=(0,Ee.c)(136),{id:t}=re.useParams(),{isAdmin:n}=b(),r;e[0]===t?r=e[1]:(r=w(t),e[0]=t,e[1]=r);let{data:c}=a(r),l=c.Reservations?.[0]?.Instances?.[0],d=l?.ImageId,f;e[2]===d?f=e[3]:(f=x(d),e[2]=d,e[3]=f);let{data:p}=a(f),m=p?.Images?.[0],{data:h}=a(S),g;e[4]===n?g=e[5]:(g={...ye,enabled:n,refetchInterval:5e3},e[4]=n,e[5]=g);let{data:_}=i(g),y;e[6]!==t||e[7]!==_?.vms?(y=_?.vms?.find(e=>e.instance_id===t),e[6]=t,e[7]=_?.vms,e[8]=y):y=e[8];let C=y,D=T(),O=E(),[k,ee]=(0,F.useState)(!1),[A,j]=(0,F.useState)(``),[te,ne]=(0,F.useState)(!1),[he,be]=(0,F.useState)(null),[Se,Ce]=(0,F.useState)(!1);if(!l?.InstanceId){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance not found.`})]}),e[9]=t):t=e[9],t}let Ae;e[10]===l.LaunchTime?Ae=e[11]:(Ae=s(l.LaunchTime),e[10]=l.LaunchTime,e[11]=Ae);let je=Ae,L=l.State?.Name===`running`,R=l.State?.Name===`stopped`,Fe;e[12]!==t||e[13]!==D||e[14]!==A?(Fe=async function(){try{await D.mutateAsync({instanceId:t,instanceType:A}),ee(!1),j(``)}catch{}},e[12]=t,e[13]=D,e[14]=A,e[15]=Fe):Fe=e[15];let Ie=Fe,Le;e[16]!==O||e[17]!==t?(Le=async function(){try{let e=await O.mutateAsync(t),n=e.Output?atob(e.Output):`(no output)`;be(n),ne(!0)}catch{}},e[16]=O,e[17]=t,e[18]=Le):Le=e[18];let Re=Le,ze;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,I.jsx)(u,{to:`/ec2/describe-instances`,children:`Back to instances`}),e[19]=ze):ze=e[19];let z;e[20]===D.error?z=e[21]:(z=D.error&&(0,I.jsx)(M,{error:D.error,msg:`Failed to modify instance`}),e[20]=D.error,e[21]=z);let B;e[22]===O.error?B=e[23]:(B=O.error&&(0,I.jsx)(M,{error:O.error,msg:`Failed to get console output`}),e[22]=O.error,e[23]=B);let V;e[24]!==O.isPending||e[25]!==Re||e[26]!==L?(V=L&&(0,I.jsxs)(v,{disabled:O.isPending,onClick:Re,size:`sm`,variant:`outline`,children:[(0,I.jsx)(Te,{className:`size-4`}),O.isPending?`Fetching…`:`View Console`]}),e[24]=O.isPending,e[25]=Re,e[26]=L,e[27]=V):V=e[27];let H;e[28]!==L||e[29]!==R?(H=(L||R)&&(0,I.jsxs)(v,{onClick:()=>Ce(!0),size:`sm`,variant:`outline`,children:[(0,I.jsx)(xe,{className:`size-4`}),`Create Image`]}),e[28]=L,e[29]=R,e[30]=H):H=e[30];let U;e[31]!==l.InstanceType||e[32]!==R?(U=R&&(0,I.jsxs)(v,{onClick:()=>{j(l.InstanceType??``),ee(!0)},size:`sm`,variant:`outline`,children:[(0,I.jsx)(we,{className:`size-4`}),`Modify Instance`]}),e[31]=l.InstanceType,e[32]=R,e[33]=U):U=e[33];let Be=l.State?.Name,W;e[34]===Be?W=e[35]:(W=(0,I.jsx)(ge,{state:Be}),e[34]=Be,e[35]=W);let G;e[36]!==V||e[37]!==H||e[38]!==U||e[39]!==W?(G=(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[V,H,U,W]}),e[36]=V,e[37]=H,e[38]=U,e[39]=W,e[40]=G):G=e[40];let K;e[41]!==l.InstanceId||e[42]!==G?(K=(0,I.jsx)(ie,{actions:G,subtitle:`Instance Details`,title:l.InstanceId}),e[41]=l.InstanceId,e[42]=G,e[43]=K):K=e[43];let Ve=l.State?.Name,q;e[44]!==l.InstanceId||e[45]!==Ve?(q=(0,I.jsx)(Me,{instanceId:l.InstanceId,state:Ve}),e[44]=l.InstanceId,e[45]=Ve,e[46]=q):q=e[46];let J;e[47]!==he||e[48]!==te?(J=te&&he!==null&&(0,I.jsxs)(N,{children:[(0,I.jsx)(N.Header,{children:(0,I.jsxs)(`div`,{className:`flex items-center justify-between`,children:[`Console Output`,(0,I.jsx)(v,{onClick:()=>{ne(!1),be(null)},size:`sm`,variant:`ghost`,children:`Hide`})]})}),(0,I.jsx)(`div`,{className:`p-4`,children:(0,I.jsx)(`pre`,{className:`max-h-96 overflow-y-auto rounded bg-muted p-3 font-mono text-xs whitespace-pre-wrap`,children:he})})]}),e[47]=he,e[48]=te,e[49]=J):J=e[49];let He;e[50]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,I.jsx)(N.Header,{children:`Instance Information`}),e[50]=He):He=e[50];let Y;e[51]===l.InstanceId?Y=e[52]:(Y=(0,I.jsx)(P,{label:`Instance ID`,value:l.InstanceId}),e[51]=l.InstanceId,e[52]=Y);let X;e[53]===l.InstanceType?X=e[54]:(X=(0,I.jsx)(P,{label:`Instance Type`,value:l.InstanceType}),e[53]=l.InstanceType,e[54]=X);let Ue=l.State?.Name,We;e[55]===Ue?We=e[56]:(We=(0,I.jsx)(P,{label:`Instance State`,value:Ue}),e[55]=Ue,e[56]=We);let Ge;e[57]===l.State?.Code?Ge=e[58]:(Ge=l.State?.Code?.toString(),e[57]=l.State?.Code,e[58]=Ge);let Ke;e[59]===Ge?Ke=e[60]:(Ke=(0,I.jsx)(P,{label:`State Code`,value:Ge}),e[59]=Ge,e[60]=Ke);let qe;e[61]===je?qe=e[62]:(qe=(0,I.jsx)(P,{label:`Launch Time`,value:je}),e[61]=je,e[62]=qe);let Je=l.Placement?.AvailabilityZone,Ye;e[63]===Je?Ye=e[64]:(Ye=(0,I.jsx)(P,{label:`Availability Zone`,value:Je}),e[63]=Je,e[64]=Ye);let Xe;e[65]===l.Placement?Xe=e[66]:(Xe=l.Placement?.GroupName?(0,I.jsx)(o,{className:`text-primary hover:underline`,to:`/ec2/describe-placement-groups`,children:l.Placement.GroupName}):void 0,e[65]=l.Placement,e[66]=Xe);let Ze;e[67]===Xe?Ze=e[68]:(Ze=(0,I.jsx)(P,{label:`Placement Group`,value:Xe}),e[67]=Xe,e[68]=Ze);let Qe;e[69]!==Y||e[70]!==X||e[71]!==We||e[72]!==Ke||e[73]!==qe||e[74]!==Ye||e[75]!==Ze?(Qe=(0,I.jsxs)(N,{children:[He,(0,I.jsxs)(N.Content,{children:[Y,X,We,Ke,qe,Ye,Ze]})]}),e[69]=Y,e[70]=X,e[71]=We,e[72]=Ke,e[73]=qe,e[74]=Ye,e[75]=Ze,e[76]=Qe):Qe=e[76];let $e;e[77]!==l.KeyName||e[78]!==l.PrivateDnsName||e[79]!==l.PrivateIpAddress||e[80]!==l.PublicDnsName||e[81]!==l.PublicIpAddress||e[82]!==l.SecurityGroups||e[83]!==l.SubnetId||e[84]!==l.VpcId?($e=(l.PrivateIpAddress||l.PublicIpAddress||l.VpcId||l.SubnetId||l.SecurityGroups&&l.SecurityGroups.length>0)&&(0,I.jsxs)(N,{children:[(0,I.jsx)(N.Header,{children:`Network & Security`}),(0,I.jsxs)(N.Content,{children:[(0,I.jsx)(P,{label:`Private IP Address`,value:l.PrivateIpAddress}),(0,I.jsx)(P,{label:`Public IP Address`,value:l.PublicIpAddress}),(0,I.jsx)(P,{label:`Private DNS`,value:l.PrivateDnsName}),(0,I.jsx)(P,{label:`Public DNS`,value:l.PublicDnsName}),(0,I.jsx)(P,{label:`VPC ID`,value:l.VpcId?(0,I.jsx)(o,{className:`text-primary hover:underline`,params:{id:l.VpcId},to:`/ec2/describe-vpcs/$id`,children:l.VpcId}):void 0}),(0,I.jsx)(P,{label:`Subnet ID`,value:l.SubnetId?(0,I.jsx)(o,{className:`text-primary hover:underline`,params:{id:l.SubnetId},to:`/ec2/describe-subnets/$id`,children:l.SubnetId}):void 0}),(0,I.jsx)(P,{label:`Key Name`,value:l.KeyName}),(0,I.jsx)(P,{label:`Security Groups`,value:l.SecurityGroups?.map(Pe).join(`, `)})]})]}),e[77]=l.KeyName,e[78]=l.PrivateDnsName,e[79]=l.PrivateIpAddress,e[80]=l.PublicDnsName,e[81]=l.PublicIpAddress,e[82]=l.SecurityGroups,e[83]=l.SubnetId,e[84]=l.VpcId,e[85]=$e):$e=e[85];let et;e[86]===l.InstanceId?et=e[87]:(et=(0,I.jsx)(ke,{instanceId:l.InstanceId}),e[86]=l.InstanceId,e[87]=et);let tt;e[88]!==n||e[89]!==C?.gpu?(tt=n&&(0,I.jsx)(Oe,{gpu:C?.gpu}),e[88]=n,e[89]=C?.gpu,e[90]=tt):tt=e[90];let nt;e[91]===l.BlockDeviceMappings?nt=e[92]:(nt=l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&(0,I.jsxs)(N,{children:[(0,I.jsx)(N.Header,{children:`Block Device Mappings`}),l.BlockDeviceMappings.map(Ne)]}),e[91]=l.BlockDeviceMappings,e[92]=nt);let rt;e[93]===m?rt=e[94]:(rt=m&&(0,I.jsx)(_e,{image:m}),e[93]=m,e[94]=rt);let Z;e[95]!==K||e[96]!==q||e[97]!==J||e[98]!==Qe||e[99]!==$e||e[100]!==et||e[101]!==tt||e[102]!==nt||e[103]!==rt?(Z=(0,I.jsxs)(`div`,{className:`space-y-6`,children:[K,q,J,Qe,$e,et,tt,nt,rt]}),e[95]=K,e[96]=q,e[97]=J,e[98]=Qe,e[99]=$e,e[100]=et,e[101]=tt,e[102]=nt,e[103]=rt,e[104]=Z):Z=e[104];let it;e[105]===Symbol.for(`react.memo_cache_sentinel`)?(it=e=>{e||(ee(!1),j(``))},e[105]=it):it=e[105];let at;e[106]===Symbol.for(`react.memo_cache_sentinel`)?(at=(0,I.jsx)(le,{children:`Modify Instance`}),e[106]=at):at=e[106];let ot;e[107]===l.InstanceId?ot=e[108]:(ot=(0,I.jsxs)(pe,{children:[at,(0,I.jsxs)(se,{children:[`Select a new instance type for "`,l.InstanceId,`". The instance must be stopped to modify its attributes.`]})]}),e[107]=l.InstanceId,e[108]=ot);let st;e[109]===Symbol.for(`react.memo_cache_sentinel`)?(st=(0,I.jsx)(ae,{children:(0,I.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),e[109]=st):st=e[109];let ct;e[110]===h.InstanceTypes?ct=e[111]:(ct=h.InstanceTypes??[],e[110]=h.InstanceTypes,e[111]=ct);let lt;e[112]!==A||e[113]!==ct?(lt=(0,I.jsxs)(oe,{children:[st,(0,I.jsx)(ve,{className:`w-full`,id:`instanceType`,instanceTypes:ct,onValueChange:j,value:A})]}),e[112]=A,e[113]=ct,e[114]=lt):lt=e[114];let ut;e[115]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,I.jsx)(fe,{children:`Cancel`}),e[115]=ut):ut=e[115];let dt=D.isPending||!A||A===l.InstanceType,ft=D.isPending?`Saving…`:`Save Changes`,pt;e[116]!==Ie||e[117]!==dt||e[118]!==ft?(pt=(0,I.jsxs)(de,{children:[ut,(0,I.jsx)(ue,{disabled:dt,onClick:Ie,children:ft})]}),e[116]=Ie,e[117]=dt,e[118]=ft,e[119]=pt):pt=e[119];let mt;e[120]!==ot||e[121]!==lt||e[122]!==pt?(mt=(0,I.jsxs)(ce,{children:[ot,lt,pt]}),e[120]=ot,e[121]=lt,e[122]=pt,e[123]=mt):mt=e[123];let Q;e[124]!==k||e[125]!==mt?(Q=(0,I.jsx)(me,{onOpenChange:it,open:k,children:mt}),e[124]=k,e[125]=mt,e[126]=Q):Q=e[126];let $;e[127]!==l.InstanceId||e[128]!==Se?($=(0,I.jsx)(De,{instanceId:l.InstanceId,onOpenChange:Ce,open:Se}),e[127]=l.InstanceId,e[128]=Se,e[129]=$):$=e[129];let ht;return e[130]!==B||e[131]!==Z||e[132]!==Q||e[133]!==$||e[134]!==z?(ht=(0,I.jsxs)(I.Fragment,{children:[ze,z,B,Z,Q,$]}),e[130]=B,e[131]=Z,e[132]=Q,e[133]=$,e[134]=z,e[135]=ht):ht=e[135],ht}function Ne(e){return(0,I.jsxs)(N.Content,{children:[(0,I.jsx)(P,{label:`Device Name`,value:e.DeviceName}),(0,I.jsx)(P,{label:`Volume ID`,value:e.Ebs?.VolumeId?(0,I.jsx)(o,{className:`text-primary hover:underline`,params:{id:e.Ebs.VolumeId},to:`/ec2/describe-volumes/$id`,children:e.Ebs.VolumeId}):void 0}),(0,I.jsx)(P,{label:`Status`,value:e.Ebs?.Status}),(0,I.jsx)(P,{label:`Attach Time`,value:s(e.Ebs?.AttachTime)}),(0,I.jsx)(P,{label:`Delete on Termination`,value:e.Ebs?.DeleteOnTermination?`Yes`:`No`})]},e.DeviceName)}function Pe(e){return e.GroupName}export{R as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id32.js b/spinifex/services/spinifexui/frontend/dist/assets/_id32.js index a3923ed6d..4643181ea 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id32.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id32.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{t as ee}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./plus.js";import{t as te}from"./trash-2.js";import{n as p,t as m}from"./_id2.js";import{t as h}from"./button.js";import{t as g}from"./input.js";import{C as _}from"./ec2.js";import{F as v,c as ne,et as y,l as b,tt as x}from"./ec22.js";import{a as re,i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./error-banner.js";import{t as S}from"./page-heading.js";import{a as C,r as w,t as ce}from"./field.js";import{x as le}from"./ec23.js";import{i as ue,l as de,n as fe,o as pe,r as me,s as he,t as ge}from"./alert-dialog.js";import{t as T}from"./delete-confirmation-dialog.js";import{n as E,t as D}from"./detail-row.js";var _e=r(),O=e(n()),k=t();function A(e){if(!e||e===`-1`)return`All traffic`;let t=e.toUpperCase();return t===`TCP`||t===`UDP`||t===`ICMP`?t:e}function j(e,t,n){return!n||n===`-1`||e===void 0||t===void 0||e===-1&&t===-1?`All`:e===t?e.toString():`${e}-${t}`}function M(e){let t=(0,_e.c)(87),{open:n,onOpenChange:r,direction:i,groupId:a}=e,o=b(),ee=ne(),s=i===`ingress`?o:ee,c;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={resolver:oe(le),defaultValues:{ipProtocol:`tcp`,fromPort:0,toPort:0,cidrIp:`0.0.0.0/0`}},t[0]=c):c=t[0];let{control:l,handleSubmit:u,register:d,reset:f,formState:te}=ie(c),{errors:p}=te,m;t[1]===l?m=t[2]:(m={control:l,name:`ipProtocol`},t[1]=l,t[2]=m);let h=re(m),_=h===`-1`||h===`icmp`,v;t[3]!==a||t[4]!==s||t[5]!==r||t[6]!==_||t[7]!==f?(v=async e=>{let t={groupId:a,ipProtocol:e.ipProtocol,fromPort:_?-1:e.fromPort,toPort:_?-1:e.toPort,cidrIp:e.cidrIp};await s.mutateAsync(t),f(),r(!1)},t[3]=a,t[4]=s,t[5]=r,t[6]=_,t[7]=f,t[8]=v):v=t[8];let y=v,x=i===`ingress`?`Inbound`:`Outbound`,S;t[9]===x?S=t[10]:(S=(0,k.jsx)(he,{children:(0,k.jsxs)(de,{children:[`Add `,x,` Rule`]})}),t[9]=x,t[10]=S);let T;t[11]===s.error?T=t[12]:(T=s.error&&(0,k.jsx)(se,{error:s.error,msg:`Failed to add rule`}),t[11]=s.error,t[12]=T);let E;t[13]!==u||t[14]!==y?(E=u(y),t[13]=u,t[14]=y,t[15]=E):E=t[15];let D;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,k.jsx)(C,{children:(0,k.jsx)(`label`,{htmlFor:`ipProtocol`,children:`Protocol`})}),t[16]=D):D=t[16];let O;t[17]===l?O=t[18]:(O=(0,k.jsx)(ae,{control:l,name:`ipProtocol`,render:ve}),t[17]=l,t[18]=O);let A;t[19]===p.ipProtocol?A=t[20]:(A=(0,k.jsx)(w,{errors:[p.ipProtocol]}),t[19]=p.ipProtocol,t[20]=A);let j;t[21]!==O||t[22]!==A?(j=(0,k.jsxs)(ce,{children:[D,O,A]}),t[21]=O,t[22]=A,t[23]=j):j=t[23];let M;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,k.jsx)(C,{children:(0,k.jsx)(`label`,{htmlFor:`fromPort`,children:`From Port`})}),t[24]=M):M=t[24];let N=!!p.fromPort,P;t[25]===d?P=t[26]:(P=d(`fromPort`,{valueAsNumber:!0}),t[25]=d,t[26]=P);let F;t[27]!==_||t[28]!==N||t[29]!==P?(F=(0,k.jsx)(g,{"aria-invalid":N,disabled:_,id:`fromPort`,type:`number`,...P}),t[27]=_,t[28]=N,t[29]=P,t[30]=F):F=t[30];let I;t[31]===p.fromPort?I=t[32]:(I=(0,k.jsx)(w,{errors:[p.fromPort]}),t[31]=p.fromPort,t[32]=I);let L;t[33]!==F||t[34]!==I?(L=(0,k.jsxs)(ce,{children:[M,F,I]}),t[33]=F,t[34]=I,t[35]=L):L=t[35];let R;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,k.jsx)(C,{children:(0,k.jsx)(`label`,{htmlFor:`toPort`,children:`To Port`})}),t[36]=R):R=t[36];let ye=!!p.toPort,z;t[37]===d?z=t[38]:(z=d(`toPort`,{valueAsNumber:!0}),t[37]=d,t[38]=z);let B;t[39]!==_||t[40]!==ye||t[41]!==z?(B=(0,k.jsx)(g,{"aria-invalid":ye,disabled:_,id:`toPort`,type:`number`,...z}),t[39]=_,t[40]=ye,t[41]=z,t[42]=B):B=t[42];let V;t[43]===p.toPort?V=t[44]:(V=(0,k.jsx)(w,{errors:[p.toPort]}),t[43]=p.toPort,t[44]=V);let H;t[45]!==B||t[46]!==V?(H=(0,k.jsxs)(ce,{children:[R,B,V]}),t[45]=B,t[46]=V,t[47]=H):H=t[47];let U;t[48]!==L||t[49]!==H?(U=(0,k.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[L,H]}),t[48]=L,t[49]=H,t[50]=U):U=t[50];let be=i===`ingress`?`Source`:`Destination`,W;t[51]===be?W=t[52]:(W=(0,k.jsx)(C,{children:(0,k.jsxs)(`label`,{htmlFor:`cidrIp`,children:[be,` CIDR`]})}),t[51]=be,t[52]=W);let xe=!!p.cidrIp,G;t[53]===d?G=t[54]:(G=d(`cidrIp`),t[53]=d,t[54]=G);let K;t[55]!==xe||t[56]!==G?(K=(0,k.jsx)(g,{"aria-invalid":xe,id:`cidrIp`,placeholder:`0.0.0.0/0`,...G}),t[55]=xe,t[56]=G,t[57]=K):K=t[57];let q;t[58]===p.cidrIp?q=t[59]:(q=(0,k.jsx)(w,{errors:[p.cidrIp]}),t[58]=p.cidrIp,t[59]=q);let J;t[60]!==W||t[61]!==K||t[62]!==q?(J=(0,k.jsxs)(ce,{children:[W,K,q]}),t[60]=W,t[61]=K,t[62]=q,t[63]=J):J=t[63];let Y;t[64]!==j||t[65]!==U||t[66]!==J||t[67]!==E?(Y=(0,k.jsxs)(`form`,{className:`space-y-4`,id:`add-rule-form`,onSubmit:E,children:[j,U,J]}),t[64]=j,t[65]=U,t[66]=J,t[67]=E,t[68]=Y):Y=t[68];let X;t[69]!==s||t[70]!==f?(X=(0,k.jsx)(me,{onClick:()=>{f(),s.reset()},children:`Cancel`}),t[69]=s,t[70]=f,t[71]=X):X=t[71];let Se=s.isPending?`Adding…`:`Add Rule`,Z;t[72]!==s.isPending||t[73]!==Se?(Z=(0,k.jsx)(fe,{disabled:s.isPending,form:`add-rule-form`,type:`submit`,children:Se}),t[72]=s.isPending,t[73]=Se,t[74]=Z):Z=t[74];let Q;t[75]!==X||t[76]!==Z?(Q=(0,k.jsxs)(pe,{children:[X,Z]}),t[75]=X,t[76]=Z,t[77]=Q):Q=t[77];let $;t[78]!==Y||t[79]!==Q||t[80]!==S||t[81]!==T?($=(0,k.jsxs)(ue,{children:[S,T,Y,Q]}),t[78]=Y,t[79]=Q,t[80]=S,t[81]=T,t[82]=$):$=t[82];let Ce;return t[83]!==r||t[84]!==n||t[85]!==$?(Ce=(0,k.jsx)(ge,{onOpenChange:r,open:n,children:$}),t[83]=r,t[84]=n,t[85]=$,t[86]=Ce):Ce=t[86],Ce}function ve(e){let{field:t}=e;return(0,k.jsxs)(d,{onValueChange:e=>t.onChange(e),value:t.value,children:[(0,k.jsx)(u,{className:`w-full`,id:`ipProtocol`,children:(0,k.jsx)(s,{})}),(0,k.jsxs)(l,{children:[(0,k.jsx)(c,{value:`tcp`,children:`TCP`}),(0,k.jsx)(c,{value:`udp`,children:`UDP`}),(0,k.jsx)(c,{value:`icmp`,children:`ICMP`}),(0,k.jsx)(c,{value:`-1`,children:`All traffic (-1)`})]})]})}function N(e){return[...(e.IpRanges??[]).map(e=>({kind:`cidr`,value:e.CidrIp??``})),...(e.UserIdGroupPairs??[]).map(e=>({kind:`group`,value:e.GroupId??``}))]}function P({rule:e,source:t,groupId:n,direction:r}){let i=x(),a=y(),o=r===`ingress`?i:a,ee=async()=>{try{await o.mutateAsync({groupId:n,ipProtocol:e.IpProtocol??`-1`,fromPort:e.FromPort??-1,toPort:e.ToPort??-1,...t.kind===`group`?{sourceGroupId:t.value}:{cidrIp:t.value}})}catch{}},s=t.kind===`group`&&t.value===n?`${t.value} (this security group)`:t.value;return(0,k.jsxs)(`div`,{className:`space-y-0`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b px-4 py-3 last:border-b-0`,children:[(0,k.jsxs)(`div`,{className:`grid flex-1 grid-cols-3 gap-4 text-sm`,children:[(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:`Protocol: `}),A(e.IpProtocol)]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-muted-foreground`,children:`Port Range: `}),j(e.FromPort,e.ToPort,e.IpProtocol)]}),(0,k.jsxs)(`div`,{children:[(0,k.jsxs)(`span`,{className:`text-muted-foreground`,children:[r===`ingress`?`Source`:`Destination`,`:`,` `]}),s]})]}),(0,k.jsx)(h,{disabled:o.isPending,onClick:ee,size:`icon-xs`,variant:`ghost`,children:(0,k.jsx)(p,{className:`size-3`})})]}),o.error&&(0,k.jsx)(`div`,{className:`px-4 pb-2`,children:(0,k.jsx)(se,{error:o.error,msg:`Failed to remove rule`})})]})}function F(){let{id:e}=m.useParams(),t=o(),{data:n}=i(_(e)),r=n.SecurityGroups?.[0],s=v(),[c,l]=(0,O.useState)(!1),[u,d]=(0,O.useState)(!1),[p,g]=(0,O.useState)(!1),ne=async()=>{try{await s.mutateAsync(e),t({to:`/ec2/describe-security-groups`})}finally{l(!1)}};if(!r?.GroupId)return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),(0,k.jsx)(`p`,{className:`text-muted-foreground`,children:`Security group not found.`})]});let y=r.IpPermissions??[],b=r.IpPermissionsEgress??[];return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),s.error&&(0,k.jsx)(se,{error:s.error,msg:`Failed to delete security group`}),(0,k.jsxs)(`div`,{className:`space-y-6`,children:[(0,k.jsx)(S,{actions:(0,k.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,k.jsxs)(h,{onClick:()=>l(!0),size:`sm`,variant:`destructive`,children:[(0,k.jsx)(te,{className:`size-4`}),`Delete`]})}),subtitle:`Security Group Details`,title:r.GroupName?`${r.GroupId} (${r.GroupName})`:r.GroupId}),(0,k.jsxs)(E,{children:[(0,k.jsx)(E.Header,{children:`Security Group Information`}),(0,k.jsxs)(E.Content,{children:[(0,k.jsx)(D,{label:`Group ID`,value:r.GroupId}),(0,k.jsx)(D,{label:`Group Name`,value:r.GroupName}),(0,k.jsx)(D,{label:`Description`,value:r.Description}),(0,k.jsx)(D,{label:`VPC ID`,value:r.VpcId?(0,k.jsx)(a,{className:`text-primary hover:underline`,params:{id:r.VpcId},to:`/ec2/describe-vpcs/$id`,children:r.VpcId}):`—`}),(0,k.jsx)(D,{label:`Owner ID`,value:r.OwnerId})]})]}),(0,k.jsxs)(E,{children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,k.jsxs)(`h2`,{className:`font-semibold`,children:[`Inbound Rules (`,y.length,`)`]}),(0,k.jsxs)(h,{onClick:()=>d(!0),size:`sm`,variant:`outline`,children:[(0,k.jsx)(f,{className:`size-4`}),`Add Rule`]})]}),y.length>0?(0,k.jsx)(`div`,{children:y.flatMap(e=>N(e).map(t=>(0,k.jsx)(P,{direction:`ingress`,groupId:r.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,k.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No inbound rules.`})]}),(0,k.jsxs)(E,{children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,k.jsxs)(`h2`,{className:`font-semibold`,children:[`Outbound Rules (`,b.length,`)`]}),(0,k.jsxs)(h,{onClick:()=>g(!0),size:`sm`,variant:`outline`,children:[(0,k.jsx)(f,{className:`size-4`}),`Add Rule`]})]}),b.length>0?(0,k.jsx)(`div`,{children:b.flatMap(e=>N(e).map(t=>(0,k.jsx)(P,{direction:`egress`,groupId:r.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,k.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No outbound rules.`})]})]}),(0,k.jsx)(T,{description:`Are you sure you want to delete the security group "${r.GroupId}"? This action cannot be undone.`,isPending:s.isPending,onConfirm:ne,onOpenChange:l,open:c,title:`Delete Security Group`}),(0,k.jsx)(M,{direction:`ingress`,groupId:r.GroupId,onOpenChange:d,open:u}),(0,k.jsx)(M,{direction:`egress`,groupId:r.GroupId,onOpenChange:g,open:p})]})}export{F as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as ee}from"./useNavigate.js";import{t as te}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./plus.js";import{t as f}from"./trash-2.js";import{n as p,t as m}from"./_id2.js";import{t as h}from"./button.js";import{t as g}from"./input.js";import{C as _}from"./ec2.js";import{F as v,c as y,et as b,l as x,tt as ne}from"./ec22.js";import{a as S,i as re,n as C,t as w}from"./zod.js";import{t as ie}from"./error-banner.js";import{t as T}from"./page-heading.js";import{a as E,r as ae,t as oe}from"./field.js";import{x as se}from"./ec23.js";import{i as ce,l as le,n as ue,o as de,r as fe,s as pe,t as me}from"./alert-dialog.js";import{t as D}from"./delete-confirmation-dialog.js";import{n as O,t as k}from"./detail-row.js";var he=r(),A=e(n()),j=t();function M(e){if(!e||e===`-1`)return`All traffic`;let t=e.toUpperCase();return t===`TCP`||t===`UDP`||t===`ICMP`?t:e}function N(e,t,n){return!n||n===`-1`||e===void 0||t===void 0||e===-1&&t===-1?`All`:e===t?e.toString():`${e}-${t}`}function P(e){let t=(0,he.c)(87),{open:n,onOpenChange:r,direction:i,groupId:a}=e,ee=x(),te=y(),o=i===`ingress`?ee:te,s;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(s={resolver:w(se),defaultValues:{ipProtocol:`tcp`,fromPort:0,toPort:0,cidrIp:`0.0.0.0/0`}},t[0]=s):s=t[0];let{control:c,handleSubmit:l,register:u,reset:d,formState:f}=re(s),{errors:p}=f,m;t[1]===c?m=t[2]:(m={control:c,name:`ipProtocol`},t[1]=c,t[2]=m);let h=S(m),_=h===`-1`||h===`icmp`,v;t[3]!==a||t[4]!==o||t[5]!==r||t[6]!==_||t[7]!==d?(v=async e=>{let t={groupId:a,ipProtocol:e.ipProtocol,fromPort:_?-1:e.fromPort,toPort:_?-1:e.toPort,cidrIp:e.cidrIp};await o.mutateAsync(t),d(),r(!1)},t[3]=a,t[4]=o,t[5]=r,t[6]=_,t[7]=d,t[8]=v):v=t[8];let b=v,ne=i===`ingress`?`Inbound`:`Outbound`,T;t[9]===ne?T=t[10]:(T=(0,j.jsx)(pe,{children:(0,j.jsxs)(le,{children:[`Add `,ne,` Rule`]})}),t[9]=ne,t[10]=T);let D;t[11]===o.error?D=t[12]:(D=o.error&&(0,j.jsx)(ie,{error:o.error,msg:`Failed to add rule`}),t[11]=o.error,t[12]=D);let O;t[13]!==l||t[14]!==b?(O=l(b),t[13]=l,t[14]=b,t[15]=O):O=t[15];let k;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`ipProtocol`,children:`Protocol`})}),t[16]=k):k=t[16];let A;t[17]===c?A=t[18]:(A=(0,j.jsx)(C,{control:c,name:`ipProtocol`,render:ge}),t[17]=c,t[18]=A);let M;t[19]===p.ipProtocol?M=t[20]:(M=(0,j.jsx)(ae,{errors:[p.ipProtocol]}),t[19]=p.ipProtocol,t[20]=M);let N;t[21]!==A||t[22]!==M?(N=(0,j.jsxs)(oe,{children:[k,A,M]}),t[21]=A,t[22]=M,t[23]=N):N=t[23];let P;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`fromPort`,children:`From Port`})}),t[24]=P):P=t[24];let _e=!!p.fromPort,F;t[25]===u?F=t[26]:(F=u(`fromPort`,{valueAsNumber:!0}),t[25]=u,t[26]=F);let I;t[27]!==_||t[28]!==_e||t[29]!==F?(I=(0,j.jsx)(g,{"aria-invalid":_e,disabled:_,id:`fromPort`,type:`number`,...F}),t[27]=_,t[28]=_e,t[29]=F,t[30]=I):I=t[30];let L;t[31]===p.fromPort?L=t[32]:(L=(0,j.jsx)(ae,{errors:[p.fromPort]}),t[31]=p.fromPort,t[32]=L);let R;t[33]!==I||t[34]!==L?(R=(0,j.jsxs)(oe,{children:[P,I,L]}),t[33]=I,t[34]=L,t[35]=R):R=t[35];let ve;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,j.jsx)(E,{children:(0,j.jsx)(`label`,{htmlFor:`toPort`,children:`To Port`})}),t[36]=ve):ve=t[36];let ye=!!p.toPort,z;t[37]===u?z=t[38]:(z=u(`toPort`,{valueAsNumber:!0}),t[37]=u,t[38]=z);let B;t[39]!==_||t[40]!==ye||t[41]!==z?(B=(0,j.jsx)(g,{"aria-invalid":ye,disabled:_,id:`toPort`,type:`number`,...z}),t[39]=_,t[40]=ye,t[41]=z,t[42]=B):B=t[42];let V;t[43]===p.toPort?V=t[44]:(V=(0,j.jsx)(ae,{errors:[p.toPort]}),t[43]=p.toPort,t[44]=V);let H;t[45]!==B||t[46]!==V?(H=(0,j.jsxs)(oe,{children:[ve,B,V]}),t[45]=B,t[46]=V,t[47]=H):H=t[47];let U;t[48]!==R||t[49]!==H?(U=(0,j.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[R,H]}),t[48]=R,t[49]=H,t[50]=U):U=t[50];let be=i===`ingress`?`Source`:`Destination`,W;t[51]===be?W=t[52]:(W=(0,j.jsx)(E,{children:(0,j.jsxs)(`label`,{htmlFor:`cidrIp`,children:[be,` CIDR`]})}),t[51]=be,t[52]=W);let xe=!!p.cidrIp,G;t[53]===u?G=t[54]:(G=u(`cidrIp`),t[53]=u,t[54]=G);let K;t[55]!==xe||t[56]!==G?(K=(0,j.jsx)(g,{"aria-invalid":xe,id:`cidrIp`,placeholder:`0.0.0.0/0`,...G}),t[55]=xe,t[56]=G,t[57]=K):K=t[57];let q;t[58]===p.cidrIp?q=t[59]:(q=(0,j.jsx)(ae,{errors:[p.cidrIp]}),t[58]=p.cidrIp,t[59]=q);let J;t[60]!==W||t[61]!==K||t[62]!==q?(J=(0,j.jsxs)(oe,{children:[W,K,q]}),t[60]=W,t[61]=K,t[62]=q,t[63]=J):J=t[63];let Y;t[64]!==N||t[65]!==U||t[66]!==J||t[67]!==O?(Y=(0,j.jsxs)(`form`,{className:`space-y-4`,id:`add-rule-form`,onSubmit:O,children:[N,U,J]}),t[64]=N,t[65]=U,t[66]=J,t[67]=O,t[68]=Y):Y=t[68];let X;t[69]!==o||t[70]!==d?(X=(0,j.jsx)(fe,{onClick:()=>{d(),o.reset()},children:`Cancel`}),t[69]=o,t[70]=d,t[71]=X):X=t[71];let Se=o.isPending?`Adding…`:`Add Rule`,Z;t[72]!==o.isPending||t[73]!==Se?(Z=(0,j.jsx)(ue,{disabled:o.isPending,form:`add-rule-form`,type:`submit`,children:Se}),t[72]=o.isPending,t[73]=Se,t[74]=Z):Z=t[74];let Q;t[75]!==X||t[76]!==Z?(Q=(0,j.jsxs)(de,{children:[X,Z]}),t[75]=X,t[76]=Z,t[77]=Q):Q=t[77];let $;t[78]!==Y||t[79]!==Q||t[80]!==T||t[81]!==D?($=(0,j.jsxs)(ce,{children:[T,D,Y,Q]}),t[78]=Y,t[79]=Q,t[80]=T,t[81]=D,t[82]=$):$=t[82];let Ce;return t[83]!==r||t[84]!==n||t[85]!==$?(Ce=(0,j.jsx)(me,{onOpenChange:r,open:n,children:$}),t[83]=r,t[84]=n,t[85]=$,t[86]=Ce):Ce=t[86],Ce}function ge(e){let{field:t}=e;return(0,j.jsxs)(u,{onValueChange:e=>t.onChange(e),value:t.value,children:[(0,j.jsx)(l,{className:`w-full`,id:`ipProtocol`,children:(0,j.jsx)(o,{})}),(0,j.jsxs)(c,{children:[(0,j.jsx)(s,{value:`tcp`,children:`TCP`}),(0,j.jsx)(s,{value:`udp`,children:`UDP`}),(0,j.jsx)(s,{value:`icmp`,children:`ICMP`}),(0,j.jsx)(s,{value:`-1`,children:`All traffic (-1)`})]})]})}function _e(e){return[...(e.IpRanges??[]).map(e=>({kind:`cidr`,value:e.CidrIp??``})),...(e.UserIdGroupPairs??[]).map(e=>({kind:`group`,value:e.GroupId??``}))]}function F(e){let t=(0,he.c)(41),{rule:n,source:r,groupId:i,direction:a}=e,ee=ne(),te=b(),o=a===`ingress`?ee:te,s;t[0]!==i||t[1]!==o||t[2]!==n.FromPort||t[3]!==n.IpProtocol||t[4]!==n.ToPort||t[5]!==r.kind||t[6]!==r.value?(s=async()=>{try{await o.mutateAsync({groupId:i,ipProtocol:n.IpProtocol??`-1`,fromPort:n.FromPort??-1,toPort:n.ToPort??-1,...r.kind===`group`?{sourceGroupId:r.value}:{cidrIp:r.value}})}catch{}},t[0]=i,t[1]=o,t[2]=n.FromPort,t[3]=n.IpProtocol,t[4]=n.ToPort,t[5]=r.kind,t[6]=r.value,t[7]=s):s=t[7];let c=s,l=r.kind===`group`&&r.value===i?`${r.value} (this security group)`:r.value,u;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:`Protocol: `}),t[8]=u):u=t[8];let d;t[9]===n.IpProtocol?d=t[10]:(d=M(n.IpProtocol),t[9]=n.IpProtocol,t[10]=d);let f;t[11]===d?f=t[12]:(f=(0,j.jsxs)(`div`,{children:[u,d]}),t[11]=d,t[12]=f);let m;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,j.jsx)(`span`,{className:`text-muted-foreground`,children:`Port Range: `}),t[13]=m):m=t[13];let g;t[14]!==n.FromPort||t[15]!==n.IpProtocol||t[16]!==n.ToPort?(g=N(n.FromPort,n.ToPort,n.IpProtocol),t[14]=n.FromPort,t[15]=n.IpProtocol,t[16]=n.ToPort,t[17]=g):g=t[17];let _;t[18]===g?_=t[19]:(_=(0,j.jsxs)(`div`,{children:[m,g]}),t[18]=g,t[19]=_);let v=a===`ingress`?`Source`:`Destination`,y;t[20]===v?y=t[21]:(y=(0,j.jsxs)(`span`,{className:`text-muted-foreground`,children:[v,`:`,` `]}),t[20]=v,t[21]=y);let x;t[22]!==l||t[23]!==y?(x=(0,j.jsxs)(`div`,{children:[y,l]}),t[22]=l,t[23]=y,t[24]=x):x=t[24];let S;t[25]!==x||t[26]!==f||t[27]!==_?(S=(0,j.jsxs)(`div`,{className:`grid flex-1 grid-cols-3 gap-4 text-sm`,children:[f,_,x]}),t[25]=x,t[26]=f,t[27]=_,t[28]=S):S=t[28];let re;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(re=(0,j.jsx)(p,{className:`size-3`}),t[29]=re):re=t[29];let C;t[30]!==c||t[31]!==o.isPending?(C=(0,j.jsx)(h,{disabled:o.isPending,onClick:c,size:`icon-xs`,variant:`ghost`,children:re}),t[30]=c,t[31]=o.isPending,t[32]=C):C=t[32];let w;t[33]!==S||t[34]!==C?(w=(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b px-4 py-3 last:border-b-0`,children:[S,C]}),t[33]=S,t[34]=C,t[35]=w):w=t[35];let T;t[36]===o.error?T=t[37]:(T=o.error&&(0,j.jsx)(`div`,{className:`px-4 pb-2`,children:(0,j.jsx)(ie,{error:o.error,msg:`Failed to remove rule`})}),t[36]=o.error,t[37]=T);let E;return t[38]!==w||t[39]!==T?(E=(0,j.jsxs)(`div`,{className:`space-y-0`,children:[w,T]}),t[38]=w,t[39]=T,t[40]=E):E=t[40],E}function I(){let{id:e}=m.useParams(),t=ee(),{data:n}=i(_(e)),r=n.SecurityGroups?.[0],o=v(),[s,c]=(0,A.useState)(!1),[l,u]=(0,A.useState)(!1),[p,g]=(0,A.useState)(!1),y=async()=>{try{await o.mutateAsync(e),t({to:`/ec2/describe-security-groups`})}finally{c(!1)}};if(!r?.GroupId)return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(te,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),(0,j.jsx)(`p`,{className:`text-muted-foreground`,children:`Security group not found.`})]});let b=r.IpPermissions??[],x=r.IpPermissionsEgress??[];return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(te,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),o.error&&(0,j.jsx)(ie,{error:o.error,msg:`Failed to delete security group`}),(0,j.jsxs)(`div`,{className:`space-y-6`,children:[(0,j.jsx)(T,{actions:(0,j.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,j.jsxs)(h,{onClick:()=>c(!0),size:`sm`,variant:`destructive`,children:[(0,j.jsx)(f,{className:`size-4`}),`Delete`]})}),subtitle:`Security Group Details`,title:r.GroupName?`${r.GroupId} (${r.GroupName})`:r.GroupId}),(0,j.jsxs)(O,{children:[(0,j.jsx)(O.Header,{children:`Security Group Information`}),(0,j.jsxs)(O.Content,{children:[(0,j.jsx)(k,{label:`Group ID`,value:r.GroupId}),(0,j.jsx)(k,{label:`Group Name`,value:r.GroupName}),(0,j.jsx)(k,{label:`Description`,value:r.Description}),(0,j.jsx)(k,{label:`VPC ID`,value:r.VpcId?(0,j.jsx)(a,{className:`text-primary hover:underline`,params:{id:r.VpcId},to:`/ec2/describe-vpcs/$id`,children:r.VpcId}):`—`}),(0,j.jsx)(k,{label:`Owner ID`,value:r.OwnerId})]})]}),(0,j.jsxs)(O,{children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,j.jsxs)(`h2`,{className:`font-semibold`,children:[`Inbound Rules (`,b.length,`)`]}),(0,j.jsxs)(h,{onClick:()=>u(!0),size:`sm`,variant:`outline`,children:[(0,j.jsx)(d,{className:`size-4`}),`Add Rule`]})]}),b.length>0?(0,j.jsx)(`div`,{children:b.flatMap(e=>_e(e).map(t=>(0,j.jsx)(F,{direction:`ingress`,groupId:r.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,j.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No inbound rules.`})]}),(0,j.jsxs)(O,{children:[(0,j.jsxs)(`div`,{className:`flex items-center justify-between border-b p-4`,children:[(0,j.jsxs)(`h2`,{className:`font-semibold`,children:[`Outbound Rules (`,x.length,`)`]}),(0,j.jsxs)(h,{onClick:()=>g(!0),size:`sm`,variant:`outline`,children:[(0,j.jsx)(d,{className:`size-4`}),`Add Rule`]})]}),x.length>0?(0,j.jsx)(`div`,{children:x.flatMap(e=>_e(e).map(t=>(0,j.jsx)(F,{direction:`egress`,groupId:r.GroupId??``,rule:e,source:t},`${e.IpProtocol}-${e.FromPort}-${e.ToPort}-${t.kind}-${t.value}`)))}):(0,j.jsx)(`p`,{className:`p-4 text-sm text-muted-foreground`,children:`No outbound rules.`})]})]}),(0,j.jsx)(D,{description:`Are you sure you want to delete the security group "${r.GroupId}"? This action cannot be undone.`,isPending:o.isPending,onConfirm:y,onOpenChange:c,open:s,title:`Delete Security Group`}),(0,j.jsx)(P,{direction:`ingress`,groupId:r.GroupId,onOpenChange:u,open:l}),(0,j.jsx)(P,{direction:`egress`,groupId:r.GroupId,onOpenChange:g,open:p})]})}export{I as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_id40.js b/spinifex/services/spinifexui/frontend/dist/assets/_id40.js index 5a324d347..447d4bc81 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_id40.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_id40.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./link.js";import{t as s}from"./useNavigate.js";import{Qt as c}from"./cluster-config.js";import{t as ee}from"./back-link.js";import{t as te}from"./camera.js";import{t as ne}from"./pencil.js";import{t as re}from"./cli-command-panel.js";import{t as ie}from"./trash-2.js";import{t as l}from"./button.js";import{t as ae}from"./input.js";import{w as u}from"./ec2.js";import{S as oe,a as d,c as se,d as f,f as ce,l as le,m as ue,p as de,u as fe}from"./rds.js";import{d as p,l as pe,m,p as h}from"./rds2.js";import{c as me,d as g,l as he,n as ge,o as _,s as v,t as _e}from"./rds3.js";import{t as y}from"./_id19.js";import{a as b,i as x,n as S,t as C}from"./zod.js";import{t as ve}from"./error-banner.js";import{t as ye}from"./form-actions.js";import{t as be}from"./page-heading.js";import{a as w,n as xe,r as Se,t as Ce}from"./field.js";import{a as we,i as Te,l as T,s as Ee,t as De}from"./alert-dialog.js";import{n as E,t as D}from"./detail-row.js";import{t as Oe}from"./state-badge.js";import{i as ke,n as Ae,r as je,t as Me}from"./tabs.js";import{n as Ne,t as Pe}from"./picker-notice.js";import{a as Fe,o as Ie,s as Le,t as Re}from"./security-group-checkboxes.js";import{t as ze}from"./create-db-snapshot-dialog.js";import{t as Be}from"./delete-db-snapshot-dialog.js";import{t as Ve}from"./rds-events-panel.js";import{t as He}from"./rds-tags-tab.js";import{t as Ue}from"./delete-db-instance-dialog.js";var O=e(n(),1),We=r(),k=t(),Ge=[{label:`Identifier`,note:`The identifier is the endpoint hostname and the certificate subject; renaming in place is not implemented.`},{label:`Engine version`,note:`There is no in-place engine-version upgrade.`},{label:`Port`,note:`The port is fixed at create; changing it would break every client and the serving certificate.`},{label:`DB subnet group`,note:`The endpoint ENI is placed at create; moving it would change the address clients resolve.`}];function Ke(e){let t=(0,We.c)(216),{open:n,onOpenChange:r,instance:a}=e,o=pe(),s=i(g),c=i(u),ee=i(_),te=a.Engine??``,ne;t[0]===te?ne=t[1]:(ne=he(te),t[0]=te,t[1]=ne);let re=i(ne),ie=a.DBInstanceIdentifier??``,l=a.AllocatedStorage??0,d;t[2]===a.VpcSecurityGroups?d=t[3]:(d=a.VpcSecurityGroups?.map(Qe).filter(Boolean)??[],t[2]=a.VpcSecurityGroups,t[3]=d);let se=d,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=C(oe),t[4]=f):f=t[4];let ce=a.DBInstanceClass??``,le=a.DBParameterGroups?.[0]?.DBParameterGroupName??``,ue=a.DeletionProtection??!1,de=a.BackupRetentionPeriod??0,fe=a.PreferredBackupWindow??``,p=a.PreferredMaintenanceWindow??``,m;t[5]!==se||t[6]!==l||t[7]!==p||t[8]!==ce||t[9]!==le||t[10]!==ue||t[11]!==de||t[12]!==fe?(m={resolver:f,defaultValues:{currentAllocatedStorage:l,dbInstanceClass:ce,allocatedStorage:l,dbParameterGroupName:le,vpcSecurityGroupIds:se,deletionProtection:ue,backupRetentionPeriod:de,preferredBackupWindow:fe,preferredMaintenanceWindow:p,masterUserPassword:``,applyImmediately:!1}},t[5]=se,t[6]=l,t[7]=p,t[8]=ce,t[9]=le,t[10]=ue,t[11]=de,t[12]=fe,t[13]=m):m=t[13];let{control:h,formState:me,handleSubmit:ge,register:v,setValue:_e}=x(m),{errors:y,isSubmitting:be}=me,E;t[14]===h?E=t[15]:(E={control:h},t[14]=h,t[15]=E);let D=b(E),Oe=D.dbInstanceClass??``,ke=D.allocatedStorage??l,Ae;t[16]===D.vpcSecurityGroupIds?Ae=t[17]:(Ae=D.vpcSecurityGroupIds??[],t[16]=D.vpcSecurityGroupIds,t[17]=Ae);let je=Ae,Me;t[18]===re.data?.OrderableDBInstanceOptions?Me=t[19]:(Me=new Set((re.data?.OrderableDBInstanceOptions??[]).map(Ze).filter(Boolean)),t[18]=re.data?.OrderableDBInstanceOptions,t[19]=Me);let ze;t[20]===Me?ze=t[21]:(ze=[...Me],t[20]=Me,t[21]=ze);let Be=ze,Ve,He,Ue,O,Ke,A,$e,et,j,tt,nt,rt,it,at,ot,st,M,N,P,F;if(t[22]!==h||t[23]!==l||t[24]!==ee.data?.DBEngineVersions||t[25]!==y.allocatedStorage||t[26]!==ge||t[27]!==ie||t[28]!==a.DBInstanceClass||t[29]!==a.DBSubnetGroup?.VpcId||t[30]!==a.Engine||t[31]!==Be||t[32]!==o||t[33]!==r||t[34]!==n||t[35]!==re||t[36]!==s||t[37]!==v||t[38]!==c||t[39]!==Oe||t[40]!==ke||t[41]!==_e){let e=Le(s.data?.DBParameterGroups??[],ee.data?.DBEngineVersions??[],a.Engine??``),i=a.DBSubnetGroup?.VpcId,te;t[62]===c.data?.SecurityGroups?te=t[63]:(te=c.data?.SecurityGroups??[],t[62]=c.data?.SecurityGroups,t[63]=te);let ne;if(t[64]!==i||t[65]!==te){let e;t[67]===i?e=t[68]:(e=e=>i===void 0||e.VpcId===i,t[67]=i,t[68]=e),ne=te.filter(e),t[64]=i,t[65]=te,t[66]=ne}else ne=t[66];Ke=ne;let u=Oe!==a.DBInstanceClass,oe=ke!==l,d=Be.length===0,se=`No instance class this cluster's nodes can run is available for ${a.Engine}.`,f;t[69]!==re||t[70]!==d||t[71]!==se?(f=Ne(re,d,{loading:`Loading the instance classes…`,failed:`Could not read the instance classes`,empty:se}),t[69]=re,t[70]=d,t[71]=se,t[72]=f):f=t[72];let ce=f,le=e.length===0,ue;t[73]!==s||t[74]!==le?(ue=Ne(s,le,{loading:`Loading the parameter groups…`,failed:`Could not read the parameter groups`,empty:`No parameter group of this instance's engine family exists.`}),t[73]=s,t[74]=le,t[75]=ue):ue=t[75];let de=ue,fe=Ke.length===0,p;t[76]!==c||t[77]!==fe?(p=Ne(c,fe,{loading:`Loading the security groups…`,failed:`Could not read the security groups`,empty:`No security group in this instance's VPC is available.`}),t[76]=c,t[77]=fe,t[78]=p):p=t[78],O=p;let pe;t[79]===_e?pe=t[80]:(pe=e=>_e(`vpcSecurityGroupIds`,e,{shouldValidate:!0}),t[79]=_e,t[80]=pe),A=pe;let m;t[81]!==ie||t[82]!==o||t[83]!==r?(m=async e=>{await o.mutateAsync({...e,dbInstanceIdentifier:ie}),r(!1)},t[81]=ie,t[82]=o,t[83]=r,t[84]=m):m=t[84];let me=m;Ue=De,P=r,F=n,He=Te,M=`max-h-[85vh] overflow-y-auto`;let g;t[85]===ie?g=t[86]:(g=(0,k.jsxs)(T,{children:[`Modify `,ie]}),t[85]=ie,t[86]=g);let he;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,k.jsx)(we,{children:`Changes apply in the maintenance window unless you apply them immediately.`}),t[87]=he):he=t[87],t[88]===g?N=t[89]:(N=(0,k.jsxs)(Ee,{children:[g,he]}),t[88]=g,t[89]=N),it=`space-y-4`,t[90]!==ge||t[91]!==me?(at=ge(me),t[90]=ge,t[91]=me,t[92]=at):at=t[92];let _;t[93]===Be?_=t[94]:(_=Be.map(Xe),t[93]=Be,t[94]=_);let b=u&&`Changing the class replaces the VM. The database is unavailable while it does.`;t[95]!==ce||t[96]!==h||t[97]!==_||t[98]!==b?(ot=(0,k.jsx)(Ie,{control:h,id:`modify-class`,label:`DB instance class`,name:`dbInstanceClass`,notice:ce,options:_,placeholder:`Select an instance class`,warning:b}),t[95]=ce,t[96]=h,t[97]=_,t[98]=b,t[99]=ot):ot=t[99];let x;t[100]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`modify-storage`,children:`Allocated storage (GiB)`})}),t[100]=x):x=t[100];let S=!!y.allocatedStorage,C;t[101]===v?C=t[102]:(C=v(`allocatedStorage`,{valueAsNumber:!0}),t[101]=v,t[102]=C);let ve;t[103]!==l||t[104]!==S||t[105]!==C?(ve=(0,k.jsx)(ae,{"aria-invalid":S,id:`modify-storage`,min:l,type:`number`,...C}),t[103]=l,t[104]=S,t[105]=C,t[106]=ve):ve=t[106];let ye;t[107]===l?ye=t[108]:(ye=(0,k.jsxs)(xe,{children:[`Currently `,l,` GiB. Storage grows only.`]}),t[107]=l,t[108]=ye);let be;t[109]===oe?be=t[110]:(be=oe&&(0,k.jsx)(`p`,{className:`text-xs text-tactical-amber`,children:`Growing storage stops and starts the instance to extend the filesystem.`}),t[109]=oe,t[110]=be);let E;t[111]===y.allocatedStorage?E=t[112]:(E=(0,k.jsx)(Se,{errors:[y.allocatedStorage]}),t[111]=y.allocatedStorage,t[112]=E),t[113]!==ve||t[114]!==ye||t[115]!==be||t[116]!==E?(st=(0,k.jsxs)(Ce,{children:[x,ve,ye,be,E]}),t[113]=ve,t[114]=ye,t[115]=be,t[116]=E,t[117]=st):st=t[117],Ve=Ie,$e=h,et=`modify-parameter-group`,j=`DB parameter group`,tt=`dbParameterGroupName`,nt=de,rt=e.map(Ye),t[22]=h,t[23]=l,t[24]=ee.data?.DBEngineVersions,t[25]=y.allocatedStorage,t[26]=ge,t[27]=ie,t[28]=a.DBInstanceClass,t[29]=a.DBSubnetGroup?.VpcId,t[30]=a.Engine,t[31]=Be,t[32]=o,t[33]=r,t[34]=n,t[35]=re,t[36]=s,t[37]=v,t[38]=c,t[39]=Oe,t[40]=ke,t[41]=_e,t[42]=Ve,t[43]=He,t[44]=Ue,t[45]=O,t[46]=Ke,t[47]=A,t[48]=$e,t[49]=et,t[50]=j,t[51]=tt,t[52]=nt,t[53]=rt,t[54]=it,t[55]=at,t[56]=ot,t[57]=st,t[58]=M,t[59]=N,t[60]=P,t[61]=F}else Ve=t[42],He=t[43],Ue=t[44],O=t[45],Ke=t[46],A=t[47],$e=t[48],et=t[49],j=t[50],tt=t[51],nt=t[52],rt=t[53],it=t[54],at=t[55],ot=t[56],st=t[57],M=t[58],N=t[59],P=t[60],F=t[61];let I;t[118]!==Ve||t[119]!==$e||t[120]!==et||t[121]!==j||t[122]!==tt||t[123]!==nt||t[124]!==rt?(I=(0,k.jsx)(Ve,{control:$e,id:et,label:j,name:tt,notice:nt,options:rt,placeholder:`Engine default group`}),t[118]=Ve,t[119]=$e,t[120]=et,t[121]=j,t[122]=tt,t[123]=nt,t[124]=rt,t[125]=I):I=t[125];let ct;t[126]===Symbol.for(`react.memo_cache_sentinel`)?(ct=(0,k.jsx)(w,{children:`VPC security groups`}),t[126]=ct):ct=t[126];let lt;t[127]!==O||t[128]!==Ke||t[129]!==je||t[130]!==A?(lt=(0,k.jsxs)(Ce,{children:[ct,O?(0,k.jsx)(Pe,{notice:O}):(0,k.jsx)(Re,{emptyText:`No security group in this instance's VPC is available.`,groups:Ke,onChange:A,selected:je})]}),t[127]=O,t[128]=Ke,t[129]=je,t[130]=A,t[131]=lt):lt=t[131];let ut;t[132]===Symbol.for(`react.memo_cache_sentinel`)?(ut=(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`modify-retention`,children:`Backup retention (days)`})}),t[132]=ut):ut=t[132];let dt=!!y.backupRetentionPeriod,L;t[133]===v?L=t[134]:(L=v(`backupRetentionPeriod`,{valueAsNumber:!0}),t[133]=v,t[134]=L);let R;t[135]!==dt||t[136]!==L?(R=(0,k.jsx)(ae,{"aria-invalid":dt,id:`modify-retention`,max:7,min:0,type:`number`,...L}),t[135]=dt,t[136]=L,t[137]=R):R=t[137];let z;t[138]===y.backupRetentionPeriod?z=t[139]:(z=(0,k.jsx)(Se,{errors:[y.backupRetentionPeriod]}),t[138]=y.backupRetentionPeriod,t[139]=z);let B;t[140]!==R||t[141]!==z?(B=(0,k.jsxs)(Ce,{children:[ut,R,z]}),t[140]=R,t[141]=z,t[142]=B):B=t[142];let ft;t[143]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`modify-backup-window`,children:`Preferred backup window`})}),t[143]=ft):ft=t[143];let V=!!y.preferredBackupWindow,pt;t[144]===v?pt=t[145]:(pt=v(`preferredBackupWindow`),t[144]=v,t[145]=pt);let H;t[146]!==V||t[147]!==pt?(H=(0,k.jsx)(ae,{"aria-invalid":V,id:`modify-backup-window`,placeholder:`hh24:mi-hh24:mi in UTC`,...pt}),t[146]=V,t[147]=pt,t[148]=H):H=t[148];let U;t[149]===y.preferredBackupWindow?U=t[150]:(U=(0,k.jsx)(Se,{errors:[y.preferredBackupWindow]}),t[149]=y.preferredBackupWindow,t[150]=U);let W;t[151]!==H||t[152]!==U?(W=(0,k.jsxs)(Ce,{children:[ft,H,U]}),t[151]=H,t[152]=U,t[153]=W):W=t[153];let G;t[154]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`modify-maintenance-window`,children:`Preferred maintenance window`})}),t[154]=G):G=t[154];let K=!!y.preferredMaintenanceWindow,q;t[155]===v?q=t[156]:(q=v(`preferredMaintenanceWindow`),t[155]=v,t[156]=q);let J;t[157]!==K||t[158]!==q?(J=(0,k.jsx)(ae,{"aria-invalid":K,id:`modify-maintenance-window`,placeholder:`ddd:hh24:mi-ddd:hh24:mi in UTC`,...q}),t[157]=K,t[158]=q,t[159]=J):J=t[159];let Y;t[160]===y.preferredMaintenanceWindow?Y=t[161]:(Y=(0,k.jsx)(Se,{errors:[y.preferredMaintenanceWindow]}),t[160]=y.preferredMaintenanceWindow,t[161]=Y);let X;t[162]!==J||t[163]!==Y?(X=(0,k.jsxs)(Ce,{children:[G,J,Y]}),t[162]=J,t[163]=Y,t[164]=X):X=t[164];let mt;t[165]===Symbol.for(`react.memo_cache_sentinel`)?(mt=(0,k.jsx)(w,{children:(0,k.jsx)(`label`,{htmlFor:`modify-password`,children:`Reset master password`})}),t[165]=mt):mt=t[165];let Z=!!y.masterUserPassword,ht;t[166]===v?ht=t[167]:(ht=v(`masterUserPassword`),t[166]=v,t[167]=ht);let Q;t[168]!==Z||t[169]!==ht?(Q=(0,k.jsx)(ae,{"aria-invalid":Z,id:`modify-password`,type:`password`,...ht}),t[168]=Z,t[169]=ht,t[170]=Q):Q=t[170];let $;t[171]===Symbol.for(`react.memo_cache_sentinel`)?($=(0,k.jsx)(xe,{children:`Leave blank to keep the current password.`}),t[171]=$):$=t[171];let gt;t[172]===y.masterUserPassword?gt=t[173]:(gt=(0,k.jsx)(Se,{errors:[y.masterUserPassword]}),t[172]=y.masterUserPassword,t[173]=gt);let _t;t[174]!==Q||t[175]!==gt?(_t=(0,k.jsxs)(Ce,{children:[mt,Q,$,gt]}),t[174]=Q,t[175]=gt,t[176]=_t):_t=t[176];let vt;t[177]===h?vt=t[178]:(vt=(0,k.jsx)(Fe,{control:h,name:`deletionProtection`}),t[177]=h,t[178]=vt);let yt;t[179]===Symbol.for(`react.memo_cache_sentinel`)?(yt=(0,k.jsx)(w,{children:`Apply immediately`}),t[179]=yt):yt=t[179];let bt;t[180]===h?bt=t[181]:(bt=(0,k.jsxs)(Ce,{children:[yt,(0,k.jsx)(S,{control:h,name:`applyImmediately`,render:Je})]}),t[180]=h,t[181]=bt);let xt;t[182]===Symbol.for(`react.memo_cache_sentinel`)?(xt=(0,k.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border p-3`,children:[(0,k.jsx)(`h3`,{className:`text-xs font-medium`,children:`Fixed at create`}),Ge.map(qe)]}),t[182]=xt):xt=t[182];let St;t[183]===o.error?St=t[184]:(St=o.error&&(0,k.jsx)(ve,{error:o.error,msg:`Failed to modify the DB instance`}),t[183]=o.error,t[184]=St);let Ct;t[185]===r?Ct=t[186]:(Ct=()=>r(!1),t[185]=r,t[186]=Ct);let wt;t[187]!==be||t[188]!==o.isPending||t[189]!==Ct?(wt=(0,k.jsx)(`div`,{className:`flex justify-end`,children:(0,k.jsx)(ye,{isPending:o.isPending,isSubmitting:be,onCancel:Ct,pendingLabel:`Saving…`,submitLabel:`Save Changes`})}),t[187]=be,t[188]=o.isPending,t[189]=Ct,t[190]=wt):wt=t[190];let Tt;t[191]!==it||t[192]!==at||t[193]!==ot||t[194]!==st||t[195]!==I||t[196]!==lt||t[197]!==B||t[198]!==W||t[199]!==X||t[200]!==_t||t[201]!==vt||t[202]!==bt||t[203]!==St||t[204]!==wt?(Tt=(0,k.jsxs)(`form`,{className:it,onSubmit:at,children:[ot,st,I,lt,B,W,X,_t,vt,bt,xt,St,wt]}),t[191]=it,t[192]=at,t[193]=ot,t[194]=st,t[195]=I,t[196]=lt,t[197]=B,t[198]=W,t[199]=X,t[200]=_t,t[201]=vt,t[202]=bt,t[203]=St,t[204]=wt,t[205]=Tt):Tt=t[205];let Et;t[206]!==He||t[207]!==M||t[208]!==N||t[209]!==Tt?(Et=(0,k.jsxs)(He,{className:M,children:[N,Tt]}),t[206]=He,t[207]=M,t[208]=N,t[209]=Tt,t[210]=Et):Et=t[210];let Dt;return t[211]!==Ue||t[212]!==P||t[213]!==F||t[214]!==Et?(Dt=(0,k.jsx)(Ue,{onOpenChange:P,open:F,children:Et}),t[211]=Ue,t[212]=P,t[213]=F,t[214]=Et,t[215]=Dt):Dt=t[215],Dt}function qe(e){return(0,k.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,k.jsx)(`span`,{className:`font-medium`,children:e.label}),` —`,` `,e.note]},e.label)}function Je(e){let{field:t}=e;return(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{"aria-label":`Apply immediately`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),(0,k.jsx)(`span`,{children:`Apply now instead of waiting for the maintenance window`})]})}function Ye(e){return{value:e.DBParameterGroupName??``,label:e.DBParameterGroupName??``}}function Xe(e){return{value:e,label:e}}function Ze(e){return e.DBInstanceClass??``}function Qe(e){return e.VpcSecurityGroupId??``}function A(e,t){return e.EventCategories?.includes(t)??!1}function $e(e,t){return e.filter(t).toSorted((e,t)=>(e.Date?.getTime()??0)-(t.Date?.getTime()??0)).at(-1)}function et(e){let t=e.Endpoint?.Address;if(!t)return[];let n=e.Endpoint?.Port??e.DbInstancePort,r=e.MasterUsername??``,i=e.DBName??r;return e.Engine===`postgres`?[{label:`Connect`,parts:[{type:`bin`,value:`psql`},{type:`value`,value:` "host=${t} port=${n} dbname=${i} user=${r} sslmode=require"`}]}]:[{label:`Connect`,parts:[{type:`bin`,value:`mariadb`},{type:`flag`,value:` --host`},{type:`value`,value:`=${t}`},{type:`flag`,value:` --port`},{type:`value`,value:`=${n}`},{type:`flag`,value:` --user`},{type:`value`,value:`=${r}`},{type:`flag`,value:` --ssl`},{type:`value`,value:` ${i}`}]}]}function j(e){let t=(0,We.c)(262),{dbInstanceIdentifier:n}=e,r=s(),i;t[0]===n?i=t[1]:(i=ge(n),t[0]=n,t[1]=i);let{data:ae}=a(i),u=ae.DBInstances?.[0],oe=u?.DBInstanceArn??``,d;t[2]===n?d=t[3]:(d=v(n),t[2]=n,t[3]=d);let{data:pe}=a(d),g;t[4]===n?g=t[5]:(g=me(n),t[4]=n,t[5]=g);let{data:he}=a(g),_;t[6]===n?_=t[7]:(_=_e(n),t[6]=n,t[7]=_);let{data:y}=a(_),b=h(),x=m(),S=p(),[C,ye]=(0,O.useState)(!1),[w,xe]=(0,O.useState)(!1),[Se,Ce]=(0,O.useState)(!1),[we,Te]=(0,O.useState)(null);if(!u?.DBInstanceIdentifier){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(ee,{to:`/rds/describe-db-instances`,children:`Back to databases`}),(0,k.jsx)(`p`,{className:`text-muted-foreground`,children:`DB instance not found.`})]}),t[8]=e):e=t[8],e}let T=u.DBInstanceStatus,Ee,De,Ne,Pe,Fe,Ie,Le,Re,Ge,qe,Je,Ye,Xe,Ze,Qe,A,j,M,N,P,F,I,ct,lt,ut,dt,L;if(t[9]!==y.DBInstanceAutomatedBackups?.[0]||t[10]!==n||t[11]!==pe.Events||t[12]!==u||t[13]!==S||t[14]!==he.DBSnapshots||t[15]!==b||t[16]!==T||t[17]!==x){Ie=pe.Events??[];let e=b.error??x.error??S.error,r=$e(Ie,st),i=$e(Ie,ot);Le=he.DBSnapshots??[];let a=Le.filter(at).toSorted(it).at(-1),o=y.DBInstanceAutomatedBackups?.[0],s=u.PendingModifiedValues,ae=s?.AllocatedStorage!==void 0||s?.DBInstanceClass!==void 0;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,k.jsx)(ee,{to:`/rds/describe-db-instances`,children:`Back to databases`}),t[45]=F):F=t[45],t[46]===e?I=t[47]:(I=e&&(0,k.jsx)(ve,{error:e,msg:`Failed to change the DB instance state.`}),t[46]=e,t[47]=I),M=`space-y-6`;let oe;t[48]!==b.isPending||t[49]!==T?(oe=!de(T)||b.isPending,t[48]=b.isPending,t[49]=T,t[50]=oe):oe=t[50];let d;t[51]!==n||t[52]!==b?(d=()=>b.mutate(n),t[51]=n,t[52]=b,t[53]=d):d=t[53];let f;t[54]!==oe||t[55]!==d?(f=(0,k.jsx)(l,{disabled:oe,onClick:d,size:`sm`,variant:`outline`,children:`Start`}),t[54]=oe,t[55]=d,t[56]=f):f=t[56];let le;t[57]!==T||t[58]!==x.isPending?(le=!ue(T)||x.isPending,t[57]=T,t[58]=x.isPending,t[59]=le):le=t[59];let p;t[60]!==n||t[61]!==x?(p=()=>x.mutate(n),t[60]=n,t[61]=x,t[62]=p):p=t[62];let m;t[63]!==le||t[64]!==p?(m=(0,k.jsx)(l,{disabled:le,onClick:p,size:`sm`,variant:`outline`,children:`Stop`}),t[63]=le,t[64]=p,t[65]=m):m=t[65];let h;t[66]!==S.isPending||t[67]!==T?(h=!fe(T)||S.isPending,t[66]=S.isPending,t[67]=T,t[68]=h):h=t[68];let me;t[69]!==n||t[70]!==S?(me=()=>S.mutate(n),t[69]=n,t[70]=S,t[71]=me):me=t[71];let g;t[72]!==h||t[73]!==me?(g=(0,k.jsx)(l,{disabled:h,onClick:me,size:`sm`,variant:`outline`,children:`Reboot`}),t[72]=h,t[73]=me,t[74]=g):g=t[74];let ge;t[75]===T?ge=t[76]:(ge=ce(T),t[75]=T,t[76]=ge);let _=!ge,v;t[77]===Symbol.for(`react.memo_cache_sentinel`)?(v=()=>Ce(!0),t[77]=v):v=t[77];let _e;t[78]===Symbol.for(`react.memo_cache_sentinel`)?(_e=(0,k.jsx)(te,{className:`size-4`}),t[78]=_e):_e=t[78];let C;t[79]===_?C=t[80]:(C=(0,k.jsxs)(l,{disabled:_,onClick:v,size:`sm`,variant:`outline`,children:[_e,`Take Snapshot`]}),t[79]=_,t[80]=C);let w;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(w=()=>xe(!0),t[81]=w):w=t[81];let Se;t[82]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,k.jsxs)(l,{onClick:w,size:`sm`,variant:`outline`,children:[(0,k.jsx)(ne,{className:`size-4`}),`Modify`]}),t[82]=Se):Se=t[82];let we;t[83]===T?we=t[84]:(we=se(T),t[83]=T,t[84]=we);let Te=!we,ze;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(ze=()=>ye(!0),t[85]=ze):ze=t[85];let Be;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,k.jsx)(ie,{className:`size-4`}),t[86]=Be):Be=t[86];let Ve;t[87]===Te?Ve=t[88]:(Ve=(0,k.jsxs)(l,{disabled:Te,onClick:ze,size:`sm`,variant:`destructive`,children:[Be,`Delete`]}),t[87]=Te,t[88]=Ve);let He;t[89]!==f||t[90]!==m||t[91]!==g||t[92]!==C||t[93]!==Ve?(He=(0,k.jsxs)(`div`,{className:`flex gap-2`,children:[f,m,g,C,Se,Ve]}),t[89]=f,t[90]=m,t[91]=g,t[92]=C,t[93]=Ve,t[94]=He):He=t[94],t[95]!==n||t[96]!==He?(N=(0,k.jsx)(be,{actions:He,subtitle:`DB Instance`,title:n}),t[95]=n,t[96]=He,t[97]=N):N=t[97];let Ue;t[98]===T?Ue=t[99]:(Ue=(0,k.jsx)(Oe,{state:T}),t[98]=T,t[99]=Ue);let O;t[100]===u.StatusInfos?O=t[101]:(O=u.StatusInfos?.map(rt),t[100]=u.StatusInfos,t[101]=O),t[102]!==Ue||t[103]!==O?(P=(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Ue,O]}),t[102]=Ue,t[103]=O,t[104]=P):P=t[104],Fe=Me,Ze=`connectivity`,t[105]===Symbol.for(`react.memo_cache_sentinel`)?(Qe=(0,k.jsxs)(Ae,{children:[(0,k.jsx)(ke,{value:`connectivity`,children:`Connectivity`}),(0,k.jsx)(ke,{value:`configuration`,children:`Configuration`}),(0,k.jsx)(ke,{value:`backups`,children:`Backups`}),(0,k.jsx)(ke,{value:`tags`,children:`Tags`}),(0,k.jsx)(ke,{value:`events`,children:`Events`})]}),t[105]=Qe):Qe=t[105];let We;t[106]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,k.jsx)(E.Header,{children:`Endpoint`}),t[106]=We):We=t[106];let Ke=u.Endpoint?.Address,R;t[107]===Ke?R=t[108]:(R=(0,k.jsx)(D,{label:`Address`,value:Ke}),t[107]=Ke,t[108]=R);let z;t[109]!==u.DbInstancePort||t[110]!==u.Endpoint?.Port?(z=(u.Endpoint?.Port??u.DbInstancePort)?.toString(),t[109]=u.DbInstancePort,t[110]=u.Endpoint?.Port,t[111]=z):z=t[111];let B;t[112]===z?B=t[113]:(B=(0,k.jsx)(D,{label:`Port`,value:z}),t[112]=z,t[113]=B);let ft=u.DBSubnetGroup?.VpcId,V;t[114]===ft?V=t[115]:(V=(0,k.jsx)(D,{label:`VPC`,value:ft}),t[114]=ft,t[115]=V);let pt=u.DBSubnetGroup?.DBSubnetGroupName,H;t[116]===pt?H=t[117]:(H=(0,k.jsx)(D,{label:`DB subnet group`,value:pt}),t[116]=pt,t[117]=H);let U;t[118]===u.VpcSecurityGroups?U=t[119]:(U=u.VpcSecurityGroups?.map(nt).join(`, `),t[118]=u.VpcSecurityGroups,t[119]=U);let W;t[120]===U?W=t[121]:(W=(0,k.jsx)(D,{label:`Security groups`,value:U}),t[120]=U,t[121]=W);let G;t[122]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,k.jsx)(D,{label:`Publicly accessible`,value:`No — private VPC address`}),t[122]=G):G=t[122];let K;t[123]!==R||t[124]!==B||t[125]!==V||t[126]!==H||t[127]!==W?(K=(0,k.jsxs)(E,{children:[We,(0,k.jsxs)(E.Content,{children:[R,B,V,H,W,G]})]}),t[123]=R,t[124]=B,t[125]=V,t[126]=H,t[127]=W,t[128]=K):K=t[128];let q;t[129]===u?q=t[130]:(q=et(u),t[129]=u,t[130]=q);let J;t[131]===q?J=t[132]:(J=(0,k.jsx)(re,{commands:q}),t[131]=q,t[132]=J),t[133]!==K||t[134]!==J?(A=(0,k.jsx)(je,{value:`connectivity`,children:(0,k.jsxs)(`div`,{className:`space-y-4`,children:[K,J]})}),t[133]=K,t[134]=J,t[135]=A):A=t[135];let Y;t[136]===Symbol.for(`react.memo_cache_sentinel`)?(Y=(0,k.jsx)(E.Header,{children:`Configuration`}),t[136]=Y):Y=t[136];let X;t[137]===u.Engine?X=t[138]:(X=(0,k.jsx)(D,{label:`Engine`,value:u.Engine}),t[137]=u.Engine,t[138]=X);let mt;t[139]===u.EngineVersion?mt=t[140]:(mt=(0,k.jsx)(D,{label:`Version`,value:u.EngineVersion}),t[139]=u.EngineVersion,t[140]=mt);let Z;t[141]===u.DBInstanceClass?Z=t[142]:(Z=(0,k.jsx)(D,{label:`Instance class`,value:u.DBInstanceClass}),t[141]=u.DBInstanceClass,t[142]=Z);let ht=u.AllocatedStorage?`${u.AllocatedStorage} GiB`:void 0,Q;t[143]===ht?Q=t[144]:(Q=(0,k.jsx)(D,{label:`Allocated storage`,value:ht}),t[143]=ht,t[144]=Q);let $;t[145]===u.StorageType?$=t[146]:($=(0,k.jsx)(D,{label:`Storage type`,value:u.StorageType}),t[145]=u.StorageType,t[146]=$);let gt=u.StorageEncrypted?`Encrypted — always on`:`Not encrypted`,_t;t[147]===gt?_t=t[148]:(_t=(0,k.jsx)(D,{label:`Encryption`,value:gt}),t[147]=gt,t[148]=_t);let vt;t[149]===u.DBParameterGroups?vt=t[150]:(vt=u.DBParameterGroups?.map(tt).join(`, `),t[149]=u.DBParameterGroups,t[150]=vt);let yt;t[151]===vt?yt=t[152]:(yt=(0,k.jsx)(D,{label:`Parameter group`,value:vt}),t[151]=vt,t[152]=yt);let bt;t[153]===u.MasterUsername?bt=t[154]:(bt=(0,k.jsx)(D,{label:`Master username`,value:u.MasterUsername}),t[153]=u.MasterUsername,t[154]=bt);let xt;t[155]===u.DBName?xt=t[156]:(xt=(0,k.jsx)(D,{label:`Initial database`,value:u.DBName}),t[155]=u.DBName,t[156]=xt);let St=u.DeletionProtection?`On`:`Off`,Ct;t[157]===St?Ct=t[158]:(Ct=(0,k.jsx)(D,{label:`Deletion protection`,value:St}),t[157]=St,t[158]=Ct);let wt;t[159]===u.InstanceCreateTime?wt=t[160]:(wt=c(u.InstanceCreateTime),t[159]=u.InstanceCreateTime,t[160]=wt);let Tt;t[161]===wt?Tt=t[162]:(Tt=(0,k.jsx)(D,{label:`Created`,value:wt}),t[161]=wt,t[162]=Tt);let Et;t[163]!==X||t[164]!==mt||t[165]!==Z||t[166]!==Q||t[167]!==$||t[168]!==_t||t[169]!==yt||t[170]!==bt||t[171]!==xt||t[172]!==Ct||t[173]!==Tt?(Et=(0,k.jsxs)(E,{children:[Y,(0,k.jsxs)(E.Content,{children:[X,mt,Z,Q,$,_t,yt,bt,xt,Ct,Tt]})]}),t[163]=X,t[164]=mt,t[165]=Z,t[166]=Q,t[167]=$,t[168]=_t,t[169]=yt,t[170]=bt,t[171]=xt,t[172]=Ct,t[173]=Tt,t[174]=Et):Et=t[174];let Dt;t[175]!==ae||t[176]!==s?(Dt=ae&&(0,k.jsxs)(E,{children:[(0,k.jsx)(E.Header,{children:`Pending Changes`}),(0,k.jsxs)(E.Content,{children:[(0,k.jsx)(D,{label:`Instance class`,value:s?.DBInstanceClass}),(0,k.jsx)(D,{label:`Allocated storage`,value:s?.AllocatedStorage?`${s.AllocatedStorage} GiB`:void 0})]})]}),t[175]=ae,t[176]=s,t[177]=Dt):Dt=t[177],t[178]!==Et||t[179]!==Dt?(j=(0,k.jsx)(je,{value:`configuration`,children:(0,k.jsxs)(`div`,{className:`space-y-4`,children:[Et,Dt]})}),t[178]=Et,t[179]=Dt,t[180]=j):j=t[180],Pe=je,Xe=`backups`,qe=`space-y-4`,Je=r&&(0,k.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`alert`,children:[(0,k.jsx)(`p`,{className:`font-medium`,children:`An automated backup failed`}),(0,k.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[r.Message,` (`,c(r.Date),`)`]})]}),Ye=i&&(0,k.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`alert`,children:[(0,k.jsx)(`p`,{className:`font-medium`,children:`A backup raised a warning`}),(0,k.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[i.Message,` (`,c(i.Date),`)`]})]}),Ne=E,t[181]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,k.jsx)(E.Header,{children:`Automated Backups`}),t[181]=Ge):Ge=t[181],De=E.Content;let Ot=u.BackupRetentionPeriod===0?`Disabled`:`${u.BackupRetentionPeriod} days`;t[182]===Ot?ut=t[183]:(ut=(0,k.jsx)(D,{label:`Retention`,value:Ot}),t[182]=Ot,t[183]=ut);let kt=o?.Status??`None — automated backups are off`;t[184]===kt?dt=t[185]:(dt=(0,k.jsx)(D,{label:`Status`,value:kt}),t[184]=kt,t[185]=dt),t[186]===u.PreferredBackupWindow?L=t[187]:(L=(0,k.jsx)(D,{label:`Preferred backup window`,value:u.PreferredBackupWindow}),t[186]=u.PreferredBackupWindow,t[187]=L),t[188]===u.PreferredMaintenanceWindow?Re=t[189]:(Re=(0,k.jsx)(D,{label:`Preferred maintenance window`,value:u.PreferredMaintenanceWindow}),t[188]=u.PreferredMaintenanceWindow,t[189]=Re),Ee=D,ct=`Last backup`,lt=a?.SnapshotCreateTime&&c(a.SnapshotCreateTime),t[9]=y.DBInstanceAutomatedBackups?.[0],t[10]=n,t[11]=pe.Events,t[12]=u,t[13]=S,t[14]=he.DBSnapshots,t[15]=b,t[16]=T,t[17]=x,t[18]=Ee,t[19]=De,t[20]=Ne,t[21]=Pe,t[22]=Fe,t[23]=Ie,t[24]=Le,t[25]=Re,t[26]=Ge,t[27]=qe,t[28]=Je,t[29]=Ye,t[30]=Xe,t[31]=Ze,t[32]=Qe,t[33]=A,t[34]=j,t[35]=M,t[36]=N,t[37]=P,t[38]=F,t[39]=I,t[40]=ct,t[41]=lt,t[42]=ut,t[43]=dt,t[44]=L}else Ee=t[18],De=t[19],Ne=t[20],Pe=t[21],Fe=t[22],Ie=t[23],Le=t[24],Re=t[25],Ge=t[26],qe=t[27],Je=t[28],Ye=t[29],Xe=t[30],Ze=t[31],Qe=t[32],A=t[33],j=t[34],M=t[35],N=t[36],P=t[37],F=t[38],I=t[39],ct=t[40],lt=t[41],ut=t[42],dt=t[43],L=t[44];let R;t[190]!==Ee||t[191]!==ct||t[192]!==lt?(R=(0,k.jsx)(Ee,{label:ct,value:lt}),t[190]=Ee,t[191]=ct,t[192]=lt,t[193]=R):R=t[193];let z;t[194]!==De||t[195]!==Re||t[196]!==R||t[197]!==ut||t[198]!==dt||t[199]!==L?(z=(0,k.jsxs)(De,{children:[ut,dt,L,Re,R]}),t[194]=De,t[195]=Re,t[196]=R,t[197]=ut,t[198]=dt,t[199]=L,t[200]=z):z=t[200];let B;t[201]!==Ne||t[202]!==Ge||t[203]!==z?(B=(0,k.jsxs)(Ne,{children:[Ge,z]}),t[201]=Ne,t[202]=Ge,t[203]=z,t[204]=B):B=t[204];let ft;t[205]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,k.jsx)(`h3`,{className:`text-sm font-medium`,children:`Snapshots`}),t[205]=ft):ft=t[205];let V;t[206]!==r||t[207]!==Le?(V=(0,k.jsxs)(`div`,{className:`space-y-2`,children:[ft,Le.length>0?(0,k.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,k.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,k.jsx)(`thead`,{children:(0,k.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,k.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,k.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,k.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,k.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,k.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,k.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,k.jsx)(`tbody`,{children:Le.map(e=>{let t=e.DBSnapshotIdentifier;return t?(0,k.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,k.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,k.jsx)(o,{className:`text-primary hover:underline`,params:{id:t},to:`/rds/describe-db-snapshots/$id`,children:t})}),(0,k.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,k.jsx)(`td`,{className:`px-4 py-2`,children:(0,k.jsx)(Oe,{state:e.Status})}),(0,k.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:c(e.SnapshotCreateTime)}),(0,k.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,k.jsx)(l,{disabled:!f(e.Status),onClick:async()=>await r({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:t}}),size:`sm`,variant:`outline`,children:`Restore`}),(0,k.jsx)(l,{disabled:!le(e.Status,e.SnapshotType),onClick:()=>Te(t),size:`sm`,variant:`destructive`,children:`Delete`})]})]},t):null})})]})}):(0,k.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots of this instance.`})]}),t[206]=r,t[207]=Le,t[208]=V):V=t[208];let pt;t[209]===Symbol.for(`react.memo_cache_sentinel`)?(pt=(0,k.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Automated backups are daily snapshots taken in the backup window, deleted by retention rather than by hand. There is no point-in-time restore.`}),t[209]=pt):pt=t[209];let H;t[210]!==qe||t[211]!==Je||t[212]!==Ye||t[213]!==B||t[214]!==V?(H=(0,k.jsxs)(`div`,{className:qe,children:[Je,Ye,B,V,pt]}),t[210]=qe,t[211]=Je,t[212]=Ye,t[213]=B,t[214]=V,t[215]=H):H=t[215];let U;t[216]!==Pe||t[217]!==Xe||t[218]!==H?(U=(0,k.jsx)(Pe,{value:Xe,children:H}),t[216]=Pe,t[217]=Xe,t[218]=H,t[219]=U):U=t[219];let W;t[220]===oe?W=t[221]:(W=(0,k.jsx)(je,{value:`tags`,children:(0,k.jsx)(He,{arn:oe})}),t[220]=oe,t[221]=W);let G;t[222]===Ie?G=t[223]:(G=(0,k.jsx)(je,{value:`events`,children:(0,k.jsx)(Ve,{events:Ie})}),t[222]=Ie,t[223]=G);let K;t[224]!==Fe||t[225]!==Ze||t[226]!==Qe||t[227]!==A||t[228]!==j||t[229]!==U||t[230]!==W||t[231]!==G?(K=(0,k.jsxs)(Fe,{defaultValue:Ze,children:[Qe,A,j,U,W,G]}),t[224]=Fe,t[225]=Ze,t[226]=Qe,t[227]=A,t[228]=j,t[229]=U,t[230]=W,t[231]=G,t[232]=K):K=t[232];let q;t[233]!==M||t[234]!==N||t[235]!==P||t[236]!==K?(q=(0,k.jsxs)(`div`,{className:M,children:[N,P,K]}),t[233]=M,t[234]=N,t[235]=P,t[236]=K,t[237]=q):q=t[237];let J;t[238]!==u||t[239]!==w?(J=w&&(0,k.jsx)(Ke,{instance:u,onOpenChange:xe,open:!0}),t[238]=u,t[239]=w,t[240]=J):J=t[240];let Y;t[241]!==n||t[242]!==Se?(Y=Se&&(0,k.jsx)(ze,{dbInstanceIdentifier:n,onOpenChange:Ce,open:!0}),t[241]=n,t[242]=Se,t[243]=Y):Y=t[243];let X;t[244]===we?X=t[245]:(X=we&&(0,k.jsx)(Be,{dbSnapshotIdentifier:we,onOpenChange:e=>!e&&Te(null),open:!0}),t[244]=we,t[245]=X);let mt=u.DeletionProtection??!1,Z;t[246]===r?Z=t[247]:(Z=async()=>await r({to:`/rds/describe-db-instances`}),t[246]=r,t[247]=Z);let ht;t[248]===Symbol.for(`react.memo_cache_sentinel`)?(ht=()=>{ye(!1),xe(!0)},t[248]=ht):ht=t[248];let Q;t[249]!==n||t[250]!==C||t[251]!==mt||t[252]!==Z?(Q=(0,k.jsx)(Ue,{dbInstanceIdentifier:n,deletionProtection:mt,onDeleted:Z,onModify:ht,onOpenChange:ye,open:C}),t[249]=n,t[250]=C,t[251]=mt,t[252]=Z,t[253]=Q):Q=t[253];let $;return t[254]!==F||t[255]!==I||t[256]!==q||t[257]!==J||t[258]!==Y||t[259]!==X||t[260]!==Q?($=(0,k.jsxs)(k.Fragment,{children:[F,I,q,J,Y,X,Q]}),t[254]=F,t[255]=I,t[256]=q,t[257]=J,t[258]=Y,t[259]=X,t[260]=Q,t[261]=$):$=t[261],$}function tt(e){return`${e.DBParameterGroupName} (${e.ParameterApplyStatus})`}function nt(e){return e.VpcSecurityGroupId}function rt(e){return(0,k.jsxs)(`span`,{className:`text-xs text-tactical-amber`,children:[e.StatusType,`: `,e.Message??e.Status]},`${e.StatusType}-${e.Status}`)}function it(e,t){return(e.SnapshotCreateTime?.getTime()??0)-(t.SnapshotCreateTime?.getTime()??0)}function at(e){return e.SnapshotType===d}function ot(e){return A(e,`backup`)&&A(e,`notification`)}function st(e){return A(e,`backup`)&&A(e,`failure`)}function M(){let e=(0,We.c)(2),{id:t}=y.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,k.jsx)(j,{dbInstanceIdentifier:n}),e[0]=n,e[1]=r),r}export{M as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./link.js";import{t as s}from"./useNavigate.js";import{Qt as ee}from"./cluster-config.js";import{t as te}from"./back-link.js";import{t as ne}from"./camera.js";import{t as re}from"./pencil.js";import{t as ie}from"./cli-command-panel.js";import{t as ae}from"./trash-2.js";import{t as c}from"./button.js";import{t as oe}from"./input.js";import{w as l}from"./ec2.js";import{S as u,a as d,c as se,d as f,f as ce,l as p,m as le,p as ue,u as de}from"./rds.js";import{d as fe,l as pe,m,p as h}from"./rds2.js";import{c as me,d as he,l as ge,n as _e,o as g,s as _,t as ve}from"./rds3.js";import{t as v}from"./_id19.js";import{a as y,i as b,n as x,t as ye}from"./zod.js";import{t as be}from"./error-banner.js";import{t as xe}from"./form-actions.js";import{t as Se}from"./page-heading.js";import{a as S,n as Ce,r as we,t as Te}from"./field.js";import{a as Ee,i as De,l as C,s as Oe,t as ke}from"./alert-dialog.js";import{n as w,t as T}from"./detail-row.js";import{t as Ae}from"./state-badge.js";import{i as je,n as Me,r as Ne,t as Pe}from"./tabs.js";import{n as Fe,t as Ie}from"./picker-notice.js";import{a as Le,o as Re,s as ze,t as Be}from"./security-group-checkboxes.js";import{t as Ve}from"./create-db-snapshot-dialog.js";import{t as He}from"./delete-db-snapshot-dialog.js";import{t as Ue}from"./rds-events-panel.js";import{t as We}from"./rds-tags-tab.js";import{t as Ge}from"./delete-db-instance-dialog.js";var Ke=e(n(),1),qe=r(),E=t(),Je=[{label:`Identifier`,note:`The identifier is the endpoint hostname and the certificate subject; renaming in place is not implemented.`},{label:`Engine version`,note:`There is no in-place engine-version upgrade.`},{label:`Port`,note:`The port is fixed at create; changing it would break every client and the serving certificate.`},{label:`DB subnet group`,note:`The endpoint ENI is placed at create; moving it would change the address clients resolve.`}];function D(e){let t=(0,qe.c)(222),{open:n,onOpenChange:r,instance:a}=e,o=pe(),s=i(he),ee=i(l),te=i(g),ne=a.Engine??``,re;t[0]===ne?re=t[1]:(re=ge(ne),t[0]=ne,t[1]=re);let ie=i(re),ae=a.DBInstanceIdentifier??``,c=a.AllocatedStorage??0,d;t[2]===a.VpcSecurityGroups?d=t[3]:(d=a.VpcSecurityGroups?.map(et).filter(Boolean)??[],t[2]=a.VpcSecurityGroups,t[3]=d);let se=d,f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=ye(u),t[4]=f):f=t[4];let ce=a.DBInstanceClass??``,p=a.DBParameterGroups?.[0]?.DBParameterGroupName??``,le=a.DeletionProtection??!1,ue=a.BackupRetentionPeriod??0,de=a.PreferredBackupWindow??``,fe=a.PreferredMaintenanceWindow??``,m;t[5]!==se||t[6]!==c||t[7]!==fe||t[8]!==ce||t[9]!==p||t[10]!==le||t[11]!==ue||t[12]!==de?(m={resolver:f,defaultValues:{currentAllocatedStorage:c,dbInstanceClass:ce,allocatedStorage:c,dbParameterGroupName:p,vpcSecurityGroupIds:se,deletionProtection:le,backupRetentionPeriod:ue,preferredBackupWindow:de,preferredMaintenanceWindow:fe,masterUserPassword:``,applyImmediately:!1}},t[5]=se,t[6]=c,t[7]=fe,t[8]=ce,t[9]=p,t[10]=le,t[11]=ue,t[12]=de,t[13]=m):m=t[13];let{control:h,formState:me,handleSubmit:_e,register:_,setValue:ve}=b(m),{errors:v,isSubmitting:Se}=me,w;t[14]===h?w=t[15]:(w={control:h},t[14]=h,t[15]=w);let T=y(w),Ae=T.dbInstanceClass??``,je=T.allocatedStorage??c,Me;t[16]===T.vpcSecurityGroupIds?Me=t[17]:(Me=T.vpcSecurityGroupIds??[],t[16]=T.vpcSecurityGroupIds,t[17]=Me);let Ne=Me,Pe;t[18]===ie.data?.OrderableDBInstanceOptions?Pe=t[19]:(Pe=ie.data?.OrderableDBInstanceOptions??[],t[18]=ie.data?.OrderableDBInstanceOptions,t[19]=Pe);let Ve;t[20]===Pe?Ve=t[21]:(Ve=new Set(Pe.map($e).filter(Boolean)),t[20]=Pe,t[21]=Ve);let He;t[22]===Ve?He=t[23]:(He=[...Ve],t[22]=Ve,t[23]=He);let Ue=He,We,Ge,Ke,D,O,tt,nt,rt,it,at,ot,st,ct,lt,ut,k,A,j,dt,M;if(t[24]!==h||t[25]!==c||t[26]!==te.data?.DBEngineVersions||t[27]!==v.allocatedStorage||t[28]!==_e||t[29]!==ae||t[30]!==a.DBInstanceClass||t[31]!==a.DBSubnetGroup?.VpcId||t[32]!==a.Engine||t[33]!==Ue||t[34]!==o||t[35]!==r||t[36]!==n||t[37]!==ie||t[38]!==s||t[39]!==_||t[40]!==ee||t[41]!==Ae||t[42]!==je||t[43]!==ve){let e;t[64]===s.data?.DBParameterGroups?e=t[65]:(e=s.data?.DBParameterGroups??[],t[64]=s.data?.DBParameterGroups,t[65]=e);let i;t[66]===te.data?.DBEngineVersions?i=t[67]:(i=te.data?.DBEngineVersions??[],t[66]=te.data?.DBEngineVersions,t[67]=i);let ne=ze(e,i,a.Engine??``),re=a.DBSubnetGroup?.VpcId,l;t[68]===ee.data?.SecurityGroups?l=t[69]:(l=ee.data?.SecurityGroups??[],t[68]=ee.data?.SecurityGroups,t[69]=l);let u;if(t[70]!==re||t[71]!==l){let e;t[73]===re?e=t[74]:(e=e=>re===void 0||e.VpcId===re,t[73]=re,t[74]=e),u=l.filter(e),t[70]=re,t[71]=l,t[72]=u}else u=t[72];O=u;let d=Ae!==a.DBInstanceClass,se=je!==c,f=Ue.length===0,ce=`No instance class this cluster's nodes can run is available for ${a.Engine}.`,p;t[75]!==ie||t[76]!==f||t[77]!==ce?(p=Fe(ie,f,{loading:`Loading the instance classes…`,failed:`Could not read the instance classes`,empty:ce}),t[75]=ie,t[76]=f,t[77]=ce,t[78]=p):p=t[78];let le=p,ue=ne.length===0,de;t[79]!==s||t[80]!==ue?(de=Fe(s,ue,{loading:`Loading the parameter groups…`,failed:`Could not read the parameter groups`,empty:`No parameter group of this instance's engine family exists.`}),t[79]=s,t[80]=ue,t[81]=de):de=t[81];let fe=de,pe=O.length===0,m;t[82]!==ee||t[83]!==pe?(m=Fe(ee,pe,{loading:`Loading the security groups…`,failed:`Could not read the security groups`,empty:`No security group in this instance's VPC is available.`}),t[82]=ee,t[83]=pe,t[84]=m):m=t[84],D=m;let me;t[85]===ve?me=t[86]:(me=e=>ve(`vpcSecurityGroupIds`,e,{shouldValidate:!0}),t[85]=ve,t[86]=me),tt=me;let he;t[87]!==ae||t[88]!==o||t[89]!==r?(he=async e=>{await o.mutateAsync({...e,dbInstanceIdentifier:ae}),r(!1)},t[87]=ae,t[88]=o,t[89]=r,t[90]=he):he=t[90];let ge=he;Ke=ke,dt=r,M=n,Ge=De,A=`max-h-[85vh] overflow-y-auto`;let g;t[91]===ae?g=t[92]:(g=(0,E.jsxs)(C,{children:[`Modify `,ae]}),t[91]=ae,t[92]=g);let y;t[93]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,E.jsx)(Ee,{children:`Changes apply in the maintenance window unless you apply them immediately.`}),t[93]=y):y=t[93],t[94]===g?j=t[95]:(j=(0,E.jsxs)(Oe,{children:[g,y]}),t[94]=g,t[95]=j),ct=`space-y-4`,t[96]!==_e||t[97]!==ge?(lt=_e(ge),t[96]=_e,t[97]=ge,t[98]=lt):lt=t[98];let b;t[99]===Ue?b=t[100]:(b=Ue.map(Qe),t[99]=Ue,t[100]=b);let x=d&&`Changing the class replaces the VM. The database is unavailable while it does.`;t[101]!==le||t[102]!==h||t[103]!==b||t[104]!==x?(ut=(0,E.jsx)(Re,{control:h,id:`modify-class`,label:`DB instance class`,name:`dbInstanceClass`,notice:le,options:b,placeholder:`Select an instance class`,warning:x}),t[101]=le,t[102]=h,t[103]=b,t[104]=x,t[105]=ut):ut=t[105];let ye;t[106]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,E.jsx)(S,{children:(0,E.jsx)(`label`,{htmlFor:`modify-storage`,children:`Allocated storage (GiB)`})}),t[106]=ye):ye=t[106];let be=!!v.allocatedStorage,xe;t[107]===_?xe=t[108]:(xe=_(`allocatedStorage`,{valueAsNumber:!0}),t[107]=_,t[108]=xe);let Se;t[109]!==c||t[110]!==be||t[111]!==xe?(Se=(0,E.jsx)(oe,{"aria-invalid":be,id:`modify-storage`,min:c,type:`number`,...xe}),t[109]=c,t[110]=be,t[111]=xe,t[112]=Se):Se=t[112];let w;t[113]===c?w=t[114]:(w=(0,E.jsxs)(Ce,{children:[`Currently `,c,` GiB. Storage grows only.`]}),t[113]=c,t[114]=w);let T;t[115]===se?T=t[116]:(T=se&&(0,E.jsx)(`p`,{className:`text-xs text-tactical-amber`,children:`Growing storage stops and starts the instance to extend the filesystem.`}),t[115]=se,t[116]=T);let Me;t[117]===v.allocatedStorage?Me=t[118]:(Me=(0,E.jsx)(we,{errors:[v.allocatedStorage]}),t[117]=v.allocatedStorage,t[118]=Me),t[119]!==Se||t[120]!==w||t[121]!==T||t[122]!==Me?(k=(0,E.jsxs)(Te,{children:[ye,Se,w,T,Me]}),t[119]=Se,t[120]=w,t[121]=T,t[122]=Me,t[123]=k):k=t[123],We=Re,nt=h,rt=`modify-parameter-group`,it=`DB parameter group`,at=`dbParameterGroupName`,ot=fe,st=ne.map(Ze),t[24]=h,t[25]=c,t[26]=te.data?.DBEngineVersions,t[27]=v.allocatedStorage,t[28]=_e,t[29]=ae,t[30]=a.DBInstanceClass,t[31]=a.DBSubnetGroup?.VpcId,t[32]=a.Engine,t[33]=Ue,t[34]=o,t[35]=r,t[36]=n,t[37]=ie,t[38]=s,t[39]=_,t[40]=ee,t[41]=Ae,t[42]=je,t[43]=ve,t[44]=We,t[45]=Ge,t[46]=Ke,t[47]=D,t[48]=O,t[49]=tt,t[50]=nt,t[51]=rt,t[52]=it,t[53]=at,t[54]=ot,t[55]=st,t[56]=ct,t[57]=lt,t[58]=ut,t[59]=k,t[60]=A,t[61]=j,t[62]=dt,t[63]=M}else We=t[44],Ge=t[45],Ke=t[46],D=t[47],O=t[48],tt=t[49],nt=t[50],rt=t[51],it=t[52],at=t[53],ot=t[54],st=t[55],ct=t[56],lt=t[57],ut=t[58],k=t[59],A=t[60],j=t[61],dt=t[62],M=t[63];let N;t[124]!==We||t[125]!==nt||t[126]!==rt||t[127]!==it||t[128]!==at||t[129]!==ot||t[130]!==st?(N=(0,E.jsx)(We,{control:nt,id:rt,label:it,name:at,notice:ot,options:st,placeholder:`Engine default group`}),t[124]=We,t[125]=nt,t[126]=rt,t[127]=it,t[128]=at,t[129]=ot,t[130]=st,t[131]=N):N=t[131];let ft;t[132]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,E.jsx)(S,{children:`VPC security groups`}),t[132]=ft):ft=t[132];let P;t[133]!==D||t[134]!==O||t[135]!==Ne||t[136]!==tt?(P=(0,E.jsxs)(Te,{children:[ft,D?(0,E.jsx)(Ie,{notice:D}):(0,E.jsx)(Be,{emptyText:`No security group in this instance's VPC is available.`,groups:O,onChange:tt,selected:Ne})]}),t[133]=D,t[134]=O,t[135]=Ne,t[136]=tt,t[137]=P):P=t[137];let pt;t[138]===Symbol.for(`react.memo_cache_sentinel`)?(pt=(0,E.jsx)(S,{children:(0,E.jsx)(`label`,{htmlFor:`modify-retention`,children:`Backup retention (days)`})}),t[138]=pt):pt=t[138];let mt=!!v.backupRetentionPeriod,F;t[139]===_?F=t[140]:(F=_(`backupRetentionPeriod`,{valueAsNumber:!0}),t[139]=_,t[140]=F);let I;t[141]!==mt||t[142]!==F?(I=(0,E.jsx)(oe,{"aria-invalid":mt,id:`modify-retention`,max:7,min:0,type:`number`,...F}),t[141]=mt,t[142]=F,t[143]=I):I=t[143];let L;t[144]===v.backupRetentionPeriod?L=t[145]:(L=(0,E.jsx)(we,{errors:[v.backupRetentionPeriod]}),t[144]=v.backupRetentionPeriod,t[145]=L);let R;t[146]!==I||t[147]!==L?(R=(0,E.jsxs)(Te,{children:[pt,I,L]}),t[146]=I,t[147]=L,t[148]=R):R=t[148];let z;t[149]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,E.jsx)(S,{children:(0,E.jsx)(`label`,{htmlFor:`modify-backup-window`,children:`Preferred backup window`})}),t[149]=z):z=t[149];let ht=!!v.preferredBackupWindow,B;t[150]===_?B=t[151]:(B=_(`preferredBackupWindow`),t[150]=_,t[151]=B);let V;t[152]!==ht||t[153]!==B?(V=(0,E.jsx)(oe,{"aria-invalid":ht,id:`modify-backup-window`,placeholder:`hh24:mi-hh24:mi in UTC`,...B}),t[152]=ht,t[153]=B,t[154]=V):V=t[154];let H;t[155]===v.preferredBackupWindow?H=t[156]:(H=(0,E.jsx)(we,{errors:[v.preferredBackupWindow]}),t[155]=v.preferredBackupWindow,t[156]=H);let U;t[157]!==V||t[158]!==H?(U=(0,E.jsxs)(Te,{children:[z,V,H]}),t[157]=V,t[158]=H,t[159]=U):U=t[159];let W;t[160]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,E.jsx)(S,{children:(0,E.jsx)(`label`,{htmlFor:`modify-maintenance-window`,children:`Preferred maintenance window`})}),t[160]=W):W=t[160];let G=!!v.preferredMaintenanceWindow,K;t[161]===_?K=t[162]:(K=_(`preferredMaintenanceWindow`),t[161]=_,t[162]=K);let q;t[163]!==G||t[164]!==K?(q=(0,E.jsx)(oe,{"aria-invalid":G,id:`modify-maintenance-window`,placeholder:`ddd:hh24:mi-ddd:hh24:mi in UTC`,...K}),t[163]=G,t[164]=K,t[165]=q):q=t[165];let J;t[166]===v.preferredMaintenanceWindow?J=t[167]:(J=(0,E.jsx)(we,{errors:[v.preferredMaintenanceWindow]}),t[166]=v.preferredMaintenanceWindow,t[167]=J);let Y;t[168]!==q||t[169]!==J?(Y=(0,E.jsxs)(Te,{children:[W,q,J]}),t[168]=q,t[169]=J,t[170]=Y):Y=t[170];let X;t[171]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,E.jsx)(S,{children:(0,E.jsx)(`label`,{htmlFor:`modify-password`,children:`Reset master password`})}),t[171]=X):X=t[171];let gt=!!v.masterUserPassword,Z;t[172]===_?Z=t[173]:(Z=_(`masterUserPassword`),t[172]=_,t[173]=Z);let Q;t[174]!==gt||t[175]!==Z?(Q=(0,E.jsx)(oe,{"aria-invalid":gt,id:`modify-password`,type:`password`,...Z}),t[174]=gt,t[175]=Z,t[176]=Q):Q=t[176];let _t;t[177]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,E.jsx)(Ce,{children:`Leave blank to keep the current password.`}),t[177]=_t):_t=t[177];let $;t[178]===v.masterUserPassword?$=t[179]:($=(0,E.jsx)(we,{errors:[v.masterUserPassword]}),t[178]=v.masterUserPassword,t[179]=$);let vt;t[180]!==Q||t[181]!==$?(vt=(0,E.jsxs)(Te,{children:[X,Q,_t,$]}),t[180]=Q,t[181]=$,t[182]=vt):vt=t[182];let yt;t[183]===h?yt=t[184]:(yt=(0,E.jsx)(Le,{control:h,name:`deletionProtection`}),t[183]=h,t[184]=yt);let bt;t[185]===Symbol.for(`react.memo_cache_sentinel`)?(bt=(0,E.jsx)(S,{children:`Apply immediately`}),t[185]=bt):bt=t[185];let xt;t[186]===h?xt=t[187]:(xt=(0,E.jsxs)(Te,{children:[bt,(0,E.jsx)(x,{control:h,name:`applyImmediately`,render:Xe})]}),t[186]=h,t[187]=xt);let St;t[188]===Symbol.for(`react.memo_cache_sentinel`)?(St=(0,E.jsxs)(`div`,{className:`space-y-2 rounded-md border border-border p-3`,children:[(0,E.jsx)(`h3`,{className:`text-xs font-medium`,children:`Fixed at create`}),Je.map(Ye)]}),t[188]=St):St=t[188];let Ct;t[189]===o.error?Ct=t[190]:(Ct=o.error&&(0,E.jsx)(be,{error:o.error,msg:`Failed to modify the DB instance`}),t[189]=o.error,t[190]=Ct);let wt;t[191]===r?wt=t[192]:(wt=()=>r(!1),t[191]=r,t[192]=wt);let Tt;t[193]!==Se||t[194]!==o.isPending||t[195]!==wt?(Tt=(0,E.jsx)(`div`,{className:`flex justify-end`,children:(0,E.jsx)(xe,{isPending:o.isPending,isSubmitting:Se,onCancel:wt,pendingLabel:`Saving…`,submitLabel:`Save Changes`})}),t[193]=Se,t[194]=o.isPending,t[195]=wt,t[196]=Tt):Tt=t[196];let Et;t[197]!==ct||t[198]!==lt||t[199]!==ut||t[200]!==k||t[201]!==N||t[202]!==P||t[203]!==R||t[204]!==U||t[205]!==Y||t[206]!==vt||t[207]!==yt||t[208]!==xt||t[209]!==Ct||t[210]!==Tt?(Et=(0,E.jsxs)(`form`,{className:ct,onSubmit:lt,children:[ut,k,N,P,R,U,Y,vt,yt,xt,St,Ct,Tt]}),t[197]=ct,t[198]=lt,t[199]=ut,t[200]=k,t[201]=N,t[202]=P,t[203]=R,t[204]=U,t[205]=Y,t[206]=vt,t[207]=yt,t[208]=xt,t[209]=Ct,t[210]=Tt,t[211]=Et):Et=t[211];let Dt;t[212]!==Ge||t[213]!==A||t[214]!==j||t[215]!==Et?(Dt=(0,E.jsxs)(Ge,{className:A,children:[j,Et]}),t[212]=Ge,t[213]=A,t[214]=j,t[215]=Et,t[216]=Dt):Dt=t[216];let Ot;return t[217]!==Ke||t[218]!==dt||t[219]!==M||t[220]!==Dt?(Ot=(0,E.jsx)(Ke,{onOpenChange:dt,open:M,children:Dt}),t[217]=Ke,t[218]=dt,t[219]=M,t[220]=Dt,t[221]=Ot):Ot=t[221],Ot}function Ye(e){return(0,E.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[(0,E.jsx)(`span`,{className:`font-medium`,children:e.label}),` —`,` `,e.note]},e.label)}function Xe(e){let{field:t}=e;return(0,E.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,E.jsx)(`input`,{"aria-label":`Apply immediately`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),(0,E.jsx)(`span`,{children:`Apply now instead of waiting for the maintenance window`})]})}function Ze(e){return{value:e.DBParameterGroupName??``,label:e.DBParameterGroupName??``}}function Qe(e){return{value:e,label:e}}function $e(e){return e.DBInstanceClass??``}function et(e){return e.VpcSecurityGroupId??``}function O(e,t){return e.EventCategories?.includes(t)??!1}function tt(e,t){return e.filter(t).toSorted((e,t)=>(e.Date?.getTime()??0)-(t.Date?.getTime()??0)).at(-1)}function nt(e){let t=e.Endpoint?.Address;if(!t)return[];let n=e.Endpoint?.Port??e.DbInstancePort,r=e.MasterUsername??``,i=e.DBName??r;return e.Engine===`postgres`?[{label:`Connect`,parts:[{type:`bin`,value:`psql`},{type:`value`,value:` "host=${t} port=${n} dbname=${i} user=${r} sslmode=require"`}]}]:[{label:`Connect`,parts:[{type:`bin`,value:`mariadb`},{type:`flag`,value:` --host`},{type:`value`,value:`=${t}`},{type:`flag`,value:` --port`},{type:`value`,value:`=${n}`},{type:`flag`,value:` --user`},{type:`value`,value:`=${r}`},{type:`flag`,value:` --ssl`},{type:`value`,value:` ${i}`}]}]}function rt(e){let t=(0,qe.c)(266),{dbInstanceIdentifier:n}=e,r=s(),i;t[0]===n?i=t[1]:(i=_e(n),t[0]=n,t[1]=i);let{data:oe}=a(i),l=oe.DBInstances?.[0],u=l?.DBInstanceArn??``,d;t[2]===n?d=t[3]:(d=_(n),t[2]=n,t[3]=d);let{data:pe}=a(d),he;t[4]===n?he=t[5]:(he=me(n),t[4]=n,t[5]=he);let{data:ge}=a(he),g;t[6]===n?g=t[7]:(g=ve(n),t[6]=n,t[7]=g);let{data:v}=a(g),y=h(),b=m(),x=fe(),[ye,xe]=(0,Ke.useState)(!1),[S,Ce]=(0,Ke.useState)(!1),[we,Te]=(0,Ke.useState)(!1),[Ee,De]=(0,Ke.useState)(null);if(!l?.DBInstanceIdentifier){let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(te,{to:`/rds/describe-db-instances`,children:`Back to databases`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`DB instance not found.`})]}),t[8]=e):e=t[8],e}let C=l.DBInstanceStatus,Oe;t[9]===pe.Events?Oe=t[10]:(Oe=pe.Events??[],t[9]=pe.Events,t[10]=Oe);let ke=Oe,Fe=y.error??b.error??x.error,Ie,Le,Re,ze,Be,Je,Ye,Xe,Ze,Qe,$e,et,O,rt,k,A,j,dt,M,N,ft,P,pt,mt,F,I;if(t[11]!==v.DBInstanceAutomatedBackups?.[0]||t[12]!==n||t[13]!==ke||t[14]!==l||t[15]!==Fe||t[16]!==x||t[17]!==ge.DBSnapshots||t[18]!==y||t[19]!==C||t[20]!==b){let e=tt(ke,ut),r=tt(ke,lt),i;t[47]===ge.DBSnapshots?i=t[48]:(i=ge.DBSnapshots??[],t[47]=ge.DBSnapshots,t[48]=i),Je=i;let a=Je.filter(ct).toSorted(st).at(-1),o=v.DBInstanceAutomatedBackups?.[0],s=l.PendingModifiedValues,oe=s?.AllocatedStorage!==void 0||s?.DBInstanceClass!==void 0;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,E.jsx)(te,{to:`/rds/describe-db-instances`,children:`Back to databases`}),t[49]=ft):ft=t[49],t[50]===Fe?P=t[51]:(P=Fe&&(0,E.jsx)(be,{error:Fe,msg:`Failed to change the DB instance state.`}),t[50]=Fe,t[51]=P),dt=`space-y-6`;let u;t[52]!==y.isPending||t[53]!==C?(u=!ue(C)||y.isPending,t[52]=y.isPending,t[53]=C,t[54]=u):u=t[54];let d;t[55]!==n||t[56]!==y?(d=()=>y.mutate(n),t[55]=n,t[56]=y,t[57]=d):d=t[57];let f;t[58]!==u||t[59]!==d?(f=(0,E.jsx)(c,{disabled:u,onClick:d,size:`sm`,variant:`outline`,children:`Start`}),t[58]=u,t[59]=d,t[60]=f):f=t[60];let p;t[61]!==C||t[62]!==b.isPending?(p=!le(C)||b.isPending,t[61]=C,t[62]=b.isPending,t[63]=p):p=t[63];let fe;t[64]!==n||t[65]!==b?(fe=()=>b.mutate(n),t[64]=n,t[65]=b,t[66]=fe):fe=t[66];let pe;t[67]!==p||t[68]!==fe?(pe=(0,E.jsx)(c,{disabled:p,onClick:fe,size:`sm`,variant:`outline`,children:`Stop`}),t[67]=p,t[68]=fe,t[69]=pe):pe=t[69];let m;t[70]!==x.isPending||t[71]!==C?(m=!de(C)||x.isPending,t[70]=x.isPending,t[71]=C,t[72]=m):m=t[72];let h;t[73]!==n||t[74]!==x?(h=()=>x.mutate(n),t[73]=n,t[74]=x,t[75]=h):h=t[75];let me;t[76]!==m||t[77]!==h?(me=(0,E.jsx)(c,{disabled:m,onClick:h,size:`sm`,variant:`outline`,children:`Reboot`}),t[76]=m,t[77]=h,t[78]=me):me=t[78];let he;t[79]===C?he=t[80]:(he=ce(C),t[79]=C,t[80]=he);let _e=!he,g;t[81]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>Te(!0),t[81]=g):g=t[81];let _;t[82]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,E.jsx)(ne,{className:`size-4`}),t[82]=_):_=t[82];let ve;t[83]===_e?ve=t[84]:(ve=(0,E.jsxs)(c,{disabled:_e,onClick:g,size:`sm`,variant:`outline`,children:[_,`Take Snapshot`]}),t[83]=_e,t[84]=ve);let ye;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(ye=()=>Ce(!0),t[85]=ye):ye=t[85];let S;t[86]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,E.jsxs)(c,{onClick:ye,size:`sm`,variant:`outline`,children:[(0,E.jsx)(re,{className:`size-4`}),`Modify`]}),t[86]=S):S=t[86];let we;t[87]===C?we=t[88]:(we=se(C),t[87]=C,t[88]=we);let Ee=!we,De;t[89]===Symbol.for(`react.memo_cache_sentinel`)?(De=()=>xe(!0),t[89]=De):De=t[89];let Oe;t[90]===Symbol.for(`react.memo_cache_sentinel`)?(Oe=(0,E.jsx)(ae,{className:`size-4`}),t[90]=Oe):Oe=t[90];let Ve;t[91]===Ee?Ve=t[92]:(Ve=(0,E.jsxs)(c,{disabled:Ee,onClick:De,size:`sm`,variant:`destructive`,children:[Oe,`Delete`]}),t[91]=Ee,t[92]=Ve);let He;t[93]!==f||t[94]!==pe||t[95]!==me||t[96]!==ve||t[97]!==Ve?(He=(0,E.jsxs)(`div`,{className:`flex gap-2`,children:[f,pe,me,ve,S,Ve]}),t[93]=f,t[94]=pe,t[95]=me,t[96]=ve,t[97]=Ve,t[98]=He):He=t[98],t[99]!==n||t[100]!==He?(M=(0,E.jsx)(Se,{actions:He,subtitle:`DB Instance`,title:n}),t[99]=n,t[100]=He,t[101]=M):M=t[101];let Ue;t[102]===C?Ue=t[103]:(Ue=(0,E.jsx)(Ae,{state:C}),t[102]=C,t[103]=Ue);let We;t[104]===l.StatusInfos?We=t[105]:(We=l.StatusInfos?.map(ot),t[104]=l.StatusInfos,t[105]=We),t[106]!==Ue||t[107]!==We?(N=(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[Ue,We]}),t[106]=Ue,t[107]=We,t[108]=N):N=t[108],Be=Pe,rt=`connectivity`,t[109]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,E.jsxs)(Me,{children:[(0,E.jsx)(je,{value:`connectivity`,children:`Connectivity`}),(0,E.jsx)(je,{value:`configuration`,children:`Configuration`}),(0,E.jsx)(je,{value:`backups`,children:`Backups`}),(0,E.jsx)(je,{value:`tags`,children:`Tags`}),(0,E.jsx)(je,{value:`events`,children:`Events`})]}),t[109]=k):k=t[109];let Ge;t[110]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,E.jsx)(w.Header,{children:`Endpoint`}),t[110]=Ge):Ge=t[110];let Ke=l.Endpoint?.Address,qe;t[111]===Ke?qe=t[112]:(qe=(0,E.jsx)(T,{label:`Address`,value:Ke}),t[111]=Ke,t[112]=qe);let D;t[113]!==l.DbInstancePort||t[114]!==l.Endpoint?.Port?(D=(l.Endpoint?.Port??l.DbInstancePort)?.toString(),t[113]=l.DbInstancePort,t[114]=l.Endpoint?.Port,t[115]=D):D=t[115];let L;t[116]===D?L=t[117]:(L=(0,E.jsx)(T,{label:`Port`,value:D}),t[116]=D,t[117]=L);let R=l.DBSubnetGroup?.VpcId,z;t[118]===R?z=t[119]:(z=(0,E.jsx)(T,{label:`VPC`,value:R}),t[118]=R,t[119]=z);let ht=l.DBSubnetGroup?.DBSubnetGroupName,B;t[120]===ht?B=t[121]:(B=(0,E.jsx)(T,{label:`DB subnet group`,value:ht}),t[120]=ht,t[121]=B);let V;t[122]===l.VpcSecurityGroups?V=t[123]:(V=l.VpcSecurityGroups?.map(at).join(`, `),t[122]=l.VpcSecurityGroups,t[123]=V);let H;t[124]===V?H=t[125]:(H=(0,E.jsx)(T,{label:`Security groups`,value:V}),t[124]=V,t[125]=H);let U;t[126]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,E.jsx)(T,{label:`Publicly accessible`,value:`No — private VPC address`}),t[126]=U):U=t[126];let W;t[127]!==qe||t[128]!==L||t[129]!==z||t[130]!==B||t[131]!==H?(W=(0,E.jsxs)(w,{children:[Ge,(0,E.jsxs)(w.Content,{children:[qe,L,z,B,H,U]})]}),t[127]=qe,t[128]=L,t[129]=z,t[130]=B,t[131]=H,t[132]=W):W=t[132];let G;t[133]===l?G=t[134]:(G=nt(l),t[133]=l,t[134]=G);let K;t[135]===G?K=t[136]:(K=(0,E.jsx)(ie,{commands:G}),t[135]=G,t[136]=K),t[137]!==W||t[138]!==K?(A=(0,E.jsx)(Ne,{value:`connectivity`,children:(0,E.jsxs)(`div`,{className:`space-y-4`,children:[W,K]})}),t[137]=W,t[138]=K,t[139]=A):A=t[139];let q;t[140]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,E.jsx)(w.Header,{children:`Configuration`}),t[140]=q):q=t[140];let J;t[141]===l.Engine?J=t[142]:(J=(0,E.jsx)(T,{label:`Engine`,value:l.Engine}),t[141]=l.Engine,t[142]=J);let Y;t[143]===l.EngineVersion?Y=t[144]:(Y=(0,E.jsx)(T,{label:`Version`,value:l.EngineVersion}),t[143]=l.EngineVersion,t[144]=Y);let X;t[145]===l.DBInstanceClass?X=t[146]:(X=(0,E.jsx)(T,{label:`Instance class`,value:l.DBInstanceClass}),t[145]=l.DBInstanceClass,t[146]=X);let gt=l.AllocatedStorage?`${l.AllocatedStorage} GiB`:void 0,Z;t[147]===gt?Z=t[148]:(Z=(0,E.jsx)(T,{label:`Allocated storage`,value:gt}),t[147]=gt,t[148]=Z);let Q;t[149]===l.StorageType?Q=t[150]:(Q=(0,E.jsx)(T,{label:`Storage type`,value:l.StorageType}),t[149]=l.StorageType,t[150]=Q);let _t=l.StorageEncrypted?`Encrypted — always on`:`Not encrypted`,$;t[151]===_t?$=t[152]:($=(0,E.jsx)(T,{label:`Encryption`,value:_t}),t[151]=_t,t[152]=$);let vt;t[153]===l.DBParameterGroups?vt=t[154]:(vt=l.DBParameterGroups?.map(it).join(`, `),t[153]=l.DBParameterGroups,t[154]=vt);let yt;t[155]===vt?yt=t[156]:(yt=(0,E.jsx)(T,{label:`Parameter group`,value:vt}),t[155]=vt,t[156]=yt);let bt;t[157]===l.MasterUsername?bt=t[158]:(bt=(0,E.jsx)(T,{label:`Master username`,value:l.MasterUsername}),t[157]=l.MasterUsername,t[158]=bt);let xt;t[159]===l.DBName?xt=t[160]:(xt=(0,E.jsx)(T,{label:`Initial database`,value:l.DBName}),t[159]=l.DBName,t[160]=xt);let St=l.DeletionProtection?`On`:`Off`,Ct;t[161]===St?Ct=t[162]:(Ct=(0,E.jsx)(T,{label:`Deletion protection`,value:St}),t[161]=St,t[162]=Ct);let wt;t[163]===l.InstanceCreateTime?wt=t[164]:(wt=ee(l.InstanceCreateTime),t[163]=l.InstanceCreateTime,t[164]=wt);let Tt;t[165]===wt?Tt=t[166]:(Tt=(0,E.jsx)(T,{label:`Created`,value:wt}),t[165]=wt,t[166]=Tt);let Et;t[167]!==J||t[168]!==Y||t[169]!==X||t[170]!==Z||t[171]!==Q||t[172]!==$||t[173]!==yt||t[174]!==bt||t[175]!==xt||t[176]!==Ct||t[177]!==Tt?(Et=(0,E.jsxs)(w,{children:[q,(0,E.jsxs)(w.Content,{children:[J,Y,X,Z,Q,$,yt,bt,xt,Ct,Tt]})]}),t[167]=J,t[168]=Y,t[169]=X,t[170]=Z,t[171]=Q,t[172]=$,t[173]=yt,t[174]=bt,t[175]=xt,t[176]=Ct,t[177]=Tt,t[178]=Et):Et=t[178];let Dt;t[179]!==oe||t[180]!==s?(Dt=oe&&(0,E.jsxs)(w,{children:[(0,E.jsx)(w.Header,{children:`Pending Changes`}),(0,E.jsxs)(w.Content,{children:[(0,E.jsx)(T,{label:`Instance class`,value:s?.DBInstanceClass}),(0,E.jsx)(T,{label:`Allocated storage`,value:s?.AllocatedStorage?`${s.AllocatedStorage} GiB`:void 0})]})]}),t[179]=oe,t[180]=s,t[181]=Dt):Dt=t[181],t[182]!==Et||t[183]!==Dt?(j=(0,E.jsx)(Ne,{value:`configuration`,children:(0,E.jsxs)(`div`,{className:`space-y-4`,children:[Et,Dt]})}),t[182]=Et,t[183]=Dt,t[184]=j):j=t[184],ze=Ne,O=`backups`,Qe=`space-y-4`,$e=e&&(0,E.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`alert`,children:[(0,E.jsx)(`p`,{className:`font-medium`,children:`An automated backup failed`}),(0,E.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[e.Message,` (`,ee(e.Date),`)`]})]}),et=r&&(0,E.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`alert`,children:[(0,E.jsx)(`p`,{className:`font-medium`,children:`A backup raised a warning`}),(0,E.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[r.Message,` (`,ee(r.Date),`)`]})]}),Re=w,t[185]===Symbol.for(`react.memo_cache_sentinel`)?(Ze=(0,E.jsx)(w.Header,{children:`Automated Backups`}),t[185]=Ze):Ze=t[185],Le=w.Content;let Ot=l.BackupRetentionPeriod===0?`Disabled`:`${l.BackupRetentionPeriod} days`;t[186]===Ot?F=t[187]:(F=(0,E.jsx)(T,{label:`Retention`,value:Ot}),t[186]=Ot,t[187]=F);let kt=o?.Status??`None — automated backups are off`;t[188]===kt?I=t[189]:(I=(0,E.jsx)(T,{label:`Status`,value:kt}),t[188]=kt,t[189]=I),t[190]===l.PreferredBackupWindow?Ye=t[191]:(Ye=(0,E.jsx)(T,{label:`Preferred backup window`,value:l.PreferredBackupWindow}),t[190]=l.PreferredBackupWindow,t[191]=Ye),t[192]===l.PreferredMaintenanceWindow?Xe=t[193]:(Xe=(0,E.jsx)(T,{label:`Preferred maintenance window`,value:l.PreferredMaintenanceWindow}),t[192]=l.PreferredMaintenanceWindow,t[193]=Xe),Ie=T,pt=`Last backup`,mt=a?.SnapshotCreateTime&&ee(a.SnapshotCreateTime),t[11]=v.DBInstanceAutomatedBackups?.[0],t[12]=n,t[13]=ke,t[14]=l,t[15]=Fe,t[16]=x,t[17]=ge.DBSnapshots,t[18]=y,t[19]=C,t[20]=b,t[21]=Ie,t[22]=Le,t[23]=Re,t[24]=ze,t[25]=Be,t[26]=Je,t[27]=Ye,t[28]=Xe,t[29]=Ze,t[30]=Qe,t[31]=$e,t[32]=et,t[33]=O,t[34]=rt,t[35]=k,t[36]=A,t[37]=j,t[38]=dt,t[39]=M,t[40]=N,t[41]=ft,t[42]=P,t[43]=pt,t[44]=mt,t[45]=F,t[46]=I}else Ie=t[21],Le=t[22],Re=t[23],ze=t[24],Be=t[25],Je=t[26],Ye=t[27],Xe=t[28],Ze=t[29],Qe=t[30],$e=t[31],et=t[32],O=t[33],rt=t[34],k=t[35],A=t[36],j=t[37],dt=t[38],M=t[39],N=t[40],ft=t[41],P=t[42],pt=t[43],mt=t[44],F=t[45],I=t[46];let L;t[194]!==Ie||t[195]!==pt||t[196]!==mt?(L=(0,E.jsx)(Ie,{label:pt,value:mt}),t[194]=Ie,t[195]=pt,t[196]=mt,t[197]=L):L=t[197];let R;t[198]!==Le||t[199]!==Ye||t[200]!==Xe||t[201]!==L||t[202]!==F||t[203]!==I?(R=(0,E.jsxs)(Le,{children:[F,I,Ye,Xe,L]}),t[198]=Le,t[199]=Ye,t[200]=Xe,t[201]=L,t[202]=F,t[203]=I,t[204]=R):R=t[204];let z;t[205]!==Re||t[206]!==Ze||t[207]!==R?(z=(0,E.jsxs)(Re,{children:[Ze,R]}),t[205]=Re,t[206]=Ze,t[207]=R,t[208]=z):z=t[208];let ht;t[209]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,E.jsx)(`h3`,{className:`text-sm font-medium`,children:`Snapshots`}),t[209]=ht):ht=t[209];let B;t[210]!==r||t[211]!==Je?(B=(0,E.jsxs)(`div`,{className:`space-y-2`,children:[ht,Je.length>0?(0,E.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,E.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,E.jsx)(`thead`,{children:(0,E.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,E.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,E.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,E.jsx)(`tbody`,{children:Je.map(e=>{let t=e.DBSnapshotIdentifier;return t?(0,E.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,E.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,E.jsx)(o,{className:`text-primary hover:underline`,params:{id:t},to:`/rds/describe-db-snapshots/$id`,children:t})}),(0,E.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,E.jsx)(`td`,{className:`px-4 py-2`,children:(0,E.jsx)(Ae,{state:e.Status})}),(0,E.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:ee(e.SnapshotCreateTime)}),(0,E.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,E.jsx)(c,{disabled:!f(e.Status),onClick:async()=>await r({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:t}}),size:`sm`,variant:`outline`,children:`Restore`}),(0,E.jsx)(c,{disabled:!p(e.Status,e.SnapshotType),onClick:()=>De(t),size:`sm`,variant:`destructive`,children:`Delete`})]})]},t):null})})]})}):(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots of this instance.`})]}),t[210]=r,t[211]=Je,t[212]=B):B=t[212];let V;t[213]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Automated backups are daily snapshots taken in the backup window, deleted by retention rather than by hand. There is no point-in-time restore.`}),t[213]=V):V=t[213];let H;t[214]!==Qe||t[215]!==$e||t[216]!==et||t[217]!==z||t[218]!==B?(H=(0,E.jsxs)(`div`,{className:Qe,children:[$e,et,z,B,V]}),t[214]=Qe,t[215]=$e,t[216]=et,t[217]=z,t[218]=B,t[219]=H):H=t[219];let U;t[220]!==ze||t[221]!==O||t[222]!==H?(U=(0,E.jsx)(ze,{value:O,children:H}),t[220]=ze,t[221]=O,t[222]=H,t[223]=U):U=t[223];let W;t[224]===u?W=t[225]:(W=(0,E.jsx)(Ne,{value:`tags`,children:(0,E.jsx)(We,{arn:u})}),t[224]=u,t[225]=W);let G;t[226]===ke?G=t[227]:(G=(0,E.jsx)(Ne,{value:`events`,children:(0,E.jsx)(Ue,{events:ke})}),t[226]=ke,t[227]=G);let K;t[228]!==Be||t[229]!==rt||t[230]!==k||t[231]!==A||t[232]!==j||t[233]!==U||t[234]!==W||t[235]!==G?(K=(0,E.jsxs)(Be,{defaultValue:rt,children:[k,A,j,U,W,G]}),t[228]=Be,t[229]=rt,t[230]=k,t[231]=A,t[232]=j,t[233]=U,t[234]=W,t[235]=G,t[236]=K):K=t[236];let q;t[237]!==dt||t[238]!==M||t[239]!==N||t[240]!==K?(q=(0,E.jsxs)(`div`,{className:dt,children:[M,N,K]}),t[237]=dt,t[238]=M,t[239]=N,t[240]=K,t[241]=q):q=t[241];let J;t[242]!==l||t[243]!==S?(J=S&&(0,E.jsx)(D,{instance:l,onOpenChange:Ce,open:!0}),t[242]=l,t[243]=S,t[244]=J):J=t[244];let Y;t[245]!==n||t[246]!==we?(Y=we&&(0,E.jsx)(Ve,{dbInstanceIdentifier:n,onOpenChange:Te,open:!0}),t[245]=n,t[246]=we,t[247]=Y):Y=t[247];let X;t[248]===Ee?X=t[249]:(X=Ee&&(0,E.jsx)(He,{dbSnapshotIdentifier:Ee,onOpenChange:e=>!e&&De(null),open:!0}),t[248]=Ee,t[249]=X);let gt=l.DeletionProtection??!1,Z;t[250]===r?Z=t[251]:(Z=async()=>await r({to:`/rds/describe-db-instances`}),t[250]=r,t[251]=Z);let Q;t[252]===Symbol.for(`react.memo_cache_sentinel`)?(Q=()=>{xe(!1),Ce(!0)},t[252]=Q):Q=t[252];let _t;t[253]!==n||t[254]!==ye||t[255]!==gt||t[256]!==Z?(_t=(0,E.jsx)(Ge,{dbInstanceIdentifier:n,deletionProtection:gt,onDeleted:Z,onModify:Q,onOpenChange:xe,open:ye}),t[253]=n,t[254]=ye,t[255]=gt,t[256]=Z,t[257]=_t):_t=t[257];let $;return t[258]!==ft||t[259]!==P||t[260]!==q||t[261]!==J||t[262]!==Y||t[263]!==X||t[264]!==_t?($=(0,E.jsxs)(E.Fragment,{children:[ft,P,q,J,Y,X,_t]}),t[258]=ft,t[259]=P,t[260]=q,t[261]=J,t[262]=Y,t[263]=X,t[264]=_t,t[265]=$):$=t[265],$}function it(e){return`${e.DBParameterGroupName} (${e.ParameterApplyStatus})`}function at(e){return e.VpcSecurityGroupId}function ot(e){return(0,E.jsxs)(`span`,{className:`text-xs text-tactical-amber`,children:[e.StatusType,`: `,e.Message??e.Status]},`${e.StatusType}-${e.Status}`)}function st(e,t){return(e.SnapshotCreateTime?.getTime()??0)-(t.SnapshotCreateTime?.getTime()??0)}function ct(e){return e.SnapshotType===d}function lt(e){return O(e,`backup`)&&O(e,`notification`)}function ut(e){return O(e,`backup`)&&O(e,`failure`)}function k(){let e=(0,qe.c)(2),{id:t}=v.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,E.jsx)(rt,{dbInstanceIdentifier:n}),e[0]=n,e[1]=r),r}export{k as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/_name3.js b/spinifex/services/spinifexui/frontend/dist/assets/_name3.js index 129048a8e..7d4327e5d 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/_name3.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/_name3.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./useNavigate.js";import{t as o}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{t as m}from"./input.js";import{b as h,s as g,t as _}from"./rds.js";import{u as v}from"./rds2.js";import{f as y,u as ee}from"./rds3.js";import{t as b}from"./_name.js";import{t as te}from"./page-heading.js";import{n as x,t as S}from"./detail-row.js";import{i as ne,n as re,r as ie,t as ae}from"./tabs.js";import{t as oe}from"./rds-tags-tab.js";import{t as se}from"./delete-db-parameter-group-dialog.js";var ce=r(),le=e(n(),1),C=t();function w(e){let t=e.AllowedValues??``;if(e.DataType!==`boolean`&&e.DataType!==`enum`)return null;let n=t.split(`,`).filter(e=>e.length>0);return n.length===0?null:n.includes(e.ParameterValue??``)?n:null}function T(e){return e.DataType===`integer`||e.DataType===`real`}function E(e){return e.ApplyType===`static`?_:e.ApplyMethod??`pending-reboot`}function D(e){let t=(0,ce.c)(23),{parameter:n,value:r,options:i,editable:a,onChange:o}=e,c=n.ParameterName??``;if(!a){let e;return t[0]===r?e=t[1]:(e=(0,C.jsx)(`span`,{className:`font-mono text-xs`,children:r}),t[0]=r,t[1]=e),e}if(i){let e;t[2]===o?e=t[3]:(e=e=>o(e??``),t[2]=o,t[3]=e);let n=`Value of ${c}`,a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,C.jsx)(s,{}),t[4]=a):a=t[4];let f;t[5]===n?f=t[6]:(f=(0,C.jsx)(u,{"aria-label":n,className:`w-40`,children:a}),t[5]=n,t[6]=f);let p;t[7]===i?p=t[8]:(p=i.map(O),t[7]=i,t[8]=p);let m;t[9]===p?m=t[10]:(m=(0,C.jsx)(l,{children:p}),t[9]=p,t[10]=m);let h;return t[11]!==e||t[12]!==f||t[13]!==m||t[14]!==r?(h=(0,C.jsxs)(d,{onValueChange:e,value:r,children:[f,m]}),t[11]=e,t[12]=f,t[13]=m,t[14]=r,t[15]=h):h=t[15],h}let f=`Value of ${c}`,p;t[16]===o?p=t[17]:(p=e=>o(e.target.value),t[16]=o,t[17]=p);let h=T(n)?`number`:`text`,g;return t[18]!==f||t[19]!==p||t[20]!==h||t[21]!==r?(g=(0,C.jsx)(m,{"aria-label":f,className:`w-40`,onChange:p,type:h,value:r}),t[18]=f,t[19]=p,t[20]=h,t[21]=r,t[22]=g):g=t[22],g}function O(e){return(0,C.jsx)(c,{value:e,children:e},e)}function ue({dbParameterGroupName:e,parameters:t,readOnly:n}){let r=v(),[i,a]=(0,le.useState)({}),[o,f]=(0,le.useState)(``),[h,_]=(0,le.useState)(`all`),y=Object.keys(i),ee=y.length>20,b=y.some(e=>(i[e]?.value??``).trim()===``),te=(e,t)=>{let n=e.ParameterName??``;a(r=>({...r,[n]:{value:e.ParameterValue??``,applyMethod:E(e),...r[n],...t}}))},x=e=>{a(t=>{let{[e]:n,...r}=t;return r})},S=async()=>{try{await r.mutateAsync({dbParameterGroupName:e,parameters:y.map(e=>({name:e,value:i[e]?.value??``,applyMethod:i[e]?.applyMethod??`pending-reboot`}))}),a({})}catch{}},ne=o.trim().toLowerCase(),re=t.filter(e=>{let t=e.Source??``;return h===`user`&&t!==`user`||h===`engine-default`&&t===`user`?!1:(e.ParameterName??``).toLowerCase().includes(ne)});return(0,C.jsxs)(`div`,{className:`space-y-4`,children:[(0,C.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,C.jsxs)(`div`,{className:`grow`,children:[(0,C.jsx)(`label`,{className:`sr-only`,htmlFor:`parameter-filter`,children:`Filter parameters`}),(0,C.jsx)(m,{id:`parameter-filter`,onChange:e=>f(e.target.value),placeholder:`Filter by parameter name`,value:o})]}),(0,C.jsxs)(d,{onValueChange:e=>_(e??`all`),value:h,children:[(0,C.jsx)(u,{"aria-label":`Filter by source`,className:`w-56`,children:(0,C.jsx)(s,{})}),(0,C.jsxs)(l,{children:[(0,C.jsx)(c,{value:`all`,children:`All parameters`}),(0,C.jsx)(c,{value:`user`,children:`Modified (user)`}),(0,C.jsx)(c,{value:`engine-default`,children:`Engine default`})]})]})]}),!n&&y.length>0&&(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 rounded-md border p-3`,children:[(0,C.jsxs)(`p`,{className:`text-sm`,children:[y.length,` parameter`,y.length===1?``:`s`,` edited`]}),(0,C.jsx)(p,{disabled:ee||b||r.isPending,onClick:()=>{S()},size:`sm`,children:r.isPending?`Saving…`:`Save Changes`}),(0,C.jsx)(p,{onClick:()=>a({}),size:`sm`,variant:`outline`,children:`Discard`}),ee&&(0,C.jsxs)(`p`,{className:`text-xs text-destructive`,children:[`At most `,20,` parameters can be saved at once. Each save is applied as a whole, so a larger edit is split by you rather than half-applied by us.`]}),b&&(0,C.jsx)(`p`,{className:`text-xs text-destructive`,children:`An edited parameter cannot be left blank.`})]}),r.error&&(0,C.jsx)(`p`,{className:`text-sm text-destructive`,children:r.error.message}),re.length>0?(0,C.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,C.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,C.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,C.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Value`}),(0,C.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Allowed`}),(0,C.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Source`}),(0,C.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Apply`}),(0,C.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,C.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,C.jsx)(`tbody`,{children:re.map(e=>{let t=e.ParameterName??``,r=i[t],a=w(e),o=!n&&e.IsModifiable,f=r?.value??e.ParameterValue??``,m=r?.applyMethod??E(e),h=g(e.ApplyType);return(0,C.jsxs)(`tr`,{className:`border-b align-top last:border-0`,children:[(0,C.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:[t,(0,C.jsx)(`span`,{className:`mt-0.5 block font-sans text-muted-foreground`,children:e.Description})]}),(0,C.jsx)(`td`,{className:`px-4 py-2`,children:(0,C.jsx)(D,{editable:o??!1,onChange:t=>te(e,{value:t}),options:a,parameter:e,value:f})}),(0,C.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs text-muted-foreground`,children:[e.AllowedValues??`—`,(0,C.jsxs)(`span`,{className:`mt-0.5 block font-sans`,children:[e.DataType,!e.IsModifiable&&` · fixed by the platform`]})]}),(0,C.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:e.Source}),(0,C.jsx)(`td`,{className:`px-4 py-2`,children:o&&r&&h.length>1?(0,C.jsxs)(d,{onValueChange:t=>te(e,{applyMethod:t??`pending-reboot`}),value:m,children:[(0,C.jsx)(u,{"aria-label":`Apply method of ${t}`,className:`w-44`,children:(0,C.jsx)(s,{})}),(0,C.jsx)(l,{children:h.map(e=>(0,C.jsx)(c,{value:e,children:e},e))})]}):(0,C.jsxs)(`span`,{className:`text-xs`,children:[m,e.ApplyType===`static`&&(0,C.jsx)(`span`,{className:`mt-0.5 block text-muted-foreground`,children:`static — adopted at the next reboot`})]})}),(0,C.jsx)(`td`,{className:`px-4 py-2 text-right`,children:r&&(0,C.jsx)(p,{onClick:()=>x(t),size:`sm`,variant:`ghost`,children:`Reset`})})]},t)})})]})}):(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:`No parameter matches this filter.`})]})}function k(e){let t=(0,ce.c)(106),{dbParameterGroupName:n}=e,r=a(),s;t[0]===n?s=t[1]:(s=ee(n),t[0]=n,t[1]=s);let{data:c}=i(s),l=c.DBParameterGroups?.[0],u;t[2]===n?u=t[3]:(u=h(n),t[2]=n,t[3]=u);let d=u,m=d?``:l?.DBParameterGroupArn??``,g;t[4]===n?g=t[5]:(g=y(n),t[4]=n,t[5]=g);let{data:_}=i(g),[v,b]=(0,le.useState)(!1);if(!l?.DBParameterGroupName){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(o,{to:`/rds/describe-db-parameter-groups`,children:`Back to parameter groups`}),(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:`DB parameter group not found.`})]}),t[6]=e):e=t[6],e}let w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U;if(t[7]!==n||t[8]!==l.DBParameterGroupFamily||t[9]!==l.Description||t[10]!==d||t[11]!==_.Parameters){let e=_.Parameters??[],r=e.filter(de).length;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,C.jsx)(o,{to:`/rds/describe-db-parameter-groups`,children:`Back to parameter groups`}),t[32]=L):L=t[32],P=`space-y-6`;let i;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>b(!0),t[33]=i):i=t[33];let a;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,C.jsx)(f,{className:`size-4`}),t[34]=a):a=t[34];let s;t[35]===d?s=t[36]:(s=(0,C.jsxs)(p,{disabled:d,onClick:i,size:`sm`,variant:`destructive`,children:[a,`Delete`]}),t[35]=d,t[36]=s),t[37]!==n||t[38]!==s?(F=(0,C.jsx)(te,{actions:s,subtitle:`DB Parameter Group`,title:n}),t[37]=n,t[38]=s,t[39]=F):F=t[39],t[40]===d?I=t[41]:(I=d&&(0,C.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`note`,children:[(0,C.jsx)(`p`,{className:`font-medium`,children:`This is a default parameter group`}),(0,C.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`The service owns it. It can be read and attached to an instance, but it cannot be modified, deleted or tagged. Create your own group of the same family to change a value.`})]}),t[40]=d,t[41]=I),O=ae,j=`parameters`;let c,u;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,C.jsx)(ne,{value:`parameters`,children:`Parameters`}),u=(0,C.jsx)(ne,{value:`details`,children:`Details`}),t[42]=c,t[43]=u):(c=t[42],u=t[43]);let m;t[44]===d?m=t[45]:(m=!d&&(0,C.jsx)(ne,{value:`tags`,children:`Tags`}),t[44]=d,t[45]=m),t[46]===m?M=t[47]:(M=(0,C.jsxs)(re,{children:[c,u,m]}),t[46]=m,t[47]=M),N=(0,C.jsx)(ie,{value:`parameters`,children:(0,C.jsx)(ue,{dbParameterGroupName:n,parameters:e,readOnly:d})}),D=ie,A=`details`,E=x,t[48]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,C.jsx)(x.Header,{children:`Details`}),t[48]=k):k=t[48],T=x.Content,t[49]===l.DBParameterGroupFamily?B=t[50]:(B=(0,C.jsx)(S,{label:`Family`,value:l.DBParameterGroupFamily}),t[49]=l.DBParameterGroupFamily,t[50]=B),t[51]===l.Description?V=t[52]:(V=(0,C.jsx)(S,{label:`Description`,value:l.Description}),t[51]=l.Description,t[52]=V);let h=d?`Default`:`Customer`;t[53]===h?H=t[54]:(H=(0,C.jsx)(S,{label:`Type`,value:h}),t[53]=h,t[54]=H);let g;t[55]===e?g=t[56]:(g=e.length.toString(),t[55]=e,t[56]=g),t[57]===g?U=t[58]:(U=(0,C.jsx)(S,{label:`Parameters`,value:g}),t[57]=g,t[58]=U),w=S,R=`Overridden`,z=r.toString(),t[7]=n,t[8]=l.DBParameterGroupFamily,t[9]=l.Description,t[10]=d,t[11]=_.Parameters,t[12]=w,t[13]=T,t[14]=E,t[15]=D,t[16]=O,t[17]=k,t[18]=A,t[19]=j,t[20]=M,t[21]=N,t[22]=P,t[23]=F,t[24]=I,t[25]=L,t[26]=R,t[27]=z,t[28]=B,t[29]=V,t[30]=H,t[31]=U}else w=t[12],T=t[13],E=t[14],D=t[15],O=t[16],k=t[17],A=t[18],j=t[19],M=t[20],N=t[21],P=t[22],F=t[23],I=t[24],L=t[25],R=t[26],z=t[27],B=t[28],V=t[29],H=t[30],U=t[31];let W;t[59]!==w||t[60]!==R||t[61]!==z?(W=(0,C.jsx)(w,{label:R,value:z}),t[59]=w,t[60]=R,t[61]=z,t[62]=W):W=t[62];let G;t[63]===l.DBParameterGroupArn?G=t[64]:(G=(0,C.jsx)(S,{label:`ARN`,value:l.DBParameterGroupArn}),t[63]=l.DBParameterGroupArn,t[64]=G);let K;t[65]!==T||t[66]!==W||t[67]!==G||t[68]!==B||t[69]!==V||t[70]!==H||t[71]!==U?(K=(0,C.jsxs)(T,{children:[B,V,H,U,W,G]}),t[65]=T,t[66]=W,t[67]=G,t[68]=B,t[69]=V,t[70]=H,t[71]=U,t[72]=K):K=t[72];let q;t[73]!==E||t[74]!==k||t[75]!==K?(q=(0,C.jsxs)(E,{children:[k,K]}),t[73]=E,t[74]=k,t[75]=K,t[76]=q):q=t[76];let J;t[77]!==D||t[78]!==A||t[79]!==q?(J=(0,C.jsx)(D,{value:A,children:q}),t[77]=D,t[78]=A,t[79]=q,t[80]=J):J=t[80];let Y;t[81]!==m||t[82]!==d?(Y=!d&&(0,C.jsx)(ie,{value:`tags`,children:(0,C.jsx)(oe,{arn:m})}),t[81]=m,t[82]=d,t[83]=Y):Y=t[83];let X;t[84]!==O||t[85]!==j||t[86]!==M||t[87]!==N||t[88]!==J||t[89]!==Y?(X=(0,C.jsxs)(O,{defaultValue:j,children:[M,N,J,Y]}),t[84]=O,t[85]=j,t[86]=M,t[87]=N,t[88]=J,t[89]=Y,t[90]=X):X=t[90];let Z;t[91]!==P||t[92]!==F||t[93]!==I||t[94]!==X?(Z=(0,C.jsxs)(`div`,{className:P,children:[F,I,X]}),t[91]=P,t[92]=F,t[93]=I,t[94]=X,t[95]=Z):Z=t[95];let Q;t[96]===r?Q=t[97]:(Q=async()=>await r({to:`/rds/describe-db-parameter-groups`}),t[96]=r,t[97]=Q);let $;t[98]!==n||t[99]!==v||t[100]!==Q?($=(0,C.jsx)(se,{dbParameterGroupName:n,onDeleted:Q,onOpenChange:b,open:v}),t[98]=n,t[99]=v,t[100]=Q,t[101]=$):$=t[101];let fe;return t[102]!==L||t[103]!==Z||t[104]!==$?(fe=(0,C.jsxs)(C.Fragment,{children:[L,Z,$]}),t[102]=L,t[103]=Z,t[104]=$,t[105]=fe):fe=t[105],fe}function de(e){return e.Source===`user`}function A(){let e=(0,ce.c)(2),{name:t}=b.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,C.jsx)(k,{dbParameterGroupName:n}),e[0]=n,e[1]=r),r}export{A as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./useNavigate.js";import{t as o}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{t as m}from"./input.js";import{b as h,s as g,t as _}from"./rds.js";import{u as ee}from"./rds2.js";import{f as v,u as te}from"./rds3.js";import{t as y}from"./_name.js";import{t as ne}from"./page-heading.js";import{n as re,t as b}from"./detail-row.js";import{i as ie,n as ae,r as oe,t as se}from"./tabs.js";import{t as ce}from"./rds-tags-tab.js";import{t as le}from"./delete-db-parameter-group-dialog.js";var ue=r(),de=e(n(),1),x=t();function S(e){let t=e.AllowedValues??``;if(e.DataType!==`boolean`&&e.DataType!==`enum`)return null;let n=t.split(`,`).filter(e=>e.length>0);return n.length===0?null:n.includes(e.ParameterValue??``)?n:null}function C(e){return e.DataType===`integer`||e.DataType===`real`}function w(e){return e.ApplyType===`static`?_:e.ApplyMethod??`pending-reboot`}function T(e){let t=(0,ue.c)(23),{parameter:n,value:r,options:i,editable:a,onChange:o}=e,c=n.ParameterName??``;if(!a){let e;return t[0]===r?e=t[1]:(e=(0,x.jsx)(`span`,{className:`font-mono text-xs`,children:r}),t[0]=r,t[1]=e),e}if(i){let e;t[2]===o?e=t[3]:(e=e=>o(e??``),t[2]=o,t[3]=e);let n=`Value of ${c}`,a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,x.jsx)(s,{}),t[4]=a):a=t[4];let f;t[5]===n?f=t[6]:(f=(0,x.jsx)(u,{"aria-label":n,className:`w-40`,children:a}),t[5]=n,t[6]=f);let p;t[7]===i?p=t[8]:(p=i.map(E),t[7]=i,t[8]=p);let m;t[9]===p?m=t[10]:(m=(0,x.jsx)(l,{children:p}),t[9]=p,t[10]=m);let h;return t[11]!==e||t[12]!==f||t[13]!==m||t[14]!==r?(h=(0,x.jsxs)(d,{onValueChange:e,value:r,children:[f,m]}),t[11]=e,t[12]=f,t[13]=m,t[14]=r,t[15]=h):h=t[15],h}let f=`Value of ${c}`,p;t[16]===o?p=t[17]:(p=e=>o(e.target.value),t[16]=o,t[17]=p);let h=C(n)?`number`:`text`,g;return t[18]!==f||t[19]!==p||t[20]!==h||t[21]!==r?(g=(0,x.jsx)(m,{"aria-label":f,className:`w-40`,onChange:p,type:h,value:r}),t[18]=f,t[19]=p,t[20]=h,t[21]=r,t[22]=g):g=t[22],g}function E(e){return(0,x.jsx)(c,{value:e,children:e},e)}function fe({dbParameterGroupName:e,parameters:t,readOnly:n}){let r=ee(),[i,a]=(0,de.useState)({}),[o,f]=(0,de.useState)(``),[h,_]=(0,de.useState)(`all`),v=Object.keys(i),te=v.length>20,y=v.some(e=>(i[e]?.value??``).trim()===``),ne=(e,t)=>{let n=e.ParameterName??``;a(r=>({...r,[n]:{value:e.ParameterValue??``,applyMethod:w(e),...r[n],...t}}))},re=e=>{a(t=>{let{[e]:n,...r}=t;return r})},b=async()=>{try{await r.mutateAsync({dbParameterGroupName:e,parameters:v.map(e=>({name:e,value:i[e]?.value??``,applyMethod:i[e]?.applyMethod??`pending-reboot`}))}),a({})}catch{}},ie=o.trim().toLowerCase(),ae=t.filter(e=>{let t=e.Source??``;return h===`user`&&t!==`user`||h===`engine-default`&&t===`user`?!1:(e.ParameterName??``).toLowerCase().includes(ie)});return(0,x.jsxs)(`div`,{className:`space-y-4`,children:[(0,x.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,x.jsxs)(`div`,{className:`grow`,children:[(0,x.jsx)(`label`,{className:`sr-only`,htmlFor:`parameter-filter`,children:`Filter parameters`}),(0,x.jsx)(m,{id:`parameter-filter`,onChange:e=>f(e.target.value),placeholder:`Filter by parameter name`,value:o})]}),(0,x.jsxs)(d,{onValueChange:e=>_(e??`all`),value:h,children:[(0,x.jsx)(u,{"aria-label":`Filter by source`,className:`w-56`,children:(0,x.jsx)(s,{})}),(0,x.jsxs)(l,{children:[(0,x.jsx)(c,{value:`all`,children:`All parameters`}),(0,x.jsx)(c,{value:`user`,children:`Modified (user)`}),(0,x.jsx)(c,{value:`engine-default`,children:`Engine default`})]})]})]}),!n&&v.length>0&&(0,x.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 rounded-md border p-3`,children:[(0,x.jsxs)(`p`,{className:`text-sm`,children:[v.length,` parameter`,v.length===1?``:`s`,` edited`]}),(0,x.jsx)(p,{disabled:te||y||r.isPending,onClick:()=>{b()},size:`sm`,children:r.isPending?`Saving…`:`Save Changes`}),(0,x.jsx)(p,{onClick:()=>a({}),size:`sm`,variant:`outline`,children:`Discard`}),te&&(0,x.jsxs)(`p`,{className:`text-xs text-destructive`,children:[`At most `,20,` parameters can be saved at once. Each save is applied as a whole, so a larger edit is split by you rather than half-applied by us.`]}),y&&(0,x.jsx)(`p`,{className:`text-xs text-destructive`,children:`An edited parameter cannot be left blank.`})]}),r.error&&(0,x.jsx)(`p`,{className:`text-sm text-destructive`,children:r.error.message}),ae.length>0?(0,x.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,x.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,x.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Value`}),(0,x.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Allowed`}),(0,x.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Source`}),(0,x.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Apply`}),(0,x.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,x.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,x.jsx)(`tbody`,{children:ae.map(e=>{let t=e.ParameterName??``,r=i[t],a=S(e),o=!n&&e.IsModifiable,f=r?.value??e.ParameterValue??``,m=r?.applyMethod??w(e),h=g(e.ApplyType);return(0,x.jsxs)(`tr`,{className:`border-b align-top last:border-0`,children:[(0,x.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:[t,(0,x.jsx)(`span`,{className:`mt-0.5 block font-sans text-muted-foreground`,children:e.Description})]}),(0,x.jsx)(`td`,{className:`px-4 py-2`,children:(0,x.jsx)(T,{editable:o??!1,onChange:t=>ne(e,{value:t}),options:a,parameter:e,value:f})}),(0,x.jsxs)(`td`,{className:`px-4 py-2 font-mono text-xs text-muted-foreground`,children:[e.AllowedValues??`—`,(0,x.jsxs)(`span`,{className:`mt-0.5 block font-sans`,children:[e.DataType,!e.IsModifiable&&` · fixed by the platform`]})]}),(0,x.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:e.Source}),(0,x.jsx)(`td`,{className:`px-4 py-2`,children:o&&r&&h.length>1?(0,x.jsxs)(d,{onValueChange:t=>ne(e,{applyMethod:t??`pending-reboot`}),value:m,children:[(0,x.jsx)(u,{"aria-label":`Apply method of ${t}`,className:`w-44`,children:(0,x.jsx)(s,{})}),(0,x.jsx)(l,{children:h.map(e=>(0,x.jsx)(c,{value:e,children:e},e))})]}):(0,x.jsxs)(`span`,{className:`text-xs`,children:[m,e.ApplyType===`static`&&(0,x.jsx)(`span`,{className:`mt-0.5 block text-muted-foreground`,children:`static — adopted at the next reboot`})]})}),(0,x.jsx)(`td`,{className:`px-4 py-2 text-right`,children:r&&(0,x.jsx)(p,{onClick:()=>re(t),size:`sm`,variant:`ghost`,children:`Reset`})})]},t)})})]})}):(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`No parameter matches this filter.`})]})}function D(e){let t=(0,ue.c)(112),{dbParameterGroupName:n}=e,r=a(),s;t[0]===n?s=t[1]:(s=te(n),t[0]=n,t[1]=s);let{data:c}=i(s),l=c.DBParameterGroups?.[0],u;t[2]===n?u=t[3]:(u=h(n),t[2]=n,t[3]=u);let d=u,m=d?``:l?.DBParameterGroupArn??``,g;t[4]===n?g=t[5]:(g=v(n),t[4]=n,t[5]=g);let{data:_}=i(g),[ee,y]=(0,de.useState)(!1);if(!l?.DBParameterGroupName){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o,{to:`/rds/describe-db-parameter-groups`,children:`Back to parameter groups`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`DB parameter group not found.`})]}),t[6]=e):e=t[6],e}let S;t[7]===_.Parameters?S=t[8]:(S=_.Parameters??[],t[7]=_.Parameters,t[8]=S);let C=S,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,B,V,H,U;if(t[9]!==n||t[10]!==l.DBParameterGroupFamily||t[11]!==l.Description||t[12]!==d||t[13]!==C){let e=C.filter(pe).length;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,x.jsx)(o,{to:`/rds/describe-db-parameter-groups`,children:`Back to parameter groups`}),t[34]=R):R=t[34],F=`space-y-6`;let r;t[35]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>y(!0),t[35]=r):r=t[35];let i;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,x.jsx)(f,{className:`size-4`}),t[36]=i):i=t[36];let a;t[37]===d?a=t[38]:(a=(0,x.jsxs)(p,{disabled:d,onClick:r,size:`sm`,variant:`destructive`,children:[i,`Delete`]}),t[37]=d,t[38]=a),t[39]!==n||t[40]!==a?(I=(0,x.jsx)(ne,{actions:a,subtitle:`DB Parameter Group`,title:n}),t[39]=n,t[40]=a,t[41]=I):I=t[41],t[42]===d?L=t[43]:(L=d&&(0,x.jsxs)(`div`,{className:`rounded-md border border-tactical-amber/40 bg-tactical-amber/5 p-4 text-sm`,role:`note`,children:[(0,x.jsx)(`p`,{className:`font-medium`,children:`This is a default parameter group`}),(0,x.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`The service owns it. It can be read and attached to an instance, but it cannot be modified, deleted or tagged. Create your own group of the same family to change a value.`})]}),t[42]=d,t[43]=L),O=se,M=`parameters`;let s,c;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,x.jsx)(ie,{value:`parameters`,children:`Parameters`}),c=(0,x.jsx)(ie,{value:`details`,children:`Details`}),t[44]=s,t[45]=c):(s=t[44],c=t[45]);let u;t[46]===d?u=t[47]:(u=!d&&(0,x.jsx)(ie,{value:`tags`,children:`Tags`}),t[46]=d,t[47]=u),t[48]===u?N=t[49]:(N=(0,x.jsxs)(ae,{children:[s,c,u]}),t[48]=u,t[49]=N),t[50]!==n||t[51]!==d||t[52]!==C?(P=(0,x.jsx)(oe,{value:`parameters`,children:(0,x.jsx)(fe,{dbParameterGroupName:n,parameters:C,readOnly:d})}),t[50]=n,t[51]=d,t[52]=C,t[53]=P):P=t[53],D=oe,j=`details`,E=re,t[54]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,x.jsx)(re.Header,{children:`Details`}),t[54]=A):A=t[54],T=re.Content,t[55]===l.DBParameterGroupFamily?V=t[56]:(V=(0,x.jsx)(b,{label:`Family`,value:l.DBParameterGroupFamily}),t[55]=l.DBParameterGroupFamily,t[56]=V),t[57]===l.Description?H=t[58]:(H=(0,x.jsx)(b,{label:`Description`,value:l.Description}),t[57]=l.Description,t[58]=H);let m=d?`Default`:`Customer`;t[59]===m?U=t[60]:(U=(0,x.jsx)(b,{label:`Type`,value:m}),t[59]=m,t[60]=U);let h;t[61]===C.length?h=t[62]:(h=C.length.toString(),t[61]=C.length,t[62]=h),t[63]===h?k=t[64]:(k=(0,x.jsx)(b,{label:`Parameters`,value:h}),t[63]=h,t[64]=k),w=b,z=`Overridden`,B=e.toString(),t[9]=n,t[10]=l.DBParameterGroupFamily,t[11]=l.Description,t[12]=d,t[13]=C,t[14]=w,t[15]=T,t[16]=E,t[17]=D,t[18]=O,t[19]=k,t[20]=A,t[21]=j,t[22]=M,t[23]=N,t[24]=P,t[25]=F,t[26]=I,t[27]=L,t[28]=R,t[29]=z,t[30]=B,t[31]=V,t[32]=H,t[33]=U}else w=t[14],T=t[15],E=t[16],D=t[17],O=t[18],k=t[19],A=t[20],j=t[21],M=t[22],N=t[23],P=t[24],F=t[25],I=t[26],L=t[27],R=t[28],z=t[29],B=t[30],V=t[31],H=t[32],U=t[33];let W;t[65]!==w||t[66]!==z||t[67]!==B?(W=(0,x.jsx)(w,{label:z,value:B}),t[65]=w,t[66]=z,t[67]=B,t[68]=W):W=t[68];let G;t[69]===l.DBParameterGroupArn?G=t[70]:(G=(0,x.jsx)(b,{label:`ARN`,value:l.DBParameterGroupArn}),t[69]=l.DBParameterGroupArn,t[70]=G);let K;t[71]!==T||t[72]!==k||t[73]!==W||t[74]!==G||t[75]!==V||t[76]!==H||t[77]!==U?(K=(0,x.jsxs)(T,{children:[V,H,U,k,W,G]}),t[71]=T,t[72]=k,t[73]=W,t[74]=G,t[75]=V,t[76]=H,t[77]=U,t[78]=K):K=t[78];let q;t[79]!==E||t[80]!==A||t[81]!==K?(q=(0,x.jsxs)(E,{children:[A,K]}),t[79]=E,t[80]=A,t[81]=K,t[82]=q):q=t[82];let J;t[83]!==D||t[84]!==j||t[85]!==q?(J=(0,x.jsx)(D,{value:j,children:q}),t[83]=D,t[84]=j,t[85]=q,t[86]=J):J=t[86];let Y;t[87]!==m||t[88]!==d?(Y=!d&&(0,x.jsx)(oe,{value:`tags`,children:(0,x.jsx)(ce,{arn:m})}),t[87]=m,t[88]=d,t[89]=Y):Y=t[89];let X;t[90]!==O||t[91]!==M||t[92]!==N||t[93]!==P||t[94]!==J||t[95]!==Y?(X=(0,x.jsxs)(O,{defaultValue:M,children:[N,P,J,Y]}),t[90]=O,t[91]=M,t[92]=N,t[93]=P,t[94]=J,t[95]=Y,t[96]=X):X=t[96];let Z;t[97]!==F||t[98]!==I||t[99]!==L||t[100]!==X?(Z=(0,x.jsxs)(`div`,{className:F,children:[I,L,X]}),t[97]=F,t[98]=I,t[99]=L,t[100]=X,t[101]=Z):Z=t[101];let Q;t[102]===r?Q=t[103]:(Q=async()=>await r({to:`/rds/describe-db-parameter-groups`}),t[102]=r,t[103]=Q);let $;t[104]!==n||t[105]!==ee||t[106]!==Q?($=(0,x.jsx)(le,{dbParameterGroupName:n,onDeleted:Q,onOpenChange:y,open:ee}),t[104]=n,t[105]=ee,t[106]=Q,t[107]=$):$=t[107];let me;return t[108]!==R||t[109]!==Z||t[110]!==$?(me=(0,x.jsxs)(x.Fragment,{children:[R,Z,$]}),t[108]=R,t[109]=Z,t[110]=$,t[111]=me):me=t[111],me}function pe(e){return e.Source===`user`}function O(){let e=(0,ue.c)(2),{name:t}=y.useParams(),n=decodeURIComponent(t),r;return e[0]===n?r=e[1]:(r=(0,x.jsx)(D,{dbParameterGroupName:n}),e[0]=n,e[1]=r),r}export{O as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/admin-context.js b/spinifex/services/spinifexui/frontend/dist/assets/admin-context.js index 83c777b86..239726a4a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/admin-context.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/admin-context.js @@ -1 +1 @@ -import{a as e,n as t,r as n}from"./compiler-runtime.js";import{a as r}from"./cluster-config.js";import{a as i,i as a,n as o,o as s,r as c}from"./sts.js";import{n as l}from"./signed-fetch.js";var u=class extends i(c,a,`GetCallerIdentity`,s){},d=e(n(),1),f=t(),p=`000000000001`;function m(e){let t=e?.indexOf(`:user/`)??-1;return t===-1||e===void 0?null:e.slice(t+6)||null}var h=(0,d.createContext)(void 0);function g({children:e}){let[t,n]=(0,d.useState)({isAdmin:!1,accountId:null,userName:null,version:null,license:null,loading:!0});return(0,d.useEffect)(()=>{async function e(){let e=r();if(!e){n(e=>({...e,loading:!1}));return}try{let t=await o().send(new u({})),r=t.Account??null,i=r===p,a=null;if(i)try{a=await l({action:`GetVersion`,credentials:e})}catch{}n({isAdmin:i,accountId:r,userName:m(t.Arn),version:a,license:a?.license??null,loading:!1})}catch{n(e=>({...e,loading:!1}))}}e()},[]),(0,f.jsx)(h,{value:t,children:e})}function _(){let e=(0,d.useContext)(h);if(e===void 0)throw Error(`useAdmin must be used within an AdminProvider`);return e}export{_ as n,g as t}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{a as i}from"./cluster-config.js";import{a,i as o,n as s,o as c,r as l}from"./sts.js";import{n as u}from"./signed-fetch.js";var d=class extends a(l,o,`GetCallerIdentity`,c){},f=r(),p=e(n(),1),m=t(),h=`000000000001`;function g(e){let t=e?.indexOf(`:user/`)??-1;return t===-1||e===void 0?null:e.slice(t+6)||null}var _=(0,p.createContext)(void 0);function v(e){let t=(0,f.c)(6),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={isAdmin:!1,accountId:null,userName:null,version:null,license:null,loading:!0},t[0]=r):r=t[0];let[a,o]=(0,p.useState)(r),c,l;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{(async function(){let e=i();if(!e){o(b);return}try{let t=await s().send(new d({})),n=t.Account??null,r=n===h,i=null;if(r)try{i=await u({action:`GetVersion`,credentials:e})}catch{}o({isAdmin:r,accountId:n,userName:g(t.Arn),version:i,license:i?.license??null,loading:!1})}catch{o(y)}})()},l=[],t[1]=c,t[2]=l):(c=t[1],l=t[2]),(0,p.useEffect)(c,l);let v;return t[3]!==n||t[4]!==a?(v=(0,m.jsx)(_,{value:a,children:n}),t[3]=n,t[4]=a,t[5]=v):v=t[5],v}function y(e){return{...e,loading:!1}}function b(e){return{...e,loading:!1}}function x(){let e=(0,p.useContext)(_);if(e===void 0)throw Error(`useAdmin must be used within an AdminProvider`);return e}export{x as n,v as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js b/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js index 35753c87c..216e1cf75 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-cluster.js @@ -1 +1 @@ -import{a as e,n as t,r as n}from"./compiler-runtime.js";import{n as r}from"./QueryClientProvider.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./useNavigate.js";import{tn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{c,i as l,n as u,s as d,t as f}from"./select.js";import{t as p}from"./button.js";import{t as m}from"./input.js";import{M as h,O as ee,o as g}from"./ec2.js";import{a as _,d as v,g as te,o as y,t as b}from"./eks.js";import{i as x,u as S}from"./iam.js";import{y as C}from"./iam2.js";import{a as w,i as ne,n as T,t as re}from"./zod.js";import{t as E}from"./error-banner.js";import{t as D}from"./form-actions.js";import{t as O}from"./page-heading.js";import{a as k,r as A,t as j}from"./field.js";import{a as M,i as N,l as P,n as F,o as I,r as L,s as R,t as z}from"./alert-dialog.js";import{n as ie}from"./system-managed.js";import{t as B}from"./system-image-required.js";import{t as V}from"./policy-document-viewer.js";var H=e(n(),1),U=t();function W(e){return`${e.trim()||`cluster`}-eks-cluster-role`}function G({clusterName:e,open:t,onOpenChange:n,onCreated:r}){let i=S(),a=x(),[o,s]=(0,H.useState)(W(e)),[c,l]=(0,H.useState)(null),[u,d]=(0,H.useState)(t);t!==u&&(d(t),t&&(s(W(e)),l(null)));let f=i.isPending||a.isPending;function p(e){e||l(null),n(e)}async function h(){l(null);let e=o.trim();try{let t=await i.mutateAsync({roleName:e,assumeRolePolicyDocument:_});await a.mutateAsync({roleName:e,policyArn:b});let o=t.Role?.Arn;if(!o){l(`Role was created but no ARN was returned.`);return}r(o),n(!1)}catch(e){l(e instanceof Error?e.message:`Failed to create role.`)}}return(0,U.jsx)(z,{onOpenChange:p,open:t,children:(0,U.jsxs)(N,{className:`max-w-lg sm:max-w-lg`,children:[(0,U.jsxs)(R,{children:[(0,U.jsx)(P,{children:`Create cluster IAM role`}),(0,U.jsx)(M,{children:`Creates an IAM role trusted by the EKS control plane and attaches the AmazonEKSClusterPolicy managed policy.`})]}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:(0,U.jsx)(`label`,{htmlFor:`eks-role-name`,children:`Role name`})}),(0,U.jsx)(m,{id:`eks-role-name`,onChange:e=>s(e.target.value),placeholder:`my-cluster-eks-cluster-role`,value:o})]}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:`Trust policy (JSON)`}),(0,U.jsx)(V,{document:_})]}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:`Attached managed policy`}),(0,U.jsx)(`code`,{className:`block rounded-md border bg-muted p-2 font-mono text-sm break-all`,children:b}),(0,U.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Grants the EKS control plane the permissions it needs to manage the cluster.`})]}),c&&(0,U.jsx)(`p`,{className:`text-sm text-destructive`,children:c}),(0,U.jsxs)(I,{children:[(0,U.jsx)(L,{children:`Cancel`}),(0,U.jsx)(F,{disabled:f||!o.trim(),onClick:h,children:f?`Creating…`:`Create role`})]})]})})}function K(e){let t=o(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function q(e){let t=o(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function J(){let e=a(),t=r(),[n,o]=(0,H.useState)(!1),[_,b]=(0,H.useState)(!1),{data:x}=i(h),{data:S}=i(ee),{data:M}=i(C),{data:N}=i(g),P=te(),F=(N.Images??[]).some(ie),I=async()=>{o(!0);try{await t.invalidateQueries({queryKey:g.queryKey})}finally{o(!1)}},L=x.Vpcs??[],R=S.Subnets??[],z=M.Roles??[],{control:V,formState:{errors:W,isSubmitting:J},handleSubmit:Y,register:ae,setValue:X}=ne({resolver:re(v),defaultValues:{name:``,version:y[0],roleArn:``,vpcId:``,subnetIds:[],bootstrapClusterCreatorAdminPermissions:!0,endpointPublicAccess:!0,endpointPrivateAccess:!1,publicAccessCidrs:[`0.0.0.0/0`]}}),oe=w({control:V,name:`vpcId`}),Z=w({control:V,name:`subnetIds`}),se=new Set(Z),ce=w({control:V,name:`endpointPublicAccess`}),Q=w({control:V,name:`publicAccessCidrs`}),$=R.filter(e=>e.VpcId===oe),le=(e=``)=>{X(`vpcId`,e??``,{shouldValidate:!0}),X(`subnetIds`,[])},ue=e=>{let t=Z.includes(e)?Z.filter(t=>t!==e):[...Z,e];X(`subnetIds`,t,{shouldValidate:!0})},de=(e,t)=>{let n=[...Q];n[e]=t,X(`publicAccessCidrs`,n,{shouldValidate:!0})},fe=()=>X(`publicAccessCidrs`,[...Q,``],{shouldValidate:!0}),pe=e=>X(`publicAccessCidrs`,Q.filter((t,n)=>n!==e),{shouldValidate:!0}),me=w({control:V,name:`name`}),he=async e=>{await t.invalidateQueries({queryKey:C.queryKey}),X(`roleArn`,e,{shouldValidate:!0})};return F?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(s,{to:`/eks/list-clusters`,children:`Clusters`}),(0,U.jsx)(O,{subtitle:`EKS`,title:`Create Cluster`}),P.error&&(0,U.jsx)(E,{error:P.error,msg:`Failed to create cluster`}),(0,U.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:Y(async t=>{await P.mutateAsync(t),await e({to:`/eks/list-clusters/$clusterName`,params:{clusterName:t.name}})}),children:[(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:(0,U.jsx)(`label`,{htmlFor:`cluster-name`,children:`Name`})}),(0,U.jsx)(m,{"aria-invalid":!!W.name,id:`cluster-name`,placeholder:`my-cluster`,...ae(`name`)}),(0,U.jsx)(A,{errors:[W.name]})]}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:(0,U.jsx)(`label`,{htmlFor:`cluster-version`,children:`Kubernetes version`})}),(0,U.jsx)(T,{control:V,name:`version`,render:({field:e})=>(0,U.jsxs)(f,{onValueChange:e.onChange,value:e.value,children:[(0,U.jsx)(d,{className:`w-full`,id:`cluster-version`,children:(0,U.jsx)(c,{placeholder:`Select version`})}),(0,U.jsx)(u,{children:y.map(e=>(0,U.jsx)(l,{value:e,children:e},e))})]})}),(0,U.jsx)(A,{errors:[W.version]})]}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:(0,U.jsx)(`label`,{htmlFor:`cluster-role`,children:`Cluster IAM role`})}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(T,{control:V,name:`roleArn`,render:({field:e})=>(0,U.jsxs)(f,{onValueChange:e.onChange,value:e.value,children:[(0,U.jsx)(d,{"aria-invalid":!!W.roleArn,className:`w-full`,id:`cluster-role`,children:(0,U.jsx)(c,{placeholder:`Select role`})}),(0,U.jsx)(u,{children:z.map(e=>(0,U.jsx)(l,{value:e.Arn??``,children:e.RoleName},e.Arn))})]})}),(0,U.jsx)(p,{onClick:()=>b(!0),type:`button`,variant:`outline`,children:`Create role`})]}),(0,U.jsx)(A,{errors:[W.roleArn]})]}),(0,U.jsx)(G,{clusterName:me,onCreated:he,onOpenChange:b,open:_}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:(0,U.jsx)(`label`,{htmlFor:`cluster-vpc`,children:`VPC`})}),(0,U.jsx)(T,{control:V,name:`vpcId`,render:({field:e})=>(0,U.jsxs)(f,{onValueChange:e=>le(e),value:e.value,children:[(0,U.jsx)(d,{"aria-invalid":!!W.vpcId,className:`w-full`,id:`cluster-vpc`,children:(0,U.jsx)(c,{placeholder:`Select VPC`})}),(0,U.jsx)(u,{children:L.map(e=>(0,U.jsx)(l,{value:e.VpcId??``,children:K(e)},e.VpcId))})]})}),(0,U.jsx)(A,{errors:[W.vpcId]})]}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:`Subnets (select at least 1)`}),$.length===0?(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,U.jsx)(`div`,{className:`space-y-1`,children:$.map(e=>(0,U.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,U.jsx)(`input`,{"aria-label":`Subnet ${q(e)}`,checked:se.has(e.SubnetId??``),onChange:()=>ue(e.SubnetId??``),type:`checkbox`}),(0,U.jsx)(`span`,{className:`font-mono`,children:q(e)})]},e.SubnetId))}),(0,U.jsx)(A,{errors:[W.subnetIds]})]}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:`Endpoint access`}),(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Public access exposes the API server on an internet-facing endpoint; private access keeps it reachable only from within the VPC. At least one must be enabled.`}),(0,U.jsx)(T,{control:V,name:`endpointPublicAccess`,render:({field:e})=>(0,U.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,U.jsx)(`input`,{"aria-label":`Enable public access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Public`]})}),(0,U.jsx)(T,{control:V,name:`endpointPrivateAccess`,render:({field:e})=>(0,U.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,U.jsx)(`input`,{"aria-label":`Enable private access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Private`]})}),(0,U.jsx)(A,{errors:[W.endpointPublicAccess]}),ce&&(0,U.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Public access source ranges (CIDR). Defaults to`,` `,(0,U.jsx)(`span`,{className:`font-mono`,children:`0.0.0.0/0`}),`.`]}),Q.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(m,{"aria-label":`Public access CIDR ${t+1}`,className:`font-mono`,onChange:e=>de(t,e.target.value),placeholder:`203.0.113.0/24`,value:e}),(0,U.jsx)(p,{onClick:()=>pe(t),size:`sm`,type:`button`,variant:`ghost`,children:`Remove`})]},t)),(0,U.jsx)(p,{onClick:fe,size:`sm`,type:`button`,variant:`outline`,children:`Add CIDR`}),(0,U.jsx)(A,{errors:[W.publicAccessCidrs]})]})]}),(0,U.jsxs)(j,{children:[(0,U.jsx)(k,{children:`Access`}),(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Authentication mode is `,(0,U.jsx)(`span`,{className:`font-mono`,children:`API`}),` (IAM access entries). The legacy aws-auth ConfigMap is not supported.`]}),(0,U.jsx)(T,{control:V,name:`bootstrapClusterCreatorAdminPermissions`,render:({field:e})=>(0,U.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,U.jsx)(`input`,{"aria-label":`Grant the cluster creator admin permissions`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Grant the cluster creator admin permissions`]})})]}),(0,U.jsx)(D,{isPending:P.isPending,isSubmitting:J,onCancel:async()=>await e({to:`/eks/list-clusters`}),pendingLabel:`Creating…`,submitLabel:`Create Cluster`})]})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(s,{to:`/eks/list-clusters`,children:`Clusters`}),(0,U.jsx)(O,{subtitle:`EKS`,title:`Create Cluster`}),(0,U.jsx)(B,{description:`EKS clusters boot a Spinifex-managed node image (K3s) that is not shipped with the platform. Import it before creating a cluster.`,importCommand:`spx admin images import --name spinifex-eks-node`,isRechecking:n,onRecheck:I,title:`EKS system image not found`})]})}var Y=J;export{Y as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{t as a}from"./useSuspenseQuery.js";import{t as o}from"./useNavigate.js";import{tn as s}from"./cluster-config.js";import{t as c}from"./back-link.js";import{c as l,i as u,n as d,s as f,t as p}from"./select.js";import{t as m}from"./button.js";import{t as h}from"./input.js";import{M as g,O as _,o as v}from"./ec2.js";import{a as y,d as b,g as x,o as S,t as C}from"./eks.js";import{i as ee,u as te}from"./iam.js";import{y as w}from"./iam2.js";import{a as T,i as E,n as D,t as O}from"./zod.js";import{t as k}from"./error-banner.js";import{t as A}from"./form-actions.js";import{t as j}from"./page-heading.js";import{a as M,r as N,t as P}from"./field.js";import{a as F,i as I,l as ne,n as L,o as R,r as z,s as B,t as V}from"./alert-dialog.js";import{n as H}from"./system-managed.js";import{t as U}from"./system-image-required.js";import{t as W}from"./policy-document-viewer.js";var G=r(),K=e(n(),1),q=t();function J(e){return`${e.trim()||`cluster`}-eks-cluster-role`}function Y(e){let t=(0,G.c)(35),{clusterName:n,open:r,onOpenChange:i,onCreated:a}=e,o=te(),s=ee(),c;t[0]===n?c=t[1]:(c=J(n),t[0]=n,t[1]=c);let[l,u]=(0,K.useState)(c),[d,f]=(0,K.useState)(null),[p,m]=(0,K.useState)(r);r!==p&&(m(r),r&&(u(J(n)),f(null)));let g=o.isPending||s.isPending,_;t[2]===i?_=t[3]:(_=function(e){e||f(null),i(e)},t[2]=i,t[3]=_);let v=_,b;t[4]!==s||t[5]!==o||t[6]!==a||t[7]!==i||t[8]!==l?(b=async function(){f(null);let e=l.trim();try{let t=await o.mutateAsync({roleName:e,assumeRolePolicyDocument:y});await s.mutateAsync({roleName:e,policyArn:C});let n=t.Role?.Arn;if(!n){f(`Role was created but no ARN was returned.`);return}a(n),i(!1)}catch(e){let t=e;f(t instanceof Error?t.message:`Failed to create role.`)}},t[4]=s,t[5]=o,t[6]=a,t[7]=i,t[8]=l,t[9]=b):b=t[9];let x=b,S;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,q.jsxs)(B,{children:[(0,q.jsx)(ne,{children:`Create cluster IAM role`}),(0,q.jsx)(F,{children:`Creates an IAM role trusted by the EKS control plane and attaches the AmazonEKSClusterPolicy managed policy.`})]}),t[10]=S):S=t[10];let w;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,q.jsx)(M,{children:(0,q.jsx)(`label`,{htmlFor:`eks-role-name`,children:`Role name`})}),t[11]=w):w=t[11];let T;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(T=e=>u(e.target.value),t[12]=T):T=t[12];let E;t[13]===l?E=t[14]:(E=(0,q.jsxs)(P,{children:[w,(0,q.jsx)(h,{id:`eks-role-name`,onChange:T,placeholder:`my-cluster-eks-cluster-role`,value:l})]}),t[13]=l,t[14]=E);let D;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:`Trust policy (JSON)`}),(0,q.jsx)(W,{document:y})]}),t[15]=D):D=t[15];let O;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:`Attached managed policy`}),(0,q.jsx)(`code`,{className:`block rounded-md border bg-muted p-2 font-mono text-sm break-all`,children:C}),(0,q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Grants the EKS control plane the permissions it needs to manage the cluster.`})]}),t[16]=O):O=t[16];let k;t[17]===d?k=t[18]:(k=d&&(0,q.jsx)(`p`,{className:`text-sm text-destructive`,children:d}),t[17]=d,t[18]=k);let A;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,q.jsx)(z,{children:`Cancel`}),t[19]=A):A=t[19];let j;t[20]!==g||t[21]!==l?(j=g||!l.trim(),t[20]=g,t[21]=l,t[22]=j):j=t[22];let N=g?`Creating…`:`Create role`,H;t[23]!==x||t[24]!==j||t[25]!==N?(H=(0,q.jsxs)(R,{children:[A,(0,q.jsx)(L,{disabled:j,onClick:x,children:N})]}),t[23]=x,t[24]=j,t[25]=N,t[26]=H):H=t[26];let U;t[27]!==k||t[28]!==H||t[29]!==E?(U=(0,q.jsxs)(I,{className:`max-w-lg sm:max-w-lg`,children:[S,E,D,O,k,H]}),t[27]=k,t[28]=H,t[29]=E,t[30]=U):U=t[30];let Y;return t[31]!==v||t[32]!==r||t[33]!==U?(Y=(0,q.jsx)(V,{onOpenChange:v,open:r,children:U}),t[31]=v,t[32]=r,t[33]=U,t[34]=Y):Y=t[34],Y}function re(e){let t=s(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function X(e){let t=s(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function ie(){let e=o(),t=i(),[n,r]=(0,K.useState)(!1),[s,y]=(0,K.useState)(!1),{data:C}=a(g),{data:ee}=a(_),{data:te}=a(w),{data:F}=a(v),I=x(),ne=(F.Images??[]).some(H),L=async()=>{r(!0);try{await t.invalidateQueries({queryKey:v.queryKey})}finally{r(!1)}},R=C.Vpcs??[],z=ee.Subnets??[],B=te.Roles??[],{control:V,formState:{errors:W,isSubmitting:G},handleSubmit:J,register:ie,setValue:Z}=E({resolver:O(b),defaultValues:{name:``,version:S[0],roleArn:``,vpcId:``,subnetIds:[],bootstrapClusterCreatorAdminPermissions:!0,endpointPublicAccess:!0,endpointPrivateAccess:!1,publicAccessCidrs:[`0.0.0.0/0`]}}),ae=T({control:V,name:`vpcId`}),Q=T({control:V,name:`subnetIds`}),oe=new Set(Q),se=T({control:V,name:`endpointPublicAccess`}),$=T({control:V,name:`publicAccessCidrs`}),ce=z.filter(e=>e.VpcId===ae),le=(e=``)=>{Z(`vpcId`,e??``,{shouldValidate:!0}),Z(`subnetIds`,[])},ue=e=>{let t=Q.includes(e)?Q.filter(t=>t!==e):[...Q,e];Z(`subnetIds`,t,{shouldValidate:!0})},de=(e,t)=>{let n=[...$];n[e]=t,Z(`publicAccessCidrs`,n,{shouldValidate:!0})},fe=()=>Z(`publicAccessCidrs`,[...$,``],{shouldValidate:!0}),pe=e=>Z(`publicAccessCidrs`,$.filter((t,n)=>n!==e),{shouldValidate:!0}),me=T({control:V,name:`name`}),he=async e=>{await t.invalidateQueries({queryKey:w.queryKey}),Z(`roleArn`,e,{shouldValidate:!0})};return ne?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(c,{to:`/eks/list-clusters`,children:`Clusters`}),(0,q.jsx)(j,{subtitle:`EKS`,title:`Create Cluster`}),I.error&&(0,q.jsx)(k,{error:I.error,msg:`Failed to create cluster`}),(0,q.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:J(async t=>{await I.mutateAsync(t),await e({to:`/eks/list-clusters/$clusterName`,params:{clusterName:t.name}})}),children:[(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-name`,children:`Name`})}),(0,q.jsx)(h,{"aria-invalid":!!W.name,id:`cluster-name`,placeholder:`my-cluster`,...ie(`name`)}),(0,q.jsx)(N,{errors:[W.name]})]}),(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-version`,children:`Kubernetes version`})}),(0,q.jsx)(D,{control:V,name:`version`,render:({field:e})=>(0,q.jsxs)(p,{onValueChange:e.onChange,value:e.value,children:[(0,q.jsx)(f,{className:`w-full`,id:`cluster-version`,children:(0,q.jsx)(l,{placeholder:`Select version`})}),(0,q.jsx)(d,{children:S.map(e=>(0,q.jsx)(u,{value:e,children:e},e))})]})}),(0,q.jsx)(N,{errors:[W.version]})]}),(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-role`,children:`Cluster IAM role`})}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(D,{control:V,name:`roleArn`,render:({field:e})=>(0,q.jsxs)(p,{onValueChange:e.onChange,value:e.value,children:[(0,q.jsx)(f,{"aria-invalid":!!W.roleArn,className:`w-full`,id:`cluster-role`,children:(0,q.jsx)(l,{placeholder:`Select role`})}),(0,q.jsx)(d,{children:B.map(e=>(0,q.jsx)(u,{value:e.Arn??``,children:e.RoleName},e.Arn))})]})}),(0,q.jsx)(m,{onClick:()=>y(!0),type:`button`,variant:`outline`,children:`Create role`})]}),(0,q.jsx)(N,{errors:[W.roleArn]})]}),(0,q.jsx)(Y,{clusterName:me,onCreated:he,onOpenChange:y,open:s}),(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:(0,q.jsx)(`label`,{htmlFor:`cluster-vpc`,children:`VPC`})}),(0,q.jsx)(D,{control:V,name:`vpcId`,render:({field:e})=>(0,q.jsxs)(p,{onValueChange:e=>le(e),value:e.value,children:[(0,q.jsx)(f,{"aria-invalid":!!W.vpcId,className:`w-full`,id:`cluster-vpc`,children:(0,q.jsx)(l,{placeholder:`Select VPC`})}),(0,q.jsx)(d,{children:R.map(e=>(0,q.jsx)(u,{value:e.VpcId??``,children:re(e)},e.VpcId))})]})}),(0,q.jsx)(N,{errors:[W.vpcId]})]}),(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:`Subnets (select at least 1)`}),ce.length===0?(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,q.jsx)(`div`,{className:`space-y-1`,children:ce.map(e=>(0,q.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Subnet ${X(e)}`,checked:oe.has(e.SubnetId??``),onChange:()=>ue(e.SubnetId??``),type:`checkbox`}),(0,q.jsx)(`span`,{className:`font-mono`,children:X(e)})]},e.SubnetId))}),(0,q.jsx)(N,{errors:[W.subnetIds]})]}),(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:`Endpoint access`}),(0,q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Public access exposes the API server on an internet-facing endpoint; private access keeps it reachable only from within the VPC. At least one must be enabled.`}),(0,q.jsx)(D,{control:V,name:`endpointPublicAccess`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Enable public access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Public`]})}),(0,q.jsx)(D,{control:V,name:`endpointPrivateAccess`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Enable private access`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Private`]})}),(0,q.jsx)(N,{errors:[W.endpointPublicAccess]}),se&&(0,q.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Public access source ranges (CIDR). Defaults to`,` `,(0,q.jsx)(`span`,{className:`font-mono`,children:`0.0.0.0/0`}),`.`]}),$.map((e,t)=>(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(h,{"aria-label":`Public access CIDR ${t+1}`,className:`font-mono`,onChange:e=>de(t,e.target.value),placeholder:`203.0.113.0/24`,value:e}),(0,q.jsx)(m,{onClick:()=>pe(t),size:`sm`,type:`button`,variant:`ghost`,children:`Remove`})]},t)),(0,q.jsx)(m,{onClick:fe,size:`sm`,type:`button`,variant:`outline`,children:`Add CIDR`}),(0,q.jsx)(N,{errors:[W.publicAccessCidrs]})]})]}),(0,q.jsxs)(P,{children:[(0,q.jsx)(M,{children:`Access`}),(0,q.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Authentication mode is `,(0,q.jsx)(`span`,{className:`font-mono`,children:`API`}),` (IAM access entries). The legacy aws-auth ConfigMap is not supported.`]}),(0,q.jsx)(D,{control:V,name:`bootstrapClusterCreatorAdminPermissions`,render:({field:e})=>(0,q.jsxs)(`label`,{className:`mt-2 flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`input`,{"aria-label":`Grant the cluster creator admin permissions`,checked:e.value,onChange:t=>e.onChange(t.target.checked),type:`checkbox`}),`Grant the cluster creator admin permissions`]})})]}),(0,q.jsx)(A,{isPending:I.isPending,isSubmitting:G,onCancel:async()=>await e({to:`/eks/list-clusters`}),pendingLabel:`Creating…`,submitLabel:`Create Cluster`})]})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(c,{to:`/eks/list-clusters`,children:`Clusters`}),(0,q.jsx)(j,{subtitle:`EKS`,title:`Create Cluster`}),(0,q.jsx)(U,{description:`EKS clusters boot a Spinifex-managed node image (K3s) that is not shipped with the platform. Import it before creating a cluster.`,importCommand:`spx admin images import --name spinifex-eks-node`,isRechecking:n,onRecheck:L,title:`EKS system image not found`})]})}var Z=ie;export{Z as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-db-parameter-group.js b/spinifex/services/spinifexui/frontend/dist/assets/create-db-parameter-group.js index a6ffb0acf..c44da3b9f 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-db-parameter-group.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-db-parameter-group.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as ee}from"./useSuspenseQuery.js";import{t as te}from"./useNavigate.js";import{t as ne}from"./back-link.js";import{c as re,i as n,n as ie,s as ae,t as oe}from"./select.js";import{n as r,r as i,t as se}from"./cli-command-panel.js";import{t as ce}from"./input.js";import{g as le}from"./rds.js";import{n as ue}from"./rds2.js";import{o as de}from"./rds3.js";import{a as fe,i as pe,n as me,t as he}from"./zod.js";import{t as ge}from"./error-banner.js";import{t as _e}from"./form-actions.js";import{t as ve}from"./page-heading.js";import{a,n as ye,r as o,t as be}from"./field.js";import{t as xe}from"./tags-field-array.js";var Se=t(),s=e();function c(){let e=(0,Se.c)(82),t=te(),n=ue(),{data:r}=ee(de),i;e[0]===r.DBEngineVersions?i=e[1]:(i=new Map((r.DBEngineVersions??[]).filter(Te).map(we)),e[0]=r.DBEngineVersions,e[1]=i);let c;e[2]===i?c=e[3]:(c=[...i],e[2]=i,e[3]=c);let l=c,u;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(u=he(le),e[4]=u):u=e[4];let d=l[0]?.[0]??``,f;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(f=[],e[5]=f):f=e[5];let p;e[6]===d?p=e[7]:(p={resolver:u,defaultValues:{dbParameterGroupName:``,dbParameterGroupFamily:d,description:``,tags:f}},e[6]=d,e[7]=p);let{control:m,formState:De,handleSubmit:h,register:g}=pe(p),{errors:_,isSubmitting:v}=De,y;e[8]===m?y=e[9]:(y={control:m},e[8]=m,e[9]=y);let b=fe(y),x;e[10]!==n||e[11]!==t?(x=async e=>{await n.mutateAsync(e),await t({to:`/rds/describe-db-parameter-groups/$name`,params:{name:e.dbParameterGroupName}})},e[10]=n,e[11]=t,e[12]=x):x=e[12];let S=x,C,w;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,s.jsx)(ne,{to:`/rds/describe-db-parameter-groups`,children:`Back to parameter groups`}),C=(0,s.jsx)(ve,{title:`Create DB Parameter Group`}),e[13]=C,e[14]=w):(C=e[13],w=e[14]);let T;e[15]===n.error?T=e[16]:(T=n.error&&(0,s.jsx)(ge,{error:n.error,msg:`Failed to create the DB parameter group`}),e[15]=n.error,e[16]=T);let E;e[17]!==h||e[18]!==S?(E=h(S),e[17]=h,e[18]=S,e[19]=E):E=e[19];let D;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`parameter-group-name`,children:`Name`})}),e[20]=D):D=e[20];let O=!!_.dbParameterGroupName,k;e[21]===g?k=e[22]:(k=g(`dbParameterGroupName`),e[21]=g,e[22]=k);let A;e[23]!==O||e[24]!==k?(A=(0,s.jsx)(ce,{"aria-invalid":O,id:`parameter-group-name`,placeholder:`orders-postgres18`,...k}),e[23]=O,e[24]=k,e[25]=A):A=e[25];let j;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,s.jsx)(ye,{children:`Letters, digits and hyphens, starting with a letter. The service reserves the name "default" and the "default." prefix.`}),e[26]=j):j=e[26];let M;e[27]===_.dbParameterGroupName?M=e[28]:(M=(0,s.jsx)(o,{errors:[_.dbParameterGroupName]}),e[27]=_.dbParameterGroupName,e[28]=M);let N;e[29]!==A||e[30]!==M?(N=(0,s.jsxs)(be,{children:[D,A,j,M]}),e[29]=A,e[30]=M,e[31]=N):N=e[31];let P;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`parameter-group-family`,children:`Family`})}),e[32]=P):P=e[32];let F;e[33]!==_.dbParameterGroupFamily||e[34]!==l?(F=e=>{let{field:t}=e;return(0,s.jsxs)(oe,{onValueChange:t.onChange,value:t.value,children:[(0,s.jsx)(ae,{"aria-invalid":!!_.dbParameterGroupFamily,className:`w-full`,id:`parameter-group-family`,children:(0,s.jsx)(re,{placeholder:`Select a family`})}),(0,s.jsx)(ie,{children:l.map(Ce)})]})},e[33]=_.dbParameterGroupFamily,e[34]=l,e[35]=F):F=e[35];let I;e[36]!==m||e[37]!==F?(I=(0,s.jsx)(me,{control:m,name:`dbParameterGroupFamily`,render:F}),e[36]=m,e[37]=F,e[38]=I):I=e[38];let L;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,s.jsx)(ye,{children:`The family fixes which engine can attach the group, and it cannot be changed afterwards. A group of one family is refused by an instance of the other engine.`}),e[39]=L):L=e[39];let R;e[40]===_.dbParameterGroupFamily?R=e[41]:(R=(0,s.jsx)(o,{errors:[_.dbParameterGroupFamily]}),e[40]=_.dbParameterGroupFamily,e[41]=R);let z;e[42]!==I||e[43]!==R?(z=(0,s.jsxs)(be,{children:[P,I,L,R]}),e[42]=I,e[43]=R,e[44]=z):z=e[44];let B;e[45]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,s.jsx)(a,{children:(0,s.jsx)(`label`,{htmlFor:`parameter-group-description`,children:`Description`})}),e[45]=B):B=e[45];let V=!!_.description,H;e[46]===g?H=e[47]:(H=g(`description`),e[46]=g,e[47]=H);let U;e[48]!==V||e[49]!==H?(U=(0,s.jsx)(ce,{"aria-invalid":V,id:`parameter-group-description`,placeholder:`Tuned settings for the orders database`,...H}),e[48]=V,e[49]=H,e[50]=U):U=e[50];let W;e[51]===_.description?W=e[52]:(W=(0,s.jsx)(o,{errors:[_.description]}),e[51]=_.description,e[52]=W);let G;e[53]!==U||e[54]!==W?(G=(0,s.jsxs)(be,{children:[B,U,W]}),e[53]=U,e[54]=W,e[55]=G):G=e[55];let K;e[56]===m?K=e[57]:(K=(0,s.jsx)(xe,{control:m,name:`tags`}),e[56]=m,e[57]=K);let q;e[58]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,s.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A new group starts empty: every value is the engine default until you override one, so a fresh group and the default group behave identically.`}),e[58]=q):q=e[58];let Oe=b.dbParameterGroupName??``,ke=b.dbParameterGroupFamily??``,Ae=b.description??``,J;e[59]!==Oe||e[60]!==ke||e[61]!==Ae?(J=Ee({dbParameterGroupName:Oe,dbParameterGroupFamily:ke,description:Ae}),e[59]=Oe,e[60]=ke,e[61]=Ae,e[62]=J):J=e[62];let Y;e[63]===J?Y=e[64]:(Y=(0,s.jsx)(se,{commands:J}),e[63]=J,e[64]=Y);let X;e[65]===t?X=e[66]:(X=async()=>await t({to:`/rds/describe-db-parameter-groups`}),e[65]=t,e[66]=X);let Z;e[67]!==n.isPending||e[68]!==v||e[69]!==X?(Z=(0,s.jsx)(_e,{isPending:n.isPending,isSubmitting:v,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Parameter Group`}),e[67]=n.isPending,e[68]=v,e[69]=X,e[70]=Z):Z=e[70];let Q;e[71]!==E||e[72]!==N||e[73]!==z||e[74]!==G||e[75]!==K||e[76]!==Y||e[77]!==Z?(Q=(0,s.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:E,children:[N,z,G,K,q,Y,Z]}),e[71]=E,e[72]=N,e[73]=z,e[74]=G,e[75]=K,e[76]=Y,e[77]=Z,e[78]=Q):Q=e[78];let $;return e[79]!==T||e[80]!==Q?($=(0,s.jsxs)(s.Fragment,{children:[w,C,T,Q]}),e[79]=T,e[80]=Q,e[81]=$):$=e[81],$}function Ce(e){let[t,ee]=e;return(0,s.jsxs)(n,{value:t,children:[t,` — `,ee]},t)}function we(e){return[e.DBParameterGroupFamily??``,e.DBEngineVersionDescription??e.Engine??``]}function Te(e){return e.DBParameterGroupFamily}function Ee(e){return[{label:`Create DB Parameter Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws rds create-db-parameter-group`},...i(`--db-parameter-group-name`,r(e.dbParameterGroupName,`DBParameterGroupName`)),...i(`--db-parameter-group-family`,r(e.dbParameterGroupFamily,`DBParameterGroupFamily`)),...i(`--description`,`"${r(e.description,`Description`)}"`)]}]}var l=c;export{l as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as ee}from"./useSuspenseQuery.js";import{t as te}from"./useNavigate.js";import{t as ne}from"./back-link.js";import{c as re,i as n,n as ie,s as ae,t as oe}from"./select.js";import{n as r,r as i,t as se}from"./cli-command-panel.js";import{t as ce}from"./input.js";import{g as le}from"./rds.js";import{n as ue}from"./rds2.js";import{o as de}from"./rds3.js";import{a as fe,i as pe,n as me,t as he}from"./zod.js";import{t as ge}from"./error-banner.js";import{t as _e}from"./form-actions.js";import{t as ve}from"./page-heading.js";import{a,n as ye,r as o,t as s}from"./field.js";import{t as be}from"./tags-field-array.js";var xe=t(),c=e();function l(){let e=(0,xe.c)(84),t=te(),n=ue(),{data:r}=ee(de),i;e[0]===r.DBEngineVersions?i=e[1]:(i=r.DBEngineVersions??[],e[0]=r.DBEngineVersions,e[1]=i);let l;e[2]===i?l=e[3]:(l=new Map(i.filter(we).map(Ce)),e[2]=i,e[3]=l);let u;e[4]===l?u=e[5]:(u=[...l],e[4]=l,e[5]=u);let d=u,f;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=he(le),e[6]=f):f=e[6];let Ee=d[0]?.[0]??``,p;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(p=[],e[7]=p):p=e[7];let m;e[8]===Ee?m=e[9]:(m={resolver:f,defaultValues:{dbParameterGroupName:``,dbParameterGroupFamily:Ee,description:``,tags:p}},e[8]=Ee,e[9]=m);let{control:h,formState:De,handleSubmit:Oe,register:g}=pe(m),{errors:_,isSubmitting:v}=De,y;e[10]===h?y=e[11]:(y={control:h},e[10]=h,e[11]=y);let b=fe(y),x;e[12]!==n||e[13]!==t?(x=async e=>{await n.mutateAsync(e),await t({to:`/rds/describe-db-parameter-groups/$name`,params:{name:e.dbParameterGroupName}})},e[12]=n,e[13]=t,e[14]=x):x=e[14];let S=x,C,w;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,c.jsx)(ne,{to:`/rds/describe-db-parameter-groups`,children:`Back to parameter groups`}),w=(0,c.jsx)(ve,{title:`Create DB Parameter Group`}),e[15]=C,e[16]=w):(C=e[15],w=e[16]);let T;e[17]===n.error?T=e[18]:(T=n.error&&(0,c.jsx)(ge,{error:n.error,msg:`Failed to create the DB parameter group`}),e[17]=n.error,e[18]=T);let E;e[19]!==Oe||e[20]!==S?(E=Oe(S),e[19]=Oe,e[20]=S,e[21]=E):E=e[21];let D;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,c.jsx)(a,{children:(0,c.jsx)(`label`,{htmlFor:`parameter-group-name`,children:`Name`})}),e[22]=D):D=e[22];let O=!!_.dbParameterGroupName,k;e[23]===g?k=e[24]:(k=g(`dbParameterGroupName`),e[23]=g,e[24]=k);let A;e[25]!==O||e[26]!==k?(A=(0,c.jsx)(ce,{"aria-invalid":O,id:`parameter-group-name`,placeholder:`orders-postgres18`,...k}),e[25]=O,e[26]=k,e[27]=A):A=e[27];let j;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,c.jsx)(ye,{children:`Letters, digits and hyphens, starting with a letter. The service reserves the name "default" and the "default." prefix.`}),e[28]=j):j=e[28];let M;e[29]===_.dbParameterGroupName?M=e[30]:(M=(0,c.jsx)(o,{errors:[_.dbParameterGroupName]}),e[29]=_.dbParameterGroupName,e[30]=M);let N;e[31]!==A||e[32]!==M?(N=(0,c.jsxs)(s,{children:[D,A,j,M]}),e[31]=A,e[32]=M,e[33]=N):N=e[33];let P;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,c.jsx)(a,{children:(0,c.jsx)(`label`,{htmlFor:`parameter-group-family`,children:`Family`})}),e[34]=P):P=e[34];let F;e[35]!==_.dbParameterGroupFamily||e[36]!==d?(F=e=>{let{field:t}=e;return(0,c.jsxs)(oe,{onValueChange:t.onChange,value:t.value,children:[(0,c.jsx)(ae,{"aria-invalid":!!_.dbParameterGroupFamily,className:`w-full`,id:`parameter-group-family`,children:(0,c.jsx)(re,{placeholder:`Select a family`})}),(0,c.jsx)(ie,{children:d.map(Se)})]})},e[35]=_.dbParameterGroupFamily,e[36]=d,e[37]=F):F=e[37];let I;e[38]!==h||e[39]!==F?(I=(0,c.jsx)(me,{control:h,name:`dbParameterGroupFamily`,render:F}),e[38]=h,e[39]=F,e[40]=I):I=e[40];let L;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,c.jsx)(ye,{children:`The family fixes which engine can attach the group, and it cannot be changed afterwards. A group of one family is refused by an instance of the other engine.`}),e[41]=L):L=e[41];let R;e[42]===_.dbParameterGroupFamily?R=e[43]:(R=(0,c.jsx)(o,{errors:[_.dbParameterGroupFamily]}),e[42]=_.dbParameterGroupFamily,e[43]=R);let z;e[44]!==I||e[45]!==R?(z=(0,c.jsxs)(s,{children:[P,I,L,R]}),e[44]=I,e[45]=R,e[46]=z):z=e[46];let B;e[47]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,c.jsx)(a,{children:(0,c.jsx)(`label`,{htmlFor:`parameter-group-description`,children:`Description`})}),e[47]=B):B=e[47];let V=!!_.description,H;e[48]===g?H=e[49]:(H=g(`description`),e[48]=g,e[49]=H);let U;e[50]!==V||e[51]!==H?(U=(0,c.jsx)(ce,{"aria-invalid":V,id:`parameter-group-description`,placeholder:`Tuned settings for the orders database`,...H}),e[50]=V,e[51]=H,e[52]=U):U=e[52];let W;e[53]===_.description?W=e[54]:(W=(0,c.jsx)(o,{errors:[_.description]}),e[53]=_.description,e[54]=W);let G;e[55]!==U||e[56]!==W?(G=(0,c.jsxs)(s,{children:[B,U,W]}),e[55]=U,e[56]=W,e[57]=G):G=e[57];let K;e[58]===h?K=e[59]:(K=(0,c.jsx)(be,{control:h,name:`tags`}),e[58]=h,e[59]=K);let q;e[60]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,c.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A new group starts empty: every value is the engine default until you override one, so a fresh group and the default group behave identically.`}),e[60]=q):q=e[60];let ke=b.dbParameterGroupName??``,Ae=b.dbParameterGroupFamily??``,je=b.description??``,J;e[61]!==ke||e[62]!==Ae||e[63]!==je?(J=Te({dbParameterGroupName:ke,dbParameterGroupFamily:Ae,description:je}),e[61]=ke,e[62]=Ae,e[63]=je,e[64]=J):J=e[64];let Y;e[65]===J?Y=e[66]:(Y=(0,c.jsx)(se,{commands:J}),e[65]=J,e[66]=Y);let X;e[67]===t?X=e[68]:(X=async()=>await t({to:`/rds/describe-db-parameter-groups`}),e[67]=t,e[68]=X);let Z;e[69]!==n.isPending||e[70]!==v||e[71]!==X?(Z=(0,c.jsx)(_e,{isPending:n.isPending,isSubmitting:v,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Parameter Group`}),e[69]=n.isPending,e[70]=v,e[71]=X,e[72]=Z):Z=e[72];let Q;e[73]!==E||e[74]!==N||e[75]!==z||e[76]!==G||e[77]!==K||e[78]!==Y||e[79]!==Z?(Q=(0,c.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:E,children:[N,z,G,K,q,Y,Z]}),e[73]=E,e[74]=N,e[75]=z,e[76]=G,e[77]=K,e[78]=Y,e[79]=Z,e[80]=Q):Q=e[80];let $;return e[81]!==T||e[82]!==Q?($=(0,c.jsxs)(c.Fragment,{children:[C,w,T,Q]}),e[81]=T,e[82]=Q,e[83]=$):$=e[83],$}function Se(e){let[t,ee]=e;return(0,c.jsxs)(n,{value:t,children:[t,` — `,ee]},t)}function Ce(e){return[e.DBParameterGroupFamily??``,e.DBEngineVersionDescription??e.Engine??``]}function we(e){return e.DBParameterGroupFamily}function Te(e){return[{label:`Create DB Parameter Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws rds create-db-parameter-group`},...i(`--db-parameter-group-name`,r(e.dbParameterGroupName,`DBParameterGroupName`)),...i(`--db-parameter-group-family`,r(e.dbParameterGroupFamily,`DBParameterGroupFamily`)),...i(`--description`,`"${r(e.description,`Description`)}"`)]}]}var u=l;export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-db-snapshot-dialog.js b/spinifex/services/spinifexui/frontend/dist/assets/create-db-snapshot-dialog.js index 9c822b5cf..623087652 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-db-snapshot-dialog.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-db-snapshot-dialog.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as ee}from"./useQuery.js";import{c as te,i,n as ne,s as re,t as ie}from"./select.js";import{t as a}from"./button.js";import{t as ae}from"./input.js";import{_ as oe,f as o,w as se}from"./rds.js";import{r as ce}from"./rds2.js";import{r as le}from"./rds3.js";import{i as ue,t as de}from"./zod.js";import{a as s,n as fe,r as pe,t as c}from"./field.js";import{a as me,i as he,l as ge,s as _e,t as ve}from"./alert-dialog.js";import{t as ye}from"./tags-field-array.js";import{n as be,t as xe}from"./picker-notice.js";var Se=r(),Ce=e(n(),1),l=t();function u(e){let t=(0,Se.c)(63),{open:n,onOpenChange:r,dbInstanceIdentifier:i,onCreated:o}=e,u=ce(),d=i===void 0,f;t[0]===d?f=t[1]:(f={...le,enabled:d},t[0]=d,t[1]=f);let p=ee(f),[m,Ee]=(0,Ce.useState)(i??``),h=(p.data?.DBInstances??[]).filter(Te),g=h.length===0,_;t[2]!==p||t[3]!==g?(_=be(p,g,{loading:`Loading the DB instances…`,failed:`Could not read the DB instances`,empty:`No DB instance is available or stopped, which is what a snapshot is taken from.`}),t[2]=p,t[3]=g,t[4]=_):_=t[4];let v=_,y;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(y=de(oe),t[5]=y):y=t[5];let b;t[6]===i?b=t[7]:(b=i?se(i,`snapshot`):``,t[6]=i,t[7]=b);let x;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(x=[],t[8]=x):x=t[8];let S;t[9]===b?S=t[10]:(S={resolver:y,defaultValues:{dbSnapshotIdentifier:b,tags:x}},t[9]=b,t[10]=S);let{control:C,formState:De,handleSubmit:w,register:T,setValue:E}=ue(S),{errors:D,isSubmitting:Oe}=De,O;t[11]===E?O=t[12]:(O=function(e){Ee(e??``),e&&E(`dbSnapshotIdentifier`,se(e,`snapshot`),{shouldValidate:!0})},t[11]=E,t[12]=O);let ke=O,k;t[13]!==u||t[14]!==o||t[15]!==r||t[16]!==m?(k=async e=>{try{await u.mutateAsync({...e,dbInstanceIdentifier:m})}catch{return}r(!1),o?.()},t[13]=u,t[14]=o,t[15]=r,t[16]=m,t[17]=k):k=t[17];let A=k,j=ve,M=he,N;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,l.jsxs)(_e,{children:[(0,l.jsx)(ge,{children:`Take DB Snapshot`}),(0,l.jsx)(me,{children:`The engine is held at a checkpoint while the snapshot is taken, so the instance reads as backing-up until it finishes.`})]}),t[18]=N):N=t[18];let P;t[19]!==w||t[20]!==A?(P=w(A),t[19]=w,t[20]=A,t[21]=P):P=t[21];let F=i?(0,l.jsxs)(c,{children:[(0,l.jsx)(s,{children:`DB instance`}),(0,l.jsx)(`p`,{className:`font-mono text-sm`,children:i})]}):(0,l.jsxs)(c,{children:[(0,l.jsx)(s,{children:(0,l.jsx)(`label`,{htmlFor:`snapshot-instance`,children:`DB instance`})}),v?(0,l.jsx)(xe,{notice:v}):(0,l.jsxs)(ie,{onValueChange:ke,value:m,children:[(0,l.jsx)(re,{className:`w-full`,id:`snapshot-instance`,children:(0,l.jsx)(te,{placeholder:`Select a DB instance`})}),(0,l.jsx)(ne,{children:h.map(we)})]})]}),I;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,l.jsx)(s,{children:(0,l.jsx)(`label`,{htmlFor:`snapshot-identifier`,children:`Snapshot identifier`})}),t[22]=I):I=t[22];let L=!!D.dbSnapshotIdentifier,R;t[23]===T?R=t[24]:(R=T(`dbSnapshotIdentifier`),t[23]=T,t[24]=R);let z;t[25]!==L||t[26]!==R?(z=(0,l.jsx)(ae,{"aria-invalid":L,id:`snapshot-identifier`,...R}),t[25]=L,t[26]=R,t[27]=z):z=t[27];let B;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,l.jsx)(fe,{children:`Lowercase letters, digits and hyphens. The rds: namespace belongs to automated backups and cannot be used here.`}),t[28]=B):B=t[28];let V;t[29]===D.dbSnapshotIdentifier?V=t[30]:(V=(0,l.jsx)(pe,{errors:[D.dbSnapshotIdentifier]}),t[29]=D.dbSnapshotIdentifier,t[30]=V);let H;t[31]!==z||t[32]!==V?(H=(0,l.jsxs)(c,{children:[I,z,B,V]}),t[31]=z,t[32]=V,t[33]=H):H=t[33];let U;t[34]===C?U=t[35]:(U=(0,l.jsx)(ye,{control:C,name:`tags`}),t[34]=C,t[35]=U);let W;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,l.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A snapshot the engine could not be quiesced for is still taken and reported as crash consistent on the source instance's Backups tab. The snapshot's own events never carry it.`}),t[36]=W):W=t[36];let G;t[37]===u.error?G=t[38]:(G=u.error&&(0,l.jsx)(`p`,{className:`text-sm text-destructive`,children:u.error.message}),t[37]=u.error,t[38]=G);let K;t[39]===r?K=t[40]:(K=(0,l.jsx)(a,{onClick:()=>r(!1),type:`button`,variant:`outline`,children:`Cancel`}),t[39]=r,t[40]=K);let q=Oe||u.isPending||m===``,J=u.isPending?`Taking Snapshot…`:`Take Snapshot`,Y;t[41]!==q||t[42]!==J?(Y=(0,l.jsx)(a,{disabled:q,type:`submit`,children:J}),t[41]=q,t[42]=J,t[43]=Y):Y=t[43];let X;t[44]!==K||t[45]!==Y?(X=(0,l.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[K,Y]}),t[44]=K,t[45]=Y,t[46]=X):X=t[46];let Z;t[47]!==P||t[48]!==F||t[49]!==H||t[50]!==U||t[51]!==G||t[52]!==X?(Z=(0,l.jsxs)(`form`,{className:`space-y-4`,onSubmit:P,children:[F,H,U,W,G,X]}),t[47]=P,t[48]=F,t[49]=H,t[50]=U,t[51]=G,t[52]=X,t[53]=Z):Z=t[53];let Q;t[54]!==M||t[55]!==N||t[56]!==Z?(Q=(0,l.jsxs)(M,{className:`max-h-[85vh] overflow-y-auto`,children:[N,Z]}),t[54]=M,t[55]=N,t[56]=Z,t[57]=Q):Q=t[57];let $;return t[58]!==j||t[59]!==r||t[60]!==n||t[61]!==Q?($=(0,l.jsx)(j,{onOpenChange:r,open:n,children:Q}),t[58]=j,t[59]=r,t[60]=n,t[61]=Q,t[62]=$):$=t[62],$}function we(e){return(0,l.jsxs)(i,{value:e.DBInstanceIdentifier??``,children:[e.DBInstanceIdentifier,` (`,e.DBInstanceStatus,`)`]},e.DBInstanceIdentifier)}function Te(e){return o(e.DBInstanceStatus)}export{u as t}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as ee}from"./useQuery.js";import{c as te,i,n as ne,s as re,t as ie}from"./select.js";import{t as a}from"./button.js";import{t as ae}from"./input.js";import{_ as oe,f as o,w as s}from"./rds.js";import{r as se}from"./rds2.js";import{r as ce}from"./rds3.js";import{i as le,t as ue}from"./zod.js";import{a as c,n as de,r as fe,t as l}from"./field.js";import{a as pe,i as me,l as he,s as ge,t as _e}from"./alert-dialog.js";import{t as ve}from"./tags-field-array.js";import{n as ye,t as be}from"./picker-notice.js";var xe=r(),Se=e(n(),1),u=t();function d(e){let t=(0,xe.c)(65),{open:n,onOpenChange:r,dbInstanceIdentifier:i,onCreated:o}=e,d=se(),f=i===void 0,p;t[0]===f?p=t[1]:(p={...ce,enabled:f},t[0]=f,t[1]=p);let m=ee(p),[h,Te]=(0,Se.useState)(i??``),g;t[2]===m.data?.DBInstances?g=t[3]:(g=m.data?.DBInstances??[],t[2]=m.data?.DBInstances,t[3]=g);let Ee=g.filter(we),_=Ee.length===0,v;t[4]!==m||t[5]!==_?(v=ye(m,_,{loading:`Loading the DB instances…`,failed:`Could not read the DB instances`,empty:`No DB instance is available or stopped, which is what a snapshot is taken from.`}),t[4]=m,t[5]=_,t[6]=v):v=t[6];let De=v,y;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(y=ue(oe),t[7]=y):y=t[7];let b;t[8]===i?b=t[9]:(b=i?s(i,`snapshot`):``,t[8]=i,t[9]=b);let x;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(x=[],t[10]=x):x=t[10];let S;t[11]===b?S=t[12]:(S={resolver:y,defaultValues:{dbSnapshotIdentifier:b,tags:x}},t[11]=b,t[12]=S);let{control:C,formState:Oe,handleSubmit:w,register:T,setValue:E}=le(S),{errors:D,isSubmitting:ke}=Oe,O;t[13]===E?O=t[14]:(O=function(e){Te(e??``),e&&E(`dbSnapshotIdentifier`,s(e,`snapshot`),{shouldValidate:!0})},t[13]=E,t[14]=O);let Ae=O,k;t[15]!==d||t[16]!==o||t[17]!==r||t[18]!==h?(k=async e=>{try{await d.mutateAsync({...e,dbInstanceIdentifier:h})}catch{return}r(!1),o?.()},t[15]=d,t[16]=o,t[17]=r,t[18]=h,t[19]=k):k=t[19];let A=k,j=_e,M=me,N;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,u.jsxs)(ge,{children:[(0,u.jsx)(he,{children:`Take DB Snapshot`}),(0,u.jsx)(pe,{children:`The engine is held at a checkpoint while the snapshot is taken, so the instance reads as backing-up until it finishes.`})]}),t[20]=N):N=t[20];let P;t[21]!==w||t[22]!==A?(P=w(A),t[21]=w,t[22]=A,t[23]=P):P=t[23];let F=i?(0,u.jsxs)(l,{children:[(0,u.jsx)(c,{children:`DB instance`}),(0,u.jsx)(`p`,{className:`font-mono text-sm`,children:i})]}):(0,u.jsxs)(l,{children:[(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`snapshot-instance`,children:`DB instance`})}),De?(0,u.jsx)(be,{notice:De}):(0,u.jsxs)(ie,{onValueChange:Ae,value:h,children:[(0,u.jsx)(re,{className:`w-full`,id:`snapshot-instance`,children:(0,u.jsx)(te,{placeholder:`Select a DB instance`})}),(0,u.jsx)(ne,{children:Ee.map(Ce)})]})]}),I;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,u.jsx)(c,{children:(0,u.jsx)(`label`,{htmlFor:`snapshot-identifier`,children:`Snapshot identifier`})}),t[24]=I):I=t[24];let L=!!D.dbSnapshotIdentifier,R;t[25]===T?R=t[26]:(R=T(`dbSnapshotIdentifier`),t[25]=T,t[26]=R);let z;t[27]!==L||t[28]!==R?(z=(0,u.jsx)(ae,{"aria-invalid":L,id:`snapshot-identifier`,...R}),t[27]=L,t[28]=R,t[29]=z):z=t[29];let B;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,u.jsx)(de,{children:`Lowercase letters, digits and hyphens. The rds: namespace belongs to automated backups and cannot be used here.`}),t[30]=B):B=t[30];let V;t[31]===D.dbSnapshotIdentifier?V=t[32]:(V=(0,u.jsx)(fe,{errors:[D.dbSnapshotIdentifier]}),t[31]=D.dbSnapshotIdentifier,t[32]=V);let H;t[33]!==z||t[34]!==V?(H=(0,u.jsxs)(l,{children:[I,z,B,V]}),t[33]=z,t[34]=V,t[35]=H):H=t[35];let U;t[36]===C?U=t[37]:(U=(0,u.jsx)(ve,{control:C,name:`tags`}),t[36]=C,t[37]=U);let W;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,u.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A snapshot the engine could not be quiesced for is still taken and reported as crash consistent on the source instance's Backups tab. The snapshot's own events never carry it.`}),t[38]=W):W=t[38];let G;t[39]===d.error?G=t[40]:(G=d.error&&(0,u.jsx)(`p`,{className:`text-sm text-destructive`,children:d.error.message}),t[39]=d.error,t[40]=G);let K;t[41]===r?K=t[42]:(K=(0,u.jsx)(a,{onClick:()=>r(!1),type:`button`,variant:`outline`,children:`Cancel`}),t[41]=r,t[42]=K);let q=ke||d.isPending||h===``,J=d.isPending?`Taking Snapshot…`:`Take Snapshot`,Y;t[43]!==q||t[44]!==J?(Y=(0,u.jsx)(a,{disabled:q,type:`submit`,children:J}),t[43]=q,t[44]=J,t[45]=Y):Y=t[45];let X;t[46]!==K||t[47]!==Y?(X=(0,u.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[K,Y]}),t[46]=K,t[47]=Y,t[48]=X):X=t[48];let Z;t[49]!==P||t[50]!==F||t[51]!==H||t[52]!==U||t[53]!==G||t[54]!==X?(Z=(0,u.jsxs)(`form`,{className:`space-y-4`,onSubmit:P,children:[F,H,U,W,G,X]}),t[49]=P,t[50]=F,t[51]=H,t[52]=U,t[53]=G,t[54]=X,t[55]=Z):Z=t[55];let Q;t[56]!==M||t[57]!==N||t[58]!==Z?(Q=(0,u.jsxs)(M,{className:`max-h-[85vh] overflow-y-auto`,children:[N,Z]}),t[56]=M,t[57]=N,t[58]=Z,t[59]=Q):Q=t[59];let $;return t[60]!==j||t[61]!==r||t[62]!==n||t[63]!==Q?($=(0,u.jsx)(j,{onOpenChange:r,open:n,children:Q}),t[60]=j,t[61]=r,t[62]=n,t[63]=Q,t[64]=$):$=t[64],$}function Ce(e){return(0,u.jsxs)(i,{value:e.DBInstanceIdentifier??``,children:[e.DBInstanceIdentifier,` (`,e.DBInstanceStatus,`)`]},e.DBInstanceIdentifier)}function we(e){return o(e.DBInstanceStatus)}export{d as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-db-subnet-group.js b/spinifex/services/spinifexui/frontend/dist/assets/create-db-subnet-group.js index 3c95af320..545e0493f 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-db-subnet-group.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-db-subnet-group.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{tn as i}from"./cluster-config.js";import{t as ee}from"./back-link.js";import{n as a,r as o,t as te}from"./cli-command-panel.js";import{t as s}from"./input.js";import{M as c,O as l}from"./ec2.js";import{v as u}from"./rds.js";import{i as d}from"./rds2.js";import{a as f,i as p,t as m}from"./zod.js";import{t as ne}from"./error-banner.js";import{t as h}from"./form-actions.js";import{t as re}from"./page-heading.js";import{a as g,n as _,r as v,t as y}from"./field.js";import{t as ie}from"./tags-field-array.js";var b=t(),x=e();function S(e){let t=i(e.Tags),n=[e.CidrBlock,e.AvailabilityZone,t].filter(Boolean);return`${e.SubnetId} (${n.join(`, `)})`}function C(){let e=(0,b.c)(94),t=r(),a=d(),{data:o}=n(l),{data:C}=n(c),w;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(w=m(u),e[0]=w):w=e[0];let T;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(T={resolver:w,defaultValues:{dbSubnetGroupName:``,dbSubnetGroupDescription:``,subnetIds:[],tags:[]}},e[1]=T):T=e[1];let{control:E,formState:D,handleSubmit:O,register:k,setValue:A}=p(T),{errors:j,isSubmitting:M}=D,N;e[2]===E?N=e[3]:(N={control:E},e[2]=E,e[3]=N);let P=f(N),F,I,L,R,z,B,V,H,U,W,G;if(e[4]!==E||e[5]!==a||e[6]!==j.dbSubnetGroupDescription||e[7]!==j.dbSubnetGroupName||e[8]!==j.subnetIds||e[9]!==O||e[10]!==t||e[11]!==k||e[12]!==A||e[13]!==o.Subnets||e[14]!==P.dbSubnetGroupDescription||e[15]!==P.dbSubnetGroupName||e[16]!==P.subnetIds||e[17]!==C.Vpcs){let n=P.subnetIds??[],r=new Set(n),c=o.Subnets??[],l=C.Vpcs??[],u=c.find(e=>e.SubnetId===n[0])?.VpcId,d=[...new Set(c.map(ae).filter(Boolean))],f=e=>{let t=n.includes(e)?n.filter(t=>t!==e):[...n,e];A(`subnetIds`,t,{shouldValidate:!0})},p;e[29]!==a||e[30]!==t?(p=async e=>{await a.mutateAsync(e),await t({to:`/rds/describe-db-subnet-groups`})},e[29]=a,e[30]=t,e[31]=p):p=e[31];let m=p;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,x.jsx)(ee,{to:`/rds/describe-db-subnet-groups`,children:`Back to subnet groups`}),R=(0,x.jsx)(re,{title:`Create DB Subnet Group`}),e[32]=L,e[33]=R):(L=e[32],R=e[33]),e[34]===a.error?z=e[35]:(z=a.error&&(0,x.jsx)(ne,{error:a.error,msg:`Failed to create the DB subnet group`}),e[34]=a.error,e[35]=z),V=`max-w-4xl space-y-6`,e[36]!==O||e[37]!==m?(H=O(m),e[36]=O,e[37]=m,e[38]=H):H=e[38];let h;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,x.jsx)(g,{children:(0,x.jsx)(`label`,{htmlFor:`subnet-group-name`,children:`Name`})}),e[39]=h):h=e[39];let b=!!j.dbSubnetGroupName,w;e[40]===k?w=e[41]:(w=k(`dbSubnetGroupName`),e[40]=k,e[41]=w);let T;e[42]!==b||e[43]!==w?(T=(0,x.jsx)(s,{"aria-invalid":b,id:`subnet-group-name`,placeholder:`orders-db-subnets`,...w}),e[42]=b,e[43]=w,e[44]=T):T=e[44];let D;e[45]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,x.jsx)(_,{children:`Letters, digits and hyphens, starting with a letter. The name cannot be changed later, and there is no ModifyDBSubnetGroup — editing a group means deleting and recreating it.`}),e[45]=D):D=e[45];let M;e[46]===j.dbSubnetGroupName?M=e[47]:(M=(0,x.jsx)(v,{errors:[j.dbSubnetGroupName]}),e[46]=j.dbSubnetGroupName,e[47]=M),e[48]!==T||e[49]!==M?(U=(0,x.jsxs)(y,{children:[h,T,D,M]}),e[48]=T,e[49]=M,e[50]=U):U=e[50];let N;e[51]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,x.jsx)(g,{children:(0,x.jsx)(`label`,{htmlFor:`subnet-group-description`,children:`Description`})}),e[51]=N):N=e[51];let K=!!j.dbSubnetGroupDescription,q;e[52]===k?q=e[53]:(q=k(`dbSubnetGroupDescription`),e[52]=k,e[53]=q);let J;e[54]!==K||e[55]!==q?(J=(0,x.jsx)(s,{"aria-invalid":K,id:`subnet-group-description`,placeholder:`Private subnets for the orders database`,...q}),e[54]=K,e[55]=q,e[56]=J):J=e[56];let Y;e[57]===j.dbSubnetGroupDescription?Y=e[58]:(Y=(0,x.jsx)(v,{errors:[j.dbSubnetGroupDescription]}),e[57]=j.dbSubnetGroupDescription,e[58]=Y),e[59]!==J||e[60]!==Y?(W=(0,x.jsxs)(y,{children:[N,J,Y]}),e[59]=J,e[60]=Y,e[61]=W):W=e[61];let X;e[62]===Symbol.for(`react.memo_cache_sentinel`)?(X=(0,x.jsx)(g,{children:`Subnets`}),e[62]=X):X=e[62];let Z=c.length===0?(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in this account. Create one before creating a subnet group.`}):(0,x.jsx)(`div`,{className:`space-y-4`,children:d.map(e=>{let t=i(l.find(t=>t.VpcId===e)?.Tags),n=u!==void 0&&u!==e;return(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`p`,{className:`mb-1 font-mono text-xs text-muted-foreground`,children:[e,t&&` (${t})`,n&&` — a subnet group must span one VPC, so this one is out of reach`]}),(0,x.jsx)(`div`,{className:`space-y-1 pl-3`,children:c.filter(t=>t.VpcId===e).map(e=>(0,x.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,x.jsx)(`input`,{"aria-label":`Subnet ${S(e)}`,checked:r.has(e.SubnetId??``),disabled:n,onChange:()=>f(e.SubnetId??``),type:`checkbox`}),(0,x.jsx)(`span`,{className:`font-mono`,children:S(e)})]},e.SubnetId))})]},e)})}),Q;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(Q=(0,x.jsxs)(_,{children:[`At most `,20,` subnets, all in one VPC. This platform is single-AZ, so the two-AZ rule AWS enforces does not apply here.`]}),e[63]=Q):Q=e[63];let $;e[64]===j.subnetIds?$=e[65]:($=(0,x.jsx)(v,{errors:[j.subnetIds]}),e[64]=j.subnetIds,e[65]=$),e[66]!==Z||e[67]!==$?(G=(0,x.jsxs)(y,{children:[X,Z,Q,$]}),e[66]=Z,e[67]=$,e[68]=G):G=e[68],e[69]===E?I=e[70]:(I=(0,x.jsx)(ie,{control:E,name:`tags`}),e[69]=E,e[70]=I),F=te,B=oe({dbSubnetGroupName:P.dbSubnetGroupName??``,dbSubnetGroupDescription:P.dbSubnetGroupDescription??``,subnetIds:n}),e[4]=E,e[5]=a,e[6]=j.dbSubnetGroupDescription,e[7]=j.dbSubnetGroupName,e[8]=j.subnetIds,e[9]=O,e[10]=t,e[11]=k,e[12]=A,e[13]=o.Subnets,e[14]=P.dbSubnetGroupDescription,e[15]=P.dbSubnetGroupName,e[16]=P.subnetIds,e[17]=C.Vpcs,e[18]=F,e[19]=I,e[20]=L,e[21]=R,e[22]=z,e[23]=B,e[24]=V,e[25]=H,e[26]=U,e[27]=W,e[28]=G}else F=e[18],I=e[19],L=e[20],R=e[21],z=e[22],B=e[23],V=e[24],H=e[25],U=e[26],W=e[27],G=e[28];let K;e[71]!==F||e[72]!==B?(K=(0,x.jsx)(F,{commands:B}),e[71]=F,e[72]=B,e[73]=K):K=e[73];let q;e[74]===t?q=e[75]:(q=async()=>await t({to:`/rds/describe-db-subnet-groups`}),e[74]=t,e[75]=q);let J;e[76]!==a.isPending||e[77]!==M||e[78]!==q?(J=(0,x.jsx)(h,{isPending:a.isPending,isSubmitting:M,onCancel:q,pendingLabel:`Creating…`,submitLabel:`Create Subnet Group`}),e[76]=a.isPending,e[77]=M,e[78]=q,e[79]=J):J=e[79];let Y;e[80]!==I||e[81]!==K||e[82]!==J||e[83]!==V||e[84]!==H||e[85]!==U||e[86]!==W||e[87]!==G?(Y=(0,x.jsxs)(`form`,{className:V,onSubmit:H,children:[U,W,G,I,K,J]}),e[80]=I,e[81]=K,e[82]=J,e[83]=V,e[84]=H,e[85]=U,e[86]=W,e[87]=G,e[88]=Y):Y=e[88];let X;return e[89]!==L||e[90]!==R||e[91]!==z||e[92]!==Y?(X=(0,x.jsxs)(x.Fragment,{children:[L,R,z,Y]}),e[89]=L,e[90]=R,e[91]=z,e[92]=Y,e[93]=X):X=e[93],X}function ae(e){return e.VpcId??``}function oe(e){return[{label:`Create DB Subnet Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws rds create-db-subnet-group`},...o(`--db-subnet-group-name`,a(e.dbSubnetGroupName,`DBSubnetGroupName`)),...o(`--db-subnet-group-description`,`"${a(e.dbSubnetGroupDescription,`DBSubnetGroupDescription`)}"`),...o(`--subnet-ids`,a(e.subnetIds.join(` `),`SubnetIds`))]}]}var w=C;export{w as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as ee}from"./useNavigate.js";import{tn as te}from"./cluster-config.js";import{t as ne}from"./back-link.js";import{n as r,r as i,t as re}from"./cli-command-panel.js";import{t as ie}from"./input.js";import{M as ae,O as oe}from"./ec2.js";import{v as se}from"./rds.js";import{i as ce}from"./rds2.js";import{a as le,i as ue,t as de}from"./zod.js";import{t as fe}from"./error-banner.js";import{t as pe}from"./form-actions.js";import{t as me}from"./page-heading.js";import{a as he,n as ge,r as _e,t as ve}from"./field.js";import{t as ye}from"./tags-field-array.js";var be=t(),a=e();function xe(e){let t=te(e.Tags),n=[e.CidrBlock,e.AvailabilityZone,t].filter(Boolean);return`${e.SubnetId} (${n.join(`, `)})`}function o(){let e=(0,be.c)(94),t=ee(),r=ce(),{data:i}=n(oe),{data:o}=n(ae),s;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=de(se),e[0]=s):s=e[0];let c;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(c={resolver:s,defaultValues:{dbSubnetGroupName:``,dbSubnetGroupDescription:``,subnetIds:[],tags:[]}},e[1]=c):c=e[1];let{control:l,formState:we,handleSubmit:Te,register:u,setValue:Ee}=ue(c),{errors:d,isSubmitting:De}=we,f;e[2]===l?f=e[3]:(f={control:l},e[2]=l,e[3]=f);let p=le(f),m;e[4]===p.subnetIds?m=e[5]:(m=p.subnetIds??[],e[4]=p.subnetIds,e[5]=m);let h=m,g;e[6]===h?g=e[7]:(g=new Set(h),e[6]=h,e[7]=g);let Oe=g,_;e[8]===i.Subnets?_=e[9]:(_=i.Subnets??[],e[8]=i.Subnets,e[9]=_);let v=_,y;e[10]===o.Vpcs?y=e[11]:(y=o.Vpcs??[],e[10]=o.Vpcs,e[11]=y);let ke=y,b;e[12]!==h||e[13]!==v?(b=v.find(e=>e.SubnetId===h[0])?.VpcId,e[12]=h,e[13]=v,e[14]=b):b=e[14];let x=b,S;e[15]===v?S=e[16]:(S=new Set(v.map(Se).filter(Boolean)),e[15]=v,e[16]=S);let C;e[17]===S?C=e[18]:(C=[...S],e[17]=S,e[18]=C);let Ae=C,w;e[19]!==h||e[20]!==Ee?(w=e=>{let t=h.includes(e)?h.filter(t=>t!==e):[...h,e];Ee(`subnetIds`,t,{shouldValidate:!0})},e[19]=h,e[20]=Ee,e[21]=w):w=e[21];let je=w,T;e[22]!==r||e[23]!==t?(T=async e=>{await r.mutateAsync(e),await t({to:`/rds/describe-db-subnet-groups`})},e[22]=r,e[23]=t,e[24]=T):T=e[24];let E=T,D,O;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,a.jsx)(ne,{to:`/rds/describe-db-subnet-groups`,children:`Back to subnet groups`}),O=(0,a.jsx)(me,{title:`Create DB Subnet Group`}),e[25]=D,e[26]=O):(D=e[25],O=e[26]);let k;e[27]===r.error?k=e[28]:(k=r.error&&(0,a.jsx)(fe,{error:r.error,msg:`Failed to create the DB subnet group`}),e[27]=r.error,e[28]=k);let A;e[29]!==Te||e[30]!==E?(A=Te(E),e[29]=Te,e[30]=E,e[31]=A):A=e[31];let j;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,a.jsx)(he,{children:(0,a.jsx)(`label`,{htmlFor:`subnet-group-name`,children:`Name`})}),e[32]=j):j=e[32];let Me=!!d.dbSubnetGroupName,M;e[33]===u?M=e[34]:(M=u(`dbSubnetGroupName`),e[33]=u,e[34]=M);let N;e[35]!==Me||e[36]!==M?(N=(0,a.jsx)(ie,{"aria-invalid":Me,id:`subnet-group-name`,placeholder:`orders-db-subnets`,...M}),e[35]=Me,e[36]=M,e[37]=N):N=e[37];let P;e[38]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,a.jsx)(ge,{children:`Letters, digits and hyphens, starting with a letter. The name cannot be changed later, and there is no ModifyDBSubnetGroup — editing a group means deleting and recreating it.`}),e[38]=P):P=e[38];let F;e[39]===d.dbSubnetGroupName?F=e[40]:(F=(0,a.jsx)(_e,{errors:[d.dbSubnetGroupName]}),e[39]=d.dbSubnetGroupName,e[40]=F);let I;e[41]!==N||e[42]!==F?(I=(0,a.jsxs)(ve,{children:[j,N,P,F]}),e[41]=N,e[42]=F,e[43]=I):I=e[43];let L;e[44]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,a.jsx)(he,{children:(0,a.jsx)(`label`,{htmlFor:`subnet-group-description`,children:`Description`})}),e[44]=L):L=e[44];let Ne=!!d.dbSubnetGroupDescription,R;e[45]===u?R=e[46]:(R=u(`dbSubnetGroupDescription`),e[45]=u,e[46]=R);let z;e[47]!==Ne||e[48]!==R?(z=(0,a.jsx)(ie,{"aria-invalid":Ne,id:`subnet-group-description`,placeholder:`Private subnets for the orders database`,...R}),e[47]=Ne,e[48]=R,e[49]=z):z=e[49];let B;e[50]===d.dbSubnetGroupDescription?B=e[51]:(B=(0,a.jsx)(_e,{errors:[d.dbSubnetGroupDescription]}),e[50]=d.dbSubnetGroupDescription,e[51]=B);let V;e[52]!==z||e[53]!==B?(V=(0,a.jsxs)(ve,{children:[L,z,B]}),e[52]=z,e[53]=B,e[54]=V):V=e[54];let H;e[55]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,a.jsx)(he,{children:`Subnets`}),e[55]=H):H=e[55];let U;e[56]!==x||e[57]!==Oe||e[58]!==v||e[59]!==je||e[60]!==Ae||e[61]!==ke?(U=v.length===0?(0,a.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in this account. Create one before creating a subnet group.`}):(0,a.jsx)(`div`,{className:`space-y-4`,children:Ae.map(e=>{let t=te(ke.find(t=>t.VpcId===e)?.Tags),n=x!==void 0&&x!==e;return(0,a.jsxs)(`div`,{children:[(0,a.jsxs)(`p`,{className:`mb-1 font-mono text-xs text-muted-foreground`,children:[e,t&&` (${t})`,n&&` — a subnet group must span one VPC, so this one is out of reach`]}),(0,a.jsx)(`div`,{className:`space-y-1 pl-3`,children:v.filter(t=>t.VpcId===e).map(e=>(0,a.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,a.jsx)(`input`,{"aria-label":`Subnet ${xe(e)}`,checked:Oe.has(e.SubnetId??``),disabled:n,onChange:()=>je(e.SubnetId??``),type:`checkbox`}),(0,a.jsx)(`span`,{className:`font-mono`,children:xe(e)})]},e.SubnetId))})]},e)})}),e[56]=x,e[57]=Oe,e[58]=v,e[59]=je,e[60]=Ae,e[61]=ke,e[62]=U):U=e[62];let W;e[63]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,a.jsxs)(ge,{children:[`At most `,20,` subnets, all in one VPC. This platform is single-AZ, so the two-AZ rule AWS enforces does not apply here.`]}),e[63]=W):W=e[63];let G;e[64]===d.subnetIds?G=e[65]:(G=(0,a.jsx)(_e,{errors:[d.subnetIds]}),e[64]=d.subnetIds,e[65]=G);let K;e[66]!==U||e[67]!==G?(K=(0,a.jsxs)(ve,{children:[H,U,W,G]}),e[66]=U,e[67]=G,e[68]=K):K=e[68];let q;e[69]===l?q=e[70]:(q=(0,a.jsx)(ye,{control:l,name:`tags`}),e[69]=l,e[70]=q);let Pe=p.dbSubnetGroupName??``,Fe=p.dbSubnetGroupDescription??``,J;e[71]!==h||e[72]!==Pe||e[73]!==Fe?(J=Ce({dbSubnetGroupName:Pe,dbSubnetGroupDescription:Fe,subnetIds:h}),e[71]=h,e[72]=Pe,e[73]=Fe,e[74]=J):J=e[74];let Y;e[75]===J?Y=e[76]:(Y=(0,a.jsx)(re,{commands:J}),e[75]=J,e[76]=Y);let X;e[77]===t?X=e[78]:(X=async()=>await t({to:`/rds/describe-db-subnet-groups`}),e[77]=t,e[78]=X);let Z;e[79]!==r.isPending||e[80]!==De||e[81]!==X?(Z=(0,a.jsx)(pe,{isPending:r.isPending,isSubmitting:De,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Subnet Group`}),e[79]=r.isPending,e[80]=De,e[81]=X,e[82]=Z):Z=e[82];let Q;e[83]!==A||e[84]!==I||e[85]!==V||e[86]!==K||e[87]!==q||e[88]!==Y||e[89]!==Z?(Q=(0,a.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,V,K,q,Y,Z]}),e[83]=A,e[84]=I,e[85]=V,e[86]=K,e[87]=q,e[88]=Y,e[89]=Z,e[90]=Q):Q=e[90];let $;return e[91]!==k||e[92]!==Q?($=(0,a.jsxs)(a.Fragment,{children:[D,O,k,Q]}),e[91]=k,e[92]=Q,e[93]=$):$=e[93],$}function Se(e){return e.VpcId??``}function Ce(e){return[{label:`Create DB Subnet Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws rds create-db-subnet-group`},...i(`--db-subnet-group-name`,r(e.dbSubnetGroupName,`DBSubnetGroupName`)),...i(`--db-subnet-group-description`,`"${r(e.dbSubnetGroupDescription,`DBSubnetGroupDescription`)}"`),...i(`--subnet-ids`,r(e.subnetIds.join(` `),`SubnetIds`))]}]}var s=o;export{s as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-load-balancer.js b/spinifex/services/spinifexui/frontend/dist/assets/create-load-balancer.js index c5396ec0e..82ece5a46 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-load-balancer.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-load-balancer.js @@ -1,21 +1,21 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as ee}from"./useNavigate.js";import{tn as te}from"./cluster-config.js";import{t as ne}from"./back-link.js";import{c as a,i as o,n as s,s as re,t as c}from"./select.js";import{t as ie}from"./cli-command-panel.js";import{t as ae}from"./button.js";import{t as oe}from"./input.js";import{t as l}from"./acm.js";import{t as se}from"./certificate-import-dialog.js";import{M as ce,O as le,w as ue}from"./ec2.js";import{n as de}from"./elbv2.js";import{o as fe,u as pe}from"./elbv22.js";import{a as u,i as me,n as d,t as he}from"./zod.js";import{t as ge}from"./error-banner.js";import{t as _e}from"./form-actions.js";import{t as ve}from"./page-heading.js";import{a as f,r as p,t as m}from"./field.js";import{t as ye}from"./tags-field-array.js";import{t as be}from"./target-group-form.js";import{a as xe,c as Se,o as Ce,r as we,s as Te,t as Ee}from"./elbv23.js";var De=r(),Oe=e(n(),1),h=t();function ke(e){let t=te(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function Ae(e){let t=te(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function je(e){return e===`TLS`||e===`TCP`?`TCP`:e===`UDP`?`UDP`:e===`TCP_UDP`?`TCP_UDP`:`HTTP`}function Me(e){let t=new Map;for(let n of e){let e=n.AvailabilityZone??`unknown`,r=t.get(e)??[];r.push(n),t.set(e,r)}return[...t.entries()].toSorted((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>({az:e,subnets:t}))}function Ne(){let e=(0,De.c)(204),t=ee(),{data:n}=i(ce),{data:r}=i(le),{data:te}=i(ue),{data:o}=i(pe),{data:ke}=i(l),{data:Ne}=i(fe),g=de(),[_,Ue]=(0,Oe.useState)(null),[We,Ge]=(0,Oe.useState)(!1),Ke;e[0]===n.Vpcs?Ke=e[1]:(Ke=n.Vpcs??[],e[0]=n.Vpcs,e[1]=Ke);let v=Ke,qe=r.Subnets??[],Je=te.SecurityGroups??[],Ye;e[2]===o.TargetGroups?Ye=e[3]:(Ye=o.TargetGroups??[],e[2]=o.TargetGroups,e[3]=Ye);let Xe=Ye,Ze;e[4]===ke.CertificateSummaryList?Ze=e[5]:(Ze=ke.CertificateSummaryList??[],e[4]=ke.CertificateSummaryList,e[5]=Ze);let Qe=Ze,$e;e[6]===Ne.SslPolicies?$e=e[7]:($e=Ne.SslPolicies??[],e[6]=Ne.SslPolicies,e[7]=$e);let et=$e,tt;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(tt=he(we),e[8]=tt):tt=e[8];let nt=v[0]?.VpcId??``,rt,it,at,ot;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(rt=[],it=[],at=[],ot={protocol:`HTTP`,port:80,targetGroupMode:`new`,existingTargetGroupArn:``,certificateArn:void 0,sslPolicy:void 0},e[9]=rt,e[10]=it,e[11]=at,e[12]=ot):(rt=e[9],it=e[10],at=e[11],ot=e[12]);let st;e[13]===nt?st=e[14]:(st={resolver:tt,defaultValues:{name:``,type:`application`,scheme:`internet-facing`,vpcId:nt,subnetIds:rt,securityGroupIds:it,tags:at,listener:ot}},e[13]=nt,e[14]=st);let ct=me(st),lt;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(lt=he(xe),e[15]=lt):lt=e[15];let ut=v[0]?.VpcId??``,dt,ft;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(dt={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},ft=[],e[16]=dt,e[17]=ft):(dt=e[16],ft=e[17]);let pt;e[18]===ut?pt=e[19]:(pt={resolver:lt,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:ut,healthCheck:dt,tags:ft}},e[18]=ut,e[19]=pt);let y=me(pt),{handleSubmit:mt,register:b,watch:ht,control:x,setValue:S,getValues:C,formState:gt}=ct,{errors:w,isSubmitting:_t}=gt,vt;e[20]===x?vt=e[21]:(vt={control:x,name:`vpcId`},e[20]=x,e[21]=vt);let T=u(vt),yt;e[22]===x?yt=e[23]:(yt={control:x,name:`subnetIds`},e[22]=x,e[23]=yt);let bt=u(yt),xt;e[24]===x?xt=e[25]:(xt={control:x,name:`securityGroupIds`},e[24]=x,e[25]=xt);let St=u(xt),Ct;e[26]===bt?Ct=e[27]:(Ct=new Set(bt),e[26]=bt,e[27]=Ct);let wt=Ct,Tt;e[28]===St?Tt=e[29]:(Tt=new Set(St),e[28]=St,e[29]=Tt);let Et=Tt,Dt;e[30]===x?Dt=e[31]:(Dt={control:x,name:`type`},e[30]=x,e[31]=Dt);let Ot=u(Dt),kt;e[32]===x?kt=e[33]:(kt={control:x,name:`listener.protocol`},e[32]=x,e[33]=kt);let E=u(kt),At;e[34]===x?At=e[35]:(At={control:x,name:`listener.targetGroupMode`},e[34]=x,e[35]=At);let D=u(At),jt=Ot===`network`,Mt;e[36]===E?Mt=e[37]:(Mt=Te(E),e[36]=E,e[37]=Mt);let Nt=Mt,Pt;e[38]===Ot?Pt=e[39]:(Pt=Se(Ot),e[38]=Ot,e[39]=Pt);let Ft=Pt,It;e[40]===jt?It=e[41]:(It=jt?[`TCP`,`UDP`,`TLS`,`TCP_UDP`]:[`HTTP`,`HTTPS`],e[40]=jt,e[41]=It);let Lt=It,Rt;e[42]===T?Rt=e[43]:(Rt=e=>e.VpcId===T,e[42]=T,e[43]=Rt);let zt=qe.filter(Rt),Bt;e[44]===T?Bt=e[45]:(Bt=e=>e.VpcId===T,e[44]=T,e[45]=Bt);let Vt=Je.filter(Bt),Ht;if(e[46]!==Xe||e[47]!==T){let t;e[49]===T?t=e[50]:(t=e=>e.VpcId===T,e[49]=T,e[50]=t),Ht=Xe.filter(t),e[46]=Xe,e[47]=T,e[48]=Ht}else Ht=e[48];let Ut=Ht,Wt;e[51]===y?Wt=e[52]:(Wt=e=>{let t=je(e);y.setValue(`protocol`,t),y.setValue(`healthCheck.protocol`,t===`HTTP`?`HTTP`:`TCP`)},e[51]=y,e[52]=Wt);let O=Wt,Gt;e[53]!==S||e[54]!==O?(Gt=e=>{S(`type`,e);let t=Ce(e);S(`listener.protocol`,t),S(`listener.port`,80),S(`listener.certificateArn`,void 0),S(`listener.sslPolicy`,void 0),e===`network`&&S(`securityGroupIds`,[]),O(t)},e[53]=S,e[54]=O,e[55]=Gt):Gt=e[55];let Kt=Gt,qt;e[56]!==C||e[57]!==S||e[58]!==O?(qt=e=>{S(`listener.protocol`,e);let t=C(`listener.port`);Te(e)?(t===80&&S(`listener.port`,443),e===`HTTPS`&&!C(`listener.sslPolicy`)&&S(`listener.sslPolicy`,Ee)):(t===443&&S(`listener.port`,80),S(`listener.certificateArn`,void 0),S(`listener.sslPolicy`,void 0)),O(e)},e[56]=C,e[57]=S,e[58]=O,e[59]=qt):qt=e[59];let Jt=qt,Yt;e[60]!==S||e[61]!==y?(Yt=e=>{let t=(e===void 0?``:e)??``;S(`vpcId`,t,{shouldValidate:!0}),S(`subnetIds`,[],{shouldValidate:!0}),S(`securityGroupIds`,[]),S(`listener.existingTargetGroupArn`,``),y.setValue(`vpcId`,t)},e[60]=S,e[61]=y,e[62]=Yt):Yt=e[62];let Xt=Yt,Zt;e[63]!==C||e[64]!==S?(Zt=e=>{let t=C(`subnetIds`),n=t.includes(e)?t.filter(t=>t!==e):[...t,e];S(`subnetIds`,n,{shouldValidate:!0})},e[63]=C,e[64]=S,e[65]=Zt):Zt=e[65];let Qt=Zt,$t;e[66]!==C||e[67]!==S?($t=e=>{let t=C(`securityGroupIds`),n=t.includes(e)?t.filter(t=>t!==e):[...t,e];S(`securityGroupIds`,n)},e[66]=C,e[67]=S,e[68]=$t):$t=e[68];let en=$t,tn;e[69]!==t||e[70]!==y||e[71]!==g?(tn=async e=>{Ue(null);let n;if(e.listener.targetGroupMode===`new`){if(!await y.trigger())return;n=y.getValues()}let r=await g.mutateAsync({lb:{name:e.name,type:e.type,scheme:e.scheme,vpcId:e.vpcId,subnetIds:e.subnetIds,securityGroupIds:e.securityGroupIds,tags:e.tags},listener:{protocol:e.listener.protocol,port:e.listener.port,targetGroupMode:e.listener.targetGroupMode,existingTargetGroupArn:e.listener.existingTargetGroupArn,certificateArn:e.listener.certificateArn,sslPolicy:e.listener.sslPolicy,newTargetGroup:n}});Ue(r),!r.error&&r.loadBalancerArn&&t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(r.loadBalancerArn)}})},e[69]=t,e[70]=y,e[71]=g,e[72]=tn):tn=e[72];let nn=tn,rn=Me(zt),k,A;e[73]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,h.jsx)(ne,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),A=(0,h.jsx)(ve,{title:`Create Load Balancer`}),e[73]=k,e[74]=A):(k=e[73],A=e[74]);let j;e[75]===g.error?j=e[76]:(j=g.error&&(0,h.jsx)(ge,{error:g.error,msg:`Failed to create load balancer`}),e[75]=g.error,e[76]=j);let M;e[77]===_?M=e[78]:(M=_?.error&&(0,h.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,h.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,_.failedStep]}),(0,h.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:_.error.message}),_.created.length>0&&(0,h.jsxs)(`div`,{className:`mt-3`,children:[(0,h.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources (clean up manually if needed):`}),(0,h.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:_.created.map(Ve)})]})]}),e[77]=_,e[78]=M);let N;e[79]!==mt||e[80]!==nn?(N=mt(nn),e[79]=mt,e[80]=nn,e[81]=N):N=e[81];let an;e[82]===Symbol.for(`react.memo_cache_sentinel`)?(an=(0,h.jsx)(f,{children:(0,h.jsx)(`label`,{htmlFor:`lb-name`,children:`Name`})}),e[82]=an):an=e[82];let on=!!w.name,P;e[83]===b?P=e[84]:(P=b(`name`),e[83]=b,e[84]=P);let F;e[85]!==on||e[86]!==P?(F=(0,h.jsx)(oe,{"aria-invalid":on,id:`lb-name`,placeholder:`my-load-balancer`,...P}),e[85]=on,e[86]=P,e[87]=F):F=e[87];let I;e[88]===w.name?I=e[89]:(I=(0,h.jsx)(p,{errors:[w.name]}),e[88]=w.name,e[89]=I);let L;e[90]!==F||e[91]!==I?(L=(0,h.jsxs)(m,{children:[an,F,I]}),e[90]=F,e[91]=I,e[92]=L):L=e[92];let sn;e[93]===Symbol.for(`react.memo_cache_sentinel`)?(sn=(0,h.jsx)(f,{children:`Type`}),e[93]=sn):sn=e[93];let R;e[94]===Kt?R=e[95]:(R=e=>{let{field:t}=e;return(0,h.jsxs)(`div`,{className:`flex gap-4`,children:[(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Application Load Balancer`,checked:t.value===`application`,name:`lb-type`,onChange:()=>Kt(`application`),type:`radio`}),`Application (ALB)`]}),(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Network Load Balancer`,checked:t.value===`network`,name:`lb-type`,onChange:()=>Kt(`network`),type:`radio`}),`Network (NLB)`]})]})},e[94]=Kt,e[95]=R);let z;e[96]!==x||e[97]!==R?(z=(0,h.jsxs)(m,{children:[sn,(0,h.jsx)(d,{control:x,name:`type`,render:R})]}),e[96]=x,e[97]=R,e[98]=z):z=e[98];let cn;e[99]===Symbol.for(`react.memo_cache_sentinel`)?(cn=(0,h.jsx)(f,{children:`Scheme`}),e[99]=cn):cn=e[99];let ln;e[100]===x?ln=e[101]:(ln=(0,h.jsxs)(m,{children:[cn,(0,h.jsx)(d,{control:x,name:`scheme`,render:Be})]}),e[100]=x,e[101]=ln);let un;e[102]===Symbol.for(`react.memo_cache_sentinel`)?(un=(0,h.jsx)(f,{children:(0,h.jsx)(`label`,{htmlFor:`lb-vpc`,children:`VPC`})}),e[102]=un):un=e[102];let B;e[103]!==w.vpcId||e[104]!==Xt||e[105]!==v?(B=e=>{let{field:t}=e;return(0,h.jsxs)(c,{onValueChange:e=>Xt(e),value:t.value??``,children:[(0,h.jsx)(re,{"aria-invalid":!!w.vpcId,className:`w-full`,id:`lb-vpc`,children:(0,h.jsx)(a,{placeholder:`Select VPC`})}),(0,h.jsx)(s,{children:v.map(ze)})]})},e[103]=w.vpcId,e[104]=Xt,e[105]=v,e[106]=B):B=e[106];let V;e[107]!==x||e[108]!==B?(V=(0,h.jsx)(d,{control:x,name:`vpcId`,render:B}),e[107]=x,e[108]=B,e[109]=V):V=e[109];let H;e[110]===w.vpcId?H=e[111]:(H=(0,h.jsx)(p,{errors:[w.vpcId]}),e[110]=w.vpcId,e[111]=H);let U;e[112]!==V||e[113]!==H?(U=(0,h.jsxs)(m,{children:[un,V,H]}),e[112]=V,e[113]=H,e[114]=U):U=e[114];let dn;e[115]===Symbol.for(`react.memo_cache_sentinel`)?(dn=(0,h.jsx)(f,{children:`Subnets (select at least 1)`}),e[115]=dn):dn=e[115];let fn=rn.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,h.jsx)(`div`,{className:`space-y-3`,children:rn.map(e=>(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.az}),(0,h.jsx)(`div`,{className:`space-y-1`,children:e.subnets.map(e=>(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Subnet ${Ae(e)}`,checked:wt.has(e.SubnetId??``),onChange:()=>Qt(e.SubnetId??``),type:`checkbox`}),(0,h.jsx)(`span`,{className:`font-mono`,children:Ae(e)})]},e.SubnetId))})]},e.az))}),W;e[116]===w.subnetIds?W=e[117]:(W=(0,h.jsx)(p,{errors:[w.subnetIds]}),e[116]=w.subnetIds,e[117]=W);let G;e[118]!==fn||e[119]!==W?(G=(0,h.jsxs)(m,{children:[dn,fn,W]}),e[118]=fn,e[119]=W,e[120]=G):G=e[120];let pn=!jt&&(0,h.jsxs)(m,{children:[(0,h.jsx)(f,{children:`Security groups`}),Vt.length===0?(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the selected VPC.`}):(0,h.jsx)(`div`,{className:`space-y-1`,children:Vt.map(e=>(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:Et.has(e.GroupId??``),onChange:()=>en(e.GroupId??``),type:`checkbox`}),(0,h.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),K;e[121]===x?K=e[122]:(K=(0,h.jsx)(ye,{control:x,name:`tags`}),e[121]=x,e[122]=K);let mn;e[123]===Symbol.for(`react.memo_cache_sentinel`)?(mn=(0,h.jsx)(`h2`,{className:`text-sm font-semibold`,children:`First listener & default target group`}),e[123]=mn):mn=e[123];let hn;e[124]===Symbol.for(`react.memo_cache_sentinel`)?(hn=(0,h.jsx)(f,{children:(0,h.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),e[124]=hn):hn=e[124];let q;e[125]!==Jt||e[126]!==Ft?(q=e=>{let{field:t}=e;return(0,h.jsxs)(c,{onValueChange:e=>{e&&Jt(e)},value:t.value,children:[(0,h.jsx)(re,{className:`w-full`,id:`listener-protocol`,children:(0,h.jsx)(a,{})}),(0,h.jsx)(s,{children:Ft.map(Re)})]})},e[125]=Jt,e[126]=Ft,e[127]=q):q=e[127];let J;e[128]!==x||e[129]!==q?(J=(0,h.jsxs)(m,{children:[hn,(0,h.jsx)(d,{control:x,name:`listener.protocol`,render:q})]}),e[128]=x,e[129]=q,e[130]=J):J=e[130];let gn;e[131]===Symbol.for(`react.memo_cache_sentinel`)?(gn=(0,h.jsx)(f,{children:(0,h.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),e[131]=gn):gn=e[131];let _n=!!w.listener?.port,Y;e[132]===b?Y=e[133]:(Y=b(`listener.port`,{valueAsNumber:!0}),e[132]=b,e[133]=Y);let X;e[134]!==_n||e[135]!==Y?(X=(0,h.jsx)(oe,{"aria-invalid":_n,id:`listener-port`,inputMode:`numeric`,type:`number`,...Y}),e[134]=_n,e[135]=Y,e[136]=X):X=e[136];let vn=w.listener?.port,Z;e[137]===vn?Z=e[138]:(Z=(0,h.jsx)(p,{errors:[vn]}),e[137]=vn,e[138]=Z);let Q;e[139]!==X||e[140]!==Z?(Q=(0,h.jsxs)(m,{children:[gn,X,Z]}),e[139]=X,e[140]=Z,e[141]=Q):Q=e[141];let yn;e[142]!==Qe||e[143]!==x||e[144]!==w.listener?.certificateArn||e[145]!==Nt||e[146]!==E||e[147]!==et?(yn=Nt&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)(m,{children:[(0,h.jsx)(f,{children:(0,h.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,h.jsx)(d,{control:x,name:`listener.certificateArn`,render:e=>{let{field:t}=e;return(0,h.jsxs)(c,{onValueChange:t.onChange,value:t.value??``,children:[(0,h.jsx)(re,{"aria-invalid":!!w.listener?.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,h.jsx)(a,{placeholder:`Select certificate`})}),(0,h.jsx)(s,{children:Qe.map(Le)})]})}}),(0,h.jsx)(p,{errors:[w.listener?.certificateArn]}),(0,h.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[Qe.length===0&&(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,h.jsx)(ae,{className:`ml-auto`,onClick:()=>Ge(!0),size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),E===`HTTPS`&&(0,h.jsxs)(m,{children:[(0,h.jsx)(f,{children:(0,h.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,h.jsx)(d,{control:x,name:`listener.sslPolicy`,render:e=>{let{field:t}=e;return(0,h.jsxs)(c,{onValueChange:t.onChange,value:t.value??`ELBSecurityPolicy-2016-08`,children:[(0,h.jsx)(re,{className:`w-full`,id:`listener-ssl-policy`,children:(0,h.jsx)(a,{})}),(0,h.jsx)(s,{children:et.map(Ie)})]})}})]})]}),e[142]=Qe,e[143]=x,e[144]=w.listener?.certificateArn,e[145]=Nt,e[146]=E,e[147]=et,e[148]=yn):yn=e[148];let bn;e[149]===Symbol.for(`react.memo_cache_sentinel`)?(bn=(0,h.jsx)(f,{children:`Default target group`}),e[149]=bn):bn=e[149];let xn;e[150]===x?xn=e[151]:(xn=(0,h.jsxs)(m,{children:[bn,(0,h.jsx)(d,{control:x,name:`listener.targetGroupMode`,render:Fe})]}),e[150]=x,e[151]=xn);let $;e[152]!==x||e[153]!==w.listener?.existingTargetGroupArn||e[154]!==D||e[155]!==Ut?($=D===`existing`&&(0,h.jsxs)(m,{children:[(0,h.jsx)(f,{children:(0,h.jsx)(`label`,{htmlFor:`tg-existing`,children:`Target group`})}),(0,h.jsx)(d,{control:x,name:`listener.existingTargetGroupArn`,render:e=>{let{field:t}=e;return(0,h.jsxs)(c,{onValueChange:t.onChange,value:t.value??``,children:[(0,h.jsx)(re,{"aria-invalid":!!w.listener?.existingTargetGroupArn,className:`w-full`,id:`tg-existing`,children:(0,h.jsx)(a,{placeholder:`Select target group`})}),(0,h.jsx)(s,{children:Ut.map(Pe)})]})}}),(0,h.jsx)(p,{errors:[w.listener?.existingTargetGroupArn]}),Ut.length===0&&(0,h.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups in this VPC. Choose “Create new” instead.`})]}),e[152]=x,e[153]=w.listener?.existingTargetGroupArn,e[154]=D,e[155]=Ut,e[156]=$):$=e[156];let Sn;e[157]!==Lt||e[158]!==y||e[159]!==D||e[160]!==v?(Sn=D===`new`&&(0,h.jsx)(`div`,{className:`space-y-4 border-l-2 border-muted pl-4`,children:(0,h.jsx)(be,{allowedProtocols:Lt,form:y,vpcs:v})}),e[157]=Lt,e[158]=y,e[159]=D,e[160]=v,e[161]=Sn):Sn=e[161];let Cn;e[162]!==J||e[163]!==Q||e[164]!==yn||e[165]!==xn||e[166]!==$||e[167]!==Sn?(Cn=(0,h.jsxs)(`div`,{className:`space-y-4 rounded-md border bg-card p-4`,children:[mn,J,Q,yn,xn,$,Sn]}),e[162]=J,e[163]=Q,e[164]=yn,e[165]=xn,e[166]=$,e[167]=Sn,e[168]=Cn):Cn=e[168];let wn;e[169]===S?wn=e[170]:(wn=e=>S(`listener.certificateArn`,e,{shouldValidate:!0}),e[169]=S,e[170]=wn);let Tn;e[171]!==We||e[172]!==wn?(Tn=(0,h.jsx)(se,{onImported:wn,onOpenChange:Ge,open:We}),e[171]=We,e[172]=wn,e[173]=Tn):Tn=e[173];let En;e[174]!==y.watch||e[175]!==ht?(En=He(ht,y.watch),e[174]=y.watch,e[175]=ht,e[176]=En):En=e[176];let Dn;e[177]===En?Dn=e[178]:(Dn=(0,h.jsx)(ie,{commands:En}),e[177]=En,e[178]=Dn);let On;e[179]===t?On=e[180]:(On=async()=>await t({to:`/ec2/describe-load-balancers`}),e[179]=t,e[180]=On);let kn;e[181]!==_t||e[182]!==On||e[183]!==g.isPending?(kn=(0,h.jsx)(_e,{isPending:g.isPending,isSubmitting:_t,onCancel:On,pendingLabel:`Creating…`,submitLabel:`Create Load Balancer`}),e[181]=_t,e[182]=On,e[183]=g.isPending,e[184]=kn):kn=e[184];let An;e[185]!==N||e[186]!==L||e[187]!==z||e[188]!==ln||e[189]!==U||e[190]!==G||e[191]!==pn||e[192]!==K||e[193]!==Cn||e[194]!==Tn||e[195]!==Dn||e[196]!==kn?(An=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[L,z,ln,U,G,pn,K,Cn,Tn,Dn,kn]}),e[185]=N,e[186]=L,e[187]=z,e[188]=ln,e[189]=U,e[190]=G,e[191]=pn,e[192]=K,e[193]=Cn,e[194]=Tn,e[195]=Dn,e[196]=kn,e[197]=An):An=e[197];let jn;return e[198]!==k||e[199]!==A||e[200]!==j||e[201]!==M||e[202]!==An?(jn=(0,h.jsxs)(h.Fragment,{children:[k,A,j,M,An]}),e[198]=k,e[199]=A,e[200]=j,e[201]=M,e[202]=An,e[203]=jn):jn=e[203],jn}function Pe(e){return(0,h.jsxs)(o,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function Fe(e){let{field:t}=e;return(0,h.jsxs)(`div`,{className:`flex gap-4`,children:[(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Create new target group`,checked:t.value===`new`,name:`tg-mode`,onChange:()=>t.onChange(`new`),type:`radio`}),`Create new`]}),(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Use existing target group`,checked:t.value===`existing`,name:`tg-mode`,onChange:()=>t.onChange(`existing`),type:`radio`}),`Use existing`]})]})}function Ie(e){return(0,h.jsx)(o,{value:e.Name??``,children:e.Name},e.Name)}function Le(e){return(0,h.jsx)(o,{value:e.CertificateArn??``,children:e.DomainName??e.CertificateArn?.split(`/`).pop()},e.CertificateArn)}function Re(e){return(0,h.jsx)(o,{value:e,children:e},e)}function ze(e){return(0,h.jsx)(o,{value:e.VpcId??``,children:ke(e)},e.VpcId)}function Be(e){let{field:t}=e;return(0,h.jsxs)(`div`,{className:`flex gap-4`,children:[(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Internet-facing`,checked:t.value===`internet-facing`,name:`scheme`,onChange:()=>t.onChange(`internet-facing`),type:`radio`}),`Internet-facing`]}),(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Internal`,checked:t.value===`internal`,name:`scheme`,onChange:()=>t.onChange(`internal`),type:`radio`}),`Internal`]})]})}function Ve(e,t){return(0,h.jsxs)(`li`,{children:[e.type,`: `,e.id??`(created)`]},t)}function He(e,t){let n=t=>{let n=e(t);return typeof n==`string`?n:``},r=t=>{let n=e(t);return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]},i=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},ee=n(`name`)||``,te=n(`type`)||`application`,ne=n(`scheme`)||`internet-facing`,a=r(`subnetIds`),o=r(`securityGroupIds`),s=n(`listener.protocol`)||`HTTP`,re=i(`listener.port`)??80,c=n(`listener.certificateArn`),ie=n(`listener.sslPolicy`),ae=n(`listener.targetGroupMode`),oe=n(`listener.existingTargetGroupArn`),l=[],se={type:`comment`,value:te===`network`?`# Create NLB with listener and default target group +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as ee}from"./useNavigate.js";import{tn as a}from"./cluster-config.js";import{t as te}from"./back-link.js";import{c as o,i as s,n as c,s as ne,t as l}from"./select.js";import{t as u}from"./cli-command-panel.js";import{t as d}from"./button.js";import{t as re}from"./input.js";import{t as f}from"./acm.js";import{t as p}from"./certificate-import-dialog.js";import{M as m,O as ie,w as h}from"./ec2.js";import{n as ae}from"./elbv2.js";import{o as oe,u as se}from"./elbv22.js";import{a as g,i as ce,n as _,t as le}from"./zod.js";import{t as ue}from"./error-banner.js";import{t as de}from"./form-actions.js";import{t as fe}from"./page-heading.js";import{a as v,r as y,t as b}from"./field.js";import{t as pe}from"./tags-field-array.js";import{t as x}from"./target-group-form.js";import{a as S,c as C,o as me,r as he,s as ge,t as _e}from"./elbv23.js";var w=r(),ve=e(n(),1),T=t();function E(e){let t=a(e.Tags);return t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`}function ye(e){let t=a(e.Tags);return`${t?`${e.SubnetId} (${t})`:e.SubnetId} · ${e.CidrBlock}`}function be(e){return e===`TLS`||e===`TCP`?`TCP`:e===`UDP`?`UDP`:e===`TCP_UDP`?`TCP_UDP`:`HTTP`}function xe(e){let t=new Map;for(let n of e){let e=n.AvailabilityZone??`unknown`,r=t.get(e)??[];r.push(n),t.set(e,r)}return[...t.entries()].toSorted((e,t)=>e[0].localeCompare(t[0])).map(([e,t])=>({az:e,subnets:t}))}function D(){let e=(0,w.c)(243),t=ee(),{data:n}=i(m),{data:r}=i(ie),{data:a}=i(h),{data:s}=i(se),{data:E}=i(f),{data:D}=i(oe),j=ae(),[M,Oe]=(0,ve.useState)(null),[ke,Ae]=(0,ve.useState)(!1),je;e[0]===n.Vpcs?je=e[1]:(je=n.Vpcs??[],e[0]=n.Vpcs,e[1]=je);let N=je,Me;e[2]===r.Subnets?Me=e[3]:(Me=r.Subnets??[],e[2]=r.Subnets,e[3]=Me);let Ne=Me,Pe;e[4]===a.SecurityGroups?Pe=e[5]:(Pe=a.SecurityGroups??[],e[4]=a.SecurityGroups,e[5]=Pe);let Fe=Pe,Ie;e[6]===s.TargetGroups?Ie=e[7]:(Ie=s.TargetGroups??[],e[6]=s.TargetGroups,e[7]=Ie);let Le=Ie,Re;e[8]===E.CertificateSummaryList?Re=e[9]:(Re=E.CertificateSummaryList??[],e[8]=E.CertificateSummaryList,e[9]=Re);let ze=Re,Be;e[10]===D.SslPolicies?Be=e[11]:(Be=D.SslPolicies??[],e[10]=D.SslPolicies,e[11]=Be);let Ve=Be,He;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(He=le(he),e[12]=He):He=e[12];let Ue=N[0]?.VpcId??``,We,Ge,Ke,qe;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=[],qe=[],We=[],Ge={protocol:`HTTP`,port:80,targetGroupMode:`new`,existingTargetGroupArn:``,certificateArn:void 0,sslPolicy:void 0},e[13]=We,e[14]=Ge,e[15]=Ke,e[16]=qe):(We=e[13],Ge=e[14],Ke=e[15],qe=e[16]);let Je;e[17]===Ue?Je=e[18]:(Je={resolver:He,defaultValues:{name:``,type:`application`,scheme:`internet-facing`,vpcId:Ue,subnetIds:Ke,securityGroupIds:qe,tags:We,listener:Ge}},e[17]=Ue,e[18]=Je);let Ye=ce(Je),Xe;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(Xe=le(S),e[19]=Xe):Xe=e[19];let Ze=N[0]?.VpcId??``,Qe,$e;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(Qe={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},$e=[],e[20]=Qe,e[21]=$e):(Qe=e[20],$e=e[21]);let et;e[22]===Ze?et=e[23]:(et={resolver:Xe,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:Ze,healthCheck:Qe,tags:$e}},e[22]=Ze,e[23]=et);let P=ce(et),{handleSubmit:tt,register:F,watch:nt,control:I,setValue:L,getValues:R,formState:rt}=Ye,{errors:z,isSubmitting:it}=rt,at;e[24]===I?at=e[25]:(at={control:I,name:`vpcId`},e[24]=I,e[25]=at);let B=g(at),ot;e[26]===I?ot=e[27]:(ot={control:I,name:`subnetIds`},e[26]=I,e[27]=ot);let st=g(ot),ct;e[28]===I?ct=e[29]:(ct={control:I,name:`securityGroupIds`},e[28]=I,e[29]=ct);let lt=g(ct),ut;e[30]===st?ut=e[31]:(ut=new Set(st),e[30]=st,e[31]=ut);let dt=ut,ft;e[32]===lt?ft=e[33]:(ft=new Set(lt),e[32]=lt,e[33]=ft);let pt=ft,mt;e[34]===I?mt=e[35]:(mt={control:I,name:`type`},e[34]=I,e[35]=mt);let ht=g(mt),gt;e[36]===I?gt=e[37]:(gt={control:I,name:`listener.protocol`},e[36]=I,e[37]=gt);let _t=g(gt),vt;e[38]===I?vt=e[39]:(vt={control:I,name:`listener.targetGroupMode`},e[38]=I,e[39]=vt);let yt=g(vt),bt=ht===`network`,xt;e[40]===_t?xt=e[41]:(xt=ge(_t),e[40]=_t,e[41]=xt);let St=xt,Ct;e[42]===ht?Ct=e[43]:(Ct=C(ht),e[42]=ht,e[43]=Ct);let wt=Ct,Tt;e[44]===bt?Tt=e[45]:(Tt=bt?[`TCP`,`UDP`,`TLS`,`TCP_UDP`]:[`HTTP`,`HTTPS`],e[44]=bt,e[45]=Tt);let Et=Tt,Dt,Ot,V,H,U,W,G,K,kt,q,J,Y,X,Z;if(e[46]!==Fe||e[47]!==Ne||e[48]!==Le||e[49]!==I||e[50]!==z.name||e[51]!==z.subnetIds||e[52]!==z.vpcId||e[53]!==R||e[54]!==tt||e[55]!==bt||e[56]!==t||e[57]!==F||e[58]!==pt||e[59]!==dt||e[60]!==B||e[61]!==L||e[62]!==P||e[63]!==N||e[64]!==j||e[65]!==M){let n;e[80]===B?n=e[81]:(n=e=>e.VpcId===B,e[80]=B,e[81]=n);let r=Ne.filter(n),i;e[82]===B?i=e[83]:(i=e=>e.VpcId===B,e[82]=B,e[83]=i);let ee=Fe.filter(i),a;if(e[84]!==Le||e[85]!==B){let t;e[87]===B?t=e[88]:(t=e=>e.VpcId===B,e[87]=B,e[88]=t),a=Le.filter(t),e[84]=Le,e[85]=B,e[86]=a}else a=e[86];Z=a;let s;e[89]===P?s=e[90]:(s=e=>{let t=be(e);P.setValue(`protocol`,t),P.setValue(`healthCheck.protocol`,t===`HTTP`?`HTTP`:`TCP`)},e[89]=P,e[90]=s);let u=s,d;e[91]!==L||e[92]!==u?(d=e=>{L(`type`,e);let t=me(e);L(`listener.protocol`,t),L(`listener.port`,80),L(`listener.certificateArn`,void 0),L(`listener.sslPolicy`,void 0),e===`network`&&L(`securityGroupIds`,[]),u(t)},e[91]=L,e[92]=u,e[93]=d):d=e[93];let f=d,p;e[94]!==R||e[95]!==L||e[96]!==u?(p=e=>{L(`listener.protocol`,e);let t=R(`listener.port`);ge(e)?(t===80&&L(`listener.port`,443),e===`HTTPS`&&!R(`listener.sslPolicy`)&&L(`listener.sslPolicy`,_e)):(t===443&&L(`listener.port`,80),L(`listener.certificateArn`,void 0),L(`listener.sslPolicy`,void 0)),u(e)},e[94]=R,e[95]=L,e[96]=u,e[97]=p):p=e[97],Dt=p;let m;e[98]!==L||e[99]!==P?(m=e=>{let t=(e===void 0?``:e)??``;L(`vpcId`,t,{shouldValidate:!0}),L(`subnetIds`,[],{shouldValidate:!0}),L(`securityGroupIds`,[]),L(`listener.existingTargetGroupArn`,``),P.setValue(`vpcId`,t)},e[98]=L,e[99]=P,e[100]=m):m=e[100];let ie=m,h;e[101]!==R||e[102]!==L?(h=e=>{let t=R(`subnetIds`),n=t.includes(e)?t.filter(t=>t!==e):[...t,e];L(`subnetIds`,n,{shouldValidate:!0})},e[101]=R,e[102]=L,e[103]=h):h=e[103];let ae=h,oe;e[104]!==R||e[105]!==L?(oe=e=>{let t=R(`securityGroupIds`),n=t.includes(e)?t.filter(t=>t!==e):[...t,e];L(`securityGroupIds`,n)},e[104]=R,e[105]=L,e[106]=oe):oe=e[106];let se=oe,g;e[107]!==t||e[108]!==P||e[109]!==j?(g=async e=>{Oe(null);let n;if(e.listener.targetGroupMode===`new`){if(!await P.trigger())return;n=P.getValues()}let r=await j.mutateAsync({lb:{name:e.name,type:e.type,scheme:e.scheme,vpcId:e.vpcId,subnetIds:e.subnetIds,securityGroupIds:e.securityGroupIds,tags:e.tags},listener:{protocol:e.listener.protocol,port:e.listener.port,targetGroupMode:e.listener.targetGroupMode,existingTargetGroupArn:e.listener.existingTargetGroupArn,certificateArn:e.listener.certificateArn,sslPolicy:e.listener.sslPolicy,newTargetGroup:n}});Oe(r),!r.error&&r.loadBalancerArn&&t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(r.loadBalancerArn)}})},e[107]=t,e[108]=P,e[109]=j,e[110]=g):g=e[110];let ce=g,le=xe(r);e[111]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,T.jsx)(te,{to:`/ec2/describe-load-balancers`,children:`Back to load balancers`}),J=(0,T.jsx)(fe,{title:`Create Load Balancer`}),e[111]=q,e[112]=J):(q=e[111],J=e[112]),e[113]===j.error?Y=e[114]:(Y=j.error&&(0,T.jsx)(ue,{error:j.error,msg:`Failed to create load balancer`}),e[113]=j.error,e[114]=Y),e[115]===M?X=e[116]:(X=M?.error&&(0,T.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[(0,T.jsxs)(`h2`,{className:`text-sm font-medium text-destructive`,children:[`Wizard failed: `,M.failedStep]}),(0,T.jsx)(`p`,{className:`mt-1 text-sm text-destructive`,children:M.error.message}),M.created.length>0&&(0,T.jsxs)(`div`,{className:`mt-3`,children:[(0,T.jsx)(`p`,{className:`text-xs font-medium text-destructive`,children:`Successfully created resources (clean up manually if needed):`}),(0,T.jsx)(`ul`,{className:`mt-1 list-inside list-disc text-xs text-destructive`,children:M.created.map(Ee)})]})]}),e[115]=M,e[116]=X),Ot=`max-w-4xl space-y-6`,e[117]!==tt||e[118]!==ce?(V=tt(ce),e[117]=tt,e[118]=ce,e[119]=V):V=e[119];let de;e[120]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`lb-name`,children:`Name`})}),e[120]=de):de=e[120];let pe=!!z.name,x;e[121]===F?x=e[122]:(x=F(`name`),e[121]=F,e[122]=x);let S;e[123]!==pe||e[124]!==x?(S=(0,T.jsx)(re,{"aria-invalid":pe,id:`lb-name`,placeholder:`my-load-balancer`,...x}),e[123]=pe,e[124]=x,e[125]=S):S=e[125];let C;e[126]===z.name?C=e[127]:(C=(0,T.jsx)(y,{errors:[z.name]}),e[126]=z.name,e[127]=C),e[128]!==S||e[129]!==C?(H=(0,T.jsxs)(b,{children:[de,S,C]}),e[128]=S,e[129]=C,e[130]=H):H=e[130];let he;e[131]===Symbol.for(`react.memo_cache_sentinel`)?(he=(0,T.jsx)(v,{children:`Type`}),e[131]=he):he=e[131];let w;e[132]===f?w=e[133]:(w=e=>{let{field:t}=e;return(0,T.jsxs)(`div`,{className:`flex gap-4`,children:[(0,T.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,T.jsx)(`input`,{"aria-label":`Application Load Balancer`,checked:t.value===`application`,name:`lb-type`,onChange:()=>f(`application`),type:`radio`}),`Application (ALB)`]}),(0,T.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,T.jsx)(`input`,{"aria-label":`Network Load Balancer`,checked:t.value===`network`,name:`lb-type`,onChange:()=>f(`network`),type:`radio`}),`Network (NLB)`]})]})},e[132]=f,e[133]=w),e[134]!==I||e[135]!==w?(U=(0,T.jsxs)(b,{children:[he,(0,T.jsx)(_,{control:I,name:`type`,render:w})]}),e[134]=I,e[135]=w,e[136]=U):U=e[136];let ve;e[137]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,T.jsx)(v,{children:`Scheme`}),e[137]=ve):ve=e[137],e[138]===I?W=e[139]:(W=(0,T.jsxs)(b,{children:[ve,(0,T.jsx)(_,{control:I,name:`scheme`,render:Te})]}),e[138]=I,e[139]=W);let E;e[140]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`lb-vpc`,children:`VPC`})}),e[140]=E):E=e[140];let D;e[141]!==z.vpcId||e[142]!==ie||e[143]!==N?(D=e=>{let{field:t}=e;return(0,T.jsxs)(l,{onValueChange:e=>ie(e),value:t.value??``,children:[(0,T.jsx)(ne,{"aria-invalid":!!z.vpcId,className:`w-full`,id:`lb-vpc`,children:(0,T.jsx)(o,{placeholder:`Select VPC`})}),(0,T.jsx)(c,{children:N.map(we)})]})},e[141]=z.vpcId,e[142]=ie,e[143]=N,e[144]=D):D=e[144];let O;e[145]!==I||e[146]!==D?(O=(0,T.jsx)(_,{control:I,name:`vpcId`,render:D}),e[145]=I,e[146]=D,e[147]=O):O=e[147];let k;e[148]===z.vpcId?k=e[149]:(k=(0,T.jsx)(y,{errors:[z.vpcId]}),e[148]=z.vpcId,e[149]=k),e[150]!==O||e[151]!==k?(G=(0,T.jsxs)(b,{children:[E,O,k]}),e[150]=O,e[151]=k,e[152]=G):G=e[152];let Se;e[153]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,T.jsx)(v,{children:`Subnets (select at least 1)`}),e[153]=Se):Se=e[153];let Ce=le.length===0?(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No subnets in the selected VPC.`}):(0,T.jsx)(`div`,{className:`space-y-3`,children:le.map(e=>(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:e.az}),(0,T.jsx)(`div`,{className:`space-y-1`,children:e.subnets.map(e=>(0,T.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,T.jsx)(`input`,{"aria-label":`Subnet ${ye(e)}`,checked:dt.has(e.SubnetId??``),onChange:()=>ae(e.SubnetId??``),type:`checkbox`}),(0,T.jsx)(`span`,{className:`font-mono`,children:ye(e)})]},e.SubnetId))})]},e.az))}),A;e[154]===z.subnetIds?A=e[155]:(A=(0,T.jsx)(y,{errors:[z.subnetIds]}),e[154]=z.subnetIds,e[155]=A),e[156]!==Ce||e[157]!==A?(K=(0,T.jsxs)(b,{children:[Se,Ce,A]}),e[156]=Ce,e[157]=A,e[158]=K):K=e[158],kt=!bt&&(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:`Security groups`}),ee.length===0?(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the selected VPC.`}):(0,T.jsx)(`div`,{className:`space-y-1`,children:ee.map(e=>(0,T.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,T.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:pt.has(e.GroupId??``),onChange:()=>se(e.GroupId??``),type:`checkbox`}),(0,T.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),e[46]=Fe,e[47]=Ne,e[48]=Le,e[49]=I,e[50]=z.name,e[51]=z.subnetIds,e[52]=z.vpcId,e[53]=R,e[54]=tt,e[55]=bt,e[56]=t,e[57]=F,e[58]=pt,e[59]=dt,e[60]=B,e[61]=L,e[62]=P,e[63]=N,e[64]=j,e[65]=M,e[66]=Dt,e[67]=Ot,e[68]=V,e[69]=H,e[70]=U,e[71]=W,e[72]=G,e[73]=K,e[74]=kt,e[75]=q,e[76]=J,e[77]=Y,e[78]=X,e[79]=Z}else Dt=e[66],Ot=e[67],V=e[68],H=e[69],U=e[70],W=e[71],G=e[72],K=e[73],kt=e[74],q=e[75],J=e[76],Y=e[77],X=e[78],Z=e[79];let At;e[159]===I?At=e[160]:(At=(0,T.jsx)(pe,{control:I,name:`tags`}),e[159]=I,e[160]=At);let jt;e[161]===Symbol.for(`react.memo_cache_sentinel`)?(jt=(0,T.jsx)(`h2`,{className:`text-sm font-semibold`,children:`First listener & default target group`}),e[161]=jt):jt=e[161];let Mt;e[162]===Symbol.for(`react.memo_cache_sentinel`)?(Mt=(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`listener-protocol`,children:`Protocol`})}),e[162]=Mt):Mt=e[162];let Nt;e[163]!==Dt||e[164]!==wt?(Nt=e=>{let{field:t}=e;return(0,T.jsxs)(l,{onValueChange:e=>{e&&Dt(e)},value:t.value,children:[(0,T.jsx)(ne,{className:`w-full`,id:`listener-protocol`,children:(0,T.jsx)(o,{})}),(0,T.jsx)(c,{children:wt.map(A)})]})},e[163]=Dt,e[164]=wt,e[165]=Nt):Nt=e[165];let Pt;e[166]!==I||e[167]!==Nt?(Pt=(0,T.jsxs)(b,{children:[Mt,(0,T.jsx)(_,{control:I,name:`listener.protocol`,render:Nt})]}),e[166]=I,e[167]=Nt,e[168]=Pt):Pt=e[168];let Ft;e[169]===Symbol.for(`react.memo_cache_sentinel`)?(Ft=(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`listener-port`,children:`Port`})}),e[169]=Ft):Ft=e[169];let It=!!z.listener?.port,Lt;e[170]===F?Lt=e[171]:(Lt=F(`listener.port`,{valueAsNumber:!0}),e[170]=F,e[171]=Lt);let Rt;e[172]!==It||e[173]!==Lt?(Rt=(0,T.jsx)(re,{"aria-invalid":It,id:`listener-port`,inputMode:`numeric`,type:`number`,...Lt}),e[172]=It,e[173]=Lt,e[174]=Rt):Rt=e[174];let zt=z.listener?.port,Bt;e[175]===zt?Bt=e[176]:(Bt=(0,T.jsx)(y,{errors:[zt]}),e[175]=zt,e[176]=Bt);let Vt;e[177]!==Rt||e[178]!==Bt?(Vt=(0,T.jsxs)(b,{children:[Ft,Rt,Bt]}),e[177]=Rt,e[178]=Bt,e[179]=Vt):Vt=e[179];let Q;e[180]!==ze||e[181]!==I||e[182]!==z.listener?.certificateArn||e[183]!==St||e[184]!==_t||e[185]!==Ve?(Q=St&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`listener-certificate`,children:`Certificate`})}),(0,T.jsx)(_,{control:I,name:`listener.certificateArn`,render:e=>{let{field:t}=e;return(0,T.jsxs)(l,{onValueChange:t.onChange,value:t.value??``,children:[(0,T.jsx)(ne,{"aria-invalid":!!z.listener?.certificateArn,className:`w-full`,id:`listener-certificate`,children:(0,T.jsx)(o,{placeholder:`Select certificate`})}),(0,T.jsx)(c,{children:ze.map(Ce)})]})}}),(0,T.jsx)(y,{errors:[z.listener?.certificateArn]}),(0,T.jsxs)(`div`,{className:`mt-1 flex items-center justify-between`,children:[ze.length===0&&(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No certificates imported yet.`}),(0,T.jsx)(d,{className:`ml-auto`,onClick:()=>Ae(!0),size:`sm`,type:`button`,variant:`ghost`,children:`Import certificate…`})]})]}),_t===`HTTPS`&&(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`listener-ssl-policy`,children:`Security policy`})}),(0,T.jsx)(_,{control:I,name:`listener.sslPolicy`,render:e=>{let{field:t}=e;return(0,T.jsxs)(l,{onValueChange:t.onChange,value:t.value??`ELBSecurityPolicy-2016-08`,children:[(0,T.jsx)(ne,{className:`w-full`,id:`listener-ssl-policy`,children:(0,T.jsx)(o,{})}),(0,T.jsx)(c,{children:Ve.map(Se)})]})}})]})]}),e[180]=ze,e[181]=I,e[182]=z.listener?.certificateArn,e[183]=St,e[184]=_t,e[185]=Ve,e[186]=Q):Q=e[186];let Ht;e[187]===Symbol.for(`react.memo_cache_sentinel`)?(Ht=(0,T.jsx)(v,{children:`Default target group`}),e[187]=Ht):Ht=e[187];let Ut;e[188]===I?Ut=e[189]:(Ut=(0,T.jsxs)(b,{children:[Ht,(0,T.jsx)(_,{control:I,name:`listener.targetGroupMode`,render:k})]}),e[188]=I,e[189]=Ut);let Wt;e[190]!==I||e[191]!==z.listener?.existingTargetGroupArn||e[192]!==yt||e[193]!==Z?(Wt=yt===`existing`&&(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`tg-existing`,children:`Target group`})}),(0,T.jsx)(_,{control:I,name:`listener.existingTargetGroupArn`,render:e=>{let{field:t}=e;return(0,T.jsxs)(l,{onValueChange:t.onChange,value:t.value??``,children:[(0,T.jsx)(ne,{"aria-invalid":!!z.listener?.existingTargetGroupArn,className:`w-full`,id:`tg-existing`,children:(0,T.jsx)(o,{placeholder:`Select target group`})}),(0,T.jsx)(c,{children:Z.map(O)})]})}}),(0,T.jsx)(y,{errors:[z.listener?.existingTargetGroupArn]}),Z.length===0&&(0,T.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`No target groups in this VPC. Choose “Create new” instead.`})]}),e[190]=I,e[191]=z.listener?.existingTargetGroupArn,e[192]=yt,e[193]=Z,e[194]=Wt):Wt=e[194];let Gt;e[195]!==Et||e[196]!==P||e[197]!==yt||e[198]!==N?(Gt=yt===`new`&&(0,T.jsx)(`div`,{className:`space-y-4 border-l-2 border-muted pl-4`,children:(0,T.jsx)(x,{allowedProtocols:Et,form:P,vpcs:N})}),e[195]=Et,e[196]=P,e[197]=yt,e[198]=N,e[199]=Gt):Gt=e[199];let Kt;e[200]!==Pt||e[201]!==Vt||e[202]!==Q||e[203]!==Ut||e[204]!==Wt||e[205]!==Gt?(Kt=(0,T.jsxs)(`div`,{className:`space-y-4 rounded-md border bg-card p-4`,children:[jt,Pt,Vt,Q,Ut,Wt,Gt]}),e[200]=Pt,e[201]=Vt,e[202]=Q,e[203]=Ut,e[204]=Wt,e[205]=Gt,e[206]=Kt):Kt=e[206];let qt;e[207]===L?qt=e[208]:(qt=e=>L(`listener.certificateArn`,e,{shouldValidate:!0}),e[207]=L,e[208]=qt);let Jt;e[209]!==ke||e[210]!==qt?(Jt=(0,T.jsx)(p,{onImported:qt,onOpenChange:Ae,open:ke}),e[209]=ke,e[210]=qt,e[211]=Jt):Jt=e[211];let Yt;e[212]!==P.watch||e[213]!==nt?(Yt=De(nt,P.watch),e[212]=P.watch,e[213]=nt,e[214]=Yt):Yt=e[214];let Xt;e[215]===Yt?Xt=e[216]:(Xt=(0,T.jsx)(u,{commands:Yt}),e[215]=Yt,e[216]=Xt);let Zt;e[217]===t?Zt=e[218]:(Zt=async()=>await t({to:`/ec2/describe-load-balancers`}),e[217]=t,e[218]=Zt);let Qt;e[219]!==it||e[220]!==Zt||e[221]!==j.isPending?(Qt=(0,T.jsx)(de,{isPending:j.isPending,isSubmitting:it,onCancel:Zt,pendingLabel:`Creating…`,submitLabel:`Create Load Balancer`}),e[219]=it,e[220]=Zt,e[221]=j.isPending,e[222]=Qt):Qt=e[222];let $;e[223]!==Ot||e[224]!==V||e[225]!==H||e[226]!==U||e[227]!==W||e[228]!==G||e[229]!==K||e[230]!==kt||e[231]!==At||e[232]!==Kt||e[233]!==Jt||e[234]!==Xt||e[235]!==Qt?($=(0,T.jsxs)(`form`,{className:Ot,onSubmit:V,children:[H,U,W,G,K,kt,At,Kt,Jt,Xt,Qt]}),e[223]=Ot,e[224]=V,e[225]=H,e[226]=U,e[227]=W,e[228]=G,e[229]=K,e[230]=kt,e[231]=At,e[232]=Kt,e[233]=Jt,e[234]=Xt,e[235]=Qt,e[236]=$):$=e[236];let $t;return e[237]!==q||e[238]!==J||e[239]!==Y||e[240]!==X||e[241]!==$?($t=(0,T.jsxs)(T.Fragment,{children:[q,J,Y,X,$]}),e[237]=q,e[238]=J,e[239]=Y,e[240]=X,e[241]=$,e[242]=$t):$t=e[242],$t}function O(e){return(0,T.jsxs)(s,{value:e.TargetGroupArn??``,children:[e.TargetGroupName,` · `,e.Protocol,`:`,e.Port]},e.TargetGroupArn)}function k(e){let{field:t}=e;return(0,T.jsxs)(`div`,{className:`flex gap-4`,children:[(0,T.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,T.jsx)(`input`,{"aria-label":`Create new target group`,checked:t.value===`new`,name:`tg-mode`,onChange:()=>t.onChange(`new`),type:`radio`}),`Create new`]}),(0,T.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,T.jsx)(`input`,{"aria-label":`Use existing target group`,checked:t.value===`existing`,name:`tg-mode`,onChange:()=>t.onChange(`existing`),type:`radio`}),`Use existing`]})]})}function Se(e){return(0,T.jsx)(s,{value:e.Name??``,children:e.Name},e.Name)}function Ce(e){return(0,T.jsx)(s,{value:e.CertificateArn??``,children:e.DomainName??e.CertificateArn?.split(`/`).pop()},e.CertificateArn)}function A(e){return(0,T.jsx)(s,{value:e,children:e},e)}function we(e){return(0,T.jsx)(s,{value:e.VpcId??``,children:E(e)},e.VpcId)}function Te(e){let{field:t}=e;return(0,T.jsxs)(`div`,{className:`flex gap-4`,children:[(0,T.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,T.jsx)(`input`,{"aria-label":`Internet-facing`,checked:t.value===`internet-facing`,name:`scheme`,onChange:()=>t.onChange(`internet-facing`),type:`radio`}),`Internet-facing`]}),(0,T.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,T.jsx)(`input`,{"aria-label":`Internal`,checked:t.value===`internal`,name:`scheme`,onChange:()=>t.onChange(`internal`),type:`radio`}),`Internal`]})]})}function Ee(e,t){return(0,T.jsxs)(`li`,{children:[e.type,`: `,e.id??`(created)`]},t)}function De(e,t){let n=t=>{let n=e(t);return typeof n==`string`?n:``},r=t=>{let n=e(t);return Array.isArray(n)?n.filter(e=>typeof e==`string`):[]},i=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},ee=n(`name`)||``,a=n(`type`)||`application`,te=n(`scheme`)||`internet-facing`,o=r(`subnetIds`),s=r(`securityGroupIds`),c=n(`listener.protocol`)||`HTTP`,ne=i(`listener.port`)??80,l=n(`listener.certificateArn`),u=n(`listener.sslPolicy`),d=n(`listener.targetGroupMode`),re=n(`listener.existingTargetGroupArn`),f=[],p={type:`comment`,value:a===`network`?`# Create NLB with listener and default target group `:`# Create ALB with listener and default target group -`},ce=e=>{let n=t(e);return typeof n==`string`?n:``},le=e=>{let n=t(e);return typeof n==`number`&&Number.isFinite(n)?n:void 0};if(ae===`new`){let e=ce(`name`)||``,t=le(`port`)??80,n=ce(`vpcId`),r=ce(`protocol`)||`HTTP`;l.push({label:`Create Target Group`,parts:[se,{type:`variable`,value:`TG_ARN=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ +`},m=e=>{let n=t(e);return typeof n==`string`?n:``},ie=e=>{let n=t(e);return typeof n==`number`&&Number.isFinite(n)?n:void 0};if(d===`new`){let e=m(`name`)||``,t=ie(`port`)??80,n=m(`vpcId`),r=m(`protocol`)||`HTTP`;f.push({label:`Create Target Group`,parts:[p,{type:`variable`,value:`TG_ARN=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ --name`},{type:`value`,value:` ${e}`},{type:`flag`,value:` \\ --protocol`},{type:`value`,value:` ${r}`},{type:`flag`,value:` --port`},{type:`value`,value:` ${t}`},{type:`flag`,value:` \\ --target-type instance --vpc-id`},{type:`value`,value:` ${n||``}`},{type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'TargetGroups[0].TargetGroupArn'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]})}else l.push({label:`Use Existing Target Group`,parts:[se,{type:`variable`,value:`TG_ARN=`},{type:`value`,value:oe||``}]});let ue=[{type:`variable`,value:`LB_ARN=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws elbv2 create-load-balancer`},{type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'TargetGroups[0].TargetGroupArn'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}]})}else f.push({label:`Use Existing Target Group`,parts:[p,{type:`variable`,value:`TG_ARN=`},{type:`value`,value:re||``}]});let h=[{type:`variable`,value:`LB_ARN=`},{type:`bin`,value:`$(AWS_PROFILE=spinifex aws elbv2 create-load-balancer`},{type:`flag`,value:` \\ --name`},{type:`value`,value:` ${ee}`},{type:`flag`,value:` \\ - --scheme`},{type:`value`,value:` ${ne}`},{type:`flag`,value:` \\ - --type`},{type:`value`,value:` ${te}`}];a.length>0&&ue.push({type:`flag`,value:` \\ - --subnets`},{type:`value`,value:` ${a.join(` `)}`}),o.length>0&&ue.push({type:`flag`,value:` \\ - --security-groups`},{type:`value`,value:` ${o.join(` `)}`}),ue.push({type:`flag`,value:` \\ - --query`},{type:`value`,value:` 'LoadBalancers[0].LoadBalancerArn'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}),l.push({label:`Create Load Balancer`,parts:ue});let de=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-listener`},{type:`flag`,value:` \\ + --scheme`},{type:`value`,value:` ${te}`},{type:`flag`,value:` \\ + --type`},{type:`value`,value:` ${a}`}];o.length>0&&h.push({type:`flag`,value:` \\ + --subnets`},{type:`value`,value:` ${o.join(` `)}`}),s.length>0&&h.push({type:`flag`,value:` \\ + --security-groups`},{type:`value`,value:` ${s.join(` `)}`}),h.push({type:`flag`,value:` \\ + --query`},{type:`value`,value:` 'LoadBalancers[0].LoadBalancerArn'`},{type:`flag`,value:` --output`},{type:`value`,value:` text)`}),f.push({label:`Create Load Balancer`,parts:h});let ae=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-listener`},{type:`flag`,value:` \\ --load-balancer-arn`},{type:`variable`,value:` "$LB_ARN"`},{type:`flag`,value:` \\ - --protocol`},{type:`value`,value:` ${s}`},{type:`flag`,value:` \\ - --port`},{type:`value`,value:` ${re}`}];return(s===`HTTPS`||s===`TLS`)&&c&&(de.push({type:`flag`,value:` \\ - --certificates`},{type:`value`,value:` CertificateArn=${c}`}),s===`HTTPS`&&ie&&de.push({type:`flag`,value:` \\ - --ssl-policy`},{type:`value`,value:` ${ie}`})),de.push({type:`flag`,value:` \\ - --default-actions`},{type:`value`,value:` Type=forward,TargetGroupArn="$TG_ARN"`}),l.push({label:`Create Listener`,parts:de}),l}var g=Ne;export{g as component}; \ No newline at end of file + --protocol`},{type:`value`,value:` ${c}`},{type:`flag`,value:` \\ + --port`},{type:`value`,value:` ${ne}`}];return(c===`HTTPS`||c===`TLS`)&&l&&(ae.push({type:`flag`,value:` \\ + --certificates`},{type:`value`,value:` CertificateArn=${l}`}),c===`HTTPS`&&u&&ae.push({type:`flag`,value:` \\ + --ssl-policy`},{type:`value`,value:` ${u}`})),ae.push({type:`flag`,value:` \\ + --default-actions`},{type:`value`,value:` Type=forward,TargetGroupArn="$TG_ARN"`}),f.push({label:`Create Listener`,parts:ae}),f}var j=D;export{j as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/create-target-group.js b/spinifex/services/spinifexui/frontend/dist/assets/create-target-group.js index f74c49957..a56cc6bda 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/create-target-group.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/create-target-group.js @@ -1,4 +1,4 @@ -import{n as e}from"./compiler-runtime.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{M as a}from"./ec2.js";import{i as o}from"./elbv2.js";import{i as s,t as c}from"./zod.js";import{t as l}from"./error-banner.js";import{t as u}from"./form-actions.js";import{t as d}from"./page-heading.js";import{t as f}from"./target-group-form.js";import{a as p}from"./elbv23.js";var m=e();function h(){let e=n(),{data:h}=t(a),_=o(),v=h.Vpcs??[],y=s({resolver:c(p),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:v[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:b,watch:x,formState:{isSubmitting:S}}=y;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(r,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(d,{title:`Create Target Group`}),_.error&&(0,m.jsx)(l,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async t=>{try{let n=(await _.mutateAsync(t)).TargetGroups?.[0]?.TargetGroupArn;e(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(i,{commands:g(x)}),(0,m.jsx)(u,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await e({to:`/ec2/describe-target-groups`}),pendingLabel:`Creating…`,submitLabel:`Create Target Group`})]})]})}function g(e){let t=t=>{let n=e(t);return typeof n==`string`?n:``},n=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},r=t(`name`),i=t(`protocol`)||`HTTP`,a=n(`port`),o=t(`vpcId`),s=t(`healthCheck.protocol`)||`HTTP`,c=t(`healthCheck.path`)||`/`,l=t(`healthCheck.port`)||`traffic-port`,u=n(`healthCheck.intervalSeconds`),d=n(`healthCheck.timeoutSeconds`),f=n(`healthCheck.healthyThresholdCount`),p=n(`healthCheck.unhealthyThresholdCount`),m=t(`healthCheck.matcher`)||`200`,h=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{t as a}from"./cli-command-panel.js";import{M as o}from"./ec2.js";import{i as s}from"./elbv2.js";import{i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{t as p}from"./target-group-form.js";import{a as m}from"./elbv23.js";var h=t(),g=e();function _(){let e=(0,h.c)(38),t=r(),{data:_}=n(o),y=s(),b;e[0]===_.Vpcs?b=e[1]:(b=_.Vpcs??[],e[0]=_.Vpcs,e[1]=b);let x=b,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=l(m),e[2]=S):S=e[2];let C=x[0]?.VpcId??``,w,T;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(w={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},T=[],e[3]=w,e[4]=T):(w=e[3],T=e[4]);let E;e[5]===C?E=e[6]:(E={resolver:S,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:C,healthCheck:w,tags:T}},e[5]=C,e[6]=E);let D=c(E),{handleSubmit:O,watch:k,formState:A}=D,{isSubmitting:j}=A,M;e[7]!==y||e[8]!==t?(M=async e=>{try{let n=(await y.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;t(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}},e[7]=y,e[8]=t,e[9]=M):M=e[9];let N=M,P,F;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,g.jsx)(i,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),F=(0,g.jsx)(f,{title:`Create Target Group`}),e[10]=P,e[11]=F):(P=e[10],F=e[11]);let I;e[12]===y.error?I=e[13]:(I=y.error&&(0,g.jsx)(u,{error:y.error,msg:`Failed to create target group`}),e[12]=y.error,e[13]=I);let L;e[14]!==O||e[15]!==N?(L=O(N),e[14]=O,e[15]=N,e[16]=L):L=e[16];let R;e[17]!==D||e[18]!==x?(R=(0,g.jsx)(p,{form:D,vpcs:x}),e[17]=D,e[18]=x,e[19]=R):R=e[19];let z;e[20]===k?z=e[21]:(z=v(k),e[20]=k,e[21]=z);let B;e[22]===z?B=e[23]:(B=(0,g.jsx)(a,{commands:z}),e[22]=z,e[23]=B);let V;e[24]===t?V=e[25]:(V=async()=>await t({to:`/ec2/describe-target-groups`}),e[24]=t,e[25]=V);let H;e[26]!==y.isPending||e[27]!==j||e[28]!==V?(H=(0,g.jsx)(d,{isPending:y.isPending,isSubmitting:j,onCancel:V,pendingLabel:`Creating…`,submitLabel:`Create Target Group`}),e[26]=y.isPending,e[27]=j,e[28]=V,e[29]=H):H=e[29];let U;e[30]!==L||e[31]!==R||e[32]!==B||e[33]!==H?(U=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[R,B,H]}),e[30]=L,e[31]=R,e[32]=B,e[33]=H,e[34]=U):U=e[34];let W;return e[35]!==I||e[36]!==U?(W=(0,g.jsxs)(g.Fragment,{children:[P,F,I,U]}),e[35]=I,e[36]=U,e[37]=W):W=e[37],W}function v(e){let t=t=>{let n=e(t);return typeof n==`string`?n:``},n=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},r=t(`name`),i=t(`protocol`)||`HTTP`,a=n(`port`),o=t(`vpcId`),s=t(`healthCheck.protocol`)||`HTTP`,c=t(`healthCheck.path`)||`/`,l=t(`healthCheck.port`)||`traffic-port`,u=n(`healthCheck.intervalSeconds`),d=n(`healthCheck.timeoutSeconds`),f=n(`healthCheck.healthyThresholdCount`),p=n(`healthCheck.unhealthyThresholdCount`),m=t(`healthCheck.matcher`)||`200`,h=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\ --name`},{type:`value`,value:` ${r||``}`},{type:`flag`,value:` \\ --protocol`},{type:`value`,value:` ${i}`},{type:`flag`,value:` \\ --port`},{type:`value`,value:` ${a??80}`},{type:`flag`,value:` \\ @@ -11,4 +11,4 @@ import{n as e}from"./compiler-runtime.js";import{t}from"./useSuspenseQuery.js";i --health-check-timeout-seconds`},{type:`value`,value:` ${d??5}`},{type:`flag`,value:` \\ --healthy-threshold-count`},{type:`value`,value:` ${f??5}`},{type:`flag`,value:` \\ --unhealthy-threshold-count`},{type:`value`,value:` ${p??2}`}),g&&h.push({type:`flag`,value:` \\ - --matcher`},{type:`value`,value:` HttpCode=${m}`}),[{label:`Create Target Group`,parts:h}]}var _=h;export{_ as component}; \ No newline at end of file + --matcher`},{type:`value`,value:` HttpCode=${m}`}),[{label:`Create Target Group`,parts:h}]}var y=_;export{y as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/delete-db-instance-dialog.js b/spinifex/services/spinifexui/frontend/dist/assets/delete-db-instance-dialog.js index 2c412282b..3106ce90b 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/delete-db-instance-dialog.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/delete-db-instance-dialog.js @@ -1 +1 @@ -import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{t as a}from"./input.js";import{w as o,y as s}from"./rds.js";import{a as c}from"./rds2.js";import{a as l,n as u,t as d}from"./field.js";import{a as f,i as p,l as m,n as h,o as g,r as _,s as v,t as y}from"./alert-dialog.js";var b=e(n(),1),x=t();function S(e,t=new Date){return o(e,`final`,t)}function C({open:e,onOpenChange:t,dbInstanceIdentifier:n,deletionProtection:o,onDeleted:C,onModify:w}){let T=c(),[E,D]=(0,b.useState)(!1),[O,k]=(0,b.useState)(()=>S(n)),[A,j]=(0,b.useState)(``);function M(e){e||(D(!1),k(S(n)),j(``),T.reset()),t(e)}let N=E?void 0:s.safeParse(O).error?.issues[0]?.message,P=!(E&&A!==n)&&!N;async function F(){try{await T.mutateAsync({dbInstanceIdentifier:n,skipFinalSnapshot:E,finalSnapshotIdentifier:O}),M(!1),C?.()}catch{}}return(0,x.jsx)(y,{onOpenChange:M,open:e,children:(0,x.jsxs)(p,{children:[(0,x.jsxs)(v,{children:[(0,x.jsx)(m,{children:`Delete DB Instance`}),(0,x.jsx)(f,{children:o?`"${n}" has deletion protection enabled and cannot be deleted while it is on.`:`This tears down "${n}". It cannot be undone.`})]}),o?(0,x.jsxs)(`div`,{className:`space-y-3`,children:[(0,x.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Turn deletion protection off first, then delete the instance.`}),w?(0,x.jsx)(i,{onClick:w,size:`sm`,variant:`outline`,children:`Modify Instance`}):(0,x.jsxs)(r,{className:`text-sm text-primary hover:underline`,params:{id:n},to:`/rds/describe-db-instances/$id`,children:[`Open `,n,` to modify it`]})]}):(0,x.jsxs)(`div`,{className:`space-y-4`,children:[(0,x.jsxs)(`label`,{className:`flex items-start gap-2 text-sm`,children:[(0,x.jsx)(`input`,{checked:!E,onChange:e=>D(!e.target.checked),type:`checkbox`}),(0,x.jsxs)(`span`,{children:[`Take a final snapshot before deleting`,(0,x.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:`A final snapshot retains the underlying data volume until that snapshot is itself deleted.`})]})]}),E?(0,x.jsxs)(d,{children:[(0,x.jsx)(l,{children:(0,x.jsxs)(`label`,{htmlFor:`confirmIdentifier`,children:[`Type `,n,` to confirm`]})}),(0,x.jsx)(a,{id:`confirmIdentifier`,onChange:e=>j(e.target.value),placeholder:n,value:A}),(0,x.jsx)(u,{children:`Deleting without a final snapshot destroys the data volume. There is no way back.`})]}):(0,x.jsxs)(d,{children:[(0,x.jsx)(l,{children:(0,x.jsx)(`label`,{htmlFor:`finalSnapshotIdentifier`,children:`Final snapshot name`})}),(0,x.jsx)(a,{"aria-invalid":!!N,id:`finalSnapshotIdentifier`,onChange:e=>k(e.target.value),value:O}),N&&(0,x.jsx)(`p`,{className:`text-xs text-destructive`,children:N})]})]}),T.error&&(0,x.jsx)(`p`,{className:`text-sm text-destructive`,children:T.error.message}),(0,x.jsxs)(g,{children:[(0,x.jsx)(_,{children:`Cancel`}),!o&&(0,x.jsx)(h,{disabled:T.isPending||!P,onClick:e=>{e.preventDefault(),F()},children:T.isPending?`Deleting…`:`Delete`})]})]})})}export{C as t}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./link.js";import{t as a}from"./button.js";import{t as o}from"./input.js";import{w as s,y as c}from"./rds.js";import{a as l}from"./rds2.js";import{a as u,n as d,t as f}from"./field.js";import{a as p,i as m,l as h,n as g,o as _,r as v,s as y,t as b}from"./alert-dialog.js";var x=r(),S=e(n(),1),C=t();function w(e,t=new Date){return s(e,`final`,t)}function T(e){let t=(0,x.c)(46),{open:n,onOpenChange:r,dbInstanceIdentifier:s,deletionProtection:T,onDeleted:E,onModify:D}=e,O=l(),[k,A]=(0,S.useState)(!1),j;t[0]===s?j=t[1]:(j=()=>w(s),t[0]=s,t[1]=j);let[M,N]=(0,S.useState)(j),[P,F]=(0,S.useState)(``),I;t[2]!==s||t[3]!==O||t[4]!==r?(I=function(e){e||(A(!1),N(w(s)),F(``),O.reset()),r(e)},t[2]=s,t[3]=O,t[4]=r,t[5]=I):I=t[5];let L=I,R;t[6]!==k||t[7]!==M?(R=k?void 0:c.safeParse(M).error?.issues[0]?.message,t[6]=k,t[7]=M,t[8]=R):R=t[8];let z=R,B=!(k&&P!==s)&&!z,V;t[9]!==s||t[10]!==O||t[11]!==L||t[12]!==E||t[13]!==k||t[14]!==M?(V=async function(){try{await O.mutateAsync({dbInstanceIdentifier:s,skipFinalSnapshot:k,finalSnapshotIdentifier:M}),L(!1),E?.()}catch{}},t[9]=s,t[10]=O,t[11]=L,t[12]=E,t[13]=k,t[14]=M,t[15]=V):V=t[15];let H=V,U;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,C.jsx)(h,{children:`Delete DB Instance`}),t[16]=U):U=t[16];let W=T?`"${s}" has deletion protection enabled and cannot be deleted while it is on.`:`This tears down "${s}". It cannot be undone.`,G;t[17]===W?G=t[18]:(G=(0,C.jsxs)(y,{children:[U,(0,C.jsx)(p,{children:W})]}),t[17]=W,t[18]=G);let K;t[19]!==s||t[20]!==T||t[21]!==D||t[22]!==k||t[23]!==M||t[24]!==z||t[25]!==P?(K=T?(0,C.jsxs)(`div`,{className:`space-y-3`,children:[(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Turn deletion protection off first, then delete the instance.`}),D?(0,C.jsx)(a,{onClick:D,size:`sm`,variant:`outline`,children:`Modify Instance`}):(0,C.jsxs)(i,{className:`text-sm text-primary hover:underline`,params:{id:s},to:`/rds/describe-db-instances/$id`,children:[`Open `,s,` to modify it`]})]}):(0,C.jsxs)(`div`,{className:`space-y-4`,children:[(0,C.jsxs)(`label`,{className:`flex items-start gap-2 text-sm`,children:[(0,C.jsx)(`input`,{checked:!k,onChange:e=>A(!e.target.checked),type:`checkbox`}),(0,C.jsxs)(`span`,{children:[`Take a final snapshot before deleting`,(0,C.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:`A final snapshot retains the underlying data volume until that snapshot is itself deleted.`})]})]}),k?(0,C.jsxs)(f,{children:[(0,C.jsx)(u,{children:(0,C.jsxs)(`label`,{htmlFor:`confirmIdentifier`,children:[`Type `,s,` to confirm`]})}),(0,C.jsx)(o,{id:`confirmIdentifier`,onChange:e=>F(e.target.value),placeholder:s,value:P}),(0,C.jsx)(d,{children:`Deleting without a final snapshot destroys the data volume. There is no way back.`})]}):(0,C.jsxs)(f,{children:[(0,C.jsx)(u,{children:(0,C.jsx)(`label`,{htmlFor:`finalSnapshotIdentifier`,children:`Final snapshot name`})}),(0,C.jsx)(o,{"aria-invalid":!!z,id:`finalSnapshotIdentifier`,onChange:e=>N(e.target.value),value:M}),z&&(0,C.jsx)(`p`,{className:`text-xs text-destructive`,children:z})]})]}),t[19]=s,t[20]=T,t[21]=D,t[22]=k,t[23]=M,t[24]=z,t[25]=P,t[26]=K):K=t[26];let q;t[27]===O.error?q=t[28]:(q=O.error&&(0,C.jsx)(`p`,{className:`text-sm text-destructive`,children:O.error.message}),t[27]=O.error,t[28]=q);let J;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,C.jsx)(v,{children:`Cancel`}),t[29]=J):J=t[29];let Y;t[30]!==B||t[31]!==O.isPending||t[32]!==T||t[33]!==H?(Y=!T&&(0,C.jsx)(g,{disabled:O.isPending||!B,onClick:e=>{e.preventDefault(),H()},children:O.isPending?`Deleting…`:`Delete`}),t[30]=B,t[31]=O.isPending,t[32]=T,t[33]=H,t[34]=Y):Y=t[34];let X;t[35]===Y?X=t[36]:(X=(0,C.jsxs)(_,{children:[J,Y]}),t[35]=Y,t[36]=X);let Z;t[37]!==X||t[38]!==G||t[39]!==K||t[40]!==q?(Z=(0,C.jsxs)(m,{children:[G,K,q,X]}),t[37]=X,t[38]=G,t[39]=K,t[40]=q,t[41]=Z):Z=t[41];let Q;return t[42]!==L||t[43]!==n||t[44]!==Z?(Q=(0,C.jsx)(b,{onOpenChange:L,open:n,children:Z}),t[42]=L,t[43]=n,t[44]=Z,t[45]=Q):Q=t[45],Q}export{T as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-db-snapshots.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-db-snapshots.js index b0c216c9c..45360febf 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-db-snapshots.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-db-snapshots.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{Qt as s}from"./cluster-config.js";import{t as c}from"./button.js";import{a as l,d as u,l as d,o as f}from"./rds.js";import{a as p}from"./rds3.js";import{t as m}from"./page-heading.js";import{t as h}from"./state-badge.js";import{t as g}from"./create-db-snapshot-dialog.js";import{t as _}from"./delete-db-snapshot-dialog.js";var v=r(),y=e(n(),1),b=t(),x=[{value:``,label:`All types`},{value:f,label:`Manual`},{value:l,label:`Automated`}];function S(){let e=(0,v.c)(24),t=o(),{data:n}=i(p),[r,l]=(0,y.useState)(``),[f,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)(null),T,E,D;if(e[0]!==n.DBSnapshots||e[1]!==t||e[2]!==r){let i;e[6]===r?i=e[7]:(i=e=>r===``||e.SnapshotType===r,e[6]=r,e[7]=i);let o=(n.DBSnapshots??[]).filter(i);e[8]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,b.jsx)(m,{actions:(0,b.jsx)(c,{onClick:()=>S(!0),children:`Take Snapshot`}),title:`Snapshots`}),e[8]=T):T=e[8];let f;e[9]===r?f=e[10]:(f=x.map(e=>(0,b.jsx)(c,{onClick:()=>l(e.value),size:`sm`,variant:r===e.value?`default`:`outline`,children:e.label},e.value)),e[9]=r,e[10]=f),e[11]===f?E=e[12]:(E=(0,b.jsx)(`div`,{className:`mb-4 flex items-center gap-2`,children:f}),e[11]=f,e[12]=E),D=o.length>0?(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DB instance`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,b.jsx)(`tbody`,{children:o.map(e=>{let n=e.DBSnapshotIdentifier;if(!n)return null;let r=e.DBInstanceIdentifier??``;return(0,b.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,b.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:n},to:`/rds/describe-db-snapshots/$id`,children:n})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:r===``?`—`:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:r},to:`/rds/describe-db-instances/$id`,children:r})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:(0,b.jsx)(h,{state:e.Status})}),(0,b.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:s(e.SnapshotCreateTime)}),(0,b.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,b.jsx)(c,{disabled:!u(e.Status),onClick:async()=>await t({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:n}}),size:`sm`,variant:`outline`,children:`Restore`}),(0,b.jsx)(c,{disabled:!d(e.Status,e.SnapshotType),onClick:()=>w(n),size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB snapshots found.`}),e[0]=n.DBSnapshots,e[1]=t,e[2]=r,e[3]=T,e[4]=E,e[5]=D}else T=e[3],E=e[4],D=e[5];let O;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,b.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`Automated backups live in the reserved rds: namespace and cannot be deleted by hand — the instance's backup retention is what removes them.`}),e[13]=O):O=e[13];let k;e[14]===f?k=e[15]:(k=f&&(0,b.jsx)(g,{onOpenChange:S,open:!0}),e[14]=f,e[15]=k);let A;e[16]===C?A=e[17]:(A=C&&(0,b.jsx)(_,{dbSnapshotIdentifier:C,onOpenChange:e=>!e&&w(null),open:!0}),e[16]=C,e[17]=A);let j;return e[18]!==T||e[19]!==E||e[20]!==D||e[21]!==k||e[22]!==A?(j=(0,b.jsxs)(b.Fragment,{children:[T,E,D,O,k,A]}),e[18]=T,e[19]=E,e[20]=D,e[21]=k,e[22]=A,e[23]=j):j=e[23],j}var C=S;export{C as component}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{Qt as s}from"./cluster-config.js";import{t as c}from"./button.js";import{a as l,d as u,l as d,o as f}from"./rds.js";import{a as p}from"./rds3.js";import{t as m}from"./page-heading.js";import{t as h}from"./state-badge.js";import{t as g}from"./create-db-snapshot-dialog.js";import{t as _}from"./delete-db-snapshot-dialog.js";var v=r(),y=e(n(),1),b=t(),x=[{value:``,label:`All types`},{value:f,label:`Manual`},{value:l,label:`Automated`}];function S(){let e=(0,v.c)(26),t=o(),{data:n}=i(p),[r,l]=(0,y.useState)(``),[f,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)(null),T;e[0]===n.DBSnapshots?T=e[1]:(T=n.DBSnapshots??[],e[0]=n.DBSnapshots,e[1]=T);let E,D,O;if(e[2]!==t||e[3]!==T||e[4]!==r){let n;e[8]===r?n=e[9]:(n=e=>r===``||e.SnapshotType===r,e[8]=r,e[9]=n);let i=T.filter(n);e[10]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,b.jsx)(m,{actions:(0,b.jsx)(c,{onClick:()=>S(!0),children:`Take Snapshot`}),title:`Snapshots`}),e[10]=E):E=e[10];let o;e[11]===r?o=e[12]:(o=x.map(e=>(0,b.jsx)(c,{onClick:()=>l(e.value),size:`sm`,variant:r===e.value?`default`:`outline`,children:e.label},e.value)),e[11]=r,e[12]=o),e[13]===o?D=e[14]:(D=(0,b.jsx)(`div`,{className:`mb-4 flex items-center gap-2`,children:o}),e[13]=o,e[14]=D),O=i.length>0?(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DB instance`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,b.jsx)(`tbody`,{children:i.map(e=>{let n=e.DBSnapshotIdentifier;if(!n)return null;let r=e.DBInstanceIdentifier??``;return(0,b.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,b.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:n},to:`/rds/describe-db-snapshots/$id`,children:n})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:r===``?`—`:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:r},to:`/rds/describe-db-instances/$id`,children:r})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:(0,b.jsx)(h,{state:e.Status})}),(0,b.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:s(e.SnapshotCreateTime)}),(0,b.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,b.jsx)(c,{disabled:!u(e.Status),onClick:async()=>await t({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:n}}),size:`sm`,variant:`outline`,children:`Restore`}),(0,b.jsx)(c,{disabled:!d(e.Status,e.SnapshotType),onClick:()=>w(n),size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB snapshots found.`}),e[2]=t,e[3]=T,e[4]=r,e[5]=E,e[6]=D,e[7]=O}else E=e[5],D=e[6],O=e[7];let k;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,b.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`Automated backups live in the reserved rds: namespace and cannot be deleted by hand — the instance's backup retention is what removes them.`}),e[15]=k):k=e[15];let A;e[16]===f?A=e[17]:(A=f&&(0,b.jsx)(g,{onOpenChange:S,open:!0}),e[16]=f,e[17]=A);let j;e[18]===C?j=e[19]:(j=C&&(0,b.jsx)(_,{dbSnapshotIdentifier:C,onOpenChange:e=>!e&&w(null),open:!0}),e[18]=C,e[19]=j);let M;return e[20]!==E||e[21]!==D||e[22]!==O||e[23]!==A||e[24]!==j?(M=(0,b.jsxs)(b.Fragment,{children:[E,D,O,k,A,j]}),e[20]=E,e[21]=D,e[22]=O,e[23]=A,e[24]=j,e[25]=M):M=e[25],M}var C=S;export{C as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-images.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-images.js index 70633bec5..cf6224b95 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-images.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-images.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{o as r}from"./ec2.js";import{t as i}from"./page-heading.js";import{t as a}from"./list-card.js";import{t as o}from"./state-badge.js";import{i as s}from"./system-managed.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(r),a;if(e[0]!==t.Images){let n=(t.Images??[]).filter(f),r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(i,{title:`Images`}),e[2]=r):r=e[2],a=(0,l.jsxs)(l.Fragment,{children:[r,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[0]=t.Images,e[1]=a}else a=e[1];return a}function d(e){return e.ImageId?(0,l.jsx)(a,{badge:(0,l.jsx)(o,{state:e.State}),params:{id:e.ImageId},subtitle:e.ImageId??``,title:e.Name??e.ImageId??``,to:`/ec2/describe-images/$id`},e.ImageId):null}function f(e){return!s(e)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{o as r}from"./ec2.js";import{t as i}from"./page-heading.js";import{t as a}from"./list-card.js";import{t as o}from"./state-badge.js";import{i as s}from"./system-managed.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(r),a;e[0]===t.Images?a=e[1]:(a=t.Images??[],e[0]=t.Images,e[1]=a);let o;if(e[2]!==a){let t=a.filter(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(i,{title:`Images`}),e[4]=n):n=e[4],o=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[2]=a,e[3]=o}else o=e[3];return o}function d(e){return e.ImageId?(0,l.jsx)(a,{badge:(0,l.jsx)(o,{state:e.State}),params:{id:e.ImageId},subtitle:e.ImageId??``,title:e.Name??e.ImageId??``,to:`/ec2/describe-images/$id`},e.ImageId):null}function f(e){return!s(e)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-key-pairs.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-key-pairs.js index 9807f4424..c39ab9a22 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-key-pairs.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-key-pairs.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{p as a}from"./ec2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(4),{data:t}=n(a),s;if(e[0]!==t.KeyPairs){let n=(t.KeyPairs??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(r,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(i,{variant:`outline`,children:`Import Key Pair`})}),e[2]=a):a=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[a,(0,l.jsx)(r,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(i,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),e[3]=c):c=e[3],s=(0,l.jsxs)(l.Fragment,{children:[c,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),e[0]=t.KeyPairs,e[1]=s}else s=e[1];return s}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:e.KeyPairId??``,title:e.KeyName??``,to:`/ec2/describe-key-pairs/$id`},e.KeyPairId):null}function f(e,t){let n=e.KeyName?.toLowerCase()??``,r=t.KeyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{p as a}from"./ec2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(6),{data:t}=n(a),s;e[0]===t.KeyPairs?s=e[1]:(s=t.KeyPairs??[],e[0]=t.KeyPairs,e[1]=s);let u;if(e[2]!==s){let t=s.toSorted(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(r,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(i,{variant:`outline`,children:`Import Key Pair`})}),e[4]=n):n=e[4];let a;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[n,(0,l.jsx)(r,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(i,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),e[5]=a):a=e[5],u=(0,l.jsxs)(l.Fragment,{children:[a,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),e[2]=s,e[3]=u}else u=e[3];return u}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:e.KeyPairId??``,title:e.KeyName??``,to:`/ec2/describe-key-pairs/$id`},e.KeyPairId):null}function f(e,t){let n=e.KeyName?.toLowerCase()??``,r=t.KeyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/describe-target-groups.js b/spinifex/services/spinifexui/frontend/dist/assets/describe-target-groups.js index 5117282bd..94af67550 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/describe-target-groups.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/describe-target-groups.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{t as o}from"./button.js";import{d as s,u as c}from"./elbv22.js";import{t as l}from"./page-heading.js";var u=t(),d=e();function f(){let e=(0,u.c)(6),t=a(),{data:n}=r(c),s;e[0]===n.TargetGroups?s=e[1]:(s=n.TargetGroups??[],e[0]=n.TargetGroups,e[1]=s);let f=s,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(i,{to:`/ec2/create-target-group`,children:(0,d.jsx)(o,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==t||e[4]!==f?(g=(0,d.jsxs)(d.Fragment,{children:[h,f.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Targets`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`})]})}),(0,d.jsx)(`tbody`,{children:f.map(e=>{if(!e.TargetGroupArn)return null;let n=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(i,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(n)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Port??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.TargetType??``}),(0,d.jsx)(m,{arn:n})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=t,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(e){let t=(0,u.c)(13),{arn:r}=e,i;t[0]===r?i=t[1]:(i=s(r),t[0]=r,t[1]=i);let{data:a,isLoading:o}=n(i);if(o){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`})]}),t[2]=e):e=t[2],e}let c,l;if(t[3]!==a?.TargetHealthDescriptions){c=a?.TargetHealthDescriptions??[];let e={};for(let t of c){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}l=Object.entries(e).map(h).join(`, `)||`—`,t[3]=a?.TargetHealthDescriptions,t[4]=c,t[5]=l}else c=t[4],l=t[5];let f=l,p;t[6]===c.length?p=t[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:c.length}),t[6]=c.length,t[7]=p);let m;t[8]===f?m=t[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),t[8]=f,t[9]=m);let g;return t[10]!==p||t[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),t[10]=p,t[11]=m,t[12]=g):g=t[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{t as o}from"./button.js";import{d as s,u as c}from"./elbv22.js";import{t as l}from"./page-heading.js";var u=t(),d=e();function f(){let e=(0,u.c)(6),t=a(),{data:n}=r(c),s;e[0]===n.TargetGroups?s=e[1]:(s=n.TargetGroups??[],e[0]=n.TargetGroups,e[1]=s);let f=s,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(i,{to:`/ec2/create-target-group`,children:(0,d.jsx)(o,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==t||e[4]!==f?(g=(0,d.jsxs)(d.Fragment,{children:[h,f.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Targets`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`})]})}),(0,d.jsx)(`tbody`,{children:f.map(e=>{if(!e.TargetGroupArn)return null;let n=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(i,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(n)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Port??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.TargetType??``}),(0,d.jsx)(m,{arn:n})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=t,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(e){let t=(0,u.c)(14),{arn:r}=e,i;t[0]===r?i=t[1]:(i=s(r),t[0]=r,t[1]=i);let{data:a,isLoading:o}=n(i);if(o){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`})]}),t[2]=e):e=t[2],e}let c;t[3]===a?.TargetHealthDescriptions?c=t[4]:(c=a?.TargetHealthDescriptions??[],t[3]=a?.TargetHealthDescriptions,t[4]=c);let l=c,f;if(t[5]!==l){let e={};for(let t of l){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}f=Object.entries(e).map(h).join(`, `)||`—`,t[5]=l,t[6]=f}else f=t[6];let p=f,m;t[7]===l.length?m=t[8]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:l.length}),t[7]=l.length,t[8]=m);let g;t[9]===p?g=t[10]:(g=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:p}),t[9]=p,t[10]=g);let _;return t[11]!==m||t[12]!==g?(_=(0,d.jsxs)(d.Fragment,{children:[m,g]}),t[11]=m,t[12]=g,t[13]=_):_=t[13],_}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/field.js b/spinifex/services/spinifexui/frontend/dist/assets/field.js index 97baf9608..d4d589f1f 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/field.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/field.js @@ -1 +1 @@ -import{n as e,r as t,t as n}from"./compiler-runtime.js";import{t as r}from"./dist.js";import{Yt as i}from"./cluster-config.js";import"./separator.js";t();var a=n(),o=e();function s(e){let t=(0,a.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let s;t[3]===n?s=t[4]:(s=i(`group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,n),t[3]=n,t[4]=s);let c;return t[5]!==r||t[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-group`,...r}),t[5]=r,t[6]=s,t[7]=c):c=t[7],c}var c=r(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col [&>*]:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col @md/field-group:flex-row @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function l(e){let t=(0,a.c)(11),n,r,s;t[0]===e?(n=t[1],r=t[2],s=t[3]):({className:n,orientation:s,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=s);let l=s===void 0?`vertical`:s,u;t[4]!==n||t[5]!==l?(u=i(c({orientation:l}),n),t[4]=n,t[5]=l,t[6]=u):u=t[6];let d;return t[7]!==l||t[8]!==r||t[9]!==u?(d=(0,o.jsx)(`div`,{className:u,"data-orientation":l,"data-slot":`field`,role:`group`,...r}),t[7]=l,t[8]=r,t[9]=u,t[10]=d):d=t[10],d}function u(e){let t=(0,a.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let s;t[3]===n?s=t[4]:(s=i(`flex w-fit items-center gap-2 text-xs/relaxed leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,n),t[3]=n,t[4]=s);let c;return t[5]!==r||t[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-label`,...r}),t[5]=r,t[6]=s,t[7]=c):c=t[7],c}function d(e){let t=(0,a.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let s;t[3]===n?s=t[4]:(s=i(`text-left text-xs/relaxed leading-normal font-normal text-muted-foreground group-has-data-[orientation=horizontal]/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,n),t[3]=n,t[4]=s);let c;return t[5]!==r||t[6]!==s?(c=(0,o.jsx)(`p`,{className:s,"data-slot":`field-description`,...r}),t[5]=r,t[6]=s,t[7]=c):c=t[7],c}function f(e){let t=(0,a.c)(15),n,r,s,c;t[0]===e?(n=t[1],r=t[2],s=t[3],c=t[4]):({className:r,children:n,errors:s,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=s,t[4]=c);let l;bb0:{if(n){l=n;break bb0}if(!s?.length){l=null;break bb0}let e;t[5]===s?e=t[6]:(e=[...new Map(s.map(m)).values()],t[5]=s,t[6]=e);let r=e;if(r?.length===1){l=r[0]?.message;break bb0}let i;t[7]===r?i=t[8]:(i=(0,o.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(p)}),t[7]=r,t[8]=i),l=i}let u=l;if(!u)return null;let d;t[9]===r?d=t[10]:(d=i(`text-xs/relaxed font-normal text-destructive`,r),t[9]=r,t[10]=d);let f;return t[11]!==u||t[12]!==c||t[13]!==d?(f=(0,o.jsx)(`div`,{className:d,"data-slot":`field-error`,role:`alert`,...c,children:u}),t[11]=u,t[12]=c,t[13]=d,t[14]=f):f=t[14],f}function p(e){return e?.message&&(0,o.jsx)(`li`,{children:e.message},e.message)}function m(e){return[e?.message,e]}export{u as a,s as i,d as n,f as r,l as t}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./dist.js";import{Yt as r}from"./cluster-config.js";import"./separator.js";var i=t(),a=e();function o(e){let t=(0,i.c)(8),n,o;t[0]===e?(n=t[1],o=t[2]):({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o);let s;t[3]===n?s=t[4]:(s=r(`group/field-group @container/field-group flex w-full flex-col gap-4 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,n),t[3]=n,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`div`,{className:s,"data-slot":`field-group`,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}var s=n(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col [&>*]:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col @md/field-group:flex-row @md/field-group:items-center @md/field-group:has-[>[data-slot=field-content]]:items-start [&>*]:w-full @md/field-group:[&>*]:w-auto [&>.sr-only]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function c(e){let t=(0,i.c)(11),n,o,c;t[0]===e?(n=t[1],o=t[2],c=t[3]):({className:n,orientation:c,...o}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=c);let l=c===void 0?`vertical`:c,u;t[4]!==n||t[5]!==l?(u=r(s({orientation:l}),n),t[4]=n,t[5]=l,t[6]=u):u=t[6];let d;return t[7]!==l||t[8]!==o||t[9]!==u?(d=(0,a.jsx)(`div`,{className:u,"data-orientation":l,"data-slot":`field`,role:`group`,...o}),t[7]=l,t[8]=o,t[9]=u,t[10]=d):d=t[10],d}function l(e){let t=(0,i.c)(8),n,o;t[0]===e?(n=t[1],o=t[2]):({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o);let s;t[3]===n?s=t[4]:(s=r(`flex w-fit items-center gap-2 text-xs/relaxed leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,n),t[3]=n,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`div`,{className:s,"data-slot":`field-label`,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function u(e){let t=(0,i.c)(8),n,o;t[0]===e?(n=t[1],o=t[2]):({className:n,...o}=e,t[0]=e,t[1]=n,t[2]=o);let s;t[3]===n?s=t[4]:(s=r(`text-left text-xs/relaxed leading-normal font-normal text-muted-foreground group-has-data-[orientation=horizontal]/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,n),t[3]=n,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,a.jsx)(`p`,{className:s,"data-slot":`field-description`,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}function d(e){let t=(0,i.c)(15),n,o,s,c;t[0]===e?(n=t[1],o=t[2],s=t[3],c=t[4]):({className:o,children:n,errors:s,...c}=e,t[0]=e,t[1]=n,t[2]=o,t[3]=s,t[4]=c);let l;bb0:{if(n){l=n;break bb0}if(!s?.length){l=null;break bb0}let e;t[5]===s?e=t[6]:(e=[...new Map(s.map(p)).values()],t[5]=s,t[6]=e);let r=e;if(r?.length===1){l=r[0]?.message;break bb0}let i;t[7]===r?i=t[8]:(i=(0,a.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:r.map(f)}),t[7]=r,t[8]=i),l=i}let u=l;if(!u)return null;let d;t[9]===o?d=t[10]:(d=r(`text-xs/relaxed font-normal text-destructive`,o),t[9]=o,t[10]=d);let m;return t[11]!==u||t[12]!==c||t[13]!==d?(m=(0,a.jsx)(`div`,{className:d,"data-slot":`field-error`,role:`alert`,...c,children:u}),t[11]=u,t[12]=c,t[13]=d,t[14]=m):m=t[14],m}function f(e){return e?.message&&(0,a.jsx)(`li`,{children:e.message},e.message)}function p(e){return[e?.message,e]}export{l as a,o as i,u as n,d as r,c as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/gpu-instance-type-select.js b/spinifex/services/spinifexui/frontend/dist/assets/gpu-instance-type-select.js index 6eabcf72c..422e1cfca 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/gpu-instance-type-select.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/gpu-instance-type-select.js @@ -1 +1 @@ -import{n as e,r as t,t as n}from"./compiler-runtime.js";import{en as r}from"./cluster-config.js";import{a as i,c as a,i as o,n as s,o as c,r as l,s as u,t as d}from"./select.js";var f=n();t();var p=e();function m(e){return(e.GpuInfo?.Gpus?.length??0)>0}function h(e){let t=new Map;for(let n of e){let e=n.InstanceType;!e||t.has(e)||t.set(e,{name:e,gpu:n.GpuInfo?.Gpus?.[0]})}return[...t.values()].toSorted((e,t)=>e.name.localeCompare(t.name))}function g(e){let t=(0,f.c)(6),{entry:n,availability:i}=e,a=n.gpu?.MemoryInfo?.SizeInMiB,o;t[0]===a?o=t[1]:(o=a!==void 0&&` — ${r(a)} GPU`,t[0]=a,t[1]=o);let s=i!==void 0&&` (${i} available)`,c;return t[2]!==n.name||t[3]!==o||t[4]!==s?(c=(0,p.jsxs)(p.Fragment,{children:[n.name,o,s]}),t[2]=n.name,t[3]=o,t[4]=s,t[5]=c):c=t[5],c}function _(e){let t=(0,f.c)(33),{instanceTypes:n,value:r,onValueChange:m,availabilityByType:_,disabled:b,id:x,className:S,"aria-invalid":C}=e,w,T;if(t[0]!==n){let e=h(n);w=e.filter(y),T=e.filter(v),t[0]=n,t[1]=w,t[2]=T}else w=t[1],T=t[2];let E;t[3]!==w||t[4]!==T?(E={standardEntries:w,gpuEntries:T},t[3]=w,t[4]=T,t[5]=E):E=t[5];let{standardEntries:D,gpuEntries:O}=E,k=D.length>0&&O.length>0,A;t[6]===m?A=t[7]:(A=e=>m(e??``),t[6]=m,t[7]=A);let j;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(a,{}),t[8]=j):j=t[8];let M;t[9]!==C||t[10]!==S||t[11]!==x?(M=(0,p.jsx)(u,{"aria-invalid":C,className:S,id:x,children:j}),t[9]=C,t[10]=S,t[11]=x,t[12]=M):M=t[12];let N;t[13]!==_||t[14]!==k||t[15]!==D?(N=D.length>0&&(0,p.jsxs)(l,{children:[k&&(0,p.jsx)(i,{children:`Standard`}),D.map(e=>(0,p.jsx)(o,{value:e.name,children:(0,p.jsx)(g,{availability:_?.[e.name],entry:e})},e.name))]}),t[13]=_,t[14]=k,t[15]=D,t[16]=N):N=t[16];let P;t[17]===k?P=t[18]:(P=k&&(0,p.jsx)(c,{}),t[17]=k,t[18]=P);let F;t[19]!==_||t[20]!==O||t[21]!==k?(F=O.length>0&&(0,p.jsxs)(l,{children:[k&&(0,p.jsx)(i,{children:`GPU-Accelerated`}),O.map(e=>(0,p.jsx)(o,{value:e.name,children:(0,p.jsx)(g,{availability:_?.[e.name],entry:e})},e.name))]}),t[19]=_,t[20]=O,t[21]=k,t[22]=F):F=t[22];let I;t[23]!==N||t[24]!==P||t[25]!==F?(I=(0,p.jsxs)(s,{children:[N,P,F]}),t[23]=N,t[24]=P,t[25]=F,t[26]=I):I=t[26];let L;return t[27]!==b||t[28]!==I||t[29]!==A||t[30]!==M||t[31]!==r?(L=(0,p.jsxs)(d,{disabled:b,onValueChange:A,value:r,children:[M,I]}),t[27]=b,t[28]=I,t[29]=A,t[30]=M,t[31]=r,t[32]=L):L=t[32],L}function v(e){return e.gpu}function y(e){return!e.gpu}export{m as n,_ as t}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{en as n}from"./cluster-config.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./select.js";var d=t(),f=e();function p(e){return(e.GpuInfo?.Gpus?.length??0)>0}function m(e){let t=new Map;for(let n of e){let e=n.InstanceType;!e||t.has(e)||t.set(e,{name:e,gpu:n.GpuInfo?.Gpus?.[0]})}return[...t.values()].toSorted((e,t)=>e.name.localeCompare(t.name))}function h(e){let t=(0,d.c)(6),{entry:r,availability:i}=e,a=r.gpu?.MemoryInfo?.SizeInMiB,o;t[0]===a?o=t[1]:(o=a!==void 0&&` — ${n(a)} GPU`,t[0]=a,t[1]=o);let s=i!==void 0&&` (${i} available)`,c;return t[2]!==r.name||t[3]!==o||t[4]!==s?(c=(0,f.jsxs)(f.Fragment,{children:[r.name,o,s]}),t[2]=r.name,t[3]=o,t[4]=s,t[5]=c):c=t[5],c}function g(e){let t=(0,d.c)(33),{instanceTypes:n,value:p,onValueChange:g,availabilityByType:y,disabled:b,id:x,className:S,"aria-invalid":C}=e,w,T;if(t[0]!==n){let e=m(n);w=e.filter(v),T=e.filter(_),t[0]=n,t[1]=w,t[2]=T}else w=t[1],T=t[2];let E;t[3]!==w||t[4]!==T?(E={standardEntries:w,gpuEntries:T},t[3]=w,t[4]=T,t[5]=E):E=t[5];let{standardEntries:D,gpuEntries:O}=E,k=D.length>0&&O.length>0,A;t[6]===g?A=t[7]:(A=e=>g(e??``),t[6]=g,t[7]=A);let j;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,f.jsx)(i,{}),t[8]=j):j=t[8];let M;t[9]!==C||t[10]!==S||t[11]!==x?(M=(0,f.jsx)(l,{"aria-invalid":C,className:S,id:x,children:j}),t[9]=C,t[10]=S,t[11]=x,t[12]=M):M=t[12];let N;t[13]!==y||t[14]!==k||t[15]!==D?(N=D.length>0&&(0,f.jsxs)(c,{children:[k&&(0,f.jsx)(r,{children:`Standard`}),D.map(e=>(0,f.jsx)(a,{value:e.name,children:(0,f.jsx)(h,{availability:y?.[e.name],entry:e})},e.name))]}),t[13]=y,t[14]=k,t[15]=D,t[16]=N):N=t[16];let P;t[17]===k?P=t[18]:(P=k&&(0,f.jsx)(s,{}),t[17]=k,t[18]=P);let F;t[19]!==y||t[20]!==O||t[21]!==k?(F=O.length>0&&(0,f.jsxs)(c,{children:[k&&(0,f.jsx)(r,{children:`GPU-Accelerated`}),O.map(e=>(0,f.jsx)(a,{value:e.name,children:(0,f.jsx)(h,{availability:y?.[e.name],entry:e})},e.name))]}),t[19]=y,t[20]=O,t[21]=k,t[22]=F):F=t[22];let I;t[23]!==N||t[24]!==P||t[25]!==F?(I=(0,f.jsxs)(o,{children:[N,P,F]}),t[23]=N,t[24]=P,t[25]=F,t[26]=I):I=t[26];let L;return t[27]!==b||t[28]!==I||t[29]!==A||t[30]!==M||t[31]!==p?(L=(0,f.jsxs)(u,{disabled:b,onValueChange:A,value:p,children:[M,I]}),t[27]=b,t[28]=I,t[29]=A,t[30]=M,t[31]=p,t[32]=L):L=t[32],L}function _(e){return e.gpu}function v(e){return!e.gpu}export{p as n,g as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/launch-template-data-fields.js b/spinifex/services/spinifexui/frontend/dist/assets/launch-template-data-fields.js index 102066788..8252581e6 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/launch-template-data-fields.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/launch-template-data-fields.js @@ -1,2 +1,2 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as ee}from"./chevron-down.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as te}from"./input.js";import{O as ne,c as re,o as ie,p as ae,w as oe}from"./ec2.js";import{a as se,n as c}from"./zod.js";import{a as l,n as ce,r as le,t as u}from"./field.js";import{t as ue}from"./ec23.js";import{t as de}from"./textarea.js";import{n as fe,r as pe,t as me}from"./collapsible.js";var he=t(),d=e(),ge=`gp3`,_e=1,ve=16384;function f(e){let t=(0,he.c)(105),{control:f,register:p,errors:m}=e,{data:De}=n(ie),{data:Oe}=n(re),{data:ke}=n(ae),{data:Ae}=n(ne),{data:je}=n(oe),h;t[0]===De.Images?h=t[1]:(h=De.Images??[],t[0]=De.Images,t[1]=h);let g=h,_;t[2]===ke.KeyPairs?_=t[3]:(_=ke.KeyPairs??[],t[2]=ke.KeyPairs,t[3]=_);let Me=_,v;t[4]===Ae.Subnets?v=t[5]:(v=Ae.Subnets??[],t[4]=Ae.Subnets,t[5]=v);let y=v,b;t[6]===je.SecurityGroups?b=t[7]:(b=je.SecurityGroups??[],t[6]=je.SecurityGroups,t[7]=b);let x=b,S;t[8]===Oe.InstanceTypes?S=t[9]:(S=[...new Set((Oe.InstanceTypes??[]).map(Ee).filter(Te))].toSorted(),t[8]=Oe.InstanceTypes,t[9]=S);let Ne=S,C;t[10]===f?C=t[11]:(C={control:f,name:`subnetId`},t[10]=f,t[11]=C);let Pe=se(C),w;t[12]!==Pe||t[13]!==y?(w=y.find(e=>e.SubnetId===Pe)?.VpcId,t[12]=Pe,t[13]=y,t[14]=w):w=t[14];let T=w,E;t[15]!==T||t[16]!==x?(E=T?x.filter(e=>e.VpcId===T):x,t[15]=T,t[16]=x,t[17]=E):E=t[17];let Fe=E,Ie;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(Ie=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),t[18]=Ie):Ie=t[18];let D;t[19]!==m.imageId||t[20]!==g?(D=e=>{let{field:t}=e,n=g.find(e=>e.ImageId===t.value);return(0,d.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,d.jsx)(o,{"aria-invalid":!!m.imageId,className:`w-full`,id:`imageId`,children:(0,d.jsx)(r,{children:n?`${n.Name??`Unnamed`} (${n.Architecture})`:``})}),(0,d.jsx)(a,{children:g.map(we)})]})},t[19]=m.imageId,t[20]=g,t[21]=D):D=t[21];let O;t[22]!==f||t[23]!==D?(O=(0,d.jsx)(c,{control:f,name:`imageId`,render:D}),t[22]=f,t[23]=D,t[24]=O):O=t[24];let k;t[25]===m.imageId?k=t[26]:(k=(0,d.jsx)(le,{errors:[m.imageId]}),t[25]=m.imageId,t[26]=k);let A;t[27]!==O||t[28]!==k?(A=(0,d.jsxs)(u,{children:[Ie,O,k]}),t[27]=O,t[28]=k,t[29]=A):A=t[29];let Le;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),t[30]=Le):Le=t[30];let j;t[31]!==m.instanceType||t[32]!==Ne?(j=e=>{let{field:t}=e;return(0,d.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value||``,children:[(0,d.jsx)(o,{"aria-invalid":!!m.instanceType,className:`w-full`,id:`instanceType`,children:(0,d.jsx)(r,{})}),(0,d.jsx)(a,{children:Ne.map(Ce)})]})},t[31]=m.instanceType,t[32]=Ne,t[33]=j):j=t[33];let M;t[34]!==f||t[35]!==j?(M=(0,d.jsx)(c,{control:f,name:`instanceType`,render:j}),t[34]=f,t[35]=j,t[36]=M):M=t[36];let N;t[37]===m.instanceType?N=t[38]:(N=(0,d.jsx)(le,{errors:[m.instanceType]}),t[37]=m.instanceType,t[38]=N);let P;t[39]!==M||t[40]!==N?(P=(0,d.jsxs)(u,{children:[Le,M,N]}),t[39]=M,t[40]=N,t[41]=P):P=t[41];let Re;t[42]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),t[42]=Re):Re=t[42];let F;t[43]===Me?F=t[44]:(F=e=>{let{field:t}=e;return(0,d.jsxs)(s,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,d.jsx)(o,{className:`w-full`,id:`keyName`,children:(0,d.jsx)(r,{})}),(0,d.jsxs)(a,{children:[(0,d.jsx)(i,{value:`none`,children:`none`}),Me.map(Se)]})]})},t[43]=Me,t[44]=F);let I;t[45]!==f||t[46]!==F?(I=(0,d.jsxs)(u,{children:[Re,(0,d.jsx)(c,{control:f,name:`keyName`,render:F})]}),t[45]=f,t[46]=F,t[47]=I):I=t[47];let ze;t[48]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),t[48]=ze):ze=t[48];let L;t[49]===y?L=t[50]:(L=e=>{let{field:t}=e;return(0,d.jsxs)(s,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,d.jsx)(o,{className:`w-full`,id:`subnetId`,children:(0,d.jsx)(r,{})}),(0,d.jsxs)(a,{children:[(0,d.jsx)(i,{value:`none`,children:`none`}),y.map(xe)]})]})},t[49]=y,t[50]=L);let R;t[51]!==f||t[52]!==L?(R=(0,d.jsxs)(u,{children:[ze,(0,d.jsx)(c,{control:f,name:`subnetId`,render:L})]}),t[51]=f,t[52]=L,t[53]=R):R=t[53];let Be;t[54]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,d.jsx)(l,{children:`Security Groups`}),t[54]=Be):Be=t[54];let Ve=T?`Applies to VPC ${T}`:`Showing all security groups — select a subnet to filter by VPC`,z;t[55]===Ve?z=t[56]:(z=(0,d.jsx)(ce,{children:Ve}),t[55]=Ve,t[56]=z);let B;t[57]===Fe?B=t[58]:(B=e=>{let{field:t}=e,n=t.value??[],ee=new Set(n),r=e=>{t.onChange(n.includes(e)?n.filter(t=>t!==e):[...n,e])};return Fe.length===0?(0,d.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups available.`}):(0,d.jsx)(`div`,{className:`space-y-1`,children:Fe.map(e=>(0,d.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,d.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:ee.has(e.GroupId??``),onChange:()=>r(e.GroupId??``),type:`checkbox`}),(0,d.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})},t[57]=Fe,t[58]=B);let V;t[59]!==f||t[60]!==B?(V=(0,d.jsx)(c,{control:f,name:`securityGroupIds`,render:B}),t[59]=f,t[60]=B,t[61]=V):V=t[61];let H;t[62]!==z||t[63]!==V?(H=(0,d.jsxs)(u,{children:[Be,z,V]}),t[62]=z,t[63]=V,t[64]=H):H=t[64];let He,Ue;t[65]===Symbol.for(`react.memo_cache_sentinel`)?(He=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`userData`,children:`User Data`})}),Ue=(0,d.jsx)(ce,{children:`Cloud-init or shell script run at first boot.`}),t[65]=He,t[66]=Ue):(He=t[65],Ue=t[66]);let U;t[67]===p?U=t[68]:(U=p(`userData`),t[67]=p,t[68]=U);let W;t[69]===U?W=t[70]:(W=(0,d.jsxs)(u,{children:[He,Ue,(0,d.jsx)(de,{className:`min-h-32 font-mono`,id:`userData`,placeholder:`#!/bin/bash -echo hello`,...U})]}),t[69]=U,t[70]=W);let We;t[71]===Symbol.for(`react.memo_cache_sentinel`)?(We=(0,d.jsxs)(pe,{className:`group flex h-7 w-full items-center justify-between rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none hover:bg-input/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 md:text-xs/relaxed dark:bg-input/30 dark:hover:bg-input/50`,render:(0,d.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,d.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,d.jsx)(ee,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),t[71]=We):We=t[71];let Ge;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),t[72]=Ge):Ge=t[72];let Ke=!!m.rootVolumeSize,G;t[73]===p?G=t[74]:(G=p(`rootVolumeSize`,{setValueAs:be}),t[73]=p,t[74]=G);let K;t[75]!==Ke||t[76]!==G?(K=(0,d.jsx)(te,{"aria-invalid":Ke,id:`rootVolumeSize`,max:ve,min:_e,placeholder:`use AMI default`,type:`number`,...G}),t[75]=Ke,t[76]=G,t[77]=K):K=t[77];let q;t[78]===m.rootVolumeSize?q=t[79]:(q=(0,d.jsx)(le,{errors:[m.rootVolumeSize]}),t[78]=m.rootVolumeSize,t[79]=q);let J;t[80]!==K||t[81]!==q?(J=(0,d.jsxs)(u,{children:[Ge,K,q]}),t[80]=K,t[81]=q,t[82]=J):J=t[82];let qe;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(qe=(0,d.jsx)(l,{children:(0,d.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),t[83]=qe):qe=t[83];let Y;t[84]===m.rootVolumeType?Y=t[85]:(Y=e=>{let{field:t}=e;return(0,d.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value??ge,children:[(0,d.jsx)(o,{"aria-invalid":!!m.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,d.jsx)(r,{})}),(0,d.jsx)(a,{children:ue.map(ye)})]})},t[84]=m.rootVolumeType,t[85]=Y);let X;t[86]!==f||t[87]!==Y?(X=(0,d.jsx)(c,{control:f,name:`rootVolumeType`,render:Y}),t[86]=f,t[87]=Y,t[88]=X):X=t[88];let Z;t[89]===m.rootVolumeType?Z=t[90]:(Z=(0,d.jsx)(le,{errors:[m.rootVolumeType]}),t[89]=m.rootVolumeType,t[90]=Z);let Q;t[91]!==X||t[92]!==Z?(Q=(0,d.jsxs)(u,{children:[qe,X,Z]}),t[91]=X,t[92]=Z,t[93]=Q):Q=t[93];let $;t[94]!==J||t[95]!==Q?($=(0,d.jsxs)(me,{children:[We,(0,d.jsxs)(fe,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[J,Q]})]}),t[94]=J,t[95]=Q,t[96]=$):$=t[96];let Je;return t[97]!==A||t[98]!==P||t[99]!==I||t[100]!==R||t[101]!==H||t[102]!==W||t[103]!==$?(Je=(0,d.jsxs)(d.Fragment,{children:[A,P,I,R,H,W,$]}),t[97]=A,t[98]=P,t[99]=I,t[100]=R,t[101]=H,t[102]=W,t[103]=$,t[104]=Je):Je=t[104],Je}function ye(e){return(0,d.jsx)(i,{value:e,children:e},e)}function be(e){return e===``||e==null?void 0:Number(e)}function xe(e){return(0,d.jsx)(i,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId)}function Se(e){return(0,d.jsx)(i,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function Ce(e){return(0,d.jsx)(i,{value:e,children:e},e)}function we(e){return(0,d.jsxs)(i,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId)}function Te(e){return!!e}function Ee(e){return e.InstanceType}export{f as t}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as ee}from"./chevron-down.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{t as te}from"./input.js";import{O as ne,c as re,o as ie,p as ae,w as oe}from"./ec2.js";import{a as se,n as c}from"./zod.js";import{a as l,n as ce,r as u,t as d}from"./field.js";import{t as le}from"./ec23.js";import{t as ue}from"./textarea.js";import{n as de,r as fe,t as pe}from"./collapsible.js";var me=t(),f=e(),he=`gp3`,ge=1,_e=16384;function p(e){let t=(0,me.c)(107),{control:p,register:m,errors:h}=e,{data:Ee}=n(ie),{data:De}=n(re),{data:Oe}=n(ae),{data:ke}=n(ne),{data:Ae}=n(oe),je;t[0]===Ee.Images?je=t[1]:(je=Ee.Images??[],t[0]=Ee.Images,t[1]=je);let g=je,_;t[2]===Oe.KeyPairs?_=t[3]:(_=Oe.KeyPairs??[],t[2]=Oe.KeyPairs,t[3]=_);let Me=_,v;t[4]===ke.Subnets?v=t[5]:(v=ke.Subnets??[],t[4]=ke.Subnets,t[5]=v);let y=v,b;t[6]===Ae.SecurityGroups?b=t[7]:(b=Ae.SecurityGroups??[],t[6]=Ae.SecurityGroups,t[7]=b);let x=b,S;t[8]===De.InstanceTypes?S=t[9]:(S=De.InstanceTypes??[],t[8]=De.InstanceTypes,t[9]=S);let C;t[10]===S?C=t[11]:(C=[...new Set(S.map(Te).filter(we))].toSorted(),t[10]=S,t[11]=C);let Ne=C,w;t[12]===p?w=t[13]:(w={control:p,name:`subnetId`},t[12]=p,t[13]=w);let Pe=se(w),T;t[14]!==Pe||t[15]!==y?(T=y.find(e=>e.SubnetId===Pe)?.VpcId,t[14]=Pe,t[15]=y,t[16]=T):T=t[16];let E=T,Fe;t[17]!==E||t[18]!==x?(Fe=E?x.filter(e=>e.VpcId===E):x,t[17]=E,t[18]=x,t[19]=Fe):Fe=t[19];let Ie=Fe,Le;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(Le=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),t[20]=Le):Le=t[20];let D;t[21]!==h.imageId||t[22]!==g?(D=e=>{let{field:t}=e,n=g.find(e=>e.ImageId===t.value);return(0,f.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,f.jsx)(o,{"aria-invalid":!!h.imageId,className:`w-full`,id:`imageId`,children:(0,f.jsx)(r,{children:n?`${n.Name??`Unnamed`} (${n.Architecture})`:``})}),(0,f.jsx)(a,{children:g.map(Ce)})]})},t[21]=h.imageId,t[22]=g,t[23]=D):D=t[23];let O;t[24]!==p||t[25]!==D?(O=(0,f.jsx)(c,{control:p,name:`imageId`,render:D}),t[24]=p,t[25]=D,t[26]=O):O=t[26];let k;t[27]===h.imageId?k=t[28]:(k=(0,f.jsx)(u,{errors:[h.imageId]}),t[27]=h.imageId,t[28]=k);let A;t[29]!==O||t[30]!==k?(A=(0,f.jsxs)(d,{children:[Le,O,k]}),t[29]=O,t[30]=k,t[31]=A):A=t[31];let Re;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(Re=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),t[32]=Re):Re=t[32];let j;t[33]!==h.instanceType||t[34]!==Ne?(j=e=>{let{field:t}=e;return(0,f.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value||``,children:[(0,f.jsx)(o,{"aria-invalid":!!h.instanceType,className:`w-full`,id:`instanceType`,children:(0,f.jsx)(r,{})}),(0,f.jsx)(a,{children:Ne.map(Se)})]})},t[33]=h.instanceType,t[34]=Ne,t[35]=j):j=t[35];let M;t[36]!==p||t[37]!==j?(M=(0,f.jsx)(c,{control:p,name:`instanceType`,render:j}),t[36]=p,t[37]=j,t[38]=M):M=t[38];let N;t[39]===h.instanceType?N=t[40]:(N=(0,f.jsx)(u,{errors:[h.instanceType]}),t[39]=h.instanceType,t[40]=N);let P;t[41]!==M||t[42]!==N?(P=(0,f.jsxs)(d,{children:[Re,M,N]}),t[41]=M,t[42]=N,t[43]=P):P=t[43];let ze;t[44]===Symbol.for(`react.memo_cache_sentinel`)?(ze=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),t[44]=ze):ze=t[44];let F;t[45]===Me?F=t[46]:(F=e=>{let{field:t}=e;return(0,f.jsxs)(s,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,f.jsx)(o,{className:`w-full`,id:`keyName`,children:(0,f.jsx)(r,{})}),(0,f.jsxs)(a,{children:[(0,f.jsx)(i,{value:`none`,children:`none`}),Me.map(xe)]})]})},t[45]=Me,t[46]=F);let I;t[47]!==p||t[48]!==F?(I=(0,f.jsxs)(d,{children:[ze,(0,f.jsx)(c,{control:p,name:`keyName`,render:F})]}),t[47]=p,t[48]=F,t[49]=I):I=t[49];let Be;t[50]===Symbol.for(`react.memo_cache_sentinel`)?(Be=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),t[50]=Be):Be=t[50];let L;t[51]===y?L=t[52]:(L=e=>{let{field:t}=e;return(0,f.jsxs)(s,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,f.jsx)(o,{className:`w-full`,id:`subnetId`,children:(0,f.jsx)(r,{})}),(0,f.jsxs)(a,{children:[(0,f.jsx)(i,{value:`none`,children:`none`}),y.map(be)]})]})},t[51]=y,t[52]=L);let R;t[53]!==p||t[54]!==L?(R=(0,f.jsxs)(d,{children:[Be,(0,f.jsx)(c,{control:p,name:`subnetId`,render:L})]}),t[53]=p,t[54]=L,t[55]=R):R=t[55];let Ve;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(Ve=(0,f.jsx)(l,{children:`Security Groups`}),t[56]=Ve):Ve=t[56];let He=E?`Applies to VPC ${E}`:`Showing all security groups — select a subnet to filter by VPC`,z;t[57]===He?z=t[58]:(z=(0,f.jsx)(ce,{children:He}),t[57]=He,t[58]=z);let B;t[59]===Ie?B=t[60]:(B=e=>{let{field:t}=e,n=t.value??[],ee=new Set(n),r=e=>{t.onChange(n.includes(e)?n.filter(t=>t!==e):[...n,e])};return Ie.length===0?(0,f.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups available.`}):(0,f.jsx)(`div`,{className:`space-y-1`,children:Ie.map(e=>(0,f.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,f.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:ee.has(e.GroupId??``),onChange:()=>r(e.GroupId??``),type:`checkbox`}),(0,f.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})},t[59]=Ie,t[60]=B);let V;t[61]!==p||t[62]!==B?(V=(0,f.jsx)(c,{control:p,name:`securityGroupIds`,render:B}),t[61]=p,t[62]=B,t[63]=V):V=t[63];let H;t[64]!==z||t[65]!==V?(H=(0,f.jsxs)(d,{children:[Ve,z,V]}),t[64]=z,t[65]=V,t[66]=H):H=t[66];let Ue,We;t[67]===Symbol.for(`react.memo_cache_sentinel`)?(Ue=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`userData`,children:`User Data`})}),We=(0,f.jsx)(ce,{children:`Cloud-init or shell script run at first boot.`}),t[67]=Ue,t[68]=We):(Ue=t[67],We=t[68]);let U;t[69]===m?U=t[70]:(U=m(`userData`),t[69]=m,t[70]=U);let W;t[71]===U?W=t[72]:(W=(0,f.jsxs)(d,{children:[Ue,We,(0,f.jsx)(ue,{className:`min-h-32 font-mono`,id:`userData`,placeholder:`#!/bin/bash +echo hello`,...U})]}),t[71]=U,t[72]=W);let Ge;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(Ge=(0,f.jsxs)(fe,{className:`group flex h-7 w-full items-center justify-between rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none hover:bg-input/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 md:text-xs/relaxed dark:bg-input/30 dark:hover:bg-input/50`,render:(0,f.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,f.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,f.jsx)(ee,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),t[73]=Ge):Ge=t[73];let Ke;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(Ke=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),t[74]=Ke):Ke=t[74];let qe=!!h.rootVolumeSize,G;t[75]===m?G=t[76]:(G=m(`rootVolumeSize`,{setValueAs:ye}),t[75]=m,t[76]=G);let K;t[77]!==qe||t[78]!==G?(K=(0,f.jsx)(te,{"aria-invalid":qe,id:`rootVolumeSize`,max:_e,min:ge,placeholder:`use AMI default`,type:`number`,...G}),t[77]=qe,t[78]=G,t[79]=K):K=t[79];let q;t[80]===h.rootVolumeSize?q=t[81]:(q=(0,f.jsx)(u,{errors:[h.rootVolumeSize]}),t[80]=h.rootVolumeSize,t[81]=q);let J;t[82]!==K||t[83]!==q?(J=(0,f.jsxs)(d,{children:[Ke,K,q]}),t[82]=K,t[83]=q,t[84]=J):J=t[84];let Je;t[85]===Symbol.for(`react.memo_cache_sentinel`)?(Je=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),t[85]=Je):Je=t[85];let Y;t[86]===h.rootVolumeType?Y=t[87]:(Y=e=>{let{field:t}=e;return(0,f.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value??he,children:[(0,f.jsx)(o,{"aria-invalid":!!h.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,f.jsx)(r,{})}),(0,f.jsx)(a,{children:le.map(ve)})]})},t[86]=h.rootVolumeType,t[87]=Y);let X;t[88]!==p||t[89]!==Y?(X=(0,f.jsx)(c,{control:p,name:`rootVolumeType`,render:Y}),t[88]=p,t[89]=Y,t[90]=X):X=t[90];let Z;t[91]===h.rootVolumeType?Z=t[92]:(Z=(0,f.jsx)(u,{errors:[h.rootVolumeType]}),t[91]=h.rootVolumeType,t[92]=Z);let Q;t[93]!==X||t[94]!==Z?(Q=(0,f.jsxs)(d,{children:[Je,X,Z]}),t[93]=X,t[94]=Z,t[95]=Q):Q=t[95];let $;t[96]!==J||t[97]!==Q?($=(0,f.jsxs)(pe,{children:[Ge,(0,f.jsxs)(de,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[J,Q]})]}),t[96]=J,t[97]=Q,t[98]=$):$=t[98];let Ye;return t[99]!==A||t[100]!==P||t[101]!==I||t[102]!==R||t[103]!==H||t[104]!==W||t[105]!==$?(Ye=(0,f.jsxs)(f.Fragment,{children:[A,P,I,R,H,W,$]}),t[99]=A,t[100]=P,t[101]=I,t[102]=R,t[103]=H,t[104]=W,t[105]=$,t[106]=Ye):Ye=t[106],Ye}function ve(e){return(0,f.jsx)(i,{value:e,children:e},e)}function ye(e){return e===``||e==null?void 0:Number(e)}function be(e){return(0,f.jsx)(i,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId)}function xe(e){return(0,f.jsx)(i,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function Se(e){return(0,f.jsx)(i,{value:e,children:e},e)}function Ce(e){return(0,f.jsxs)(i,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId)}function we(e){return!!e}function Te(e){return e.InstanceType}export{p as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-clusters2.js b/spinifex/services/spinifexui/frontend/dist/assets/list-clusters2.js index 82c8e970a..411fb5662 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-clusters2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-clusters2.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{c as a}from"./eks2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.clusters){let n=(t.clusters??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/eks/create-cluster`,children:(0,l.jsx)(i,{children:`Create Cluster`})}),title:`Clusters`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No EKS clusters found.`})]}),e[0]=t.clusters,e[1]=s}else s=e[1];return s}function d(e){return(0,l.jsx)(s,{params:{clusterName:e},title:e,to:`/eks/list-clusters/$clusterName`},e)}function f(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}var p=u;export{p as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{c as a}from"./eks2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.clusters?s=e[1]:(s=t.clusters??[],e[0]=t.clusters,e[1]=s);let u;if(e[2]!==s){let t=s.toSorted(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/eks/create-cluster`,children:(0,l.jsx)(i,{children:`Create Cluster`})}),title:`Clusters`}),e[4]=n):n=e[4],u=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No EKS clusters found.`})]}),e[2]=s,e[3]=u}else u=e[3];return u}function d(e){return(0,l.jsx)(s,{params:{clusterName:e},title:e,to:`/eks/list-clusters/$clusterName`},e)}function f(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}var p=u;export{p as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-groups.js b/spinifex/services/spinifexui/frontend/dist/assets/list-groups.js index d1b6cbc52..ee0befef4 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-groups.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-groups.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{l as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Groups){let n=(t.Groups??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-group`,children:(0,l.jsx)(i,{children:`Create Group`})}),title:`Groups`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM groups found.`})]}),e[0]=t.Groups,e[1]=s}else s=e[1];return s}function d(e){return e.GroupName?(0,l.jsx)(s,{params:{groupName:e.GroupName},subtitle:e.Arn??``,title:e.GroupName,to:`/iam/list-groups/$groupName`},e.GroupName):null}function f(e,t){let n=e.GroupName?.toLowerCase()??``,r=t.GroupName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{l as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.Groups?s=e[1]:(s=t.Groups??[],e[0]=t.Groups,e[1]=s);let u;if(e[2]!==s){let t=s.toSorted(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-group`,children:(0,l.jsx)(i,{children:`Create Group`})}),title:`Groups`}),e[4]=n):n=e[4],u=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM groups found.`})]}),e[2]=s,e[3]=u}else u=e[3];return u}function d(e){return e.GroupName?(0,l.jsx)(s,{params:{groupName:e.GroupName},subtitle:e.Arn??``,title:e.GroupName,to:`/iam/list-groups/$groupName`},e.GroupName):null}function f(e,t){let n=e.GroupName?.toLowerCase()??``,r=t.GroupName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-instance-profiles.js b/spinifex/services/spinifexui/frontend/dist/assets/list-instance-profiles.js index d62e58275..e1f057226 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-instance-profiles.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-instance-profiles.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{f as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.InstanceProfiles){let n=(t.InstanceProfiles??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-instance-profile`,children:(0,l.jsx)(i,{children:`Create Instance Profile`})}),title:`Instance Profiles`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No instance profiles found.`})]}),e[0]=t.InstanceProfiles,e[1]=s}else s=e[1];return s}function d(e){return e.InstanceProfileName?(0,l.jsx)(s,{params:{instanceProfileName:e.InstanceProfileName},subtitle:e.Arn??``,title:e.InstanceProfileName,to:`/iam/list-instance-profiles/$instanceProfileName`},e.InstanceProfileName):null}function f(e,t){let n=e.InstanceProfileName?.toLowerCase()??``,r=t.InstanceProfileName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{f as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.InstanceProfiles?s=e[1]:(s=t.InstanceProfiles??[],e[0]=t.InstanceProfiles,e[1]=s);let u;if(e[2]!==s){let t=s.toSorted(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-instance-profile`,children:(0,l.jsx)(i,{children:`Create Instance Profile`})}),title:`Instance Profiles`}),e[4]=n):n=e[4],u=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No instance profiles found.`})]}),e[2]=s,e[3]=u}else u=e[3];return u}function d(e){return e.InstanceProfileName?(0,l.jsx)(s,{params:{instanceProfileName:e.InstanceProfileName},subtitle:e.Arn??``,title:e.InstanceProfileName,to:`/iam/list-instance-profiles/$instanceProfileName`},e.InstanceProfileName):null}function f(e,t){let n=e.InstanceProfileName?.toLowerCase()??``,r=t.InstanceProfileName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-policies.js b/spinifex/services/spinifexui/frontend/dist/assets/list-policies.js index 2e4dadf38..e8c0daf7d 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-policies.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-policies.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{p as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Policies){let n=(t.Policies??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-policy`,children:(0,l.jsx)(i,{children:`Create Policy`})}),title:`Policies`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),e[0]=t.Policies,e[1]=s}else s=e[1];return s}function d(e){return e.Arn?(0,l.jsx)(s,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:e.Arn??``,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function f(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{p as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.Policies?s=e[1]:(s=t.Policies??[],e[0]=t.Policies,e[1]=s);let u;if(e[2]!==s){let t=s.toSorted(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-policy`,children:(0,l.jsx)(i,{children:`Create Policy`})}),title:`Policies`}),e[4]=n):n=e[4],u=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),e[2]=s,e[3]=u}else u=e[3];return u}function d(e){return e.Arn?(0,l.jsx)(s,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:e.Arn??``,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function f(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-roles.js b/spinifex/services/spinifexui/frontend/dist/assets/list-roles.js index 8a2050856..bc912fcb0 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-roles.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-roles.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{y as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Roles){let n=(t.Roles??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-role`,children:(0,l.jsx)(i,{children:`Create Role`})}),title:`Roles`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM roles found.`})]}),e[0]=t.Roles,e[1]=s}else s=e[1];return s}function d(e){return e.RoleName?(0,l.jsx)(s,{params:{roleName:e.RoleName},subtitle:e.Arn??``,title:e.RoleName,to:`/iam/list-roles/$roleName`},e.RoleName):null}function f(e,t){let n=e.RoleName?.toLowerCase()??``,r=t.RoleName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{y as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.Roles?s=e[1]:(s=t.Roles??[],e[0]=t.Roles,e[1]=s);let u;if(e[2]!==s){let t=s.toSorted(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-role`,children:(0,l.jsx)(i,{children:`Create Role`})}),title:`Roles`}),e[4]=n):n=e[4],u=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM roles found.`})]}),e[2]=s,e[3]=u}else u=e[3];return u}function d(e){return e.RoleName?(0,l.jsx)(s,{params:{roleName:e.RoleName},subtitle:e.Arn??``,title:e.RoleName,to:`/iam/list-roles/$roleName`},e.RoleName):null}function f(e,t){let n=e.RoleName?.toLowerCase()??``,r=t.RoleName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/list-users.js b/spinifex/services/spinifexui/frontend/dist/assets/list-users.js index dc7e89c38..adfc78e6e 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/list-users.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/list-users.js @@ -1 +1 @@ -import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{C as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(a),s;if(e[0]!==t.Users){let n=(t.Users??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-user`,children:(0,l.jsx)(i,{children:`Create User`})}),title:`Users`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),e[0]=t.Users,e[1]=s}else s=e[1];return s}function d(e){return e.UserName?(0,l.jsx)(s,{params:{userName:e.UserName},subtitle:e.UserId??``,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function f(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{C as a}from"./iam2.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=n(a),s;e[0]===t.Users?s=e[1]:(s=t.Users??[],e[0]=t.Users,e[1]=s);let u;if(e[2]!==s){let t=s.toSorted(f),n;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-user`,children:(0,l.jsx)(i,{children:`Create User`})}),title:`Users`}),e[4]=n):n=e[4],u=(0,l.jsxs)(l.Fragment,{children:[n,t.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:t.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),e[2]=s,e[3]=u}else u=e[3];return u}function d(e){return e.UserName?(0,l.jsx)(s,{params:{userName:e.UserName},subtitle:e.UserId??``,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function f(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/nodes.js b/spinifex/services/spinifexui/frontend/dist/assets/nodes.js index 470825ea7..40c0a356a 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/nodes.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/nodes.js @@ -1 +1 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./link.js";import{n as o}from"./redirect.js";import{en as s}from"./cluster-config.js";import{t as c}from"./chevron-down.js";import{t as l}from"./chevron-right.js";import{n as u}from"./admin-context.js";import{t as d}from"./page-heading.js";import{r as f,t as p}from"./admin.js";import{t as m}from"./badge.js";import{o as h,r as g,s as _,t as v}from"./card.js";var y=r(),b=e(n(),1),x=t();function S(e){if(e.mig_enabled){let t=e.slices??[];return`${t.filter(e=>e.instance_id).length} / ${t.length}`}return`${+!!e.instance_id} / 1`}function C(e){let t=(0,y.c)(20),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,b.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[1]=o):o=t[1];let u=o,d,f,p,h;if(t[2]!==i||t[3]!==n){let e=n.flatMap(T);h=`overflow-x-auto`,f=`w-full text-xs`,t[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`w-6 pb-1`,children:(0,x.jsx)(`span`,{className:`sr-only`,children:`Expand`})}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Model`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`VRAM`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Mode`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Profile`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`Used / Total`})]})}),t[8]=p):p=t[8];let r;t[9]===i?r=t[10]:(r=e=>{let{node:t,gpu:n}=e,r=`${t}:${n.pci_address}`,a=n.slices??[],o=n.mig_enabled&&a.length>0,d=o&&i.has(r);return(0,x.jsxs)(b.Fragment,{children:[(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5`,children:o&&(0,x.jsx)(`button`,{"aria-expanded":d,"aria-label":d?`Collapse slices`:`Expand slices`,onClick:()=>u(r),type:`button`,children:d?(0,x.jsx)(c,{className:`size-3.5`}):(0,x.jsx)(l,{className:`size-3.5`})})}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:t}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:n.model}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:s(n.vram_mib)}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,x.jsx)(m,{className:`text-[0.625rem]`,variant:`secondary`,children:n.mig_enabled?`MIG`:`Passthrough`})}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:n.mig_profile??`—`}),(0,x.jsx)(`td`,{className:`py-1.5 font-mono`,children:S(n)})]}),d&&a.map(w)]},r)},t[9]=i,t[10]=r),d=e.map(r),t[2]=i,t[3]=n,t[4]=d,t[5]=f,t[6]=p,t[7]=h}else d=t[4],f=t[5],p=t[6],h=t[7];let g;t[11]===d?g=t[12]:(g=(0,x.jsx)(`tbody`,{children:d}),t[11]=d,t[12]=g);let _;t[13]!==f||t[14]!==p||t[15]!==g?(_=(0,x.jsxs)(`table`,{className:f,children:[p,g]}),t[13]=f,t[14]=p,t[15]=g,t[16]=_):_=t[16];let v;return t[17]!==h||t[18]!==_?(v=(0,x.jsx)(`div`,{className:h,children:_}),t[17]=h,t[18]=_,t[19]=v):v=t[19],v}function w(e){return(0,x.jsxs)(`tr`,{className:`border-b text-muted-foreground last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1`,children:(0,x.jsx)(`span`,{className:`sr-only`,children:`Slice`})}),(0,x.jsxs)(`td`,{className:`py-1 pr-4 font-mono`,colSpan:2,children:[`↳ slice `,e.gi_id]}),(0,x.jsx)(`td`,{className:`py-1 pr-4`,children:s(e.vram_mib)}),(0,x.jsx)(`td`,{className:`py-1 pr-4`,children:(0,x.jsx)(`span`,{className:`sr-only`,children:`Mode`})}),(0,x.jsx)(`td`,{className:`py-1 pr-4 font-mono`,children:e.profile}),(0,x.jsx)(`td`,{className:`py-1 font-mono`,children:e.instance_id?(0,x.jsx)(a,{className:`text-primary hover:underline`,params:{id:e.instance_id},to:`/ec2/describe-instances/$id`,children:e.instance_id}):(0,x.jsx)(`span`,{className:`text-green-600`,children:`free`})})]},e.gi_id)}function T(e){return(e.gpus??[]).map(t=>({node:e.node,gpu:t}))}function E(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function D(e){return e>=1?`${e.toFixed(1)}Gi`:`${Math.round(e*1024)}Mi`}function O(e){let t=Math.floor(Date.now()/1e3-e);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d ${r%24}h`}function k(){let e=(0,y.c)(31),{isAdmin:t}=u(),n;e[0]===t?n=e[1]:(n={...p,enabled:t,refetchInterval:5e3},e[0]=t,e[1]=n);let{data:r}=i(n),a;e[2]===t?a=e[3]:(a={...f,enabled:t,refetchInterval:5e3},e[2]=t,e[3]=a);let{data:s}=i(a);if(!t)throw o({to:`/`});let c,l,m;if(e[4]!==r?.nodes||e[5]!==s?.vms){c=r?.nodes??[];let t;e[9]===s?.vms?t=e[10]:(t=s?.vms??[],e[9]=s?.vms,e[10]=t);let n;e[11]===t?n=e[12]:(n=t.filter(N),e[11]=t,e[12]=n),m=n;let i=new Map;for(let e of c)for(let t of e.instance_types??[]){let e=i.get(t.name);e?e.available+=t.available:i.set(t.name,{vcpu:t.vcpu,memory_gb:t.memory_gb,available:t.available})}l=[...i.entries()].map(M).toSorted(j),e[4]=r?.nodes,e[5]=s?.vms,e[6]=c,e[7]=l,e[8]=m}else c=e[6],l=e[7],m=e[8];let b=l,S;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,x.jsx)(d,{title:`Nodes`}),e[13]=S):S=e[13];let w;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,x.jsx)(h,{children:(0,x.jsx)(_,{className:`text-sm`,children:`Cluster Nodes`})}),e[14]=w):w=e[14];let T;e[15]===c?T=e[16]:(T=(0,x.jsxs)(v,{children:[w,(0,x.jsx)(g,{children:c.length===0?(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No nodes responding`}):(0,x.jsx)(P,{nodes:c})})]}),e[15]=c,e[16]=T);let E;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,x.jsx)(h,{children:(0,x.jsx)(_,{className:`text-sm`,children:`Elastic Compute Cloud (EC2)`})}),e[17]=E):E=e[17];let D;e[18]===m?D=e[19]:(D=(0,x.jsxs)(v,{children:[E,(0,x.jsx)(g,{children:m.length===0?(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances running`}):(0,x.jsx)(L,{vms:m})})]}),e[18]=m,e[19]=D);let O;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,x.jsx)(h,{children:(0,x.jsx)(_,{className:`text-sm`,children:`Resource Usage`})}),e[20]=O):O=e[20];let k;e[21]!==b||e[22]!==c?(k=(0,x.jsxs)(v,{children:[O,(0,x.jsx)(g,{className:`space-y-4`,children:c.length===0?(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No data`}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(z,{nodes:c}),b.length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{className:`mt-4 text-xs font-medium text-muted-foreground`,children:`Instance Type Capacity`}),(0,x.jsx)(V,{instanceTypes:b})]})]})})]}),e[21]=b,e[22]=c,e[23]=k):k=e[23];let F;e[24]===c?F=e[25]:(F=c.some(A)&&(0,x.jsxs)(v,{children:[(0,x.jsx)(h,{children:(0,x.jsx)(_,{className:`text-sm`,children:`GPU Inventory`})}),(0,x.jsx)(g,{children:(0,x.jsx)(C,{nodes:c})})]}),e[24]=c,e[25]=F);let I;return e[26]!==F||e[27]!==T||e[28]!==D||e[29]!==k?(I=(0,x.jsxs)(x.Fragment,{children:[S,(0,x.jsxs)(`div`,{className:`space-y-6`,children:[T,D,k,F]})]}),e[26]=F,e[27]=T,e[28]=D,e[29]=k,e[30]=I):I=e[30],I}function A(e){return(e.gpus?.length??0)>0}function j(e,t){return e.name.localeCompare(t.name)}function M(e){let[t,n]=e;return{name:t,...n}}function N(e){return!e.managed_by}function P(e){let t=(0,y.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(F),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,x.jsx)(`div`,{className:`overflow-x-auto`,children:(0,x.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,x.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function F(e){let t=[e.nats_role?`nats:${e.nats_role}`:null,e.predastore_role?`predastore:${e.predastore_role}`:null].filter(Boolean).join(`,`);return(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,x.jsx)(m,{variant:e.status===`Ready`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono text-muted-foreground`,children:t||`-`}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:E(e.uptime)}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,x.jsx)(`td`,{className:`py-1.5`,children:(0,x.jsx)(`span`,{className:`text-muted-foreground`,children:e.services?.join(`,`)??`-`})})]},e.node)}function I(e){return e?e.profile?`${e.profile} ${s(e.vram_mib)}`:`${e.model} ${s(e.vram_mib)}`:`-`}function L(e){let t=(0,y.c)(5),{vms:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Instance`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Type`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`vCPU`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Memory`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`GPU`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`Age`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(R),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,x.jsx)(`div`,{className:`overflow-x-auto`,children:(0,x.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,x.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function R(e){return(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.instance_id}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,x.jsx)(m,{variant:e.status===`running`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.instance_type}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vcpu}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:D(e.memory_gb)}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:I(e.gpu)}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.node}),(0,x.jsx)(`td`,{className:`py-1.5`,children:e.launch_time>0?O(e.launch_time):`-`})]},e.instance_id)}function z(e){let t=(0,y.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`CPU (used/sched)`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`MEM (used/sched)`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`GPU (used/total)`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`EC2`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(B),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,x.jsx)(`div`,{className:`overflow-x-auto`,children:(0,x.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,x.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function B(e){let t=e.total_vcpu-(e.reserved_vcpu??0),n=e.total_mem_gb-(e.reserved_mem_gb??0);return(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,x.jsxs)(`td`,{className:`py-1.5 pr-4 font-mono`,children:[e.alloc_vcpu,`/`,t]}),(0,x.jsxs)(`td`,{className:`py-1.5 pr-4 font-mono`,children:[D(e.alloc_mem_gb),`/`,D(n)]}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.total_gpus>0?`${e.alloc_gpus}/${e.total_gpus}`:`-`}),(0,x.jsx)(`td`,{className:`py-1.5`,children:e.vm_count})]},e.node)}function V(e){let t=(0,y.c)(5),{instanceTypes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Instance Type`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Available`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`vCPU`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`Memory`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(H),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,x.jsx)(`div`,{className:`overflow-x-auto`,children:(0,x.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,x.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function H(e){return(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.name}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.available}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vcpu}),(0,x.jsx)(`td`,{className:`py-1.5`,children:D(e.memory_gb)})]},e.name)}export{k as component,I as formatVMGPU}; \ No newline at end of file +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useQuery.js";import{t as a}from"./link.js";import{n as o}from"./redirect.js";import{en as s}from"./cluster-config.js";import{t as c}from"./chevron-down.js";import{t as l}from"./chevron-right.js";import{n as u}from"./admin-context.js";import{t as d}from"./page-heading.js";import{r as f,t as p}from"./admin.js";import{t as m}from"./badge.js";import{o as h,r as g,s as _,t as v}from"./card.js";var y=r(),b=e(n(),1),x=t();function S(e){if(e.mig_enabled){let t=e.slices??[];return`${t.filter(e=>e.instance_id).length} / ${t.length}`}return`${+!!e.instance_id} / 1`}function C(e){let t=(0,y.c)(20),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=new Set,t[0]=r):r=t[0];let[i,a]=(0,b.useState)(r),o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},t[1]=o):o=t[1];let u=o,d,f,p,h;if(t[2]!==i||t[3]!==n){let e=n.flatMap(T);h=`overflow-x-auto`,f=`w-full text-xs`,t[8]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`w-6 pb-1`,children:(0,x.jsx)(`span`,{className:`sr-only`,children:`Expand`})}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Model`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`VRAM`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Mode`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Profile`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`Used / Total`})]})}),t[8]=p):p=t[8];let r;t[9]===i?r=t[10]:(r=e=>{let{node:t,gpu:n}=e,r=`${t}:${n.pci_address}`,a=n.slices??[],o=n.mig_enabled&&a.length>0,d=o&&i.has(r);return(0,x.jsxs)(b.Fragment,{children:[(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5`,children:o&&(0,x.jsx)(`button`,{"aria-expanded":d,"aria-label":d?`Collapse slices`:`Expand slices`,onClick:()=>u(r),type:`button`,children:d?(0,x.jsx)(c,{className:`size-3.5`}):(0,x.jsx)(l,{className:`size-3.5`})})}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:t}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:n.model}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:s(n.vram_mib)}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,x.jsx)(m,{className:`text-[0.625rem]`,variant:`secondary`,children:n.mig_enabled?`MIG`:`Passthrough`})}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:n.mig_profile??`—`}),(0,x.jsx)(`td`,{className:`py-1.5 font-mono`,children:S(n)})]}),d&&a.map(w)]},r)},t[9]=i,t[10]=r),d=e.map(r),t[2]=i,t[3]=n,t[4]=d,t[5]=f,t[6]=p,t[7]=h}else d=t[4],f=t[5],p=t[6],h=t[7];let g;t[11]===d?g=t[12]:(g=(0,x.jsx)(`tbody`,{children:d}),t[11]=d,t[12]=g);let _;t[13]!==f||t[14]!==p||t[15]!==g?(_=(0,x.jsxs)(`table`,{className:f,children:[p,g]}),t[13]=f,t[14]=p,t[15]=g,t[16]=_):_=t[16];let v;return t[17]!==h||t[18]!==_?(v=(0,x.jsx)(`div`,{className:h,children:_}),t[17]=h,t[18]=_,t[19]=v):v=t[19],v}function w(e){return(0,x.jsxs)(`tr`,{className:`border-b text-muted-foreground last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1`,children:(0,x.jsx)(`span`,{className:`sr-only`,children:`Slice`})}),(0,x.jsxs)(`td`,{className:`py-1 pr-4 font-mono`,colSpan:2,children:[`↳ slice `,e.gi_id]}),(0,x.jsx)(`td`,{className:`py-1 pr-4`,children:s(e.vram_mib)}),(0,x.jsx)(`td`,{className:`py-1 pr-4`,children:(0,x.jsx)(`span`,{className:`sr-only`,children:`Mode`})}),(0,x.jsx)(`td`,{className:`py-1 pr-4 font-mono`,children:e.profile}),(0,x.jsx)(`td`,{className:`py-1 font-mono`,children:e.instance_id?(0,x.jsx)(a,{className:`text-primary hover:underline`,params:{id:e.instance_id},to:`/ec2/describe-instances/$id`,children:e.instance_id}):(0,x.jsx)(`span`,{className:`text-green-600`,children:`free`})})]},e.gi_id)}function T(e){return(e.gpus??[]).map(t=>({node:e.node,gpu:t}))}function E(e){let t=Math.floor(e/86400),n=Math.floor(e%86400/3600);if(t>0)return`${t}d ${n}h`;let r=Math.floor(e%3600/60);return n>0?`${n}h ${r}m`:`${r}m`}function D(e){return e>=1?`${e.toFixed(1)}Gi`:`${Math.round(e*1024)}Mi`}function O(e){let t=Math.floor(Date.now()/1e3-e);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h ${n%60}m`:`${Math.floor(r/24)}d ${r%24}h`}function k(){let e=(0,y.c)(30),{isAdmin:t}=u(),n;e[0]===t?n=e[1]:(n={...p,enabled:t,refetchInterval:5e3},e[0]=t,e[1]=n);let{data:r}=i(n),a;e[2]===t?a=e[3]:(a={...f,enabled:t,refetchInterval:5e3},e[2]=t,e[3]=a);let{data:s}=i(a);if(!t)throw o({to:`/`});let c;e[4]===r?.nodes?c=e[5]:(c=r?.nodes??[],e[4]=r?.nodes,e[5]=c);let l=c,m;e[6]===s?.vms?m=e[7]:(m=s?.vms??[],e[6]=s?.vms,e[7]=m);let b;e[8]===m?b=e[9]:(b=m.filter(N),e[8]=m,e[9]=b);let S=b,w;if(e[10]!==l){let t=new Map;for(let e of l)for(let n of e.instance_types??[]){let e=t.get(n.name);e?e.available+=n.available:t.set(n.name,{vcpu:n.vcpu,memory_gb:n.memory_gb,available:n.available})}w=[...t.entries()].map(M).toSorted(j),e[10]=l,e[11]=w}else w=e[11];let T=w,E;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,x.jsx)(d,{title:`Nodes`}),e[12]=E):E=e[12];let D;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,x.jsx)(h,{children:(0,x.jsx)(_,{className:`text-sm`,children:`Cluster Nodes`})}),e[13]=D):D=e[13];let O;e[14]===l?O=e[15]:(O=(0,x.jsxs)(v,{children:[D,(0,x.jsx)(g,{children:l.length===0?(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No nodes responding`}):(0,x.jsx)(P,{nodes:l})})]}),e[14]=l,e[15]=O);let k;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,x.jsx)(h,{children:(0,x.jsx)(_,{className:`text-sm`,children:`Elastic Compute Cloud (EC2)`})}),e[16]=k):k=e[16];let F;e[17]===S?F=e[18]:(F=(0,x.jsxs)(v,{children:[k,(0,x.jsx)(g,{children:S.length===0?(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No instances running`}):(0,x.jsx)(L,{vms:S})})]}),e[17]=S,e[18]=F);let I;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,x.jsx)(h,{children:(0,x.jsx)(_,{className:`text-sm`,children:`Resource Usage`})}),e[19]=I):I=e[19];let R;e[20]!==T||e[21]!==l?(R=(0,x.jsxs)(v,{children:[I,(0,x.jsx)(g,{className:`space-y-4`,children:l.length===0?(0,x.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No data`}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(z,{nodes:l}),T.length>0&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h4`,{className:`mt-4 text-xs font-medium text-muted-foreground`,children:`Instance Type Capacity`}),(0,x.jsx)(V,{instanceTypes:T})]})]})})]}),e[20]=T,e[21]=l,e[22]=R):R=e[22];let B;e[23]===l?B=e[24]:(B=l.some(A)&&(0,x.jsxs)(v,{children:[(0,x.jsx)(h,{children:(0,x.jsx)(_,{className:`text-sm`,children:`GPU Inventory`})}),(0,x.jsx)(g,{children:(0,x.jsx)(C,{nodes:l})})]}),e[23]=l,e[24]=B);let H;return e[25]!==F||e[26]!==R||e[27]!==B||e[28]!==O?(H=(0,x.jsxs)(x.Fragment,{children:[E,(0,x.jsxs)(`div`,{className:`space-y-6`,children:[O,F,R,B]})]}),e[25]=F,e[26]=R,e[27]=B,e[28]=O,e[29]=H):H=e[29],H}function A(e){return(e.gpus?.length??0)>0}function j(e,t){return e.name.localeCompare(t.name)}function M(e){let[t,n]=e;return{name:t,...n}}function N(e){return!e.managed_by}function P(e){let t=(0,y.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Roles`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`IP`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Region`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`AZ`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Uptime`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`EC2`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`Services`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(F),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,x.jsx)(`div`,{className:`overflow-x-auto`,children:(0,x.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,x.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function F(e){let t=[e.nats_role?`nats:${e.nats_role}`:null,e.predastore_role?`predastore:${e.predastore_role}`:null].filter(Boolean).join(`,`);return(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,x.jsx)(m,{variant:e.status===`Ready`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono text-muted-foreground`,children:t||`-`}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.host}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.region}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.az}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:E(e.uptime)}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vm_count}),(0,x.jsx)(`td`,{className:`py-1.5`,children:(0,x.jsx)(`span`,{className:`text-muted-foreground`,children:e.services?.join(`,`)??`-`})})]},e.node)}function I(e){return e?e.profile?`${e.profile} ${s(e.vram_mib)}`:`${e.model} ${s(e.vram_mib)}`:`-`}function L(e){let t=(0,y.c)(5),{vms:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Instance`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Status`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Type`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`vCPU`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Memory`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`GPU`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Node`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`Age`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(R),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,x.jsx)(`div`,{className:`overflow-x-auto`,children:(0,x.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,x.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function R(e){return(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.instance_id}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:(0,x.jsx)(m,{variant:e.status===`running`?`default`:`secondary`,className:`text-[0.625rem]`,children:e.status})}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.instance_type}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vcpu}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:D(e.memory_gb)}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:I(e.gpu)}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.node}),(0,x.jsx)(`td`,{className:`py-1.5`,children:e.launch_time>0?O(e.launch_time):`-`})]},e.instance_id)}function z(e){let t=(0,y.c)(5),{nodes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Name`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`CPU (used/sched)`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`MEM (used/sched)`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`GPU (used/total)`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`EC2`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(B),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,x.jsx)(`div`,{className:`overflow-x-auto`,children:(0,x.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,x.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function B(e){let t=e.total_vcpu-(e.reserved_vcpu??0),n=e.total_mem_gb-(e.reserved_mem_gb??0);return(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono font-medium`,children:e.node}),(0,x.jsxs)(`td`,{className:`py-1.5 pr-4 font-mono`,children:[e.alloc_vcpu,`/`,t]}),(0,x.jsxs)(`td`,{className:`py-1.5 pr-4 font-mono`,children:[D(e.alloc_mem_gb),`/`,D(n)]}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.total_gpus>0?`${e.alloc_gpus}/${e.total_gpus}`:`-`}),(0,x.jsx)(`td`,{className:`py-1.5`,children:e.vm_count})]},e.node)}function V(e){let t=(0,y.c)(5),{instanceTypes:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.jsx)(`thead`,{children:(0,x.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Instance Type`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`Available`}),(0,x.jsx)(`th`,{className:`pr-4 pb-1 font-medium`,children:`vCPU`}),(0,x.jsx)(`th`,{className:`pb-1 font-medium`,children:`Memory`})]})}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=n.map(H),t[1]=n,t[2]=i);let a;return t[3]===i?a=t[4]:(a=(0,x.jsx)(`div`,{className:`overflow-x-auto`,children:(0,x.jsxs)(`table`,{className:`w-full text-xs`,children:[r,(0,x.jsx)(`tbody`,{children:i})]})}),t[3]=i,t[4]=a),a}function H(e){return(0,x.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,x.jsx)(`td`,{className:`py-1.5 pr-4 font-mono`,children:e.name}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.available}),(0,x.jsx)(`td`,{className:`py-1.5 pr-4`,children:e.vcpu}),(0,x.jsx)(`td`,{className:`py-1.5`,children:D(e.memory_gb)})]},e.name)}export{k as component,I as formatVMGPU}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/rds-delete-dialog.js b/spinifex/services/spinifexui/frontend/dist/assets/rds-delete-dialog.js index 6a2671b17..3e2d1f908 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/rds-delete-dialog.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/rds-delete-dialog.js @@ -1 +1 @@ -import{n as e}from"./compiler-runtime.js";import{t}from"./delete-confirmation-dialog.js";var n=e();function r({open:e,onOpenChange:r,identifier:i,title:a,description:o,mutation:s,onDeleted:c}){function l(e){e||s.reset(),r(e)}async function u(){try{await s.mutateAsync(i),l(!1),c?.()}catch{}}return(0,n.jsx)(t,{description:(0,n.jsxs)(n.Fragment,{children:[o,s.error&&(0,n.jsx)(`span`,{className:`mt-2 block text-destructive`,children:s.error.message})]}),isPending:s.isPending,onConfirm:()=>{u()},onOpenChange:l,open:e,title:a})}export{r as t}; \ No newline at end of file +import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./delete-confirmation-dialog.js";var r=t(),i=e();function a(e){let t=(0,r.c)(22),{open:a,onOpenChange:o,identifier:s,title:c,description:l,mutation:u,onDeleted:d}=e,f;t[0]!==u||t[1]!==o?(f=function(e){e||u.reset(),o(e)},t[0]=u,t[1]=o,t[2]=f):f=t[2];let p=f,m;t[3]!==p||t[4]!==s||t[5]!==u||t[6]!==d?(m=async function(){try{await u.mutateAsync(s),p(!1),d?.()}catch{}},t[3]=p,t[4]=s,t[5]=u,t[6]=d,t[7]=m):m=t[7];let h=m,g;t[8]===u.error?g=t[9]:(g=u.error&&(0,i.jsx)(`span`,{className:`mt-2 block text-destructive`,children:u.error.message}),t[8]=u.error,t[9]=g);let _;t[10]!==l||t[11]!==g?(_=(0,i.jsxs)(i.Fragment,{children:[l,g]}),t[10]=l,t[11]=g,t[12]=_):_=t[12];let v;t[13]===h?v=t[14]:(v=()=>{h()},t[13]=h,t[14]=v);let y;return t[15]!==p||t[16]!==u.isPending||t[17]!==a||t[18]!==_||t[19]!==v||t[20]!==c?(y=(0,i.jsx)(n,{description:_,isPending:u.isPending,onConfirm:v,onOpenChange:p,open:a,title:c}),t[15]=p,t[16]=u.isPending,t[17]=a,t[18]=_,t[19]=v,t[20]=c,t[21]=y):y=t[21],y}export{a as t}; \ No newline at end of file diff --git a/spinifex/services/spinifexui/frontend/dist/assets/run-instances2.js b/spinifex/services/spinifexui/frontend/dist/assets/run-instances2.js index d1a9f42eb..325ae8e06 100644 --- a/spinifex/services/spinifexui/frontend/dist/assets/run-instances2.js +++ b/spinifex/services/spinifexui/frontend/dist/assets/run-instances2.js @@ -1,4 +1,4 @@ -import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as ee}from"./useQuery.js";import{t as i}from"./useSuspenseQuery.js";import{t as te}from"./useNavigate.js";import{en as ne}from"./cluster-config.js";import{t as re}from"./back-link.js";import{t as ie}from"./chevron-down.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{t as ae}from"./cli-command-panel.js";import{t as oe}from"./button.js";import{t as u}from"./input.js";import{M as se,O as ce,c as le,h as ue,m as de,o as fe,p as d,w as pe,y as me}from"./ec2.js";import{f as he}from"./ec22.js";import{t as f}from"./run-instances.js";import{a as p,i as ge,n as m,t as _e}from"./zod.js";import{t as ve}from"./error-banner.js";import{t as ye}from"./page-heading.js";import{a as h,n as be,r as g,t as _}from"./field.js";import{b as xe,i as Se,t as Ce}from"./ec23.js";import{i as we}from"./system-managed.js";import{t as Te}from"./gpu-instance-type-select.js";import{n as Ee,r as De,t as Oe}from"./collapsible.js";var ke=r(),Ae=e(n(),1),v=t(),je=`/dev/sda1`,Me=`gp3`,Ne=1,Pe=16384;function y(e){let t=(0,ke.c)(137),{launchTemplateId:n,launchTemplateVersion:r}=e,f=te(),{data:we}=i(fe),{data:je}=i(d),{data:y}=i(le),{data:nt}=i(ce),{data:rt}=i(me),{data:it}=i(se),{data:at}=i(pe),{data:ot}=i(ue),b=he(),x=(we.Images??[]).filter(Qe),st=je.KeyPairs??[],ct;t[0]===nt.Subnets?ct=t[1]:(ct=nt.Subnets??[],t[0]=nt.Subnets,t[1]=ct);let lt=ct,ut;t[2]===rt.PlacementGroups?ut=t[3]:(ut=rt.PlacementGroups??[],t[2]=rt.PlacementGroups,t[3]=ut);let dt=ut,ft;t[4]===it.Vpcs?ft=t[5]:(ft=it.Vpcs??[],t[4]=it.Vpcs,t[5]=ft);let pt=ft,mt=at.SecurityGroups??[],ht;t[6]===ot.LaunchTemplates?ht=t[7]:(ht=ot.LaunchTemplates??[],t[6]=ot.LaunchTemplates,t[7]=ht);let gt=ht,_t;t[8]===pt?_t=t[9]:(_t=(pt.find(Ze)??pt[0])?.VpcId,t[8]=pt,t[9]=_t);let vt=_t,yt=xe(mt.map(Xe)),S;if(t[10]!==y.InstanceTypes){S={};for(let e of y.InstanceTypes??[]){let t=e.InstanceType;t&&(S[t]=(S[t]??0)+1)}t[10]=y.InstanceTypes,t[11]=S}else S=t[11];let C=Object.keys(S).toSorted(),bt=x[0]?.ImageId,xt=st[0]?.KeyName,St=C.find(Ye)??C[0],Ct=$e(x.find(e=>e.ImageId===bt)),wt;t[12]===S?wt=t[13]:(wt=e=>!e.instanceType||e.count<=(S[e.instanceType]??1),t[12]=S,t[13]=wt);let{control:w,handleSubmit:Tt,register:T,setValue:E,getValues:Et,watch:Dt,formState:Ot}=ge({resolver:_e(Se.refine(wt,{message:`Cannot exceed available capacity`,path:[`count`]}).superRefine((e,t)=>{let n=$e(x.find(t=>t.ImageId===e.imageId)).snapshotSize;e.rootVolumeSize!==void 0&&n!==void 0&&e.rootVolumeSizee.InstanceType===jt))?.GpuInfo?.Gpus?.[0],Nt=O?.Name?.startsWith(`MIG `)?O.Name.slice(4):void 0,Pt;t[16]===w?Pt=t[17]:(Pt={control:w,name:`imageId`},t[16]=w,t[17]=Pt);let k=p(Pt),Ft;t[18]===k?Ft=t[19]:(Ft=e=>e.ImageId===k,t[18]=k,t[19]=Ft);let A=$e(x.find(Ft)),It;t[20]===w?It=t[21]:(It={control:w,name:`subnetId`},t[20]=w,t[21]=It);let Lt=p(It),Rt;t[22]===w?Rt=t[23]:(Rt={control:w,name:`securityGroupMode`},t[22]=w,t[23]=Rt);let zt=p(Rt),Bt;t[24]===w?Bt=t[25]:(Bt={control:w,name:`ruleSource`},t[24]=w,t[25]=Bt);let Vt=p(Bt),Ht=p({control:w,name:`securityGroupIds`})??[],Ut;t[26]===Ht?Ut=t[27]:(Ut=new Set(Ht),t[26]=Ht,t[27]=Ut);let Wt=Ut,Gt;t[28]===w?Gt=t[29]:(Gt={control:w,name:`launchTemplateId`},t[28]=w,t[29]=Gt);let j=p(Gt),Kt;t[30]===w?Kt=t[31]:(Kt={control:w,name:`launchTemplateVersion`},t[30]=w,t[31]=Kt);let qt=p(Kt),Jt=j??``,M;t[32]===Jt?M=t[33]:(M=de(Jt),t[32]=Jt,t[33]=M);let Yt=!!j,Xt;t[34]!==M||t[35]!==Yt?(Xt={...M,enabled:Yt},t[34]=M,t[35]=Yt,t[36]=Xt):Xt=t[36];let Zt=ee(Xt),Qt;t[37]===Zt.data?.LaunchTemplateVersions?Qt=t[38]:(Qt=Zt.data?.LaunchTemplateVersions??[],t[37]=Zt.data?.LaunchTemplateVersions,t[38]=Qt);let N=Qt,$t;t[39]!==qt||t[40]!==N?($t=et(N,qt)?.LaunchTemplateData,t[39]=qt,t[40]=N,t[41]=$t):$t=t[41];let P=$t,en;t[42]!==vt||t[43]!==Lt||t[44]!==lt?(en=lt.find(e=>e.SubnetId===Lt)?.VpcId??vt,t[42]=vt,t[43]=Lt,t[44]=lt,t[45]=en):en=t[45];let F=en,tn;t[46]!==F||t[47]!==mt?(tn=F?mt.filter(e=>e.VpcId===F):mt,t[46]=F,t[47]=mt,t[48]=tn):tn=t[48];let nn=tn,rn;t[49]!==Et||t[50]!==E?(rn=e=>{let t=Et(`securityGroupIds`)??[],n=t.includes(e)?t.filter(t=>t!==e):[...t,e];E(`securityGroupIds`,n,{shouldValidate:!0})},t[49]=Et,t[50]=E,t[51]=rn):rn=t[51];let an=rn,on;t[52]!==A.deviceName||t[53]!==E?(on=()=>{E(`rootDeviceName`,A.deviceName)},t[52]=A.deviceName,t[53]=E,t[54]=on):on=t[54];let sn;t[55]!==k||t[56]!==A.deviceName||t[57]!==E?(sn=[k,A.deviceName,E],t[55]=k,t[56]=A.deviceName,t[57]=E,t[58]=sn):sn=t[58],(0,Ae.useEffect)(on,sn);let cn;t[59]!==b||t[60]!==F||t[61]!==f?(cn=async e=>{let t=e.launchTemplateId?{count:e.count,launchTemplateId:e.launchTemplateId,launchTemplateVersion:e.launchTemplateVersion,resolvedVpcId:F}:{...e,resolvedVpcId:F};await b.mutateAsync(t),f({to:`/ec2/describe-instances`})},t[59]=b,t[60]=F,t[61]=f,t[62]=cn):cn=t[62];let ln=cn,I,L;t[63]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,v.jsx)(re,{to:`/ec2/describe-instances`,children:`Back to instances`}),L=(0,v.jsx)(ye,{title:`Run Instances`}),t[63]=I,t[64]=L):(I=t[63],L=t[64]);let R;t[65]!==j||t[66]!==C?(R=C.length===0&&!j&&(0,v.jsx)(ve,{msg:`No compute available. No new instances can be created until compute is available.`}),t[65]=j,t[66]=C,t[67]=R):R=t[67];let z;t[68]===b.error?z=t[69]:(z=b.error&&(0,v.jsx)(ve,{error:b.error,msg:`Failed to create instance`}),t[68]=b.error,t[69]=z);let B;t[70]!==Tt||t[71]!==ln?(B=Tt(ln),t[70]=Tt,t[71]=ln,t[72]=B):B=t[72];let un;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(un=(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`launchTemplateId`,children:`Launch Template`})}),t[73]=un):un=t[73];let V;t[74]===gt?V=t[75]:(V=e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,v.jsx)(c,{className:`w-full`,id:`launchTemplateId`,children:(0,v.jsx)(a,{})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(o,{value:`none`,children:`none`}),gt.map(Je)]})]})},t[74]=gt,t[75]=V);let H;t[76]!==w||t[77]!==V?(H=(0,v.jsxs)(_,{children:[un,(0,v.jsx)(m,{control:w,name:`launchTemplateId`,render:V})]}),t[76]=w,t[77]=V,t[78]=H):H=t[78];let U;t[79]!==w||t[80]!==P||t[81]!==j||t[82]!==N?(U=j&&(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`launchTemplateVersion`,children:`Version`})}),(0,v.jsx)(m,{control:w,name:`launchTemplateVersion`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??`$Default`,children:[(0,v.jsx)(c,{className:`w-full`,id:`launchTemplateVersion`,children:(0,v.jsx)(a,{})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(o,{value:`$Default`,children:`$Default`}),(0,v.jsx)(o,{value:`$Latest`,children:`$Latest`}),N.map(qe)]})]})}}),P&&(0,v.jsxs)(`div`,{className:`mt-3 space-y-1 rounded-md border border-border p-3 text-xs`,children:[(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Configuration from this version:`}),(0,v.jsxs)(`p`,{children:[`Image:`,` `,(0,v.jsx)(`span`,{className:`font-mono`,children:P.ImageId??`—`})]}),(0,v.jsxs)(`p`,{children:[`Instance type:`,` `,(0,v.jsx)(`span`,{className:`font-mono`,children:P.InstanceType??`—`})]}),(0,v.jsxs)(`p`,{children:[`Key pair:`,` `,(0,v.jsx)(`span`,{className:`font-mono`,children:P.KeyName??`—`})]})]})]}),t[79]=w,t[80]=P,t[81]=j,t[82]=N,t[83]=U):U=t[83];let dn=!j&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),(0,v.jsx)(m,{control:w,name:`imageId`,render:e=>{let{field:t}=e,n=x.find(e=>e.ImageId===t.value);return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,v.jsx)(c,{"aria-invalid":!!D.imageId,className:`w-full`,id:`imageId`,children:(0,v.jsx)(a,{children:n?`${n.Name??`Unnamed`} (${n.Architecture})`:``})}),(0,v.jsx)(s,{children:x.map(Ke)})]})}}),(0,v.jsx)(g,{errors:[D.imageId]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,v.jsx)(m,{control:w,name:`instanceType`,render:e=>{let{field:t}=e;return(0,v.jsx)(Te,{"aria-invalid":!!D.instanceType,availabilityByType:S,className:`w-full`,id:`instanceType`,instanceTypes:y.InstanceTypes??[],onValueChange:t.onChange,value:t.value??``})}}),O&&(0,v.jsxs)(be,{children:[`GPU: `,O.Name,O.MemoryInfo?.SizeInMiB!==void 0&&` · ${ne(O.MemoryInfo.SizeInMiB)} VRAM`,Nt&&` · MIG ${Nt} slice`]}),(0,v.jsx)(g,{errors:[D.instanceType]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),(0,v.jsx)(m,{control:w,name:`keyName`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,v.jsx)(c,{"aria-invalid":!!D.keyName,className:`w-full`,id:`keyName`,children:(0,v.jsx)(a,{})}),(0,v.jsx)(s,{children:st.map(Ge)})]})}}),(0,v.jsx)(g,{errors:[D.keyName]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),(0,v.jsx)(m,{control:w,name:`subnetId`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,v.jsx)(c,{className:`w-full`,id:`subnetId`,children:(0,v.jsx)(a,{})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(o,{value:`none`,children:`none`}),lt.map(We)]})]})}})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:`Security Group`}),(0,v.jsx)(be,{children:F?`Applies to VPC ${F}`:`No VPC resolved — select a subnet`}),(0,v.jsx)(m,{control:w,name:`securityGroupMode`,render:Ue}),zt===`create`?(0,v.jsxs)(`div`,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`newSgName`,children:`Name`})}),(0,v.jsx)(u,{"aria-invalid":!!D.newSgName,id:`newSgName`,type:`text`,...T(`newSgName`)}),(0,v.jsx)(g,{errors:[D.newSgName]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`newSgDescription`,children:`Description`})}),(0,v.jsx)(u,{id:`newSgDescription`,type:`text`,...T(`newSgDescription`)})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:`Inbound rules`}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(m,{control:w,name:`allowSsh`,render:He}),(0,v.jsx)(m,{control:w,name:`allowHttp`,render:Ve}),(0,v.jsx)(m,{control:w,name:`allowHttps`,render:Be})]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:`Source`}),(0,v.jsx)(m,{control:w,name:`ruleSource`,render:ze}),Vt===`custom`&&(0,v.jsxs)(`div`,{className:`mt-2`,children:[(0,v.jsx)(u,{"aria-invalid":!!D.customCidr,placeholder:`203.0.113.0/24`,type:`text`,...T(`customCidr`)}),(0,v.jsx)(g,{errors:[D.customCidr]})]})]})]}):(0,v.jsxs)(`div`,{className:`mt-3`,children:[nn.length===0?(0,v.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the resolved VPC.`}):(0,v.jsx)(`div`,{className:`space-y-1`,children:nn.map(e=>(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,v.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:Wt.has(e.GroupId??``),onChange:()=>an(e.GroupId??``),type:`checkbox`}),(0,v.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))}),(0,v.jsx)(g,{errors:[D.securityGroupIds]})]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`placementGroupName`,children:`Placement Group`})}),(0,v.jsx)(m,{control:w,name:`placementGroupName`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,v.jsx)(c,{className:`w-full`,id:`placementGroupName`,children:(0,v.jsx)(a,{})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(o,{value:`none`,children:`none`}),dt.map(Re)]})]})}})]})]}),fn;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(fn=(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`count`,children:`Number of Instances`})}),t[84]=fn):fn=t[84];let pn=!!D.count,W;t[85]===T?W=t[86]:(W=T(`count`,{valueAsNumber:!0}),t[85]=T,t[86]=W);let G;t[87]!==pn||t[88]!==W?(G=(0,v.jsx)(u,{"aria-describedby":`count-description`,"aria-invalid":pn,id:`count`,type:`number`,...W}),t[87]=pn,t[88]=W,t[89]=G):G=t[89];let mn=jt&&`Available capacity for ${jt}: ${Mt}`,K;t[90]===mn?K=t[91]:(K=(0,v.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`count-description`,children:mn}),t[90]=mn,t[91]=K);let q;t[92]===D.count?q=t[93]:(q=(0,v.jsx)(g,{errors:[D.count]}),t[92]=D.count,t[93]=q);let J;t[94]!==G||t[95]!==K||t[96]!==q?(J=(0,v.jsxs)(_,{children:[fn,G,K,q]}),t[94]=G,t[95]=K,t[96]=q,t[97]=J):J=t[97];let Y;t[98]!==w||t[99]!==D.rootDeviceName||t[100]!==D.rootVolumeSize||t[101]!==D.rootVolumeType||t[102]!==T||t[103]!==A.snapshotSize||t[104]!==j?(Y=!j&&(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(Oe,{children:[(0,v.jsxs)(De,{className:`group flex h-7 w-full items-center justify-between rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none hover:bg-input/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 md:text-xs/relaxed dark:bg-input/30 dark:hover:bg-input/50`,render:(0,v.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,v.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,v.jsx)(ie,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),(0,v.jsxs)(Ee,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`rootDeviceName`,children:`Device Name`})}),(0,v.jsx)(u,{"aria-invalid":!!D.rootDeviceName,id:`rootDeviceName`,type:`text`,...T(`rootDeviceName`)}),(0,v.jsx)(g,{errors:[D.rootDeviceName]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),(0,v.jsx)(u,{"aria-invalid":!!D.rootVolumeSize,id:`rootVolumeSize`,max:Pe,min:A.snapshotSize??Ne,placeholder:A.snapshotSize?`${A.snapshotSize} (AMI default)`:`use AMI / backend default`,type:`number`,...T(`rootVolumeSize`,{setValueAs:Le})}),A.snapshotSize!==void 0&&(0,v.jsxs)(be,{children:[`AMI snapshot size: `,A.snapshotSize,` GiB`]}),(0,v.jsx)(g,{errors:[D.rootVolumeSize]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),(0,v.jsx)(m,{control:w,name:`rootVolumeType`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??Me,children:[(0,v.jsx)(c,{"aria-invalid":!!D.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,v.jsx)(a,{})}),(0,v.jsx)(s,{children:Ce.map(Ie)})]})}}),(0,v.jsx)(g,{errors:[D.rootVolumeType]})]}),(0,v.jsx)(_,{children:(0,v.jsx)(m,{control:w,name:`rootDeleteOnTermination`,render:Fe})})]})]})}),t[98]=w,t[99]=D.rootDeviceName,t[100]=D.rootVolumeSize,t[101]=D.rootVolumeType,t[102]=T,t[103]=A.snapshotSize,t[104]=j,t[105]=Y):Y=t[105];let X;t[106]!==F||t[107]!==Dt?(X=tt(Dt,F),t[106]=F,t[107]=Dt,t[108]=X):X=t[108];let Z;t[109]===X?Z=t[110]:(Z=(0,v.jsx)(ae,{commands:X}),t[109]=X,t[110]=Z);let hn=kt||b.isPending,Q;t[111]===f?Q=t[112]:(Q=async()=>await f({to:`/ec2/describe-instances`}),t[111]=f,t[112]=Q);let gn;t[113]!==hn||t[114]!==Q?(gn=(0,v.jsx)(oe,{disabled:hn,onClick:Q,type:`button`,variant:`outline`,children:`Cancel`}),t[113]=hn,t[114]=Q,t[115]=gn):gn=t[115];let _n=kt||b.isPending||!j&&C.length===0,vn=kt||b.isPending?`Creating…`:`Create Instance`,yn;t[116]!==_n||t[117]!==vn?(yn=(0,v.jsx)(oe,{disabled:_n,type:`submit`,children:vn}),t[116]=_n,t[117]=vn,t[118]=yn):yn=t[118];let bn;t[119]!==gn||t[120]!==yn?(bn=(0,v.jsxs)(`div`,{className:`flex gap-2`,children:[gn,yn]}),t[119]=gn,t[120]=yn,t[121]=bn):bn=t[121];let $;t[122]!==B||t[123]!==H||t[124]!==U||t[125]!==dn||t[126]!==J||t[127]!==Y||t[128]!==Z||t[129]!==bn?($=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[H,U,dn,J,Y,Z,bn]}),t[122]=B,t[123]=H,t[124]=U,t[125]=dn,t[126]=J,t[127]=Y,t[128]=Z,t[129]=bn,t[130]=$):$=t[130];let xn;return t[131]!==I||t[132]!==L||t[133]!==R||t[134]!==z||t[135]!==$?(xn=(0,v.jsxs)(v.Fragment,{children:[I,L,R,z,$]}),t[131]=I,t[132]=L,t[133]=R,t[134]=z,t[135]=$,t[136]=xn):xn=t[136],xn}function Fe(e){let{field:t}=e;return(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,v.jsx)(`input`,{"aria-label":`Delete on termination`,checked:t.value??!0,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Delete on termination`]})}function Ie(e){return(0,v.jsx)(o,{value:e,children:e},e)}function Le(e){return e===``||e==null?void 0:Number(e)}function Re(e){return(0,v.jsxs)(o,{value:e.GroupName??``,children:[e.GroupName,` (`,e.Strategy,`)`]},e.GroupId)}function ze(e){let{field:t}=e;return(0,v.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,v.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{"aria-label":`Source anywhere`,checked:t.value===`anywhere`,onChange:()=>t.onChange(`anywhere`),type:`radio`}),`Anywhere (0.0.0.0/0)`]}),(0,v.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{"aria-label":`Source custom CIDR`,checked:t.value===`custom`,onChange:()=>t.onChange(`custom`),type:`radio`}),`Custom CIDR`]})]})}function Be(e){let{field:t}=e;return(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,v.jsx)(`input`,{"aria-label":`Allow HTTPS`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Allow HTTPS (tcp/443)`]})}function Ve(e){let{field:t}=e;return(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,v.jsx)(`input`,{"aria-label":`Allow HTTP`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Allow HTTP (tcp/80)`]})}function He(e){let{field:t}=e;return(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,v.jsx)(`input`,{"aria-label":`Allow SSH`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Allow SSH (tcp/22)`]})}function Ue(e){let{field:t}=e;return(0,v.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,v.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{"aria-label":`Create new security group`,checked:t.value===`create`,onChange:()=>t.onChange(`create`),type:`radio`}),`Create new`]}),(0,v.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{"aria-label":`Select existing security group`,checked:t.value===`existing`,onChange:()=>t.onChange(`existing`),type:`radio`}),`Select existing`]})]})}function We(e){return(0,v.jsx)(o,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId)}function Ge(e){return(0,v.jsx)(o,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function Ke(e){return(0,v.jsxs)(o,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId)}function qe(e){return(0,v.jsxs)(o,{value:String(e.VersionNumber),children:[`v`,e.VersionNumber]},e.VersionNumber)}function Je(e){return(0,v.jsx)(o,{value:e.LaunchTemplateId??``,children:e.LaunchTemplateName??e.LaunchTemplateId},e.LaunchTemplateId)}function Ye(e){return e.endsWith(`.nano`)}function Xe(e){return e.GroupName??``}function Ze(e){return e.IsDefault}function Qe(e){return!we(e)}function $e(e){let t=e?.RootDeviceName??je,n=e?.BlockDeviceMappings??[];return{deviceName:t,snapshotSize:(n.find(e=>e.DeviceName===t)??n[0])?.Ebs?.VolumeSize}}function et(e,t){if(e.length===0)return;if(!t||t===`$Default`)return e.find(e=>e.DefaultVersion)??e[0];if(t===`$Latest`)return e.toSorted((e,t)=>(t.VersionNumber??0)-(e.VersionNumber??0))[0];let n=Number(t);return e.find(e=>e.VersionNumber===n)}function tt(e,t){let n=e(`launchTemplateId`),r=typeof n==`string`?n:``;if(r){let t=e(`launchTemplateVersion`),n=typeof t==`string`&&t?t:`$Default`,ee=e(`count`),i=typeof ee==`number`?ee:0;return[{label:`Run Instances`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ +import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as ee}from"./useQuery.js";import{t as i}from"./useSuspenseQuery.js";import{t as te}from"./useNavigate.js";import{en as ne}from"./cluster-config.js";import{t as re}from"./back-link.js";import{t as ie}from"./chevron-down.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{t as ae}from"./cli-command-panel.js";import{t as oe}from"./button.js";import{t as u}from"./input.js";import{M as se,O as ce,c as le,h as ue,m as de,o as fe,p as d,w as pe,y as me}from"./ec2.js";import{f as he}from"./ec22.js";import{t as f}from"./run-instances.js";import{a as p,i as ge,n as m,t as _e}from"./zod.js";import{t as ve}from"./error-banner.js";import{t as ye}from"./page-heading.js";import{a as h,n as be,r as g,t as _}from"./field.js";import{b as xe,i as Se,t as Ce}from"./ec23.js";import{i as we}from"./system-managed.js";import{t as Te}from"./gpu-instance-type-select.js";import{n as Ee,r as De,t as Oe}from"./collapsible.js";var ke=r(),Ae=e(n(),1),v=t(),je=`/dev/sda1`,Me=`gp3`,Ne=1,Pe=16384;function y(e){let t=(0,ke.c)(140),{launchTemplateId:n,launchTemplateVersion:r}=e,f=te(),{data:we}=i(fe),{data:je}=i(d),{data:y}=i(le),{data:nt}=i(ce),{data:rt}=i(me),{data:it}=i(se),{data:at}=i(pe),{data:ot}=i(ue),b=he(),st;t[0]===we.Images?st=t[1]:(st=we.Images??[],t[0]=we.Images,t[1]=st);let x=st.filter(Qe),ct;t[2]===je.KeyPairs?ct=t[3]:(ct=je.KeyPairs??[],t[2]=je.KeyPairs,t[3]=ct);let lt=ct,ut;t[4]===nt.Subnets?ut=t[5]:(ut=nt.Subnets??[],t[4]=nt.Subnets,t[5]=ut);let dt=ut,ft;t[6]===rt.PlacementGroups?ft=t[7]:(ft=rt.PlacementGroups??[],t[6]=rt.PlacementGroups,t[7]=ft);let pt=ft,mt;t[8]===it.Vpcs?mt=t[9]:(mt=it.Vpcs??[],t[8]=it.Vpcs,t[9]=mt);let ht=mt,gt;t[10]===at.SecurityGroups?gt=t[11]:(gt=at.SecurityGroups??[],t[10]=at.SecurityGroups,t[11]=gt);let _t=gt,vt;t[12]===ot.LaunchTemplates?vt=t[13]:(vt=ot.LaunchTemplates??[],t[12]=ot.LaunchTemplates,t[13]=vt);let yt=vt,bt;t[14]===ht?bt=t[15]:(bt=(ht.find(Ze)??ht[0])?.VpcId,t[14]=ht,t[15]=bt);let xt=bt,St=xe(_t.map(Xe)),S;if(t[16]!==y.InstanceTypes){S={};for(let e of y.InstanceTypes??[]){let t=e.InstanceType;t&&(S[t]=(S[t]??0)+1)}t[16]=y.InstanceTypes,t[17]=S}else S=t[17];let C=Object.keys(S).toSorted(),Ct=x[0]?.ImageId,wt=lt[0]?.KeyName,Tt=C.find(Ye)??C[0],Et=$e(x.find(e=>e.ImageId===Ct)),Dt;t[18]===S?Dt=t[19]:(Dt=e=>!e.instanceType||e.count<=(S[e.instanceType]??1),t[18]=S,t[19]=Dt);let{control:w,handleSubmit:Ot,register:T,setValue:E,getValues:kt,watch:At,formState:jt}=ge({resolver:_e(Se.refine(Dt,{message:`Cannot exceed available capacity`,path:[`count`]}).superRefine((e,t)=>{let n=$e(x.find(t=>t.ImageId===e.imageId)).snapshotSize;e.rootVolumeSize!==void 0&&n!==void 0&&e.rootVolumeSizee.InstanceType===Pt))?.GpuInfo?.Gpus?.[0],It=O?.Name?.startsWith(`MIG `)?O.Name.slice(4):void 0,Lt;t[22]===w?Lt=t[23]:(Lt={control:w,name:`imageId`},t[22]=w,t[23]=Lt);let Rt=p(Lt),zt;t[24]===Rt?zt=t[25]:(zt=e=>e.ImageId===Rt,t[24]=Rt,t[25]=zt);let k=$e(x.find(zt)),Bt;t[26]===w?Bt=t[27]:(Bt={control:w,name:`subnetId`},t[26]=w,t[27]=Bt);let Vt=p(Bt),Ht;t[28]===w?Ht=t[29]:(Ht={control:w,name:`securityGroupMode`},t[28]=w,t[29]=Ht);let Ut=p(Ht),Wt;t[30]===w?Wt=t[31]:(Wt={control:w,name:`ruleSource`},t[30]=w,t[31]=Wt);let Gt=p(Wt),Kt=p({control:w,name:`securityGroupIds`})??[],qt;t[32]===Kt?qt=t[33]:(qt=new Set(Kt),t[32]=Kt,t[33]=qt);let Jt=qt,Yt;t[34]===w?Yt=t[35]:(Yt={control:w,name:`launchTemplateId`},t[34]=w,t[35]=Yt);let A=p(Yt),Xt;t[36]===w?Xt=t[37]:(Xt={control:w,name:`launchTemplateVersion`},t[36]=w,t[37]=Xt);let Zt=p(Xt),Qt=A??``,$t;t[38]===Qt?$t=t[39]:($t=de(Qt),t[38]=Qt,t[39]=$t);let en=!!A,tn;t[40]!==$t||t[41]!==en?(tn={...$t,enabled:en},t[40]=$t,t[41]=en,t[42]=tn):tn=t[42];let nn=ee(tn),rn;t[43]===nn.data?.LaunchTemplateVersions?rn=t[44]:(rn=nn.data?.LaunchTemplateVersions??[],t[43]=nn.data?.LaunchTemplateVersions,t[44]=rn);let j=rn,an;t[45]!==Zt||t[46]!==j?(an=et(j,Zt)?.LaunchTemplateData,t[45]=Zt,t[46]=j,t[47]=an):an=t[47];let M=an,on;t[48]!==xt||t[49]!==Vt||t[50]!==dt?(on=dt.find(e=>e.SubnetId===Vt)?.VpcId??xt,t[48]=xt,t[49]=Vt,t[50]=dt,t[51]=on):on=t[51];let N=on,sn;t[52]!==N||t[53]!==_t?(sn=N?_t.filter(e=>e.VpcId===N):_t,t[52]=N,t[53]=_t,t[54]=sn):sn=t[54];let cn=sn,ln;t[55]!==kt||t[56]!==E?(ln=e=>{let t=kt(`securityGroupIds`)??[],n=t.includes(e)?t.filter(t=>t!==e):[...t,e];E(`securityGroupIds`,n,{shouldValidate:!0})},t[55]=kt,t[56]=E,t[57]=ln):ln=t[57];let un=ln,dn,fn;t[58]!==k.deviceName||t[59]!==E?(dn=()=>{E(`rootDeviceName`,k.deviceName)},fn=[k.deviceName,E],t[58]=k.deviceName,t[59]=E,t[60]=dn,t[61]=fn):(dn=t[60],fn=t[61]),(0,Ae.useEffect)(dn,fn);let pn;t[62]!==b||t[63]!==N||t[64]!==f?(pn=async e=>{let t=e.launchTemplateId?{count:e.count,launchTemplateId:e.launchTemplateId,launchTemplateVersion:e.launchTemplateVersion,resolvedVpcId:N}:{...e,resolvedVpcId:N};await b.mutateAsync(t),f({to:`/ec2/describe-instances`})},t[62]=b,t[63]=N,t[64]=f,t[65]=pn):pn=t[65];let mn=pn,P,F;t[66]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,v.jsx)(re,{to:`/ec2/describe-instances`,children:`Back to instances`}),F=(0,v.jsx)(ye,{title:`Run Instances`}),t[66]=P,t[67]=F):(P=t[66],F=t[67]);let I;t[68]!==A||t[69]!==C?(I=C.length===0&&!A&&(0,v.jsx)(ve,{msg:`No compute available. No new instances can be created until compute is available.`}),t[68]=A,t[69]=C,t[70]=I):I=t[70];let L;t[71]===b.error?L=t[72]:(L=b.error&&(0,v.jsx)(ve,{error:b.error,msg:`Failed to create instance`}),t[71]=b.error,t[72]=L);let R;t[73]!==Ot||t[74]!==mn?(R=Ot(mn),t[73]=Ot,t[74]=mn,t[75]=R):R=t[75];let hn;t[76]===Symbol.for(`react.memo_cache_sentinel`)?(hn=(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`launchTemplateId`,children:`Launch Template`})}),t[76]=hn):hn=t[76];let z;t[77]===yt?z=t[78]:(z=e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,v.jsx)(c,{className:`w-full`,id:`launchTemplateId`,children:(0,v.jsx)(a,{})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(o,{value:`none`,children:`none`}),yt.map(Je)]})]})},t[77]=yt,t[78]=z);let B;t[79]!==w||t[80]!==z?(B=(0,v.jsxs)(_,{children:[hn,(0,v.jsx)(m,{control:w,name:`launchTemplateId`,render:z})]}),t[79]=w,t[80]=z,t[81]=B):B=t[81];let V;t[82]!==w||t[83]!==M||t[84]!==A||t[85]!==j?(V=A&&(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`launchTemplateVersion`,children:`Version`})}),(0,v.jsx)(m,{control:w,name:`launchTemplateVersion`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??`$Default`,children:[(0,v.jsx)(c,{className:`w-full`,id:`launchTemplateVersion`,children:(0,v.jsx)(a,{})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(o,{value:`$Default`,children:`$Default`}),(0,v.jsx)(o,{value:`$Latest`,children:`$Latest`}),j.map(qe)]})]})}}),M&&(0,v.jsxs)(`div`,{className:`mt-3 space-y-1 rounded-md border border-border p-3 text-xs`,children:[(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Configuration from this version:`}),(0,v.jsxs)(`p`,{children:[`Image:`,` `,(0,v.jsx)(`span`,{className:`font-mono`,children:M.ImageId??`—`})]}),(0,v.jsxs)(`p`,{children:[`Instance type:`,` `,(0,v.jsx)(`span`,{className:`font-mono`,children:M.InstanceType??`—`})]}),(0,v.jsxs)(`p`,{children:[`Key pair:`,` `,(0,v.jsx)(`span`,{className:`font-mono`,children:M.KeyName??`—`})]})]})]}),t[82]=w,t[83]=M,t[84]=A,t[85]=j,t[86]=V):V=t[86];let gn=!A&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),(0,v.jsx)(m,{control:w,name:`imageId`,render:e=>{let{field:t}=e,n=x.find(e=>e.ImageId===t.value);return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,v.jsx)(c,{"aria-invalid":!!D.imageId,className:`w-full`,id:`imageId`,children:(0,v.jsx)(a,{children:n?`${n.Name??`Unnamed`} (${n.Architecture})`:``})}),(0,v.jsx)(s,{children:x.map(Ke)})]})}}),(0,v.jsx)(g,{errors:[D.imageId]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,v.jsx)(m,{control:w,name:`instanceType`,render:e=>{let{field:t}=e;return(0,v.jsx)(Te,{"aria-invalid":!!D.instanceType,availabilityByType:S,className:`w-full`,id:`instanceType`,instanceTypes:y.InstanceTypes??[],onValueChange:t.onChange,value:t.value??``})}}),O&&(0,v.jsxs)(be,{children:[`GPU: `,O.Name,O.MemoryInfo?.SizeInMiB!==void 0&&` · ${ne(O.MemoryInfo.SizeInMiB)} VRAM`,It&&` · MIG ${It} slice`]}),(0,v.jsx)(g,{errors:[D.instanceType]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),(0,v.jsx)(m,{control:w,name:`keyName`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,v.jsx)(c,{"aria-invalid":!!D.keyName,className:`w-full`,id:`keyName`,children:(0,v.jsx)(a,{})}),(0,v.jsx)(s,{children:lt.map(Ge)})]})}}),(0,v.jsx)(g,{errors:[D.keyName]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),(0,v.jsx)(m,{control:w,name:`subnetId`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,v.jsx)(c,{className:`w-full`,id:`subnetId`,children:(0,v.jsx)(a,{})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(o,{value:`none`,children:`none`}),dt.map(We)]})]})}})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:`Security Group`}),(0,v.jsx)(be,{children:N?`Applies to VPC ${N}`:`No VPC resolved — select a subnet`}),(0,v.jsx)(m,{control:w,name:`securityGroupMode`,render:Ue}),Ut===`create`?(0,v.jsxs)(`div`,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`newSgName`,children:`Name`})}),(0,v.jsx)(u,{"aria-invalid":!!D.newSgName,id:`newSgName`,type:`text`,...T(`newSgName`)}),(0,v.jsx)(g,{errors:[D.newSgName]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`newSgDescription`,children:`Description`})}),(0,v.jsx)(u,{id:`newSgDescription`,type:`text`,...T(`newSgDescription`)})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:`Inbound rules`}),(0,v.jsxs)(`div`,{className:`space-y-1`,children:[(0,v.jsx)(m,{control:w,name:`allowSsh`,render:He}),(0,v.jsx)(m,{control:w,name:`allowHttp`,render:Ve}),(0,v.jsx)(m,{control:w,name:`allowHttps`,render:Be})]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:`Source`}),(0,v.jsx)(m,{control:w,name:`ruleSource`,render:ze}),Gt===`custom`&&(0,v.jsxs)(`div`,{className:`mt-2`,children:[(0,v.jsx)(u,{"aria-invalid":!!D.customCidr,placeholder:`203.0.113.0/24`,type:`text`,...T(`customCidr`)}),(0,v.jsx)(g,{errors:[D.customCidr]})]})]})]}):(0,v.jsxs)(`div`,{className:`mt-3`,children:[cn.length===0?(0,v.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No security groups in the resolved VPC.`}):(0,v.jsx)(`div`,{className:`space-y-1`,children:cn.map(e=>(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,v.jsx)(`input`,{"aria-label":`Security group ${e.GroupId} (${e.GroupName})`,checked:Jt.has(e.GroupId??``),onChange:()=>un(e.GroupId??``),type:`checkbox`}),(0,v.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))}),(0,v.jsx)(g,{errors:[D.securityGroupIds]})]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`placementGroupName`,children:`Placement Group`})}),(0,v.jsx)(m,{control:w,name:`placementGroupName`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e===`none`?void 0:e),value:t.value??`none`,children:[(0,v.jsx)(c,{className:`w-full`,id:`placementGroupName`,children:(0,v.jsx)(a,{})}),(0,v.jsxs)(s,{children:[(0,v.jsx)(o,{value:`none`,children:`none`}),pt.map(Re)]})]})}})]})]}),_n;t[87]===Symbol.for(`react.memo_cache_sentinel`)?(_n=(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`count`,children:`Number of Instances`})}),t[87]=_n):_n=t[87];let vn=!!D.count,H;t[88]===T?H=t[89]:(H=T(`count`,{valueAsNumber:!0}),t[88]=T,t[89]=H);let U;t[90]!==vn||t[91]!==H?(U=(0,v.jsx)(u,{"aria-describedby":`count-description`,"aria-invalid":vn,id:`count`,type:`number`,...H}),t[90]=vn,t[91]=H,t[92]=U):U=t[92];let yn=Pt&&`Available capacity for ${Pt}: ${Ft}`,W;t[93]===yn?W=t[94]:(W=(0,v.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`count-description`,children:yn}),t[93]=yn,t[94]=W);let G;t[95]===D.count?G=t[96]:(G=(0,v.jsx)(g,{errors:[D.count]}),t[95]=D.count,t[96]=G);let K;t[97]!==U||t[98]!==W||t[99]!==G?(K=(0,v.jsxs)(_,{children:[_n,U,W,G]}),t[97]=U,t[98]=W,t[99]=G,t[100]=K):K=t[100];let q;t[101]!==w||t[102]!==D.rootDeviceName||t[103]!==D.rootVolumeSize||t[104]!==D.rootVolumeType||t[105]!==T||t[106]!==k.snapshotSize||t[107]!==A?(q=!A&&(0,v.jsx)(v.Fragment,{children:(0,v.jsxs)(Oe,{children:[(0,v.jsxs)(De,{className:`group flex h-7 w-full items-center justify-between rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm transition-colors outline-none hover:bg-input/40 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 md:text-xs/relaxed dark:bg-input/30 dark:hover:bg-input/50`,render:(0,v.jsx)(`button`,{"aria-label":`Block Device Mappings (root volume)`,type:`button`}),children:[(0,v.jsx)(`span`,{children:`Block Device Mappings (root volume)`}),(0,v.jsx)(ie,{className:`size-3.5 text-muted-foreground transition-transform group-data-[panel-open]:rotate-180`})]}),(0,v.jsxs)(Ee,{className:`mt-3 space-y-4 rounded-md border border-border p-4`,children:[(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`rootDeviceName`,children:`Device Name`})}),(0,v.jsx)(u,{"aria-invalid":!!D.rootDeviceName,id:`rootDeviceName`,type:`text`,...T(`rootDeviceName`)}),(0,v.jsx)(g,{errors:[D.rootDeviceName]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`rootVolumeSize`,children:`Volume Size (GiB)`})}),(0,v.jsx)(u,{"aria-invalid":!!D.rootVolumeSize,id:`rootVolumeSize`,max:Pe,min:k.snapshotSize??Ne,placeholder:k.snapshotSize?`${k.snapshotSize} (AMI default)`:`use AMI / backend default`,type:`number`,...T(`rootVolumeSize`,{setValueAs:Le})}),k.snapshotSize!==void 0&&(0,v.jsxs)(be,{children:[`AMI snapshot size: `,k.snapshotSize,` GiB`]}),(0,v.jsx)(g,{errors:[D.rootVolumeSize]})]}),(0,v.jsxs)(_,{children:[(0,v.jsx)(h,{children:(0,v.jsx)(`label`,{htmlFor:`rootVolumeType`,children:`Volume Type`})}),(0,v.jsx)(m,{control:w,name:`rootVolumeType`,render:e=>{let{field:t}=e;return(0,v.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??Me,children:[(0,v.jsx)(c,{"aria-invalid":!!D.rootVolumeType,className:`w-full`,id:`rootVolumeType`,children:(0,v.jsx)(a,{})}),(0,v.jsx)(s,{children:Ce.map(Ie)})]})}}),(0,v.jsx)(g,{errors:[D.rootVolumeType]})]}),(0,v.jsx)(_,{children:(0,v.jsx)(m,{control:w,name:`rootDeleteOnTermination`,render:Fe})})]})]})}),t[101]=w,t[102]=D.rootDeviceName,t[103]=D.rootVolumeSize,t[104]=D.rootVolumeType,t[105]=T,t[106]=k.snapshotSize,t[107]=A,t[108]=q):q=t[108];let J;t[109]!==N||t[110]!==At?(J=tt(At,N),t[109]=N,t[110]=At,t[111]=J):J=t[111];let Y;t[112]===J?Y=t[113]:(Y=(0,v.jsx)(ae,{commands:J}),t[112]=J,t[113]=Y);let bn=Mt||b.isPending,X;t[114]===f?X=t[115]:(X=async()=>await f({to:`/ec2/describe-instances`}),t[114]=f,t[115]=X);let Z;t[116]!==bn||t[117]!==X?(Z=(0,v.jsx)(oe,{disabled:bn,onClick:X,type:`button`,variant:`outline`,children:`Cancel`}),t[116]=bn,t[117]=X,t[118]=Z):Z=t[118];let xn=Mt||b.isPending||!A&&C.length===0,Sn=Mt||b.isPending?`Creating…`:`Create Instance`,Q;t[119]!==xn||t[120]!==Sn?(Q=(0,v.jsx)(oe,{disabled:xn,type:`submit`,children:Sn}),t[119]=xn,t[120]=Sn,t[121]=Q):Q=t[121];let Cn;t[122]!==Z||t[123]!==Q?(Cn=(0,v.jsxs)(`div`,{className:`flex gap-2`,children:[Z,Q]}),t[122]=Z,t[123]=Q,t[124]=Cn):Cn=t[124];let $;t[125]!==R||t[126]!==B||t[127]!==V||t[128]!==gn||t[129]!==K||t[130]!==q||t[131]!==Y||t[132]!==Cn?($=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:R,children:[B,V,gn,K,q,Y,Cn]}),t[125]=R,t[126]=B,t[127]=V,t[128]=gn,t[129]=K,t[130]=q,t[131]=Y,t[132]=Cn,t[133]=$):$=t[133];let wn;return t[134]!==P||t[135]!==F||t[136]!==I||t[137]!==L||t[138]!==$?(wn=(0,v.jsxs)(v.Fragment,{children:[P,F,I,L,$]}),t[134]=P,t[135]=F,t[136]=I,t[137]=L,t[138]=$,t[139]=wn):wn=t[139],wn}function Fe(e){let{field:t}=e;return(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,v.jsx)(`input`,{"aria-label":`Delete on termination`,checked:t.value??!0,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Delete on termination`]})}function Ie(e){return(0,v.jsx)(o,{value:e,children:e},e)}function Le(e){return e===``||e==null?void 0:Number(e)}function Re(e){return(0,v.jsxs)(o,{value:e.GroupName??``,children:[e.GroupName,` (`,e.Strategy,`)`]},e.GroupId)}function ze(e){let{field:t}=e;return(0,v.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,v.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{"aria-label":`Source anywhere`,checked:t.value===`anywhere`,onChange:()=>t.onChange(`anywhere`),type:`radio`}),`Anywhere (0.0.0.0/0)`]}),(0,v.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{"aria-label":`Source custom CIDR`,checked:t.value===`custom`,onChange:()=>t.onChange(`custom`),type:`radio`}),`Custom CIDR`]})]})}function Be(e){let{field:t}=e;return(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,v.jsx)(`input`,{"aria-label":`Allow HTTPS`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Allow HTTPS (tcp/443)`]})}function Ve(e){let{field:t}=e;return(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,v.jsx)(`input`,{"aria-label":`Allow HTTP`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Allow HTTP (tcp/80)`]})}function He(e){let{field:t}=e;return(0,v.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,v.jsx)(`input`,{"aria-label":`Allow SSH`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),`Allow SSH (tcp/22)`]})}function Ue(e){let{field:t}=e;return(0,v.jsxs)(`div`,{className:`flex gap-4 text-sm`,children:[(0,v.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{"aria-label":`Create new security group`,checked:t.value===`create`,onChange:()=>t.onChange(`create`),type:`radio`}),`Create new`]}),(0,v.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(`input`,{"aria-label":`Select existing security group`,checked:t.value===`existing`,onChange:()=>t.onChange(`existing`),type:`radio`}),`Select existing`]})]})}function We(e){return(0,v.jsx)(o,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId)}function Ge(e){return(0,v.jsx)(o,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId)}function Ke(e){return(0,v.jsxs)(o,{value:e.ImageId??``,children:[e.Name??`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId)}function qe(e){return(0,v.jsxs)(o,{value:String(e.VersionNumber),children:[`v`,e.VersionNumber]},e.VersionNumber)}function Je(e){return(0,v.jsx)(o,{value:e.LaunchTemplateId??``,children:e.LaunchTemplateName??e.LaunchTemplateId},e.LaunchTemplateId)}function Ye(e){return e.endsWith(`.nano`)}function Xe(e){return e.GroupName??``}function Ze(e){return e.IsDefault}function Qe(e){return!we(e)}function $e(e){let t=e?.RootDeviceName??je,n=e?.BlockDeviceMappings??[];return{deviceName:t,snapshotSize:(n.find(e=>e.DeviceName===t)??n[0])?.Ebs?.VolumeSize}}function et(e,t){if(e.length===0)return;if(!t||t===`$Default`)return e.find(e=>e.DefaultVersion)??e[0];if(t===`$Latest`)return e.toSorted((e,t)=>(t.VersionNumber??0)-(e.VersionNumber??0))[0];let n=Number(t);return e.find(e=>e.VersionNumber===n)}function tt(e,t){let n=e(`launchTemplateId`),r=typeof n==`string`?n:``;if(r){let t=e(`launchTemplateVersion`),n=typeof t==`string`&&t?t:`$Default`,ee=e(`count`),i=typeof ee==`number`?ee:0;return[{label:`Run Instances`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ --launch-template`},{type:`value`,value:` LaunchTemplateId=${r},Version=${n}`},{type:`flag`,value:` \\ --count`},{type:`value`,value:` ${i||1}`}]}]}let ee=e(`imageId`),i=typeof ee==`string`?ee:``,te=e(`instanceType`),ne=typeof te==`string`?te:``,re=e(`keyName`),ie=typeof re==`string`?re:``,a=e(`subnetId`),o=typeof a==`string`?a:``,s=e(`placementGroupName`),c=typeof s==`string`?s:``,l=e(`count`),ae=typeof l==`number`?l:0,oe=e(`rootDeviceName`),u=typeof oe==`string`?oe:``,se=e(`rootVolumeSize`),ce=typeof se==`number`?se:void 0,le=e(`rootVolumeType`),ue=typeof le==`string`?le:``,de=e(`rootDeleteOnTermination`),fe=typeof de!=`boolean`||de,d=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 run-instances`},{type:`flag`,value:` \\ --image-id`},{type:`value`,value:` ${i||``}`},{type:`flag`,value:` \\ diff --git a/spinifex/services/spinifexui/frontend/oxlint.config.ts b/spinifex/services/spinifexui/frontend/oxlint.config.ts index 19a328525..fc49e17a4 100644 --- a/spinifex/services/spinifexui/frontend/oxlint.config.ts +++ b/spinifex/services/spinifexui/frontend/oxlint.config.ts @@ -45,6 +45,7 @@ export default defineConfig({ { namedComponents: "function-declaration" }, ], "react/jsx-handler-names": "off", + "react/todo": "off", "react-you-might-not-need-an-effect/no-adjust-state-on-prop-change": "error", "react-you-might-not-need-an-effect/no-chain-state-updates": "error", diff --git a/spinifex/services/spinifexui/frontend/package.json b/spinifex/services/spinifexui/frontend/package.json index 45b87b3ef..eb702bd67 100644 --- a/spinifex/services/spinifexui/frontend/package.json +++ b/spinifex/services/spinifexui/frontend/package.json @@ -43,7 +43,6 @@ "zod": "^4.4.3" }, "devDependencies": { - "@rolldown/plugin-babel": "^0.2.3", "@tailwindcss/vite": "^4.3.3", "@tanstack/eslint-plugin-query": "^5.101.4", "@tanstack/eslint-plugin-router": "^1.162.0", @@ -55,17 +54,17 @@ "@types/react": "^19.2.18", "@types/react-dom": "^19.2.4", "@vitejs/plugin-basic-ssl": "^2.3.0", - "@vitejs/plugin-react": "^6.0.5", + "@vitejs/plugin-react": "^6.1.0", "@vitest/coverage-v8": "^4.1.10", - "babel-plugin-react-compiler": "^1.0.0", "eslint-plugin-react-you-might-not-need-an-effect": "^1.0.1", "happy-dom": "^20.11.2", - "oxfmt": "^0.63.0", - "oxlint": "^1.78.0", + "oxc-transform-react": "^0.145.0", + "oxfmt": "^0.64.0", + "oxlint": "^1.79.0", "oxlint-tsgolint": "^7.0.2001", "tailwindcss": "^4.3.3", "typescript": "7.0.2", - "ultracite": "7.10.3", + "ultracite": "7.10.6", "vite": "^8.2.1", "vitest": "^4.1.10" }, diff --git a/spinifex/services/spinifexui/frontend/pnpm-lock.yaml b/spinifex/services/spinifexui/frontend/pnpm-lock.yaml index 3f81a48ec..621a5882d 100644 --- a/spinifex/services/spinifexui/frontend/pnpm-lock.yaml +++ b/spinifex/services/spinifexui/frontend/pnpm-lock.yaml @@ -93,9 +93,6 @@ importers: specifier: ^4.4.3 version: 4.4.3 devDependencies: - '@rolldown/plugin-babel': - specifier: ^0.2.3 - version: 0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(rolldown@1.2.3)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)) '@tailwindcss/vite': specifier: ^4.3.3 version: 4.3.3(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)) @@ -130,26 +127,26 @@ importers: specifier: ^2.3.0 version: 2.3.0(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)) '@vitejs/plugin-react': - specifier: ^6.0.5 - version: 6.0.5(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(rolldown@1.2.3)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)) + specifier: ^6.1.0 + version: 6.1.0(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(rolldown@1.2.3)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(oxc-transform-react@0.145.0)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)) '@vitest/coverage-v8': specifier: ^4.1.10 version: 4.1.10(vitest@4.1.10) - babel-plugin-react-compiler: - specifier: ^1.0.0 - version: 1.0.0 eslint-plugin-react-you-might-not-need-an-effect: specifier: ^1.0.1 version: 1.0.1(eslint@9.39.4(jiti@2.7.0)) happy-dom: specifier: ^20.11.2 version: 20.11.2 + oxc-transform-react: + specifier: ^0.145.0 + version: 0.145.0 oxfmt: - specifier: ^0.63.0 - version: 0.63.0 + specifier: ^0.64.0 + version: 0.64.0 oxlint: - specifier: ^1.78.0 - version: 1.78.0(oxlint-tsgolint@7.0.2001) + specifier: ^1.79.0 + version: 1.79.0(oxlint-tsgolint@7.0.2001) oxlint-tsgolint: specifier: ^7.0.2001 version: 7.0.2001 @@ -160,8 +157,8 @@ importers: specifier: 7.0.2 version: 7.0.2 ultracite: - specifier: 7.10.3 - version: 7.10.3(oxfmt@0.63.0)(oxlint@1.78.0(oxlint-tsgolint@7.0.2001)) + specifier: 7.10.6 + version: 7.10.6(oxfmt@0.64.0)(oxlint@1.79.0(oxlint-tsgolint@7.0.2001)) vite: specifier: ^8.2.1 version: 8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0) @@ -351,18 +348,10 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-string-parser@7.27.1': - resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} - engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.29.7': resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.28.5': - resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.29.7': resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} engines: {node: '>=6.9.0'} @@ -401,10 +390,6 @@ packages: resolution: {integrity: sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==} engines: {node: '>=6.9.0'} - '@babel/types@7.29.0': - resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} - engines: {node: '>=6.9.0'} - '@babel/types@7.29.8': resolution: {integrity: sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==} engines: {node: '>=6.9.0'} @@ -642,124 +627,246 @@ packages: '@oxc-project/types@0.143.0': resolution: {integrity: sha512-u6JZdLBTLotrNC9Vd6vPssINdzcCzleKAH6EJKImQb7GtYvX5keN2dxkoK44stCc4tffE6QQRtZTXVSzsLUlWA==} - '@oxfmt/binding-android-arm-eabi@0.63.0': - resolution: {integrity: sha512-YmRth4ZPGgEXcgmkhvANbC9uD67dxmSobW7DQuyt5tOBOKvPnIpk5SVHBj88E+7wMNRI2FhqaDbOhQFBix+b8A==} + '@oxc-transform-react/binding-android-arm-eabi@0.145.0': + resolution: {integrity: sha512-KuK3zAp10yFyeAxIXlZn2ycsFpaKLxUmj5BVRS1io4XfwnKTozb/goZakgKD5JEiHOVOtEKt1r7pTrmW/pFxxA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxfmt/binding-android-arm64@0.63.0': - resolution: {integrity: sha512-icbahX8X2X3sRamOMecvdYeZXWjPDazRDIfvWfy7Ca1nc/ZDT2Y9k5Nt7s46EqFd7NQPdgk+CM3/SgIT5LPCaQ==} + '@oxc-transform-react/binding-android-arm64@0.145.0': + resolution: {integrity: sha512-eDUKx6MAgRAF67JPScjLF6h8lL2qmlvFrXGSG8mYFIVJb++NMyDygiIo8TAKdWQNguoBElUZw/SK2EPRaKsryQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxfmt/binding-darwin-arm64@0.63.0': - resolution: {integrity: sha512-WV+Ze5v5gI2qoj8jpAovt8KBTW8pjEz/AiMXXjeTQS+Bmf/MmZXTS40S8xNPDszX+W8WDv2Bbk6qKrMTtUGu1A==} + '@oxc-transform-react/binding-darwin-arm64@0.145.0': + resolution: {integrity: sha512-msCgwbVLswJ08JaUOjfPddieVJwE4IT1Y23A1DDyKVyzZp2ormo9a4ffDEu9nmmovdEj8VqAyFgggsgzIkBVrA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxfmt/binding-darwin-x64@0.63.0': - resolution: {integrity: sha512-CJGSBdDxXOWIpoFXHpverimCvz084KA7L483rqJ44c3jDtzv6d4qOSoR/V9ywSHfV+Ks1lwIj2P49BFhunLNAA==} + '@oxc-transform-react/binding-darwin-x64@0.145.0': + resolution: {integrity: sha512-R0PtsoOCsARulmWhLG1fFInT+98TRl/H6w6ifi8XOLvpdsksD1rxsw4Ol84lHbdHCcMNjfJTckZzQIZBMiXkLg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxfmt/binding-freebsd-x64@0.63.0': - resolution: {integrity: sha512-BDfKY+KhL2078cgswBBFQPAYuxCy93bS/iC5frdSeSbTLcGrR6VC2hsuPTanoJmg84+wSyWl0wWC1eR+uTnkRg==} + '@oxc-transform-react/binding-freebsd-x64@0.145.0': + resolution: {integrity: sha512-/MJ7+IvxfutSGqn6hIXU92wGNk5FlkqbTHM+kEl7ytLLOSAyivYhF2gxdYMmXTwOG56k2XviMcE0D/TBjdyoRA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxfmt/binding-linux-arm-gnueabihf@0.63.0': - resolution: {integrity: sha512-Ov1cQEXT4mj7cojAokWSS1eoxkoyvbDfAbxNsGIKY2o36kvdAaFzPxRN6NxFRk9fD72B8oCoTTX/NuYTUWlpsg==} + '@oxc-transform-react/binding-linux-arm-gnueabihf@0.145.0': + resolution: {integrity: sha512-ssHZ0W2wSjQwaBQdkg8u+A7dTdw2vkGSK0hRfCoDCkRkETu+19Q8Tae7NNxlYHcP1iUQYhEj8Qfgpq+S/MdrYA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm-musleabihf@0.63.0': - resolution: {integrity: sha512-0LE7ro3+6L79jcMANycAZfRaC7zxr9YZ2+vEL5uMD9QlEep+rS/r1kSJsnuLl991NXJZD60euh0PC1GHrR20vw==} + '@oxc-transform-react/binding-linux-arm-musleabihf@0.145.0': + resolution: {integrity: sha512-adJy4lQVcoIW6CUzQYbDgbHZMDSLoizwCinG2Dex29jdACKwIgXQQrIAHAgfveaZleKIB/rf3usGoRcOGyfz7Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm64-gnu@0.63.0': - resolution: {integrity: sha512-izPk+2Z4gjuZK32Fqh5qXoMpT/2NXzLh++ob57HiEiVSQZ1iYXu8EKMzb+K5AvWyIEXhdDIt7ADjGGtFhkT9Bw==} + '@oxc-transform-react/binding-linux-arm64-gnu@0.145.0': + resolution: {integrity: sha512-7KRa0CC1FaSKx5sy+bDtqGvXF+RiVoMmSe8OmTKm9kRZkNVdmsmpnsQhgravehTohlWDveo5aoGMwcFtffGDmw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-arm64-musl@0.63.0': - resolution: {integrity: sha512-alPmbOuWXFXiSo+lOtv6X71C7SYMEDW2WVvywOvf9BwKgEhSNGhMTLeFVSjKUMCamcjbbgVdsWF8GN1uy8xshg==} + '@oxc-transform-react/binding-linux-arm64-musl@0.145.0': + resolution: {integrity: sha512-fGhZkDnk2RoMp6THas9HFGorF0A1wwPPA/2Lu9IUO1ip5MJqS/JG7/conmiz0DBG0PWBtnKl2Y8sA/VBiD/oQw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-ppc64-gnu@0.63.0': - resolution: {integrity: sha512-BdzCPvolJc4AWZ+YMzgUDJcDzbQWrFjYuqBHoNHNqP1aCaluQRJNs4k3vNU5IG7vTpjf9zeD73D7MFM1TecZpg==} + '@oxc-transform-react/binding-linux-ppc64-gnu@0.145.0': + resolution: {integrity: sha512-VBaUTjRZYRypD2tL7cmbM2Fn6fvTnacLQ1GdsU1Y6A3fkqA/z+wc5Vy1QnnuFe9sIwb9xCvSS2tJVlucR39FYw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-gnu@0.63.0': - resolution: {integrity: sha512-7sIgfLzqtNKSkMGsGVyRpHwpjNezRg2XONvUOheFZs95TSZpM0JAuPpA8KrQFsWc4wPU95roX2O69JgH8igOgw==} + '@oxc-transform-react/binding-linux-riscv64-gnu@0.145.0': + resolution: {integrity: sha512-s2cimMVAmWe9dtjyWdGsYtevi9C7gJoOXwrCZD0BX7hgyGmuBO3iWQjx4W48hdXlWS176NoxuFIHAN72N86upA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-musl@0.63.0': - resolution: {integrity: sha512-9Tcg0y0WcVa6Mm9AgcgFMseDS+VkFJZpKZ8We9SpDY4gg5jewSwln+0sO04QLcTS1BtfDl9MwR+NfID8L7PUTg==} + '@oxc-transform-react/binding-linux-riscv64-musl@0.145.0': + resolution: {integrity: sha512-hFPrsL2nKL4aa8vFmheR53PcrxQgym8bnaSD1pMX9IoyQq+/ksAuw1CDJSV9c5xhxxZdw/KTPVer7M/6OQvfoA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-s390x-gnu@0.63.0': - resolution: {integrity: sha512-qWKC1pEOpx1qYhXaugPhHUeXwSfqEOk2wJH2LqVXGPV5iQYfdAZdt+d2XDiX4DTSWA2QDMUcFB+wEORh3Xn/sA==} + '@oxc-transform-react/binding-linux-s390x-gnu@0.145.0': + resolution: {integrity: sha512-YLKhySqqu0JAtT0z8GuaFF7Hht3IvQLZShTH0DxeV28NwSthva+qJ7GN09ALT1bqRVvMjNGycgPHaGSWBUIt7A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-gnu@0.63.0': - resolution: {integrity: sha512-S9wXYOiGSqYGS4Fx/TFsY+xDd/7dE5s+rUgbA4TsHiVF9e8J3ZcKmP7dsP/7iqLI9Wz7Ic7TzEr3mdthRCTdrA==} + '@oxc-transform-react/binding-linux-x64-gnu@0.145.0': + resolution: {integrity: sha512-WqgJ+0M9mwQ1cRfSgk4vzYudD2imLSBhUZ2QFes06vUjigts5Dw4NajWKc2JibPHYsoiUA9Zj39zWwC5AxXEGQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-musl@0.63.0': - resolution: {integrity: sha512-5eGyTJuMZNwBSHCivXt8Yuta6GeTYksOPXRk2MIhajiyFGQx7bjaHIwY+ZusAoFHhT157A9x6sktLjYo9D5oMQ==} + '@oxc-transform-react/binding-linux-x64-musl@0.145.0': + resolution: {integrity: sha512-eIre/TjGt07IVKoWUrUOkPxN7UKeWxbiGvCywoGLDRe1/2K50MrA2vQahZ8AlW5CLmajOr9ePKrkRzLg1fa0cQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxfmt/binding-openharmony-arm64@0.63.0': - resolution: {integrity: sha512-Rz7hx+Dv3DoW/S6pwVAyjfFXp7/trdQ1zg+vNmsdsdDNlUccugp4XNqambSuEAeP0DaG9k72AtNyfDXCEg0AGw==} + '@oxc-transform-react/binding-openharmony-arm64@0.145.0': + resolution: {integrity: sha512-zhWiyJ+9XD4cuhSZIT6aozuXDHcZHNdoVe88xVmx2XN00anjZ6VAGj31rhD8ndha/F8NllcQEr8Q61Dr2MHv5Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxfmt/binding-win32-arm64-msvc@0.63.0': - resolution: {integrity: sha512-T/IuizKN9mr4Xw6YYnptkXRNdLkyIlUZ7c8zfTOBpoytZyJ1BAsMUvsMDEx0X4YvSMpaivm+DR8112rQfzC25g==} + '@oxc-transform-react/binding-win32-arm64-msvc@0.145.0': + resolution: {integrity: sha512-Q0oiZfrfYyhmpqH2K0dylDTooIadecGsoiQks7G0AbuszCu2I7zYyJo4ArFc3d5Hj49Jjc5dDAE5WP/Sg2p8hw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxfmt/binding-win32-ia32-msvc@0.63.0': - resolution: {integrity: sha512-XjrO5FJ5Wl9vsAxtCP1G/eaeT6y1K2s9CICUHGE42cEjou32/J6S+B1KnrOAboj6E7uhJnwPbRSvznWcxNdA0g==} + '@oxc-transform-react/binding-win32-ia32-msvc@0.145.0': + resolution: {integrity: sha512-ERpriVJY5S8hXd3BJi4UtzsIVsEQnntmpqTgRqh0XCaflLRLTQnPWpkO8rgtI7xye5MRhfhA+qsxKg2olJs4qA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxfmt/binding-win32-x64-msvc@0.63.0': - resolution: {integrity: sha512-sgsHCQy432OTQH4Ikk3tZptp3GqwnhwUDuY0loBH41zyHWfMZY9v8Dy78wsnSofHejvFozZGgJgBB1A0LQRwMQ==} + '@oxc-transform-react/binding-win32-x64-msvc@0.145.0': + resolution: {integrity: sha512-sa781BGPLDw8+7ATrgUpLr0f4t0Q14O+zk3fOuQbUpjW5jERc9a3k1xIYKX1JkTG/sszoFhi8LzyCoMC49tkWA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [win32] + + '@oxfmt/binding-android-arm-eabi@0.64.0': + resolution: {integrity: sha512-o6uzh/jTOQeAY5TdkAeXdqv7MBRcPxiRA08zrcBtkKj5cSu/FMu0Hl7Q6Fi1KCKyCWZ6lJVjBzdsJvsKltUsGQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [android] + + '@oxfmt/binding-android-arm64@0.64.0': + resolution: {integrity: sha512-jRGSUeeP7p3Gynw2YaCVtjBIA6ZxY6bEB/ES5i54OhqmRTyuVg7ZgstEtzgq6GOAJd+2QZ5pvf+bFfmW5Mp9cw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [android] + + '@oxfmt/binding-darwin-arm64@0.64.0': + resolution: {integrity: sha512-JINwtU2lW7nOFSqi+H2qplipNUqah9Gc1jgGmB82kTD4UnZrZIVxCJ9qEmFiKfjNq27gYLFhrUb0to86aCwMjw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [darwin] + + '@oxfmt/binding-darwin-x64@0.64.0': + resolution: {integrity: sha512-gCmuswrgrOSajV4HCRFkVCGIruPq8bjYuPYgSE2WQB3mD6XrdyZ3JMSRZCkQ8zCxOyGWriBo6QoZ5nmMHQ1BfA==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [darwin] + + '@oxfmt/binding-freebsd-x64@0.64.0': + resolution: {integrity: sha512-Ab8g7a38pT0MMImjh7anRSTve6buWBIlcXIFBYa5xl4s6UxEgKSc2xOOhbGtLwvXnEi2PsEDGoJh3oUU7xkehQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [freebsd] + + '@oxfmt/binding-linux-arm-gnueabihf@0.64.0': + resolution: {integrity: sha512-BgvS3CoQ+Xy2deoZqEN8JVKabcCZi2RxA3yant8G9OAv9KuPJ9TCjHkqigzdHUVwErZxEP5d2bzLIEyKYyBDLg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm-musleabihf@0.64.0': + resolution: {integrity: sha512-QXpNxwoMj0YvnceCNZadNSden3bIcnvjn/sDp/rwZhRoZoZYGpHvtPyhGsdJz9uvT9GkaMW7SsLddurU56dt8w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm] + os: [linux] + + '@oxfmt/binding-linux-arm64-gnu@0.64.0': + resolution: {integrity: sha512-BBgH3I1ppDsI5pZ4Pdhw0ceYxwVCfbU/bZEBCeZ6caRS9x0ZabErxubP7riGUn11PXZBhe8DYdjkDKP1FlVQ5w==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-arm64-musl@0.64.0': + resolution: {integrity: sha512-v19HSjC/BGXdt26qEvKZtwAHgGmQ2Agcap2kQP+KIqoRZqivVzYth3ui2dJA1i+6/fjpjga85lIOaJJjQ/bOOw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-ppc64-gnu@0.64.0': + resolution: {integrity: sha512-PElLnOo4xFTBZrxPhgTIj0eHqZXwEBQoNWtb7facUV170T0B0FRET0iNbb3LUeLWTybkUW+vsdyv4ihOdyXGyw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ppc64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-gnu@0.64.0': + resolution: {integrity: sha512-Qzsg15n4F5CH+MorcRW4MkAEMiLzXmeG+DiDSbP/bBTqCmWOH3K9DHryNrve+JHlV0txS+B6Z9P5Xz+cmWeL+g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-riscv64-musl@0.64.0': + resolution: {integrity: sha512-/GZ358wnQ/Ez4UVnCcZIi56JkY0sOdZ+B108pqXKqZz3jLS59F4KEAB1Qv3fRlObrFEk+3L2vUQ/xoPx+3vjXw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-linux-s390x-gnu@0.64.0': + resolution: {integrity: sha512-/C9We3DXegowfLXtVCYHeNiU9azwCDr5cQkEtCVlc74vyn+lLQSPApJ1CZmxAduqeq/Oi3gQ+IVptyhCaTMtkQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-gnu@0.64.0': + resolution: {integrity: sha512-91KM2CeRWscIEHlj1NsW2WSnzGeq1Ehq+39bfDowTdkn+fcvK/x4Y1RcyqT7glyBjZio0ldkeCG6Usj3v7ASog==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@oxfmt/binding-linux-x64-musl@0.64.0': + resolution: {integrity: sha512-gw7uEk9I+7zoT1EYLra1eWArIzNcz8e3jkv+Noo2+o2T7wPvsNSQbfoa4DSfZlvn1i6mJ05RiZ4/omaXPDNhQg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [x64] + os: [linux] + libc: [musl] + + '@oxfmt/binding-openharmony-arm64@0.64.0': + resolution: {integrity: sha512-HYHFf616FHSPSO07c09mjmXBfQ73wIVM3m0txOiooa5XZkGoxFd6B14PVj0LB0DXIqJ6wAO/dDR/NX/5UUaqnw==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [openharmony] + + '@oxfmt/binding-win32-arm64-msvc@0.64.0': + resolution: {integrity: sha512-uQjFp081IZSWD6VAofX2iO2z01awAdHmfC+NrieWIPKrT2hZKQDyq/U18M7ifC0sm0Wz8aHY/p6+FDYIzs/CrQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] + os: [win32] + + '@oxfmt/binding-win32-ia32-msvc@0.64.0': + resolution: {integrity: sha512-lNM6byTAQ881jugzFu8juJTbNRgsUTlswMA6pJmwi1XDvmIqnnb49lcUAs5gz94fCJLrVN+/X3s3jOKqx23WIQ==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [ia32] + os: [win32] + + '@oxfmt/binding-win32-x64-msvc@0.64.0': + resolution: {integrity: sha512-BtmbtL/QjMtF1a6C3CqoDluH2IfB6fJt62E+B9RFfUPtFk4Iz9PFS6+y/SzzOvSxc7aUk2Kphwg7Dh8lMbwu6g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -794,124 +901,124 @@ packages: cpu: [x64] os: [win32] - '@oxlint/binding-android-arm-eabi@1.78.0': - resolution: {integrity: sha512-Bu819lmAfZMUHErrpe0cEWj3iaefuUODHSU8+UbXy67V/r7/7f4K3FL0NmbD85E+wiFLDYuhP8Zlv0XnVeXshw==} + '@oxlint/binding-android-arm-eabi@1.79.0': + resolution: {integrity: sha512-TebFaaMklO/RXzTv7PucaCq9l3X6D1gA+C8H6K4njtjFOV+zWE9MKLpulcJZN9bzytbUbQIY0mZuz12nQ5Kv4Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxlint/binding-android-arm64@1.78.0': - resolution: {integrity: sha512-CDfxZgB61B7buRdY2FJoAYYPPXCZ1EoC1LKscnC5dg3kjobdxiconvAvvN1BmHyW4PyFT3jRLDag/BY/roSNBQ==} + '@oxlint/binding-android-arm64@1.79.0': + resolution: {integrity: sha512-KqqnOtAVgNsPPF0YSodkFZA1O80jcKoCZCTu3bgsszxA+MrMP9TLzfXitKjEj1FmrPprKDMdRDMmY3weESO9sg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxlint/binding-darwin-arm64@1.78.0': - resolution: {integrity: sha512-2Y2U9Ahrz+OO0Ej88f9SJYq51/jUBp1Mc7iZu0ukrbeeZ3gpRGfzIFnoqfHDY96xr0GEfNrPUBFEy0nN5aD7HA==} + '@oxlint/binding-darwin-arm64@1.79.0': + resolution: {integrity: sha512-BVC2nsMzqQzRDPc5RhixkZ+m1p7iH4bxRRvqkbwDXX0PlQKm1BPy8J8cRjnAFafOq2QzI+BfO3vE8w2GZ3CBag==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxlint/binding-darwin-x64@1.78.0': - resolution: {integrity: sha512-rpych6eJq6m9jDRypTEaPD1xysaEW5h9+xuxhGK/QhOg+/xaqPZrCrTNoIl/f3nEjuJeCEmstNDlrE9rJi/3/g==} + '@oxlint/binding-darwin-x64@1.79.0': + resolution: {integrity: sha512-p6Lm+snmhGuLKL1+CpCV8L6ijkE/qJzK2H2jG9+eKJT0n31RbY4FLsdhexekgP3bLpw4Kgde+9DZuDZQ4yIInA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxlint/binding-freebsd-x64@1.78.0': - resolution: {integrity: sha512-IcMGrQT3QizkOESUJd5et+rOhVqSkNDfNik1cvrKDqIbzqx9KMtRswpFgkCuNTSwylCFLKhGUu8KmqY1ZnC0Dg==} + '@oxlint/binding-freebsd-x64@1.79.0': + resolution: {integrity: sha512-qDMm0dXZnoHyRqSL4N4xUq82T4sqK5cbKSjvd/dF/YbMUXc2R1wEPf+vmA5S0qUmi0nwXfNbjXBtZaIqzQLIMg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxlint/binding-linux-arm-gnueabihf@1.78.0': - resolution: {integrity: sha512-/uLdoJ0IXE6vo/0f0LKjinQAp+re+VMaCWaNT8ENIv2EOCkSsc8SGaflXAuW0Jua2dq5+GLVWm1NQK7P3UFSNQ==} + '@oxlint/binding-linux-arm-gnueabihf@1.79.0': + resolution: {integrity: sha512-2od7s0nuKPzqyUZAWk9KkCyGg7eI9dwFPZg+20lB15fKFkVZ0c9ZFxqPfiBAyDTlTkh9stPI0t+JlPCqMbItVA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm-musleabihf@1.78.0': - resolution: {integrity: sha512-7xi4Wb/O8NRJhLoUXmDJMUVpNYvB5kefdhFU1Jb8rtae4QoXlTiLwI14X4YvAXVZLNZChP8m5qO9SQAlWQTbkQ==} + '@oxlint/binding-linux-arm-musleabihf@1.79.0': + resolution: {integrity: sha512-ZOQUjkzDnvlhSE3+tWC3YXx94MMl+sYMlwH+u1+YGApGHOJP/YAc8ZBRFOXZ6eOBmxtXAWuS/fBcdZr8qqNO1A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm64-gnu@1.78.0': - resolution: {integrity: sha512-4hFW0+fVXa3OIh1Y4A5SPkmvI4wuuBSrCVKzOyE7PTjhc7yEqZ1pmvEEeS5Lj/MaqvegFxXyF33N+6jkehxdyg==} + '@oxlint/binding-linux-arm64-gnu@1.79.0': + resolution: {integrity: sha512-lu158FR4nGqGeRS3BQvtG85wRgU/Fy4MD5Cxp1hzJXizGiLo6u2742wJSCDKh8cFcZntvX7fcxlq4mMmfryH1g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-arm64-musl@1.78.0': - resolution: {integrity: sha512-oC0mvsgBJjlMijSDEhx9KuvR9zYeHXceA9MjbuXB1F8NSR78Yj2unOBrstEvTVaq+pko+kuue6DajC00eqvTdg==} + '@oxlint/binding-linux-arm64-musl@1.79.0': + resolution: {integrity: sha512-mbpKQeE2aflTjddaHK7MP8KP/OFbUM++lt5M635ENM8IyIdK0jm2t9pb+2v9mVVIvhF6TqA4l7F79Pll1mi+uw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxlint/binding-linux-ppc64-gnu@1.78.0': - resolution: {integrity: sha512-XAllT5SUZS+ohjuZ3/5S0cwe0r7eboiuigeStCZ5DXRYx/2KVM2UvQXvAfyzXEimtQjAB7cDQ2YxDe2Zl2WNQQ==} + '@oxlint/binding-linux-ppc64-gnu@1.79.0': + resolution: {integrity: sha512-WpGNua7gaxaHnpSDeog2ji8IDHn/QLPl9LPzwkR/FvVv58vT5BcXjRXnU+wbu3N75cpeha8CdC7ho/U2OIsB4g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-riscv64-gnu@1.78.0': - resolution: {integrity: sha512-trucMER/0QtecoXvc1y/UVqE3kwJipDwrx4oHfj+nNm3dq2zjP44WT0CfHNDPM3G1DXIkx/gY6lAD21NSCZVhA==} + '@oxlint/binding-linux-riscv64-gnu@1.79.0': + resolution: {integrity: sha512-tK1E93A5LVzISg4ngpKJnfTs7EqtIUceGI7MQ4GyDjJiLi8wPCkEyKlj2xkyKWZ1yzkDJyLHTBJ5/iFWRdnJvg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-riscv64-musl@1.78.0': - resolution: {integrity: sha512-cm3O4F/HQbdzOUX5mKHqG5KDL6E5w0pnlZ+fbBy2rmLryPOowkuLagFHTopQsEIpjcaZoPOrL+BmmAytAG9HFg==} + '@oxlint/binding-linux-riscv64-musl@1.79.0': + resolution: {integrity: sha512-qhQvUIrngXivA2A9pQ+xPCychztn/5qUv7yS3gDwXv3w7Rag+eTeeXWmRyx+t7XsW5x6LuY/8AsTq36UgFIblg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxlint/binding-linux-s390x-gnu@1.78.0': - resolution: {integrity: sha512-33wRf6HqGNsybJ3qX4cGaQN2ODPxNmc1rMa0mrTmx3eFq1VzOnvQooi9bIGVYakW8a/wmqVx1mgsUm8R2xfTiw==} + '@oxlint/binding-linux-s390x-gnu@1.79.0': + resolution: {integrity: sha512-sv6AaVgU/eE6u+6WFiQVDcPPwTxP6IJMSB9k701W2r/r6Tx465e8vPvVyRxquNH4Vy6KwRNu90mVbxXJN8+5gg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxlint/binding-linux-x64-gnu@1.78.0': - resolution: {integrity: sha512-rRdISSYegj6VganMZ9tjRjijowfHJ09IZU01i0toBAqr6n5LEtwHq2IeS4FjW2RoskOHlb6efB26H5izYb3GEQ==} + '@oxlint/binding-linux-x64-gnu@1.79.0': + resolution: {integrity: sha512-iFZL02deziHslb3jEX9KdqlAkYoo4fGyotchKDzdfK1f5mxlIBeiQeHhvK3iFpuEJSB4ma/qeFn9oxPiwnhUPQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-x64-musl@1.78.0': - resolution: {integrity: sha512-GmsP4rW0xTL6u5CVdcDsaN5Fbc7hBc382Wmar1kttbnwSEviM+rSINKOMQ+UQ6iH+AGwC+8gaAiwu134Tgh6Lg==} + '@oxlint/binding-linux-x64-musl@1.79.0': + resolution: {integrity: sha512-3DtZR2raqObnh7wXZoFYFd0Fw7skBvcb3f7A+/lkEiDuh8hrE6vv9b/62Qxao1a9/OeHLw/FcXlXzgsW9wTRFg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxlint/binding-openharmony-arm64@1.78.0': - resolution: {integrity: sha512-sy9yeYuADc8a+n4TLBayzMCZiHPW78DcIFVpOXTmdKHWQeM9xe5uzkqIIZmi326D5hY9XVwacipEB1p7tQjPAg==} + '@oxlint/binding-openharmony-arm64@1.79.0': + resolution: {integrity: sha512-Oatt4GuA1WJkqzk2ozx4HrWROOi7opV3AKDw/U8qDIqeTqzsjn5K2x3REJMNjU3/KU/Bkq96Zi3CknaiDTaC/Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxlint/binding-win32-arm64-msvc@1.78.0': - resolution: {integrity: sha512-rjc2hF1KfMi8fZj1X/m3AmnHbdsF3rL0v6KQg0Uc880Yb2khjz+3U14sfdZ7jWTpRnN1m1NQa/TT7uU9lJWPrA==} + '@oxlint/binding-win32-arm64-msvc@1.79.0': + resolution: {integrity: sha512-NAgZr9Qp8nIA9rpo0JEvwiabTF/2UVqBNnupBG9X4kxXcQoScJUTi+qHhvabb9s/thgj5wQ4XcIaJvb+ZMgoKw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxlint/binding-win32-ia32-msvc@1.78.0': - resolution: {integrity: sha512-zcuXFVrEFHIafRfkCQT8w/Xe41o07ozl/vwHq7p94vB29xVzsB0sZGYORU1jhcYKv3Lr0J3HbJ2T4fHH5rWmvA==} + '@oxlint/binding-win32-ia32-msvc@1.79.0': + resolution: {integrity: sha512-+KyXjIvcpaXmWW/j9NNY5yWjrIVxaX18VyIheQy3jwc2GSYgpCr7MGI/HxIGQ/shAL5IWEKbhsqoMpAO5Stiog==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxlint/binding-win32-x64-msvc@1.78.0': - resolution: {integrity: sha512-Sb5ocmLSuYeOuXd+CFOToGKp/gjXUEWDnvIGwhnh8aq8wY4TMmEnKnvbogSW7RdMZv77JSARduS7/gv+khYEjA==} + '@oxlint/binding-win32-x64-msvc@1.79.0': + resolution: {integrity: sha512-mEelcCMMBS57sIXh2veGMNy+pQwuGtcMxHxGIZWQ5Ba9pJ5jCCUFOZB9E2JhBaxGsURe+WGe0zJp4RVre52gpQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] @@ -1519,18 +1626,21 @@ packages: peerDependencies: vite: ^6.0.0 || ^7.0.0 || ^8.0.0 - '@vitejs/plugin-react@6.0.5': - resolution: {integrity: sha512-BOVzne/NL162sMdResB25mUv+vWMF5NoAjNf09TeGlE7ZpszZWSD3winycicLJw72yeVsoCn/2kOhEuCvEShMA==} + '@vitejs/plugin-react@6.1.0': + resolution: {integrity: sha512-qd2BzUBehkov86WFhg0JkEFEYyCLG9uPCe6qWTY/kRlss9OvJrOF2UbIWT7p+8IzZHkEu0DNGHc4HSv+JdDLsw==} engines: {node: ^20.19.0 || >=22.12.0} peerDependencies: '@rolldown/plugin-babel': ^0.1.7 || ^0.2.0 babel-plugin-react-compiler: ^1.0.0 + oxc-transform-react: ^0.145.0 vite: ^8.0.0 peerDependenciesMeta: '@rolldown/plugin-babel': optional: true babel-plugin-react-compiler: optional: true + oxc-transform-react: + optional: true '@vitest/coverage-v8@4.1.10': resolution: {integrity: sha512-IM49HmthevbgAO4anp1hwtoT9wYe59w0LR00gr+eagHE+ZJ5lK4sLPeO0ubgoJcwLk6dehU3R24N+FbEEKDc8g==} @@ -1834,6 +1944,7 @@ packages: eslint@9.39.4: resolution: {integrity: sha512-XoMjdBOwe/esVgEvLmNsD3IRHkm7fbKIUGvrleloJXUZgDHig2IPWNniv+GwjyJXzuNqVjlr5+4yVUZjycJwfQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true peerDependencies: jiti: '*' @@ -2345,8 +2456,12 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - oxfmt@0.63.0: - resolution: {integrity: sha512-kgdDwv35wvVf6554U2Ab8Jnd0zTM+TsEQWwaB70RAjK3gICFAFGO+2Hd3Be27GMoXj3XRL9IKSNRVl7KBQL6iw==} + oxc-transform-react@0.145.0: + resolution: {integrity: sha512-y8cfjow11WKvDekonySPVvRUvNuIvqNT0LZ0Aey6j5dsNUD6k4hy6Mae/SLmng5egmb1GdJS11GduJ+IoEAXEw==} + engines: {node: ^20.19.0 || >=22.12.0} + + oxfmt@0.64.0: + resolution: {integrity: sha512-XZ4GFBN/PLbXKq+0zrgpQfPKYuJlUuj+nzZJY7UpIbFMNyefNLCdN9EwViycNqnYcv0wrn0jXcQLlqJp8RCKBg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2362,8 +2477,8 @@ packages: resolution: {integrity: sha512-KjK/XLcXr1DSyonKhsuFqJRiuKqcyG9j3LJ8nkOsrLzGvodBPqzHOKauy10asLMDI0sUpvb+1sxlzff3udZvfg==} hasBin: true - oxlint@1.78.0: - resolution: {integrity: sha512-QgQePuxIqKOzo1KSjG2EnITEeWvWnKAm77eq8nrMtf6AGoA+zyGc4PFYtDNJSD25g/ibOwfQ851hZ4/SPkMVoA==} + oxlint@1.79.0: + resolution: {integrity: sha512-hVJ9hq9m2unPS+Of4eJJgCPdIeCC+3DHEUX3tkmrPJr3OK2hz7PhXwgC+ZP71ZcYu8cCDEtQrqLxWNvxBppBVg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: @@ -2413,10 +2528,6 @@ packages: resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} engines: {node: '>=8.6'} - picomatch@4.0.4: - resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} - engines: {node: '>=12'} - picomatch@4.0.5: resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==} engines: {node: '>=12'} @@ -2654,12 +2765,12 @@ packages: ufo@1.6.4: resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} - ultracite@7.10.3: - resolution: {integrity: sha512-0T27Sdpsk9XBdpAzEhJeRzMxAncowkfxW33M3l5i9iIPhptxRumXuOTzCCb+gkOckzKLA0SkTTZhbePMrUxUCw==} + ultracite@7.10.6: + resolution: {integrity: sha512-kRoCy4z1A/rk0upPdIAJhOo4ocsUx9uTPsPcq3Z+xP1Bxg6dcKkwqX4siYJ1ba4z4kRbyxaEO4Zi5bw/iXZrFA==} hasBin: true peerDependencies: oxfmt: '>=0.1.0' - oxlint: ^1.0.0 + oxlint: ^1.79.0 peerDependenciesMeta: oxfmt: optional: true @@ -3264,12 +3375,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/helper-string-parser@7.27.1': {} - '@babel/helper-string-parser@7.29.7': {} - '@babel/helper-validator-identifier@7.28.5': {} - '@babel/helper-validator-identifier@7.29.7': {} '@babel/helper-validator-option@7.29.7': {} @@ -3309,11 +3416,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/types@7.29.0': - dependencies: - '@babel/helper-string-parser': 7.27.1 - '@babel/helper-validator-identifier': 7.28.5 - '@babel/types@7.29.8': dependencies: '@babel/helper-string-parser': 7.29.7 @@ -3485,61 +3587,118 @@ snapshots: '@oxc-project/types@0.143.0': {} - '@oxfmt/binding-android-arm-eabi@0.63.0': + '@oxc-transform-react/binding-android-arm-eabi@0.145.0': optional: true - '@oxfmt/binding-android-arm64@0.63.0': + '@oxc-transform-react/binding-android-arm64@0.145.0': optional: true - '@oxfmt/binding-darwin-arm64@0.63.0': + '@oxc-transform-react/binding-darwin-arm64@0.145.0': optional: true - '@oxfmt/binding-darwin-x64@0.63.0': + '@oxc-transform-react/binding-darwin-x64@0.145.0': optional: true - '@oxfmt/binding-freebsd-x64@0.63.0': + '@oxc-transform-react/binding-freebsd-x64@0.145.0': optional: true - '@oxfmt/binding-linux-arm-gnueabihf@0.63.0': + '@oxc-transform-react/binding-linux-arm-gnueabihf@0.145.0': optional: true - '@oxfmt/binding-linux-arm-musleabihf@0.63.0': + '@oxc-transform-react/binding-linux-arm-musleabihf@0.145.0': optional: true - '@oxfmt/binding-linux-arm64-gnu@0.63.0': + '@oxc-transform-react/binding-linux-arm64-gnu@0.145.0': optional: true - '@oxfmt/binding-linux-arm64-musl@0.63.0': + '@oxc-transform-react/binding-linux-arm64-musl@0.145.0': optional: true - '@oxfmt/binding-linux-ppc64-gnu@0.63.0': + '@oxc-transform-react/binding-linux-ppc64-gnu@0.145.0': optional: true - '@oxfmt/binding-linux-riscv64-gnu@0.63.0': + '@oxc-transform-react/binding-linux-riscv64-gnu@0.145.0': optional: true - '@oxfmt/binding-linux-riscv64-musl@0.63.0': + '@oxc-transform-react/binding-linux-riscv64-musl@0.145.0': optional: true - '@oxfmt/binding-linux-s390x-gnu@0.63.0': + '@oxc-transform-react/binding-linux-s390x-gnu@0.145.0': optional: true - '@oxfmt/binding-linux-x64-gnu@0.63.0': + '@oxc-transform-react/binding-linux-x64-gnu@0.145.0': optional: true - '@oxfmt/binding-linux-x64-musl@0.63.0': + '@oxc-transform-react/binding-linux-x64-musl@0.145.0': optional: true - '@oxfmt/binding-openharmony-arm64@0.63.0': + '@oxc-transform-react/binding-openharmony-arm64@0.145.0': optional: true - '@oxfmt/binding-win32-arm64-msvc@0.63.0': + '@oxc-transform-react/binding-win32-arm64-msvc@0.145.0': optional: true - '@oxfmt/binding-win32-ia32-msvc@0.63.0': + '@oxc-transform-react/binding-win32-ia32-msvc@0.145.0': optional: true - '@oxfmt/binding-win32-x64-msvc@0.63.0': + '@oxc-transform-react/binding-win32-x64-msvc@0.145.0': + optional: true + + '@oxfmt/binding-android-arm-eabi@0.64.0': + optional: true + + '@oxfmt/binding-android-arm64@0.64.0': + optional: true + + '@oxfmt/binding-darwin-arm64@0.64.0': + optional: true + + '@oxfmt/binding-darwin-x64@0.64.0': + optional: true + + '@oxfmt/binding-freebsd-x64@0.64.0': + optional: true + + '@oxfmt/binding-linux-arm-gnueabihf@0.64.0': + optional: true + + '@oxfmt/binding-linux-arm-musleabihf@0.64.0': + optional: true + + '@oxfmt/binding-linux-arm64-gnu@0.64.0': + optional: true + + '@oxfmt/binding-linux-arm64-musl@0.64.0': + optional: true + + '@oxfmt/binding-linux-ppc64-gnu@0.64.0': + optional: true + + '@oxfmt/binding-linux-riscv64-gnu@0.64.0': + optional: true + + '@oxfmt/binding-linux-riscv64-musl@0.64.0': + optional: true + + '@oxfmt/binding-linux-s390x-gnu@0.64.0': + optional: true + + '@oxfmt/binding-linux-x64-gnu@0.64.0': + optional: true + + '@oxfmt/binding-linux-x64-musl@0.64.0': + optional: true + + '@oxfmt/binding-openharmony-arm64@0.64.0': + optional: true + + '@oxfmt/binding-win32-arm64-msvc@0.64.0': + optional: true + + '@oxfmt/binding-win32-ia32-msvc@0.64.0': + optional: true + + '@oxfmt/binding-win32-x64-msvc@0.64.0': optional: true '@oxlint-tsgolint/darwin-arm64@7.0.2001': @@ -3560,61 +3719,61 @@ snapshots: '@oxlint-tsgolint/win32-x64@7.0.2001': optional: true - '@oxlint/binding-android-arm-eabi@1.78.0': + '@oxlint/binding-android-arm-eabi@1.79.0': optional: true - '@oxlint/binding-android-arm64@1.78.0': + '@oxlint/binding-android-arm64@1.79.0': optional: true - '@oxlint/binding-darwin-arm64@1.78.0': + '@oxlint/binding-darwin-arm64@1.79.0': optional: true - '@oxlint/binding-darwin-x64@1.78.0': + '@oxlint/binding-darwin-x64@1.79.0': optional: true - '@oxlint/binding-freebsd-x64@1.78.0': + '@oxlint/binding-freebsd-x64@1.79.0': optional: true - '@oxlint/binding-linux-arm-gnueabihf@1.78.0': + '@oxlint/binding-linux-arm-gnueabihf@1.79.0': optional: true - '@oxlint/binding-linux-arm-musleabihf@1.78.0': + '@oxlint/binding-linux-arm-musleabihf@1.79.0': optional: true - '@oxlint/binding-linux-arm64-gnu@1.78.0': + '@oxlint/binding-linux-arm64-gnu@1.79.0': optional: true - '@oxlint/binding-linux-arm64-musl@1.78.0': + '@oxlint/binding-linux-arm64-musl@1.79.0': optional: true - '@oxlint/binding-linux-ppc64-gnu@1.78.0': + '@oxlint/binding-linux-ppc64-gnu@1.79.0': optional: true - '@oxlint/binding-linux-riscv64-gnu@1.78.0': + '@oxlint/binding-linux-riscv64-gnu@1.79.0': optional: true - '@oxlint/binding-linux-riscv64-musl@1.78.0': + '@oxlint/binding-linux-riscv64-musl@1.79.0': optional: true - '@oxlint/binding-linux-s390x-gnu@1.78.0': + '@oxlint/binding-linux-s390x-gnu@1.79.0': optional: true - '@oxlint/binding-linux-x64-gnu@1.78.0': + '@oxlint/binding-linux-x64-gnu@1.79.0': optional: true - '@oxlint/binding-linux-x64-musl@1.78.0': + '@oxlint/binding-linux-x64-musl@1.79.0': optional: true - '@oxlint/binding-openharmony-arm64@1.78.0': + '@oxlint/binding-openharmony-arm64@1.79.0': optional: true - '@oxlint/binding-win32-arm64-msvc@1.78.0': + '@oxlint/binding-win32-arm64-msvc@1.79.0': optional: true - '@oxlint/binding-win32-ia32-msvc@1.78.0': + '@oxlint/binding-win32-ia32-msvc@1.79.0': optional: true - '@oxlint/binding-win32-x64-msvc@1.78.0': + '@oxlint/binding-win32-x64-msvc@1.79.0': optional: true '@rolldown/binding-android-arm64@1.2.3': @@ -3662,11 +3821,12 @@ snapshots: '@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(rolldown@1.2.3)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0))': dependencies: '@babel/core': 7.29.7 - picomatch: 4.0.4 + picomatch: 4.0.5 rolldown: 1.2.3 optionalDependencies: '@babel/runtime': 7.29.7 vite: 8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0) + optional: true '@rolldown/pluginutils@1.0.1': {} @@ -4135,13 +4295,14 @@ snapshots: dependencies: vite: 8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0) - '@vitejs/plugin-react@6.0.5(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(rolldown@1.2.3)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0))': + '@vitejs/plugin-react@6.1.0(@rolldown/plugin-babel@0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(rolldown@1.2.3)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)))(babel-plugin-react-compiler@1.0.0)(oxc-transform-react@0.145.0)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0))': dependencies: '@rolldown/pluginutils': 1.0.1 vite: 8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0) optionalDependencies: '@rolldown/plugin-babel': 0.2.3(@babel/core@7.29.7)(@babel/runtime@7.29.7)(rolldown@1.2.3)(vite@8.2.1(@types/node@24.13.3)(jiti@2.7.0)(yaml@2.9.0)) babel-plugin-react-compiler: 1.0.0 + oxc-transform-react: 0.145.0 '@vitest/coverage-v8@4.1.10(vitest@4.1.10)': dependencies: @@ -4256,7 +4417,8 @@ snapshots: babel-plugin-react-compiler@1.0.0: dependencies: - '@babel/types': 7.29.0 + '@babel/types': 7.29.8 + optional: true balanced-match@1.0.2: {} @@ -4882,29 +5044,51 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - oxfmt@0.63.0: + oxc-transform-react@0.145.0: + optionalDependencies: + '@oxc-transform-react/binding-android-arm-eabi': 0.145.0 + '@oxc-transform-react/binding-android-arm64': 0.145.0 + '@oxc-transform-react/binding-darwin-arm64': 0.145.0 + '@oxc-transform-react/binding-darwin-x64': 0.145.0 + '@oxc-transform-react/binding-freebsd-x64': 0.145.0 + '@oxc-transform-react/binding-linux-arm-gnueabihf': 0.145.0 + '@oxc-transform-react/binding-linux-arm-musleabihf': 0.145.0 + '@oxc-transform-react/binding-linux-arm64-gnu': 0.145.0 + '@oxc-transform-react/binding-linux-arm64-musl': 0.145.0 + '@oxc-transform-react/binding-linux-ppc64-gnu': 0.145.0 + '@oxc-transform-react/binding-linux-riscv64-gnu': 0.145.0 + '@oxc-transform-react/binding-linux-riscv64-musl': 0.145.0 + '@oxc-transform-react/binding-linux-s390x-gnu': 0.145.0 + '@oxc-transform-react/binding-linux-x64-gnu': 0.145.0 + '@oxc-transform-react/binding-linux-x64-musl': 0.145.0 + '@oxc-transform-react/binding-openharmony-arm64': 0.145.0 + '@oxc-transform-react/binding-win32-arm64-msvc': 0.145.0 + '@oxc-transform-react/binding-win32-ia32-msvc': 0.145.0 + '@oxc-transform-react/binding-win32-x64-msvc': 0.145.0 + + oxfmt@0.64.0: dependencies: tinypool: 2.1.0 optionalDependencies: - '@oxfmt/binding-android-arm-eabi': 0.63.0 - '@oxfmt/binding-android-arm64': 0.63.0 - '@oxfmt/binding-darwin-arm64': 0.63.0 - '@oxfmt/binding-darwin-x64': 0.63.0 - '@oxfmt/binding-freebsd-x64': 0.63.0 - '@oxfmt/binding-linux-arm-gnueabihf': 0.63.0 - '@oxfmt/binding-linux-arm-musleabihf': 0.63.0 - '@oxfmt/binding-linux-arm64-gnu': 0.63.0 - '@oxfmt/binding-linux-arm64-musl': 0.63.0 - '@oxfmt/binding-linux-ppc64-gnu': 0.63.0 - '@oxfmt/binding-linux-riscv64-gnu': 0.63.0 - '@oxfmt/binding-linux-riscv64-musl': 0.63.0 - '@oxfmt/binding-linux-s390x-gnu': 0.63.0 - '@oxfmt/binding-linux-x64-gnu': 0.63.0 - '@oxfmt/binding-linux-x64-musl': 0.63.0 - '@oxfmt/binding-openharmony-arm64': 0.63.0 - '@oxfmt/binding-win32-arm64-msvc': 0.63.0 - '@oxfmt/binding-win32-ia32-msvc': 0.63.0 - '@oxfmt/binding-win32-x64-msvc': 0.63.0 + '@oxfmt/binding-android-arm-eabi': 0.64.0 + '@oxfmt/binding-android-arm64': 0.64.0 + '@oxfmt/binding-darwin-arm64': 0.64.0 + '@oxfmt/binding-darwin-x64': 0.64.0 + '@oxfmt/binding-freebsd-x64': 0.64.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.64.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.64.0 + '@oxfmt/binding-linux-arm64-gnu': 0.64.0 + '@oxfmt/binding-linux-arm64-musl': 0.64.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.64.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.64.0 + '@oxfmt/binding-linux-riscv64-musl': 0.64.0 + '@oxfmt/binding-linux-s390x-gnu': 0.64.0 + '@oxfmt/binding-linux-x64-gnu': 0.64.0 + '@oxfmt/binding-linux-x64-musl': 0.64.0 + '@oxfmt/binding-openharmony-arm64': 0.64.0 + '@oxfmt/binding-win32-arm64-msvc': 0.64.0 + '@oxfmt/binding-win32-ia32-msvc': 0.64.0 + '@oxfmt/binding-win32-x64-msvc': 0.64.0 oxlint-tsgolint@7.0.2001: optionalDependencies: @@ -4915,27 +5099,27 @@ snapshots: '@oxlint-tsgolint/win32-arm64': 7.0.2001 '@oxlint-tsgolint/win32-x64': 7.0.2001 - oxlint@1.78.0(oxlint-tsgolint@7.0.2001): + oxlint@1.79.0(oxlint-tsgolint@7.0.2001): optionalDependencies: - '@oxlint/binding-android-arm-eabi': 1.78.0 - '@oxlint/binding-android-arm64': 1.78.0 - '@oxlint/binding-darwin-arm64': 1.78.0 - '@oxlint/binding-darwin-x64': 1.78.0 - '@oxlint/binding-freebsd-x64': 1.78.0 - '@oxlint/binding-linux-arm-gnueabihf': 1.78.0 - '@oxlint/binding-linux-arm-musleabihf': 1.78.0 - '@oxlint/binding-linux-arm64-gnu': 1.78.0 - '@oxlint/binding-linux-arm64-musl': 1.78.0 - '@oxlint/binding-linux-ppc64-gnu': 1.78.0 - '@oxlint/binding-linux-riscv64-gnu': 1.78.0 - '@oxlint/binding-linux-riscv64-musl': 1.78.0 - '@oxlint/binding-linux-s390x-gnu': 1.78.0 - '@oxlint/binding-linux-x64-gnu': 1.78.0 - '@oxlint/binding-linux-x64-musl': 1.78.0 - '@oxlint/binding-openharmony-arm64': 1.78.0 - '@oxlint/binding-win32-arm64-msvc': 1.78.0 - '@oxlint/binding-win32-ia32-msvc': 1.78.0 - '@oxlint/binding-win32-x64-msvc': 1.78.0 + '@oxlint/binding-android-arm-eabi': 1.79.0 + '@oxlint/binding-android-arm64': 1.79.0 + '@oxlint/binding-darwin-arm64': 1.79.0 + '@oxlint/binding-darwin-x64': 1.79.0 + '@oxlint/binding-freebsd-x64': 1.79.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.79.0 + '@oxlint/binding-linux-arm-musleabihf': 1.79.0 + '@oxlint/binding-linux-arm64-gnu': 1.79.0 + '@oxlint/binding-linux-arm64-musl': 1.79.0 + '@oxlint/binding-linux-ppc64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-gnu': 1.79.0 + '@oxlint/binding-linux-riscv64-musl': 1.79.0 + '@oxlint/binding-linux-s390x-gnu': 1.79.0 + '@oxlint/binding-linux-x64-gnu': 1.79.0 + '@oxlint/binding-linux-x64-musl': 1.79.0 + '@oxlint/binding-openharmony-arm64': 1.79.0 + '@oxlint/binding-win32-arm64-msvc': 1.79.0 + '@oxlint/binding-win32-ia32-msvc': 1.79.0 + '@oxlint/binding-win32-x64-msvc': 1.79.0 oxlint-tsgolint: 7.0.2001 p-limit@3.1.0: @@ -4964,8 +5148,6 @@ snapshots: picomatch@2.3.2: {} - picomatch@4.0.4: {} - picomatch@4.0.5: {} pkg-types@1.3.1: @@ -5188,7 +5370,7 @@ snapshots: ufo@1.6.4: {} - ultracite@7.10.3(oxfmt@0.63.0)(oxlint@1.78.0(oxlint-tsgolint@7.0.2001)): + ultracite@7.10.6(oxfmt@0.64.0)(oxlint@1.79.0(oxlint-tsgolint@7.0.2001)): dependencies: '@clack/prompts': 1.7.0 cli-truncate: 6.1.1 @@ -5207,8 +5389,8 @@ snapshots: yaml: 2.9.0 zod: 4.4.3 optionalDependencies: - oxfmt: 0.63.0 - oxlint: 1.78.0(oxlint-tsgolint@7.0.2001) + oxfmt: 0.64.0 + oxlint: 1.79.0(oxlint-tsgolint@7.0.2001) undici-types@7.18.2: {} diff --git a/spinifex/services/spinifexui/frontend/src/routeTree.gen.ts b/spinifex/services/spinifexui/frontend/src/routeTree.gen.ts index a09bb22d8..8d61c1816 100644 --- a/spinifex/services/spinifexui/frontend/src/routeTree.gen.ts +++ b/spinifex/services/spinifexui/frontend/src/routeTree.gen.ts @@ -9,115 +9,115 @@ // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. import { Route as rootRouteImport } from './routes/__root' -import { Route as LoginRouteImport } from './routes/login' import { Route as AuthRouteRouteImport } from './routes/_auth/route' +import { Route as LoginRouteImport } from './routes/login' import { Route as AuthIndexRouteImport } from './routes/_auth/index' import { Route as AuthNodesRouteImport } from './routes/_auth/nodes' import { Route as AuthS3ServiceMetricsRouteImport } from './routes/_auth/s3/service-metrics' -import { Route as AuthS3LsIndexRouteImport } from './routes/_auth/s3/ls/index' -import { Route as AuthS3bucketsCreateBucketRouteImport } from './routes/_auth/s3/(buckets)/create-bucket' -import { Route as AuthRdssubnetGroupsCreateDbSubnetGroupRouteImport } from './routes/_auth/rds/(subnet-groups)/create-db-subnet-group' -import { Route as AuthRdsparameterGroupsCreateDbParameterGroupRouteImport } from './routes/_auth/rds/(parameter-groups)/create-db-parameter-group' -import { Route as AuthRdsdbInstancesCreateDbInstanceRouteImport } from './routes/_auth/rds/(db-instances)/create-db-instance' -import { Route as AuthIamusersCreateUserRouteImport } from './routes/_auth/iam/(users)/create-user' -import { Route as AuthIamrolesCreateRoleRouteImport } from './routes/_auth/iam/(roles)/create-role' -import { Route as AuthIampoliciesCreatePolicyRouteImport } from './routes/_auth/iam/(policies)/create-policy' -import { Route as AuthIaminstanceProfilesCreateInstanceProfileRouteImport } from './routes/_auth/iam/(instance-profiles)/create-instance-profile' -import { Route as AuthIamgroupsCreateGroupRouteImport } from './routes/_auth/iam/(groups)/create-group' -import { Route as AuthEksclustersCreateClusterRouteImport } from './routes/_auth/eks/(clusters)/create-cluster' -import { Route as AuthEcsclustersTaskDefinitionsRouteImport } from './routes/_auth/ecs/(clusters)/task-definitions' -import { Route as AuthEcsclustersRunTaskRouteImport } from './routes/_auth/ecs/(clusters)/run-task' -import { Route as AuthEcsclustersRegisterTaskDefinitionRouteImport } from './routes/_auth/ecs/(clusters)/register-task-definition' -import { Route as AuthEcsclustersCreateServiceRouteImport } from './routes/_auth/ecs/(clusters)/create-service' -import { Route as AuthEc2vpcCreateVpcRouteImport } from './routes/_auth/ec2/(vpc)/create-vpc' -import { Route as AuthEc2volumesCreateVolumeRouteImport } from './routes/_auth/ec2/(volumes)/create-volume' -import { Route as AuthEc2targetGroupsCreateTargetGroupRouteImport } from './routes/_auth/ec2/(target-groups)/create-target-group' -import { Route as AuthEc2subnetCreateSubnetRouteImport } from './routes/_auth/ec2/(subnet)/create-subnet' -import { Route as AuthEc2snapshotsCreateSnapshotRouteImport } from './routes/_auth/ec2/(snapshots)/create-snapshot' -import { Route as AuthEc2securityGroupsCreateSecurityGroupRouteImport } from './routes/_auth/ec2/(security-groups)/create-security-group' -import { Route as AuthEc2routeTablesCreateRouteTableRouteImport } from './routes/_auth/ec2/(route-tables)/create-route-table' -import { Route as AuthEc2placementGroupsCreatePlacementGroupRouteImport } from './routes/_auth/ec2/(placement-groups)/create-placement-group' -import { Route as AuthEc2natGatewaysCreateNatGatewayRouteImport } from './routes/_auth/ec2/(nat-gateways)/create-nat-gateway' -import { Route as AuthEc2loadBalancersCreateLoadBalancerRouteImport } from './routes/_auth/ec2/(load-balancers)/create-load-balancer' -import { Route as AuthEc2launchTemplatesCreateLaunchTemplateRouteImport } from './routes/_auth/ec2/(launch-templates)/create-launch-template' -import { Route as AuthEc2keyImportKeyPairRouteImport } from './routes/_auth/ec2/(key)/import-key-pair' -import { Route as AuthEc2keyCreateKeyPairRouteImport } from './routes/_auth/ec2/(key)/create-key-pair' -import { Route as AuthEc2internetGatewaysCreateInternetGatewayRouteImport } from './routes/_auth/ec2/(internet-gateways)/create-internet-gateway' -import { Route as AuthEc2instancesRunInstancesRouteImport } from './routes/_auth/ec2/(instances)/run-instances' import { Route as AuthEc2elasticIpsAllocateAddressRouteImport } from './routes/_auth/ec2/(elastic-ips)/allocate-address' +import { Route as AuthEc2instancesRunInstancesRouteImport } from './routes/_auth/ec2/(instances)/run-instances' +import { Route as AuthEc2internetGatewaysCreateInternetGatewayRouteImport } from './routes/_auth/ec2/(internet-gateways)/create-internet-gateway' +import { Route as AuthEc2keyCreateKeyPairRouteImport } from './routes/_auth/ec2/(key)/create-key-pair' +import { Route as AuthEc2keyImportKeyPairRouteImport } from './routes/_auth/ec2/(key)/import-key-pair' +import { Route as AuthEc2launchTemplatesCreateLaunchTemplateRouteImport } from './routes/_auth/ec2/(launch-templates)/create-launch-template' +import { Route as AuthEc2loadBalancersCreateLoadBalancerRouteImport } from './routes/_auth/ec2/(load-balancers)/create-load-balancer' +import { Route as AuthEc2natGatewaysCreateNatGatewayRouteImport } from './routes/_auth/ec2/(nat-gateways)/create-nat-gateway' +import { Route as AuthEc2placementGroupsCreatePlacementGroupRouteImport } from './routes/_auth/ec2/(placement-groups)/create-placement-group' +import { Route as AuthEc2routeTablesCreateRouteTableRouteImport } from './routes/_auth/ec2/(route-tables)/create-route-table' +import { Route as AuthEc2securityGroupsCreateSecurityGroupRouteImport } from './routes/_auth/ec2/(security-groups)/create-security-group' +import { Route as AuthEc2snapshotsCreateSnapshotRouteImport } from './routes/_auth/ec2/(snapshots)/create-snapshot' +import { Route as AuthEc2subnetCreateSubnetRouteImport } from './routes/_auth/ec2/(subnet)/create-subnet' +import { Route as AuthEc2targetGroupsCreateTargetGroupRouteImport } from './routes/_auth/ec2/(target-groups)/create-target-group' +import { Route as AuthEc2volumesCreateVolumeRouteImport } from './routes/_auth/ec2/(volumes)/create-volume' +import { Route as AuthEc2vpcCreateVpcRouteImport } from './routes/_auth/ec2/(vpc)/create-vpc' +import { Route as AuthEcsclustersCreateServiceRouteImport } from './routes/_auth/ecs/(clusters)/create-service' +import { Route as AuthEcsclustersRegisterTaskDefinitionRouteImport } from './routes/_auth/ecs/(clusters)/register-task-definition' +import { Route as AuthEcsclustersRunTaskRouteImport } from './routes/_auth/ecs/(clusters)/run-task' +import { Route as AuthEcsclustersTaskDefinitionsRouteImport } from './routes/_auth/ecs/(clusters)/task-definitions' +import { Route as AuthEksclustersCreateClusterRouteImport } from './routes/_auth/eks/(clusters)/create-cluster' +import { Route as AuthIamgroupsCreateGroupRouteImport } from './routes/_auth/iam/(groups)/create-group' +import { Route as AuthIaminstanceProfilesCreateInstanceProfileRouteImport } from './routes/_auth/iam/(instance-profiles)/create-instance-profile' +import { Route as AuthIampoliciesCreatePolicyRouteImport } from './routes/_auth/iam/(policies)/create-policy' +import { Route as AuthIamrolesCreateRoleRouteImport } from './routes/_auth/iam/(roles)/create-role' +import { Route as AuthIamusersCreateUserRouteImport } from './routes/_auth/iam/(users)/create-user' +import { Route as AuthRdsdbInstancesCreateDbInstanceRouteImport } from './routes/_auth/rds/(db-instances)/create-db-instance' +import { Route as AuthRdsparameterGroupsCreateDbParameterGroupRouteImport } from './routes/_auth/rds/(parameter-groups)/create-db-parameter-group' +import { Route as AuthRdssubnetGroupsCreateDbSubnetGroupRouteImport } from './routes/_auth/rds/(subnet-groups)/create-db-subnet-group' +import { Route as AuthS3bucketsCreateBucketRouteImport } from './routes/_auth/s3/(buckets)/create-bucket' +import { Route as AuthS3LsIndexRouteImport } from './routes/_auth/s3/ls/index' import { Route as AuthS3LsBucketRouteRouteImport } from './routes/_auth/s3/ls/$bucket/route' -import { Route as AuthS3LsBucketIndexRouteImport } from './routes/_auth/s3/ls/$bucket/index' -import { Route as AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRouteImport } from './routes/_auth/rds/(subnet-groups)/describe-db-subnet-groups/index' -import { Route as AuthRdssnapshotsDescribeDbSnapshotsIndexRouteImport } from './routes/_auth/rds/(snapshots)/describe-db-snapshots/index' -import { Route as AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRouteImport } from './routes/_auth/rds/(parameter-groups)/describe-db-parameter-groups/index' -import { Route as AuthRdsdbInstancesDescribeDbInstancesIndexRouteImport } from './routes/_auth/rds/(db-instances)/describe-db-instances/index' -import { Route as AuthIamusersListUsersIndexRouteImport } from './routes/_auth/iam/(users)/list-users/index' -import { Route as AuthIamrolesListRolesIndexRouteImport } from './routes/_auth/iam/(roles)/list-roles/index' -import { Route as AuthIampoliciesListPoliciesIndexRouteImport } from './routes/_auth/iam/(policies)/list-policies/index' -import { Route as AuthIaminstanceProfilesListInstanceProfilesIndexRouteImport } from './routes/_auth/iam/(instance-profiles)/list-instance-profiles/index' -import { Route as AuthIamgroupsListGroupsIndexRouteImport } from './routes/_auth/iam/(groups)/list-groups/index' -import { Route as AuthEksclustersListClustersIndexRouteImport } from './routes/_auth/eks/(clusters)/list-clusters/index' -import { Route as AuthEcsclustersListClustersIndexRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/index' -import { Route as AuthEcrrepositoriesListRepositoriesIndexRouteImport } from './routes/_auth/ecr/(repositories)/list-repositories/index' -import { Route as AuthEc2vpcDescribeVpcsIndexRouteImport } from './routes/_auth/ec2/(vpc)/describe-vpcs/index' -import { Route as AuthEc2volumesDescribeVolumesIndexRouteImport } from './routes/_auth/ec2/(volumes)/describe-volumes/index' -import { Route as AuthEc2targetGroupsDescribeTargetGroupsIndexRouteImport } from './routes/_auth/ec2/(target-groups)/describe-target-groups/index' -import { Route as AuthEc2subnetDescribeSubnetsIndexRouteImport } from './routes/_auth/ec2/(subnet)/describe-subnets/index' -import { Route as AuthEc2snapshotsDescribeSnapshotsIndexRouteImport } from './routes/_auth/ec2/(snapshots)/describe-snapshots/index' -import { Route as AuthEc2securityGroupsDescribeSecurityGroupsIndexRouteImport } from './routes/_auth/ec2/(security-groups)/describe-security-groups/index' -import { Route as AuthEc2routeTablesDescribeRouteTablesIndexRouteImport } from './routes/_auth/ec2/(route-tables)/describe-route-tables/index' -import { Route as AuthEc2placementGroupsDescribePlacementGroupsIndexRouteImport } from './routes/_auth/ec2/(placement-groups)/describe-placement-groups/index' -import { Route as AuthEc2natGatewaysDescribeNatGatewaysIndexRouteImport } from './routes/_auth/ec2/(nat-gateways)/describe-nat-gateways/index' -import { Route as AuthEc2loadBalancersDescribeLoadBalancersIndexRouteImport } from './routes/_auth/ec2/(load-balancers)/describe-load-balancers/index' -import { Route as AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRouteImport } from './routes/_auth/ec2/(launch-templates)/describe-launch-templates/index' -import { Route as AuthEc2keyDescribeKeyPairsIndexRouteImport } from './routes/_auth/ec2/(key)/describe-key-pairs/index' -import { Route as AuthEc2internetGatewaysDescribeInternetGatewaysIndexRouteImport } from './routes/_auth/ec2/(internet-gateways)/describe-internet-gateways/index' -import { Route as AuthEc2instancesDescribeInstancesIndexRouteImport } from './routes/_auth/ec2/(instances)/describe-instances/index' -import { Route as AuthEc2imagesDescribeImagesIndexRouteImport } from './routes/_auth/ec2/(images)/describe-images/index' import { Route as AuthEc2elasticIpsDescribeAddressesIndexRouteImport } from './routes/_auth/ec2/(elastic-ips)/describe-addresses/index' -import { Route as AuthS3LsBucketSplatRouteImport } from './routes/_auth/s3/ls/$bucket/$' -import { Route as AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRouteImport } from './routes/_auth/rds/(subnet-groups)/describe-db-subnet-groups/$name' -import { Route as AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRouteImport } from './routes/_auth/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id' -import { Route as AuthRdssnapshotsDescribeDbSnapshotsIdRouteImport } from './routes/_auth/rds/(snapshots)/describe-db-snapshots/$id' -import { Route as AuthRdsparameterGroupsDescribeDbParameterGroupsNameRouteImport } from './routes/_auth/rds/(parameter-groups)/describe-db-parameter-groups/$name' -import { Route as AuthRdsdbInstancesDescribeDbInstancesIdRouteImport } from './routes/_auth/rds/(db-instances)/describe-db-instances/$id' -import { Route as AuthIamusersListUsersUserNameRouteImport } from './routes/_auth/iam/(users)/list-users/$userName' -import { Route as AuthIamrolesListRolesRoleNameRouteImport } from './routes/_auth/iam/(roles)/list-roles/$roleName' -import { Route as AuthIampoliciesListPoliciesPolicyArnRouteImport } from './routes/_auth/iam/(policies)/list-policies/$policyArn' -import { Route as AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRouteImport } from './routes/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName' -import { Route as AuthIamgroupsListGroupsGroupNameRouteImport } from './routes/_auth/iam/(groups)/list-groups/$groupName' -import { Route as AuthEksclustersListClustersClusterNameRouteImport } from './routes/_auth/eks/(clusters)/list-clusters/$clusterName' -import { Route as AuthEcsclustersListClustersClusterNameRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/$clusterName' -import { Route as AuthEcrrepositoriesListRepositoriesIdRouteImport } from './routes/_auth/ecr/(repositories)/list-repositories/$id' -import { Route as AuthEc2vpcDescribeVpcsIdRouteImport } from './routes/_auth/ec2/(vpc)/describe-vpcs/$id' -import { Route as AuthEc2volumesModifyVolumeIdRouteImport } from './routes/_auth/ec2/(volumes)/modify-volume/$id' -import { Route as AuthEc2volumesDescribeVolumesIdRouteImport } from './routes/_auth/ec2/(volumes)/describe-volumes/$id' -import { Route as AuthEc2targetGroupsDescribeTargetGroupsIdRouteImport } from './routes/_auth/ec2/(target-groups)/describe-target-groups/$id' -import { Route as AuthEc2subnetDescribeSubnetsIdRouteImport } from './routes/_auth/ec2/(subnet)/describe-subnets/$id' -import { Route as AuthEc2snapshotsDescribeSnapshotsIdRouteImport } from './routes/_auth/ec2/(snapshots)/describe-snapshots/$id' -import { Route as AuthEc2securityGroupsDescribeSecurityGroupsIdRouteImport } from './routes/_auth/ec2/(security-groups)/describe-security-groups/$id' -import { Route as AuthEc2routeTablesDescribeRouteTablesIdRouteImport } from './routes/_auth/ec2/(route-tables)/describe-route-tables/$id' -import { Route as AuthEc2placementGroupsDescribePlacementGroupsIdRouteImport } from './routes/_auth/ec2/(placement-groups)/describe-placement-groups/$id' -import { Route as AuthEc2natGatewaysDescribeNatGatewaysIdRouteImport } from './routes/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id' -import { Route as AuthEc2loadBalancersDescribeLoadBalancersIdRouteImport } from './routes/_auth/ec2/(load-balancers)/describe-load-balancers/$id' -import { Route as AuthEc2launchTemplatesDescribeLaunchTemplatesIdRouteImport } from './routes/_auth/ec2/(launch-templates)/describe-launch-templates/$id' -import { Route as AuthEc2keyDescribeKeyPairsIdRouteImport } from './routes/_auth/ec2/(key)/describe-key-pairs/$id' -import { Route as AuthEc2internetGatewaysDescribeInternetGatewaysIdRouteImport } from './routes/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id' -import { Route as AuthEc2instancesDescribeInstancesIdRouteImport } from './routes/_auth/ec2/(instances)/describe-instances/$id' -import { Route as AuthEc2imagesDescribeImagesIdRouteImport } from './routes/_auth/ec2/(images)/describe-images/$id' import { Route as AuthEc2elasticIpsDescribeAddressesIdRouteImport } from './routes/_auth/ec2/(elastic-ips)/describe-addresses/$id' -import { Route as AuthEcsclustersListClustersClusterNameTasksTaskIdRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId' +import { Route as AuthEc2imagesDescribeImagesIndexRouteImport } from './routes/_auth/ec2/(images)/describe-images/index' +import { Route as AuthEc2imagesDescribeImagesIdRouteImport } from './routes/_auth/ec2/(images)/describe-images/$id' +import { Route as AuthEc2instancesDescribeInstancesIndexRouteImport } from './routes/_auth/ec2/(instances)/describe-instances/index' +import { Route as AuthEc2instancesDescribeInstancesIdRouteImport } from './routes/_auth/ec2/(instances)/describe-instances/$id' +import { Route as AuthEc2internetGatewaysDescribeInternetGatewaysIndexRouteImport } from './routes/_auth/ec2/(internet-gateways)/describe-internet-gateways/index' +import { Route as AuthEc2internetGatewaysDescribeInternetGatewaysIdRouteImport } from './routes/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id' +import { Route as AuthEc2keyDescribeKeyPairsIndexRouteImport } from './routes/_auth/ec2/(key)/describe-key-pairs/index' +import { Route as AuthEc2keyDescribeKeyPairsIdRouteImport } from './routes/_auth/ec2/(key)/describe-key-pairs/$id' +import { Route as AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRouteImport } from './routes/_auth/ec2/(launch-templates)/describe-launch-templates/index' +import { Route as AuthEc2launchTemplatesDescribeLaunchTemplatesIdRouteImport } from './routes/_auth/ec2/(launch-templates)/describe-launch-templates/$id' +import { Route as AuthEc2loadBalancersDescribeLoadBalancersIndexRouteImport } from './routes/_auth/ec2/(load-balancers)/describe-load-balancers/index' +import { Route as AuthEc2loadBalancersDescribeLoadBalancersIdRouteImport } from './routes/_auth/ec2/(load-balancers)/describe-load-balancers/$id' +import { Route as AuthEc2natGatewaysDescribeNatGatewaysIndexRouteImport } from './routes/_auth/ec2/(nat-gateways)/describe-nat-gateways/index' +import { Route as AuthEc2natGatewaysDescribeNatGatewaysIdRouteImport } from './routes/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id' +import { Route as AuthEc2placementGroupsDescribePlacementGroupsIndexRouteImport } from './routes/_auth/ec2/(placement-groups)/describe-placement-groups/index' +import { Route as AuthEc2placementGroupsDescribePlacementGroupsIdRouteImport } from './routes/_auth/ec2/(placement-groups)/describe-placement-groups/$id' +import { Route as AuthEc2routeTablesDescribeRouteTablesIndexRouteImport } from './routes/_auth/ec2/(route-tables)/describe-route-tables/index' +import { Route as AuthEc2routeTablesDescribeRouteTablesIdRouteImport } from './routes/_auth/ec2/(route-tables)/describe-route-tables/$id' +import { Route as AuthEc2securityGroupsDescribeSecurityGroupsIndexRouteImport } from './routes/_auth/ec2/(security-groups)/describe-security-groups/index' +import { Route as AuthEc2securityGroupsDescribeSecurityGroupsIdRouteImport } from './routes/_auth/ec2/(security-groups)/describe-security-groups/$id' +import { Route as AuthEc2snapshotsDescribeSnapshotsIndexRouteImport } from './routes/_auth/ec2/(snapshots)/describe-snapshots/index' +import { Route as AuthEc2snapshotsDescribeSnapshotsIdRouteImport } from './routes/_auth/ec2/(snapshots)/describe-snapshots/$id' +import { Route as AuthEc2subnetDescribeSubnetsIndexRouteImport } from './routes/_auth/ec2/(subnet)/describe-subnets/index' +import { Route as AuthEc2subnetDescribeSubnetsIdRouteImport } from './routes/_auth/ec2/(subnet)/describe-subnets/$id' +import { Route as AuthEc2targetGroupsDescribeTargetGroupsIndexRouteImport } from './routes/_auth/ec2/(target-groups)/describe-target-groups/index' +import { Route as AuthEc2targetGroupsDescribeTargetGroupsIdRouteImport } from './routes/_auth/ec2/(target-groups)/describe-target-groups/$id' +import { Route as AuthEc2volumesDescribeVolumesIndexRouteImport } from './routes/_auth/ec2/(volumes)/describe-volumes/index' +import { Route as AuthEc2volumesDescribeVolumesIdRouteImport } from './routes/_auth/ec2/(volumes)/describe-volumes/$id' +import { Route as AuthEc2volumesModifyVolumeIdRouteImport } from './routes/_auth/ec2/(volumes)/modify-volume/$id' +import { Route as AuthEc2vpcDescribeVpcsIndexRouteImport } from './routes/_auth/ec2/(vpc)/describe-vpcs/index' +import { Route as AuthEc2vpcDescribeVpcsIdRouteImport } from './routes/_auth/ec2/(vpc)/describe-vpcs/$id' +import { Route as AuthEcrrepositoriesListRepositoriesIndexRouteImport } from './routes/_auth/ecr/(repositories)/list-repositories/index' +import { Route as AuthEcrrepositoriesListRepositoriesIdRouteImport } from './routes/_auth/ecr/(repositories)/list-repositories/$id' +import { Route as AuthEcsclustersListClustersIndexRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/index' +import { Route as AuthEcsclustersListClustersClusterNameRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/$clusterName' +import { Route as AuthEksclustersListClustersIndexRouteImport } from './routes/_auth/eks/(clusters)/list-clusters/index' +import { Route as AuthEksclustersListClustersClusterNameRouteImport } from './routes/_auth/eks/(clusters)/list-clusters/$clusterName' +import { Route as AuthIamgroupsListGroupsIndexRouteImport } from './routes/_auth/iam/(groups)/list-groups/index' +import { Route as AuthIamgroupsListGroupsGroupNameRouteImport } from './routes/_auth/iam/(groups)/list-groups/$groupName' +import { Route as AuthIaminstanceProfilesListInstanceProfilesIndexRouteImport } from './routes/_auth/iam/(instance-profiles)/list-instance-profiles/index' +import { Route as AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRouteImport } from './routes/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName' +import { Route as AuthIampoliciesListPoliciesIndexRouteImport } from './routes/_auth/iam/(policies)/list-policies/index' +import { Route as AuthIampoliciesListPoliciesPolicyArnRouteImport } from './routes/_auth/iam/(policies)/list-policies/$policyArn' +import { Route as AuthIamrolesListRolesIndexRouteImport } from './routes/_auth/iam/(roles)/list-roles/index' +import { Route as AuthIamrolesListRolesRoleNameRouteImport } from './routes/_auth/iam/(roles)/list-roles/$roleName' +import { Route as AuthIamusersListUsersIndexRouteImport } from './routes/_auth/iam/(users)/list-users/index' +import { Route as AuthIamusersListUsersUserNameRouteImport } from './routes/_auth/iam/(users)/list-users/$userName' +import { Route as AuthRdsdbInstancesDescribeDbInstancesIndexRouteImport } from './routes/_auth/rds/(db-instances)/describe-db-instances/index' +import { Route as AuthRdsdbInstancesDescribeDbInstancesIdRouteImport } from './routes/_auth/rds/(db-instances)/describe-db-instances/$id' +import { Route as AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRouteImport } from './routes/_auth/rds/(parameter-groups)/describe-db-parameter-groups/index' +import { Route as AuthRdsparameterGroupsDescribeDbParameterGroupsNameRouteImport } from './routes/_auth/rds/(parameter-groups)/describe-db-parameter-groups/$name' +import { Route as AuthRdssnapshotsDescribeDbSnapshotsIndexRouteImport } from './routes/_auth/rds/(snapshots)/describe-db-snapshots/index' +import { Route as AuthRdssnapshotsDescribeDbSnapshotsIdRouteImport } from './routes/_auth/rds/(snapshots)/describe-db-snapshots/$id' +import { Route as AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRouteImport } from './routes/_auth/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id' +import { Route as AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRouteImport } from './routes/_auth/rds/(subnet-groups)/describe-db-subnet-groups/index' +import { Route as AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRouteImport } from './routes/_auth/rds/(subnet-groups)/describe-db-subnet-groups/$name' +import { Route as AuthS3LsBucketIndexRouteImport } from './routes/_auth/s3/ls/$bucket/index' +import { Route as AuthS3LsBucketSplatRouteImport } from './routes/_auth/s3/ls/$bucket/$' import { Route as AuthEcsclustersListClustersClusterNameServicesServiceNameRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName' +import { Route as AuthEcsclustersListClustersClusterNameTasksTaskIdRouteImport } from './routes/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId' +const AuthRouteRoute = AuthRouteRouteImport.update({ + id: '/_auth', + getParentRoute: () => rootRouteImport, +} as any) const LoginRoute = LoginRouteImport.update({ id: '/login', path: '/login', getParentRoute: () => rootRouteImport, } as any) -const AuthRouteRoute = AuthRouteRouteImport.update({ - id: '/_auth', - getParentRoute: () => rootRouteImport, -} as any) const AuthIndexRoute = AuthIndexRouteImport.update({ id: '/', path: '/', @@ -133,171 +133,10 @@ const AuthS3ServiceMetricsRoute = AuthS3ServiceMetricsRouteImport.update({ path: '/s3/service-metrics', getParentRoute: () => AuthRouteRoute, } as any) -const AuthS3LsIndexRoute = AuthS3LsIndexRouteImport.update({ - id: '/s3/ls/', - path: '/s3/ls/', - getParentRoute: () => AuthRouteRoute, -} as any) -const AuthS3bucketsCreateBucketRoute = - AuthS3bucketsCreateBucketRouteImport.update({ - id: '/s3/(buckets)/create-bucket', - path: '/s3/create-bucket', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthRdssubnetGroupsCreateDbSubnetGroupRoute = - AuthRdssubnetGroupsCreateDbSubnetGroupRouteImport.update({ - id: '/rds/(subnet-groups)/create-db-subnet-group', - path: '/rds/create-db-subnet-group', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthRdsparameterGroupsCreateDbParameterGroupRoute = - AuthRdsparameterGroupsCreateDbParameterGroupRouteImport.update({ - id: '/rds/(parameter-groups)/create-db-parameter-group', - path: '/rds/create-db-parameter-group', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthRdsdbInstancesCreateDbInstanceRoute = - AuthRdsdbInstancesCreateDbInstanceRouteImport.update({ - id: '/rds/(db-instances)/create-db-instance', - path: '/rds/create-db-instance', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthIamusersCreateUserRoute = AuthIamusersCreateUserRouteImport.update({ - id: '/iam/(users)/create-user', - path: '/iam/create-user', - getParentRoute: () => AuthRouteRoute, -} as any) -const AuthIamrolesCreateRoleRoute = AuthIamrolesCreateRoleRouteImport.update({ - id: '/iam/(roles)/create-role', - path: '/iam/create-role', - getParentRoute: () => AuthRouteRoute, -} as any) -const AuthIampoliciesCreatePolicyRoute = - AuthIampoliciesCreatePolicyRouteImport.update({ - id: '/iam/(policies)/create-policy', - path: '/iam/create-policy', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthIaminstanceProfilesCreateInstanceProfileRoute = - AuthIaminstanceProfilesCreateInstanceProfileRouteImport.update({ - id: '/iam/(instance-profiles)/create-instance-profile', - path: '/iam/create-instance-profile', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthIamgroupsCreateGroupRoute = - AuthIamgroupsCreateGroupRouteImport.update({ - id: '/iam/(groups)/create-group', - path: '/iam/create-group', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEksclustersCreateClusterRoute = - AuthEksclustersCreateClusterRouteImport.update({ - id: '/eks/(clusters)/create-cluster', - path: '/eks/create-cluster', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEcsclustersTaskDefinitionsRoute = - AuthEcsclustersTaskDefinitionsRouteImport.update({ - id: '/ecs/(clusters)/task-definitions', - path: '/ecs/task-definitions', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEcsclustersRunTaskRoute = AuthEcsclustersRunTaskRouteImport.update({ - id: '/ecs/(clusters)/run-task', - path: '/ecs/run-task', - getParentRoute: () => AuthRouteRoute, -} as any) -const AuthEcsclustersRegisterTaskDefinitionRoute = - AuthEcsclustersRegisterTaskDefinitionRouteImport.update({ - id: '/ecs/(clusters)/register-task-definition', - path: '/ecs/register-task-definition', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEcsclustersCreateServiceRoute = - AuthEcsclustersCreateServiceRouteImport.update({ - id: '/ecs/(clusters)/create-service', - path: '/ecs/create-service', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2vpcCreateVpcRoute = AuthEc2vpcCreateVpcRouteImport.update({ - id: '/ec2/(vpc)/create-vpc', - path: '/ec2/create-vpc', - getParentRoute: () => AuthRouteRoute, -} as any) -const AuthEc2volumesCreateVolumeRoute = - AuthEc2volumesCreateVolumeRouteImport.update({ - id: '/ec2/(volumes)/create-volume', - path: '/ec2/create-volume', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2targetGroupsCreateTargetGroupRoute = - AuthEc2targetGroupsCreateTargetGroupRouteImport.update({ - id: '/ec2/(target-groups)/create-target-group', - path: '/ec2/create-target-group', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2subnetCreateSubnetRoute = - AuthEc2subnetCreateSubnetRouteImport.update({ - id: '/ec2/(subnet)/create-subnet', - path: '/ec2/create-subnet', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2snapshotsCreateSnapshotRoute = - AuthEc2snapshotsCreateSnapshotRouteImport.update({ - id: '/ec2/(snapshots)/create-snapshot', - path: '/ec2/create-snapshot', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2securityGroupsCreateSecurityGroupRoute = - AuthEc2securityGroupsCreateSecurityGroupRouteImport.update({ - id: '/ec2/(security-groups)/create-security-group', - path: '/ec2/create-security-group', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2routeTablesCreateRouteTableRoute = - AuthEc2routeTablesCreateRouteTableRouteImport.update({ - id: '/ec2/(route-tables)/create-route-table', - path: '/ec2/create-route-table', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2placementGroupsCreatePlacementGroupRoute = - AuthEc2placementGroupsCreatePlacementGroupRouteImport.update({ - id: '/ec2/(placement-groups)/create-placement-group', - path: '/ec2/create-placement-group', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2natGatewaysCreateNatGatewayRoute = - AuthEc2natGatewaysCreateNatGatewayRouteImport.update({ - id: '/ec2/(nat-gateways)/create-nat-gateway', - path: '/ec2/create-nat-gateway', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2loadBalancersCreateLoadBalancerRoute = - AuthEc2loadBalancersCreateLoadBalancerRouteImport.update({ - id: '/ec2/(load-balancers)/create-load-balancer', - path: '/ec2/create-load-balancer', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2launchTemplatesCreateLaunchTemplateRoute = - AuthEc2launchTemplatesCreateLaunchTemplateRouteImport.update({ - id: '/ec2/(launch-templates)/create-launch-template', - path: '/ec2/create-launch-template', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2keyImportKeyPairRoute = AuthEc2keyImportKeyPairRouteImport.update({ - id: '/ec2/(key)/import-key-pair', - path: '/ec2/import-key-pair', - getParentRoute: () => AuthRouteRoute, -} as any) -const AuthEc2keyCreateKeyPairRoute = AuthEc2keyCreateKeyPairRouteImport.update({ - id: '/ec2/(key)/create-key-pair', - path: '/ec2/create-key-pair', - getParentRoute: () => AuthRouteRoute, -} as any) -const AuthEc2internetGatewaysCreateInternetGatewayRoute = - AuthEc2internetGatewaysCreateInternetGatewayRouteImport.update({ - id: '/ec2/(internet-gateways)/create-internet-gateway', - path: '/ec2/create-internet-gateway', +const AuthEc2elasticIpsAllocateAddressRoute = + AuthEc2elasticIpsAllocateAddressRouteImport.update({ + id: '/ec2/(elastic-ips)/allocate-address', + path: '/ec2/allocate-address', getParentRoute: () => AuthRouteRoute, } as any) const AuthEc2instancesRunInstancesRoute = @@ -306,176 +145,188 @@ const AuthEc2instancesRunInstancesRoute = path: '/ec2/run-instances', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2elasticIpsAllocateAddressRoute = - AuthEc2elasticIpsAllocateAddressRouteImport.update({ - id: '/ec2/(elastic-ips)/allocate-address', - path: '/ec2/allocate-address', +const AuthEc2internetGatewaysCreateInternetGatewayRoute = + AuthEc2internetGatewaysCreateInternetGatewayRouteImport.update({ + id: '/ec2/(internet-gateways)/create-internet-gateway', + path: '/ec2/create-internet-gateway', getParentRoute: () => AuthRouteRoute, } as any) +const AuthEc2keyCreateKeyPairRoute = AuthEc2keyCreateKeyPairRouteImport.update({ + id: '/ec2/(key)/create-key-pair', + path: '/ec2/create-key-pair', + getParentRoute: () => AuthRouteRoute, +} as any) +const AuthEc2keyImportKeyPairRoute = AuthEc2keyImportKeyPairRouteImport.update({ + id: '/ec2/(key)/import-key-pair', + path: '/ec2/import-key-pair', + getParentRoute: () => AuthRouteRoute, +} as any) +const AuthEc2launchTemplatesCreateLaunchTemplateRoute = + AuthEc2launchTemplatesCreateLaunchTemplateRouteImport.update({ + id: '/ec2/(launch-templates)/create-launch-template', + path: '/ec2/create-launch-template', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2loadBalancersCreateLoadBalancerRoute = + AuthEc2loadBalancersCreateLoadBalancerRouteImport.update({ + id: '/ec2/(load-balancers)/create-load-balancer', + path: '/ec2/create-load-balancer', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2natGatewaysCreateNatGatewayRoute = + AuthEc2natGatewaysCreateNatGatewayRouteImport.update({ + id: '/ec2/(nat-gateways)/create-nat-gateway', + path: '/ec2/create-nat-gateway', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2placementGroupsCreatePlacementGroupRoute = + AuthEc2placementGroupsCreatePlacementGroupRouteImport.update({ + id: '/ec2/(placement-groups)/create-placement-group', + path: '/ec2/create-placement-group', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2routeTablesCreateRouteTableRoute = + AuthEc2routeTablesCreateRouteTableRouteImport.update({ + id: '/ec2/(route-tables)/create-route-table', + path: '/ec2/create-route-table', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2securityGroupsCreateSecurityGroupRoute = + AuthEc2securityGroupsCreateSecurityGroupRouteImport.update({ + id: '/ec2/(security-groups)/create-security-group', + path: '/ec2/create-security-group', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2snapshotsCreateSnapshotRoute = + AuthEc2snapshotsCreateSnapshotRouteImport.update({ + id: '/ec2/(snapshots)/create-snapshot', + path: '/ec2/create-snapshot', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2subnetCreateSubnetRoute = + AuthEc2subnetCreateSubnetRouteImport.update({ + id: '/ec2/(subnet)/create-subnet', + path: '/ec2/create-subnet', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2targetGroupsCreateTargetGroupRoute = + AuthEc2targetGroupsCreateTargetGroupRouteImport.update({ + id: '/ec2/(target-groups)/create-target-group', + path: '/ec2/create-target-group', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2volumesCreateVolumeRoute = + AuthEc2volumesCreateVolumeRouteImport.update({ + id: '/ec2/(volumes)/create-volume', + path: '/ec2/create-volume', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2vpcCreateVpcRoute = AuthEc2vpcCreateVpcRouteImport.update({ + id: '/ec2/(vpc)/create-vpc', + path: '/ec2/create-vpc', + getParentRoute: () => AuthRouteRoute, +} as any) +const AuthEcsclustersCreateServiceRoute = + AuthEcsclustersCreateServiceRouteImport.update({ + id: '/ecs/(clusters)/create-service', + path: '/ecs/create-service', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEcsclustersRegisterTaskDefinitionRoute = + AuthEcsclustersRegisterTaskDefinitionRouteImport.update({ + id: '/ecs/(clusters)/register-task-definition', + path: '/ecs/register-task-definition', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEcsclustersRunTaskRoute = AuthEcsclustersRunTaskRouteImport.update({ + id: '/ecs/(clusters)/run-task', + path: '/ecs/run-task', + getParentRoute: () => AuthRouteRoute, +} as any) +const AuthEcsclustersTaskDefinitionsRoute = + AuthEcsclustersTaskDefinitionsRouteImport.update({ + id: '/ecs/(clusters)/task-definitions', + path: '/ecs/task-definitions', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEksclustersCreateClusterRoute = + AuthEksclustersCreateClusterRouteImport.update({ + id: '/eks/(clusters)/create-cluster', + path: '/eks/create-cluster', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthIamgroupsCreateGroupRoute = + AuthIamgroupsCreateGroupRouteImport.update({ + id: '/iam/(groups)/create-group', + path: '/iam/create-group', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthIaminstanceProfilesCreateInstanceProfileRoute = + AuthIaminstanceProfilesCreateInstanceProfileRouteImport.update({ + id: '/iam/(instance-profiles)/create-instance-profile', + path: '/iam/create-instance-profile', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthIampoliciesCreatePolicyRoute = + AuthIampoliciesCreatePolicyRouteImport.update({ + id: '/iam/(policies)/create-policy', + path: '/iam/create-policy', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthIamrolesCreateRoleRoute = AuthIamrolesCreateRoleRouteImport.update({ + id: '/iam/(roles)/create-role', + path: '/iam/create-role', + getParentRoute: () => AuthRouteRoute, +} as any) +const AuthIamusersCreateUserRoute = AuthIamusersCreateUserRouteImport.update({ + id: '/iam/(users)/create-user', + path: '/iam/create-user', + getParentRoute: () => AuthRouteRoute, +} as any) +const AuthRdsdbInstancesCreateDbInstanceRoute = + AuthRdsdbInstancesCreateDbInstanceRouteImport.update({ + id: '/rds/(db-instances)/create-db-instance', + path: '/rds/create-db-instance', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthRdsparameterGroupsCreateDbParameterGroupRoute = + AuthRdsparameterGroupsCreateDbParameterGroupRouteImport.update({ + id: '/rds/(parameter-groups)/create-db-parameter-group', + path: '/rds/create-db-parameter-group', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthRdssubnetGroupsCreateDbSubnetGroupRoute = + AuthRdssubnetGroupsCreateDbSubnetGroupRouteImport.update({ + id: '/rds/(subnet-groups)/create-db-subnet-group', + path: '/rds/create-db-subnet-group', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthS3bucketsCreateBucketRoute = + AuthS3bucketsCreateBucketRouteImport.update({ + id: '/s3/(buckets)/create-bucket', + path: '/s3/create-bucket', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthS3LsIndexRoute = AuthS3LsIndexRouteImport.update({ + id: '/s3/ls/', + path: '/s3/ls/', + getParentRoute: () => AuthRouteRoute, +} as any) const AuthS3LsBucketRouteRoute = AuthS3LsBucketRouteRouteImport.update({ id: '/s3/ls/$bucket', path: '/s3/ls/$bucket', getParentRoute: () => AuthRouteRoute, } as any) -const AuthS3LsBucketIndexRoute = AuthS3LsBucketIndexRouteImport.update({ - id: '/', - path: '/', - getParentRoute: () => AuthS3LsBucketRouteRoute, -} as any) -const AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRoute = - AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRouteImport.update({ - id: '/rds/(subnet-groups)/describe-db-subnet-groups/', - path: '/rds/describe-db-subnet-groups/', +const AuthEc2elasticIpsDescribeAddressesIndexRoute = + AuthEc2elasticIpsDescribeAddressesIndexRouteImport.update({ + id: '/ec2/(elastic-ips)/describe-addresses/', + path: '/ec2/describe-addresses/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthRdssnapshotsDescribeDbSnapshotsIndexRoute = - AuthRdssnapshotsDescribeDbSnapshotsIndexRouteImport.update({ - id: '/rds/(snapshots)/describe-db-snapshots/', - path: '/rds/describe-db-snapshots/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRoute = - AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRouteImport.update({ - id: '/rds/(parameter-groups)/describe-db-parameter-groups/', - path: '/rds/describe-db-parameter-groups/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthRdsdbInstancesDescribeDbInstancesIndexRoute = - AuthRdsdbInstancesDescribeDbInstancesIndexRouteImport.update({ - id: '/rds/(db-instances)/describe-db-instances/', - path: '/rds/describe-db-instances/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthIamusersListUsersIndexRoute = - AuthIamusersListUsersIndexRouteImport.update({ - id: '/iam/(users)/list-users/', - path: '/iam/list-users/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthIamrolesListRolesIndexRoute = - AuthIamrolesListRolesIndexRouteImport.update({ - id: '/iam/(roles)/list-roles/', - path: '/iam/list-roles/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthIampoliciesListPoliciesIndexRoute = - AuthIampoliciesListPoliciesIndexRouteImport.update({ - id: '/iam/(policies)/list-policies/', - path: '/iam/list-policies/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthIaminstanceProfilesListInstanceProfilesIndexRoute = - AuthIaminstanceProfilesListInstanceProfilesIndexRouteImport.update({ - id: '/iam/(instance-profiles)/list-instance-profiles/', - path: '/iam/list-instance-profiles/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthIamgroupsListGroupsIndexRoute = - AuthIamgroupsListGroupsIndexRouteImport.update({ - id: '/iam/(groups)/list-groups/', - path: '/iam/list-groups/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEksclustersListClustersIndexRoute = - AuthEksclustersListClustersIndexRouteImport.update({ - id: '/eks/(clusters)/list-clusters/', - path: '/eks/list-clusters/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEcsclustersListClustersIndexRoute = - AuthEcsclustersListClustersIndexRouteImport.update({ - id: '/ecs/(clusters)/list-clusters/', - path: '/ecs/list-clusters/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEcrrepositoriesListRepositoriesIndexRoute = - AuthEcrrepositoriesListRepositoriesIndexRouteImport.update({ - id: '/ecr/(repositories)/list-repositories/', - path: '/ecr/list-repositories/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2vpcDescribeVpcsIndexRoute = - AuthEc2vpcDescribeVpcsIndexRouteImport.update({ - id: '/ec2/(vpc)/describe-vpcs/', - path: '/ec2/describe-vpcs/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2volumesDescribeVolumesIndexRoute = - AuthEc2volumesDescribeVolumesIndexRouteImport.update({ - id: '/ec2/(volumes)/describe-volumes/', - path: '/ec2/describe-volumes/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2targetGroupsDescribeTargetGroupsIndexRoute = - AuthEc2targetGroupsDescribeTargetGroupsIndexRouteImport.update({ - id: '/ec2/(target-groups)/describe-target-groups/', - path: '/ec2/describe-target-groups/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2subnetDescribeSubnetsIndexRoute = - AuthEc2subnetDescribeSubnetsIndexRouteImport.update({ - id: '/ec2/(subnet)/describe-subnets/', - path: '/ec2/describe-subnets/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2snapshotsDescribeSnapshotsIndexRoute = - AuthEc2snapshotsDescribeSnapshotsIndexRouteImport.update({ - id: '/ec2/(snapshots)/describe-snapshots/', - path: '/ec2/describe-snapshots/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2securityGroupsDescribeSecurityGroupsIndexRoute = - AuthEc2securityGroupsDescribeSecurityGroupsIndexRouteImport.update({ - id: '/ec2/(security-groups)/describe-security-groups/', - path: '/ec2/describe-security-groups/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2routeTablesDescribeRouteTablesIndexRoute = - AuthEc2routeTablesDescribeRouteTablesIndexRouteImport.update({ - id: '/ec2/(route-tables)/describe-route-tables/', - path: '/ec2/describe-route-tables/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2placementGroupsDescribePlacementGroupsIndexRoute = - AuthEc2placementGroupsDescribePlacementGroupsIndexRouteImport.update({ - id: '/ec2/(placement-groups)/describe-placement-groups/', - path: '/ec2/describe-placement-groups/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2natGatewaysDescribeNatGatewaysIndexRoute = - AuthEc2natGatewaysDescribeNatGatewaysIndexRouteImport.update({ - id: '/ec2/(nat-gateways)/describe-nat-gateways/', - path: '/ec2/describe-nat-gateways/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2loadBalancersDescribeLoadBalancersIndexRoute = - AuthEc2loadBalancersDescribeLoadBalancersIndexRouteImport.update({ - id: '/ec2/(load-balancers)/describe-load-balancers/', - path: '/ec2/describe-load-balancers/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRoute = - AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRouteImport.update({ - id: '/ec2/(launch-templates)/describe-launch-templates/', - path: '/ec2/describe-launch-templates/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2keyDescribeKeyPairsIndexRoute = - AuthEc2keyDescribeKeyPairsIndexRouteImport.update({ - id: '/ec2/(key)/describe-key-pairs/', - path: '/ec2/describe-key-pairs/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2internetGatewaysDescribeInternetGatewaysIndexRoute = - AuthEc2internetGatewaysDescribeInternetGatewaysIndexRouteImport.update({ - id: '/ec2/(internet-gateways)/describe-internet-gateways/', - path: '/ec2/describe-internet-gateways/', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2instancesDescribeInstancesIndexRoute = - AuthEc2instancesDescribeInstancesIndexRouteImport.update({ - id: '/ec2/(instances)/describe-instances/', - path: '/ec2/describe-instances/', +const AuthEc2elasticIpsDescribeAddressesIdRoute = + AuthEc2elasticIpsDescribeAddressesIdRouteImport.update({ + id: '/ec2/(elastic-ips)/describe-addresses/$id', + path: '/ec2/describe-addresses/$id', getParentRoute: () => AuthRouteRoute, } as any) const AuthEc2imagesDescribeImagesIndexRoute = @@ -484,63 +335,238 @@ const AuthEc2imagesDescribeImagesIndexRoute = path: '/ec2/describe-images/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2elasticIpsDescribeAddressesIndexRoute = - AuthEc2elasticIpsDescribeAddressesIndexRouteImport.update({ - id: '/ec2/(elastic-ips)/describe-addresses/', - path: '/ec2/describe-addresses/', +const AuthEc2imagesDescribeImagesIdRoute = + AuthEc2imagesDescribeImagesIdRouteImport.update({ + id: '/ec2/(images)/describe-images/$id', + path: '/ec2/describe-images/$id', getParentRoute: () => AuthRouteRoute, } as any) -const AuthS3LsBucketSplatRoute = AuthS3LsBucketSplatRouteImport.update({ - id: '/$', - path: '/$', - getParentRoute: () => AuthS3LsBucketRouteRoute, -} as any) -const AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRoute = - AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRouteImport.update({ - id: '/rds/(subnet-groups)/describe-db-subnet-groups/$name', - path: '/rds/describe-db-subnet-groups/$name', +const AuthEc2instancesDescribeInstancesIndexRoute = + AuthEc2instancesDescribeInstancesIndexRouteImport.update({ + id: '/ec2/(instances)/describe-instances/', + path: '/ec2/describe-instances/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRoute = - AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRouteImport.update({ - id: '/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id', - path: '/rds/restore-db-instance-from-db-snapshot/$id', +const AuthEc2instancesDescribeInstancesIdRoute = + AuthEc2instancesDescribeInstancesIdRouteImport.update({ + id: '/ec2/(instances)/describe-instances/$id', + path: '/ec2/describe-instances/$id', getParentRoute: () => AuthRouteRoute, } as any) -const AuthRdssnapshotsDescribeDbSnapshotsIdRoute = - AuthRdssnapshotsDescribeDbSnapshotsIdRouteImport.update({ - id: '/rds/(snapshots)/describe-db-snapshots/$id', - path: '/rds/describe-db-snapshots/$id', +const AuthEc2internetGatewaysDescribeInternetGatewaysIndexRoute = + AuthEc2internetGatewaysDescribeInternetGatewaysIndexRouteImport.update({ + id: '/ec2/(internet-gateways)/describe-internet-gateways/', + path: '/ec2/describe-internet-gateways/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthRdsparameterGroupsDescribeDbParameterGroupsNameRoute = - AuthRdsparameterGroupsDescribeDbParameterGroupsNameRouteImport.update({ - id: '/rds/(parameter-groups)/describe-db-parameter-groups/$name', - path: '/rds/describe-db-parameter-groups/$name', +const AuthEc2internetGatewaysDescribeInternetGatewaysIdRoute = + AuthEc2internetGatewaysDescribeInternetGatewaysIdRouteImport.update({ + id: '/ec2/(internet-gateways)/describe-internet-gateways/$id', + path: '/ec2/describe-internet-gateways/$id', getParentRoute: () => AuthRouteRoute, } as any) -const AuthRdsdbInstancesDescribeDbInstancesIdRoute = - AuthRdsdbInstancesDescribeDbInstancesIdRouteImport.update({ - id: '/rds/(db-instances)/describe-db-instances/$id', - path: '/rds/describe-db-instances/$id', +const AuthEc2keyDescribeKeyPairsIndexRoute = + AuthEc2keyDescribeKeyPairsIndexRouteImport.update({ + id: '/ec2/(key)/describe-key-pairs/', + path: '/ec2/describe-key-pairs/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthIamusersListUsersUserNameRoute = - AuthIamusersListUsersUserNameRouteImport.update({ - id: '/iam/(users)/list-users/$userName', - path: '/iam/list-users/$userName', +const AuthEc2keyDescribeKeyPairsIdRoute = + AuthEc2keyDescribeKeyPairsIdRouteImport.update({ + id: '/ec2/(key)/describe-key-pairs/$id', + path: '/ec2/describe-key-pairs/$id', getParentRoute: () => AuthRouteRoute, } as any) -const AuthIamrolesListRolesRoleNameRoute = - AuthIamrolesListRolesRoleNameRouteImport.update({ - id: '/iam/(roles)/list-roles/$roleName', - path: '/iam/list-roles/$roleName', +const AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRoute = + AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRouteImport.update({ + id: '/ec2/(launch-templates)/describe-launch-templates/', + path: '/ec2/describe-launch-templates/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthIampoliciesListPoliciesPolicyArnRoute = - AuthIampoliciesListPoliciesPolicyArnRouteImport.update({ - id: '/iam/(policies)/list-policies/$policyArn', - path: '/iam/list-policies/$policyArn', +const AuthEc2launchTemplatesDescribeLaunchTemplatesIdRoute = + AuthEc2launchTemplatesDescribeLaunchTemplatesIdRouteImport.update({ + id: '/ec2/(launch-templates)/describe-launch-templates/$id', + path: '/ec2/describe-launch-templates/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2loadBalancersDescribeLoadBalancersIndexRoute = + AuthEc2loadBalancersDescribeLoadBalancersIndexRouteImport.update({ + id: '/ec2/(load-balancers)/describe-load-balancers/', + path: '/ec2/describe-load-balancers/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2loadBalancersDescribeLoadBalancersIdRoute = + AuthEc2loadBalancersDescribeLoadBalancersIdRouteImport.update({ + id: '/ec2/(load-balancers)/describe-load-balancers/$id', + path: '/ec2/describe-load-balancers/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2natGatewaysDescribeNatGatewaysIndexRoute = + AuthEc2natGatewaysDescribeNatGatewaysIndexRouteImport.update({ + id: '/ec2/(nat-gateways)/describe-nat-gateways/', + path: '/ec2/describe-nat-gateways/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2natGatewaysDescribeNatGatewaysIdRoute = + AuthEc2natGatewaysDescribeNatGatewaysIdRouteImport.update({ + id: '/ec2/(nat-gateways)/describe-nat-gateways/$id', + path: '/ec2/describe-nat-gateways/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2placementGroupsDescribePlacementGroupsIndexRoute = + AuthEc2placementGroupsDescribePlacementGroupsIndexRouteImport.update({ + id: '/ec2/(placement-groups)/describe-placement-groups/', + path: '/ec2/describe-placement-groups/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2placementGroupsDescribePlacementGroupsIdRoute = + AuthEc2placementGroupsDescribePlacementGroupsIdRouteImport.update({ + id: '/ec2/(placement-groups)/describe-placement-groups/$id', + path: '/ec2/describe-placement-groups/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2routeTablesDescribeRouteTablesIndexRoute = + AuthEc2routeTablesDescribeRouteTablesIndexRouteImport.update({ + id: '/ec2/(route-tables)/describe-route-tables/', + path: '/ec2/describe-route-tables/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2routeTablesDescribeRouteTablesIdRoute = + AuthEc2routeTablesDescribeRouteTablesIdRouteImport.update({ + id: '/ec2/(route-tables)/describe-route-tables/$id', + path: '/ec2/describe-route-tables/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2securityGroupsDescribeSecurityGroupsIndexRoute = + AuthEc2securityGroupsDescribeSecurityGroupsIndexRouteImport.update({ + id: '/ec2/(security-groups)/describe-security-groups/', + path: '/ec2/describe-security-groups/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2securityGroupsDescribeSecurityGroupsIdRoute = + AuthEc2securityGroupsDescribeSecurityGroupsIdRouteImport.update({ + id: '/ec2/(security-groups)/describe-security-groups/$id', + path: '/ec2/describe-security-groups/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2snapshotsDescribeSnapshotsIndexRoute = + AuthEc2snapshotsDescribeSnapshotsIndexRouteImport.update({ + id: '/ec2/(snapshots)/describe-snapshots/', + path: '/ec2/describe-snapshots/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2snapshotsDescribeSnapshotsIdRoute = + AuthEc2snapshotsDescribeSnapshotsIdRouteImport.update({ + id: '/ec2/(snapshots)/describe-snapshots/$id', + path: '/ec2/describe-snapshots/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2subnetDescribeSubnetsIndexRoute = + AuthEc2subnetDescribeSubnetsIndexRouteImport.update({ + id: '/ec2/(subnet)/describe-subnets/', + path: '/ec2/describe-subnets/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2subnetDescribeSubnetsIdRoute = + AuthEc2subnetDescribeSubnetsIdRouteImport.update({ + id: '/ec2/(subnet)/describe-subnets/$id', + path: '/ec2/describe-subnets/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2targetGroupsDescribeTargetGroupsIndexRoute = + AuthEc2targetGroupsDescribeTargetGroupsIndexRouteImport.update({ + id: '/ec2/(target-groups)/describe-target-groups/', + path: '/ec2/describe-target-groups/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2targetGroupsDescribeTargetGroupsIdRoute = + AuthEc2targetGroupsDescribeTargetGroupsIdRouteImport.update({ + id: '/ec2/(target-groups)/describe-target-groups/$id', + path: '/ec2/describe-target-groups/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2volumesDescribeVolumesIndexRoute = + AuthEc2volumesDescribeVolumesIndexRouteImport.update({ + id: '/ec2/(volumes)/describe-volumes/', + path: '/ec2/describe-volumes/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2volumesDescribeVolumesIdRoute = + AuthEc2volumesDescribeVolumesIdRouteImport.update({ + id: '/ec2/(volumes)/describe-volumes/$id', + path: '/ec2/describe-volumes/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2volumesModifyVolumeIdRoute = + AuthEc2volumesModifyVolumeIdRouteImport.update({ + id: '/ec2/(volumes)/modify-volume/$id', + path: '/ec2/modify-volume/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2vpcDescribeVpcsIndexRoute = + AuthEc2vpcDescribeVpcsIndexRouteImport.update({ + id: '/ec2/(vpc)/describe-vpcs/', + path: '/ec2/describe-vpcs/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEc2vpcDescribeVpcsIdRoute = + AuthEc2vpcDescribeVpcsIdRouteImport.update({ + id: '/ec2/(vpc)/describe-vpcs/$id', + path: '/ec2/describe-vpcs/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEcrrepositoriesListRepositoriesIndexRoute = + AuthEcrrepositoriesListRepositoriesIndexRouteImport.update({ + id: '/ecr/(repositories)/list-repositories/', + path: '/ecr/list-repositories/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEcrrepositoriesListRepositoriesIdRoute = + AuthEcrrepositoriesListRepositoriesIdRouteImport.update({ + id: '/ecr/(repositories)/list-repositories/$id', + path: '/ecr/list-repositories/$id', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEcsclustersListClustersIndexRoute = + AuthEcsclustersListClustersIndexRouteImport.update({ + id: '/ecs/(clusters)/list-clusters/', + path: '/ecs/list-clusters/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEcsclustersListClustersClusterNameRoute = + AuthEcsclustersListClustersClusterNameRouteImport.update({ + id: '/ecs/(clusters)/list-clusters/$clusterName', + path: '/ecs/list-clusters/$clusterName', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEksclustersListClustersIndexRoute = + AuthEksclustersListClustersIndexRouteImport.update({ + id: '/eks/(clusters)/list-clusters/', + path: '/eks/list-clusters/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthEksclustersListClustersClusterNameRoute = + AuthEksclustersListClustersClusterNameRouteImport.update({ + id: '/eks/(clusters)/list-clusters/$clusterName', + path: '/eks/list-clusters/$clusterName', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthIamgroupsListGroupsIndexRoute = + AuthIamgroupsListGroupsIndexRouteImport.update({ + id: '/iam/(groups)/list-groups/', + path: '/iam/list-groups/', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthIamgroupsListGroupsGroupNameRoute = + AuthIamgroupsListGroupsGroupNameRouteImport.update({ + id: '/iam/(groups)/list-groups/$groupName', + path: '/iam/list-groups/$groupName', + getParentRoute: () => AuthRouteRoute, + } as any) +const AuthIaminstanceProfilesListInstanceProfilesIndexRoute = + AuthIaminstanceProfilesListInstanceProfilesIndexRouteImport.update({ + id: '/iam/(instance-profiles)/list-instance-profiles/', + path: '/iam/list-instance-profiles/', getParentRoute: () => AuthRouteRoute, } as any) const AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRoute = @@ -551,130 +577,110 @@ const AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRoute = getParentRoute: () => AuthRouteRoute, } as any, ) -const AuthIamgroupsListGroupsGroupNameRoute = - AuthIamgroupsListGroupsGroupNameRouteImport.update({ - id: '/iam/(groups)/list-groups/$groupName', - path: '/iam/list-groups/$groupName', +const AuthIampoliciesListPoliciesIndexRoute = + AuthIampoliciesListPoliciesIndexRouteImport.update({ + id: '/iam/(policies)/list-policies/', + path: '/iam/list-policies/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEksclustersListClustersClusterNameRoute = - AuthEksclustersListClustersClusterNameRouteImport.update({ - id: '/eks/(clusters)/list-clusters/$clusterName', - path: '/eks/list-clusters/$clusterName', +const AuthIampoliciesListPoliciesPolicyArnRoute = + AuthIampoliciesListPoliciesPolicyArnRouteImport.update({ + id: '/iam/(policies)/list-policies/$policyArn', + path: '/iam/list-policies/$policyArn', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEcsclustersListClustersClusterNameRoute = - AuthEcsclustersListClustersClusterNameRouteImport.update({ - id: '/ecs/(clusters)/list-clusters/$clusterName', - path: '/ecs/list-clusters/$clusterName', +const AuthIamrolesListRolesIndexRoute = + AuthIamrolesListRolesIndexRouteImport.update({ + id: '/iam/(roles)/list-roles/', + path: '/iam/list-roles/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEcrrepositoriesListRepositoriesIdRoute = - AuthEcrrepositoriesListRepositoriesIdRouteImport.update({ - id: '/ecr/(repositories)/list-repositories/$id', - path: '/ecr/list-repositories/$id', +const AuthIamrolesListRolesRoleNameRoute = + AuthIamrolesListRolesRoleNameRouteImport.update({ + id: '/iam/(roles)/list-roles/$roleName', + path: '/iam/list-roles/$roleName', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2vpcDescribeVpcsIdRoute = - AuthEc2vpcDescribeVpcsIdRouteImport.update({ - id: '/ec2/(vpc)/describe-vpcs/$id', - path: '/ec2/describe-vpcs/$id', +const AuthIamusersListUsersIndexRoute = + AuthIamusersListUsersIndexRouteImport.update({ + id: '/iam/(users)/list-users/', + path: '/iam/list-users/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2volumesModifyVolumeIdRoute = - AuthEc2volumesModifyVolumeIdRouteImport.update({ - id: '/ec2/(volumes)/modify-volume/$id', - path: '/ec2/modify-volume/$id', +const AuthIamusersListUsersUserNameRoute = + AuthIamusersListUsersUserNameRouteImport.update({ + id: '/iam/(users)/list-users/$userName', + path: '/iam/list-users/$userName', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2volumesDescribeVolumesIdRoute = - AuthEc2volumesDescribeVolumesIdRouteImport.update({ - id: '/ec2/(volumes)/describe-volumes/$id', - path: '/ec2/describe-volumes/$id', +const AuthRdsdbInstancesDescribeDbInstancesIndexRoute = + AuthRdsdbInstancesDescribeDbInstancesIndexRouteImport.update({ + id: '/rds/(db-instances)/describe-db-instances/', + path: '/rds/describe-db-instances/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2targetGroupsDescribeTargetGroupsIdRoute = - AuthEc2targetGroupsDescribeTargetGroupsIdRouteImport.update({ - id: '/ec2/(target-groups)/describe-target-groups/$id', - path: '/ec2/describe-target-groups/$id', +const AuthRdsdbInstancesDescribeDbInstancesIdRoute = + AuthRdsdbInstancesDescribeDbInstancesIdRouteImport.update({ + id: '/rds/(db-instances)/describe-db-instances/$id', + path: '/rds/describe-db-instances/$id', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2subnetDescribeSubnetsIdRoute = - AuthEc2subnetDescribeSubnetsIdRouteImport.update({ - id: '/ec2/(subnet)/describe-subnets/$id', - path: '/ec2/describe-subnets/$id', +const AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRoute = + AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRouteImport.update({ + id: '/rds/(parameter-groups)/describe-db-parameter-groups/', + path: '/rds/describe-db-parameter-groups/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2snapshotsDescribeSnapshotsIdRoute = - AuthEc2snapshotsDescribeSnapshotsIdRouteImport.update({ - id: '/ec2/(snapshots)/describe-snapshots/$id', - path: '/ec2/describe-snapshots/$id', +const AuthRdsparameterGroupsDescribeDbParameterGroupsNameRoute = + AuthRdsparameterGroupsDescribeDbParameterGroupsNameRouteImport.update({ + id: '/rds/(parameter-groups)/describe-db-parameter-groups/$name', + path: '/rds/describe-db-parameter-groups/$name', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2securityGroupsDescribeSecurityGroupsIdRoute = - AuthEc2securityGroupsDescribeSecurityGroupsIdRouteImport.update({ - id: '/ec2/(security-groups)/describe-security-groups/$id', - path: '/ec2/describe-security-groups/$id', +const AuthRdssnapshotsDescribeDbSnapshotsIndexRoute = + AuthRdssnapshotsDescribeDbSnapshotsIndexRouteImport.update({ + id: '/rds/(snapshots)/describe-db-snapshots/', + path: '/rds/describe-db-snapshots/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2routeTablesDescribeRouteTablesIdRoute = - AuthEc2routeTablesDescribeRouteTablesIdRouteImport.update({ - id: '/ec2/(route-tables)/describe-route-tables/$id', - path: '/ec2/describe-route-tables/$id', +const AuthRdssnapshotsDescribeDbSnapshotsIdRoute = + AuthRdssnapshotsDescribeDbSnapshotsIdRouteImport.update({ + id: '/rds/(snapshots)/describe-db-snapshots/$id', + path: '/rds/describe-db-snapshots/$id', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2placementGroupsDescribePlacementGroupsIdRoute = - AuthEc2placementGroupsDescribePlacementGroupsIdRouteImport.update({ - id: '/ec2/(placement-groups)/describe-placement-groups/$id', - path: '/ec2/describe-placement-groups/$id', +const AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRoute = + AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRouteImport.update({ + id: '/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id', + path: '/rds/restore-db-instance-from-db-snapshot/$id', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2natGatewaysDescribeNatGatewaysIdRoute = - AuthEc2natGatewaysDescribeNatGatewaysIdRouteImport.update({ - id: '/ec2/(nat-gateways)/describe-nat-gateways/$id', - path: '/ec2/describe-nat-gateways/$id', +const AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRoute = + AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRouteImport.update({ + id: '/rds/(subnet-groups)/describe-db-subnet-groups/', + path: '/rds/describe-db-subnet-groups/', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2loadBalancersDescribeLoadBalancersIdRoute = - AuthEc2loadBalancersDescribeLoadBalancersIdRouteImport.update({ - id: '/ec2/(load-balancers)/describe-load-balancers/$id', - path: '/ec2/describe-load-balancers/$id', +const AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRoute = + AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRouteImport.update({ + id: '/rds/(subnet-groups)/describe-db-subnet-groups/$name', + path: '/rds/describe-db-subnet-groups/$name', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEc2launchTemplatesDescribeLaunchTemplatesIdRoute = - AuthEc2launchTemplatesDescribeLaunchTemplatesIdRouteImport.update({ - id: '/ec2/(launch-templates)/describe-launch-templates/$id', - path: '/ec2/describe-launch-templates/$id', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2keyDescribeKeyPairsIdRoute = - AuthEc2keyDescribeKeyPairsIdRouteImport.update({ - id: '/ec2/(key)/describe-key-pairs/$id', - path: '/ec2/describe-key-pairs/$id', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2internetGatewaysDescribeInternetGatewaysIdRoute = - AuthEc2internetGatewaysDescribeInternetGatewaysIdRouteImport.update({ - id: '/ec2/(internet-gateways)/describe-internet-gateways/$id', - path: '/ec2/describe-internet-gateways/$id', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2instancesDescribeInstancesIdRoute = - AuthEc2instancesDescribeInstancesIdRouteImport.update({ - id: '/ec2/(instances)/describe-instances/$id', - path: '/ec2/describe-instances/$id', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2imagesDescribeImagesIdRoute = - AuthEc2imagesDescribeImagesIdRouteImport.update({ - id: '/ec2/(images)/describe-images/$id', - path: '/ec2/describe-images/$id', - getParentRoute: () => AuthRouteRoute, - } as any) -const AuthEc2elasticIpsDescribeAddressesIdRoute = - AuthEc2elasticIpsDescribeAddressesIdRouteImport.update({ - id: '/ec2/(elastic-ips)/describe-addresses/$id', - path: '/ec2/describe-addresses/$id', +const AuthS3LsBucketIndexRoute = AuthS3LsBucketIndexRouteImport.update({ + id: '/', + path: '/', + getParentRoute: () => AuthS3LsBucketRouteRoute, +} as any) +const AuthS3LsBucketSplatRoute = AuthS3LsBucketSplatRouteImport.update({ + id: '/$', + path: '/$', + getParentRoute: () => AuthS3LsBucketRouteRoute, +} as any) +const AuthEcsclustersListClustersClusterNameServicesServiceNameRoute = + AuthEcsclustersListClustersClusterNameServicesServiceNameRouteImport.update({ + id: '/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName', + path: '/ecs/list-clusters/$clusterName/services/$serviceName', getParentRoute: () => AuthRouteRoute, } as any) const AuthEcsclustersListClustersClusterNameTasksTaskIdRoute = @@ -683,12 +689,6 @@ const AuthEcsclustersListClustersClusterNameTasksTaskIdRoute = path: '/ecs/list-clusters/$clusterName/tasks/$taskId', getParentRoute: () => AuthRouteRoute, } as any) -const AuthEcsclustersListClustersClusterNameServicesServiceNameRoute = - AuthEcsclustersListClustersClusterNameServicesServiceNameRouteImport.update({ - id: '/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName', - path: '/ecs/list-clusters/$clusterName/services/$serviceName', - getParentRoute: () => AuthRouteRoute, - } as any) export interface FileRoutesByFullPath { '/': typeof AuthIndexRoute @@ -1301,13 +1301,6 @@ export interface RootRouteChildren { declare module '@tanstack/react-router' { interface FileRoutesByPath { - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginRouteImport - parentRoute: typeof rootRouteImport - } '/_auth': { id: '/_auth' path: '' @@ -1315,6 +1308,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthRouteRouteImport parentRoute: typeof rootRouteImport } + '/login': { + id: '/login' + path: '/login' + fullPath: '/login' + preLoaderRoute: typeof LoginRouteImport + parentRoute: typeof rootRouteImport + } '/_auth/': { id: '/_auth/' path: '/' @@ -1336,207 +1336,11 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthS3ServiceMetricsRouteImport parentRoute: typeof AuthRouteRoute } - '/_auth/s3/ls/': { - id: '/_auth/s3/ls/' - path: '/s3/ls' - fullPath: '/s3/ls/' - preLoaderRoute: typeof AuthS3LsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/s3/(buckets)/create-bucket': { - id: '/_auth/s3/(buckets)/create-bucket' - path: '/s3/create-bucket' - fullPath: '/s3/create-bucket' - preLoaderRoute: typeof AuthS3bucketsCreateBucketRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(subnet-groups)/create-db-subnet-group': { - id: '/_auth/rds/(subnet-groups)/create-db-subnet-group' - path: '/rds/create-db-subnet-group' - fullPath: '/rds/create-db-subnet-group' - preLoaderRoute: typeof AuthRdssubnetGroupsCreateDbSubnetGroupRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(parameter-groups)/create-db-parameter-group': { - id: '/_auth/rds/(parameter-groups)/create-db-parameter-group' - path: '/rds/create-db-parameter-group' - fullPath: '/rds/create-db-parameter-group' - preLoaderRoute: typeof AuthRdsparameterGroupsCreateDbParameterGroupRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(db-instances)/create-db-instance': { - id: '/_auth/rds/(db-instances)/create-db-instance' - path: '/rds/create-db-instance' - fullPath: '/rds/create-db-instance' - preLoaderRoute: typeof AuthRdsdbInstancesCreateDbInstanceRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(users)/create-user': { - id: '/_auth/iam/(users)/create-user' - path: '/iam/create-user' - fullPath: '/iam/create-user' - preLoaderRoute: typeof AuthIamusersCreateUserRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(roles)/create-role': { - id: '/_auth/iam/(roles)/create-role' - path: '/iam/create-role' - fullPath: '/iam/create-role' - preLoaderRoute: typeof AuthIamrolesCreateRoleRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(policies)/create-policy': { - id: '/_auth/iam/(policies)/create-policy' - path: '/iam/create-policy' - fullPath: '/iam/create-policy' - preLoaderRoute: typeof AuthIampoliciesCreatePolicyRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(instance-profiles)/create-instance-profile': { - id: '/_auth/iam/(instance-profiles)/create-instance-profile' - path: '/iam/create-instance-profile' - fullPath: '/iam/create-instance-profile' - preLoaderRoute: typeof AuthIaminstanceProfilesCreateInstanceProfileRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(groups)/create-group': { - id: '/_auth/iam/(groups)/create-group' - path: '/iam/create-group' - fullPath: '/iam/create-group' - preLoaderRoute: typeof AuthIamgroupsCreateGroupRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/eks/(clusters)/create-cluster': { - id: '/_auth/eks/(clusters)/create-cluster' - path: '/eks/create-cluster' - fullPath: '/eks/create-cluster' - preLoaderRoute: typeof AuthEksclustersCreateClusterRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ecs/(clusters)/task-definitions': { - id: '/_auth/ecs/(clusters)/task-definitions' - path: '/ecs/task-definitions' - fullPath: '/ecs/task-definitions' - preLoaderRoute: typeof AuthEcsclustersTaskDefinitionsRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ecs/(clusters)/run-task': { - id: '/_auth/ecs/(clusters)/run-task' - path: '/ecs/run-task' - fullPath: '/ecs/run-task' - preLoaderRoute: typeof AuthEcsclustersRunTaskRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ecs/(clusters)/register-task-definition': { - id: '/_auth/ecs/(clusters)/register-task-definition' - path: '/ecs/register-task-definition' - fullPath: '/ecs/register-task-definition' - preLoaderRoute: typeof AuthEcsclustersRegisterTaskDefinitionRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ecs/(clusters)/create-service': { - id: '/_auth/ecs/(clusters)/create-service' - path: '/ecs/create-service' - fullPath: '/ecs/create-service' - preLoaderRoute: typeof AuthEcsclustersCreateServiceRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(vpc)/create-vpc': { - id: '/_auth/ec2/(vpc)/create-vpc' - path: '/ec2/create-vpc' - fullPath: '/ec2/create-vpc' - preLoaderRoute: typeof AuthEc2vpcCreateVpcRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(volumes)/create-volume': { - id: '/_auth/ec2/(volumes)/create-volume' - path: '/ec2/create-volume' - fullPath: '/ec2/create-volume' - preLoaderRoute: typeof AuthEc2volumesCreateVolumeRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(target-groups)/create-target-group': { - id: '/_auth/ec2/(target-groups)/create-target-group' - path: '/ec2/create-target-group' - fullPath: '/ec2/create-target-group' - preLoaderRoute: typeof AuthEc2targetGroupsCreateTargetGroupRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(subnet)/create-subnet': { - id: '/_auth/ec2/(subnet)/create-subnet' - path: '/ec2/create-subnet' - fullPath: '/ec2/create-subnet' - preLoaderRoute: typeof AuthEc2subnetCreateSubnetRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(snapshots)/create-snapshot': { - id: '/_auth/ec2/(snapshots)/create-snapshot' - path: '/ec2/create-snapshot' - fullPath: '/ec2/create-snapshot' - preLoaderRoute: typeof AuthEc2snapshotsCreateSnapshotRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(security-groups)/create-security-group': { - id: '/_auth/ec2/(security-groups)/create-security-group' - path: '/ec2/create-security-group' - fullPath: '/ec2/create-security-group' - preLoaderRoute: typeof AuthEc2securityGroupsCreateSecurityGroupRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(route-tables)/create-route-table': { - id: '/_auth/ec2/(route-tables)/create-route-table' - path: '/ec2/create-route-table' - fullPath: '/ec2/create-route-table' - preLoaderRoute: typeof AuthEc2routeTablesCreateRouteTableRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(placement-groups)/create-placement-group': { - id: '/_auth/ec2/(placement-groups)/create-placement-group' - path: '/ec2/create-placement-group' - fullPath: '/ec2/create-placement-group' - preLoaderRoute: typeof AuthEc2placementGroupsCreatePlacementGroupRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(nat-gateways)/create-nat-gateway': { - id: '/_auth/ec2/(nat-gateways)/create-nat-gateway' - path: '/ec2/create-nat-gateway' - fullPath: '/ec2/create-nat-gateway' - preLoaderRoute: typeof AuthEc2natGatewaysCreateNatGatewayRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(load-balancers)/create-load-balancer': { - id: '/_auth/ec2/(load-balancers)/create-load-balancer' - path: '/ec2/create-load-balancer' - fullPath: '/ec2/create-load-balancer' - preLoaderRoute: typeof AuthEc2loadBalancersCreateLoadBalancerRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(launch-templates)/create-launch-template': { - id: '/_auth/ec2/(launch-templates)/create-launch-template' - path: '/ec2/create-launch-template' - fullPath: '/ec2/create-launch-template' - preLoaderRoute: typeof AuthEc2launchTemplatesCreateLaunchTemplateRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(key)/import-key-pair': { - id: '/_auth/ec2/(key)/import-key-pair' - path: '/ec2/import-key-pair' - fullPath: '/ec2/import-key-pair' - preLoaderRoute: typeof AuthEc2keyImportKeyPairRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(key)/create-key-pair': { - id: '/_auth/ec2/(key)/create-key-pair' - path: '/ec2/create-key-pair' - fullPath: '/ec2/create-key-pair' - preLoaderRoute: typeof AuthEc2keyCreateKeyPairRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(internet-gateways)/create-internet-gateway': { - id: '/_auth/ec2/(internet-gateways)/create-internet-gateway' - path: '/ec2/create-internet-gateway' - fullPath: '/ec2/create-internet-gateway' - preLoaderRoute: typeof AuthEc2internetGatewaysCreateInternetGatewayRouteImport + '/_auth/ec2/(elastic-ips)/allocate-address': { + id: '/_auth/ec2/(elastic-ips)/allocate-address' + path: '/ec2/allocate-address' + fullPath: '/ec2/allocate-address' + preLoaderRoute: typeof AuthEc2elasticIpsAllocateAddressRouteImport parentRoute: typeof AuthRouteRoute } '/_auth/ec2/(instances)/run-instances': { @@ -1546,11 +1350,207 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthEc2instancesRunInstancesRouteImport parentRoute: typeof AuthRouteRoute } - '/_auth/ec2/(elastic-ips)/allocate-address': { - id: '/_auth/ec2/(elastic-ips)/allocate-address' - path: '/ec2/allocate-address' - fullPath: '/ec2/allocate-address' - preLoaderRoute: typeof AuthEc2elasticIpsAllocateAddressRouteImport + '/_auth/ec2/(internet-gateways)/create-internet-gateway': { + id: '/_auth/ec2/(internet-gateways)/create-internet-gateway' + path: '/ec2/create-internet-gateway' + fullPath: '/ec2/create-internet-gateway' + preLoaderRoute: typeof AuthEc2internetGatewaysCreateInternetGatewayRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(key)/create-key-pair': { + id: '/_auth/ec2/(key)/create-key-pair' + path: '/ec2/create-key-pair' + fullPath: '/ec2/create-key-pair' + preLoaderRoute: typeof AuthEc2keyCreateKeyPairRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(key)/import-key-pair': { + id: '/_auth/ec2/(key)/import-key-pair' + path: '/ec2/import-key-pair' + fullPath: '/ec2/import-key-pair' + preLoaderRoute: typeof AuthEc2keyImportKeyPairRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(launch-templates)/create-launch-template': { + id: '/_auth/ec2/(launch-templates)/create-launch-template' + path: '/ec2/create-launch-template' + fullPath: '/ec2/create-launch-template' + preLoaderRoute: typeof AuthEc2launchTemplatesCreateLaunchTemplateRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(load-balancers)/create-load-balancer': { + id: '/_auth/ec2/(load-balancers)/create-load-balancer' + path: '/ec2/create-load-balancer' + fullPath: '/ec2/create-load-balancer' + preLoaderRoute: typeof AuthEc2loadBalancersCreateLoadBalancerRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(nat-gateways)/create-nat-gateway': { + id: '/_auth/ec2/(nat-gateways)/create-nat-gateway' + path: '/ec2/create-nat-gateway' + fullPath: '/ec2/create-nat-gateway' + preLoaderRoute: typeof AuthEc2natGatewaysCreateNatGatewayRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(placement-groups)/create-placement-group': { + id: '/_auth/ec2/(placement-groups)/create-placement-group' + path: '/ec2/create-placement-group' + fullPath: '/ec2/create-placement-group' + preLoaderRoute: typeof AuthEc2placementGroupsCreatePlacementGroupRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(route-tables)/create-route-table': { + id: '/_auth/ec2/(route-tables)/create-route-table' + path: '/ec2/create-route-table' + fullPath: '/ec2/create-route-table' + preLoaderRoute: typeof AuthEc2routeTablesCreateRouteTableRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(security-groups)/create-security-group': { + id: '/_auth/ec2/(security-groups)/create-security-group' + path: '/ec2/create-security-group' + fullPath: '/ec2/create-security-group' + preLoaderRoute: typeof AuthEc2securityGroupsCreateSecurityGroupRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(snapshots)/create-snapshot': { + id: '/_auth/ec2/(snapshots)/create-snapshot' + path: '/ec2/create-snapshot' + fullPath: '/ec2/create-snapshot' + preLoaderRoute: typeof AuthEc2snapshotsCreateSnapshotRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(subnet)/create-subnet': { + id: '/_auth/ec2/(subnet)/create-subnet' + path: '/ec2/create-subnet' + fullPath: '/ec2/create-subnet' + preLoaderRoute: typeof AuthEc2subnetCreateSubnetRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(target-groups)/create-target-group': { + id: '/_auth/ec2/(target-groups)/create-target-group' + path: '/ec2/create-target-group' + fullPath: '/ec2/create-target-group' + preLoaderRoute: typeof AuthEc2targetGroupsCreateTargetGroupRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(volumes)/create-volume': { + id: '/_auth/ec2/(volumes)/create-volume' + path: '/ec2/create-volume' + fullPath: '/ec2/create-volume' + preLoaderRoute: typeof AuthEc2volumesCreateVolumeRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(vpc)/create-vpc': { + id: '/_auth/ec2/(vpc)/create-vpc' + path: '/ec2/create-vpc' + fullPath: '/ec2/create-vpc' + preLoaderRoute: typeof AuthEc2vpcCreateVpcRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecs/(clusters)/create-service': { + id: '/_auth/ecs/(clusters)/create-service' + path: '/ecs/create-service' + fullPath: '/ecs/create-service' + preLoaderRoute: typeof AuthEcsclustersCreateServiceRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecs/(clusters)/register-task-definition': { + id: '/_auth/ecs/(clusters)/register-task-definition' + path: '/ecs/register-task-definition' + fullPath: '/ecs/register-task-definition' + preLoaderRoute: typeof AuthEcsclustersRegisterTaskDefinitionRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecs/(clusters)/run-task': { + id: '/_auth/ecs/(clusters)/run-task' + path: '/ecs/run-task' + fullPath: '/ecs/run-task' + preLoaderRoute: typeof AuthEcsclustersRunTaskRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecs/(clusters)/task-definitions': { + id: '/_auth/ecs/(clusters)/task-definitions' + path: '/ecs/task-definitions' + fullPath: '/ecs/task-definitions' + preLoaderRoute: typeof AuthEcsclustersTaskDefinitionsRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/eks/(clusters)/create-cluster': { + id: '/_auth/eks/(clusters)/create-cluster' + path: '/eks/create-cluster' + fullPath: '/eks/create-cluster' + preLoaderRoute: typeof AuthEksclustersCreateClusterRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(groups)/create-group': { + id: '/_auth/iam/(groups)/create-group' + path: '/iam/create-group' + fullPath: '/iam/create-group' + preLoaderRoute: typeof AuthIamgroupsCreateGroupRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(instance-profiles)/create-instance-profile': { + id: '/_auth/iam/(instance-profiles)/create-instance-profile' + path: '/iam/create-instance-profile' + fullPath: '/iam/create-instance-profile' + preLoaderRoute: typeof AuthIaminstanceProfilesCreateInstanceProfileRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(policies)/create-policy': { + id: '/_auth/iam/(policies)/create-policy' + path: '/iam/create-policy' + fullPath: '/iam/create-policy' + preLoaderRoute: typeof AuthIampoliciesCreatePolicyRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(roles)/create-role': { + id: '/_auth/iam/(roles)/create-role' + path: '/iam/create-role' + fullPath: '/iam/create-role' + preLoaderRoute: typeof AuthIamrolesCreateRoleRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(users)/create-user': { + id: '/_auth/iam/(users)/create-user' + path: '/iam/create-user' + fullPath: '/iam/create-user' + preLoaderRoute: typeof AuthIamusersCreateUserRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(db-instances)/create-db-instance': { + id: '/_auth/rds/(db-instances)/create-db-instance' + path: '/rds/create-db-instance' + fullPath: '/rds/create-db-instance' + preLoaderRoute: typeof AuthRdsdbInstancesCreateDbInstanceRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(parameter-groups)/create-db-parameter-group': { + id: '/_auth/rds/(parameter-groups)/create-db-parameter-group' + path: '/rds/create-db-parameter-group' + fullPath: '/rds/create-db-parameter-group' + preLoaderRoute: typeof AuthRdsparameterGroupsCreateDbParameterGroupRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(subnet-groups)/create-db-subnet-group': { + id: '/_auth/rds/(subnet-groups)/create-db-subnet-group' + path: '/rds/create-db-subnet-group' + fullPath: '/rds/create-db-subnet-group' + preLoaderRoute: typeof AuthRdssubnetGroupsCreateDbSubnetGroupRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/s3/(buckets)/create-bucket': { + id: '/_auth/s3/(buckets)/create-bucket' + path: '/s3/create-bucket' + fullPath: '/s3/create-bucket' + preLoaderRoute: typeof AuthS3bucketsCreateBucketRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/s3/ls/': { + id: '/_auth/s3/ls/' + path: '/s3/ls' + fullPath: '/s3/ls/' + preLoaderRoute: typeof AuthS3LsIndexRouteImport parentRoute: typeof AuthRouteRoute } '/_auth/s3/ls/$bucket': { @@ -1560,202 +1560,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthS3LsBucketRouteRouteImport parentRoute: typeof AuthRouteRoute } - '/_auth/s3/ls/$bucket/': { - id: '/_auth/s3/ls/$bucket/' - path: '/' - fullPath: '/s3/ls/$bucket/' - preLoaderRoute: typeof AuthS3LsBucketIndexRouteImport - parentRoute: typeof AuthS3LsBucketRouteRoute - } - '/_auth/rds/(subnet-groups)/describe-db-subnet-groups/': { - id: '/_auth/rds/(subnet-groups)/describe-db-subnet-groups/' - path: '/rds/describe-db-subnet-groups' - fullPath: '/rds/describe-db-subnet-groups/' - preLoaderRoute: typeof AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(snapshots)/describe-db-snapshots/': { - id: '/_auth/rds/(snapshots)/describe-db-snapshots/' - path: '/rds/describe-db-snapshots' - fullPath: '/rds/describe-db-snapshots/' - preLoaderRoute: typeof AuthRdssnapshotsDescribeDbSnapshotsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(parameter-groups)/describe-db-parameter-groups/': { - id: '/_auth/rds/(parameter-groups)/describe-db-parameter-groups/' - path: '/rds/describe-db-parameter-groups' - fullPath: '/rds/describe-db-parameter-groups/' - preLoaderRoute: typeof AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(db-instances)/describe-db-instances/': { - id: '/_auth/rds/(db-instances)/describe-db-instances/' - path: '/rds/describe-db-instances' - fullPath: '/rds/describe-db-instances/' - preLoaderRoute: typeof AuthRdsdbInstancesDescribeDbInstancesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(users)/list-users/': { - id: '/_auth/iam/(users)/list-users/' - path: '/iam/list-users' - fullPath: '/iam/list-users/' - preLoaderRoute: typeof AuthIamusersListUsersIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(roles)/list-roles/': { - id: '/_auth/iam/(roles)/list-roles/' - path: '/iam/list-roles' - fullPath: '/iam/list-roles/' - preLoaderRoute: typeof AuthIamrolesListRolesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(policies)/list-policies/': { - id: '/_auth/iam/(policies)/list-policies/' - path: '/iam/list-policies' - fullPath: '/iam/list-policies/' - preLoaderRoute: typeof AuthIampoliciesListPoliciesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(instance-profiles)/list-instance-profiles/': { - id: '/_auth/iam/(instance-profiles)/list-instance-profiles/' - path: '/iam/list-instance-profiles' - fullPath: '/iam/list-instance-profiles/' - preLoaderRoute: typeof AuthIaminstanceProfilesListInstanceProfilesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(groups)/list-groups/': { - id: '/_auth/iam/(groups)/list-groups/' - path: '/iam/list-groups' - fullPath: '/iam/list-groups/' - preLoaderRoute: typeof AuthIamgroupsListGroupsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/eks/(clusters)/list-clusters/': { - id: '/_auth/eks/(clusters)/list-clusters/' - path: '/eks/list-clusters' - fullPath: '/eks/list-clusters/' - preLoaderRoute: typeof AuthEksclustersListClustersIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ecs/(clusters)/list-clusters/': { - id: '/_auth/ecs/(clusters)/list-clusters/' - path: '/ecs/list-clusters' - fullPath: '/ecs/list-clusters/' - preLoaderRoute: typeof AuthEcsclustersListClustersIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ecr/(repositories)/list-repositories/': { - id: '/_auth/ecr/(repositories)/list-repositories/' - path: '/ecr/list-repositories' - fullPath: '/ecr/list-repositories/' - preLoaderRoute: typeof AuthEcrrepositoriesListRepositoriesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(vpc)/describe-vpcs/': { - id: '/_auth/ec2/(vpc)/describe-vpcs/' - path: '/ec2/describe-vpcs' - fullPath: '/ec2/describe-vpcs/' - preLoaderRoute: typeof AuthEc2vpcDescribeVpcsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(volumes)/describe-volumes/': { - id: '/_auth/ec2/(volumes)/describe-volumes/' - path: '/ec2/describe-volumes' - fullPath: '/ec2/describe-volumes/' - preLoaderRoute: typeof AuthEc2volumesDescribeVolumesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(target-groups)/describe-target-groups/': { - id: '/_auth/ec2/(target-groups)/describe-target-groups/' - path: '/ec2/describe-target-groups' - fullPath: '/ec2/describe-target-groups/' - preLoaderRoute: typeof AuthEc2targetGroupsDescribeTargetGroupsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(subnet)/describe-subnets/': { - id: '/_auth/ec2/(subnet)/describe-subnets/' - path: '/ec2/describe-subnets' - fullPath: '/ec2/describe-subnets/' - preLoaderRoute: typeof AuthEc2subnetDescribeSubnetsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(snapshots)/describe-snapshots/': { - id: '/_auth/ec2/(snapshots)/describe-snapshots/' - path: '/ec2/describe-snapshots' - fullPath: '/ec2/describe-snapshots/' - preLoaderRoute: typeof AuthEc2snapshotsDescribeSnapshotsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(security-groups)/describe-security-groups/': { - id: '/_auth/ec2/(security-groups)/describe-security-groups/' - path: '/ec2/describe-security-groups' - fullPath: '/ec2/describe-security-groups/' - preLoaderRoute: typeof AuthEc2securityGroupsDescribeSecurityGroupsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(route-tables)/describe-route-tables/': { - id: '/_auth/ec2/(route-tables)/describe-route-tables/' - path: '/ec2/describe-route-tables' - fullPath: '/ec2/describe-route-tables/' - preLoaderRoute: typeof AuthEc2routeTablesDescribeRouteTablesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(placement-groups)/describe-placement-groups/': { - id: '/_auth/ec2/(placement-groups)/describe-placement-groups/' - path: '/ec2/describe-placement-groups' - fullPath: '/ec2/describe-placement-groups/' - preLoaderRoute: typeof AuthEc2placementGroupsDescribePlacementGroupsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(nat-gateways)/describe-nat-gateways/': { - id: '/_auth/ec2/(nat-gateways)/describe-nat-gateways/' - path: '/ec2/describe-nat-gateways' - fullPath: '/ec2/describe-nat-gateways/' - preLoaderRoute: typeof AuthEc2natGatewaysDescribeNatGatewaysIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(load-balancers)/describe-load-balancers/': { - id: '/_auth/ec2/(load-balancers)/describe-load-balancers/' - path: '/ec2/describe-load-balancers' - fullPath: '/ec2/describe-load-balancers/' - preLoaderRoute: typeof AuthEc2loadBalancersDescribeLoadBalancersIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(launch-templates)/describe-launch-templates/': { - id: '/_auth/ec2/(launch-templates)/describe-launch-templates/' - path: '/ec2/describe-launch-templates' - fullPath: '/ec2/describe-launch-templates/' - preLoaderRoute: typeof AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(key)/describe-key-pairs/': { - id: '/_auth/ec2/(key)/describe-key-pairs/' - path: '/ec2/describe-key-pairs' - fullPath: '/ec2/describe-key-pairs/' - preLoaderRoute: typeof AuthEc2keyDescribeKeyPairsIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(internet-gateways)/describe-internet-gateways/': { - id: '/_auth/ec2/(internet-gateways)/describe-internet-gateways/' - path: '/ec2/describe-internet-gateways' - fullPath: '/ec2/describe-internet-gateways/' - preLoaderRoute: typeof AuthEc2internetGatewaysDescribeInternetGatewaysIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(instances)/describe-instances/': { - id: '/_auth/ec2/(instances)/describe-instances/' - path: '/ec2/describe-instances' - fullPath: '/ec2/describe-instances/' - preLoaderRoute: typeof AuthEc2instancesDescribeInstancesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(images)/describe-images/': { - id: '/_auth/ec2/(images)/describe-images/' - path: '/ec2/describe-images' - fullPath: '/ec2/describe-images/' - preLoaderRoute: typeof AuthEc2imagesDescribeImagesIndexRouteImport - parentRoute: typeof AuthRouteRoute - } '/_auth/ec2/(elastic-ips)/describe-addresses/': { id: '/_auth/ec2/(elastic-ips)/describe-addresses/' path: '/ec2/describe-addresses' @@ -1763,216 +1567,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthEc2elasticIpsDescribeAddressesIndexRouteImport parentRoute: typeof AuthRouteRoute } - '/_auth/s3/ls/$bucket/$': { - id: '/_auth/s3/ls/$bucket/$' - path: '/$' - fullPath: '/s3/ls/$bucket/$' - preLoaderRoute: typeof AuthS3LsBucketSplatRouteImport - parentRoute: typeof AuthS3LsBucketRouteRoute - } - '/_auth/rds/(subnet-groups)/describe-db-subnet-groups/$name': { - id: '/_auth/rds/(subnet-groups)/describe-db-subnet-groups/$name' - path: '/rds/describe-db-subnet-groups/$name' - fullPath: '/rds/describe-db-subnet-groups/$name' - preLoaderRoute: typeof AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id': { - id: '/_auth/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id' - path: '/rds/restore-db-instance-from-db-snapshot/$id' - fullPath: '/rds/restore-db-instance-from-db-snapshot/$id' - preLoaderRoute: typeof AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(snapshots)/describe-db-snapshots/$id': { - id: '/_auth/rds/(snapshots)/describe-db-snapshots/$id' - path: '/rds/describe-db-snapshots/$id' - fullPath: '/rds/describe-db-snapshots/$id' - preLoaderRoute: typeof AuthRdssnapshotsDescribeDbSnapshotsIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(parameter-groups)/describe-db-parameter-groups/$name': { - id: '/_auth/rds/(parameter-groups)/describe-db-parameter-groups/$name' - path: '/rds/describe-db-parameter-groups/$name' - fullPath: '/rds/describe-db-parameter-groups/$name' - preLoaderRoute: typeof AuthRdsparameterGroupsDescribeDbParameterGroupsNameRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/rds/(db-instances)/describe-db-instances/$id': { - id: '/_auth/rds/(db-instances)/describe-db-instances/$id' - path: '/rds/describe-db-instances/$id' - fullPath: '/rds/describe-db-instances/$id' - preLoaderRoute: typeof AuthRdsdbInstancesDescribeDbInstancesIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(users)/list-users/$userName': { - id: '/_auth/iam/(users)/list-users/$userName' - path: '/iam/list-users/$userName' - fullPath: '/iam/list-users/$userName' - preLoaderRoute: typeof AuthIamusersListUsersUserNameRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(roles)/list-roles/$roleName': { - id: '/_auth/iam/(roles)/list-roles/$roleName' - path: '/iam/list-roles/$roleName' - fullPath: '/iam/list-roles/$roleName' - preLoaderRoute: typeof AuthIamrolesListRolesRoleNameRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(policies)/list-policies/$policyArn': { - id: '/_auth/iam/(policies)/list-policies/$policyArn' - path: '/iam/list-policies/$policyArn' - fullPath: '/iam/list-policies/$policyArn' - preLoaderRoute: typeof AuthIampoliciesListPoliciesPolicyArnRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName': { - id: '/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName' - path: '/iam/list-instance-profiles/$instanceProfileName' - fullPath: '/iam/list-instance-profiles/$instanceProfileName' - preLoaderRoute: typeof AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/iam/(groups)/list-groups/$groupName': { - id: '/_auth/iam/(groups)/list-groups/$groupName' - path: '/iam/list-groups/$groupName' - fullPath: '/iam/list-groups/$groupName' - preLoaderRoute: typeof AuthIamgroupsListGroupsGroupNameRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/eks/(clusters)/list-clusters/$clusterName': { - id: '/_auth/eks/(clusters)/list-clusters/$clusterName' - path: '/eks/list-clusters/$clusterName' - fullPath: '/eks/list-clusters/$clusterName' - preLoaderRoute: typeof AuthEksclustersListClustersClusterNameRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ecs/(clusters)/list-clusters/$clusterName': { - id: '/_auth/ecs/(clusters)/list-clusters/$clusterName' - path: '/ecs/list-clusters/$clusterName' - fullPath: '/ecs/list-clusters/$clusterName' - preLoaderRoute: typeof AuthEcsclustersListClustersClusterNameRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ecr/(repositories)/list-repositories/$id': { - id: '/_auth/ecr/(repositories)/list-repositories/$id' - path: '/ecr/list-repositories/$id' - fullPath: '/ecr/list-repositories/$id' - preLoaderRoute: typeof AuthEcrrepositoriesListRepositoriesIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(vpc)/describe-vpcs/$id': { - id: '/_auth/ec2/(vpc)/describe-vpcs/$id' - path: '/ec2/describe-vpcs/$id' - fullPath: '/ec2/describe-vpcs/$id' - preLoaderRoute: typeof AuthEc2vpcDescribeVpcsIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(volumes)/modify-volume/$id': { - id: '/_auth/ec2/(volumes)/modify-volume/$id' - path: '/ec2/modify-volume/$id' - fullPath: '/ec2/modify-volume/$id' - preLoaderRoute: typeof AuthEc2volumesModifyVolumeIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(volumes)/describe-volumes/$id': { - id: '/_auth/ec2/(volumes)/describe-volumes/$id' - path: '/ec2/describe-volumes/$id' - fullPath: '/ec2/describe-volumes/$id' - preLoaderRoute: typeof AuthEc2volumesDescribeVolumesIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(target-groups)/describe-target-groups/$id': { - id: '/_auth/ec2/(target-groups)/describe-target-groups/$id' - path: '/ec2/describe-target-groups/$id' - fullPath: '/ec2/describe-target-groups/$id' - preLoaderRoute: typeof AuthEc2targetGroupsDescribeTargetGroupsIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(subnet)/describe-subnets/$id': { - id: '/_auth/ec2/(subnet)/describe-subnets/$id' - path: '/ec2/describe-subnets/$id' - fullPath: '/ec2/describe-subnets/$id' - preLoaderRoute: typeof AuthEc2subnetDescribeSubnetsIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(snapshots)/describe-snapshots/$id': { - id: '/_auth/ec2/(snapshots)/describe-snapshots/$id' - path: '/ec2/describe-snapshots/$id' - fullPath: '/ec2/describe-snapshots/$id' - preLoaderRoute: typeof AuthEc2snapshotsDescribeSnapshotsIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(security-groups)/describe-security-groups/$id': { - id: '/_auth/ec2/(security-groups)/describe-security-groups/$id' - path: '/ec2/describe-security-groups/$id' - fullPath: '/ec2/describe-security-groups/$id' - preLoaderRoute: typeof AuthEc2securityGroupsDescribeSecurityGroupsIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(route-tables)/describe-route-tables/$id': { - id: '/_auth/ec2/(route-tables)/describe-route-tables/$id' - path: '/ec2/describe-route-tables/$id' - fullPath: '/ec2/describe-route-tables/$id' - preLoaderRoute: typeof AuthEc2routeTablesDescribeRouteTablesIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(placement-groups)/describe-placement-groups/$id': { - id: '/_auth/ec2/(placement-groups)/describe-placement-groups/$id' - path: '/ec2/describe-placement-groups/$id' - fullPath: '/ec2/describe-placement-groups/$id' - preLoaderRoute: typeof AuthEc2placementGroupsDescribePlacementGroupsIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id': { - id: '/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id' - path: '/ec2/describe-nat-gateways/$id' - fullPath: '/ec2/describe-nat-gateways/$id' - preLoaderRoute: typeof AuthEc2natGatewaysDescribeNatGatewaysIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(load-balancers)/describe-load-balancers/$id': { - id: '/_auth/ec2/(load-balancers)/describe-load-balancers/$id' - path: '/ec2/describe-load-balancers/$id' - fullPath: '/ec2/describe-load-balancers/$id' - preLoaderRoute: typeof AuthEc2loadBalancersDescribeLoadBalancersIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(launch-templates)/describe-launch-templates/$id': { - id: '/_auth/ec2/(launch-templates)/describe-launch-templates/$id' - path: '/ec2/describe-launch-templates/$id' - fullPath: '/ec2/describe-launch-templates/$id' - preLoaderRoute: typeof AuthEc2launchTemplatesDescribeLaunchTemplatesIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(key)/describe-key-pairs/$id': { - id: '/_auth/ec2/(key)/describe-key-pairs/$id' - path: '/ec2/describe-key-pairs/$id' - fullPath: '/ec2/describe-key-pairs/$id' - preLoaderRoute: typeof AuthEc2keyDescribeKeyPairsIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id': { - id: '/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id' - path: '/ec2/describe-internet-gateways/$id' - fullPath: '/ec2/describe-internet-gateways/$id' - preLoaderRoute: typeof AuthEc2internetGatewaysDescribeInternetGatewaysIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(instances)/describe-instances/$id': { - id: '/_auth/ec2/(instances)/describe-instances/$id' - path: '/ec2/describe-instances/$id' - fullPath: '/ec2/describe-instances/$id' - preLoaderRoute: typeof AuthEc2instancesDescribeInstancesIdRouteImport - parentRoute: typeof AuthRouteRoute - } - '/_auth/ec2/(images)/describe-images/$id': { - id: '/_auth/ec2/(images)/describe-images/$id' - path: '/ec2/describe-images/$id' - fullPath: '/ec2/describe-images/$id' - preLoaderRoute: typeof AuthEc2imagesDescribeImagesIdRouteImport - parentRoute: typeof AuthRouteRoute - } '/_auth/ec2/(elastic-ips)/describe-addresses/$id': { id: '/_auth/ec2/(elastic-ips)/describe-addresses/$id' path: '/ec2/describe-addresses/$id' @@ -1980,13 +1574,412 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthEc2elasticIpsDescribeAddressesIdRouteImport parentRoute: typeof AuthRouteRoute } - '/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId': { - id: '/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId' - path: '/ecs/list-clusters/$clusterName/tasks/$taskId' - fullPath: '/ecs/list-clusters/$clusterName/tasks/$taskId' - preLoaderRoute: typeof AuthEcsclustersListClustersClusterNameTasksTaskIdRouteImport + '/_auth/ec2/(images)/describe-images/': { + id: '/_auth/ec2/(images)/describe-images/' + path: '/ec2/describe-images' + fullPath: '/ec2/describe-images/' + preLoaderRoute: typeof AuthEc2imagesDescribeImagesIndexRouteImport parentRoute: typeof AuthRouteRoute } + '/_auth/ec2/(images)/describe-images/$id': { + id: '/_auth/ec2/(images)/describe-images/$id' + path: '/ec2/describe-images/$id' + fullPath: '/ec2/describe-images/$id' + preLoaderRoute: typeof AuthEc2imagesDescribeImagesIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(instances)/describe-instances/': { + id: '/_auth/ec2/(instances)/describe-instances/' + path: '/ec2/describe-instances' + fullPath: '/ec2/describe-instances/' + preLoaderRoute: typeof AuthEc2instancesDescribeInstancesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(instances)/describe-instances/$id': { + id: '/_auth/ec2/(instances)/describe-instances/$id' + path: '/ec2/describe-instances/$id' + fullPath: '/ec2/describe-instances/$id' + preLoaderRoute: typeof AuthEc2instancesDescribeInstancesIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(internet-gateways)/describe-internet-gateways/': { + id: '/_auth/ec2/(internet-gateways)/describe-internet-gateways/' + path: '/ec2/describe-internet-gateways' + fullPath: '/ec2/describe-internet-gateways/' + preLoaderRoute: typeof AuthEc2internetGatewaysDescribeInternetGatewaysIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id': { + id: '/_auth/ec2/(internet-gateways)/describe-internet-gateways/$id' + path: '/ec2/describe-internet-gateways/$id' + fullPath: '/ec2/describe-internet-gateways/$id' + preLoaderRoute: typeof AuthEc2internetGatewaysDescribeInternetGatewaysIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(key)/describe-key-pairs/': { + id: '/_auth/ec2/(key)/describe-key-pairs/' + path: '/ec2/describe-key-pairs' + fullPath: '/ec2/describe-key-pairs/' + preLoaderRoute: typeof AuthEc2keyDescribeKeyPairsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(key)/describe-key-pairs/$id': { + id: '/_auth/ec2/(key)/describe-key-pairs/$id' + path: '/ec2/describe-key-pairs/$id' + fullPath: '/ec2/describe-key-pairs/$id' + preLoaderRoute: typeof AuthEc2keyDescribeKeyPairsIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(launch-templates)/describe-launch-templates/': { + id: '/_auth/ec2/(launch-templates)/describe-launch-templates/' + path: '/ec2/describe-launch-templates' + fullPath: '/ec2/describe-launch-templates/' + preLoaderRoute: typeof AuthEc2launchTemplatesDescribeLaunchTemplatesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(launch-templates)/describe-launch-templates/$id': { + id: '/_auth/ec2/(launch-templates)/describe-launch-templates/$id' + path: '/ec2/describe-launch-templates/$id' + fullPath: '/ec2/describe-launch-templates/$id' + preLoaderRoute: typeof AuthEc2launchTemplatesDescribeLaunchTemplatesIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(load-balancers)/describe-load-balancers/': { + id: '/_auth/ec2/(load-balancers)/describe-load-balancers/' + path: '/ec2/describe-load-balancers' + fullPath: '/ec2/describe-load-balancers/' + preLoaderRoute: typeof AuthEc2loadBalancersDescribeLoadBalancersIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(load-balancers)/describe-load-balancers/$id': { + id: '/_auth/ec2/(load-balancers)/describe-load-balancers/$id' + path: '/ec2/describe-load-balancers/$id' + fullPath: '/ec2/describe-load-balancers/$id' + preLoaderRoute: typeof AuthEc2loadBalancersDescribeLoadBalancersIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(nat-gateways)/describe-nat-gateways/': { + id: '/_auth/ec2/(nat-gateways)/describe-nat-gateways/' + path: '/ec2/describe-nat-gateways' + fullPath: '/ec2/describe-nat-gateways/' + preLoaderRoute: typeof AuthEc2natGatewaysDescribeNatGatewaysIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id': { + id: '/_auth/ec2/(nat-gateways)/describe-nat-gateways/$id' + path: '/ec2/describe-nat-gateways/$id' + fullPath: '/ec2/describe-nat-gateways/$id' + preLoaderRoute: typeof AuthEc2natGatewaysDescribeNatGatewaysIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(placement-groups)/describe-placement-groups/': { + id: '/_auth/ec2/(placement-groups)/describe-placement-groups/' + path: '/ec2/describe-placement-groups' + fullPath: '/ec2/describe-placement-groups/' + preLoaderRoute: typeof AuthEc2placementGroupsDescribePlacementGroupsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(placement-groups)/describe-placement-groups/$id': { + id: '/_auth/ec2/(placement-groups)/describe-placement-groups/$id' + path: '/ec2/describe-placement-groups/$id' + fullPath: '/ec2/describe-placement-groups/$id' + preLoaderRoute: typeof AuthEc2placementGroupsDescribePlacementGroupsIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(route-tables)/describe-route-tables/': { + id: '/_auth/ec2/(route-tables)/describe-route-tables/' + path: '/ec2/describe-route-tables' + fullPath: '/ec2/describe-route-tables/' + preLoaderRoute: typeof AuthEc2routeTablesDescribeRouteTablesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(route-tables)/describe-route-tables/$id': { + id: '/_auth/ec2/(route-tables)/describe-route-tables/$id' + path: '/ec2/describe-route-tables/$id' + fullPath: '/ec2/describe-route-tables/$id' + preLoaderRoute: typeof AuthEc2routeTablesDescribeRouteTablesIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(security-groups)/describe-security-groups/': { + id: '/_auth/ec2/(security-groups)/describe-security-groups/' + path: '/ec2/describe-security-groups' + fullPath: '/ec2/describe-security-groups/' + preLoaderRoute: typeof AuthEc2securityGroupsDescribeSecurityGroupsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(security-groups)/describe-security-groups/$id': { + id: '/_auth/ec2/(security-groups)/describe-security-groups/$id' + path: '/ec2/describe-security-groups/$id' + fullPath: '/ec2/describe-security-groups/$id' + preLoaderRoute: typeof AuthEc2securityGroupsDescribeSecurityGroupsIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(snapshots)/describe-snapshots/': { + id: '/_auth/ec2/(snapshots)/describe-snapshots/' + path: '/ec2/describe-snapshots' + fullPath: '/ec2/describe-snapshots/' + preLoaderRoute: typeof AuthEc2snapshotsDescribeSnapshotsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(snapshots)/describe-snapshots/$id': { + id: '/_auth/ec2/(snapshots)/describe-snapshots/$id' + path: '/ec2/describe-snapshots/$id' + fullPath: '/ec2/describe-snapshots/$id' + preLoaderRoute: typeof AuthEc2snapshotsDescribeSnapshotsIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(subnet)/describe-subnets/': { + id: '/_auth/ec2/(subnet)/describe-subnets/' + path: '/ec2/describe-subnets' + fullPath: '/ec2/describe-subnets/' + preLoaderRoute: typeof AuthEc2subnetDescribeSubnetsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(subnet)/describe-subnets/$id': { + id: '/_auth/ec2/(subnet)/describe-subnets/$id' + path: '/ec2/describe-subnets/$id' + fullPath: '/ec2/describe-subnets/$id' + preLoaderRoute: typeof AuthEc2subnetDescribeSubnetsIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(target-groups)/describe-target-groups/': { + id: '/_auth/ec2/(target-groups)/describe-target-groups/' + path: '/ec2/describe-target-groups' + fullPath: '/ec2/describe-target-groups/' + preLoaderRoute: typeof AuthEc2targetGroupsDescribeTargetGroupsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(target-groups)/describe-target-groups/$id': { + id: '/_auth/ec2/(target-groups)/describe-target-groups/$id' + path: '/ec2/describe-target-groups/$id' + fullPath: '/ec2/describe-target-groups/$id' + preLoaderRoute: typeof AuthEc2targetGroupsDescribeTargetGroupsIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(volumes)/describe-volumes/': { + id: '/_auth/ec2/(volumes)/describe-volumes/' + path: '/ec2/describe-volumes' + fullPath: '/ec2/describe-volumes/' + preLoaderRoute: typeof AuthEc2volumesDescribeVolumesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(volumes)/describe-volumes/$id': { + id: '/_auth/ec2/(volumes)/describe-volumes/$id' + path: '/ec2/describe-volumes/$id' + fullPath: '/ec2/describe-volumes/$id' + preLoaderRoute: typeof AuthEc2volumesDescribeVolumesIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(volumes)/modify-volume/$id': { + id: '/_auth/ec2/(volumes)/modify-volume/$id' + path: '/ec2/modify-volume/$id' + fullPath: '/ec2/modify-volume/$id' + preLoaderRoute: typeof AuthEc2volumesModifyVolumeIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(vpc)/describe-vpcs/': { + id: '/_auth/ec2/(vpc)/describe-vpcs/' + path: '/ec2/describe-vpcs' + fullPath: '/ec2/describe-vpcs/' + preLoaderRoute: typeof AuthEc2vpcDescribeVpcsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ec2/(vpc)/describe-vpcs/$id': { + id: '/_auth/ec2/(vpc)/describe-vpcs/$id' + path: '/ec2/describe-vpcs/$id' + fullPath: '/ec2/describe-vpcs/$id' + preLoaderRoute: typeof AuthEc2vpcDescribeVpcsIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecr/(repositories)/list-repositories/': { + id: '/_auth/ecr/(repositories)/list-repositories/' + path: '/ecr/list-repositories' + fullPath: '/ecr/list-repositories/' + preLoaderRoute: typeof AuthEcrrepositoriesListRepositoriesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecr/(repositories)/list-repositories/$id': { + id: '/_auth/ecr/(repositories)/list-repositories/$id' + path: '/ecr/list-repositories/$id' + fullPath: '/ecr/list-repositories/$id' + preLoaderRoute: typeof AuthEcrrepositoriesListRepositoriesIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecs/(clusters)/list-clusters/': { + id: '/_auth/ecs/(clusters)/list-clusters/' + path: '/ecs/list-clusters' + fullPath: '/ecs/list-clusters/' + preLoaderRoute: typeof AuthEcsclustersListClustersIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/ecs/(clusters)/list-clusters/$clusterName': { + id: '/_auth/ecs/(clusters)/list-clusters/$clusterName' + path: '/ecs/list-clusters/$clusterName' + fullPath: '/ecs/list-clusters/$clusterName' + preLoaderRoute: typeof AuthEcsclustersListClustersClusterNameRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/eks/(clusters)/list-clusters/': { + id: '/_auth/eks/(clusters)/list-clusters/' + path: '/eks/list-clusters' + fullPath: '/eks/list-clusters/' + preLoaderRoute: typeof AuthEksclustersListClustersIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/eks/(clusters)/list-clusters/$clusterName': { + id: '/_auth/eks/(clusters)/list-clusters/$clusterName' + path: '/eks/list-clusters/$clusterName' + fullPath: '/eks/list-clusters/$clusterName' + preLoaderRoute: typeof AuthEksclustersListClustersClusterNameRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(groups)/list-groups/': { + id: '/_auth/iam/(groups)/list-groups/' + path: '/iam/list-groups' + fullPath: '/iam/list-groups/' + preLoaderRoute: typeof AuthIamgroupsListGroupsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(groups)/list-groups/$groupName': { + id: '/_auth/iam/(groups)/list-groups/$groupName' + path: '/iam/list-groups/$groupName' + fullPath: '/iam/list-groups/$groupName' + preLoaderRoute: typeof AuthIamgroupsListGroupsGroupNameRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(instance-profiles)/list-instance-profiles/': { + id: '/_auth/iam/(instance-profiles)/list-instance-profiles/' + path: '/iam/list-instance-profiles' + fullPath: '/iam/list-instance-profiles/' + preLoaderRoute: typeof AuthIaminstanceProfilesListInstanceProfilesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName': { + id: '/_auth/iam/(instance-profiles)/list-instance-profiles/$instanceProfileName' + path: '/iam/list-instance-profiles/$instanceProfileName' + fullPath: '/iam/list-instance-profiles/$instanceProfileName' + preLoaderRoute: typeof AuthIaminstanceProfilesListInstanceProfilesInstanceProfileNameRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(policies)/list-policies/': { + id: '/_auth/iam/(policies)/list-policies/' + path: '/iam/list-policies' + fullPath: '/iam/list-policies/' + preLoaderRoute: typeof AuthIampoliciesListPoliciesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(policies)/list-policies/$policyArn': { + id: '/_auth/iam/(policies)/list-policies/$policyArn' + path: '/iam/list-policies/$policyArn' + fullPath: '/iam/list-policies/$policyArn' + preLoaderRoute: typeof AuthIampoliciesListPoliciesPolicyArnRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(roles)/list-roles/': { + id: '/_auth/iam/(roles)/list-roles/' + path: '/iam/list-roles' + fullPath: '/iam/list-roles/' + preLoaderRoute: typeof AuthIamrolesListRolesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(roles)/list-roles/$roleName': { + id: '/_auth/iam/(roles)/list-roles/$roleName' + path: '/iam/list-roles/$roleName' + fullPath: '/iam/list-roles/$roleName' + preLoaderRoute: typeof AuthIamrolesListRolesRoleNameRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(users)/list-users/': { + id: '/_auth/iam/(users)/list-users/' + path: '/iam/list-users' + fullPath: '/iam/list-users/' + preLoaderRoute: typeof AuthIamusersListUsersIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/iam/(users)/list-users/$userName': { + id: '/_auth/iam/(users)/list-users/$userName' + path: '/iam/list-users/$userName' + fullPath: '/iam/list-users/$userName' + preLoaderRoute: typeof AuthIamusersListUsersUserNameRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(db-instances)/describe-db-instances/': { + id: '/_auth/rds/(db-instances)/describe-db-instances/' + path: '/rds/describe-db-instances' + fullPath: '/rds/describe-db-instances/' + preLoaderRoute: typeof AuthRdsdbInstancesDescribeDbInstancesIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(db-instances)/describe-db-instances/$id': { + id: '/_auth/rds/(db-instances)/describe-db-instances/$id' + path: '/rds/describe-db-instances/$id' + fullPath: '/rds/describe-db-instances/$id' + preLoaderRoute: typeof AuthRdsdbInstancesDescribeDbInstancesIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(parameter-groups)/describe-db-parameter-groups/': { + id: '/_auth/rds/(parameter-groups)/describe-db-parameter-groups/' + path: '/rds/describe-db-parameter-groups' + fullPath: '/rds/describe-db-parameter-groups/' + preLoaderRoute: typeof AuthRdsparameterGroupsDescribeDbParameterGroupsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(parameter-groups)/describe-db-parameter-groups/$name': { + id: '/_auth/rds/(parameter-groups)/describe-db-parameter-groups/$name' + path: '/rds/describe-db-parameter-groups/$name' + fullPath: '/rds/describe-db-parameter-groups/$name' + preLoaderRoute: typeof AuthRdsparameterGroupsDescribeDbParameterGroupsNameRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(snapshots)/describe-db-snapshots/': { + id: '/_auth/rds/(snapshots)/describe-db-snapshots/' + path: '/rds/describe-db-snapshots' + fullPath: '/rds/describe-db-snapshots/' + preLoaderRoute: typeof AuthRdssnapshotsDescribeDbSnapshotsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(snapshots)/describe-db-snapshots/$id': { + id: '/_auth/rds/(snapshots)/describe-db-snapshots/$id' + path: '/rds/describe-db-snapshots/$id' + fullPath: '/rds/describe-db-snapshots/$id' + preLoaderRoute: typeof AuthRdssnapshotsDescribeDbSnapshotsIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id': { + id: '/_auth/rds/(snapshots)/restore-db-instance-from-db-snapshot/$id' + path: '/rds/restore-db-instance-from-db-snapshot/$id' + fullPath: '/rds/restore-db-instance-from-db-snapshot/$id' + preLoaderRoute: typeof AuthRdssnapshotsRestoreDbInstanceFromDbSnapshotIdRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(subnet-groups)/describe-db-subnet-groups/': { + id: '/_auth/rds/(subnet-groups)/describe-db-subnet-groups/' + path: '/rds/describe-db-subnet-groups' + fullPath: '/rds/describe-db-subnet-groups/' + preLoaderRoute: typeof AuthRdssubnetGroupsDescribeDbSubnetGroupsIndexRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/rds/(subnet-groups)/describe-db-subnet-groups/$name': { + id: '/_auth/rds/(subnet-groups)/describe-db-subnet-groups/$name' + path: '/rds/describe-db-subnet-groups/$name' + fullPath: '/rds/describe-db-subnet-groups/$name' + preLoaderRoute: typeof AuthRdssubnetGroupsDescribeDbSubnetGroupsNameRouteImport + parentRoute: typeof AuthRouteRoute + } + '/_auth/s3/ls/$bucket/': { + id: '/_auth/s3/ls/$bucket/' + path: '/' + fullPath: '/s3/ls/$bucket/' + preLoaderRoute: typeof AuthS3LsBucketIndexRouteImport + parentRoute: typeof AuthS3LsBucketRouteRoute + } + '/_auth/s3/ls/$bucket/$': { + id: '/_auth/s3/ls/$bucket/$' + path: '/$' + fullPath: '/s3/ls/$bucket/$' + preLoaderRoute: typeof AuthS3LsBucketSplatRouteImport + parentRoute: typeof AuthS3LsBucketRouteRoute + } '/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName': { id: '/_auth/ecs/(clusters)/list-clusters/$clusterName_/services/$serviceName' path: '/ecs/list-clusters/$clusterName/services/$serviceName' @@ -1994,6 +1987,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof AuthEcsclustersListClustersClusterNameServicesServiceNameRouteImport parentRoute: typeof AuthRouteRoute } + '/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId': { + id: '/_auth/ecs/(clusters)/list-clusters/$clusterName_/tasks/$taskId' + path: '/ecs/list-clusters/$clusterName/tasks/$taskId' + fullPath: '/ecs/list-clusters/$clusterName/tasks/$taskId' + preLoaderRoute: typeof AuthEcsclustersListClustersClusterNameTasksTaskIdRouteImport + parentRoute: typeof AuthRouteRoute + } } } diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx index 72bbcc927..cf80a49c8 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/ec2/(instances)/-components/run-instances-page.tsx @@ -230,7 +230,7 @@ export function RunInstancesPage({ // no BlockDeviceMappings (preserves today's backend default). useEffect(() => { setValue("rootDeviceName", selectedRoot.deviceName) - }, [selectedImageId, selectedRoot.deviceName, setValue]) + }, [selectedRoot.deviceName, setValue]) const onSubmit = async (data: CreateInstanceFormData) => { // Launch wholly from the template (plus count). Build params from only the diff --git a/spinifex/services/spinifexui/frontend/src/routes/_auth/rds/(db-instances)/-components/db-instance-detail-page.test.tsx b/spinifex/services/spinifexui/frontend/src/routes/_auth/rds/(db-instances)/-components/db-instance-detail-page.test.tsx index 1ce30f36b..8cb19ab47 100644 --- a/spinifex/services/spinifexui/frontend/src/routes/_auth/rds/(db-instances)/-components/db-instance-detail-page.test.tsx +++ b/spinifex/services/spinifexui/frontend/src/routes/_auth/rds/(db-instances)/-components/db-instance-detail-page.test.tsx @@ -375,16 +375,14 @@ describe("DBInstanceDetailPage", () => { it("refreshes the automated backup status after a modify", async () => { mockSend.mockImplementation(async (command: object) => { if (command.constructor.name === "DescribeDBInstancesCommand") { - return Promise.resolve({ - DBInstances: [{ ...INSTANCE, BackupRetentionPeriod: 0 }], - }) + return { DBInstances: [{ ...INSTANCE, BackupRetentionPeriod: 0 }] } } if ( command.constructor.name === "DescribeDBInstanceAutomatedBackupsCommand" ) { - return Promise.resolve({ DBInstanceAutomatedBackups: [] }) + return { DBInstanceAutomatedBackups: [] } } - return Promise.resolve({}) + return {} }) renderWithClient( , diff --git a/spinifex/services/spinifexui/frontend/vite.config.ts b/spinifex/services/spinifexui/frontend/vite.config.ts index e38a04b5f..be644cb6a 100644 --- a/spinifex/services/spinifexui/frontend/vite.config.ts +++ b/spinifex/services/spinifexui/frontend/vite.config.ts @@ -1,14 +1,13 @@ /// import { fileURLToPath, URL } from "node:url" -import babel from "@rolldown/plugin-babel" import tailwindcss from "@tailwindcss/vite" import { tanstackRouter } from "@tanstack/router-plugin/vite" import basicSsl from "@vitejs/plugin-basic-ssl" -import react, { reactCompilerPreset } from "@vitejs/plugin-react" +import react from "@vitejs/plugin-react" import { defineConfig } from "vite" -export default defineConfig(({ mode }) => ({ +export default defineConfig({ envDir: "../", build: { target: "es2023", @@ -28,8 +27,7 @@ export default defineConfig(({ mode }) => ({ autoCodeSplitting: true, routeFileIgnorePattern: "\\.test\\.(ts|tsx)$", }), - react(), - ...(mode === "test" ? [] : [babel({ presets: [reactCompilerPreset()] })]), + react({ compiler: true }), tailwindcss(), ], resolve: { @@ -60,4 +58,4 @@ export default defineConfig(({ mode }) => ({ }, }, }, -})) +})