mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
feat(ui): NLB support in create/edit load balancer + target group flows (#293)
* feat(ui): NLB support + protocol/type-dependent create-LB fields The Create Load Balancer page was hardcoded to ALB. Add a load-balancer Type selector (application/network) and switch the listener + target-group form options on the selected type, mirroring the server's validation: - ALB: HTTP/HTTPS listeners and target groups. - NLB: TCP/UDP/TLS/TCP_UDP listeners and target groups; no security groups. - Secure protocols (HTTPS/TLS) reveal a certificate selector; HTTPS also a security-policy selector. Cert is required for both; SSL policy is HTTPS-only. - The default target-group protocol + health-check protocol stay in sync with the listener (TCP health checks omit HTTP path/matcher). - The wizard mutation now sends the chosen Type and threads cert/SSL-policy through CreateListener (previously hardcoded Type=application and dropped certificates). * feat(ui): NLB-aware target groups and LB detail Standalone Create Target Group offers the full protocol set (HTTP/HTTPS/TCP/UDP/TLS/TCP_UDP) and syncs the health check to TCP for L4 groups, dropping path/matcher from the request and CLI preview. Hide the Security groups tab on the load balancer detail page for network LBs.
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{Co as s,I as c,Oo as l,Ua as u,Va as d,Wa as f,Ya as p,h as m,xo as h}from"./index.js";var g=h(),_=l();function v(){let l=(0,g.c)(24),{bucket:h,_splat:v}=m.useParams(),y=u(v??``),{data:b}=t(c(h,y)),x=o(),S;l[0]===b.Contents?S=l[1]:(S=b.Contents??[],l[0]=b.Contents,l[1]=S);let C=S,w;l[2]===b.CommonPrefixes?w=l[3]:(w=b.CommonPrefixes??[],l[2]=b.CommonPrefixes,l[3]=w);let T=w,E=y.split(`/`).filter(Boolean),D=[{name:h,path:`/s3/ls/${h}`},...E.map((e,t)=>({name:e,path:`/s3/ls/${h}/${`${E.slice(0,t+1).join(`/`)}/`}`}))],O=E.length>1?`/s3/ls/${h}/${E.slice(0,-1).join(`/`)}/`:`/s3/ls/${h}`,k;l[4]===O?k=l[5]:(k=(0,_.jsx)(n,{to:O,children:`Back`}),l[4]=O,l[5]=k);let A;l[6]!==h||l[7]!==y||l[8]!==x.isPending||l[9]!==x.mutateAsync?(A=(0,_.jsx)(a,{bucket:h,isPending:x.isPending,onUpload:x.mutateAsync,prefix:y}),l[6]=h,l[7]=y,l[8]=x.isPending,l[9]=x.mutateAsync,l[10]=A):A=l[10];let j;l[11]===x.error?j=l[12]:(j=x.error&&(0,_.jsx)(e,{error:x.error,msg:`Failed to upload object`}),l[11]=x.error,l[12]=j);let M;l[13]!==h||l[14]!==T||l[15]!==y?(M=T.length>0&&(0,_.jsxs)(`div`,{className:`mb-6`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,_.jsx)(`div`,{className:`space-y-2`,children:T.map(e=>e.Prefix?(0,_.jsx)(i,{bucketName:h,folderName:p(f(e.Prefix,y)),fullPrefix:d(e.Prefix,y)},e.Prefix):null)})]}),l[13]=h,l[14]=T,l[15]=y,l[16]=M):M=l[16];let N;l[17]!==h||l[18]!==C||l[19]!==y?(N=C.length>0&&(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),C.map(e=>e.Key?(0,_.jsx)(r,{bucketName:h,displayName:f(e.Key,y),fullKey:d(e.Key,y),object:e},e.Key):null)]}),l[17]=h,l[18]=C,l[19]=y,l[20]=N):N=l[20];let P;return l[21]!==T.length||l[22]!==C.length?(P=C.length===0&&T.length===0&&(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this folder.`}),l[21]=T.length,l[22]=C.length,l[23]=P):P=l[23],(0,_.jsxs)(_.Fragment,{children:[k,(0,_.jsx)(`div`,{className:`mb-6`,children:(0,_.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,_.jsx)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:D.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t>0&&(0,_.jsx)(`span`,{children:`/`}),t===D.length-1?(0,_.jsx)(`span`,{className:`text-foreground`,children:e.name}):(0,_.jsx)(s,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{Eo as s,Ha as c,L as l,Va as u,h as d,qa as f,xo as p,yo as m,za as h}from"./index.js";var g=m(),_=s();function v(){let s=(0,g.c)(24),{bucket:m,_splat:v}=d.useParams(),y=u(v??``),{data:b}=t(l(m,y)),x=o(),S;s[0]===b.Contents?S=s[1]:(S=b.Contents??[],s[0]=b.Contents,s[1]=S);let C=S,w;s[2]===b.CommonPrefixes?w=s[3]:(w=b.CommonPrefixes??[],s[2]=b.CommonPrefixes,s[3]=w);let T=w,E=y.split(`/`).filter(Boolean),D=[{name:m,path:`/s3/ls/${m}`},...E.map((e,t)=>({name:e,path:`/s3/ls/${m}/${`${E.slice(0,t+1).join(`/`)}/`}`}))],O=E.length>1?`/s3/ls/${m}/${E.slice(0,-1).join(`/`)}/`:`/s3/ls/${m}`,k;s[4]===O?k=s[5]:(k=(0,_.jsx)(n,{to:O,children:`Back`}),s[4]=O,s[5]=k);let A;s[6]!==m||s[7]!==y||s[8]!==x.isPending||s[9]!==x.mutateAsync?(A=(0,_.jsx)(a,{bucket:m,isPending:x.isPending,onUpload:x.mutateAsync,prefix:y}),s[6]=m,s[7]=y,s[8]=x.isPending,s[9]=x.mutateAsync,s[10]=A):A=s[10];let j;s[11]===x.error?j=s[12]:(j=x.error&&(0,_.jsx)(e,{error:x.error,msg:`Failed to upload object`}),s[11]=x.error,s[12]=j);let M;s[13]!==m||s[14]!==T||s[15]!==y?(M=T.length>0&&(0,_.jsxs)(`div`,{className:`mb-6`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,_.jsx)(`div`,{className:`space-y-2`,children:T.map(e=>e.Prefix?(0,_.jsx)(i,{bucketName:m,folderName:f(c(e.Prefix,y)),fullPrefix:h(e.Prefix,y)},e.Prefix):null)})]}),s[13]=m,s[14]=T,s[15]=y,s[16]=M):M=s[16];let N;s[17]!==m||s[18]!==C||s[19]!==y?(N=C.length>0&&(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),C.map(e=>e.Key?(0,_.jsx)(r,{bucketName:m,displayName:c(e.Key,y),fullKey:h(e.Key,y),object:e},e.Key):null)]}),s[17]=m,s[18]=C,s[19]=y,s[20]=N):N=s[20];let P;return s[21]!==T.length||s[22]!==C.length?(P=C.length===0&&T.length===0&&(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this folder.`}),s[21]=T.length,s[22]=C.length,s[23]=P):P=s[23],(0,_.jsxs)(_.Fragment,{children:[k,(0,_.jsx)(`div`,{className:`mb-6`,children:(0,_.jsxs)(`div`,{className:`mb-2 flex items-center justify-between`,children:[(0,_.jsx)(`div`,{className:`flex items-center gap-2 text-sm text-muted-foreground`,children:D.map((e,t)=>(0,_.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t>0&&(0,_.jsx)(`span`,{children:`/`}),t===D.length-1?(0,_.jsx)(`span`,{className:`text-foreground`,children:e.name}):(0,_.jsx)(p,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{C as s,I as c,Oo as l,Ya as u,xo as d}from"./index.js";import{t as f}from"./page-heading.js";var p=d(),m=l();function h(){let l=(0,p.c)(31),{bucket:d}=s.useParams(),h;l[0]===d?h=l[1]:(h=c(d),l[0]=d,l[1]=h);let{data:g}=t(h),_=o(),v;l[2]===g.Contents?v=l[3]:(v=g.Contents??[],l[2]=g.Contents,l[3]=v);let y=v,b;l[4]===g.CommonPrefixes?b=l[5]:(b=g.CommonPrefixes??[],l[4]=g.CommonPrefixes,l[5]=b);let x=b,S;l[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,m.jsx)(n,{to:`/s3/ls`,children:`Back to buckets`}),l[6]=S):S=l[6];let C;l[7]!==d||l[8]!==_.isPending||l[9]!==_.mutateAsync?(C=(0,m.jsx)(a,{bucket:d,isPending:_.isPending,onUpload:_.mutateAsync}),l[7]=d,l[8]=_.isPending,l[9]=_.mutateAsync,l[10]=C):C=l[10];let w;l[11]!==d||l[12]!==C?(w=(0,m.jsx)(f,{actions:C,title:d}),l[11]=d,l[12]=C,l[13]=w):w=l[13];let T;l[14]===_.error?T=l[15]:(T=_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to upload object`}),l[14]=_.error,l[15]=T);let E;l[16]!==d||l[17]!==x?(E=x.length>0&&(0,m.jsxs)(`div`,{className:`mb-6`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,m.jsx)(`div`,{className:`space-y-2`,children:x.map(e=>e.Prefix?(0,m.jsx)(i,{bucketName:d,folderName:u(e.Prefix),fullPrefix:e.Prefix},e.Prefix):null)})]}),l[16]=d,l[17]=x,l[18]=E):E=l[18];let D;l[19]!==d||l[20]!==y?(D=y.length>0&&(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),y.map(e=>e.Key?(0,m.jsx)(r,{bucketName:d,displayName:e.Key,fullKey:e.Key,object:e},e.Key):null)]}),l[19]=d,l[20]=y,l[21]=D):D=l[21];let O;l[22]!==x.length||l[23]!==y.length?(O=y.length===0&&x.length===0&&(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this bucket.`}),l[22]=x.length,l[23]=y.length,l[24]=O):O=l[24];let k;return l[25]!==w||l[26]!==T||l[27]!==E||l[28]!==D||l[29]!==O?(k=(0,m.jsxs)(m.Fragment,{children:[S,w,T,E,D,O]}),l[25]=w,l[26]=T,l[27]=E,l[28]=D,l[29]=O,l[30]=k):k=l[30],k}export{h as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{C as s,Eo as c,L as l,qa as u,yo as d}from"./index.js";import{t as f}from"./page-heading.js";var p=d(),m=c();function h(){let c=(0,p.c)(31),{bucket:d}=s.useParams(),h;c[0]===d?h=c[1]:(h=l(d),c[0]=d,c[1]=h);let{data:g}=t(h),_=o(),v;c[2]===g.Contents?v=c[3]:(v=g.Contents??[],c[2]=g.Contents,c[3]=v);let y=v,b;c[4]===g.CommonPrefixes?b=c[5]:(b=g.CommonPrefixes??[],c[4]=g.CommonPrefixes,c[5]=b);let x=b,S;c[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,m.jsx)(n,{to:`/s3/ls`,children:`Back to buckets`}),c[6]=S):S=c[6];let C;c[7]!==d||c[8]!==_.isPending||c[9]!==_.mutateAsync?(C=(0,m.jsx)(a,{bucket:d,isPending:_.isPending,onUpload:_.mutateAsync}),c[7]=d,c[8]=_.isPending,c[9]=_.mutateAsync,c[10]=C):C=c[10];let w;c[11]!==d||c[12]!==C?(w=(0,m.jsx)(f,{actions:C,title:d}),c[11]=d,c[12]=C,c[13]=w):w=c[13];let T;c[14]===_.error?T=c[15]:(T=_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to upload object`}),c[14]=_.error,c[15]=T);let E;c[16]!==d||c[17]!==x?(E=x.length>0&&(0,m.jsxs)(`div`,{className:`mb-6`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Folders`}),(0,m.jsx)(`div`,{className:`space-y-2`,children:x.map(e=>e.Prefix?(0,m.jsx)(i,{bucketName:d,folderName:u(e.Prefix),fullPrefix:e.Prefix},e.Prefix):null)})]}),c[16]=d,c[17]=x,c[18]=E):E=c[18];let D;c[19]!==d||c[20]!==y?(D=y.length>0&&(0,m.jsxs)(`div`,{className:`space-y-2`,children:[(0,m.jsx)(`h2`,{className:`mb-3 text-lg font-semibold`,children:`Objects`}),y.map(e=>e.Key?(0,m.jsx)(r,{bucketName:d,displayName:e.Key,fullKey:e.Key,object:e},e.Key):null)]}),c[19]=d,c[20]=y,c[21]=D):D=c[21];let O;c[22]!==x.length||c[23]!==y.length?(O=y.length===0&&x.length===0&&(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this bucket.`}),c[22]=x.length,c[23]=y.length,c[24]=O):O=c[24];let k;return c[25]!==w||c[26]!==T||c[27]!==E||c[28]!==D||c[29]!==O?(k=(0,m.jsxs)(m.Fragment,{children:[S,w,T,E,D,O]}),c[25]=w,c[26]=T,c[27]=E,c[28]=D,c[29]=O,c[30]=k):k=c[30],k}export{h as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{t}from"./back-link.js";import{Oo as n,t as r,xo as i,z as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./system-managed.js";import{t as l}from"./ami-details.js";var u=i(),d=n();function f(){let n=(0,u.c)(14),{id:i}=r.useParams(),f;n[0]===i?f=n[1]:(f=a(i),n[0]=i,n[1]=f);let{data:p}=e(f),m=p?.Images?.[0];if(!m?.ImageId||c(m)){let e;return n[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t,{to:`/ec2/describe-images`,children:`Back to images`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]}),n[2]=e):e=n[2],e}let h;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(t,{to:`/ec2/describe-images`,children:`Back to images`}),n[3]=h):h=n[3];let g;n[4]===m.State?g=n[5]:(g=(0,d.jsx)(s,{state:m.State}),n[4]=m.State,n[5]=g);let _;n[6]!==m.ImageId||n[7]!==g?(_=(0,d.jsx)(o,{actions:g,subtitle:`Image Details`,title:m.ImageId}),n[6]=m.ImageId,n[7]=g,n[8]=_):_=n[8];let v;n[9]===m?v=n[10]:(v=(0,d.jsx)(l,{image:m,showExtendedDetails:!0}),n[9]=m,n[10]=v);let y;return n[11]!==_||n[12]!==v?(y=(0,d.jsxs)(d.Fragment,{children:[h,(0,d.jsxs)(`div`,{className:`space-y-6`,children:[_,v]})]}),n[11]=_,n[12]=v,n[13]=y):y=n[13],y}export{f as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{t}from"./back-link.js";import{B as n,Eo as r,t as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./system-managed.js";import{t as l}from"./ami-details.js";var u=a(),d=r();function f(){let r=(0,u.c)(14),{id:a}=i.useParams(),f;r[0]===a?f=r[1]:(f=n(a),r[0]=a,r[1]=f);let{data:p}=e(f),m=p?.Images?.[0];if(!m?.ImageId||c(m)){let e;return r[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(t,{to:`/ec2/describe-images`,children:`Back to images`}),(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]}),r[2]=e):e=r[2],e}let h;r[3]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(t,{to:`/ec2/describe-images`,children:`Back to images`}),r[3]=h):h=r[3];let g;r[4]===m.State?g=r[5]:(g=(0,d.jsx)(s,{state:m.State}),r[4]=m.State,r[5]=g);let _;r[6]!==m.ImageId||r[7]!==g?(_=(0,d.jsx)(o,{actions:g,subtitle:`Image Details`,title:m.ImageId}),r[6]=m.ImageId,r[7]=g,r[8]=_):_=r[8];let v;r[9]===m?v=r[10]:(v=(0,d.jsx)(l,{image:m,showExtendedDetails:!0}),r[9]=m,r[10]=v);let y;return r[11]!==_||r[12]!==v?(y=(0,d.jsxs)(d.Fragment,{children:[h,(0,d.jsxs)(`div`,{className:`space-y-6`,children:[_,v]})]}),r[11]=_,r[12]=v,r[13]=y):y=r[13],y}export{f as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{E as r}from"./ec2.js";import{Oo as i,d as a,tt as o,wo as s,xo as c,zi as l}from"./index.js";import{t as u}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{i as m,t as h}from"./zod.js";import{d as g}from"./ec22.js";import{t as _}from"./form-actions.js";var v=c(),y=i();function b(){let i=(0,v.c)(53),{id:c}=a.useParams(),b=s(),x;i[0]===c?x=i[1]:(x=o(c),i[0]=c,i[1]=x);let{data:S}=t(x),C=S.Volumes?.[0],w=C?.VolumeId,T=r(),E=C?.Size??1,D;i[2]===E?D=i[3]:(D=h(g.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),i[2]=E,i[3]=D);let O;i[4]===E?O=i[5]:(O={size:E},i[4]=E,i[5]=O);let k;i[6]!==D||i[7]!==O?(k={resolver:D,defaultValues:O},i[6]=D,i[7]=O,i[8]=k):k=i[8];let{handleSubmit:A,register:j,formState:M}=m(k),{errors:N,isSubmitting:P}=M;if(!w){let e;return i[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(n,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),i[9]=e):e=i[9],e}let F;i[10]!==T||i[11]!==b||i[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},i[10]=T,i[11]=b,i[12]=w,i[13]=F):F=i[13];let I=F,L,R;i[14]===w?(L=i[15],R=i[16]):(L=(0,y.jsx)(n,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(u,{subtitle:w,title:`Resize Volume`}),i[14]=w,i[15]=L,i[16]=R);let z;i[17]===T.error?z=i[18]:(z=T.error&&(0,y.jsx)(e,{error:T.error,msg:`Failed to resize volume`}),i[17]=T.error,i[18]=z);let B;i[19]!==A||i[20]!==I?(B=A(I),i[19]=A,i[20]=I,i[21]=B):B=i[21];let V;i[22]===E?V=i[23]:(V=(0,y.jsx)(`div`,{className:`space-y-2`,children:(0,y.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Current size: `,E,` GiB`]})}),i[22]=E,i[23]=V);let H;i[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(d,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),i[24]=H):H=i[24];let U=!!N.size,W=E+1,G;i[25]===j?G=i[26]:(G=j(`size`,{valueAsNumber:!0}),i[25]=j,i[26]=G);let K;i[27]!==U||i[28]!==W||i[29]!==G?(K=(0,y.jsx)(l,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),i[27]=U,i[28]=W,i[29]=G,i[30]=K):K=i[30];let q;i[31]===N.size?q=i[32]:(q=(0,y.jsx)(f,{errors:[N.size]}),i[31]=N.size,i[32]=q);let J;i[33]!==K||i[34]!==q?(J=(0,y.jsxs)(p,{children:[H,K,q]}),i[33]=K,i[34]=q,i[35]=J):J=i[35];let Y;i[36]!==b||i[37]!==w?(Y=async()=>await b({to:`/ec2/describe-volumes/$id`,params:{id:w}}),i[36]=b,i[37]=w,i[38]=Y):Y=i[38];let X;i[39]!==P||i[40]!==T.isPending||i[41]!==Y?(X=(0,y.jsx)(_,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),i[39]=P,i[40]=T.isPending,i[41]=Y,i[42]=X):X=i[42];let Z;i[43]!==V||i[44]!==J||i[45]!==X||i[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),i[43]=V,i[44]=J,i[45]=X,i[46]=B,i[47]=Z):Z=i[47];let Q;return i[48]!==Z||i[49]!==L||i[50]!==R||i[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),i[48]=Z,i[49]=L,i[50]=R,i[51]=z,i[52]=Q):Q=i[52],Q}export{b as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{E as r}from"./ec2.js";import{Eo as i,Li as a,So as o,d as s,nt as c,yo as l}from"./index.js";import{t as u}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{i as m,t as h}from"./zod.js";import{d as g}from"./ec22.js";import{t as _}from"./form-actions.js";var v=l(),y=i();function b(){let i=(0,v.c)(53),{id:l}=s.useParams(),b=o(),x;i[0]===l?x=i[1]:(x=c(l),i[0]=l,i[1]=x);let{data:S}=t(x),C=S.Volumes?.[0],w=C?.VolumeId,T=r(),E=C?.Size??1,D;i[2]===E?D=i[3]:(D=h(g.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),i[2]=E,i[3]=D);let O;i[4]===E?O=i[5]:(O={size:E},i[4]=E,i[5]=O);let k;i[6]!==D||i[7]!==O?(k={resolver:D,defaultValues:O},i[6]=D,i[7]=O,i[8]=k):k=i[8];let{handleSubmit:A,register:j,formState:M}=m(k),{errors:N,isSubmitting:P}=M;if(!w){let e;return i[9]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(n,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),i[9]=e):e=i[9],e}let F;i[10]!==T||i[11]!==b||i[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},i[10]=T,i[11]=b,i[12]=w,i[13]=F):F=i[13];let I=F,L,R;i[14]===w?(L=i[15],R=i[16]):(L=(0,y.jsx)(n,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(u,{subtitle:w,title:`Resize Volume`}),i[14]=w,i[15]=L,i[16]=R);let z;i[17]===T.error?z=i[18]:(z=T.error&&(0,y.jsx)(e,{error:T.error,msg:`Failed to resize volume`}),i[17]=T.error,i[18]=z);let B;i[19]!==A||i[20]!==I?(B=A(I),i[19]=A,i[20]=I,i[21]=B):B=i[21];let V;i[22]===E?V=i[23]:(V=(0,y.jsx)(`div`,{className:`space-y-2`,children:(0,y.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Current size: `,E,` GiB`]})}),i[22]=E,i[23]=V);let H;i[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(d,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),i[24]=H):H=i[24];let U=!!N.size,W=E+1,G;i[25]===j?G=i[26]:(G=j(`size`,{valueAsNumber:!0}),i[25]=j,i[26]=G);let K;i[27]!==U||i[28]!==W||i[29]!==G?(K=(0,y.jsx)(a,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),i[27]=U,i[28]=W,i[29]=G,i[30]=K):K=i[30];let q;i[31]===N.size?q=i[32]:(q=(0,y.jsx)(f,{errors:[N.size]}),i[31]=N.size,i[32]=q);let J;i[33]!==K||i[34]!==q?(J=(0,y.jsxs)(p,{children:[H,K,q]}),i[33]=K,i[34]=q,i[35]=J):J=i[35];let Y;i[36]!==b||i[37]!==w?(Y=async()=>await b({to:`/ec2/describe-volumes/$id`,params:{id:w}}),i[36]=b,i[37]=w,i[38]=Y):Y=i[38];let X;i[39]!==P||i[40]!==T.isPending||i[41]!==Y?(X=(0,y.jsx)(_,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),i[39]=P,i[40]=T.isPending,i[41]=Y,i[42]=X):X=i[42];let Z;i[43]!==V||i[44]!==J||i[45]!==X||i[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),i[43]=V,i[44]=J,i[45]=X,i[46]=B,i[47]=Z):Z=i[47];let Q;return i[48]!==Z||i[49]!==L||i[50]!==R||i[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),i[48]=Z,i[49]=L,i[50]=R,i[51]=z,i[52]=Q):Q=i[52],Q}export{b as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{x as i}from"./ec2.js";import{Co as a,Ja as o,Jo as s,Oo as c,et as l,f as u,ko as d,rt as f,wo as p,za as m}from"./index.js";import{t as h}from"./page-heading.js";import{t as g}from"./state-badge.js";import{n as _,t as v}from"./detail-row.js";import{t as y}from"./delete-confirmation-dialog.js";var b=s(d()),x=c();function S(){let{id:s}=u.useParams(),c=p(),{data:d}=t(f(s)),{data:S}=t(l),C=d.Vpcs?.[0],w=i(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(e=>e.VpcId===s)??[],O=async()=>{try{await w.mutateAsync(s),c({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=o(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(e,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(m,{onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(r,{className:`size-4`}),`Delete`]}),(0,x.jsx)(g,{state:C.State})]}),subtitle:`VPC Details`,title:k?`${C.VpcId} (${k})`:C.VpcId}),(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`VPC Information`}),(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`VPC ID`,value:C.VpcId}),(0,x.jsx)(v,{label:`State`,value:C.State}),(0,x.jsx)(v,{label:`CIDR Block`,value:C.CidrBlock}),(0,x.jsx)(v,{label:`Is Default`,value:C.IsDefault?`Yes`:`No`}),(0,x.jsx)(v,{label:`DHCP Options ID`,value:C.DhcpOptionsId}),(0,x.jsx)(v,{label:`Instance Tenancy`,value:C.InstanceTenancy}),(0,x.jsx)(v,{label:`Owner ID`,value:C.OwnerId})]})]}),D.length>0&&(0,x.jsxs)(_,{children:[(0,x.jsxs)(_.Header,{children:[`Subnets (`,D.length,`)`]}),D.map(e=>e.SubnetId?(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`Subnet ID`,value:(0,x.jsx)(a,{className:`text-primary hover:underline`,params:{id:e.SubnetId},to:`/ec2/describe-subnets/$id`,children:e.SubnetId})}),(0,x.jsx)(v,{label:`CIDR Block`,value:e.CidrBlock}),(0,x.jsx)(v,{label:`Availability Zone`,value:e.AvailabilityZone}),(0,x.jsx)(v,{label:`State`,value:e.State})]},e.SubnetId):null)]})]}),(0,x.jsx)(y,{description:`Are you sure you want to delete the VPC "${C.VpcId}"? This action cannot be undone. The VPC must have no associated subnets or internet gateways.`,isPending:w.isPending,onConfirm:O,onOpenChange:E,open:T,title:`Delete VPC`})]})}export{S as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{x as i}from"./ec2.js";import{Do as a,Eo as o,Ka as s,Ko as c,La as l,So as u,f as d,it as f,tt as p,xo as m}from"./index.js";import{t as h}from"./page-heading.js";import{t as g}from"./state-badge.js";import{n as _,t as v}from"./detail-row.js";import{t as y}from"./delete-confirmation-dialog.js";var b=c(a()),x=o();function S(){let{id:a}=d.useParams(),o=u(),{data:c}=t(f(a)),{data:S}=t(p),C=c.Vpcs?.[0],w=i(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(e=>e.VpcId===a)??[],O=async()=>{try{await w.mutateAsync(a),o({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=s(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(e,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(l,{onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(r,{className:`size-4`}),`Delete`]}),(0,x.jsx)(g,{state:C.State})]}),subtitle:`VPC Details`,title:k?`${C.VpcId} (${k})`:C.VpcId}),(0,x.jsxs)(_,{children:[(0,x.jsx)(_.Header,{children:`VPC Information`}),(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`VPC ID`,value:C.VpcId}),(0,x.jsx)(v,{label:`State`,value:C.State}),(0,x.jsx)(v,{label:`CIDR Block`,value:C.CidrBlock}),(0,x.jsx)(v,{label:`Is Default`,value:C.IsDefault?`Yes`:`No`}),(0,x.jsx)(v,{label:`DHCP Options ID`,value:C.DhcpOptionsId}),(0,x.jsx)(v,{label:`Instance Tenancy`,value:C.InstanceTenancy}),(0,x.jsx)(v,{label:`Owner ID`,value:C.OwnerId})]})]}),D.length>0&&(0,x.jsxs)(_,{children:[(0,x.jsxs)(_.Header,{children:[`Subnets (`,D.length,`)`]}),D.map(e=>e.SubnetId?(0,x.jsxs)(_.Content,{children:[(0,x.jsx)(v,{label:`Subnet ID`,value:(0,x.jsx)(m,{className:`text-primary hover:underline`,params:{id:e.SubnetId},to:`/ec2/describe-subnets/$id`,children:e.SubnetId})}),(0,x.jsx)(v,{label:`CIDR Block`,value:e.CidrBlock}),(0,x.jsx)(v,{label:`Availability Zone`,value:e.AvailabilityZone}),(0,x.jsx)(v,{label:`State`,value:e.State})]},e.SubnetId):null)]})]}),(0,x.jsx)(y,{description:`Are you sure you want to delete the VPC "${C.VpcId}"? This action cannot be undone. The VPC must have no associated subnets or internet gateways.`,isPending:w.isPending,onConfirm:O,onOpenChange:E,open:T,title:`Delete VPC`})]})}export{S as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{h as i}from"./ec2.js";import{Ga as a,Jo as o,Oo as s,W as c,ko as l,r as u,wo as d,za as f}from"./index.js";import{t as p}from"./page-heading.js";import{n as m,t as h}from"./detail-row.js";import{t as g}from"./delete-confirmation-dialog.js";var _=o(l()),v=s();function y(){let{id:o}=u.useParams(),s=d(),{data:l}=t(c(o)),y=l.KeyPairs?.[0],b=i(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(o),s({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=a(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(e,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(p,{actions:(0,v.jsxs)(f,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(r,{className:`size-4`}),`Delete`]}),subtitle:`Key Pair Details`,title:y.KeyName??``}),(0,v.jsxs)(m,{children:[(0,v.jsx)(m.Header,{children:`Key Pair Information`}),(0,v.jsxs)(m.Content,{children:[(0,v.jsx)(h,{label:`Key Pair ID`,value:y.KeyPairId}),(0,v.jsx)(h,{label:`Key Name`,value:y.KeyName}),(0,v.jsx)(h,{label:`Key Type`,value:y.KeyType}),(0,v.jsx)(h,{label:`Key Fingerprint`,value:y.KeyFingerprint}),(0,v.jsx)(h,{label:`Creation Date`,value:w})]})]}),y.Tags&&y.Tags.length>0&&(0,v.jsxs)(m,{children:[(0,v.jsx)(m.Header,{children:`Tags`}),(0,v.jsx)(m.Content,{children:y.Tags.map(e=>(0,v.jsx)(h,{label:e.Key??``,value:e.Value},e.Key))})]})]}),(0,v.jsx)(g,{description:`Are you sure you want to delete the key pair "${y.KeyName}"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.`,isPending:b.isPending,onConfirm:C,onOpenChange:S,open:x,title:`Delete Key Pair`})]})}export{y as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{h as i}from"./ec2.js";import{Do as a,Eo as o,G as s,Ko as c,La as l,So as u,Ua as d,r as f}from"./index.js";import{t as p}from"./page-heading.js";import{n as m,t as h}from"./detail-row.js";import{t as g}from"./delete-confirmation-dialog.js";var _=c(a()),v=o();function y(){let{id:a}=f.useParams(),o=u(),{data:c}=t(s(a)),y=c.KeyPairs?.[0],b=i(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(a),o({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=d(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(n,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(e,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(p,{actions:(0,v.jsxs)(l,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(r,{className:`size-4`}),`Delete`]}),subtitle:`Key Pair Details`,title:y.KeyName??``}),(0,v.jsxs)(m,{children:[(0,v.jsx)(m.Header,{children:`Key Pair Information`}),(0,v.jsxs)(m.Content,{children:[(0,v.jsx)(h,{label:`Key Pair ID`,value:y.KeyPairId}),(0,v.jsx)(h,{label:`Key Name`,value:y.KeyName}),(0,v.jsx)(h,{label:`Key Type`,value:y.KeyType}),(0,v.jsx)(h,{label:`Key Fingerprint`,value:y.KeyFingerprint}),(0,v.jsx)(h,{label:`Creation Date`,value:w})]})]}),y.Tags&&y.Tags.length>0&&(0,v.jsxs)(m,{children:[(0,v.jsx)(m.Header,{children:`Tags`}),(0,v.jsx)(m.Content,{children:y.Tags.map(e=>(0,v.jsx)(h,{label:e.Key??``,value:e.Value},e.Key))})]})]}),(0,v.jsx)(g,{description:`Are you sure you want to delete the key pair "${y.KeyName}"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.`,isPending:b.isPending,onConfirm:C,onOpenChange:S,open:x,title:`Delete Key Pair`})]})}export{y as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{g as i}from"./ec2.js";import{Co as a,Jo as o,K as s,Oo as c,U as l,a as u,ko as d,wo as f,za as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./state-badge.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./delete-confirmation-dialog.js";var y=o(d()),b=c();function x(){let{id:o}=u.useParams(),c=f(),{data:d}=t(s(o)),{data:x}=t(l),S=i(),[C,w]=(0,y.useState)(!1),T=d.PlacementGroups?.[0],E=x.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.Placement?.GroupName===T?.GroupName)??[];return T?.GroupId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(e,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(p,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(h,{state:T.State})]}),subtitle:`Placement Group Details`,title:T.GroupName??T.GroupId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Placement Group Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Group ID`,value:T.GroupId}),(0,b.jsx)(_,{label:`Group Name`,value:T.GroupName}),(0,b.jsx)(_,{label:`Strategy`,value:T.Strategy}),(0,b.jsx)(_,{label:`State`,value:T.State}),(0,b.jsx)(_,{label:`Spread Level`,value:T.SpreadLevel})]})]}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Instances`}),E.length>0?E.map(e=>(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Instance ID`,value:e.InstanceId?(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,b.jsx)(_,{label:`State`,value:e.State?.Name}),(0,b.jsx)(_,{label:`Instance Type`,value:e.InstanceType}),(0,b.jsx)(_,{label:`Availability Zone`,value:e.Placement?.AvailabilityZone})]},e.InstanceId)):(0,b.jsx)(g.Content,{children:(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances in this placement group.`})})]})]}),(0,b.jsx)(v,{description:`Are you sure you want to delete the placement group "${T.GroupName}"? The group must have no running instances.`,isPending:S.isPending,onConfirm:async()=>{if(T?.GroupName)try{await S.mutateAsync(T.GroupName),c({to:`/ec2/describe-placement-groups`})}finally{w(!1)}},onOpenChange:w,open:C,title:`Delete Placement Group`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Placement group not found.`})]})}export{x as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{g as i}from"./ec2.js";import{Do as a,Eo as o,Ko as s,La as c,So as l,W as u,a as d,q as f,xo as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./state-badge.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./delete-confirmation-dialog.js";var y=s(a()),b=o();function x(){let{id:a}=d.useParams(),o=l(),{data:s}=t(f(a)),{data:x}=t(u),S=i(),[C,w]=(0,y.useState)(!1),T=s.PlacementGroups?.[0],E=x.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.Placement?.GroupName===T?.GroupName)??[];return T?.GroupId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(e,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(h,{state:T.State})]}),subtitle:`Placement Group Details`,title:T.GroupName??T.GroupId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Placement Group Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Group ID`,value:T.GroupId}),(0,b.jsx)(_,{label:`Group Name`,value:T.GroupName}),(0,b.jsx)(_,{label:`Strategy`,value:T.Strategy}),(0,b.jsx)(_,{label:`State`,value:T.State}),(0,b.jsx)(_,{label:`Spread Level`,value:T.SpreadLevel})]})]}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Instances`}),E.length>0?E.map(e=>(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Instance ID`,value:e.InstanceId?(0,b.jsx)(p,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,b.jsx)(_,{label:`State`,value:e.State?.Name}),(0,b.jsx)(_,{label:`Instance Type`,value:e.InstanceType}),(0,b.jsx)(_,{label:`Availability Zone`,value:e.Placement?.AvailabilityZone})]},e.InstanceId)):(0,b.jsx)(g.Content,{children:(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances in this placement group.`})})]})]}),(0,b.jsx)(v,{description:`Are you sure you want to delete the placement group "${T.GroupName}"? The group must have no running instances.`,isPending:S.isPending,onConfirm:async()=>{if(T?.GroupName)try{await S.mutateAsync(T.GroupName),o({to:`/ec2/describe-placement-groups`})}finally{w(!1)}},onOpenChange:w,open:C,title:`Delete Placement Group`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Placement group not found.`})]})}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./copy.js";import{t as i}from"./trash-2.js";import{i as a,v as o}from"./ec2.js";import{Co as s,Ga as c,J as l,Jo as u,Oo as d,Z as f,ko as p,s as m,wo as h,za as g,zi as _}from"./index.js";import{t as v}from"./page-heading.js";import{t as y}from"./state-badge.js";import{n as b,t as x}from"./detail-row.js";import{a as S,i as C,l as w,n as T,o as E,r as D,s as O,t as k}from"./alert-dialog.js";import{a as A,t as j}from"./field.js";import{t as M}from"./delete-confirmation-dialog.js";var N=u(p()),P=d();function F(){let{id:u}=m.useParams(),d=h(),{data:p}=t(f(u)),{data:F}=t(l),I=p.Snapshots?.[0],L=o(),R=a(),[z,B]=(0,N.useState)(!1),[V,H]=(0,N.useState)(!1),[U,W]=(0,N.useState)(``),G=F.Regions?.[0]?.RegionName??`ap-southeast-2`,K=I?.State===`completed`,q=async()=>{try{await L.mutateAsync(u),d({to:`/ec2/describe-snapshots`})}finally{B(!1)}},J=async()=>{try{await R.mutateAsync({sourceSnapshotId:u,sourceRegion:G,description:U||void 0}),H(!1),W(``)}catch{}};if(!I?.SnapshotId)return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let Y=c(I.StartTime);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L.error&&(0,P.jsx)(e,{error:L.error,msg:`Failed to delete snapshot`}),R.error&&(0,P.jsx)(e,{error:R.error,msg:`Failed to copy snapshot`}),(0,P.jsxs)(`div`,{className:`space-y-6`,children:[(0,P.jsx)(v,{actions:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsxs)(g,{disabled:!K,onClick:()=>B(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(i,{className:`size-4`}),`Delete`]}),(0,P.jsxs)(g,{disabled:!K,onClick:()=>H(!0),size:`sm`,variant:`outline`,children:[(0,P.jsx)(r,{className:`size-4`}),`Copy Snapshot`]}),(0,P.jsx)(y,{state:I.State})]}),subtitle:`Snapshot Details`,title:I.SnapshotId}),(0,P.jsxs)(b,{children:[(0,P.jsx)(b.Header,{children:`Snapshot Information`}),(0,P.jsxs)(b.Content,{children:[(0,P.jsx)(x,{label:`Snapshot ID`,value:I.SnapshotId}),(0,P.jsx)(x,{label:`Volume ID`,value:I.VolumeId?(0,P.jsx)(s,{className:`text-primary hover:underline`,params:{id:I.VolumeId},to:`/ec2/describe-volumes/$id`,children:I.VolumeId}):void 0}),(0,P.jsx)(x,{label:`Volume Size`,value:`${I.VolumeSize} GiB`}),(0,P.jsx)(x,{label:`State`,value:I.State}),(0,P.jsx)(x,{label:`Description`,value:I.Description}),(0,P.jsx)(x,{label:`Progress`,value:I.Progress}),(0,P.jsx)(x,{label:`Start Time`,value:Y}),(0,P.jsx)(x,{label:`Owner ID`,value:I.OwnerId}),(0,P.jsx)(x,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`})]})]})]}),(0,P.jsx)(M,{description:`Are you sure you want to delete the snapshot "${I.SnapshotId}"? This action cannot be undone.`,isPending:L.isPending,onConfirm:q,onOpenChange:B,open:z,title:`Delete Snapshot`}),(0,P.jsx)(k,{onOpenChange:H,open:V,children:(0,P.jsxs)(C,{children:[(0,P.jsxs)(O,{children:[(0,P.jsx)(w,{children:`Copy Snapshot`}),(0,P.jsx)(S,{children:`Create a copy of this snapshot in the current region.`})]}),(0,P.jsxs)(j,{children:[(0,P.jsx)(A,{children:(0,P.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,P.jsx)(_,{id:`copyDescription`,onChange:e=>W(e.target.value),placeholder:`Description for the snapshot copy`,value:U})]}),(0,P.jsxs)(E,{children:[(0,P.jsx)(D,{children:`Cancel`}),(0,P.jsx)(T,{disabled:R.isPending,onClick:J,children:R.isPending?`Copying…`:`Copy Snapshot`})]})]})})]})}export{F as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./copy.js";import{t as i}from"./trash-2.js";import{i as a,v as o}from"./ec2.js";import{Do as s,Eo as c,Ko as l,La as u,Li as d,Q as f,So as p,Ua as m,Y as h,s as g,xo as _}from"./index.js";import{t as v}from"./page-heading.js";import{t as y}from"./state-badge.js";import{n as b,t as x}from"./detail-row.js";import{a as S,i as C,l as w,n as T,o as E,r as D,s as O,t as k}from"./alert-dialog.js";import{a as A,t as j}from"./field.js";import{t as M}from"./delete-confirmation-dialog.js";var N=l(s()),P=c();function F(){let{id:s}=g.useParams(),c=p(),{data:l}=t(f(s)),{data:F}=t(h),I=l.Snapshots?.[0],L=o(),R=a(),[z,B]=(0,N.useState)(!1),[V,H]=(0,N.useState)(!1),[U,W]=(0,N.useState)(``),G=F.Regions?.[0]?.RegionName??`ap-southeast-2`,K=I?.State===`completed`,q=async()=>{try{await L.mutateAsync(s),c({to:`/ec2/describe-snapshots`})}finally{B(!1)}},J=async()=>{try{await R.mutateAsync({sourceSnapshotId:s,sourceRegion:G,description:U||void 0}),H(!1),W(``)}catch{}};if(!I?.SnapshotId)return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,P.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let Y=m(I.StartTime);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L.error&&(0,P.jsx)(e,{error:L.error,msg:`Failed to delete snapshot`}),R.error&&(0,P.jsx)(e,{error:R.error,msg:`Failed to copy snapshot`}),(0,P.jsxs)(`div`,{className:`space-y-6`,children:[(0,P.jsx)(v,{actions:(0,P.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,P.jsxs)(u,{disabled:!K,onClick:()=>B(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(i,{className:`size-4`}),`Delete`]}),(0,P.jsxs)(u,{disabled:!K,onClick:()=>H(!0),size:`sm`,variant:`outline`,children:[(0,P.jsx)(r,{className:`size-4`}),`Copy Snapshot`]}),(0,P.jsx)(y,{state:I.State})]}),subtitle:`Snapshot Details`,title:I.SnapshotId}),(0,P.jsxs)(b,{children:[(0,P.jsx)(b.Header,{children:`Snapshot Information`}),(0,P.jsxs)(b.Content,{children:[(0,P.jsx)(x,{label:`Snapshot ID`,value:I.SnapshotId}),(0,P.jsx)(x,{label:`Volume ID`,value:I.VolumeId?(0,P.jsx)(_,{className:`text-primary hover:underline`,params:{id:I.VolumeId},to:`/ec2/describe-volumes/$id`,children:I.VolumeId}):void 0}),(0,P.jsx)(x,{label:`Volume Size`,value:`${I.VolumeSize} GiB`}),(0,P.jsx)(x,{label:`State`,value:I.State}),(0,P.jsx)(x,{label:`Description`,value:I.Description}),(0,P.jsx)(x,{label:`Progress`,value:I.Progress}),(0,P.jsx)(x,{label:`Start Time`,value:Y}),(0,P.jsx)(x,{label:`Owner ID`,value:I.OwnerId}),(0,P.jsx)(x,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`})]})]})]}),(0,P.jsx)(M,{description:`Are you sure you want to delete the snapshot "${I.SnapshotId}"? This action cannot be undone.`,isPending:L.isPending,onConfirm:q,onOpenChange:B,open:z,title:`Delete Snapshot`}),(0,P.jsx)(k,{onOpenChange:H,open:V,children:(0,P.jsxs)(C,{children:[(0,P.jsxs)(O,{children:[(0,P.jsx)(w,{children:`Copy Snapshot`}),(0,P.jsx)(S,{children:`Create a copy of this snapshot in the current region.`})]}),(0,P.jsxs)(j,{children:[(0,P.jsx)(A,{children:(0,P.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,P.jsx)(d,{id:`copyDescription`,onChange:e=>W(e.target.value),placeholder:`Description for the snapshot copy`,value:U})]}),(0,P.jsxs)(E,{children:[(0,P.jsx)(D,{children:`Cancel`}),(0,P.jsx)(T,{disabled:R.isPending,onClick:J,children:R.isPending?`Copying…`:`Copy Snapshot`})]})]})})]})}export{F as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{y as i}from"./ec2.js";import{$ as a,Co as o,Ja as s,Jo as c,Oo as l,c as u,ko as d,wo as f,za as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./state-badge.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./delete-confirmation-dialog.js";var y=c(d()),b=l();function x(){let{id:c}=u.useParams(),l=f(),{data:d}=t(a(c)),x=d.Subnets?.[0],S=i(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(c),l({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=s(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(e,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(p,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(h,{state:x.State})]}),subtitle:`Subnet Details`,title:E?`${x.SubnetId} (${E})`:x.SubnetId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Subnet Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Subnet ID`,value:x.SubnetId}),(0,b.jsx)(_,{label:`VPC ID`,value:x.VpcId?(0,b.jsx)(o,{className:`text-primary hover:underline`,params:{id:x.VpcId},to:`/ec2/describe-vpcs/$id`,children:x.VpcId}):`—`}),(0,b.jsx)(_,{label:`State`,value:x.State}),(0,b.jsx)(_,{label:`CIDR Block`,value:x.CidrBlock}),(0,b.jsx)(_,{label:`Availability Zone`,value:x.AvailabilityZone}),(0,b.jsx)(_,{label:`Available IP Count`,value:x.AvailableIpAddressCount?.toString()}),(0,b.jsx)(_,{label:`Map Public IP on Launch`,value:x.MapPublicIpOnLaunch?`Yes`:`No`}),(0,b.jsx)(_,{label:`Default for AZ`,value:x.DefaultForAz?`Yes`:`No`})]})]})]}),(0,b.jsx)(v,{description:`Are you sure you want to delete the subnet "${x.SubnetId}"? This action cannot be undone.`,isPending:S.isPending,onConfirm:T,onOpenChange:w,open:C,title:`Delete Subnet`})]})}export{x as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{y as i}from"./ec2.js";import{Do as a,Eo as o,Ka as s,Ko as c,La as l,So as u,c as d,et as f,xo as p}from"./index.js";import{t as m}from"./page-heading.js";import{t as h}from"./state-badge.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./delete-confirmation-dialog.js";var y=c(a()),b=o();function x(){let{id:a}=d.useParams(),o=u(),{data:c}=t(f(a)),x=c.Subnets?.[0],S=i(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(a),o({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=s(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(n,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(e,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(r,{className:`size-4`}),`Delete`]}),(0,b.jsx)(h,{state:x.State})]}),subtitle:`Subnet Details`,title:E?`${x.SubnetId} (${E})`:x.SubnetId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Subnet Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Subnet ID`,value:x.SubnetId}),(0,b.jsx)(_,{label:`VPC ID`,value:x.VpcId?(0,b.jsx)(p,{className:`text-primary hover:underline`,params:{id:x.VpcId},to:`/ec2/describe-vpcs/$id`,children:x.VpcId}):`—`}),(0,b.jsx)(_,{label:`State`,value:x.State}),(0,b.jsx)(_,{label:`CIDR Block`,value:x.CidrBlock}),(0,b.jsx)(_,{label:`Availability Zone`,value:x.AvailabilityZone}),(0,b.jsx)(_,{label:`Available IP Count`,value:x.AvailableIpAddressCount?.toString()}),(0,b.jsx)(_,{label:`Map Public IP on Launch`,value:x.MapPublicIpOnLaunch?`Yes`:`No`}),(0,b.jsx)(_,{label:`Default for AZ`,value:x.DefaultForAz?`Yes`:`No`})]})]})]}),(0,b.jsx)(v,{description:`Are you sure you want to delete the subnet "${x.SubnetId}"? This action cannot be undone.`,isPending:S.isPending,onConfirm:T,onOpenChange:w,open:C,title:`Delete Subnet`})]})}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{o as i}from"./iam.js";import{Ga as a,Jo as o,Oo as s,b as c,ko as l,p as u,wo as d,xo as f,y as p,za as m}from"./index.js";import{t as h}from"./page-heading.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./delete-confirmation-dialog.js";var y=o(l()),b=f(),x=s();function S(e){let t=(0,b.c)(4),{document:n}=e,r;try{let e;t[0]===n?e=t[1]:(e=JSON.stringify(JSON.parse(n),null,2),t[0]=n,t[1]=e),r=e}catch{r=n}let i;return t[2]===r?i=t[3]:(i=(0,x.jsx)(`pre`,{className:`overflow-auto rounded-md border bg-muted p-4 font-mono text-sm`,children:r}),t[2]=r,t[3]=i),i}function C(){let{policyArn:o}=u.useParams(),s=decodeURIComponent(o),l=d(),{data:f}=t(p(s)),b=f.Policy,C=i(),[w,T]=(0,y.useState)(!1),{data:E}=t(c(s,b?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return b?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,x.jsx)(e,{error:C.error,msg:`Failed to delete policy`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(m,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(r,{className:`size-4`}),`Delete`]}),subtitle:`Policy Details`,title:b.PolicyName??``}),(0,x.jsxs)(g,{children:[(0,x.jsx)(g.Header,{children:`Policy Information`}),(0,x.jsxs)(g.Content,{children:[(0,x.jsx)(_,{label:`Policy Name`,value:b.PolicyName}),(0,x.jsx)(_,{label:`Policy ID`,value:b.PolicyId}),(0,x.jsx)(_,{label:`ARN`,value:b.Arn}),(0,x.jsx)(_,{label:`Path`,value:b.Path}),(0,x.jsx)(_,{label:`Description`,value:b.Description??`-`}),(0,x.jsx)(_,{label:`Created`,value:a(b.CreateDate)})]})]}),D&&(0,x.jsxs)(g,{children:[(0,x.jsx)(g.Header,{children:`Policy Document`}),(0,x.jsx)(`div`,{className:`p-4`,children:(0,x.jsx)(S,{document:D})})]})]}),(0,x.jsx)(v,{description:`Are you sure you want to delete the policy "${b.PolicyName}"? This action cannot be undone.`,isPending:C.isPending,onConfirm:async()=>{try{await C.mutateAsync(s),l({to:`/iam/list-policies`})}finally{T(!1)}},onOpenChange:T,open:w,title:`Delete Policy`})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{C as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./trash-2.js";import{o as i}from"./iam.js";import{Do as a,Eo as o,Ko as s,La as c,So as l,Ua as u,b as d,p as f,y as p,yo as m}from"./index.js";import{t as h}from"./page-heading.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./delete-confirmation-dialog.js";var y=s(a()),b=m(),x=o();function S(e){let t=(0,b.c)(4),{document:n}=e,r;try{let e;t[0]===n?e=t[1]:(e=JSON.stringify(JSON.parse(n),null,2),t[0]=n,t[1]=e),r=e}catch{r=n}let i;return t[2]===r?i=t[3]:(i=(0,x.jsx)(`pre`,{className:`overflow-auto rounded-md border bg-muted p-4 font-mono text-sm`,children:r}),t[2]=r,t[3]=i),i}function C(){let{policyArn:a}=f.useParams(),o=decodeURIComponent(a),s=l(),{data:m}=t(p(o)),b=m.Policy,C=i(),[w,T]=(0,y.useState)(!1),{data:E}=t(d(o,b?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return b?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,x.jsx)(e,{error:C.error,msg:`Failed to delete policy`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(c,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(r,{className:`size-4`}),`Delete`]}),subtitle:`Policy Details`,title:b.PolicyName??``}),(0,x.jsxs)(g,{children:[(0,x.jsx)(g.Header,{children:`Policy Information`}),(0,x.jsxs)(g.Content,{children:[(0,x.jsx)(_,{label:`Policy Name`,value:b.PolicyName}),(0,x.jsx)(_,{label:`Policy ID`,value:b.PolicyId}),(0,x.jsx)(_,{label:`ARN`,value:b.Arn}),(0,x.jsx)(_,{label:`Path`,value:b.Path}),(0,x.jsx)(_,{label:`Description`,value:b.Description??`-`}),(0,x.jsx)(_,{label:`Created`,value:u(b.CreateDate)})]})]}),D&&(0,x.jsxs)(g,{children:[(0,x.jsx)(g.Header,{children:`Policy Document`}),(0,x.jsx)(`div`,{className:`p-4`,children:(0,x.jsx)(S,{document:D})})]})]}),(0,x.jsx)(v,{description:`Are you sure you want to delete the policy "${b.PolicyName}"? This action cannot be undone.`,isPending:C.isPending,onConfirm:async()=>{try{await C.mutateAsync(o),s({to:`/iam/list-policies`})}finally{T(!1)}},onOpenChange:T,open:w,title:`Delete Policy`})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n,{to:`/iam/list-policies`,children:`Back to policies`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{C as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Cr as e,Eo as t,or as n}from"./index.js";var r=t({queryKey:[`admin`,`nodes`],queryFn:async()=>{let t=e();if(!t)throw Error(`Not authenticated`);return await n({action:`GetNodes`,credentials:t})},staleTime:1e4}),i=t({queryKey:[`admin`,`vms`],queryFn:async()=>{let t=e();if(!t)throw Error(`Not authenticated`);return await n({action:`GetVMs`,credentials:t})},staleTime:1e4}),a=t({queryKey:[`admin`,`storageStatus`],queryFn:async()=>{let t=e();if(!t)throw Error(`Not authenticated`);return await n({action:`GetStorageStatus`,credentials:t})},staleTime:1e4});export{a as n,i as r,r as t};
|
||||
import{ir as e,wo as t,xr as n}from"./index.js";var r=t({queryKey:[`admin`,`nodes`],queryFn:async()=>{let t=n();if(!t)throw Error(`Not authenticated`);return await e({action:`GetNodes`,credentials:t})},staleTime:1e4}),i=t({queryKey:[`admin`,`vms`],queryFn:async()=>{let t=n();if(!t)throw Error(`Not authenticated`);return await e({action:`GetVMs`,credentials:t})},staleTime:1e4}),a=t({queryKey:[`admin`,`storageStatus`],queryFn:async()=>{let t=n();if(!t)throw Error(`Not authenticated`);return await e({action:`GetStorageStatus`,credentials:t})},staleTime:1e4});export{a as n,i as r,r as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Co as e,Ga as t,Oo as n,xo as r}from"./index.js";import{n as i,t as a}from"./detail-row.js";var o=r(),s=n();function c(n){let r=(0,o.c)(58),{image:c,showExtendedDetails:u}=n,d=u===void 0?!1:u,f;r[0]===c.CreationDate?f=r[1]:(f=t(c.CreationDate),r[0]=c.CreationDate,r[1]=f);let p=f,m=d?`AMI Information`:`AMI Details`,h;r[2]===m?h=r[3]:(h=(0,s.jsx)(i.Header,{children:m}),r[2]=m,r[3]=h);let g;r[4]!==c.ImageId||r[5]!==d?(g=c.ImageId&&!d?(0,s.jsx)(e,{className:`text-primary hover:underline`,params:{id:c.ImageId},to:`/ec2/describe-images/$id`,children:c.ImageId}):c.ImageId,r[4]=c.ImageId,r[5]=d,r[6]=g):g=r[6];let _;r[7]===g?_=r[8]:(_=(0,s.jsx)(a,{label:`AMI ID`,value:g}),r[7]=g,r[8]=_);let v;r[9]===c.Name?v=r[10]:(v=(0,s.jsx)(a,{label:`AMI Name`,value:c.Name}),r[9]=c.Name,r[10]=v);let y;r[11]===c.Description?y=r[12]:(y=(0,s.jsx)(a,{label:`Description`,value:c.Description}),r[11]=c.Description,r[12]=y);let b;r[13]===c.Architecture?b=r[14]:(b=(0,s.jsx)(a,{label:`Architecture`,value:c.Architecture}),r[13]=c.Architecture,r[14]=b);let x;r[15]===c.VirtualizationType?x=r[16]:(x=(0,s.jsx)(a,{label:`Virtualization Type`,value:c.VirtualizationType}),r[15]=c.VirtualizationType,r[16]=x);let S=c.Platform??`Linux`,C;r[17]===S?C=r[18]:(C=(0,s.jsx)(a,{label:`Platform`,value:S}),r[17]=S,r[18]=C);let w;r[19]===c.PlatformDetails?w=r[20]:(w=(0,s.jsx)(a,{label:`Platform Details`,value:c.PlatformDetails}),r[19]=c.PlatformDetails,r[20]=w);let T;r[21]===c.ImageType?T=r[22]:(T=(0,s.jsx)(a,{label:`Image Type`,value:c.ImageType}),r[21]=c.ImageType,r[22]=T);let E;r[23]===c.RootDeviceType?E=r[24]:(E=(0,s.jsx)(a,{label:`Root Device Type`,value:c.RootDeviceType}),r[23]=c.RootDeviceType,r[24]=E);let D;r[25]===c.RootDeviceName?D=r[26]:(D=(0,s.jsx)(a,{label:`Root Device Name`,value:c.RootDeviceName}),r[25]=c.RootDeviceName,r[26]=D);let O;r[27]===c.OwnerId?O=r[28]:(O=(0,s.jsx)(a,{label:`Owner`,value:c.OwnerId}),r[27]=c.OwnerId,r[28]=O);let k;r[29]===c.State?k=r[30]:(k=(0,s.jsx)(a,{label:`State`,value:c.State}),r[29]=c.State,r[30]=k);let A;r[31]!==p||r[32]!==c.Public||r[33]!==d?(A=d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Creation Date`,value:p}),(0,s.jsx)(a,{label:`Public`,value:c.Public?`Yes`:`No`})]}),r[31]=p,r[32]=c.Public,r[33]=d,r[34]=A):A=r[34];let j;r[35]!==x||r[36]!==C||r[37]!==w||r[38]!==T||r[39]!==E||r[40]!==D||r[41]!==O||r[42]!==k||r[43]!==A||r[44]!==_||r[45]!==v||r[46]!==y||r[47]!==b?(j=(0,s.jsxs)(i.Content,{children:[_,v,y,b,x,C,w,T,E,D,O,k,A]}),r[35]=x,r[36]=C,r[37]=w,r[38]=T,r[39]=E,r[40]=D,r[41]=O,r[42]=k,r[43]=A,r[44]=_,r[45]=v,r[46]=y,r[47]=b,r[48]=j):j=r[48];let M;r[49]!==j||r[50]!==h?(M=(0,s.jsxs)(i,{children:[h,j]}),r[49]=j,r[50]=h,r[51]=M):M=r[51];let N;r[52]!==c.BlockDeviceMappings||r[53]!==d?(N=d&&c.BlockDeviceMappings&&c.BlockDeviceMappings.length>0&&c.BlockDeviceMappings.map(l),r[52]=c.BlockDeviceMappings,r[53]=d,r[54]=N):N=r[54];let P;return r[55]!==M||r[56]!==N?(P=(0,s.jsxs)(s.Fragment,{children:[M,N]}),r[55]=M,r[56]=N,r[57]=P):P=r[57],P}function l(t){return(0,s.jsxs)(i,{children:[(0,s.jsxs)(i.Header,{children:[`Block Device: `,t.DeviceName]}),(0,s.jsxs)(i.Content,{children:[(0,s.jsx)(a,{label:`Device Name`,value:t.DeviceName}),t.Ebs&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Volume Size`,value:t.Ebs.VolumeSize?`${t.Ebs.VolumeSize} GB`:void 0}),(0,s.jsx)(a,{label:`Volume Type`,value:t.Ebs.VolumeType}),(0,s.jsx)(a,{label:`Delete On Termination`,value:t.Ebs.DeleteOnTermination?`Yes`:`No`}),(0,s.jsx)(a,{label:`Encrypted`,value:t.Ebs.Encrypted?`Yes`:`No`}),t.Ebs.SnapshotId&&(0,s.jsx)(a,{label:`Snapshot ID`,value:(0,s.jsx)(e,{className:`text-primary hover:underline`,params:{id:t.Ebs.SnapshotId},to:`/ec2/describe-snapshots/$id`,children:t.Ebs.SnapshotId})})]}),t.VirtualName&&(0,s.jsx)(a,{label:`Virtual Name`,value:t.VirtualName})]})]},t.DeviceName)}export{c as t};
|
||||
import{Eo as e,Ua as t,xo as n,yo as r}from"./index.js";import{n as i,t as a}from"./detail-row.js";var o=r(),s=e();function c(e){let r=(0,o.c)(58),{image:c,showExtendedDetails:u}=e,d=u===void 0?!1:u,f;r[0]===c.CreationDate?f=r[1]:(f=t(c.CreationDate),r[0]=c.CreationDate,r[1]=f);let p=f,m=d?`AMI Information`:`AMI Details`,h;r[2]===m?h=r[3]:(h=(0,s.jsx)(i.Header,{children:m}),r[2]=m,r[3]=h);let g;r[4]!==c.ImageId||r[5]!==d?(g=c.ImageId&&!d?(0,s.jsx)(n,{className:`text-primary hover:underline`,params:{id:c.ImageId},to:`/ec2/describe-images/$id`,children:c.ImageId}):c.ImageId,r[4]=c.ImageId,r[5]=d,r[6]=g):g=r[6];let _;r[7]===g?_=r[8]:(_=(0,s.jsx)(a,{label:`AMI ID`,value:g}),r[7]=g,r[8]=_);let v;r[9]===c.Name?v=r[10]:(v=(0,s.jsx)(a,{label:`AMI Name`,value:c.Name}),r[9]=c.Name,r[10]=v);let y;r[11]===c.Description?y=r[12]:(y=(0,s.jsx)(a,{label:`Description`,value:c.Description}),r[11]=c.Description,r[12]=y);let b;r[13]===c.Architecture?b=r[14]:(b=(0,s.jsx)(a,{label:`Architecture`,value:c.Architecture}),r[13]=c.Architecture,r[14]=b);let x;r[15]===c.VirtualizationType?x=r[16]:(x=(0,s.jsx)(a,{label:`Virtualization Type`,value:c.VirtualizationType}),r[15]=c.VirtualizationType,r[16]=x);let S=c.Platform??`Linux`,C;r[17]===S?C=r[18]:(C=(0,s.jsx)(a,{label:`Platform`,value:S}),r[17]=S,r[18]=C);let w;r[19]===c.PlatformDetails?w=r[20]:(w=(0,s.jsx)(a,{label:`Platform Details`,value:c.PlatformDetails}),r[19]=c.PlatformDetails,r[20]=w);let T;r[21]===c.ImageType?T=r[22]:(T=(0,s.jsx)(a,{label:`Image Type`,value:c.ImageType}),r[21]=c.ImageType,r[22]=T);let E;r[23]===c.RootDeviceType?E=r[24]:(E=(0,s.jsx)(a,{label:`Root Device Type`,value:c.RootDeviceType}),r[23]=c.RootDeviceType,r[24]=E);let D;r[25]===c.RootDeviceName?D=r[26]:(D=(0,s.jsx)(a,{label:`Root Device Name`,value:c.RootDeviceName}),r[25]=c.RootDeviceName,r[26]=D);let O;r[27]===c.OwnerId?O=r[28]:(O=(0,s.jsx)(a,{label:`Owner`,value:c.OwnerId}),r[27]=c.OwnerId,r[28]=O);let k;r[29]===c.State?k=r[30]:(k=(0,s.jsx)(a,{label:`State`,value:c.State}),r[29]=c.State,r[30]=k);let A;r[31]!==p||r[32]!==c.Public||r[33]!==d?(A=d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Creation Date`,value:p}),(0,s.jsx)(a,{label:`Public`,value:c.Public?`Yes`:`No`})]}),r[31]=p,r[32]=c.Public,r[33]=d,r[34]=A):A=r[34];let j;r[35]!==x||r[36]!==C||r[37]!==w||r[38]!==T||r[39]!==E||r[40]!==D||r[41]!==O||r[42]!==k||r[43]!==A||r[44]!==_||r[45]!==v||r[46]!==y||r[47]!==b?(j=(0,s.jsxs)(i.Content,{children:[_,v,y,b,x,C,w,T,E,D,O,k,A]}),r[35]=x,r[36]=C,r[37]=w,r[38]=T,r[39]=E,r[40]=D,r[41]=O,r[42]=k,r[43]=A,r[44]=_,r[45]=v,r[46]=y,r[47]=b,r[48]=j):j=r[48];let M;r[49]!==j||r[50]!==h?(M=(0,s.jsxs)(i,{children:[h,j]}),r[49]=j,r[50]=h,r[51]=M):M=r[51];let N;r[52]!==c.BlockDeviceMappings||r[53]!==d?(N=d&&c.BlockDeviceMappings&&c.BlockDeviceMappings.length>0&&c.BlockDeviceMappings.map(l),r[52]=c.BlockDeviceMappings,r[53]=d,r[54]=N):N=r[54];let P;return r[55]!==M||r[56]!==N?(P=(0,s.jsxs)(s.Fragment,{children:[M,N]}),r[55]=M,r[56]=N,r[57]=P):P=r[57],P}function l(e){return(0,s.jsxs)(i,{children:[(0,s.jsxs)(i.Header,{children:[`Block Device: `,e.DeviceName]}),(0,s.jsxs)(i.Content,{children:[(0,s.jsx)(a,{label:`Device Name`,value:e.DeviceName}),e.Ebs&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Volume Size`,value:e.Ebs.VolumeSize?`${e.Ebs.VolumeSize} GB`:void 0}),(0,s.jsx)(a,{label:`Volume Type`,value:e.Ebs.VolumeType}),(0,s.jsx)(a,{label:`Delete On Termination`,value:e.Ebs.DeleteOnTermination?`Yes`:`No`}),(0,s.jsx)(a,{label:`Encrypted`,value:e.Ebs.Encrypted?`Yes`:`No`}),e.Ebs.SnapshotId&&(0,s.jsx)(a,{label:`Snapshot ID`,value:(0,s.jsx)(n,{className:`text-primary hover:underline`,params:{id:e.Ebs.SnapshotId},to:`/ec2/describe-snapshots/$id`,children:e.Ebs.SnapshotId})})]}),e.VirtualName&&(0,s.jsx)(a,{label:`Virtual Name`,value:e.VirtualName})]})]},e.DeviceName)}export{c as t};
|
||||
@@ -1 +1 @@
|
||||
import{Co as e,Oo as t,uo as n,xo as r}from"./index.js";var i=n(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),a=r(),o=t();function s(t){let n=(0,a.c)(7),r,s;n[0]===t?(r=n[1],s=n[2]):({children:r,...s}=t,n[0]=t,n[1]=r,n[2]=s);let c;n[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,o.jsx)(i,{className:`size-4`}),n[3]=c):c=n[3];let l;return n[4]!==r||n[5]!==s?(l=(0,o.jsxs)(e,{className:`mb-6 inline-flex items-center gap-2 text-sm`,...s,children:[c,r]}),n[4]=r,n[5]=s,n[6]=l):l=n[6],l}export{s as t};
|
||||
import{Eo as e,co as t,xo as n,yo as r}from"./index.js";var i=t(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),a=r(),o=e();function s(e){let t=(0,a.c)(7),r,s;t[0]===e?(r=t[1],s=t[2]):({children:r,...s}=e,t[0]=e,t[1]=r,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,o.jsx)(i,{className:`size-4`}),t[3]=c):c=t[3];let l;return t[4]!==r||t[5]!==s?(l=(0,o.jsxs)(n,{className:`mb-6 inline-flex items-center gap-2 text-sm`,...s,children:[c,r]}),t[4]=r,t[5]=s,t[6]=l):l=t[6],l}export{s as t};
|
||||
@@ -1 +1 @@
|
||||
import{Ha as e,bo as t,do as n,fo as r,xo as i}from"./index.js";var a=i(),o=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(n){let i=(0,a.c)(13),s,c,l,u,d;if(i[0]!==n){let{className:a,variant:f,render:p,...m}=n;s=p,d=f===void 0?`default`:f,u=r,c=`span`,l=t({className:e(o({className:a,variant:d}))},m),i[0]=n,i[1]=s,i[2]=c,i[3]=l,i[4]=u,i[5]=d}else s=i[1],c=i[2],l=i[3],u=i[4],d=i[5];let f;i[6]===d?f=i[7]:(f={slot:`badge`,variant:d},i[6]=d,i[7]=f);let p;return i[8]!==s||i[9]!==c||i[10]!==l||i[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},i[8]=s,i[9]=c,i[10]=l,i[11]=f,i[12]=p):p=i[12],u(p)}export{s as t};
|
||||
import{Ba as e,lo as t,uo as n,vo as r,yo as i}from"./index.js";var a=i(),o=t(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(t){let i=(0,a.c)(13),s,c,l,u,d;if(i[0]!==t){let{className:a,variant:f,render:p,...m}=t;s=p,d=f===void 0?`default`:f,u=n,c=`span`,l=r({className:e(o({className:a,variant:d}))},m),i[0]=t,i[1]=s,i[2]=c,i[3]=l,i[4]=u,i[5]=d}else s=i[1],c=i[2],l=i[3],u=i[4],d=i[5];let f;i[6]===d?f=i[7]:(f={slot:`badge`,variant:d},i[6]=d,i[7]=f);let p;return i[8]!==s||i[9]!==c||i[10]!==l||i[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},i[8]=s,i[9]=c,i[10]=l,i[11]=f,i[12]=p):p=i[12],u(p)}export{s as t};
|
||||
@@ -1 +1 @@
|
||||
import{Ha as e,Oo as t,xo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(10),a,o,s;n[0]===t?(a=n[1],o=n[2],s=n[3]):({className:a,size:s,...o}=t,n[0]=t,n[1]=a,n[2]=o,n[3]=s);let c=s===void 0?`default`:s,l;n[4]===a?l=n[5]:(l=e(`group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg`,a),n[4]=a,n[5]=l);let u;return n[6]!==o||n[7]!==c||n[8]!==l?(u=(0,i.jsx)(`div`,{className:l,"data-size":c,"data-slot":`card`,...o}),n[6]=o,n[7]=c,n[8]=l,n[9]=u):u=n[9],u}function o(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-header`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function s(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`text-sm font-medium`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-title`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function c(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-action`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function l(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`px-4 group-data-[size=sm]/card:px-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-content`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function u(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`flex items-center rounded-b-lg px-4 group-data-[size=sm]/card:px-3 [.border-t]:pt-4 group-data-[size=sm]/card:[.border-t]:pt-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-footer`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{o as a,u as i,c as n,s as o,l as r,a as t};
|
||||
import{Ba as e,Eo as t,yo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(10),a,o,s;n[0]===t?(a=n[1],o=n[2],s=n[3]):({className:a,size:s,...o}=t,n[0]=t,n[1]=a,n[2]=o,n[3]=s);let c=s===void 0?`default`:s,l;n[4]===a?l=n[5]:(l=e(`group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-xs/relaxed text-card-foreground ring-1 ring-foreground/10 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg`,a),n[4]=a,n[5]=l);let u;return n[6]!==o||n[7]!==c||n[8]!==l?(u=(0,i.jsx)(`div`,{className:l,"data-size":c,"data-slot":`card`,...o}),n[6]=o,n[7]=c,n[8]=l,n[9]=u):u=n[9],u}function o(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-header`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function s(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`text-sm font-medium`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-title`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function c(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-action`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function l(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`px-4 group-data-[size=sm]/card:px-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-content`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}function u(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`flex items-center rounded-b-lg px-4 group-data-[size=sm]/card:px-3 [.border-t]:pt-4 group-data-[size=sm]/card:[.border-t]:pt-3`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`div`,{className:s,"data-slot":`card-footer`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{o as a,u as i,c as n,s as o,l as r,a as t};
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./error-banner.js";import{$n as n,Do as r,Eo as i,Ko as a,Qn as o,To as s,Zn as c,nr as l,st as u,yo as d}from"./index.js";import{a as f,i as p,l as m,n as h,o as g,r as _,s as ee,t as te}from"./alert-dialog.js";import{a as v,t as y}from"./field.js";import{t as b}from"./textarea.js";var x=class extends l.classBuilder().ep(o).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`CertificateManager`,`ImportCertificate`,{}).n(`ACMClient`,`ImportCertificateCommand`).sc(c).build(){},S=a(r(),1),C=d(),w=new TextEncoder;function T(){let t=(0,C.c)(2),n=s(),r;return t[0]===n?r=t[1]:(r={mutationFn:E,onSuccess:()=>{n.invalidateQueries({queryKey:[`acm`,`certificates`]})}},t[0]=n,t[1]=r),e(r)}async function E(e){let t=new x({Certificate:w.encode(e.certificate),PrivateKey:w.encode(e.privateKey),CertificateChain:e.certificateChain&&e.certificateChain.length>0?w.encode(e.certificateChain):void 0});return await u().send(t)}var D=i();function O(e){let n=(0,C.c)(54),{open:r,onOpenChange:i,onImported:a}=e,[o,s]=(0,S.useState)(``),[c,l]=(0,S.useState)(``),[u,d]=(0,S.useState)(``),x=T(),w;n[0]===x?w=n[1]:(w=()=>{s(``),l(``),d(``),x.reset()},n[0]=x,n[1]=w);let E=w,O;n[2]!==i||n[3]!==E?(O=e=>{e||E(),i(e)},n[2]=i,n[3]=E,n[4]=O):O=n[4];let k=O,A;n[5]!==o||n[6]!==c?(A=o.trim().length>0&&c.trim().length>0,n[5]=o,n[6]=c,n[7]=A):A=n[7];let j=A,M;n[8]!==j||n[9]!==o||n[10]!==u||n[11]!==x||n[12]!==a||n[13]!==i||n[14]!==c||n[15]!==E?(M=async()=>{if(j)try{let e=await x.mutateAsync({certificate:o,privateKey:c,certificateChain:u});e.CertificateArn&&a(e.CertificateArn),E(),i(!1)}catch{}},n[8]=j,n[9]=o,n[10]=u,n[11]=x,n[12]=a,n[13]=i,n[14]=c,n[15]=E,n[16]=M):M=n[16];let N=M,P;n[17]===Symbol.for(`react.memo_cache_sentinel`)?(P={maxWidth:`36rem`,width:`calc(100vw - 2rem)`},n[17]=P):P=n[17];let F;n[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,D.jsxs)(ee,{children:[(0,D.jsx)(m,{children:`Import certificate`}),(0,D.jsx)(f,{children:`Paste a PEM-encoded certificate and its private key. The optional chain is appended for intermediate CAs.`})]}),n[18]=F):F=n[18];let I;n[19]===x.error?I=n[20]:(I=x.error&&(0,D.jsx)(t,{error:x.error,msg:`Failed to import certificate`}),n[19]=x.error,n[20]=I);let L;n[21]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,D.jsx)(v,{children:(0,D.jsx)(`label`,{htmlFor:`cert-body`,children:`Certificate body`})}),n[21]=L):L=n[21];let R;n[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>s(e.target.value),n[22]=R):R=n[22];let z;n[23]===o?z=n[24]:(z=(0,D.jsxs)(y,{children:[L,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-body`,onChange:R,placeholder:`-----BEGIN CERTIFICATE-----`,rows:5,value:o})]}),n[23]=o,n[24]=z);let B;n[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,D.jsx)(v,{children:(0,D.jsx)(`label`,{htmlFor:`cert-key`,children:`Private key`})}),n[25]=B):B=n[25];let V;n[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>l(e.target.value),n[26]=V):V=n[26];let H;n[27]===c?H=n[28]:(H=(0,D.jsxs)(y,{children:[B,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-key`,onChange:V,placeholder:`-----BEGIN PRIVATE KEY-----`,rows:5,value:c})]}),n[27]=c,n[28]=H);let U;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,D.jsx)(v,{children:(0,D.jsx)(`label`,{htmlFor:`cert-chain`,children:`Certificate chain (optional)`})}),n[29]=U):U=n[29];let W;n[30]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>d(e.target.value),n[30]=W):W=n[30];let G;n[31]===u?G=n[32]:(G=(0,D.jsxs)(y,{children:[U,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:u})]}),n[31]=u,n[32]=G);let K;n[33]!==z||n[34]!==H||n[35]!==G?(K=(0,D.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[z,H,G]}),n[33]=z,n[34]=H,n[35]=G,n[36]=K):K=n[36];let q;n[37]===x.isPending?q=n[38]:(q=(0,D.jsx)(_,{disabled:x.isPending,children:`Cancel`}),n[37]=x.isPending,n[38]=q);let J=!j||x.isPending,Y=x.isPending?`Importing…`:`Import`,X;n[39]!==N||n[40]!==J||n[41]!==Y?(X=(0,D.jsx)(h,{disabled:J,onClick:N,children:Y}),n[39]=N,n[40]=J,n[41]=Y,n[42]=X):X=n[42];let Z;n[43]!==q||n[44]!==X?(Z=(0,D.jsxs)(g,{children:[q,X]}),n[43]=q,n[44]=X,n[45]=Z):Z=n[45];let Q;n[46]!==K||n[47]!==Z||n[48]!==I?(Q=(0,D.jsxs)(p,{className:`grid-cols-[minmax(0,1fr)]`,style:P,children:[F,I,K,Z]}),n[46]=K,n[47]=Z,n[48]=I,n[49]=Q):Q=n[49];let $;return n[50]!==k||n[51]!==r||n[52]!==Q?($=(0,D.jsx)(te,{onOpenChange:k,open:r,children:Q}),n[50]=k,n[51]=r,n[52]=Q,n[53]=$):$=n[53],$}export{O as t};
|
||||
@@ -1 +1 @@
|
||||
import{uo as e}from"./index.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
||||
import{co as e}from"./index.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
||||
@@ -1 +1 @@
|
||||
import{uo as e}from"./index.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
||||
import{co as e}from"./index.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
|
||||
@@ -1 +1 @@
|
||||
import{uo as e}from"./index.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
||||
import{co as e}from"./index.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{t as e}from"./check.js";import{t}from"./chevron-down.js";import{t as n}from"./copy.js";import{Ha as r,Jo as i,Oo as a,ko as o,uo as s,xo as c,za as l}from"./index.js";import{t as u}from"./use-copy-to-clipboard.js";var d=s(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),f=c(),p=i(o(),1),m=a(),h={bin:`text-tactical-cyan font-semibold`,flag:`text-tactical-amber`,value:`text-foreground`,comment:`text-muted-foreground italic`,variable:`text-tactical-green font-semibold`};function g(e){return e.map(e=>e.parts.map(e=>e.value).join(``)).join(`
|
||||
import{t as e}from"./check.js";import{t}from"./chevron-down.js";import{t as n}from"./copy.js";import{Ba as r,Do as i,Eo as a,Ko as o,La as s,co as c,yo as l}from"./index.js";import{t as u}from"./use-copy-to-clipboard.js";var d=c(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),f=l(),p=o(i(),1),m=a(),h={bin:`text-tactical-cyan font-semibold`,flag:`text-tactical-amber`,value:`text-foreground`,comment:`text-muted-foreground italic`,variable:`text-tactical-green font-semibold`};function g(e){return e.map(e=>e.parts.map(e=>e.value).join(``)).join(`
|
||||
|
||||
`)}function _(i){let a=(0,f.c)(18),{commands:o}=i,[s,c]=(0,p.useState)(!1),{copied:h,copy:_}=u();if(o.length===0)return null;let b;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>c(y),a[0]=b):b=a[0];let x,S;a[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,m.jsx)(d,{className:`size-3.5`}),S=(0,m.jsx)(`span`,{children:`AWS CLI`}),a[1]=x,a[2]=S):(x=a[1],S=a[2]);let C=s&&`rotate-180`,w;a[3]===C?w=a[4]:(w=r(`ml-auto size-3.5 transition-transform`,C),a[3]=C,a[4]=w);let T;a[5]===w?T=a[6]:(T=(0,m.jsx)(t,{className:w}),a[5]=w,a[6]=T);let E;a[7]!==s||a[8]!==T?(E=(0,m.jsxs)(`button`,{type:`button`,onClick:b,className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":s,children:[x,S,T]}),a[7]=s,a[8]=T,a[9]=E):E=a[9];let D;a[10]!==o||a[11]!==h||a[12]!==_||a[13]!==s?(D=s&&(0,m.jsxs)(`div`,{className:`border-t border-border`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-3 py-1.5`,children:[(0,m.jsx)(`span`,{className:`text-[0.625rem] text-muted-foreground`,children:o.length>1?`${o.length} commands`:`command`}),(0,m.jsxs)(l,{type:`button`,variant:`ghost`,size:`xs`,onClick:async()=>await _(g(o)),children:[h?(0,m.jsx)(e,{className:`size-2.5`}):(0,m.jsx)(n,{className:`size-2.5`}),h?`Copied`:`Copy`]})]}),(0,m.jsx)(`div`,{className:`overflow-x-auto p-3`,children:o.map((e,t)=>(0,m.jsxs)(`div`,{children:[o.length>1&&(0,m.jsx)(`div`,{className:`mb-1 text-[0.625rem] font-medium text-muted-foreground`,children:e.label}),(0,m.jsx)(`pre`,{className:`font-mono text-xs/relaxed`,children:(0,m.jsx)(`code`,{children:e.parts.map(v)})}),t<o.length-1&&(0,m.jsx)(`div`,{className:`my-2`})]},e.label))})]}),a[10]=o,a[11]=h,a[12]=_,a[13]=s,a[14]=D):D=a[14];let O;return a[15]!==E||a[16]!==D?(O=(0,m.jsxs)(`div`,{className:`rounded-md border border-border`,children:[E,D]}),a[15]=E,a[16]=D,a[17]=O):O=a[17],O}function v(e,t){return(0,m.jsx)(`span`,{className:h[e.type],children:e.value},t)}function y(e){return!e}export{_ as t};
|
||||
`)}function _(i){let a=(0,f.c)(18),{commands:o}=i,[c,l]=(0,p.useState)(!1),{copied:h,copy:_}=u();if(o.length===0)return null;let b;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>l(y),a[0]=b):b=a[0];let x,S;a[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,m.jsx)(d,{className:`size-3.5`}),S=(0,m.jsx)(`span`,{children:`AWS CLI`}),a[1]=x,a[2]=S):(x=a[1],S=a[2]);let C=c&&`rotate-180`,w;a[3]===C?w=a[4]:(w=r(`ml-auto size-3.5 transition-transform`,C),a[3]=C,a[4]=w);let T;a[5]===w?T=a[6]:(T=(0,m.jsx)(t,{className:w}),a[5]=w,a[6]=T);let E;a[7]!==c||a[8]!==T?(E=(0,m.jsxs)(`button`,{type:`button`,onClick:b,className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":c,children:[x,S,T]}),a[7]=c,a[8]=T,a[9]=E):E=a[9];let D;a[10]!==o||a[11]!==h||a[12]!==_||a[13]!==c?(D=c&&(0,m.jsxs)(`div`,{className:`border-t border-border`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-3 py-1.5`,children:[(0,m.jsx)(`span`,{className:`text-[0.625rem] text-muted-foreground`,children:o.length>1?`${o.length} commands`:`command`}),(0,m.jsxs)(s,{type:`button`,variant:`ghost`,size:`xs`,onClick:async()=>await _(g(o)),children:[h?(0,m.jsx)(e,{className:`size-2.5`}):(0,m.jsx)(n,{className:`size-2.5`}),h?`Copied`:`Copy`]})]}),(0,m.jsx)(`div`,{className:`overflow-x-auto p-3`,children:o.map((e,t)=>(0,m.jsxs)(`div`,{children:[o.length>1&&(0,m.jsx)(`div`,{className:`mb-1 text-[0.625rem] font-medium text-muted-foreground`,children:e.label}),(0,m.jsx)(`pre`,{className:`font-mono text-xs/relaxed`,children:(0,m.jsx)(`code`,{children:e.parts.map(v)})}),t<o.length-1&&(0,m.jsx)(`div`,{className:`my-2`})]},e.label))})]}),a[10]=o,a[11]=h,a[12]=_,a[13]=c,a[14]=D):D=a[14];let O;return a[15]!==E||a[16]!==D?(O=(0,m.jsxs)(`div`,{className:`rounded-md border border-border`,children:[E,D]}),a[15]=E,a[16]=D,a[17]=O):O=a[17],O}function v(e,t){return(0,m.jsx)(`span`,{className:h[e.type],children:e.value},t)}function y(e){return!e}export{_ as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{uo as e}from"./index.js";var t=e(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);export{t};
|
||||
import{co as e}from"./index.js";var t=e(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);export{t};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{t as r}from"./s3.js";import{Ar as i,Mr as a,Oo as o,wo as s,xo as c,zi as l}from"./index.js";import{t as u}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{a as m,i as h,t as g}from"./zod.js";import{t as _}from"./form-actions.js";var v=c(),y=i({bucketName:a().min(3,`Bucket name must be at least 3 characters`).max(63,`Bucket name must be at most 63 characters`).regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,`Must start and end with a lowercase letter or number`).regex(/^[a-z0-9.-]+$/,`Only lowercase letters, numbers, hyphens, and periods allowed`).refine(e=>!e.includes(`..`),`Must not contain consecutive periods`).refine(e=>!(e.includes(`.-`)||e.includes(`-.`)),`Must not contain adjacent period and hyphen`)}),b=o();function x(){let i=(0,v.c)(44),a=s(),o=r(),c;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(c={resolver:g(y)},i[0]=c):c=i[0];let{handleSubmit:x,register:C,control:w,formState:T}=h(c),{errors:E,isSubmitting:D}=T,O;i[1]===w?O=i[2]:(O={control:w},i[1]=w,i[2]=O);let k=m(O),A;i[3]===k?A=i[4]:(A=e=>e?k[e]:void 0,i[3]=k,i[4]=A);let j=A,M;i[5]!==o||i[6]!==a?(M=async e=>{await o.mutateAsync(e),a({to:`/s3/ls`})},i[5]=o,i[6]=a,i[7]=M):M=i[7];let N=M,P,F;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(t,{to:`/s3/ls`,children:`Back to buckets`}),F=(0,b.jsx)(u,{title:`Create Bucket`}),i[8]=P,i[9]=F):(P=i[8],F=i[9]);let I;i[10]===o.error?I=i[11]:(I=o.error&&(0,b.jsx)(e,{error:o.error,msg:`Failed to create bucket`}),i[10]=o.error,i[11]=I);let L;i[12]!==x||i[13]!==N?(L=x(N),i[12]=x,i[13]=N,i[14]=L):L=i[14];let R;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,b.jsx)(d,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),i[15]=R):R=i[15];let z=!!E.bucketName,B;i[16]===C?B=i[17]:(B=C(`bucketName`),i[16]=C,i[17]=B);let V;i[18]!==z||i[19]!==B?(V=(0,b.jsx)(l,{"aria-invalid":z,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...B}),i[18]=z,i[19]=B,i[20]=V):V=i[20];let H;i[21]===E.bucketName?H=i[22]:(H=(0,b.jsx)(f,{errors:[E.bucketName]}),i[21]=E.bucketName,i[22]=H);let U;i[23]!==V||i[24]!==H?(U=(0,b.jsxs)(p,{children:[R,V,H]}),i[23]=V,i[24]=H,i[25]=U):U=i[25];let W;i[26]===j?W=i[27]:(W=S(j),i[26]=j,i[27]=W);let G;i[28]===W?G=i[29]:(G=(0,b.jsx)(n,{commands:W}),i[28]=W,i[29]=G);let K;i[30]===a?K=i[31]:(K=async()=>await a({to:`/s3/ls`}),i[30]=a,i[31]=K);let q;i[32]!==o.isPending||i[33]!==D||i[34]!==K?(q=(0,b.jsx)(_,{isPending:o.isPending,isSubmitting:D,onCancel:K,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),i[32]=o.isPending,i[33]=D,i[34]=K,i[35]=q):q=i[35];let J;i[36]!==U||i[37]!==G||i[38]!==q||i[39]!==L?(J=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[U,G,q]}),i[36]=U,i[37]=G,i[38]=q,i[39]=L,i[40]=J):J=i[40];let Y;return i[41]!==J||i[42]!==I?(Y=(0,b.jsxs)(b.Fragment,{children:[P,F,I,J]}),i[41]=J,i[42]=I,i[43]=Y):Y=i[43],Y}function S(e){let t=e(`bucketName`);return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<BucketName>`}`}]}]}export{x as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{t as r}from"./s3.js";import{Ar as i,Eo as a,Li as o,Or as s,So as c,yo as l}from"./index.js";import{t as u}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{a as m,i as h,t as g}from"./zod.js";import{t as _}from"./form-actions.js";var v=l(),y=s({bucketName:i().min(3,`Bucket name must be at least 3 characters`).max(63,`Bucket name must be at most 63 characters`).regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,`Must start and end with a lowercase letter or number`).regex(/^[a-z0-9.-]+$/,`Only lowercase letters, numbers, hyphens, and periods allowed`).refine(e=>!e.includes(`..`),`Must not contain consecutive periods`).refine(e=>!(e.includes(`.-`)||e.includes(`-.`)),`Must not contain adjacent period and hyphen`)}),b=a();function x(){let i=(0,v.c)(44),a=c(),s=r(),l;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={resolver:g(y)},i[0]=l):l=i[0];let{handleSubmit:x,register:C,control:w,formState:T}=h(l),{errors:E,isSubmitting:D}=T,O;i[1]===w?O=i[2]:(O={control:w},i[1]=w,i[2]=O);let k=m(O),A;i[3]===k?A=i[4]:(A=e=>e?k[e]:void 0,i[3]=k,i[4]=A);let j=A,M;i[5]!==s||i[6]!==a?(M=async e=>{await s.mutateAsync(e),a({to:`/s3/ls`})},i[5]=s,i[6]=a,i[7]=M):M=i[7];let N=M,P,F;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(t,{to:`/s3/ls`,children:`Back to buckets`}),F=(0,b.jsx)(u,{title:`Create Bucket`}),i[8]=P,i[9]=F):(P=i[8],F=i[9]);let I;i[10]===s.error?I=i[11]:(I=s.error&&(0,b.jsx)(e,{error:s.error,msg:`Failed to create bucket`}),i[10]=s.error,i[11]=I);let L;i[12]!==x||i[13]!==N?(L=x(N),i[12]=x,i[13]=N,i[14]=L):L=i[14];let R;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,b.jsx)(d,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),i[15]=R):R=i[15];let z=!!E.bucketName,B;i[16]===C?B=i[17]:(B=C(`bucketName`),i[16]=C,i[17]=B);let V;i[18]!==z||i[19]!==B?(V=(0,b.jsx)(o,{"aria-invalid":z,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...B}),i[18]=z,i[19]=B,i[20]=V):V=i[20];let H;i[21]===E.bucketName?H=i[22]:(H=(0,b.jsx)(f,{errors:[E.bucketName]}),i[21]=E.bucketName,i[22]=H);let U;i[23]!==V||i[24]!==H?(U=(0,b.jsxs)(p,{children:[R,V,H]}),i[23]=V,i[24]=H,i[25]=U):U=i[25];let W;i[26]===j?W=i[27]:(W=S(j),i[26]=j,i[27]=W);let G;i[28]===W?G=i[29]:(G=(0,b.jsx)(n,{commands:W}),i[28]=W,i[29]=G);let K;i[30]===a?K=i[31]:(K=async()=>await a({to:`/s3/ls`}),i[30]=a,i[31]=K);let q;i[32]!==s.isPending||i[33]!==D||i[34]!==K?(q=(0,b.jsx)(_,{isPending:s.isPending,isSubmitting:D,onCancel:K,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),i[32]=s.isPending,i[33]=D,i[34]=K,i[35]=q):q=i[35];let J;i[36]!==U||i[37]!==G||i[38]!==q||i[39]!==L?(J=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[U,G,q]}),i[36]=U,i[37]=G,i[38]=q,i[39]=L,i[40]=J):J=i[40];let Y;return i[41]!==J||i[42]!==I?(Y=(0,b.jsxs)(b.Fragment,{children:[P,F,I,J]}),i[41]=J,i[42]=I,i[43]=Y):Y=i[43],Y}function S(e){let t=e(`bucketName`);return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<BucketName>`}`}]}]}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
+16
-12
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,3 +1,3 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{c as n,i as r,n as i,s as a,t as ee}from"./select.js";import{t as o}from"./cli-command-panel.js";import{c as s}from"./ec2.js";import{Oo as c,wo as l,xo as u,zi as te}from"./index.js";import{t as ne}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{a as re,i as ie,n as m,t as h}from"./zod.js";import{i as g}from"./ec22.js";import{t as _}from"./form-actions.js";var v=u(),y=c();function b(){let c=(0,v.c)(56),u=l(),b=s(),x;c[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:h(g),defaultValues:{groupName:``,strategy:`spread`}},c[0]=x):x=c[0];let{control:S,handleSubmit:C,register:w,formState:oe}=ie(x),{errors:T,isSubmitting:E}=oe,D;c[1]===S?D=c[2]:(D={control:S},c[1]=S,c[2]=D);let O=re(D),k;c[3]===O?k=c[4]:(k=e=>e?O[e]:void 0,c[3]=O,c[4]=k);let A=k,j;c[5]!==b||c[6]!==u?(j=async e=>{u({to:`/ec2/describe-placement-groups/$id`,params:{id:(await b.mutateAsync(e)).PlacementGroup?.GroupId??``}})},c[5]=b,c[6]=u,c[7]=j):j=c[7];let M=j,N,P;c[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(t,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,y.jsx)(ne,{title:`Create Placement Group`}),c[8]=N,c[9]=P):(N=c[8],P=c[9]);let F;c[10]===b.error?F=c[11]:(F=b.error&&(0,y.jsx)(e,{error:b.error,msg:`Failed to create placement group`}),c[10]=b.error,c[11]=F);let I;c[12]!==C||c[13]!==M?(I=C(M),c[12]=C,c[13]=M,c[14]=I):I=c[14];let L;c[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,y.jsx)(d,{children:(0,y.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),c[15]=L):L=c[15];let R=!!T.groupName,z;c[16]===w?z=c[17]:(z=w(`groupName`),c[16]=w,c[17]=z);let B;c[18]!==R||c[19]!==z?(B=(0,y.jsx)(te,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),c[18]=R,c[19]=z,c[20]=B):B=c[20];let V;c[21]===T.groupName?V=c[22]:(V=(0,y.jsx)(f,{errors:[T.groupName]}),c[21]=T.groupName,c[22]=V);let H;c[23]!==B||c[24]!==V?(H=(0,y.jsxs)(p,{children:[L,B,V]}),c[23]=B,c[24]=V,c[25]=H):H=c[25];let U;c[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,y.jsx)(d,{children:(0,y.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),c[26]=U):U=c[26];let W;c[27]===T.strategy?W=c[28]:(W=e=>{let{field:t}=e;return(0,y.jsxs)(ee,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(a,{"aria-invalid":!!T.strategy,className:`w-full`,id:`strategy`,children:(0,y.jsx)(n,{})}),(0,y.jsxs)(i,{children:[(0,y.jsx)(r,{value:`spread`,children:`spread`}),(0,y.jsx)(r,{value:`cluster`,children:`cluster`})]})]})},c[27]=T.strategy,c[28]=W);let G;c[29]!==S||c[30]!==W?(G=(0,y.jsx)(m,{control:S,name:`strategy`,render:W}),c[29]=S,c[30]=W,c[31]=G):G=c[31];let K;c[32]===T.strategy?K=c[33]:(K=(0,y.jsx)(f,{errors:[T.strategy]}),c[32]=T.strategy,c[33]=K);let q;c[34]!==G||c[35]!==K?(q=(0,y.jsxs)(p,{children:[U,G,K]}),c[34]=G,c[35]=K,c[36]=q):q=c[36];let J;c[37]===A?J=c[38]:(J=ae(A),c[37]=A,c[38]=J);let Y;c[39]===J?Y=c[40]:(Y=(0,y.jsx)(o,{commands:J}),c[39]=J,c[40]=Y);let X;c[41]===u?X=c[42]:(X=async()=>await u({to:`/ec2/describe-placement-groups`}),c[41]=u,c[42]=X);let Z;c[43]!==b.isPending||c[44]!==E||c[45]!==X?(Z=(0,y.jsx)(_,{isPending:b.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),c[43]=b.isPending,c[44]=E,c[45]=X,c[46]=Z):Z=c[46];let Q;c[47]!==H||c[48]!==q||c[49]!==Y||c[50]!==Z||c[51]!==I?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),c[47]=H,c[48]=q,c[49]=Y,c[50]=Z,c[51]=I,c[52]=Q):Q=c[52];let $;return c[53]!==Q||c[54]!==F?($=(0,y.jsxs)(y.Fragment,{children:[N,P,F,Q]}),c[53]=Q,c[54]=F,c[55]=$):$=c[55],$}function x(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ae(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`strategy`),i=typeof r==`string`?r:``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{c as n,i as r,n as i,s as a,t as ee}from"./select.js";import{t as o}from"./cli-command-panel.js";import{c as s}from"./ec2.js";import{Eo as c,Li as te,So as l,yo as u}from"./index.js";import{t as ne}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{a as re,i as ie,n as m,t as h}from"./zod.js";import{i as g}from"./ec22.js";import{t as _}from"./form-actions.js";var v=u(),y=c();function b(){let c=(0,v.c)(56),u=l(),b=s(),x;c[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:h(g),defaultValues:{groupName:``,strategy:`spread`}},c[0]=x):x=c[0];let{control:S,handleSubmit:C,register:w,formState:oe}=ie(x),{errors:T,isSubmitting:E}=oe,D;c[1]===S?D=c[2]:(D={control:S},c[1]=S,c[2]=D);let O=re(D),k;c[3]===O?k=c[4]:(k=e=>e?O[e]:void 0,c[3]=O,c[4]=k);let A=k,j;c[5]!==b||c[6]!==u?(j=async e=>{u({to:`/ec2/describe-placement-groups/$id`,params:{id:(await b.mutateAsync(e)).PlacementGroup?.GroupId??``}})},c[5]=b,c[6]=u,c[7]=j):j=c[7];let M=j,N,P;c[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(t,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,y.jsx)(ne,{title:`Create Placement Group`}),c[8]=N,c[9]=P):(N=c[8],P=c[9]);let F;c[10]===b.error?F=c[11]:(F=b.error&&(0,y.jsx)(e,{error:b.error,msg:`Failed to create placement group`}),c[10]=b.error,c[11]=F);let I;c[12]!==C||c[13]!==M?(I=C(M),c[12]=C,c[13]=M,c[14]=I):I=c[14];let L;c[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,y.jsx)(d,{children:(0,y.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),c[15]=L):L=c[15];let R=!!T.groupName,z;c[16]===w?z=c[17]:(z=w(`groupName`),c[16]=w,c[17]=z);let B;c[18]!==R||c[19]!==z?(B=(0,y.jsx)(te,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),c[18]=R,c[19]=z,c[20]=B):B=c[20];let V;c[21]===T.groupName?V=c[22]:(V=(0,y.jsx)(f,{errors:[T.groupName]}),c[21]=T.groupName,c[22]=V);let H;c[23]!==B||c[24]!==V?(H=(0,y.jsxs)(p,{children:[L,B,V]}),c[23]=B,c[24]=V,c[25]=H):H=c[25];let U;c[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,y.jsx)(d,{children:(0,y.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),c[26]=U):U=c[26];let W;c[27]===T.strategy?W=c[28]:(W=e=>{let{field:t}=e;return(0,y.jsxs)(ee,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(a,{"aria-invalid":!!T.strategy,className:`w-full`,id:`strategy`,children:(0,y.jsx)(n,{})}),(0,y.jsxs)(i,{children:[(0,y.jsx)(r,{value:`spread`,children:`spread`}),(0,y.jsx)(r,{value:`cluster`,children:`cluster`})]})]})},c[27]=T.strategy,c[28]=W);let G;c[29]!==S||c[30]!==W?(G=(0,y.jsx)(m,{control:S,name:`strategy`,render:W}),c[29]=S,c[30]=W,c[31]=G):G=c[31];let K;c[32]===T.strategy?K=c[33]:(K=(0,y.jsx)(f,{errors:[T.strategy]}),c[32]=T.strategy,c[33]=K);let q;c[34]!==G||c[35]!==K?(q=(0,y.jsxs)(p,{children:[U,G,K]}),c[34]=G,c[35]=K,c[36]=q):q=c[36];let J;c[37]===A?J=c[38]:(J=ae(A),c[37]=A,c[38]=J);let Y;c[39]===J?Y=c[40]:(Y=(0,y.jsx)(o,{commands:J}),c[39]=J,c[40]=Y);let X;c[41]===u?X=c[42]:(X=async()=>await u({to:`/ec2/describe-placement-groups`}),c[41]=u,c[42]=X);let Z;c[43]!==b.isPending||c[44]!==E||c[45]!==X?(Z=(0,y.jsx)(_,{isPending:b.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),c[43]=b.isPending,c[44]=E,c[45]=X,c[46]=Z):Z=c[46];let Q;c[47]!==H||c[48]!==q||c[49]!==Y||c[50]!==Z||c[51]!==I?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),c[47]=H,c[48]=q,c[49]=Y,c[50]=Z,c[51]=I,c[52]=Q):Q=c[52];let $;return c[53]!==Q||c[54]!==F?($=(0,y.jsxs)(y.Fragment,{children:[N,P,F,Q]}),c[53]=Q,c[54]=F,c[55]=$):$=c[55],$}function x(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ae(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`strategy`),i=typeof r==`string`?r:``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\
|
||||
--group-name`},{type:`value`,value:` ${n?x(n):`<GroupName>`}`},{type:`flag`,value:` \\
|
||||
--strategy`},{type:`value`,value:` ${i||`spread`}`}]}]}export{b as component};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{r}from"./iam.js";import{Oo as i,wo as a,xo as o,zi as s}from"./index.js";import{t as c}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{t as ee}from"./textarea.js";import{a as te,i as ne,t as re}from"./zod.js";import{t as ie}from"./form-actions.js";import{t as f}from"./iam2.js";var ae=o(),p=i(),oe=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function m(){let i=(0,ae.c)(67),o=a(),m=r(),h;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(h={resolver:re(f),defaultValues:{policyDocument:oe}},i[0]=h):h=i[0];let{handleSubmit:g,register:_,control:v,formState:ce}=ne(h),{errors:y,isSubmitting:b}=ce,x;i[1]===v?x=i[2]:(x={control:v},i[1]=v,i[2]=x);let S=te(x),C;i[3]===S?C=i[4]:(C=e=>e?S[e]:void 0,i[3]=S,i[4]=C);let w=C,T;i[5]!==m||i[6]!==o?(T=async e=>{await m.mutateAsync(e),o({to:`/iam/list-policies`})},i[5]=m,i[6]=o,i[7]=T):T=i[7];let E=T,D,O;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,p.jsx)(t,{to:`/iam/list-policies`,children:`Back to policies`}),O=(0,p.jsx)(c,{title:`Create Policy`}),i[8]=D,i[9]=O):(D=i[8],O=i[9]);let k;i[10]===m.error?k=i[11]:(k=m.error&&(0,p.jsx)(e,{error:m.error,msg:`Failed to create policy`}),i[10]=m.error,i[11]=k);let A;i[12]!==g||i[13]!==E?(A=g(E),i[12]=g,i[13]=E,i[14]=A):A=i[14];let j;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),i[15]=j):j=i[15];let M=!!y.policyName,N;i[16]===_?N=i[17]:(N=_(`policyName`),i[16]=_,i[17]=N);let P;i[18]!==M||i[19]!==N?(P=(0,p.jsx)(s,{"aria-invalid":M,id:`policyName`,placeholder:`my-policy...`,...N}),i[18]=M,i[19]=N,i[20]=P):P=i[20];let F;i[21]===y.policyName?F=i[22]:(F=(0,p.jsx)(u,{errors:[y.policyName]}),i[21]=y.policyName,i[22]=F);let I;i[23]!==P||i[24]!==F?(I=(0,p.jsxs)(d,{children:[j,P,F]}),i[23]=P,i[24]=F,i[25]=I):I=i[25];let L;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),i[26]=L):L=i[26];let R;i[27]===_?R=i[28]:(R=_(`description`),i[27]=_,i[28]=R);let z;i[29]===R?z=i[30]:(z=(0,p.jsx)(s,{id:`description`,placeholder:`A brief description of this policy...`,...R}),i[29]=R,i[30]=z);let B;i[31]===y.description?B=i[32]:(B=(0,p.jsx)(u,{errors:[y.description]}),i[31]=y.description,i[32]=B);let V;i[33]!==z||i[34]!==B?(V=(0,p.jsxs)(d,{children:[L,z,B]}),i[33]=z,i[34]=B,i[35]=V):V=i[35];let H;i[36]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),i[36]=H):H=i[36];let U=!!y.policyDocument,W;i[37]===_?W=i[38]:(W=_(`policyDocument`),i[37]=_,i[38]=W);let G;i[39]!==U||i[40]!==W?(G=(0,p.jsx)(ee,{"aria-invalid":U,className:`font-mono text-sm`,id:`policyDocument`,rows:15,...W}),i[39]=U,i[40]=W,i[41]=G):G=i[41];let K;i[42]===y.policyDocument?K=i[43]:(K=(0,p.jsx)(u,{errors:[y.policyDocument]}),i[42]=y.policyDocument,i[43]=K);let q;i[44]!==G||i[45]!==K?(q=(0,p.jsxs)(d,{children:[H,G,K]}),i[44]=G,i[45]=K,i[46]=q):q=i[46];let J;i[47]===w?J=i[48]:(J=se(w),i[47]=w,i[48]=J);let Y;i[49]===J?Y=i[50]:(Y=(0,p.jsx)(n,{commands:J}),i[49]=J,i[50]=Y);let X;i[51]===o?X=i[52]:(X=async()=>await o({to:`/iam/list-policies`}),i[51]=o,i[52]=X);let Z;i[53]!==m.isPending||i[54]!==b||i[55]!==X?(Z=(0,p.jsx)(ie,{isPending:m.isPending,isSubmitting:b,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),i[53]=m.isPending,i[54]=b,i[55]=X,i[56]=Z):Z=i[56];let Q;i[57]!==I||i[58]!==V||i[59]!==q||i[60]!==Y||i[61]!==Z||i[62]!==A?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,V,q,Y,Z]}),i[57]=I,i[58]=V,i[59]=q,i[60]=Y,i[61]=Z,i[62]=A,i[63]=Q):Q=i[63];let $;return i[64]!==Q||i[65]!==k?($=(0,p.jsxs)(p.Fragment,{children:[D,O,k,Q]}),i[64]=Q,i[65]=k,i[66]=$):$=i[66],$}function se(e){let t=e(`policyName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`policyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{r}from"./iam.js";import{Eo as i,Li as a,So as o,yo as s}from"./index.js";import{t as c}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{t as ee}from"./textarea.js";import{a as te,i as ne,t as re}from"./zod.js";import{t as ie}from"./form-actions.js";import{t as f}from"./iam2.js";var ae=s(),p=i(),oe=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function m(){let i=(0,ae.c)(67),s=o(),m=r(),h;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(h={resolver:re(f),defaultValues:{policyDocument:oe}},i[0]=h):h=i[0];let{handleSubmit:g,register:_,control:v,formState:ce}=ne(h),{errors:y,isSubmitting:b}=ce,x;i[1]===v?x=i[2]:(x={control:v},i[1]=v,i[2]=x);let S=te(x),C;i[3]===S?C=i[4]:(C=e=>e?S[e]:void 0,i[3]=S,i[4]=C);let w=C,T;i[5]!==m||i[6]!==s?(T=async e=>{await m.mutateAsync(e),s({to:`/iam/list-policies`})},i[5]=m,i[6]=s,i[7]=T):T=i[7];let E=T,D,O;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,p.jsx)(t,{to:`/iam/list-policies`,children:`Back to policies`}),O=(0,p.jsx)(c,{title:`Create Policy`}),i[8]=D,i[9]=O):(D=i[8],O=i[9]);let k;i[10]===m.error?k=i[11]:(k=m.error&&(0,p.jsx)(e,{error:m.error,msg:`Failed to create policy`}),i[10]=m.error,i[11]=k);let A;i[12]!==g||i[13]!==E?(A=g(E),i[12]=g,i[13]=E,i[14]=A):A=i[14];let j;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),i[15]=j):j=i[15];let M=!!y.policyName,N;i[16]===_?N=i[17]:(N=_(`policyName`),i[16]=_,i[17]=N);let P;i[18]!==M||i[19]!==N?(P=(0,p.jsx)(a,{"aria-invalid":M,id:`policyName`,placeholder:`my-policy...`,...N}),i[18]=M,i[19]=N,i[20]=P):P=i[20];let F;i[21]===y.policyName?F=i[22]:(F=(0,p.jsx)(u,{errors:[y.policyName]}),i[21]=y.policyName,i[22]=F);let I;i[23]!==P||i[24]!==F?(I=(0,p.jsxs)(d,{children:[j,P,F]}),i[23]=P,i[24]=F,i[25]=I):I=i[25];let L;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),i[26]=L):L=i[26];let R;i[27]===_?R=i[28]:(R=_(`description`),i[27]=_,i[28]=R);let z;i[29]===R?z=i[30]:(z=(0,p.jsx)(a,{id:`description`,placeholder:`A brief description of this policy...`,...R}),i[29]=R,i[30]=z);let B;i[31]===y.description?B=i[32]:(B=(0,p.jsx)(u,{errors:[y.description]}),i[31]=y.description,i[32]=B);let V;i[33]!==z||i[34]!==B?(V=(0,p.jsxs)(d,{children:[L,z,B]}),i[33]=z,i[34]=B,i[35]=V):V=i[35];let H;i[36]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),i[36]=H):H=i[36];let U=!!y.policyDocument,W;i[37]===_?W=i[38]:(W=_(`policyDocument`),i[37]=_,i[38]=W);let G;i[39]!==U||i[40]!==W?(G=(0,p.jsx)(ee,{"aria-invalid":U,className:`font-mono text-sm`,id:`policyDocument`,rows:15,...W}),i[39]=U,i[40]=W,i[41]=G):G=i[41];let K;i[42]===y.policyDocument?K=i[43]:(K=(0,p.jsx)(u,{errors:[y.policyDocument]}),i[42]=y.policyDocument,i[43]=K);let q;i[44]!==G||i[45]!==K?(q=(0,p.jsxs)(d,{children:[H,G,K]}),i[44]=G,i[45]=K,i[46]=q):q=i[46];let J;i[47]===w?J=i[48]:(J=se(w),i[47]=w,i[48]=J);let Y;i[49]===J?Y=i[50]:(Y=(0,p.jsx)(n,{commands:J}),i[49]=J,i[50]=Y);let X;i[51]===s?X=i[52]:(X=async()=>await s({to:`/iam/list-policies`}),i[51]=s,i[52]=X);let Z;i[53]!==m.isPending||i[54]!==b||i[55]!==X?(Z=(0,p.jsx)(ie,{isPending:m.isPending,isSubmitting:b,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),i[53]=m.isPending,i[54]=b,i[55]=X,i[56]=Z):Z=i[56];let Q;i[57]!==I||i[58]!==V||i[59]!==q||i[60]!==Y||i[61]!==Z||i[62]!==A?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,V,q,Y,Z]}),i[57]=I,i[58]=V,i[59]=q,i[60]=Y,i[61]=Z,i[62]=A,i[63]=Q):Q=i[63];let $;return i[64]!==Q||i[65]!==k?($=(0,p.jsxs)(p.Fragment,{children:[D,O,k,Q]}),i[64]=Q,i[65]=k,i[66]=$):$=i[66],$}function se(e){let t=e(`policyName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`policyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\
|
||||
--policy-name`},{type:`value`,value:` ${n||`<PolicyName>`}`}];return i&&s.push({type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${i}"`}),s.push({type:`flag`,value:` \\
|
||||
--policy-document`},{type:`value`,value:` '${o||`<PolicyDocument>`}'`}),[{label:`Create Policy`,parts:s}]}export{m as component};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as ee}from"./back-link.js";import{c as n,i as r,n as i,s as a,t as o}from"./select.js";import{t as te}from"./cli-command-panel.js";import{l as ne}from"./ec2.js";import{Ja as s,Oo as c,it as re,wo as ie,xo as l,zi as ae}from"./index.js";import{t as oe}from"./page-heading.js";import{a as se,r as ce,t as u}from"./field.js";import{a as le,i as ue,n as de,t as fe}from"./zod.js";import{a as pe}from"./ec22.js";import{t as me}from"./form-actions.js";var he=l(),d=c();function f(){let r=(0,he.c)(73),s=ie(),{data:c}=t(re),l=ne(),f;r[0]===c.Vpcs?f=r[1]:(f=c.Vpcs??[],r[0]=c.Vpcs,r[1]=f);let p=f,m;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=fe(pe),r[2]=m):m=r[2];let h=p[0]?.VpcId??``,g;r[3]===h?g=r[4]:(g={resolver:m,defaultValues:{groupName:``,description:``,vpcId:h}},r[3]=h,r[4]=g);let{control:_,handleSubmit:v,register:y,formState:ve}=ue(g),{errors:b,isSubmitting:x}=ve,S;r[5]===_?S=r[6]:(S={control:_},r[5]=_,r[6]=S);let ye=le(S),C;r[7]===ye?C=r[8]:(C=e=>e?ye[e]:void 0,r[7]=ye,r[8]=C);let w=C,T;r[9]!==l||r[10]!==s?(T=async e=>{let t=(await l.mutateAsync(e)).GroupId;s(t?{to:`/ec2/describe-security-groups/$id`,params:{id:t}}:{to:`/ec2/describe-security-groups`})},r[9]=l,r[10]=s,r[11]=T):T=r[11];let E=T,D,O;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,d.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,d.jsx)(oe,{title:`Create Security Group`}),r[12]=D,r[13]=O):(D=r[12],O=r[13]);let k;r[14]===l.error?k=r[15]:(k=l.error&&(0,d.jsx)(e,{error:l.error,msg:`Failed to create security group`}),r[14]=l.error,r[15]=k);let A;r[16]!==v||r[17]!==E?(A=v(E),r[16]=v,r[17]=E,r[18]=A):A=r[18];let j;r[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,d.jsx)(se,{children:(0,d.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),r[19]=j):j=r[19];let M=!!b.groupName,N;r[20]===y?N=r[21]:(N=y(`groupName`),r[20]=y,r[21]=N);let P;r[22]!==M||r[23]!==N?(P=(0,d.jsx)(ae,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),r[22]=M,r[23]=N,r[24]=P):P=r[24];let F;r[25]===b.groupName?F=r[26]:(F=(0,d.jsx)(ce,{errors:[b.groupName]}),r[25]=b.groupName,r[26]=F);let I;r[27]!==P||r[28]!==F?(I=(0,d.jsxs)(u,{children:[j,P,F]}),r[27]=P,r[28]=F,r[29]=I):I=r[29];let L;r[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,d.jsx)(se,{children:(0,d.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),r[30]=L):L=r[30];let R=!!b.description,z;r[31]===y?z=r[32]:(z=y(`description`),r[31]=y,r[32]=z);let B;r[33]!==R||r[34]!==z?(B=(0,d.jsx)(ae,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),r[33]=R,r[34]=z,r[35]=B):B=r[35];let V;r[36]===b.description?V=r[37]:(V=(0,d.jsx)(ce,{errors:[b.description]}),r[36]=b.description,r[37]=V);let H;r[38]!==B||r[39]!==V?(H=(0,d.jsxs)(u,{children:[L,B,V]}),r[38]=B,r[39]=V,r[40]=H):H=r[40];let U;r[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,d.jsx)(se,{children:(0,d.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),r[41]=U):U=r[41];let W;r[42]!==b.vpcId||r[43]!==p?(W=e=>{let{field:t}=e;return(0,d.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,d.jsx)(a,{"aria-invalid":!!b.vpcId,className:`w-full`,id:`vpcId`,children:(0,d.jsx)(n,{})}),(0,d.jsx)(i,{children:p.map(ge)})]})},r[42]=b.vpcId,r[43]=p,r[44]=W):W=r[44];let G;r[45]!==_||r[46]!==W?(G=(0,d.jsx)(de,{control:_,name:`vpcId`,render:W}),r[45]=_,r[46]=W,r[47]=G):G=r[47];let K;r[48]===b.vpcId?K=r[49]:(K=(0,d.jsx)(ce,{errors:[b.vpcId]}),r[48]=b.vpcId,r[49]=K);let q;r[50]!==G||r[51]!==K?(q=(0,d.jsxs)(u,{children:[U,G,K]}),r[50]=G,r[51]=K,r[52]=q):q=r[52];let J;r[53]===w?J=r[54]:(J=_e(w),r[53]=w,r[54]=J);let Y;r[55]===J?Y=r[56]:(Y=(0,d.jsx)(te,{commands:J}),r[55]=J,r[56]=Y);let X;r[57]===s?X=r[58]:(X=async()=>await s({to:`/ec2/describe-security-groups`}),r[57]=s,r[58]=X);let Z;r[59]!==l.isPending||r[60]!==x||r[61]!==X?(Z=(0,d.jsx)(me,{isPending:l.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),r[59]=l.isPending,r[60]=x,r[61]=X,r[62]=Z):Z=r[62];let Q;r[63]!==A||r[64]!==I||r[65]!==H||r[66]!==q||r[67]!==Y||r[68]!==Z?(Q=(0,d.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),r[63]=A,r[64]=I,r[65]=H,r[66]=q,r[67]=Y,r[68]=Z,r[69]=Q):Q=r[69];let $;return r[70]!==k||r[71]!==Q?($=(0,d.jsxs)(d.Fragment,{children:[D,O,k,Q]}),r[70]=k,r[71]=Q,r[72]=$):$=r[72],$}function ge(e){let t=s(e.Tags);return(0,d.jsx)(r,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function _e(e){let t=e(`groupName`),ee=typeof t==`string`?t:``,n=e(`description`),r=typeof n==`string`?n:``,i=e(`vpcId`),a=typeof i==`string`?i:``,o=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as ee}from"./back-link.js";import{c as n,i as r,n as i,s as a,t as o}from"./select.js";import{t as te}from"./cli-command-panel.js";import{l as ne}from"./ec2.js";import{Eo as s,Ka as c,Li as re,So as ie,at as ae,yo as l}from"./index.js";import{t as oe}from"./page-heading.js";import{a as se,r as ce,t as u}from"./field.js";import{a as le,i as ue,n as de,t as fe}from"./zod.js";import{a as pe}from"./ec22.js";import{t as me}from"./form-actions.js";var he=l(),d=s();function f(){let r=(0,he.c)(73),s=ie(),{data:c}=t(ae),l=ne(),f;r[0]===c.Vpcs?f=r[1]:(f=c.Vpcs??[],r[0]=c.Vpcs,r[1]=f);let p=f,m;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(m=fe(pe),r[2]=m):m=r[2];let h=p[0]?.VpcId??``,g;r[3]===h?g=r[4]:(g={resolver:m,defaultValues:{groupName:``,description:``,vpcId:h}},r[3]=h,r[4]=g);let{control:_,handleSubmit:v,register:y,formState:ve}=ue(g),{errors:b,isSubmitting:x}=ve,S;r[5]===_?S=r[6]:(S={control:_},r[5]=_,r[6]=S);let ye=le(S),C;r[7]===ye?C=r[8]:(C=e=>e?ye[e]:void 0,r[7]=ye,r[8]=C);let w=C,T;r[9]!==l||r[10]!==s?(T=async e=>{let t=(await l.mutateAsync(e)).GroupId;s(t?{to:`/ec2/describe-security-groups/$id`,params:{id:t}}:{to:`/ec2/describe-security-groups`})},r[9]=l,r[10]=s,r[11]=T):T=r[11];let E=T,D,O;r[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,d.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,d.jsx)(oe,{title:`Create Security Group`}),r[12]=D,r[13]=O):(D=r[12],O=r[13]);let k;r[14]===l.error?k=r[15]:(k=l.error&&(0,d.jsx)(e,{error:l.error,msg:`Failed to create security group`}),r[14]=l.error,r[15]=k);let A;r[16]!==v||r[17]!==E?(A=v(E),r[16]=v,r[17]=E,r[18]=A):A=r[18];let j;r[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,d.jsx)(se,{children:(0,d.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),r[19]=j):j=r[19];let M=!!b.groupName,N;r[20]===y?N=r[21]:(N=y(`groupName`),r[20]=y,r[21]=N);let P;r[22]!==M||r[23]!==N?(P=(0,d.jsx)(re,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),r[22]=M,r[23]=N,r[24]=P):P=r[24];let F;r[25]===b.groupName?F=r[26]:(F=(0,d.jsx)(ce,{errors:[b.groupName]}),r[25]=b.groupName,r[26]=F);let I;r[27]!==P||r[28]!==F?(I=(0,d.jsxs)(u,{children:[j,P,F]}),r[27]=P,r[28]=F,r[29]=I):I=r[29];let L;r[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,d.jsx)(se,{children:(0,d.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),r[30]=L):L=r[30];let R=!!b.description,z;r[31]===y?z=r[32]:(z=y(`description`),r[31]=y,r[32]=z);let B;r[33]!==R||r[34]!==z?(B=(0,d.jsx)(re,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),r[33]=R,r[34]=z,r[35]=B):B=r[35];let V;r[36]===b.description?V=r[37]:(V=(0,d.jsx)(ce,{errors:[b.description]}),r[36]=b.description,r[37]=V);let H;r[38]!==B||r[39]!==V?(H=(0,d.jsxs)(u,{children:[L,B,V]}),r[38]=B,r[39]=V,r[40]=H):H=r[40];let U;r[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,d.jsx)(se,{children:(0,d.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),r[41]=U):U=r[41];let W;r[42]!==b.vpcId||r[43]!==p?(W=e=>{let{field:t}=e;return(0,d.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,d.jsx)(a,{"aria-invalid":!!b.vpcId,className:`w-full`,id:`vpcId`,children:(0,d.jsx)(n,{})}),(0,d.jsx)(i,{children:p.map(ge)})]})},r[42]=b.vpcId,r[43]=p,r[44]=W):W=r[44];let G;r[45]!==_||r[46]!==W?(G=(0,d.jsx)(de,{control:_,name:`vpcId`,render:W}),r[45]=_,r[46]=W,r[47]=G):G=r[47];let K;r[48]===b.vpcId?K=r[49]:(K=(0,d.jsx)(ce,{errors:[b.vpcId]}),r[48]=b.vpcId,r[49]=K);let q;r[50]!==G||r[51]!==K?(q=(0,d.jsxs)(u,{children:[U,G,K]}),r[50]=G,r[51]=K,r[52]=q):q=r[52];let J;r[53]===w?J=r[54]:(J=_e(w),r[53]=w,r[54]=J);let Y;r[55]===J?Y=r[56]:(Y=(0,d.jsx)(te,{commands:J}),r[55]=J,r[56]=Y);let X;r[57]===s?X=r[58]:(X=async()=>await s({to:`/ec2/describe-security-groups`}),r[57]=s,r[58]=X);let Z;r[59]!==l.isPending||r[60]!==x||r[61]!==X?(Z=(0,d.jsx)(me,{isPending:l.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),r[59]=l.isPending,r[60]=x,r[61]=X,r[62]=Z):Z=r[62];let Q;r[63]!==A||r[64]!==I||r[65]!==H||r[66]!==q||r[67]!==Y||r[68]!==Z?(Q=(0,d.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),r[63]=A,r[64]=I,r[65]=H,r[66]=q,r[67]=Y,r[68]=Z,r[69]=Q):Q=r[69];let $;return r[70]!==k||r[71]!==Q?($=(0,d.jsxs)(d.Fragment,{children:[D,O,k,Q]}),r[70]=k,r[71]=Q,r[72]=$):$=r[72],$}function ge(e){let t=c(e.Tags);return(0,d.jsx)(r,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function _e(e){let t=e(`groupName`),ee=typeof t==`string`?t:``,n=e(`description`),r=typeof n==`string`?n:``,i=e(`vpcId`),a=typeof i==`string`?i:``,o=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\
|
||||
--group-name`},{type:`value`,value:` ${ee||`<GroupName>`}`},{type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${r||`<Description>`}"`}];return a&&o.push({type:`flag`,value:` \\
|
||||
--vpc-id`},{type:`value`,value:` ${a}`}),[{label:`Create Security Group`,parts:o}]}export{f as component};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as ee,t as o}from"./select.js";import{t as te}from"./cli-command-panel.js";import{u as s}from"./ec2.js";import{F as c,Oo as l,nt as ne,wo as re,xo as u}from"./index.js";import{t as ie}from"./page-heading.js";import{a as d,r as ae,t as f}from"./field.js";import{t as oe}from"./textarea.js";import{a as se,i as ce,n as p,t as le}from"./zod.js";import{o as ue}from"./ec22.js";import{t as m}from"./form-actions.js";var h=u(),g=l();function _(){let i=(0,h.c)(55),l=re(),{data:u}=t(ne),_=s(),y;i[0]===u.Volumes?y=i[1]:(y=u.Volumes??[],i[0]=u.Volumes,i[1]=y);let b=y,{volumeId:fe}=c.useSearch(),x=fe??b[0]?.VolumeId??``,S;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=le(ue),i[2]=S):S=i[2];let C;i[3]===x?C=i[4]:(C={resolver:S,defaultValues:{volumeId:x,description:``}},i[3]=x,i[4]=C);let{control:w,handleSubmit:T,register:E,formState:D}=ce(C),{errors:O,isSubmitting:k}=D,A;i[5]===w?A=i[6]:(A={control:w},i[5]=w,i[6]=A);let j=se(A),M;i[7]===j?M=i[8]:(M=e=>e?j[e]:void 0,i[7]=j,i[8]=M);let N=M,P;i[9]!==_||i[10]!==l?(P=async e=>{await _.mutateAsync(e),l({to:`/ec2/describe-snapshots`})},i[9]=_,i[10]=l,i[11]=P):P=i[11];let F=P,I,L;i[12]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,g.jsx)(ie,{title:`Create Snapshot`}),i[12]=I,i[13]=L):(I=i[12],L=i[13]);let R;i[14]===_.error?R=i[15]:(R=_.error&&(0,g.jsx)(e,{error:_.error,msg:`Failed to create snapshot`}),i[14]=_.error,i[15]=R);let z;i[16]!==T||i[17]!==F?(z=T(F),i[16]=T,i[17]=F,i[18]=z):z=i[18];let B;i[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),i[19]=B):B=i[19];let V;i[20]!==O.volumeId||i[21]!==b?(V=e=>{let{field:t}=e;return(0,g.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,g.jsx)(ee,{"aria-invalid":!!O.volumeId,className:`w-full`,id:`volumeId`,children:(0,g.jsx)(r,{})}),(0,g.jsx)(a,{children:b.map(de)})]})},i[20]=O.volumeId,i[21]=b,i[22]=V):V=i[22];let H;i[23]!==w||i[24]!==V?(H=(0,g.jsx)(p,{control:w,name:`volumeId`,render:V}),i[23]=w,i[24]=V,i[25]=H):H=i[25];let U;i[26]===O.volumeId?U=i[27]:(U=(0,g.jsx)(ae,{errors:[O.volumeId]}),i[26]=O.volumeId,i[27]=U);let W;i[28]!==H||i[29]!==U?(W=(0,g.jsxs)(f,{children:[B,H,U]}),i[28]=H,i[29]=U,i[30]=W):W=i[30];let G;i[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),i[31]=G):G=i[31];let K;i[32]===E?K=i[33]:(K=E(`description`),i[32]=E,i[33]=K);let q;i[34]===K?q=i[35]:(q=(0,g.jsxs)(f,{children:[G,(0,g.jsx)(oe,{id:`description`,placeholder:`Snapshot description`,...K})]}),i[34]=K,i[35]=q);let J;i[36]===N?J=i[37]:(J=v(N),i[36]=N,i[37]=J);let Y;i[38]===J?Y=i[39]:(Y=(0,g.jsx)(te,{commands:J}),i[38]=J,i[39]=Y);let X;i[40]===l?X=i[41]:(X=async()=>await l({to:`/ec2/describe-snapshots`}),i[40]=l,i[41]=X);let Z;i[42]!==_.isPending||i[43]!==k||i[44]!==X?(Z=(0,g.jsx)(m,{isPending:_.isPending,isSubmitting:k,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),i[42]=_.isPending,i[43]=k,i[44]=X,i[45]=Z):Z=i[45];let Q;i[46]!==z||i[47]!==W||i[48]!==q||i[49]!==Y||i[50]!==Z?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),i[46]=z,i[47]=W,i[48]=q,i[49]=Y,i[50]=Z,i[51]=Q):Q=i[51];let $;return i[52]!==Q||i[53]!==R?($=(0,g.jsxs)(g.Fragment,{children:[I,L,R,Q]}),i[52]=Q,i[53]=R,i[54]=$):$=i[54],$}function de(e){return(0,g.jsxs)(i,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function v(e){let t=e(`volumeId`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as a,s as ee,t as o}from"./select.js";import{t as te}from"./cli-command-panel.js";import{u as s}from"./ec2.js";import{Eo as c,I as l,So as ne,rt as re,yo as u}from"./index.js";import{t as ie}from"./page-heading.js";import{a as d,r as ae,t as f}from"./field.js";import{t as oe}from"./textarea.js";import{a as se,i as ce,n as p,t as le}from"./zod.js";import{o as ue}from"./ec22.js";import{t as m}from"./form-actions.js";var h=u(),g=c();function _(){let i=(0,h.c)(55),c=ne(),{data:u}=t(re),_=s(),y;i[0]===u.Volumes?y=i[1]:(y=u.Volumes??[],i[0]=u.Volumes,i[1]=y);let b=y,{volumeId:fe}=l.useSearch(),x=fe??b[0]?.VolumeId??``,S;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=le(ue),i[2]=S):S=i[2];let C;i[3]===x?C=i[4]:(C={resolver:S,defaultValues:{volumeId:x,description:``}},i[3]=x,i[4]=C);let{control:w,handleSubmit:T,register:E,formState:D}=ce(C),{errors:O,isSubmitting:k}=D,A;i[5]===w?A=i[6]:(A={control:w},i[5]=w,i[6]=A);let j=se(A),M;i[7]===j?M=i[8]:(M=e=>e?j[e]:void 0,i[7]=j,i[8]=M);let N=M,P;i[9]!==_||i[10]!==c?(P=async e=>{await _.mutateAsync(e),c({to:`/ec2/describe-snapshots`})},i[9]=_,i[10]=c,i[11]=P):P=i[11];let F=P,I,L;i[12]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,g.jsx)(ie,{title:`Create Snapshot`}),i[12]=I,i[13]=L):(I=i[12],L=i[13]);let R;i[14]===_.error?R=i[15]:(R=_.error&&(0,g.jsx)(e,{error:_.error,msg:`Failed to create snapshot`}),i[14]=_.error,i[15]=R);let z;i[16]!==T||i[17]!==F?(z=T(F),i[16]=T,i[17]=F,i[18]=z):z=i[18];let B;i[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),i[19]=B):B=i[19];let V;i[20]!==O.volumeId||i[21]!==b?(V=e=>{let{field:t}=e;return(0,g.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,g.jsx)(ee,{"aria-invalid":!!O.volumeId,className:`w-full`,id:`volumeId`,children:(0,g.jsx)(r,{})}),(0,g.jsx)(a,{children:b.map(de)})]})},i[20]=O.volumeId,i[21]=b,i[22]=V):V=i[22];let H;i[23]!==w||i[24]!==V?(H=(0,g.jsx)(p,{control:w,name:`volumeId`,render:V}),i[23]=w,i[24]=V,i[25]=H):H=i[25];let U;i[26]===O.volumeId?U=i[27]:(U=(0,g.jsx)(ae,{errors:[O.volumeId]}),i[26]=O.volumeId,i[27]=U);let W;i[28]!==H||i[29]!==U?(W=(0,g.jsxs)(f,{children:[B,H,U]}),i[28]=H,i[29]=U,i[30]=W):W=i[30];let G;i[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),i[31]=G):G=i[31];let K;i[32]===E?K=i[33]:(K=E(`description`),i[32]=E,i[33]=K);let q;i[34]===K?q=i[35]:(q=(0,g.jsxs)(f,{children:[G,(0,g.jsx)(oe,{id:`description`,placeholder:`Snapshot description`,...K})]}),i[34]=K,i[35]=q);let J;i[36]===N?J=i[37]:(J=v(N),i[36]=N,i[37]=J);let Y;i[38]===J?Y=i[39]:(Y=(0,g.jsx)(te,{commands:J}),i[38]=J,i[39]=Y);let X;i[40]===c?X=i[41]:(X=async()=>await c({to:`/ec2/describe-snapshots`}),i[40]=c,i[41]=X);let Z;i[42]!==_.isPending||i[43]!==k||i[44]!==X?(Z=(0,g.jsx)(m,{isPending:_.isPending,isSubmitting:k,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),i[42]=_.isPending,i[43]=k,i[44]=X,i[45]=Z):Z=i[45];let Q;i[46]!==z||i[47]!==W||i[48]!==q||i[49]!==Y||i[50]!==Z?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),i[46]=z,i[47]=W,i[48]=q,i[49]=Y,i[50]=Z,i[51]=Q):Q=i[51];let $;return i[52]!==Q||i[53]!==R?($=(0,g.jsxs)(g.Fragment,{children:[I,L,R,Q]}),i[52]=Q,i[53]=R,i[54]=$):$=i[54],$}function de(e){return(0,g.jsxs)(i,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function v(e){let t=e(`volumeId`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\
|
||||
--volume-id`},{type:`value`,value:` ${n||`<VolumeId>`}`}];return i&&a.push({type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${i}"`}),[{label:`Create Snapshot`,parts:a}]}export{_ as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1,14 +1,14 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{i}from"./elbv2.js";import{Oo as a,it as o,wo as s}from"./index.js";import{t as c}from"./page-heading.js";import{i as l,t as u}from"./zod.js";import{t as d}from"./form-actions.js";import{t as f}from"./target-group-form.js";import{a as p}from"./elbv22.js";var m=a();function h(){let a=s(),{data:h}=t(o),_=i(),v=h.Vpcs??[],y=l({resolver:u(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)(n,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(c,{title:`Create Target Group`}),_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async e=>{try{let t=(await _.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;a(t?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(t)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(r,{commands:g(x)}),(0,m.jsx)(d,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await a({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{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{t as r}from"./cli-command-panel.js";import{i}from"./elbv2.js";import{Eo as a,So as o,at as s}from"./index.js";import{t as c}from"./page-heading.js";import{i as l,t as u}from"./zod.js";import{t as d}from"./form-actions.js";import{t as f}from"./target-group-form.js";import{a as p}from"./elbv22.js";var m=a();function h(){let a=o(),{data:h}=t(s),_=i(),v=h.Vpcs??[],y=l({resolver:u(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)(n,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(c,{title:`Create Target Group`}),_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async e=>{try{let t=(await _.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;a(t?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(t)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(r,{commands:g(x)}),(0,m.jsx)(d,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await a({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:` \\
|
||||
--name`},{type:`value`,value:` ${r||`<Name>`}`},{type:`flag`,value:` \\
|
||||
--protocol`},{type:`value`,value:` ${i}`},{type:`flag`,value:` \\
|
||||
--port`},{type:`value`,value:` ${a??80}`},{type:`flag`,value:` \\
|
||||
--target-type`},{type:`value`,value:` instance`}];return o&&h.push({type:`flag`,value:` \\
|
||||
--vpc-id`},{type:`value`,value:` ${o}`}),h.push({type:`flag`,value:` \\
|
||||
--health-check-protocol`},{type:`value`,value:` ${s}`},{type:`flag`,value:` \\
|
||||
--health-check-path`},{type:`value`,value:` ${c}`},{type:`flag`,value:` \\
|
||||
--target-type`},{type:`value`,value:` instance`}];o&&h.push({type:`flag`,value:` \\
|
||||
--vpc-id`},{type:`value`,value:` ${o}`});let g=s===`HTTP`;return h.push({type:`flag`,value:` \\
|
||||
--health-check-protocol`},{type:`value`,value:` ${s}`}),g&&h.push({type:`flag`,value:` \\
|
||||
--health-check-path`},{type:`value`,value:` ${c}`}),h.push({type:`flag`,value:` \\
|
||||
--health-check-port`},{type:`value`,value:` ${l}`},{type:`flag`,value:` \\
|
||||
--health-check-interval-seconds`},{type:`value`,value:` ${u??30}`},{type:`flag`,value:` \\
|
||||
--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}`},{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};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{i as r}from"./iam.js";import{Oo as i,wo as a,xo as o,zi as s}from"./index.js";import{t as ee}from"./page-heading.js";import{a as c,r as l,t as u}from"./field.js";import{a as d,i as f,t as p}from"./zod.js";import{t as m}from"./form-actions.js";import{n as h}from"./iam2.js";var g=o(),_=i();function v(){let i=(0,g.c)(55),o=a(),v=r(),b;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:p(h)},i[0]=b):b=i[0];let{handleSubmit:x,register:S,control:C,formState:w}=f(b),{errors:T,isSubmitting:E}=w,D;i[1]===C?D=i[2]:(D={control:C},i[1]=C,i[2]=D);let O=d(D),k;i[3]===O?k=i[4]:(k=e=>e?O[e]:void 0,i[3]=O,i[4]=k);let A=k,j;i[5]!==v||i[6]!==o?(j=async e=>{await v.mutateAsync(e),o({to:`/iam/list-users`})},i[5]=v,i[6]=o,i[7]=j):j=i[7];let M=j,N,P;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(t,{to:`/iam/list-users`,children:`Back to users`}),P=(0,_.jsx)(ee,{title:`Create User`}),i[8]=N,i[9]=P):(N=i[8],P=i[9]);let F;i[10]===v.error?F=i[11]:(F=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create user`}),i[10]=v.error,i[11]=F);let I;i[12]!==x||i[13]!==M?(I=x(M),i[12]=x,i[13]=M,i[14]=I):I=i[14];let L;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),i[15]=L):L=i[15];let R=!!T.userName,z;i[16]===S?z=i[17]:(z=S(`userName`),i[16]=S,i[17]=z);let B;i[18]!==R||i[19]!==z?(B=(0,_.jsx)(s,{"aria-invalid":R,id:`userName`,placeholder:`my-user...`,...z}),i[18]=R,i[19]=z,i[20]=B):B=i[20];let V;i[21]===T.userName?V=i[22]:(V=(0,_.jsx)(l,{errors:[T.userName]}),i[21]=T.userName,i[22]=V);let H;i[23]!==B||i[24]!==V?(H=(0,_.jsxs)(u,{children:[L,B,V]}),i[23]=B,i[24]=V,i[25]=H):H=i[25];let U;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),i[26]=U):U=i[26];let W;i[27]===S?W=i[28]:(W=S(`path`),i[27]=S,i[28]=W);let G;i[29]===W?G=i[30]:(G=(0,_.jsx)(s,{id:`path`,placeholder:`/`,...W}),i[29]=W,i[30]=G);let K;i[31]===T.path?K=i[32]:(K=(0,_.jsx)(l,{errors:[T.path]}),i[31]=T.path,i[32]=K);let q;i[33]!==G||i[34]!==K?(q=(0,_.jsxs)(u,{children:[U,G,K]}),i[33]=G,i[34]=K,i[35]=q):q=i[35];let J;i[36]===A?J=i[37]:(J=y(A),i[36]=A,i[37]=J);let Y;i[38]===J?Y=i[39]:(Y=(0,_.jsx)(n,{commands:J}),i[38]=J,i[39]=Y);let X;i[40]===o?X=i[41]:(X=async()=>await o({to:`/iam/list-users`}),i[40]=o,i[41]=X);let Z;i[42]!==v.isPending||i[43]!==E||i[44]!==X?(Z=(0,_.jsx)(m,{isPending:v.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create User`}),i[42]=v.isPending,i[43]=E,i[44]=X,i[45]=Z):Z=i[45];let Q;i[46]!==H||i[47]!==q||i[48]!==Y||i[49]!==Z||i[50]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),i[46]=H,i[47]=q,i[48]=Y,i[49]=Z,i[50]=I,i[51]=Q):Q=i[51];let $;return i[52]!==Q||i[53]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),i[52]=Q,i[53]=F,i[54]=$):$=i[54],$}function y(e){let t=e(`userName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${n||`<UserName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create User`,parts:a}]}export{v as component};
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{i as r}from"./iam.js";import{Eo as i,Li as a,So as o,yo as s}from"./index.js";import{t as ee}from"./page-heading.js";import{a as c,r as l,t as u}from"./field.js";import{a as d,i as f,t as p}from"./zod.js";import{t as m}from"./form-actions.js";import{n as h}from"./iam2.js";var g=s(),_=i();function v(){let i=(0,g.c)(55),s=o(),v=r(),b;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:p(h)},i[0]=b):b=i[0];let{handleSubmit:x,register:S,control:C,formState:w}=f(b),{errors:T,isSubmitting:E}=w,D;i[1]===C?D=i[2]:(D={control:C},i[1]=C,i[2]=D);let O=d(D),k;i[3]===O?k=i[4]:(k=e=>e?O[e]:void 0,i[3]=O,i[4]=k);let A=k,j;i[5]!==v||i[6]!==s?(j=async e=>{await v.mutateAsync(e),s({to:`/iam/list-users`})},i[5]=v,i[6]=s,i[7]=j):j=i[7];let M=j,N,P;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(t,{to:`/iam/list-users`,children:`Back to users`}),P=(0,_.jsx)(ee,{title:`Create User`}),i[8]=N,i[9]=P):(N=i[8],P=i[9]);let F;i[10]===v.error?F=i[11]:(F=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create user`}),i[10]=v.error,i[11]=F);let I;i[12]!==x||i[13]!==M?(I=x(M),i[12]=x,i[13]=M,i[14]=I):I=i[14];let L;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),i[15]=L):L=i[15];let R=!!T.userName,z;i[16]===S?z=i[17]:(z=S(`userName`),i[16]=S,i[17]=z);let B;i[18]!==R||i[19]!==z?(B=(0,_.jsx)(a,{"aria-invalid":R,id:`userName`,placeholder:`my-user...`,...z}),i[18]=R,i[19]=z,i[20]=B):B=i[20];let V;i[21]===T.userName?V=i[22]:(V=(0,_.jsx)(l,{errors:[T.userName]}),i[21]=T.userName,i[22]=V);let H;i[23]!==B||i[24]!==V?(H=(0,_.jsxs)(u,{children:[L,B,V]}),i[23]=B,i[24]=V,i[25]=H):H=i[25];let U;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),i[26]=U):U=i[26];let W;i[27]===S?W=i[28]:(W=S(`path`),i[27]=S,i[28]=W);let G;i[29]===W?G=i[30]:(G=(0,_.jsx)(a,{id:`path`,placeholder:`/`,...W}),i[29]=W,i[30]=G);let K;i[31]===T.path?K=i[32]:(K=(0,_.jsx)(l,{errors:[T.path]}),i[31]=T.path,i[32]=K);let q;i[33]!==G||i[34]!==K?(q=(0,_.jsxs)(u,{children:[U,G,K]}),i[33]=G,i[34]=K,i[35]=q):q=i[35];let J;i[36]===A?J=i[37]:(J=y(A),i[36]=A,i[37]=J);let Y;i[38]===J?Y=i[39]:(Y=(0,_.jsx)(n,{commands:J}),i[38]=J,i[39]=Y);let X;i[40]===s?X=i[41]:(X=async()=>await s({to:`/iam/list-users`}),i[40]=s,i[41]=X);let Z;i[42]!==v.isPending||i[43]!==E||i[44]!==X?(Z=(0,_.jsx)(m,{isPending:v.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create User`}),i[42]=v.isPending,i[43]=E,i[44]=X,i[45]=Z):Z=i[45];let Q;i[46]!==H||i[47]!==q||i[48]!==Y||i[49]!==Z||i[50]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),i[46]=H,i[47]=q,i[48]=Y,i[49]=Z,i[50]=I,i[51]=Q):Q=i[51];let $;return i[52]!==Q||i[53]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),i[52]=Q,i[53]=F,i[54]=$):$=i[54],$}function y(e){let t=e(`userName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${n||`<UserName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create User`,parts:a}]}export{v as component};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as ee,s as a,t as te}from"./select.js";import{t as o}from"./cli-command-panel.js";import{f as ne}from"./ec2.js";import{Oo as s,R as re,wo as ie,xo as c,zi as l}from"./index.js";import{t as u}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{i as m,n as h,t as g}from"./zod.js";import{c as ae}from"./ec22.js";import{t as oe}from"./form-actions.js";var se=c(),_=s();function v(){let i=(0,se.c)(57),s=ie(),{data:c}=t(re),v=ne(),y;i[0]===c.AvailabilityZones?y=i[1]:(y=c.AvailabilityZones??[],i[0]=c.AvailabilityZones,i[1]=y);let b=y,x=b[0]?.ZoneName??``,S;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=g(ae),i[2]=S):S=i[2];let C;i[3]===x?C=i[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},i[3]=x,i[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=m(C),{errors:k,isSubmitting:A}=O,j;i[5]!==v||i[6]!==s?(j=async e=>{await v.mutateAsync(e),s({to:`/ec2/describe-volumes`})},i[5]=v,i[6]=s,i[7]=j):j=i[7];let M=j,N,P;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(n,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,_.jsx)(u,{title:`Create Volume`}),i[8]=N,i[9]=P):(N=i[8],P=i[9]);let F;i[10]===v.error?F=i[11]:(F=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create volume`}),i[10]=v.error,i[11]=F);let I;i[12]!==T||i[13]!==M?(I=T(M),i[12]=T,i[13]=M,i[14]=I):I=i[14];let L;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),i[15]=L):L=i[15];let R=!!k.size,z;i[16]===E?z=i[17]:(z=E(`size`,{valueAsNumber:!0}),i[16]=E,i[17]=z);let B;i[18]!==R||i[19]!==z?(B=(0,_.jsx)(l,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),i[18]=R,i[19]=z,i[20]=B):B=i[20];let V;i[21]===k.size?V=i[22]:(V=(0,_.jsx)(f,{errors:[k.size]}),i[21]=k.size,i[22]=V);let H;i[23]!==B||i[24]!==V?(H=(0,_.jsxs)(p,{children:[L,B,V]}),i[23]=B,i[24]=V,i[25]=H):H=i[25];let U;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),i[26]=U):U=i[26];let W;i[27]!==b||i[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,_.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,_.jsx)(a,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,_.jsx)(r,{})}),(0,_.jsx)(ee,{children:b.map(ce)})]})},i[27]=b,i[28]=k.availabilityZone,i[29]=W):W=i[29];let G;i[30]!==w||i[31]!==W?(G=(0,_.jsx)(h,{control:w,name:`availabilityZone`,render:W}),i[30]=w,i[31]=W,i[32]=G):G=i[32];let K;i[33]===k.availabilityZone?K=i[34]:(K=(0,_.jsx)(f,{errors:[k.availabilityZone]}),i[33]=k.availabilityZone,i[34]=K);let q;i[35]!==G||i[36]!==K?(q=(0,_.jsxs)(p,{children:[U,G,K]}),i[35]=G,i[36]=K,i[37]=q):q=i[37];let J;i[38]===D?J=i[39]:(J=le(D),i[38]=D,i[39]=J);let Y;i[40]===J?Y=i[41]:(Y=(0,_.jsx)(o,{commands:J}),i[40]=J,i[41]=Y);let X;i[42]===s?X=i[43]:(X=async()=>await s({to:`/ec2/describe-volumes`}),i[42]=s,i[43]=X);let Z;i[44]!==v.isPending||i[45]!==A||i[46]!==X?(Z=(0,_.jsx)(oe,{isPending:v.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),i[44]=v.isPending,i[45]=A,i[46]=X,i[47]=Z):Z=i[47];let Q;i[48]!==H||i[49]!==q||i[50]!==Y||i[51]!==Z||i[52]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),i[48]=H,i[49]=q,i[50]=Y,i[51]=Z,i[52]=I,i[53]=Q):Q=i[53];let $;return i[54]!==Q||i[55]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),i[54]=Q,i[55]=F,i[56]=$):$=i[56],$}function ce(e){return(0,_.jsx)(i,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function le(e){let t=e(`size`),n=typeof t==`number`?t:0,r=e(`availabilityZone`),i=typeof r==`string`?r:``;return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\
|
||||
import{t as e}from"./error-banner.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./back-link.js";import{c as r,i,n as ee,s as a,t as te}from"./select.js";import{t as o}from"./cli-command-panel.js";import{f as ne}from"./ec2.js";import{Eo as s,Li as re,So as ie,yo as c,z as l}from"./index.js";import{t as u}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{i as m,n as h,t as g}from"./zod.js";import{c as ae}from"./ec22.js";import{t as oe}from"./form-actions.js";var se=c(),_=s();function v(){let i=(0,se.c)(57),s=ie(),{data:c}=t(l),v=ne(),y;i[0]===c.AvailabilityZones?y=i[1]:(y=c.AvailabilityZones??[],i[0]=c.AvailabilityZones,i[1]=y);let b=y,x=b[0]?.ZoneName??``,S;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=g(ae),i[2]=S):S=i[2];let C;i[3]===x?C=i[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},i[3]=x,i[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=m(C),{errors:k,isSubmitting:A}=O,j;i[5]!==v||i[6]!==s?(j=async e=>{await v.mutateAsync(e),s({to:`/ec2/describe-volumes`})},i[5]=v,i[6]=s,i[7]=j):j=i[7];let M=j,N,P;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(n,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,_.jsx)(u,{title:`Create Volume`}),i[8]=N,i[9]=P):(N=i[8],P=i[9]);let F;i[10]===v.error?F=i[11]:(F=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create volume`}),i[10]=v.error,i[11]=F);let I;i[12]!==T||i[13]!==M?(I=T(M),i[12]=T,i[13]=M,i[14]=I):I=i[14];let L;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),i[15]=L):L=i[15];let R=!!k.size,z;i[16]===E?z=i[17]:(z=E(`size`,{valueAsNumber:!0}),i[16]=E,i[17]=z);let B;i[18]!==R||i[19]!==z?(B=(0,_.jsx)(re,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),i[18]=R,i[19]=z,i[20]=B):B=i[20];let V;i[21]===k.size?V=i[22]:(V=(0,_.jsx)(f,{errors:[k.size]}),i[21]=k.size,i[22]=V);let H;i[23]!==B||i[24]!==V?(H=(0,_.jsxs)(p,{children:[L,B,V]}),i[23]=B,i[24]=V,i[25]=H):H=i[25];let U;i[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),i[26]=U):U=i[26];let W;i[27]!==b||i[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,_.jsxs)(te,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,_.jsx)(a,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,_.jsx)(r,{})}),(0,_.jsx)(ee,{children:b.map(ce)})]})},i[27]=b,i[28]=k.availabilityZone,i[29]=W):W=i[29];let G;i[30]!==w||i[31]!==W?(G=(0,_.jsx)(h,{control:w,name:`availabilityZone`,render:W}),i[30]=w,i[31]=W,i[32]=G):G=i[32];let K;i[33]===k.availabilityZone?K=i[34]:(K=(0,_.jsx)(f,{errors:[k.availabilityZone]}),i[33]=k.availabilityZone,i[34]=K);let q;i[35]!==G||i[36]!==K?(q=(0,_.jsxs)(p,{children:[U,G,K]}),i[35]=G,i[36]=K,i[37]=q):q=i[37];let J;i[38]===D?J=i[39]:(J=le(D),i[38]=D,i[39]=J);let Y;i[40]===J?Y=i[41]:(Y=(0,_.jsx)(o,{commands:J}),i[40]=J,i[41]=Y);let X;i[42]===s?X=i[43]:(X=async()=>await s({to:`/ec2/describe-volumes`}),i[42]=s,i[43]=X);let Z;i[44]!==v.isPending||i[45]!==A||i[46]!==X?(Z=(0,_.jsx)(oe,{isPending:v.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),i[44]=v.isPending,i[45]=A,i[46]=X,i[47]=Z):Z=i[47];let Q;i[48]!==H||i[49]!==q||i[50]!==Y||i[51]!==Z||i[52]!==I?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),i[48]=H,i[49]=q,i[50]=Y,i[51]=Z,i[52]=I,i[53]=Q):Q=i[53];let $;return i[54]!==Q||i[55]!==F?($=(0,_.jsxs)(_.Fragment,{children:[N,P,F,Q]}),i[54]=Q,i[55]=F,i[56]=$):$=i[56],$}function ce(e){return(0,_.jsx)(i,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function le(e){let t=e(`size`),n=typeof t==`number`?t:0,r=e(`availabilityZone`),i=typeof r==`string`?r:``;return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\
|
||||
--size`},{type:`value`,value:` ${n||1}`},{type:`flag`,value:` \\
|
||||
--availability-zone`},{type:`value`,value:` ${i||`<AvailabilityZone>`}`}]}]}export{v as component};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{Oo as e,xo as t}from"./index.js";import{a as n,i as r,l as i,n as a,o,r as s,s as c,t as l}from"./alert-dialog.js";var u=t(),d=e();function f(e){let t=(0,u.c)(19),{open:f,onOpenChange:p,title:m,description:h,isPending:g,onConfirm:_,confirmLabel:v,pendingLabel:y}=e,b=v===void 0?`Delete`:v,x=y===void 0?`Deleting…`:y,S;t[0]===m?S=t[1]:(S=(0,d.jsx)(i,{children:m}),t[0]=m,t[1]=S);let C;t[2]===h?C=t[3]:(C=(0,d.jsx)(n,{children:h}),t[2]=h,t[3]=C);let w;t[4]!==S||t[5]!==C?(w=(0,d.jsxs)(c,{children:[S,C]}),t[4]=S,t[5]=C,t[6]=w):w=t[6];let T;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,d.jsx)(s,{children:`Cancel`}),t[7]=T):T=t[7];let E=g?x:b,D;t[8]!==g||t[9]!==_||t[10]!==E?(D=(0,d.jsxs)(o,{children:[T,(0,d.jsx)(a,{disabled:g,onClick:_,children:E})]}),t[8]=g,t[9]=_,t[10]=E,t[11]=D):D=t[11];let O;t[12]!==w||t[13]!==D?(O=(0,d.jsxs)(r,{children:[w,D]}),t[12]=w,t[13]=D,t[14]=O):O=t[14];let k;return t[15]!==p||t[16]!==f||t[17]!==O?(k=(0,d.jsx)(l,{onOpenChange:p,open:f,children:O}),t[15]=p,t[16]=f,t[17]=O,t[18]=k):k=t[18],k}export{f as t};
|
||||
import{Eo as e,yo as t}from"./index.js";import{a as n,i as r,l as i,n as a,o,r as s,s as c,t as l}from"./alert-dialog.js";var u=t(),d=e();function f(e){let t=(0,u.c)(19),{open:f,onOpenChange:p,title:m,description:h,isPending:g,onConfirm:_,confirmLabel:v,pendingLabel:y}=e,b=v===void 0?`Delete`:v,x=y===void 0?`Deleting…`:y,S;t[0]===m?S=t[1]:(S=(0,d.jsx)(i,{children:m}),t[0]=m,t[1]=S);let C;t[2]===h?C=t[3]:(C=(0,d.jsx)(n,{children:h}),t[2]=h,t[3]=C);let w;t[4]!==S||t[5]!==C?(w=(0,d.jsxs)(c,{children:[S,C]}),t[4]=S,t[5]=C,t[6]=w):w=t[6];let T;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,d.jsx)(s,{children:`Cancel`}),t[7]=T):T=t[7];let E=g?x:b,D;t[8]!==g||t[9]!==_||t[10]!==E?(D=(0,d.jsxs)(o,{children:[T,(0,d.jsx)(a,{disabled:g,onClick:_,children:E})]}),t[8]=g,t[9]=_,t[10]=E,t[11]=D):D=t[11];let O;t[12]!==w||t[13]!==D?(O=(0,d.jsxs)(r,{children:[w,D]}),t[12]=w,t[13]=D,t[14]=O):O=t[14];let k;return t[15]!==p||t[16]!==f||t[17]!==O?(k=(0,d.jsx)(l,{onOpenChange:p,open:f,children:O}),t[15]=p,t[16]=f,t[17]=O,t[18]=k):k=t[18],k}export{f as t};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{B as t,Oo as n,xo as r}from"./index.js";import{t as i}from"./page-heading.js";import{t as a}from"./state-badge.js";import{t as o}from"./system-managed.js";import{t as s}from"./list-card.js";var c=r(),l=n();function u(){let n=(0,c.c)(3),{data:r}=e(t),a;if(n[0]!==r.Images){let e=(r.Images??[]).filter(f),t;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,l.jsx)(i,{title:`Images`}),n[2]=t):t=n[2],a=(0,l.jsxs)(l.Fragment,{children:[t,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),n[0]=r.Images,n[1]=a}else a=n[1];return a}function d(e){return e.ImageId?(0,l.jsx)(s,{badge:(0,l.jsx)(a,{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!o(e)}export{u as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,V as n,yo as r}from"./index.js";import{t as i}from"./page-heading.js";import{t as a}from"./state-badge.js";import{t as o}from"./system-managed.js";import{t as s}from"./list-card.js";var c=r(),l=t();function u(){let t=(0,c.c)(3),{data:r}=e(n),a;if(t[0]!==r.Images){let e=(r.Images??[]).filter(f),n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(i,{title:`Images`}),t[2]=n):n=t[2],a=(0,l.jsxs)(l.Fragment,{children:[n,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),t[0]=r.Images,t[1]=a}else a=t[1];return a}function d(e){return e.ImageId?(0,l.jsx)(s,{badge:(0,l.jsx)(a,{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!o(e)}export{u as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Oo as n,U as r,xo as i,za as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./list-card.js";var l=i(),u=n(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let n=(0,l.c)(3),{data:i}=e(r),s;if(n[0]!==i.Reservations){let e=(i.Reservations?.flatMap(h)??[]).toSorted(m),r;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,u.jsx)(o,{actions:(0,u.jsx)(t,{to:`/ec2/run-instances`,children:(0,u.jsx)(a,{children:`Run Instances`})}),title:`Instances`}),n[2]=r):r=n[2],s=(0,u.jsxs)(u.Fragment,{children:[r,e.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:e.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),n[0]=i.Reservations,n[1]=s}else s=n[1];return s}function p(e){return e.InstanceId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType}`,title:e.InstanceId,to:`/ec2/describe-instances/$id`},e.InstanceId):null}function m(e,t){let n=d[e.State?.Name??``]??6,r=d[t.State?.Name??``]??6;return n===r?(e.InstanceId??``).localeCompare(t.InstanceId??``):n-r}function h(e){return e.Instances??[]}export{f as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,La as n,W as r,xo as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./list-card.js";var l=a(),u=t(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let t=(0,l.c)(3),{data:a}=e(r),s;if(t[0]!==a.Reservations){let e=(a.Reservations?.flatMap(h)??[]).toSorted(m),r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,u.jsx)(o,{actions:(0,u.jsx)(i,{to:`/ec2/run-instances`,children:(0,u.jsx)(n,{children:`Run Instances`})}),title:`Instances`}),t[2]=r):r=t[2],s=(0,u.jsxs)(u.Fragment,{children:[r,e.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:e.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),t[0]=a.Reservations,t[1]=s}else s=t[1];return s}function p(e){return e.InstanceId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType}`,title:e.InstanceId,to:`/ec2/describe-instances/$id`},e.InstanceId):null}function m(e,t){let n=d[e.State?.Name??``]??6,r=d[t.State?.Name??``]??6;return n===r?(e.InstanceId??``).localeCompare(t.InstanceId??``):n-r}function h(e){return e.Instances??[]}export{f as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,G as n,Oo as r,xo as i,za as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=i(),l=r();function u(){let r=(0,c.c)(4),{data:i}=e(n),s;if(r[0]!==i.KeyPairs){let e=(i.KeyPairs??[]).toSorted(f),n;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(t,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(a,{variant:`outline`,children:`Import Key Pair`})}),r[2]=n):n=r[2];let c;r[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[n,(0,l.jsx)(t,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(a,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),r[3]=c):c=r[3],s=(0,l.jsxs)(l.Fragment,{children:[c,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),r[0]=i.KeyPairs,r[1]=s}else s=r[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};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,K as n,La as r,xo as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=a(),l=t();function u(){let t=(0,c.c)(4),{data:a}=e(n),s;if(t[0]!==a.KeyPairs){let e=(a.KeyPairs??[]).toSorted(f),n;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(i,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(r,{variant:`outline`,children:`Import Key Pair`})}),t[2]=n):n=t[2];let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[n,(0,l.jsx)(i,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(r,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),t[3]=c):c=t[3],s=(0,l.jsxs)(l.Fragment,{children:[c,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),t[0]=a.KeyPairs,t[1]=s}else s=t[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};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Ga as n,O as r,Oo as i,wo as a,xo as o,za as s}from"./index.js";import{t as c}from"./page-heading.js";import{t as l}from"./state-badge.js";var u=o(),d=i();function f(){let i=(0,u.c)(10),o=a(),{data:f}=e(r),m;i[0]===f.LoadBalancers?m=i[1]:(m=f.LoadBalancers??[],i[0]=f.LoadBalancers,i[1]=m);let h=m,g;i[2]===o?g=i[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(s,{onClick:async()=>await o({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),i[2]=o,i[3]=g);let _;i[4]!==h||i[5]!==o?(_=h.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:`DNS Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`State`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Scheme`}),(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:`Created`})]})}),(0,d.jsx)(`tbody`,{children:h.map(e=>{if(!e.LoadBalancerArn)return null;let r=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await o({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(r)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(t,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(r)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??r})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(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 text-xs`,children:n(e.CreatedTime)})]},r)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),i[4]=h,i[5]=o,i[6]=_):_=i[6];let v;return i[7]!==g||i[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),i[7]=g,i[8]=_,i[9]=v):v=i[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,La as n,O as r,So as i,Ua as a,xo as o,yo as s}from"./index.js";import{t as c}from"./page-heading.js";import{t as l}from"./state-badge.js";var u=s(),d=t();function f(){let t=(0,u.c)(10),s=i(),{data:f}=e(r),m;t[0]===f.LoadBalancers?m=t[1]:(m=f.LoadBalancers??[],t[0]=f.LoadBalancers,t[1]=m);let h=m,g;t[2]===s?g=t[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(n,{onClick:async()=>await s({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),t[2]=s,t[3]=g);let _;t[4]!==h||t[5]!==s?(_=h.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:`DNS Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`State`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Scheme`}),(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:`Created`})]})}),(0,d.jsx)(`tbody`,{children:h.map(e=>{if(!e.LoadBalancerArn)return null;let t=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await s({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(t)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(o,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(t)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??t})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(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 text-xs`,children:a(e.CreatedTime)})]},t)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),t[4]=h,t[5]=s,t[6]=_):_=t[6];let v;return t[7]!==g||t[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),t[7]=g,t[8]=_,t[9]=v):v=t[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Oo as n,q as r,xo as i,za as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./list-card.js";var l=i(),u=n();function d(){let n=(0,l.c)(5),{data:i}=e(r),s;n[0]===i.PlacementGroups?s=n[1]:(s=i.PlacementGroups??[],n[0]=i.PlacementGroups,n[1]=s);let c=s,d;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(t,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(a,{children:`Create Placement Group`})}),title:`Placement Groups`}),n[2]=d):d=n[2];let p;return n[3]===c?p=n[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No placement groups found.`})]}),n[3]=c,n[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.State}),params:{id:e.GroupId},subtitle:`${e.Strategy} \u2022 ${e.GroupId}`,title:e.GroupName??e.GroupId,to:`/ec2/describe-placement-groups/$id`},e.GroupId):null}export{d as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,J as n,La as r,xo as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./list-card.js";var l=a(),u=t();function d(){let t=(0,l.c)(5),{data:a}=e(n),s;t[0]===a.PlacementGroups?s=t[1]:(s=a.PlacementGroups??[],t[0]=a.PlacementGroups,t[1]=s);let c=s,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(i,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(r,{children:`Create Placement Group`})}),title:`Placement Groups`}),t[2]=d):d=t[2];let p;return t[3]===c?p=t[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No placement groups found.`})]}),t[3]=c,t[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.State}),params:{id:e.GroupId},subtitle:`${e.Strategy} \u2022 ${e.GroupId}`,title:e.GroupName??e.GroupId,to:`/ec2/describe-placement-groups/$id`},e.GroupId):null}export{d as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Oo as n,X as r,xo as i,za as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=i(),l=n();function u(){let n=(0,c.c)(5),{data:i}=e(r),s;n[0]===i.SecurityGroups?s=n[1]:(s=i.SecurityGroups??[],n[0]=i.SecurityGroups,n[1]=s);let u=s,f;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(o,{actions:(0,l.jsx)(t,{to:`/ec2/create-security-group`,children:(0,l.jsx)(a,{children:`Create Security Group`})}),title:`Security Groups`}),n[2]=f):f=n[2];let p;return n[3]===u?p=n[4]:(p=(0,l.jsxs)(l.Fragment,{children:[f,u.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:u.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No security groups found.`})]}),n[3]=u,n[4]=p),p}function d(e){return e.GroupId?(0,l.jsx)(s,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:e.GroupName?`${e.GroupId} (${e.GroupName})`:e.GroupId,to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{u as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,La as n,Z as r,xo as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=a(),l=t();function u(){let t=(0,c.c)(5),{data:a}=e(r),s;t[0]===a.SecurityGroups?s=t[1]:(s=a.SecurityGroups??[],t[0]=a.SecurityGroups,t[1]=s);let u=s,f;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(o,{actions:(0,l.jsx)(i,{to:`/ec2/create-security-group`,children:(0,l.jsx)(n,{children:`Create Security Group`})}),title:`Security Groups`}),t[2]=f):f=t[2];let p;return t[3]===u?p=t[4]:(p=(0,l.jsxs)(l.Fragment,{children:[f,u.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:u.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No security groups found.`})]}),t[3]=u,t[4]=p),p}function d(e){return e.GroupId?(0,l.jsx)(s,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:e.GroupName?`${e.GroupId} (${e.GroupName})`:e.GroupId,to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{u as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Oo as n,Q as r,xo as i,za as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./list-card.js";var l=i(),u=n();function d(){let n=(0,l.c)(5),{data:i}=e(r),s;n[0]===i.Snapshots?s=n[1]:(s=i.Snapshots??[],n[0]=i.Snapshots,n[1]=s);let c=s,d;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(t,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(a,{children:`Create Snapshot`})}),title:`Snapshots`}),n[2]=d):d=n[2];let p;return n[3]===c?p=n[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots found.`})]}),n[3]=c,n[4]=p),p}function f(e){return e.SnapshotId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.State}),params:{id:e.SnapshotId},subtitle:`${e.VolumeSize} GiB \u2022 ${e.VolumeId}`,title:e.SnapshotId,to:`/ec2/describe-snapshots/$id`},e.SnapshotId):null}export{d as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{$ as t,Eo as n,La as r,xo as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./list-card.js";var l=a(),u=n();function d(){let n=(0,l.c)(5),{data:a}=e(t),s;n[0]===a.Snapshots?s=n[1]:(s=a.Snapshots??[],n[0]=a.Snapshots,n[1]=s);let c=s,d;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(i,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(r,{children:`Create Snapshot`})}),title:`Snapshots`}),n[2]=d):d=n[2];let p;return n[3]===c?p=n[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No snapshots found.`})]}),n[3]=c,n[4]=p),p}function f(e){return e.SnapshotId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.State}),params:{id:e.SnapshotId},subtitle:`${e.VolumeSize} GiB \u2022 ${e.VolumeId}`,title:e.SnapshotId,to:`/ec2/describe-snapshots/$id`},e.SnapshotId):null}export{d as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Ja as n,Oo as r,et as i,xo as a,za as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./state-badge.js";import{t as l}from"./list-card.js";var u=a(),d=r();function f(){let n=(0,u.c)(5),{data:r}=e(i),a;n[0]===r.Subnets?a=n[1]:(a=r.Subnets??[],n[0]=r.Subnets,n[1]=a);let c=a,l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(t,{to:`/ec2/create-subnet`,children:(0,d.jsx)(o,{children:`Create Subnet`})}),title:`Subnets`}),n[2]=l):l=n[2];let f;return n[3]===c?f=n[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets found.`})]}),n[3]=c,n[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=n(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??``} \u2022 ${e.AvailabilityZone??``}`,title:t?`${e.SubnetId} (${t})`:e.SubnetId,to:`/ec2/describe-subnets/$id`},e.SubnetId)}export{f as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,Ka as n,La as r,tt as i,xo as a,yo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./state-badge.js";import{t as l}from"./list-card.js";var u=o(),d=t();function f(){let t=(0,u.c)(5),{data:n}=e(i),o;t[0]===n.Subnets?o=t[1]:(o=n.Subnets??[],t[0]=n.Subnets,t[1]=o);let c=o,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(a,{to:`/ec2/create-subnet`,children:(0,d.jsx)(r,{children:`Create Subnet`})}),title:`Subnets`}),t[2]=l):l=t[2];let f;return t[3]===c?f=t[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No subnets found.`})]}),t[3]=c,t[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=n(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??``} \u2022 ${e.AvailabilityZone??``}`,title:t?`${e.SubnetId} (${t})`:e.SubnetId,to:`/ec2/describe-subnets/$id`},e.SubnetId)}export{f as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{t as e}from"./useQuery.js";import{t}from"./useSuspenseQuery.js";import{Co as n,N as r,Oo as i,P as a,wo as o,xo as s,za as c}from"./index.js";import{t as l}from"./page-heading.js";var u=s(),d=i();function f(){let e=(0,u.c)(6),i=o(),{data:a}=t(r),s;e[0]===a.TargetGroups?s=e[1]:(s=a.TargetGroups??[],e[0]=a.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)(n,{to:`/ec2/create-target-group`,children:(0,d.jsx)(c,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==i||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 t=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await i({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(t)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(n,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(t)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??t})}),(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:t})]},t)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=i,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(t){let n=(0,u.c)(13),{arn:r}=t,i;n[0]===r?i=n[1]:(i=a(r),n[0]=r,n[1]=i);let{data:o,isLoading:s}=e(i);if(s){let e;return n[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:`…`})]}),n[2]=e):e=n[2],e}let c,l;if(n[3]!==o?.TargetHealthDescriptions){c=o?.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(`, `)||`—`,n[3]=o?.TargetHealthDescriptions,n[4]=c,n[5]=l}else c=n[4],l=n[5];let f=l,p;n[6]===c.length?p=n[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:c.length}),n[6]=c.length,n[7]=p);let m;n[8]===f?m=n[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),n[8]=f,n[9]=m);let g;return n[10]!==p||n[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),n[10]=p,n[11]=m,n[12]=g):g=n[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component};
|
||||
import{t as e}from"./useQuery.js";import{t}from"./useSuspenseQuery.js";import{Eo as n,La as r,N as i,P as a,So as o,xo as s,yo as c}from"./index.js";import{t as l}from"./page-heading.js";var u=c(),d=n();function f(){let e=(0,u.c)(6),n=o(),{data:a}=t(i),c;e[0]===a.TargetGroups?c=e[1]:(c=a.TargetGroups??[],e[0]=a.TargetGroups,e[1]=c);let f=c,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(s,{to:`/ec2/create-target-group`,children:(0,d.jsx)(r,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==n||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 t=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await n({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(t)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(s,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(t)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??t})}),(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:t})]},t)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=n,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(t){let n=(0,u.c)(13),{arn:r}=t,i;n[0]===r?i=n[1]:(i=a(r),n[0]=r,n[1]=i);let{data:o,isLoading:s}=e(i);if(s){let e;return n[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:`…`})]}),n[2]=e):e=n[2],e}let c,l;if(n[3]!==o?.TargetHealthDescriptions){c=o?.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(`, `)||`—`,n[3]=o?.TargetHealthDescriptions,n[4]=c,n[5]=l}else c=n[4],l=n[5];let f=l,p;n[6]===c.length?p=n[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:c.length}),n[6]=c.length,n[7]=p);let m;n[8]===f?m=n[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),n[8]=f,n[9]=m);let g;return n[10]!==p||n[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),n[10]=p,n[11]=m,n[12]=g):g=n[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Oo as n,nt as r,xo as i,za as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./list-card.js";var l=i(),u=n();function d(){let n=(0,l.c)(5),{data:i}=e(r),s;n[0]===i.Volumes?s=n[1]:(s=i.Volumes??[],n[0]=i.Volumes,n[1]=s);let c=s,d;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(t,{to:`/ec2/create-volume`,children:(0,u.jsx)(a,{children:`Create Volume`})}),title:`Volumes`}),n[2]=d):d=n[2];let p;return n[3]===c?p=n[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No volumes found.`})]}),n[3]=c,n[4]=p),p}function f(e){return e.VolumeId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,La as n,rt as r,xo as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import{t as c}from"./list-card.js";var l=a(),u=t();function d(){let t=(0,l.c)(5),{data:a}=e(r),s;t[0]===a.Volumes?s=t[1]:(s=a.Volumes??[],t[0]=a.Volumes,t[1]=s);let c=s,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(i,{to:`/ec2/create-volume`,children:(0,u.jsx)(n,{children:`Create Volume`})}),title:`Volumes`}),t[2]=d):d=t[2];let p;return t[3]===c?p=t[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No volumes found.`})]}),t[3]=c,t[4]=p),p}function f(e){return e.VolumeId?(0,u.jsx)(c,{badge:(0,u.jsx)(s,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Ja as n,Oo as r,it as i,xo as a,za as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./state-badge.js";import{t as l}from"./list-card.js";var u=a(),d=r();function f(){let n=(0,u.c)(5),{data:r}=e(i),a;n[0]===r.Vpcs?a=n[1]:(a=r.Vpcs??[],n[0]=r.Vpcs,n[1]=a);let c=a,l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(t,{to:`/ec2/create-vpc`,children:(0,d.jsx)(o,{children:`Create VPC`})}),title:`VPCs`}),n[2]=l):l=n[2];let f;return n[3]===c?f=n[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No VPCs found.`})]}),n[3]=c,n[4]=f),f}function p(e){if(!e.VpcId)return null;let t=n(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:t?`${e.VpcId} (${t})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,Ka as n,La as r,at as i,xo as a,yo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./state-badge.js";import{t as l}from"./list-card.js";var u=o(),d=t();function f(){let t=(0,u.c)(5),{data:n}=e(i),o;t[0]===n.Vpcs?o=t[1]:(o=n.Vpcs??[],t[0]=n.Vpcs,t[1]=o);let c=o,l;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(a,{to:`/ec2/create-vpc`,children:(0,d.jsx)(r,{children:`Create VPC`})}),title:`VPCs`}),t[2]=l):l=t[2];let f;return t[3]===c?f=t[4]:(f=(0,d.jsxs)(d.Fragment,{children:[l,c.length>0?(0,d.jsx)(`div`,{className:`space-y-4`,children:c.map(p)}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No VPCs found.`})]}),t[3]=c,t[4]=f),f}function p(e){if(!e.VpcId)return null;let t=n(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:t?`${e.VpcId} (${t})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component};
|
||||
@@ -1 +1 @@
|
||||
import{Oo as e,xo as t}from"./index.js";var n=t(),r=e();function i(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`rounded-lg border bg-card`,children:i}),t[0]=i,t[1]=a),a}function a(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`border-b p-4`,children:(0,r.jsx)(`h2`,{className:`font-semibold`,children:i})}),t[0]=i,t[1]=a),a}function o(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`grid gap-4 p-4 sm:grid-cols-2`,children:i}),t[0]=i,t[1]=a),a}var s=Object.assign(i,{Header:a,Content:o});function c(e){let t=(0,n.c)(9),{label:i,value:a}=e,o;t[0]===i?o=t[1]:(o=(0,r.jsx)(`dt`,{className:`text-sm text-muted-foreground`,children:i}),t[0]=i,t[1]=o);let s;t[2]===a?s=t[3]:(s=a||(0,r.jsx)(`span`,{className:`text-muted-foreground`,children:`—`}),t[2]=a,t[3]=s);let c;t[4]===s?c=t[5]:(c=(0,r.jsx)(`dd`,{className:`mt-1 font-mono text-sm`,children:s}),t[4]=s,t[5]=c);let l;return t[6]!==o||t[7]!==c?(l=(0,r.jsxs)(`div`,{children:[o,c]}),t[6]=o,t[7]=c,t[8]=l):l=t[8],l}export{s as n,c as t};
|
||||
import{Eo as e,yo as t}from"./index.js";var n=t(),r=e();function i(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`rounded-lg border bg-card`,children:i}),t[0]=i,t[1]=a),a}function a(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`border-b p-4`,children:(0,r.jsx)(`h2`,{className:`font-semibold`,children:i})}),t[0]=i,t[1]=a),a}function o(e){let t=(0,n.c)(2),{children:i}=e,a;return t[0]===i?a=t[1]:(a=(0,r.jsx)(`div`,{className:`grid gap-4 p-4 sm:grid-cols-2`,children:i}),t[0]=i,t[1]=a),a}var s=Object.assign(i,{Header:a,Content:o});function c(e){let t=(0,n.c)(9),{label:i,value:a}=e,o;t[0]===i?o=t[1]:(o=(0,r.jsx)(`dt`,{className:`text-sm text-muted-foreground`,children:i}),t[0]=i,t[1]=o);let s;t[2]===a?s=t[3]:(s=a||(0,r.jsx)(`span`,{className:`text-muted-foreground`,children:`—`}),t[2]=a,t[3]=s);let c;t[4]===s?c=t[5]:(c=(0,r.jsx)(`dd`,{className:`mt-1 font-mono text-sm`,children:s}),t[4]=s,t[5]=c);let l;return t[6]!==o||t[7]!==c?(l=(0,r.jsxs)(`div`,{children:[o,c]}),t[6]=o,t[7]=c,t[8]=l):l=t[8],l}export{s as n,c as t};
|
||||
@@ -1 +1 @@
|
||||
import{uo as e}from"./index.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t};
|
||||
import{co as e}from"./index.js";var t=e(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]);export{t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{F as e,I as t,P as n}from"./ec2.js";import{Ar as r,Dr as i,Er as a,Mr as o,Or as s,Tr as c,kr as l}from"./index.js";var u=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/,d=o().min(1,`Key name is required`).max(255,`Key name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Key name contains invalid characters`),f=[`gp3`],p=r({imageId:o(`Please select an Image`),instanceType:o(`Please select an instance type`),keyName:o(`Please select a key pair`).min(1,`Key pair is required`),subnetId:o().optional(),placementGroupName:o().optional(),count:s(`Instance count must be a whole number`).min(1,`Instance count must be at least 1`),rootDeviceName:o().optional(),rootVolumeSize:l().int(`Volume size must be a whole number`).min(1,`Volume size must be at least 1 GiB`).max(16384,`Volume size must be at most 16384 GiB`).optional(),rootVolumeType:c(f).optional(),rootDeleteOnTermination:i().optional()}),m=r({keyName:d}),h=r({keyName:d,publicKeyMaterial:o().min(1,`Public key is required`).refine(e=>e.trim().length>0,`Public key cannot be empty`)}),g=r({size:l().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`).max(16384,`Size must be at most 16384 GiB`),availabilityZone:o().min(1,`Availability zone is required`)}),_=r({size:l().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`)}),v=r({volumeId:o().min(1,`Volume is required`),description:o().optional()});r({sourceSnapshotId:o().min(1,`Source snapshot is required`),sourceRegion:o().min(1,`Source region is required`),description:o().optional()}),r({volumeId:o().min(1,`Volume is required`),instanceId:o().min(1,`Instance is required`),device:o().optional()}),r({volumeId:o().min(1,`Volume is required`),instanceId:o().optional(),force:i().optional()}),r({instanceType:o().min(1,`Instance type is required`)}),r({name:o().min(1,`Name is required`),description:o().optional()});var y=r({vpcId:o().min(1,`VPC is required`),cidrBlock:o().min(1,`CIDR block is required`).regex(u,`Must be a valid CIDR block (e.g. 10.0.1.0/24)`),availabilityZone:o().optional()});r({cidrBlock:o().min(1,`CIDR block is required`).regex(u,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`),name:o().optional()});var b=r({key:o().min(1,`Key is required`),value:o()}),x=r({mode:c([`vpc-only`,`vpc-and-more`]),namePrefix:o().optional(),autoGenerateNames:i(),cidrBlock:o().min(1,`CIDR block is required`).regex(u,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`).refine(e=>t(e),`CIDR has invalid octets or prefix length (must be /16 to /28)`),tenancy:c([`default`,`dedicated`]),publicSubnetCount:l().int().min(0).max(1),privateSubnetCount:l().int().min(0).max(2),publicSubnetCidrs:a(o()),privateSubnetCidrs:a(o()),tags:a(b)}).superRefine((r,i)=>{if(r.mode!==`vpc-and-more`)return;let a=[];for(let[e,o]of r.publicSubnetCidrs.entries())t(o,16,28)?(n(r.cidrBlock,o)||i.addIssue({code:`custom`,message:`Subnet CIDR must be within the VPC CIDR range`,path:[`publicSubnetCidrs`,e]}),a.push({cidr:o,field:`publicSubnetCidrs`,index:e})):i.addIssue({code:`custom`,message:`Invalid subnet CIDR format or prefix length`,path:[`publicSubnetCidrs`,e]});for(let[e,o]of r.privateSubnetCidrs.entries())t(o,16,28)?(n(r.cidrBlock,o)||i.addIssue({code:`custom`,message:`Subnet CIDR must be within the VPC CIDR range`,path:[`privateSubnetCidrs`,e]}),a.push({cidr:o,field:`privateSubnetCidrs`,index:e})):i.addIssue({code:`custom`,message:`Invalid subnet CIDR format or prefix length`,path:[`privateSubnetCidrs`,e]});for(let t=0;t<a.length;t++)for(let n=t+1;n<a.length;n++){let r=a[t],o=a[n];r&&o&&e(r.cidr,o.cidr)&&i.addIssue({code:`custom`,message:`Subnet CIDRs must not overlap`,path:[o.field,o.index]})}}),S=r({groupName:o().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Group name contains invalid characters`),strategy:o().min(1,`Strategy is required`)}),C=r({groupName:o().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`),description:o().min(1,`Description is required`).max(255,`Description must be 255 characters or less`),vpcId:o().min(1,`VPC is required`)}),w=r({ipProtocol:o().min(1,`Protocol is required`),fromPort:l().int().min(-1).max(65535),toPort:l().int().min(-1).max(65535),cidrIp:o().min(1,`CIDR is required`).regex(u,`Must be a valid CIDR block (e.g. 0.0.0.0/0)`)});export{C as a,g as c,_ as d,w as f,S as i,x as l,p as n,v as o,m as r,y as s,f as t,h as u};
|
||||
import{F as e,I as t,P as n}from"./ec2.js";import{Ar as r,Cr as i,Dr as a,Er as o,Or as s,Tr as c,wr as l}from"./index.js";var u=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/,d=r().min(1,`Key name is required`).max(255,`Key name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Key name contains invalid characters`),f=[`gp3`],p=s({imageId:r(`Please select an Image`),instanceType:r(`Please select an instance type`),keyName:r(`Please select a key pair`).min(1,`Key pair is required`),subnetId:r().optional(),placementGroupName:r().optional(),count:o(`Instance count must be a whole number`).min(1,`Instance count must be at least 1`),rootDeviceName:r().optional(),rootVolumeSize:a().int(`Volume size must be a whole number`).min(1,`Volume size must be at least 1 GiB`).max(16384,`Volume size must be at most 16384 GiB`).optional(),rootVolumeType:i(f).optional(),rootDeleteOnTermination:c().optional()}),m=s({keyName:d}),h=s({keyName:d,publicKeyMaterial:r().min(1,`Public key is required`).refine(e=>e.trim().length>0,`Public key cannot be empty`)}),g=s({size:a().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`).max(16384,`Size must be at most 16384 GiB`),availabilityZone:r().min(1,`Availability zone is required`)}),_=s({size:a().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`)}),v=s({volumeId:r().min(1,`Volume is required`),description:r().optional()});s({sourceSnapshotId:r().min(1,`Source snapshot is required`),sourceRegion:r().min(1,`Source region is required`),description:r().optional()}),s({volumeId:r().min(1,`Volume is required`),instanceId:r().min(1,`Instance is required`),device:r().optional()}),s({volumeId:r().min(1,`Volume is required`),instanceId:r().optional(),force:c().optional()}),s({instanceType:r().min(1,`Instance type is required`)}),s({name:r().min(1,`Name is required`),description:r().optional()});var y=s({vpcId:r().min(1,`VPC is required`),cidrBlock:r().min(1,`CIDR block is required`).regex(u,`Must be a valid CIDR block (e.g. 10.0.1.0/24)`),availabilityZone:r().optional()});s({cidrBlock:r().min(1,`CIDR block is required`).regex(u,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`),name:r().optional()});var b=s({key:r().min(1,`Key is required`),value:r()}),x=s({mode:i([`vpc-only`,`vpc-and-more`]),namePrefix:r().optional(),autoGenerateNames:c(),cidrBlock:r().min(1,`CIDR block is required`).regex(u,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`).refine(e=>t(e),`CIDR has invalid octets or prefix length (must be /16 to /28)`),tenancy:i([`default`,`dedicated`]),publicSubnetCount:a().int().min(0).max(1),privateSubnetCount:a().int().min(0).max(2),publicSubnetCidrs:l(r()),privateSubnetCidrs:l(r()),tags:l(b)}).superRefine((r,i)=>{if(r.mode!==`vpc-and-more`)return;let a=[];for(let[e,o]of r.publicSubnetCidrs.entries())t(o,16,28)?(n(r.cidrBlock,o)||i.addIssue({code:`custom`,message:`Subnet CIDR must be within the VPC CIDR range`,path:[`publicSubnetCidrs`,e]}),a.push({cidr:o,field:`publicSubnetCidrs`,index:e})):i.addIssue({code:`custom`,message:`Invalid subnet CIDR format or prefix length`,path:[`publicSubnetCidrs`,e]});for(let[e,o]of r.privateSubnetCidrs.entries())t(o,16,28)?(n(r.cidrBlock,o)||i.addIssue({code:`custom`,message:`Subnet CIDR must be within the VPC CIDR range`,path:[`privateSubnetCidrs`,e]}),a.push({cidr:o,field:`privateSubnetCidrs`,index:e})):i.addIssue({code:`custom`,message:`Invalid subnet CIDR format or prefix length`,path:[`privateSubnetCidrs`,e]});for(let t=0;t<a.length;t++)for(let n=t+1;n<a.length;n++){let r=a[t],o=a[n];r&&o&&e(r.cidr,o.cidr)&&i.addIssue({code:`custom`,message:`Subnet CIDRs must not overlap`,path:[o.field,o.index]})}}),S=s({groupName:r().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Group name contains invalid characters`),strategy:r().min(1,`Strategy is required`)}),C=s({groupName:r().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`),description:r().min(1,`Description is required`).max(255,`Description must be 255 characters or less`),vpcId:r().min(1,`VPC is required`)}),w=s({ipProtocol:r().min(1,`Protocol is required`),fromPort:a().int().min(-1).max(65535),toPort:a().int().min(-1).max(65535),cidrIp:r().min(1,`CIDR is required`).regex(u,`Must be a valid CIDR block (e.g. 0.0.0.0/0)`)});export{C as a,g as c,_ as d,w as f,S as i,x as l,p as n,v as o,m as r,y as s,f as t,h as u};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Ar as e,Er as t,Mr as n,Tr as r,jr as i,kr as a}from"./index.js";var o=/^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$/,s=n().min(1,`Name is required`).max(32,`Name must be 32 characters or less`).regex(o,`Name may contain only letters, digits, and hyphens; must start and end with alphanumeric`).refine(e=>!e.startsWith(`internal-`),`Name cannot start with 'internal-'`),c=n().min(1,`Name is required`).max(32,`Name must be 32 characters or less`).regex(o,`Name may contain only letters, digits, and hyphens; must start and end with alphanumeric`),l=a().int(`Port must be a whole number`).min(1,`Port must be at least 1`).max(65535,`Port must be at most 65535`),u=e({key:n().min(1,`Tag key is required`).max(128),value:n().max(256)}),d=e({protocol:r([`HTTP`]),path:n().min(1,`Path is required`).max(1024),port:n().min(1),intervalSeconds:a().int().min(5).max(300),timeoutSeconds:a().int().min(2).max(120),healthyThresholdCount:a().int().min(2).max(10),unhealthyThresholdCount:a().int().min(2).max(10),matcher:n().regex(/^\d{3}(?:[-,]\d{3})*$/,`Matcher must be HTTP codes like 200 or 200-299 or 200,201`)}),f=e({name:c,protocol:r([`HTTP`]),port:l,vpcId:n().min(1,`VPC is required`),healthCheck:d,tags:t(u)}),p=`ELBSecurityPolicy-2016-08`,m=e({protocol:r([`HTTP`,`HTTPS`]),port:l,defaultTargetGroupArn:n().min(1,`Target group is required`),certificateArn:n().optional(),sslPolicy:n().optional()}).superRefine((e,t)=>{e.protocol===`HTTPS`&&!e.certificateArn&&t.addIssue({code:`custom`,path:[`certificateArn`],message:`A certificate is required for HTTPS`})}),h=/^[!-~]+$/,g=e({field:r([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]),httpHeaderName:n().max(40).optional(),rawValues:n().min(1,`At least one value is required`).max(640,`Too many values`)}).superRefine((e,t)=>{e.field===`http-header`&&!e.httpHeaderName&&t.addIssue({code:`custom`,path:[`httpHeaderName`],message:`Header name is required`});let n=e.rawValues.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0);if(n.length===0||n.length>5){t.addIssue({code:`custom`,path:[`rawValues`],message:`Enter 1 to 5 values, comma or newline separated`});return}for(let e of n)if(!h.test(e)){t.addIssue({code:`custom`,path:[`rawValues`],message:`Value "${e}" contains whitespace or non-ASCII characters`});return}}),_=e({priority:a().int(`Priority must be a whole number`).min(1,`Priority must be at least 1`).max(5e4,`Priority must be at most 50000`),conditions:t(g).min(1,`At least one condition is required`).max(5,`Up to 5 conditions per rule`),forwardTargetGroupArn:n().min(1,`Target group is required`)}),v=e({name:s,scheme:r([`internet-facing`,`internal`]),vpcId:n().min(1,`VPC is required`),subnetIds:t(n()).min(2,`At least 2 subnets are required for an ALB`),securityGroupIds:t(n()),tags:t(u),listener:e({protocol:r([`HTTP`]),port:l,targetGroupMode:r([`new`,`existing`]),existingTargetGroupArn:n().optional()}).refine(e=>e.targetGroupMode===`existing`?!!e.existingTargetGroupArn:!0,{error:`Target group is required`,path:[`existingTargetGroupArn`]})});e({targets:t(e({instanceId:n().min(1,`Instance is required`),port:l.optional()})).min(1,`At least one target is required`)}),i(n(),n());export{f as a,_ as i,m as n,v as r,p as t};
|
||||
import{Ar as e,Cr as t,Dr as n,Or as r,kr as i,wr as a}from"./index.js";var o=/^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$/,s=e().min(1,`Name is required`).max(32,`Name must be 32 characters or less`).regex(o,`Name may contain only letters, digits, and hyphens; must start and end with alphanumeric`).refine(e=>!e.startsWith(`internal-`),`Name cannot start with 'internal-'`),c=e().min(1,`Name is required`).max(32,`Name must be 32 characters or less`).regex(o,`Name may contain only letters, digits, and hyphens; must start and end with alphanumeric`),l=n().int(`Port must be a whole number`).min(1,`Port must be at least 1`).max(65535,`Port must be at most 65535`),u=r({key:e().min(1,`Tag key is required`).max(128),value:e().max(256)}),d=r({protocol:t([`HTTP`,`TCP`]),path:e().min(1,`Path is required`).max(1024),port:e().min(1),intervalSeconds:n().int().min(5).max(300),timeoutSeconds:n().int().min(2).max(120),healthyThresholdCount:n().int().min(2).max(10),unhealthyThresholdCount:n().int().min(2).max(10),matcher:e().regex(/^\d{3}(?:[-,]\d{3})*$/,`Matcher must be HTTP codes like 200 or 200-299 or 200,201`)}),f=r({name:c,protocol:t([`HTTP`,`HTTPS`,`TCP`,`UDP`,`TLS`,`TCP_UDP`]),port:l,vpcId:e().min(1,`VPC is required`),healthCheck:d,tags:a(u)}),p=`ELBSecurityPolicy-2016-08`,m=[`application`,`network`],h=[`HTTP`,`HTTPS`],g=[`TCP`,`UDP`,`TLS`,`TCP_UDP`],_=[...h,...g];function v(e){return e===`network`?g:h}function y(e){return e===`network`?`TCP`:`HTTP`}function b(e){return e===`HTTPS`||e===`TLS`}var x=r({protocol:t([`HTTP`,`HTTPS`]),port:l,defaultTargetGroupArn:e().min(1,`Target group is required`),certificateArn:e().optional(),sslPolicy:e().optional()}).superRefine((e,t)=>{e.protocol===`HTTPS`&&!e.certificateArn&&t.addIssue({code:`custom`,path:[`certificateArn`],message:`A certificate is required for HTTPS`})}),S=/^[!-~]+$/,C=r({field:t([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]),httpHeaderName:e().max(40).optional(),rawValues:e().min(1,`At least one value is required`).max(640,`Too many values`)}).superRefine((e,t)=>{e.field===`http-header`&&!e.httpHeaderName&&t.addIssue({code:`custom`,path:[`httpHeaderName`],message:`Header name is required`});let n=e.rawValues.split(/[\n,]/).map(e=>e.trim()).filter(e=>e.length>0);if(n.length===0||n.length>5){t.addIssue({code:`custom`,path:[`rawValues`],message:`Enter 1 to 5 values, comma or newline separated`});return}for(let e of n)if(!S.test(e)){t.addIssue({code:`custom`,path:[`rawValues`],message:`Value "${e}" contains whitespace or non-ASCII characters`});return}}),w=r({priority:n().int(`Priority must be a whole number`).min(1,`Priority must be at least 1`).max(5e4,`Priority must be at most 50000`),conditions:a(C).min(1,`At least one condition is required`).max(5,`Up to 5 conditions per rule`),forwardTargetGroupArn:e().min(1,`Target group is required`)}),T=r({name:s,type:t(m),scheme:t([`internet-facing`,`internal`]),vpcId:e().min(1,`VPC is required`),subnetIds:a(e()).min(2,`At least 2 subnets are required`),securityGroupIds:a(e()),tags:a(u),listener:r({protocol:t(_),port:l,targetGroupMode:t([`new`,`existing`]),existingTargetGroupArn:e().optional(),certificateArn:e().optional(),sslPolicy:e().optional()}).superRefine((e,t)=>{e.targetGroupMode===`existing`&&!e.existingTargetGroupArn&&t.addIssue({code:`custom`,path:[`existingTargetGroupArn`],message:`Target group is required`}),b(e.protocol)&&!e.certificateArn&&t.addIssue({code:`custom`,path:[`certificateArn`],message:`A certificate is required for HTTPS/TLS`})})});r({targets:a(r({instanceId:e().min(1,`Instance is required`),port:l.optional()})).min(1,`At least one target is required`)}),i(e(),e());export{f as a,v as c,w as i,x as n,y as o,T as r,b as s,p as t};
|
||||
@@ -1 +1 @@
|
||||
import{Ao as e,Do as t,Fo as n,Ho as r,Jo as i,Ko as a,Lo as o,Mo as s,Oo as c,Vo as l,ko as u,xo as d}from"./index.js";var f=class extends a{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),l(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&n(t.mutationKey)!==n(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let t=this.#n?.state??e();this.#t={...t,isPending:t.status===`pending`,isSuccess:t.status===`success`,isError:t.status===`error`,isIdle:t.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){s.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},p=i(u(),1);function m(e,n){let i=t(n),[a]=p.useState(()=>new f(i,e));p.useEffect(()=>{a.setOptions(e)},[a,e]);let c=p.useSyncExternalStore(p.useCallback(e=>a.subscribe(s.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),l=p.useCallback((e,t)=>{a.mutate(e,t).catch(o)},[a]);if(c.error&&r(a.options.throwOnError,[c.error]))throw c.error;return{...c,mutate:l,mutateAsync:c.mutate}}var h=d(),g=c();function _(e){let t=(0,h.c)(7),{msg:n,error:r}=e,i;r&&(i=r.name===`Error`?r.message:r.name);let a;t[0]===n?a=t[1]:(a=n&&(0,g.jsx)(`h2`,{className:`text-sm text-destructive`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=i&&(0,g.jsx)(`p`,{className:`text-sm text-destructive`,children:i}),t[2]=i,t[3]=o);let s;return t[4]!==a||t[5]!==o?(s=(0,g.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6],s}export{m as n,_ as t};
|
||||
import{Ao as e,Bo as t,Do as n,Eo as r,Fo as i,Ko as a,No as o,Oo as s,To as c,Wo as l,yo as u,zo as d}from"./index.js";var f=class extends l{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),d(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&o(t.mutationKey)!==o(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??s();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(t){e.batch(()=>{if(this.#r&&this.hasListeners()){let e=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type===`success`){try{this.#r.onSuccess?.(t.data,e,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(t.data,null,e,n,r)}catch(e){Promise.reject(e)}}else if(t?.type===`error`){try{this.#r.onError?.(t.error,e,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,t.error,e,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},p=a(n(),1);function m(n,r){let a=c(r),[o]=p.useState(()=>new f(a,n));p.useEffect(()=>{o.setOptions(n)},[o,n]);let s=p.useSyncExternalStore(p.useCallback(t=>o.subscribe(e.batchCalls(t)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),l=p.useCallback((e,t)=>{o.mutate(e,t).catch(i)},[o]);if(s.error&&t(o.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}var h=u(),g=r();function _(e){let t=(0,h.c)(7),{msg:n,error:r}=e,i;r&&(i=r.name===`Error`?r.message:r.name);let a;t[0]===n?a=t[1]:(a=n&&(0,g.jsx)(`h2`,{className:`text-sm text-destructive`,children:n}),t[0]=n,t[1]=a);let o;t[2]===i?o=t[3]:(o=i&&(0,g.jsx)(`p`,{className:`text-sm text-destructive`,children:i}),t[2]=i,t[3]=o);let s;return t[4]!==a||t[5]!==o?(s=(0,g.jsxs)(`div`,{className:`mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4`,children:[a,o]}),t[4]=a,t[5]=o,t[6]=s):s=t[6],s}export{m as n,_ as t};
|
||||
@@ -1 +1 @@
|
||||
import{dr as e,lr as t}from"./index.js";var n=class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:r,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=r,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){let r=this.marshaller,i=t.getEventStreamMember(),a=t.getMemberSchema(i),o=this.serializer,s=this.defaultContentType,c=Symbol(`initialRequestMarker`),l={async*[Symbol.asyncIterator](){if(n){let e={":event-type":{type:`string`,value:`initial-request`},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:s}};o.write(t,n);let r=o.flush();yield{[c]:!0,headers:e,body:r}}for await(let t of e)yield t}};return r.serialize(l,e=>{if(e[c])return{headers:e.headers,body:e.body};let t=``;for(let n in e)if(n!==`__type`){t=n;break}let{additionalHeaders:n,body:r,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,a,e);return{headers:{":event-type":{type:`string`,value:i},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:o??s},...n},body:r}})}async deserializeEventStream({response:e,responseSchema:n,initialResponseContainer:r}){let i=this.marshaller,a=n.getEventStreamMember(),o=n.getMemberSchema(a).getMemberSchemas(),s=Symbol(`initialResponseMarker`),c=i.deserialize(e.body,async e=>{let r=``;for(let t in e)if(t!==`__type`){r=t;break}let i=e[r].body;if(r===`initial-response`){let e=await this.deserializer.read(n,i);return delete e[a],{[s]:!0,...e}}else if(r in o){let n=o[r];if(n.isStructSchema()){let a={},o=!1;for(let[s,c]of n.structIterator()){let{eventHeader:n,eventPayload:l}=c.getMergedTraits();if(o||=!!(n||l),l)c.isBlobSchema()?a[s]=i:c.isStringSchema()?a[s]=(this.serdeContext?.utf8Encoder??t)(i):c.isStructSchema()&&(a[s]=await this.deserializer.read(c,i));else if(n){let t=e[r].headers[s]?.value;t!=null&&(c.isNumericSchema()?t&&typeof t==`object`&&`bytes`in t?a[s]=BigInt(t.toString()):a[s]=Number(t):a[s]=t)}}if(o)return{[r]:a};if(i.byteLength===0)return{[r]:{}}}return{[r]:await this.deserializer.read(n,i)}}else return{$unknown:e}}),l=c[Symbol.asyncIterator](),u=await l.next();if(u.done)return c;if(u.value?.[s]){if(!n)throw Error(`@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.`);for(let e in u.value)r[e]=u.value[e]}return{async*[Symbol.asyncIterator](){for(u?.value?.[s]||(yield u.value);;){let{done:e,value:t}=await l.next();if(e)break;yield t}}}}writeEventBody(t,n,r){let i=this.serializer,a=t,o=null,s,c=n.getSchema()[4].includes(t),l={};if(c){let e=n.getMemberSchema(t);if(e.isStructSchema()){for(let[n,i]of e.structIterator()){let{eventHeader:e,eventPayload:a}=i.getMergedTraits();if(a)o=n;else if(e){let e=r[t][n],a=`binary`;i.isNumericSchema()?a=(-2)**31<=e&&e<=2**31-1?`integer`:`long`:i.isTimestampSchema()?a=`timestamp`:i.isStringSchema()?a=`string`:i.isBooleanSchema()&&(a=`boolean`),e!=null&&(l[n]={type:a,value:e},delete r[t][n])}}if(o!==null){let n=e.getMemberSchema(o);n.isBlobSchema()?s=`application/octet-stream`:n.isStringSchema()&&(s=`text/plain`),i.write(n,r[t][o])}else i.write(e,r[t])}else if(e.isUnitSchema())i.write(e,{});else throw Error(`@smithy/core/event-streams - non-struct member not supported in event stream union.`)}else{let[e,n]=r[t];a=e,i.write(15,n)}let u=i.flush()??new Uint8Array;return{body:typeof u==`string`?(this.serdeContext?.utf8Decoder??e)(u):u,eventType:a,explicitPayloadContentType:s,additionalHeaders:l}}};export{n as EventStreamSerde};
|
||||
import{lr as e,sr as t}from"./index.js";var n=class{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:e,serializer:t,deserializer:n,serdeContext:r,defaultContentType:i}){this.marshaller=e,this.serializer=t,this.deserializer=n,this.serdeContext=r,this.defaultContentType=i}async serializeEventStream({eventStream:e,requestSchema:t,initialRequest:n}){let r=this.marshaller,i=t.getEventStreamMember(),a=t.getMemberSchema(i),o=this.serializer,s=this.defaultContentType,c=Symbol(`initialRequestMarker`),l={async*[Symbol.asyncIterator](){if(n){let e={":event-type":{type:`string`,value:`initial-request`},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:s}};o.write(t,n);let r=o.flush();yield{[c]:!0,headers:e,body:r}}for await(let t of e)yield t}};return r.serialize(l,e=>{if(e[c])return{headers:e.headers,body:e.body};let t=``;for(let n in e)if(n!==`__type`){t=n;break}let{additionalHeaders:n,body:r,eventType:i,explicitPayloadContentType:o}=this.writeEventBody(t,a,e);return{headers:{":event-type":{type:`string`,value:i},":message-type":{type:`string`,value:`event`},":content-type":{type:`string`,value:o??s},...n},body:r}})}async deserializeEventStream({response:e,responseSchema:n,initialResponseContainer:r}){let i=this.marshaller,a=n.getEventStreamMember(),o=n.getMemberSchema(a).getMemberSchemas(),s=Symbol(`initialResponseMarker`),c=i.deserialize(e.body,async e=>{let r=``;for(let t in e)if(t!==`__type`){r=t;break}let i=e[r].body;if(r===`initial-response`){let e=await this.deserializer.read(n,i);return delete e[a],{[s]:!0,...e}}else if(r in o){let n=o[r];if(n.isStructSchema()){let a={},o=!1;for(let[s,c]of n.structIterator()){let{eventHeader:n,eventPayload:l}=c.getMergedTraits();if(o||=!!(n||l),l)c.isBlobSchema()?a[s]=i:c.isStringSchema()?a[s]=(this.serdeContext?.utf8Encoder??t)(i):c.isStructSchema()&&(a[s]=await this.deserializer.read(c,i));else if(n){let t=e[r].headers[s]?.value;t!=null&&(c.isNumericSchema()?t&&typeof t==`object`&&`bytes`in t?a[s]=BigInt(t.toString()):a[s]=Number(t):a[s]=t)}}if(o)return{[r]:a};if(i.byteLength===0)return{[r]:{}}}return{[r]:await this.deserializer.read(n,i)}}else return{$unknown:e}}),l=c[Symbol.asyncIterator](),u=await l.next();if(u.done)return c;if(u.value?.[s]){if(!n)throw Error(`@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.`);for(let e in u.value)r[e]=u.value[e]}return{async*[Symbol.asyncIterator](){for(u?.value?.[s]||(yield u.value);;){let{done:e,value:t}=await l.next();if(e)break;yield t}}}}writeEventBody(t,n,r){let i=this.serializer,a=t,o=null,s,c=n.getSchema()[4].includes(t),l={};if(c){let e=n.getMemberSchema(t);if(e.isStructSchema()){for(let[n,i]of e.structIterator()){let{eventHeader:e,eventPayload:a}=i.getMergedTraits();if(a)o=n;else if(e){let e=r[t][n],a=`binary`;i.isNumericSchema()?a=(-2)**31<=e&&e<=2**31-1?`integer`:`long`:i.isTimestampSchema()?a=`timestamp`:i.isStringSchema()?a=`string`:i.isBooleanSchema()&&(a=`boolean`),e!=null&&(l[n]={type:a,value:e},delete r[t][n])}}if(o!==null){let n=e.getMemberSchema(o);n.isBlobSchema()?s=`application/octet-stream`:n.isStringSchema()&&(s=`text/plain`),i.write(n,r[t][o])}else i.write(e,r[t])}else if(e.isUnitSchema())i.write(e,{});else throw Error(`@smithy/core/event-streams - non-struct member not supported in event stream union.`)}else{let[e,n]=r[t];a=e,i.write(15,n)}let u=i.flush()??new Uint8Array;return{body:typeof u==`string`?(this.serdeContext?.utf8Decoder??e)(u):u,eventType:a,explicitPayloadContentType:s,additionalHeaders:l}}};export{n as EventStreamSerde};
|
||||
@@ -1 +1 @@
|
||||
import{Ha as e,Oo as t,do as n,ko as r,xo as i}from"./index.js";r();var a=i(),o=t();function s(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`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`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-group`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}var c=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 l(t){let n=(0,a.c)(11),r,i,s;n[0]===t?(r=n[1],i=n[2],s=n[3]):({className:r,orientation:s,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s);let l=s===void 0?`vertical`:s,u;n[4]!==r||n[5]!==l?(u=e(c({orientation:l}),r),n[4]=r,n[5]=l,n[6]=u):u=n[6];let d;return n[7]!==l||n[8]!==i||n[9]!==u?(d=(0,o.jsx)(`div`,{className:u,"data-orientation":l,"data-slot":`field`,role:`group`,...i}),n[7]=l,n[8]=i,n[9]=u,n[10]=d):d=n[10],d}function u(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`flex w-fit items-center gap-2 text-xs/relaxed leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-label`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}function d(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`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`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`p`,{className:s,"data-slot":`field-description`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}function f(t){let n=(0,a.c)(15),r,i,s,c;n[0]===t?(r=n[1],i=n[2],s=n[3],c=n[4]):({className:i,children:r,errors:s,...c}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=c);let l;bb0:{if(r){l=r;break bb0}if(!s?.length){l=null;break bb0}let e;n[5]===s?e=n[6]:(e=[...new Map(s.map(m)).values()],n[5]=s,n[6]=e);let t=e;if(t?.length===1){l=t[0]?.message;break bb0}let i;n[7]===t?i=n[8]:(i=(0,o.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:t.map(p)}),n[7]=t,n[8]=i),l=i}let u=l;if(!u)return null;let d;n[9]===i?d=n[10]:(d=e(`text-xs/relaxed font-normal text-destructive`,i),n[9]=i,n[10]=d);let f;return n[11]!==u||n[12]!==c||n[13]!==d?(f=(0,o.jsx)(`div`,{className:d,"data-slot":`field-error`,role:`alert`,...c,children:u}),n[11]=u,n[12]=c,n[13]=d,n[14]=f):f=n[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};
|
||||
import{Ba as e,Do as t,Eo as n,lo as r,yo as i}from"./index.js";t();var a=i(),o=n();function s(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`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`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-group`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[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(t){let n=(0,a.c)(11),r,i,s;n[0]===t?(r=n[1],i=n[2],s=n[3]):({className:r,orientation:s,...i}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s);let l=s===void 0?`vertical`:s,u;n[4]!==r||n[5]!==l?(u=e(c({orientation:l}),r),n[4]=r,n[5]=l,n[6]=u):u=n[6];let d;return n[7]!==l||n[8]!==i||n[9]!==u?(d=(0,o.jsx)(`div`,{className:u,"data-orientation":l,"data-slot":`field`,role:`group`,...i}),n[7]=l,n[8]=i,n[9]=u,n[10]=d):d=n[10],d}function u(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`flex w-fit items-center gap-2 text-xs/relaxed leading-snug font-medium group-data-[disabled=true]/field:opacity-50`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`div`,{className:s,"data-slot":`field-label`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}function d(t){let n=(0,a.c)(8),r,i;n[0]===t?(r=n[1],i=n[2]):({className:r,...i}=t,n[0]=t,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=e(`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`,r),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=(0,o.jsx)(`p`,{className:s,"data-slot":`field-description`,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c}function f(t){let n=(0,a.c)(15),r,i,s,c;n[0]===t?(r=n[1],i=n[2],s=n[3],c=n[4]):({className:i,children:r,errors:s,...c}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=c);let l;bb0:{if(r){l=r;break bb0}if(!s?.length){l=null;break bb0}let e;n[5]===s?e=n[6]:(e=[...new Map(s.map(m)).values()],n[5]=s,n[6]=e);let t=e;if(t?.length===1){l=t[0]?.message;break bb0}let i;n[7]===t?i=n[8]:(i=(0,o.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:t.map(p)}),n[7]=t,n[8]=i),l=i}let u=l;if(!u)return null;let d;n[9]===i?d=n[10]:(d=e(`text-xs/relaxed font-normal text-destructive`,i),n[9]=i,n[10]=d);let f;return n[11]!==u||n[12]!==c||n[13]!==d?(f=(0,o.jsx)(`div`,{className:d,"data-slot":`field-error`,role:`alert`,...c,children:u}),n[11]=u,n[12]=c,n[13]=d,n[14]=f):f=n[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};
|
||||
@@ -1 +1 @@
|
||||
import{Oo as e,xo as t,za as n}from"./index.js";var r=t(),i=e();function a(e){let t=(0,r.c)(9),{isSubmitting:a,isPending:o,onCancel:s,submitLabel:c,pendingLabel:l}=e,u=a||o,d;t[0]!==u||t[1]!==s?(d=(0,i.jsx)(n,{disabled:u,onClick:s,type:`button`,variant:`outline`,children:`Cancel`}),t[0]=u,t[1]=s,t[2]=d):d=t[2];let f=u?l:c,p;t[3]!==u||t[4]!==f?(p=(0,i.jsx)(n,{disabled:u,type:`submit`,children:f}),t[3]=u,t[4]=f,t[5]=p):p=t[5];let m;return t[6]!==d||t[7]!==p?(m=(0,i.jsxs)(`div`,{className:`flex gap-2`,children:[d,p]}),t[6]=d,t[7]=p,t[8]=m):m=t[8],m}export{a as t};
|
||||
import{Eo as e,La as t,yo as n}from"./index.js";var r=n(),i=e();function a(e){let n=(0,r.c)(9),{isSubmitting:a,isPending:o,onCancel:s,submitLabel:c,pendingLabel:l}=e,u=a||o,d;n[0]!==u||n[1]!==s?(d=(0,i.jsx)(t,{disabled:u,onClick:s,type:`button`,variant:`outline`,children:`Cancel`}),n[0]=u,n[1]=s,n[2]=d):d=n[2];let f=u?l:c,p;n[3]!==u||n[4]!==f?(p=(0,i.jsx)(t,{disabled:u,type:`submit`,children:f}),n[3]=u,n[4]=f,n[5]=p):p=n[5];let m;return n[6]!==d||n[7]!==p?(m=(0,i.jsxs)(`div`,{className:`flex gap-2`,children:[d,p]}),n[6]=d,n[7]=p,n[8]=m):m=n[8],m}export{a as t};
|
||||
@@ -1 +1 @@
|
||||
import{n as e}from"./error-banner.js";import{At as t,Bn as n,Do as r,Dt as i,Ft as a,It as o,Mt as s,Nt as c,Ot as l,Pt as u,Vn as d,jt as f,kt as p,lt as m,xo as h}from"./index.js";var g=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachUserPolicy`,{}).n(`IAMClient`,`AttachUserPolicyCommand`).sc(i).build(){},_=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateAccessKey`,{}).n(`IAMClient`,`CreateAccessKeyCommand`).sc(l).build(){},v=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreatePolicy`,{}).n(`IAMClient`,`CreatePolicyCommand`).sc(p).build(){},y=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateUser`,{}).n(`IAMClient`,`CreateUserCommand`).sc(t).build(){},b=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteAccessKey`,{}).n(`IAMClient`,`DeleteAccessKeyCommand`).sc(f).build(){},x=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeletePolicy`,{}).n(`IAMClient`,`DeletePolicyCommand`).sc(s).build(){},S=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteUser`,{}).n(`IAMClient`,`DeleteUserCommand`).sc(c).build(){},C=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachUserPolicy`,{}).n(`IAMClient`,`DetachUserPolicyCommand`).sc(u).build(){},w=class extends n.classBuilder().ep(o).m(function(e,t,n,r){return[d(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`UpdateAccessKey`,{}).n(`IAMClient`,`UpdateAccessKeyCommand`).sc(a).build(){},T=h();function E(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},t[0]=n,t[1]=i),e(i)}async function D(e){let t=new y({UserName:e.userName,Path:e.path||void 0});return await m().send(t)}function O(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},t[0]=n,t[1]=i),e(i)}async function k(e){let t=new S({UserName:e});return await m().send(t)}function A(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:j,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=i),e(i)}async function j(e){let t=new _({UserName:e});return await m().send(t)}function M(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:N,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=i),e(i)}async function N(e){let{userName:t,accessKeyId:n}=e,r=new b({UserName:t,AccessKeyId:n});return await m().send(r)}function P(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=i),e(i)}async function F(e){let{userName:t,accessKeyId:n,status:r}=e,i=new w({UserName:t,AccessKeyId:n,Status:r});return await m().send(i)}function I(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:L,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},t[0]=n,t[1]=i),e(i)}async function L(e){let t=new v({PolicyName:e.policyName,Description:e.description||void 0,PolicyDocument:e.policyDocument});return await m().send(t)}function R(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},t[0]=n,t[1]=i),e(i)}async function z(e){let t=new x({PolicyArn:e});return await m().send(t)}function B(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:V,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},t[0]=n,t[1]=i),e(i)}async function V(e){let{userName:t,policyArn:n}=e,r=new g({UserName:t,PolicyArn:n});return await m().send(r)}function H(){let t=(0,T.c)(2),n=r(),i;return t[0]===n?i=t[1]:(i={mutationFn:U,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},t[0]=n,t[1]=i),e(i)}async function U(e){let{userName:t,policyArn:n}=e,r=new C({UserName:t,PolicyArn:n});return await m().send(r)}export{M as a,H as c,E as i,P as l,A as n,R as o,I as r,O as s,B as t};
|
||||
import{n as e}from"./error-banner.js";import{At as t,Ft as n,Hn as r,It as i,Lt as a,Mt as o,Nt as s,Ot as c,Pt as l,To as u,Vn as d,jt as f,kt as p,ut as m,yo as h}from"./index.js";var g=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachUserPolicy`,{}).n(`IAMClient`,`AttachUserPolicyCommand`).sc(c).build(){},_=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateAccessKey`,{}).n(`IAMClient`,`CreateAccessKeyCommand`).sc(p).build(){},v=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreatePolicy`,{}).n(`IAMClient`,`CreatePolicyCommand`).sc(t).build(){},y=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateUser`,{}).n(`IAMClient`,`CreateUserCommand`).sc(f).build(){},b=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteAccessKey`,{}).n(`IAMClient`,`DeleteAccessKeyCommand`).sc(o).build(){},x=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeletePolicy`,{}).n(`IAMClient`,`DeletePolicyCommand`).sc(s).build(){},S=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteUser`,{}).n(`IAMClient`,`DeleteUserCommand`).sc(l).build(){},C=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachUserPolicy`,{}).n(`IAMClient`,`DetachUserPolicyCommand`).sc(n).build(){},w=class extends d.classBuilder().ep(a).m(function(e,t,n,i){return[r(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`UpdateAccessKey`,{}).n(`IAMClient`,`UpdateAccessKeyCommand`).sc(i).build(){},T=h();function E(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},t[0]=n,t[1]=r),e(r)}async function D(e){let t=new y({UserName:e.userName,Path:e.path||void 0});return await m().send(t)}function O(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`users`]})}},t[0]=n,t[1]=r),e(r)}async function k(e){let t=new S({UserName:e});return await m().send(t)}function A(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:j,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=r),e(r)}async function j(e){let t=new _({UserName:e});return await m().send(t)}function M(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:N,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=r),e(r)}async function N(e){let{userName:t,accessKeyId:n}=e,r=new b({UserName:t,AccessKeyId:n});return await m().send(r)}function P(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},t[0]=n,t[1]=r),e(r)}async function F(e){let{userName:t,accessKeyId:n,status:r}=e,i=new w({UserName:t,AccessKeyId:n,Status:r});return await m().send(i)}function I(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:L,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},t[0]=n,t[1]=r),e(r)}async function L(e){let t=new v({PolicyName:e.policyName,Description:e.description||void 0,PolicyDocument:e.policyDocument});return await m().send(t)}function R(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:z,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`policies`]})}},t[0]=n,t[1]=r),e(r)}async function z(e){let t=new x({PolicyArn:e});return await m().send(t)}function B(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:V,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},t[0]=n,t[1]=r),e(r)}async function V(e){let{userName:t,policyArn:n}=e,r=new g({UserName:t,PolicyArn:n});return await m().send(r)}function H(){let t=(0,T.c)(2),n=u(),r;return t[0]===n?r=t[1]:(r={mutationFn:U,onSuccess:()=>{n.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},t[0]=n,t[1]=r),e(r)}async function U(e){let{userName:t,policyArn:n}=e,r=new C({UserName:t,PolicyArn:n});return await m().send(r)}export{M as a,H as c,E as i,P as l,A as n,R as o,I as r,O as s,B as t};
|
||||
@@ -1 +1 @@
|
||||
import{Ar as e,Mr as t}from"./index.js";var n=e({userName:t().min(1,`User name is required`).max(64,`User name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`User name contains invalid characters`),path:t().optional()}),r=e({policyName:t().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),description:t().optional(),policyDocument:t().min(1,`Policy document is required`).refine(e=>{try{return JSON.parse(e),!0}catch{return!1}},{message:`Policy document must be valid JSON`})});export{n,r as t};
|
||||
import{Ar as e,Or as t}from"./index.js";var n=t({userName:e().min(1,`User name is required`).max(64,`User name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`User name contains invalid characters`),path:e().optional()}),r=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),description:e().optional(),policyDocument:e().min(1,`Policy document is required`).refine(e=>{try{return JSON.parse(e),!0}catch{return!1}},{message:`Policy document must be valid JSON`})});export{n,r as t};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as ee}from"./cli-command-panel.js";import{w as n}from"./ec2.js";import{Oo as r,wo as te,xo as i,zi as ne}from"./index.js";import{t as a}from"./page-heading.js";import{a as o,r as s,t as c}from"./field.js";import{t as l}from"./textarea.js";import{a as u,i as d,t as f}from"./zod.js";import{u as p}from"./ec22.js";import{t as m}from"./form-actions.js";var h=i(),g=r();function _(){let r=(0,h.c)(57),i=te(),_=n(),v;r[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:f(p)},r[0]=v):v=r[0];let{handleSubmit:y,register:b,control:x,formState:S}=d(v),{errors:C,isSubmitting:w}=S,T;r[1]===x?T=r[2]:(T={control:x},r[1]=x,r[2]=T);let E=u(T),D;r[3]===E?D=r[4]:(D=e=>e?E[e]:void 0,r[3]=E,r[4]=D);let O=D,k;r[5]!==_||r[6]!==i?(k=async e=>{await _.mutateAsync(e),i({to:`/ec2/describe-key-pairs`})},r[5]=_,r[6]=i,r[7]=k):k=r[7];let A=k,j,M;r[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,g.jsx)(t,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,g.jsx)(a,{title:`Import Key Pair`}),r[8]=j,r[9]=M):(j=r[8],M=r[9]);let N;r[10]===_.error?N=r[11]:(N=_.error&&(0,g.jsx)(e,{error:_.error,msg:`Failed to import key pair`}),r[10]=_.error,r[11]=N);let P;r[12]!==y||r[13]!==A?(P=y(A),r[12]=y,r[13]=A,r[14]=P):P=r[14];let F;r[15]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,g.jsx)(o,{children:(0,g.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),r[15]=F):F=r[15];let I=!!C.keyName,L;r[16]===b?L=r[17]:(L=b(`keyName`),r[16]=b,r[17]=L);let R;r[18]!==I||r[19]!==L?(R=(0,g.jsx)(ne,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),r[18]=I,r[19]=L,r[20]=R):R=r[20];let z;r[21]===C.keyName?z=r[22]:(z=(0,g.jsx)(s,{errors:[C.keyName]}),r[21]=C.keyName,r[22]=z);let B;r[23]!==R||r[24]!==z?(B=(0,g.jsxs)(c,{children:[F,R,z]}),r[23]=R,r[24]=z,r[25]=B):B=r[25];let V,H;r[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,g.jsx)(o,{children:(0,g.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),r[26]=V,r[27]=H):(V=r[26],H=r[27]);let U=!!C.publicKeyMaterial,W;r[28]===b?W=r[29]:(W=b(`publicKeyMaterial`),r[28]=b,r[29]=W);let G;r[30]!==U||r[31]!==W?(G=(0,g.jsx)(l,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),r[30]=U,r[31]=W,r[32]=G):G=r[32];let K;r[33]===C.publicKeyMaterial?K=r[34]:(K=(0,g.jsx)(s,{errors:[C.publicKeyMaterial]}),r[33]=C.publicKeyMaterial,r[34]=K);let q;r[35]!==G||r[36]!==K?(q=(0,g.jsxs)(c,{children:[V,H,G,K]}),r[35]=G,r[36]=K,r[37]=q):q=r[37];let J;r[38]===O?J=r[39]:(J=re(O),r[38]=O,r[39]=J);let Y;r[40]===J?Y=r[41]:(Y=(0,g.jsx)(ee,{commands:J}),r[40]=J,r[41]=Y);let X;r[42]===i?X=r[43]:(X=async()=>await i({to:`/ec2/describe-key-pairs`}),r[42]=i,r[43]=X);let Z;r[44]!==_.isPending||r[45]!==w||r[46]!==X?(Z=(0,g.jsx)(m,{isPending:_.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),r[44]=_.isPending,r[45]=w,r[46]=X,r[47]=Z):Z=r[47];let Q;r[48]!==B||r[49]!==q||r[50]!==Y||r[51]!==Z||r[52]!==P?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),r[48]=B,r[49]=q,r[50]=Y,r[51]=Z,r[52]=P,r[53]=Q):Q=r[53];let $;return r[54]!==Q||r[55]!==N?($=(0,g.jsxs)(g.Fragment,{children:[j,M,N,Q]}),r[54]=Q,r[55]=N,r[56]=$):$=r[56],$}function re(e){let t=e(`keyName`);return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\
|
||||
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as ee}from"./cli-command-panel.js";import{w as te}from"./ec2.js";import{Eo as n,Li as ne,So as r,yo as i}from"./index.js";import{t as a}from"./page-heading.js";import{a as o,r as s,t as c}from"./field.js";import{t as l}from"./textarea.js";import{a as u,i as d,t as f}from"./zod.js";import{u as p}from"./ec22.js";import{t as m}from"./form-actions.js";var h=i(),g=n();function _(){let n=(0,h.c)(57),i=r(),_=te(),v;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:f(p)},n[0]=v):v=n[0];let{handleSubmit:y,register:b,control:x,formState:S}=d(v),{errors:C,isSubmitting:w}=S,T;n[1]===x?T=n[2]:(T={control:x},n[1]=x,n[2]=T);let E=u(T),D;n[3]===E?D=n[4]:(D=e=>e?E[e]:void 0,n[3]=E,n[4]=D);let O=D,k;n[5]!==_||n[6]!==i?(k=async e=>{await _.mutateAsync(e),i({to:`/ec2/describe-key-pairs`})},n[5]=_,n[6]=i,n[7]=k):k=n[7];let A=k,j,M;n[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,g.jsx)(t,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,g.jsx)(a,{title:`Import Key Pair`}),n[8]=j,n[9]=M):(j=n[8],M=n[9]);let N;n[10]===_.error?N=n[11]:(N=_.error&&(0,g.jsx)(e,{error:_.error,msg:`Failed to import key pair`}),n[10]=_.error,n[11]=N);let P;n[12]!==y||n[13]!==A?(P=y(A),n[12]=y,n[13]=A,n[14]=P):P=n[14];let F;n[15]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,g.jsx)(o,{children:(0,g.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),n[15]=F):F=n[15];let I=!!C.keyName,L;n[16]===b?L=n[17]:(L=b(`keyName`),n[16]=b,n[17]=L);let R;n[18]!==I||n[19]!==L?(R=(0,g.jsx)(ne,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),n[18]=I,n[19]=L,n[20]=R):R=n[20];let z;n[21]===C.keyName?z=n[22]:(z=(0,g.jsx)(s,{errors:[C.keyName]}),n[21]=C.keyName,n[22]=z);let B;n[23]!==R||n[24]!==z?(B=(0,g.jsxs)(c,{children:[F,R,z]}),n[23]=R,n[24]=z,n[25]=B):B=n[25];let V,H;n[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,g.jsx)(o,{children:(0,g.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),n[26]=V,n[27]=H):(V=n[26],H=n[27]);let U=!!C.publicKeyMaterial,W;n[28]===b?W=n[29]:(W=b(`publicKeyMaterial`),n[28]=b,n[29]=W);let G;n[30]!==U||n[31]!==W?(G=(0,g.jsx)(l,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),n[30]=U,n[31]=W,n[32]=G):G=n[32];let K;n[33]===C.publicKeyMaterial?K=n[34]:(K=(0,g.jsx)(s,{errors:[C.publicKeyMaterial]}),n[33]=C.publicKeyMaterial,n[34]=K);let q;n[35]!==G||n[36]!==K?(q=(0,g.jsxs)(c,{children:[V,H,G,K]}),n[35]=G,n[36]=K,n[37]=q):q=n[37];let J;n[38]===O?J=n[39]:(J=re(O),n[38]=O,n[39]=J);let Y;n[40]===J?Y=n[41]:(Y=(0,g.jsx)(ee,{commands:J}),n[40]=J,n[41]=Y);let X;n[42]===i?X=n[43]:(X=async()=>await i({to:`/ec2/describe-key-pairs`}),n[42]=i,n[43]=X);let Z;n[44]!==_.isPending||n[45]!==w||n[46]!==X?(Z=(0,g.jsx)(m,{isPending:_.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),n[44]=_.isPending,n[45]=w,n[46]=X,n[47]=Z):Z=n[47];let Q;n[48]!==B||n[49]!==q||n[50]!==Y||n[51]!==Z||n[52]!==P?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),n[48]=B,n[49]=q,n[50]=Y,n[51]=Z,n[52]=P,n[53]=Q):Q=n[53];let $;return n[54]!==Q||n[55]!==N?($=(0,g.jsxs)(g.Fragment,{children:[j,M,N,Q]}),n[54]=Q,n[55]=N,n[56]=$):$=n[56],$}function re(e){let t=e(`keyName`);return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\
|
||||
--key-name`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<KeyName>`}`},{type:`flag`,value:` \\
|
||||
--public-key-material`},{type:`value`,value:` fileb://path/to/key.pub`}]}]}export{_ as component};
|
||||
+26
-26
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Co as e,Oo as t,xo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(22),a,o,s,c,l;n[0]===t?(a=n[1],o=n[2],s=n[3],c=n[4],l=n[5]):({title:l,subtitle:c,badge:a,children:o,...s}=t,n[0]=t,n[1]=a,n[2]=o,n[3]=s,n[4]=c,n[5]=l);let u;n[6]===l?u=n[7]:(u=(0,i.jsx)(`h3`,{className:`font-semibold`,children:l}),n[6]=l,n[7]=u);let d;n[8]===c?d=n[9]:(d=c&&(0,i.jsx)(`p`,{className:`mt-1 text-sm font-medium text-muted-foreground`,children:c}),n[8]=c,n[9]=d);let f;n[10]!==o||n[11]!==u||n[12]!==d?(f=(0,i.jsxs)(`div`,{className:`flex-1`,children:[u,d,o]}),n[10]=o,n[11]=u,n[12]=d,n[13]=f):f=n[13];let p;n[14]===a?p=n[15]:(p=a&&(0,i.jsx)(`div`,{className:`ml-4`,children:a}),n[14]=a,n[15]=p);let m;n[16]!==f||n[17]!==p?(m=(0,i.jsxs)(`div`,{className:`flex items-start justify-between`,children:[f,p]}),n[16]=f,n[17]=p,n[18]=m):m=n[18];let h;return n[19]!==s||n[20]!==m?(h=(0,i.jsx)(e,{className:`block rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,...s,children:m}),n[19]=s,n[20]=m,n[21]=h):h=n[21],h}export{a as t};
|
||||
import{Eo as e,xo as t,yo as n}from"./index.js";var r=n(),i=e();function a(e){let n=(0,r.c)(22),a,o,s,c,l;n[0]===e?(a=n[1],o=n[2],s=n[3],c=n[4],l=n[5]):({title:l,subtitle:c,badge:a,children:o,...s}=e,n[0]=e,n[1]=a,n[2]=o,n[3]=s,n[4]=c,n[5]=l);let u;n[6]===l?u=n[7]:(u=(0,i.jsx)(`h3`,{className:`font-semibold`,children:l}),n[6]=l,n[7]=u);let d;n[8]===c?d=n[9]:(d=c&&(0,i.jsx)(`p`,{className:`mt-1 text-sm font-medium text-muted-foreground`,children:c}),n[8]=c,n[9]=d);let f;n[10]!==o||n[11]!==u||n[12]!==d?(f=(0,i.jsxs)(`div`,{className:`flex-1`,children:[u,d,o]}),n[10]=o,n[11]=u,n[12]=d,n[13]=f):f=n[13];let p;n[14]===a?p=n[15]:(p=a&&(0,i.jsx)(`div`,{className:`ml-4`,children:a}),n[14]=a,n[15]=p);let m;n[16]!==f||n[17]!==p?(m=(0,i.jsxs)(`div`,{className:`flex items-start justify-between`,children:[f,p]}),n[16]=f,n[17]=p,n[18]=m):m=n[18];let h;return n[19]!==s||n[20]!==m?(h=(0,i.jsx)(t,{className:`block rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,...s,children:m}),n[19]=s,n[20]=m,n[21]=h):h=n[21],h}export{a as t};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Oo as n,v as r,xo as i,za as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=i(),l=n();function u(){let n=(0,c.c)(3),{data:i}=e(r),s;if(n[0]!==i.Policies){let e=(i.Policies??[]).toSorted(f),r;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(o,{actions:(0,l.jsx)(t,{to:`/iam/create-policy`,children:(0,l.jsx)(a,{children:`Create Policy`})}),title:`Policies`}),n[2]=r):r=n[2],s=(0,l.jsxs)(l.Fragment,{children:[r,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),n[0]=i.Policies,n[1]=s}else s=n[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};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,La as n,v as r,xo as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=a(),l=t();function u(){let t=(0,c.c)(3),{data:a}=e(r),s;if(t[0]!==a.Policies){let e=(a.Policies??[]).toSorted(f),r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(o,{actions:(0,l.jsx)(i,{to:`/iam/create-policy`,children:(0,l.jsx)(n,{children:`Create Policy`})}),title:`Policies`}),t[2]=r):r=t[2],s=(0,l.jsxs)(l.Fragment,{children:[r,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),t[0]=a.Policies,t[1]=s}else s=t[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};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Oo as n,S as r,xo as i,za as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=i(),l=n();function u(){let n=(0,c.c)(3),{data:i}=e(r),s;if(n[0]!==i.Users){let e=(i.Users??[]).toSorted(f),r;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(o,{actions:(0,l.jsx)(t,{to:`/iam/create-user`,children:(0,l.jsx)(a,{children:`Create User`})}),title:`Users`}),n[2]=r):r=n[2],s=(0,l.jsxs)(l.Fragment,{children:[r,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),n[0]=i.Users,n[1]=s}else s=n[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};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,La as n,S as r,xo as i,yo as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=a(),l=t();function u(){let t=(0,c.c)(3),{data:a}=e(r),s;if(t[0]!==a.Users){let e=(a.Users??[]).toSorted(f),r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(o,{actions:(0,l.jsx)(i,{to:`/iam/create-user`,children:(0,l.jsx)(n,{children:`Create User`})}),title:`Users`}),t[2]=r):r=t[2],s=(0,l.jsxs)(l.Fragment,{children:[r,e.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:e.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),t[0]=a.Users,t[1]=s}else s=t[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};
|
||||
@@ -1 +1 @@
|
||||
import{Jo as e,Oo as t,Sr as n,at as r,ko as i,st as a,tn as o,wr as s,xo as c,xr as l,za as u,zi as d}from"./index.js";import{a as f,i as p,r as m,t as h}from"./field.js";import{i as g,t as _}from"./zod.js";import{n as v,r as y,t as b}from"./collapsible.js";import{a as x,o as S,r as C,t as w}from"./card.js";var T=c(),E=e(i()),D=t();function O(){let[e,t]=(0,E.useState)(null),{register:i,handleSubmit:c,formState:{errors:v,isSubmitting:y}}=g({resolver:_(l)});async function b(e){t(null),r(),s(e);try{await a().send(new o({})),window.location.href=`/`}catch{n(),r(),t(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}}return(0,D.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,D.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col gap-4`,children:[(0,D.jsxs)(w,{children:[(0,D.jsx)(x,{children:(0,D.jsx)(S,{children:`AWS Credentials`})}),(0,D.jsxs)(C,{children:[e&&(0,D.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:e}),(0,D.jsx)(`form`,{onSubmit:c(b),children:(0,D.jsxs)(p,{children:[(0,D.jsxs)(h,{children:[(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),(0,D.jsx)(d,{"aria-invalid":!!v.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...i(`accessKeyId`)}),(0,D.jsx)(m,{errors:[v.accessKeyId]})]}),(0,D.jsxs)(h,{children:[(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),(0,D.jsx)(d,{"aria-invalid":!!v.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...i(`secretAccessKey`)}),(0,D.jsx)(m,{errors:[v.secretAccessKey]})]}),(0,D.jsx)(u,{className:`w-full`,disabled:y,type:`submit`,children:y?`Signing in...`:`Sign In`})]})})]})]}),(0,D.jsx)(k,{})]})})}function k(){let e=(0,T.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`text-sm font-medium`,children:`Install Local Certificate Authority`}),(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`To avoid browser certificate warnings, download and install the Spinifex CA as a trusted root on your OS.`})]}),n=(0,D.jsx)(`a`,{className:`inline-flex h-8 w-full items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground`,download:`spinifex-ca.pem`,href:`/api/ca.pem`,children:`Download CA Certificate`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,D.jsx)(y,{className:`cursor-pointer text-xs text-muted-foreground underline-offset-4 hover:underline`,children:`Installation instructions`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,D.jsx)(w,{className:`border-muted bg-muted/30`,children:(0,D.jsx)(C,{className:`pt-4 pb-4`,children:(0,D.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,n,(0,D.jsxs)(b,{children:[r,(0,D.jsx)(v,{children:(0,D.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`font-medium text-foreground`,children:`macOS`}),(0,D.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain spinifex-ca.pem`})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`font-medium text-foreground`,children:`Windows`}),(0,D.jsx)(`p`,{children:`Double-click the file → Install Certificate → Local Machine → Trusted Root Certification Authorities`})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`font-medium text-foreground`,children:`Linux`}),(0,D.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo cp spinifex-ca.pem /usr/local/share/ca-certificates/spinifex-ca.crt && sudo update-ca-certificates`})]})]})})]})]})})}),e[3]=i):i=e[3],i}export{O as component};
|
||||
import{Do as e,Eo as t,Ko as n,La as r,Li as i,Sr as a,br as o,ct as s,nn as c,ot as l,yo as u,yr as d}from"./index.js";import{a as f,i as p,r as m,t as h}from"./field.js";import{i as g,t as _}from"./zod.js";import{n as v,r as y,t as b}from"./collapsible.js";import{a as x,o as S,r as C,t as w}from"./card.js";var T=u(),E=n(e()),D=t();function O(){let[e,t]=(0,E.useState)(null),{register:n,handleSubmit:u,formState:{errors:v,isSubmitting:y}}=g({resolver:_(d)});async function b(e){t(null),l(),a(e);try{await s().send(new c({})),window.location.href=`/`}catch{o(),l(),t(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}}return(0,D.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,D.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col gap-4`,children:[(0,D.jsxs)(w,{children:[(0,D.jsx)(x,{children:(0,D.jsx)(S,{children:`AWS Credentials`})}),(0,D.jsxs)(C,{children:[e&&(0,D.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:e}),(0,D.jsx)(`form`,{onSubmit:u(b),children:(0,D.jsxs)(p,{children:[(0,D.jsxs)(h,{children:[(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),(0,D.jsx)(i,{"aria-invalid":!!v.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...n(`accessKeyId`)}),(0,D.jsx)(m,{errors:[v.accessKeyId]})]}),(0,D.jsxs)(h,{children:[(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),(0,D.jsx)(i,{"aria-invalid":!!v.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...n(`secretAccessKey`)}),(0,D.jsx)(m,{errors:[v.secretAccessKey]})]}),(0,D.jsx)(r,{className:`w-full`,disabled:y,type:`submit`,children:y?`Signing in...`:`Sign In`})]})})]})]}),(0,D.jsx)(k,{})]})})}function k(){let e=(0,T.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`text-sm font-medium`,children:`Install Local Certificate Authority`}),(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`To avoid browser certificate warnings, download and install the Spinifex CA as a trusted root on your OS.`})]}),n=(0,D.jsx)(`a`,{className:`inline-flex h-8 w-full items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground`,download:`spinifex-ca.pem`,href:`/api/ca.pem`,children:`Download CA Certificate`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,D.jsx)(y,{className:`cursor-pointer text-xs text-muted-foreground underline-offset-4 hover:underline`,children:`Installation instructions`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,D.jsx)(w,{className:`border-muted bg-muted/30`,children:(0,D.jsx)(C,{className:`pt-4 pb-4`,children:(0,D.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,n,(0,D.jsxs)(b,{children:[r,(0,D.jsx)(v,{children:(0,D.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`font-medium text-foreground`,children:`macOS`}),(0,D.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain spinifex-ca.pem`})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`font-medium text-foreground`,children:`Windows`}),(0,D.jsx)(`p`,{children:`Double-click the file → Install Certificate → Local Machine → Trusted Root Certification Authorities`})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`p`,{className:`font-medium text-foreground`,children:`Linux`}),(0,D.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo cp spinifex-ca.pem /usr/local/share/ca-certificates/spinifex-ca.crt && sudo update-ca-certificates`})]})]})})]})]})})}),e[3]=i):i=e[3],i}export{O as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Co as t,Ga as n,L as r,Oo as i,xo as a,za as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=a(),u=i();function d(){let n=(0,l.c)(5),{data:i}=e(r),a;n[0]===i.Buckets?a=n[1]:(a=i.Buckets??[],n[0]=i.Buckets,n[1]=a);let c=a,d;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(t,{to:`/s3/create-bucket`,children:(0,u.jsx)(o,{children:`Create Bucket`})}),title:`Buckets`}),n[2]=d):d=n[2];let p;return n[3]===c?p=n[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No buckets found.`})]}),n[3]=c,n[4]=p),p}function f(e){return e.Name?(0,u.jsx)(c,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${n(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component};
|
||||
import{t as e}from"./useSuspenseQuery.js";import{Eo as t,La as n,R as r,Ua as i,xo as a,yo as o}from"./index.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=o(),u=t();function d(){let t=(0,l.c)(5),{data:i}=e(r),o;t[0]===i.Buckets?o=t[1]:(o=i.Buckets??[],t[0]=i.Buckets,t[1]=o);let c=o,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(a,{to:`/s3/create-bucket`,children:(0,u.jsx)(n,{children:`Create Bucket`})}),title:`Buckets`}),t[2]=d):d=t[2];let p;return t[3]===c?p=t[4]:(p=(0,u.jsxs)(u.Fragment,{children:[d,c.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:c.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No buckets found.`})]}),t[3]=c,t[4]=p),p}function f(e){return e.Name?(0,u.jsx)(c,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${i(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Oo as e,xo as t}from"./index.js";var n=t(),r=e();function i(e){let t=(0,n.c)(12),{title:i,subtitle:a,actions:o}=e,s;t[0]===i?s=t[1]:(s=(0,r.jsx)(`h1`,{className:`text-3xl`,children:i}),t[0]=i,t[1]=s);let c;t[2]===a?c=t[3]:(c=a&&(0,r.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:a}),t[2]=a,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,r.jsxs)(`div`,{children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===o?u=t[8]:(u=o&&(0,r.jsx)(`div`,{children:o}),t[7]=o,t[8]=u);let d;return t[9]!==l||t[10]!==u?(d=(0,r.jsxs)(`div`,{className:`mb-6 flex items-start justify-between`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}export{i as t};
|
||||
import{Eo as e,yo as t}from"./index.js";var n=t(),r=e();function i(e){let t=(0,n.c)(12),{title:i,subtitle:a,actions:o}=e,s;t[0]===i?s=t[1]:(s=(0,r.jsx)(`h1`,{className:`text-3xl`,children:i}),t[0]=i,t[1]=s);let c;t[2]===a?c=t[3]:(c=a&&(0,r.jsx)(`p`,{className:`mt-1 text-muted-foreground`,children:a}),t[2]=a,t[3]=c);let l;t[4]!==s||t[5]!==c?(l=(0,r.jsxs)(`div`,{children:[s,c]}),t[4]=s,t[5]=c,t[6]=l):l=t[6];let u;t[7]===o?u=t[8]:(u=o&&(0,r.jsx)(`div`,{children:o}),t[7]=o,t[8]=u);let d;return t[9]!==l||t[10]!==u?(d=(0,r.jsxs)(`div`,{className:`mb-6 flex items-start justify-between`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}export{i as t};
|
||||
@@ -1 +1 @@
|
||||
import{uo as e}from"./index.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
||||
import{co as e}from"./index.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
||||
@@ -1 +1 @@
|
||||
import{Oo as e,So as t,xo as n}from"./index.js";var r=n(),i=e(),a=()=>{let e=(0,r.c)(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,i.jsx)(t,{}),e[0]=n):n=e[0],n};export{a as component};
|
||||
import{Eo as e,bo as t,yo as n}from"./index.js";var r=n(),i=e(),a=()=>{let e=(0,r.c)(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,i.jsx)(t,{}),e[0]=n):n=e[0],n};export{a as component};
|
||||
@@ -1 +1 @@
|
||||
import{Oo as e,So as t,xo as n}from"./index.js";var r=n(),i=e(),a=()=>{let e=(0,r.c)(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,i.jsx)(t,{}),e[0]=n):n=e[0],n};export{a as component};
|
||||
import{Eo as e,bo as t,yo as n}from"./index.js";var r=n(),i=e(),a=()=>{let e=(0,r.c)(1),n;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,i.jsx)(t,{}),e[0]=n):n=e[0],n};export{a as component};
|
||||
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Ha as e,Oo as t,xo as n}from"./index.js";var r=n(),i=t(),a=new Set([`running`,`available`,`completed`,`Active`]),o=new Set([`stopped`,`error`]),s=new Set([`pending`,`shutting-down`,`stopping`]);function c(e){return e&&a.has(e)?`bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100`:e&&o.has(e)?`bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100`:e&&s.has(e)?`bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100`:e===`terminated`?`bg-zinc-100 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400`:`bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100`}function l(t){let n=(0,r.c)(5),{state:a}=t,o;n[0]===a?o=n[1]:(o=e(`rounded-full px-2 py-1 text-xs`,c(a)),n[0]=a,n[1]=o);let s;return n[2]!==a||n[3]!==o?(s=(0,i.jsx)(`div`,{className:o,children:a}),n[2]=a,n[3]=o,n[4]=s):s=n[4],s}export{l as t};
|
||||
import{Ba as e,Eo as t,yo as n}from"./index.js";var r=n(),i=t(),a=new Set([`running`,`available`,`completed`,`Active`]),o=new Set([`stopped`,`error`]),s=new Set([`pending`,`shutting-down`,`stopping`]);function c(e){return e&&a.has(e)?`bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100`:e&&o.has(e)?`bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100`:e&&s.has(e)?`bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100`:e===`terminated`?`bg-zinc-100 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400`:`bg-gray-100 text-gray-800 dark:bg-gray-800 dark:text-gray-100`}function l(t){let n=(0,r.c)(5),{state:a}=t,o;n[0]===a?o=n[1]:(o=e(`rounded-full px-2 py-1 text-xs`,c(a)),n[0]=a,n[1]=o);let s;return n[2]!==a||n[3]!==o?(s=(0,i.jsx)(`div`,{className:o,children:a}),n[2]=a,n[3]=o,n[4]=s):s=n[4],s}export{l as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Ha as e,Oo as t,xo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`textarea`,{className:s,"data-slot":`textarea`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{a as t};
|
||||
import{Ba as e,Eo as t,yo as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(8),a,o;n[0]===t?(a=n[1],o=n[2]):({className:a,...o}=t,n[0]=t,n[1]=a,n[2]=o);let s;n[3]===a?s=n[4]:(s=e(`flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-xs/relaxed dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,a),n[3]=a,n[4]=s);let c;return n[5]!==o||n[6]!==s?(c=(0,i.jsx)(`textarea`,{className:s,"data-slot":`textarea`,...o}),n[5]=o,n[6]=s,n[7]=c):c=n[7],c}export{a as t};
|
||||
@@ -1 +1 @@
|
||||
import{uo as e}from"./index.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
|
||||
import{co as e}from"./index.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
|
||||
@@ -1 +1 @@
|
||||
import{uo as e}from"./index.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t};
|
||||
import{co as e}from"./index.js";var t=e(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]);export{t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{Jo as e,ko as t,xo as n}from"./index.js";var r=n(),i=e(t(),1),a=2e3;function o(){let e=(0,r.c)(5),[t,n]=(0,i.useState)(!1),o=(0,i.useRef)(null),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>()=>{o.current&&clearTimeout(o.current)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=async e=>{await navigator.clipboard.writeText(e),n(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>n(!1),a)},e[2]=l):l=e[2];let u=l,d;return e[3]===t?d=e[4]:(d={copied:t,copy:u},e[3]=t,e[4]=d),d}export{o as t};
|
||||
import{Do as e,Ko as t,yo as n}from"./index.js";var r=n(),i=t(e(),1),a=2e3;function o(){let e=(0,r.c)(5),[t,n]=(0,i.useState)(!1),o=(0,i.useRef)(null),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>()=>{o.current&&clearTimeout(o.current)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=async e=>{await navigator.clipboard.writeText(e),n(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>n(!1),a)},e[2]=l):l=e[2];let u=l,d;return e[3]===t?d=e[4]:(d={copied:t,copy:u},e[3]=t,e[4]=d),d}export{o as t};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -24,9 +24,14 @@ import type { CreateTargetGroupFormData } from "@/types/elbv2"
|
||||
interface TargetGroupFormProps {
|
||||
form: UseFormReturn<CreateTargetGroupFormData>
|
||||
vpcs: Vpc[]
|
||||
allowedProtocols?: readonly string[]
|
||||
}
|
||||
|
||||
export function TargetGroupForm({ form, vpcs }: TargetGroupFormProps) {
|
||||
export function TargetGroupForm({
|
||||
form,
|
||||
vpcs,
|
||||
allowedProtocols = ["HTTP", "HTTPS", "TCP", "UDP", "TLS", "TCP_UDP"],
|
||||
}: TargetGroupFormProps) {
|
||||
const {
|
||||
control,
|
||||
register,
|
||||
@@ -35,6 +40,23 @@ export function TargetGroupForm({ form, vpcs }: TargetGroupFormProps) {
|
||||
formState: { errors },
|
||||
} = form
|
||||
const tags = useWatch({ control, name: "tags" })
|
||||
const protocol = useWatch({ control, name: "protocol" })
|
||||
// Path + Matcher only apply to HTTP(S) health checks; L4 target groups (TCP/
|
||||
// UDP/TLS) use a TCP health check that has neither.
|
||||
const httpHealthCheck = protocol === "HTTP" || protocol === "HTTPS"
|
||||
|
||||
// Keep the health-check protocol consistent with the target-group protocol so
|
||||
// L4 groups submit a TCP health check and L7 groups submit an HTTP one.
|
||||
const handleProtocolChange = (
|
||||
next: CreateTargetGroupFormData["protocol"] | null,
|
||||
) => {
|
||||
if (!next) {
|
||||
return
|
||||
}
|
||||
setValue("protocol", next)
|
||||
const layer7 = next === "HTTP" || next === "HTTPS"
|
||||
setValue("healthCheck.protocol", layer7 ? "HTTP" : "TCP")
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -59,12 +81,16 @@ export function TargetGroupForm({ form, vpcs }: TargetGroupFormProps) {
|
||||
control={control}
|
||||
name="protocol"
|
||||
render={({ field }) => (
|
||||
<Select onValueChange={field.onChange} value={field.value}>
|
||||
<Select onValueChange={handleProtocolChange} value={field.value}>
|
||||
<SelectTrigger className="w-full" id="tg-protocol">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="HTTP">HTTP</SelectItem>
|
||||
{allowedProtocols.map((p) => (
|
||||
<SelectItem key={p} value={p}>
|
||||
{p}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
)}
|
||||
@@ -131,18 +157,20 @@ export function TargetGroupForm({ form, vpcs }: TargetGroupFormProps) {
|
||||
Health check settings
|
||||
</CollapsibleTrigger>
|
||||
<CollapsibleContent className="mt-3 space-y-4 border-l-2 border-muted pl-4">
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="hc-path">Path</label>
|
||||
</FieldTitle>
|
||||
<Input
|
||||
aria-invalid={!!errors.healthCheck?.path}
|
||||
id="hc-path"
|
||||
placeholder="/"
|
||||
{...register("healthCheck.path")}
|
||||
/>
|
||||
<FieldError errors={[errors.healthCheck?.path]} />
|
||||
</Field>
|
||||
{httpHealthCheck && (
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="hc-path">Path</label>
|
||||
</FieldTitle>
|
||||
<Input
|
||||
aria-invalid={!!errors.healthCheck?.path}
|
||||
id="hc-path"
|
||||
placeholder="/"
|
||||
{...register("healthCheck.path")}
|
||||
/>
|
||||
<FieldError errors={[errors.healthCheck?.path]} />
|
||||
</Field>
|
||||
)}
|
||||
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
@@ -223,18 +251,20 @@ export function TargetGroupForm({ form, vpcs }: TargetGroupFormProps) {
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="hc-matcher">Matcher (HTTP codes)</label>
|
||||
</FieldTitle>
|
||||
<Input
|
||||
aria-invalid={!!errors.healthCheck?.matcher}
|
||||
id="hc-matcher"
|
||||
placeholder="200 or 200-299 or 200,201"
|
||||
{...register("healthCheck.matcher")}
|
||||
/>
|
||||
<FieldError errors={[errors.healthCheck?.matcher]} />
|
||||
</Field>
|
||||
{httpHealthCheck && (
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="hc-matcher">Matcher (HTTP codes)</label>
|
||||
</FieldTitle>
|
||||
<Input
|
||||
aria-invalid={!!errors.healthCheck?.matcher}
|
||||
id="hc-matcher"
|
||||
placeholder="200 or 200-299 or 200,201"
|
||||
{...register("healthCheck.matcher")}
|
||||
/>
|
||||
<FieldError errors={[errors.healthCheck?.matcher]} />
|
||||
</Field>
|
||||
)}
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
|
||||
|
||||
@@ -292,6 +292,7 @@ describe("useCreateLoadBalancerWizard", () => {
|
||||
|
||||
const lbBase = {
|
||||
name: "my-alb",
|
||||
type: "application" as const,
|
||||
scheme: "internet-facing" as const,
|
||||
vpcId: "vpc-123",
|
||||
subnetIds: ["subnet-a", "subnet-b"],
|
||||
|
||||
@@ -156,6 +156,7 @@ export function useCreateTargetGroup() {
|
||||
const tags: Tag[] = params.tags
|
||||
.filter((t) => t.key.length > 0)
|
||||
.map((t) => ({ Key: t.key, Value: t.value }))
|
||||
const httpHealthCheck = params.healthCheck.protocol === "HTTP"
|
||||
const command = new CreateTargetGroupCommand({
|
||||
Name: params.name,
|
||||
Protocol: params.protocol,
|
||||
@@ -163,13 +164,15 @@ export function useCreateTargetGroup() {
|
||||
VpcId: params.vpcId,
|
||||
TargetType: "instance",
|
||||
HealthCheckProtocol: params.healthCheck.protocol,
|
||||
HealthCheckPath: params.healthCheck.path,
|
||||
HealthCheckPath: httpHealthCheck ? params.healthCheck.path : undefined,
|
||||
HealthCheckPort: params.healthCheck.port,
|
||||
HealthCheckIntervalSeconds: params.healthCheck.intervalSeconds,
|
||||
HealthCheckTimeoutSeconds: params.healthCheck.timeoutSeconds,
|
||||
HealthyThresholdCount: params.healthCheck.healthyThresholdCount,
|
||||
UnhealthyThresholdCount: params.healthCheck.unhealthyThresholdCount,
|
||||
Matcher: { HttpCode: params.healthCheck.matcher },
|
||||
Matcher: httpHealthCheck
|
||||
? { HttpCode: params.healthCheck.matcher }
|
||||
: undefined,
|
||||
Tags: tags.length > 0 ? tags : undefined,
|
||||
})
|
||||
return await getElbv2Client().send(command)
|
||||
@@ -230,22 +233,30 @@ export function useModifyTargetGroupAttributes() {
|
||||
})
|
||||
}
|
||||
|
||||
export type ListenerProtocol = "HTTP" | "HTTPS"
|
||||
export type ListenerProtocol =
|
||||
| "HTTP"
|
||||
| "HTTPS"
|
||||
| "TCP"
|
||||
| "UDP"
|
||||
| "TLS"
|
||||
| "TCP_UDP"
|
||||
|
||||
// tlsListenerFields returns the Certificates + SslPolicy command fields for an
|
||||
// HTTPS listener, or empty undefined fields for HTTP. The server rejects certs
|
||||
// on a non-secure protocol, so they are only emitted for HTTPS.
|
||||
// tlsListenerFields returns the Certificates + SslPolicy command fields for a
|
||||
// secure listener (HTTPS or NLB TLS), or empty undefined fields otherwise. The
|
||||
// server rejects certs on a non-secure protocol, so they are only emitted for
|
||||
// secure ones; SslPolicy is HTTPS-only (NLB TLS policies are not modelled).
|
||||
function tlsListenerFields(
|
||||
protocol: ListenerProtocol,
|
||||
certificateArn?: string,
|
||||
sslPolicy?: string,
|
||||
): { Certificates?: { CertificateArn: string }[]; SslPolicy?: string } {
|
||||
if (protocol !== "HTTPS" || !certificateArn) {
|
||||
const secure = protocol === "HTTPS" || protocol === "TLS"
|
||||
if (!secure || !certificateArn) {
|
||||
return {}
|
||||
}
|
||||
return {
|
||||
Certificates: [{ CertificateArn: certificateArn }],
|
||||
SslPolicy: sslPolicy,
|
||||
SslPolicy: protocol === "HTTPS" ? sslPolicy : undefined,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,10 +369,12 @@ export interface LbWizardResult {
|
||||
export interface CreateLoadBalancerWizardParams {
|
||||
lb: Omit<CreateLoadBalancerFormData, "listener">
|
||||
listener: {
|
||||
protocol: "HTTP"
|
||||
protocol: ListenerProtocol
|
||||
port: number
|
||||
targetGroupMode: "new" | "existing"
|
||||
existingTargetGroupArn?: string
|
||||
certificateArn?: string
|
||||
sslPolicy?: string
|
||||
newTargetGroup?: CreateTargetGroupFormData
|
||||
}
|
||||
}
|
||||
@@ -390,6 +403,8 @@ export function useCreateLoadBalancerWizard() {
|
||||
const tgTags: Tag[] = tg.tags
|
||||
.filter((t) => t.key.length > 0)
|
||||
.map((t) => ({ Key: t.key, Value: t.value }))
|
||||
// Path + Matcher are HTTP-only; a TCP health check (NLB) rejects them.
|
||||
const httpHealthCheck = tg.healthCheck.protocol === "HTTP"
|
||||
const tgResult = await client.send(
|
||||
new CreateTargetGroupCommand({
|
||||
Name: tg.name,
|
||||
@@ -398,13 +413,17 @@ export function useCreateLoadBalancerWizard() {
|
||||
VpcId: tg.vpcId,
|
||||
TargetType: "instance",
|
||||
HealthCheckProtocol: tg.healthCheck.protocol,
|
||||
HealthCheckPath: tg.healthCheck.path,
|
||||
HealthCheckPath: httpHealthCheck
|
||||
? tg.healthCheck.path
|
||||
: undefined,
|
||||
HealthCheckPort: tg.healthCheck.port,
|
||||
HealthCheckIntervalSeconds: tg.healthCheck.intervalSeconds,
|
||||
HealthCheckTimeoutSeconds: tg.healthCheck.timeoutSeconds,
|
||||
HealthyThresholdCount: tg.healthCheck.healthyThresholdCount,
|
||||
UnhealthyThresholdCount: tg.healthCheck.unhealthyThresholdCount,
|
||||
Matcher: { HttpCode: tg.healthCheck.matcher },
|
||||
Matcher: httpHealthCheck
|
||||
? { HttpCode: tg.healthCheck.matcher }
|
||||
: undefined,
|
||||
Tags: tgTags.length > 0 ? tgTags : undefined,
|
||||
}),
|
||||
)
|
||||
@@ -430,7 +449,7 @@ export function useCreateLoadBalancerWizard() {
|
||||
new CreateLoadBalancerCommand({
|
||||
Name: params.lb.name,
|
||||
Scheme: params.lb.scheme,
|
||||
Type: "application",
|
||||
Type: params.lb.type,
|
||||
IpAddressType: "ipv4",
|
||||
Subnets: params.lb.subnetIds,
|
||||
SecurityGroups:
|
||||
@@ -458,6 +477,11 @@ export function useCreateLoadBalancerWizard() {
|
||||
DefaultActions: [
|
||||
{ Type: "forward", TargetGroupArn: targetGroupArn },
|
||||
],
|
||||
...tlsListenerFields(
|
||||
params.listener.protocol,
|
||||
params.listener.certificateArn,
|
||||
params.listener.sslPolicy,
|
||||
),
|
||||
}),
|
||||
)
|
||||
created.push({ type: "Listener", id: undefined })
|
||||
|
||||
+319
-48
@@ -12,6 +12,7 @@ import {
|
||||
type CliCommand,
|
||||
type CommandPart,
|
||||
} from "@/components/cli-command-panel"
|
||||
import { CertificateImportDialog } from "@/components/elbv2/certificate-import-dialog"
|
||||
import { TargetGroupForm } from "@/components/elbv2/target-group-form"
|
||||
import { ErrorBanner } from "@/components/error-banner"
|
||||
import { FormActions } from "@/components/form-actions"
|
||||
@@ -31,17 +32,28 @@ import {
|
||||
type LbWizardResult,
|
||||
useCreateLoadBalancerWizard,
|
||||
} from "@/mutations/elbv2"
|
||||
import { acmCertificatesQueryOptions } from "@/queries/acm"
|
||||
import {
|
||||
ec2SecurityGroupsQueryOptions,
|
||||
ec2SubnetsQueryOptions,
|
||||
ec2VpcsQueryOptions,
|
||||
} from "@/queries/ec2"
|
||||
import { elbv2TargetGroupsQueryOptions } from "@/queries/elbv2"
|
||||
import {
|
||||
elbv2SslPoliciesQueryOptions,
|
||||
elbv2TargetGroupsQueryOptions,
|
||||
} from "@/queries/elbv2"
|
||||
import {
|
||||
type CreateLoadBalancerFormData,
|
||||
type CreateTargetGroupFormData,
|
||||
type LbType,
|
||||
type ListenerProtocolValue,
|
||||
type TargetGroupProtocol,
|
||||
createLoadBalancerSchema,
|
||||
createTargetGroupSchema,
|
||||
DEFAULT_SSL_POLICY,
|
||||
defaultProtocolForType,
|
||||
isSecureProtocol,
|
||||
protocolsForType,
|
||||
} from "@/types/elbv2"
|
||||
|
||||
function vpcLabel(vpc: Vpc): string {
|
||||
@@ -63,6 +75,24 @@ interface GroupedSubnets {
|
||||
subnets: Subnet[]
|
||||
}
|
||||
|
||||
// The target-group protocol the wizard creates for a given listener protocol.
|
||||
// HTTP and HTTPS both forward to an HTTP target group; secure NLB (TLS) and TCP
|
||||
// terminate at a TCP one.
|
||||
function targetGroupProtocolFor(
|
||||
protocol: ListenerProtocolValue,
|
||||
): TargetGroupProtocol {
|
||||
if (protocol === "TLS" || protocol === "TCP") {
|
||||
return "TCP"
|
||||
}
|
||||
if (protocol === "UDP") {
|
||||
return "UDP"
|
||||
}
|
||||
if (protocol === "TCP_UDP") {
|
||||
return "TCP_UDP"
|
||||
}
|
||||
return "HTTP"
|
||||
}
|
||||
|
||||
function groupSubnetsByAz(subnets: Subnet[]): GroupedSubnets[] {
|
||||
const byAz = new Map<string, Subnet[]>()
|
||||
for (const subnet of subnets) {
|
||||
@@ -82,19 +112,27 @@ export function CreateLoadBalancerPage() {
|
||||
const { data: subnetsData } = useSuspenseQuery(ec2SubnetsQueryOptions)
|
||||
const { data: sgsData } = useSuspenseQuery(ec2SecurityGroupsQueryOptions)
|
||||
const { data: tgsData } = useSuspenseQuery(elbv2TargetGroupsQueryOptions)
|
||||
const { data: certsData } = useSuspenseQuery(acmCertificatesQueryOptions)
|
||||
const { data: sslPoliciesData } = useSuspenseQuery(
|
||||
elbv2SslPoliciesQueryOptions,
|
||||
)
|
||||
const wizardMutation = useCreateLoadBalancerWizard()
|
||||
|
||||
const [wizardResult, setWizardResult] = useState<LbWizardResult | null>(null)
|
||||
const [importOpen, setImportOpen] = useState(false)
|
||||
|
||||
const vpcs = vpcsData.Vpcs ?? []
|
||||
const allSubnets = subnetsData.Subnets ?? []
|
||||
const allSgs = sgsData.SecurityGroups ?? []
|
||||
const allTgs = tgsData.TargetGroups ?? []
|
||||
const certificates = certsData.CertificateSummaryList ?? []
|
||||
const sslPolicies = sslPoliciesData.SslPolicies ?? []
|
||||
|
||||
const lbForm = useForm<CreateLoadBalancerFormData>({
|
||||
resolver: zodResolver(createLoadBalancerSchema),
|
||||
defaultValues: {
|
||||
name: "",
|
||||
type: "application",
|
||||
scheme: "internet-facing",
|
||||
vpcId: vpcs[0]?.VpcId ?? "",
|
||||
subnetIds: [],
|
||||
@@ -105,6 +143,8 @@ export function CreateLoadBalancerPage() {
|
||||
port: 80,
|
||||
targetGroupMode: "new",
|
||||
existingTargetGroupArn: "",
|
||||
certificateArn: undefined,
|
||||
sslPolicy: undefined,
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -143,13 +183,69 @@ export function CreateLoadBalancerPage() {
|
||||
const selectedVpc = watch("vpcId")
|
||||
const selectedSubnets = watch("subnetIds")
|
||||
const selectedSgs = watch("securityGroupIds")
|
||||
const lbType = watch("type")
|
||||
const listenerProtocol = watch("listener.protocol")
|
||||
const tgMode = watch("listener.targetGroupMode")
|
||||
const tags = watch("tags")
|
||||
|
||||
const isNlb = lbType === "network"
|
||||
const isSecure = isSecureProtocol(listenerProtocol)
|
||||
const listenerProtocols = protocolsForType(lbType)
|
||||
// The default target group's protocol must match the listener's L4/L7 family;
|
||||
// HTTPS terminates at an HTTP target group, secure NLB (TLS) at a TCP one.
|
||||
const targetGroupProtocols = isNlb
|
||||
? ["TCP", "UDP", "TLS", "TCP_UDP"]
|
||||
: ["HTTP", "HTTPS"]
|
||||
|
||||
const vpcSubnets = allSubnets.filter((s) => s.VpcId === selectedVpc)
|
||||
const vpcSgs = allSgs.filter((g) => g.VpcId === selectedVpc)
|
||||
const vpcTgs = allTgs.filter((tg) => tg.VpcId === selectedVpc)
|
||||
|
||||
// Keep the inline target-group form's protocol + health-check protocol in step
|
||||
// with the listener so the wizard submits a compatible pair.
|
||||
const syncTargetGroupProtocol = (listenerProto: ListenerProtocolValue) => {
|
||||
const tgProto = targetGroupProtocolFor(listenerProto)
|
||||
tgForm.setValue("protocol", tgProto)
|
||||
tgForm.setValue("healthCheck.protocol", tgProto === "HTTP" ? "HTTP" : "TCP")
|
||||
}
|
||||
|
||||
const handleTypeChange = (next: LbType) => {
|
||||
setValue("type", next)
|
||||
const proto = defaultProtocolForType(next)
|
||||
setValue("listener.protocol", proto)
|
||||
setValue("listener.port", 80)
|
||||
setValue("listener.certificateArn", undefined)
|
||||
setValue("listener.sslPolicy", undefined)
|
||||
if (next === "network") {
|
||||
setValue("securityGroupIds", [])
|
||||
}
|
||||
syncTargetGroupProtocol(proto)
|
||||
}
|
||||
|
||||
// Adjust port + secure fields on a listener-protocol switch, mirroring the
|
||||
// standalone listener form: secure protocols default to 443 and seed the SSL
|
||||
// policy; non-secure ones drop cert + policy so the server doesn't reject.
|
||||
const SECURE_PORT = 443
|
||||
const handleProtocolChange = (next: ListenerProtocolValue) => {
|
||||
setValue("listener.protocol", next)
|
||||
const current = getValues("listener.port")
|
||||
if (isSecureProtocol(next)) {
|
||||
if (current === 80) {
|
||||
setValue("listener.port", SECURE_PORT)
|
||||
}
|
||||
if (next === "HTTPS" && !getValues("listener.sslPolicy")) {
|
||||
setValue("listener.sslPolicy", DEFAULT_SSL_POLICY)
|
||||
}
|
||||
} else {
|
||||
if (current === SECURE_PORT) {
|
||||
setValue("listener.port", 80)
|
||||
}
|
||||
setValue("listener.certificateArn", undefined)
|
||||
setValue("listener.sslPolicy", undefined)
|
||||
}
|
||||
syncTargetGroupProtocol(next)
|
||||
}
|
||||
|
||||
// When the VPC changes, any previously-selected subnets/SGs/TGs from the old
|
||||
// VPC must be cleared — they would fail backend validation on submit.
|
||||
const handleVpcChange = (newVpcId: string | null = "") => {
|
||||
@@ -192,6 +288,7 @@ export function CreateLoadBalancerPage() {
|
||||
const result = await wizardMutation.mutateAsync({
|
||||
lb: {
|
||||
name: data.name,
|
||||
type: data.type,
|
||||
scheme: data.scheme,
|
||||
vpcId: data.vpcId,
|
||||
subnetIds: data.subnetIds,
|
||||
@@ -203,6 +300,8 @@ export function CreateLoadBalancerPage() {
|
||||
port: data.listener.port,
|
||||
targetGroupMode: data.listener.targetGroupMode,
|
||||
existingTargetGroupArn: data.listener.existingTargetGroupArn,
|
||||
certificateArn: data.listener.certificateArn,
|
||||
sslPolicy: data.listener.sslPolicy,
|
||||
newTargetGroup,
|
||||
},
|
||||
})
|
||||
@@ -273,6 +372,38 @@ export function CreateLoadBalancerPage() {
|
||||
<FieldError errors={[errors.name]} />
|
||||
</Field>
|
||||
|
||||
<Field>
|
||||
<FieldTitle>Type</FieldTitle>
|
||||
<Controller
|
||||
control={control}
|
||||
name="type"
|
||||
render={({ field }) => (
|
||||
<div className="flex gap-4">
|
||||
<label className="flex items-center gap-2 text-xs">
|
||||
<input
|
||||
aria-label="Application Load Balancer"
|
||||
checked={field.value === "application"}
|
||||
name="lb-type"
|
||||
onChange={() => handleTypeChange("application")}
|
||||
type="radio"
|
||||
/>
|
||||
Application (ALB)
|
||||
</label>
|
||||
<label className="flex items-center gap-2 text-xs">
|
||||
<input
|
||||
aria-label="Network Load Balancer"
|
||||
checked={field.value === "network"}
|
||||
name="lb-type"
|
||||
onChange={() => handleTypeChange("network")}
|
||||
type="radio"
|
||||
/>
|
||||
Network (NLB)
|
||||
</label>
|
||||
</div>
|
||||
)}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field>
|
||||
<FieldTitle>Scheme</FieldTitle>
|
||||
<Controller
|
||||
@@ -375,33 +506,35 @@ export function CreateLoadBalancerPage() {
|
||||
<FieldError errors={[errors.subnetIds]} />
|
||||
</Field>
|
||||
|
||||
<Field>
|
||||
<FieldTitle>Security groups</FieldTitle>
|
||||
{vpcSgs.length === 0 ? (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
No security groups in the selected VPC.
|
||||
</p>
|
||||
) : (
|
||||
<div className="space-y-1">
|
||||
{vpcSgs.map((sg) => (
|
||||
<label
|
||||
className="flex items-center gap-2 text-xs"
|
||||
key={sg.GroupId}
|
||||
>
|
||||
<input
|
||||
aria-label={`Security group ${sg.GroupId} (${sg.GroupName})`}
|
||||
checked={selectedSgs.includes(sg.GroupId ?? "")}
|
||||
onChange={() => toggleSg(sg.GroupId ?? "")}
|
||||
type="checkbox"
|
||||
/>
|
||||
<span className="font-mono">
|
||||
{sg.GroupId} ({sg.GroupName})
|
||||
</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</Field>
|
||||
{!isNlb && (
|
||||
<Field>
|
||||
<FieldTitle>Security groups</FieldTitle>
|
||||
{vpcSgs.length === 0 ? (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
No security groups in the selected VPC.
|
||||
</p>
|
||||
) : (
|
||||
<div className="space-y-1">
|
||||
{vpcSgs.map((sg) => (
|
||||
<label
|
||||
className="flex items-center gap-2 text-xs"
|
||||
key={sg.GroupId}
|
||||
>
|
||||
<input
|
||||
aria-label={`Security group ${sg.GroupId} (${sg.GroupName})`}
|
||||
checked={selectedSgs.includes(sg.GroupId ?? "")}
|
||||
onChange={() => toggleSg(sg.GroupId ?? "")}
|
||||
type="checkbox"
|
||||
/>
|
||||
<span className="font-mono">
|
||||
{sg.GroupId} ({sg.GroupName})
|
||||
</span>
|
||||
</label>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</Field>
|
||||
)}
|
||||
|
||||
<Field>
|
||||
<FieldTitle>Tags</FieldTitle>
|
||||
@@ -456,12 +589,23 @@ export function CreateLoadBalancerPage() {
|
||||
control={control}
|
||||
name="listener.protocol"
|
||||
render={({ field }) => (
|
||||
<Select onValueChange={field.onChange} value={field.value}>
|
||||
<Select
|
||||
onValueChange={(next: ListenerProtocolValue | null) => {
|
||||
if (next) {
|
||||
handleProtocolChange(next)
|
||||
}
|
||||
}}
|
||||
value={field.value}
|
||||
>
|
||||
<SelectTrigger className="w-full" id="listener-protocol">
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="HTTP">HTTP</SelectItem>
|
||||
{listenerProtocols.map((p) => (
|
||||
<SelectItem key={p} value={p}>
|
||||
{p}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
)}
|
||||
@@ -482,6 +626,97 @@ export function CreateLoadBalancerPage() {
|
||||
<FieldError errors={[errors.listener?.port]} />
|
||||
</Field>
|
||||
|
||||
{isSecure && (
|
||||
<>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="listener-certificate">Certificate</label>
|
||||
</FieldTitle>
|
||||
<Controller
|
||||
control={control}
|
||||
name="listener.certificateArn"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
onValueChange={field.onChange}
|
||||
value={field.value ?? ""}
|
||||
>
|
||||
<SelectTrigger
|
||||
aria-invalid={!!errors.listener?.certificateArn}
|
||||
className="w-full"
|
||||
id="listener-certificate"
|
||||
>
|
||||
<SelectValue placeholder="Select certificate" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{certificates.map((cert) => (
|
||||
<SelectItem
|
||||
key={cert.CertificateArn}
|
||||
value={cert.CertificateArn ?? ""}
|
||||
>
|
||||
{cert.DomainName ??
|
||||
cert.CertificateArn?.split("/").pop()}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
<FieldError errors={[errors.listener?.certificateArn]} />
|
||||
<div className="mt-1 flex items-center justify-between">
|
||||
{certificates.length === 0 && (
|
||||
<p className="text-xs text-muted-foreground">
|
||||
No certificates imported yet.
|
||||
</p>
|
||||
)}
|
||||
<Button
|
||||
className="ml-auto"
|
||||
onClick={() => setImportOpen(true)}
|
||||
size="sm"
|
||||
type="button"
|
||||
variant="ghost"
|
||||
>
|
||||
Import certificate…
|
||||
</Button>
|
||||
</div>
|
||||
</Field>
|
||||
|
||||
{listenerProtocol === "HTTPS" && (
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="listener-ssl-policy">Security policy</label>
|
||||
</FieldTitle>
|
||||
<Controller
|
||||
control={control}
|
||||
name="listener.sslPolicy"
|
||||
render={({ field }) => (
|
||||
<Select
|
||||
onValueChange={field.onChange}
|
||||
value={field.value ?? DEFAULT_SSL_POLICY}
|
||||
>
|
||||
<SelectTrigger
|
||||
className="w-full"
|
||||
id="listener-ssl-policy"
|
||||
>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{sslPolicies.map((policy) => (
|
||||
<SelectItem
|
||||
key={policy.Name}
|
||||
value={policy.Name ?? ""}
|
||||
>
|
||||
{policy.Name}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
</Field>
|
||||
)}
|
||||
</>
|
||||
)}
|
||||
|
||||
<Field>
|
||||
<FieldTitle>Default target group</FieldTitle>
|
||||
<Controller
|
||||
@@ -559,11 +794,23 @@ export function CreateLoadBalancerPage() {
|
||||
|
||||
{tgMode === "new" && (
|
||||
<div className="space-y-4 border-l-2 border-muted pl-4">
|
||||
<TargetGroupForm form={tgForm} vpcs={vpcs} />
|
||||
<TargetGroupForm
|
||||
allowedProtocols={targetGroupProtocols}
|
||||
form={tgForm}
|
||||
vpcs={vpcs}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
<CertificateImportDialog
|
||||
onImported={(arn) =>
|
||||
setValue("listener.certificateArn", arn, { shouldValidate: true })
|
||||
}
|
||||
onOpenChange={setImportOpen}
|
||||
open={importOpen}
|
||||
/>
|
||||
|
||||
<CliCommandPanel
|
||||
commands={buildCreateLbCommands(watch, tgForm.watch)}
|
||||
/>
|
||||
@@ -603,18 +850,24 @@ function buildCreateLbCommands(
|
||||
}
|
||||
|
||||
const name = asString("name") || "<Name>"
|
||||
const lbTypeValue = asString("type") || "application"
|
||||
const scheme = asString("scheme") || "internet-facing"
|
||||
const subnets = asStringArray("subnetIds")
|
||||
const sgs = asStringArray("securityGroupIds")
|
||||
const listenerProtocol = asString("listener.protocol") || "HTTP"
|
||||
const listenerPort = asNumber("listener.port") ?? 80
|
||||
const certificateArn = asString("listener.certificateArn")
|
||||
const sslPolicy = asString("listener.sslPolicy")
|
||||
const tgMode = asString("listener.targetGroupMode")
|
||||
const existingTgArn = asString("listener.existingTargetGroupArn")
|
||||
|
||||
const commands: CliCommand[] = []
|
||||
const comment: CommandPart = {
|
||||
type: "comment",
|
||||
value: "# Create ALB with listener and default target group\n\n",
|
||||
value:
|
||||
lbTypeValue === "network"
|
||||
? "# Create NLB with listener and default target group\n\n"
|
||||
: "# Create ALB with listener and default target group\n\n",
|
||||
}
|
||||
|
||||
const tgAsString = (key: string): string => {
|
||||
@@ -631,6 +884,7 @@ function buildCreateLbCommands(
|
||||
const tgName = tgAsString("name") || "<TG-Name>"
|
||||
const tgPort = tgAsNumber("port") ?? 80
|
||||
const tgVpc = tgAsString("vpcId")
|
||||
const tgProtocol = tgAsString("protocol") || "HTTP"
|
||||
commands.push({
|
||||
label: "Create Target Group",
|
||||
parts: [
|
||||
@@ -642,7 +896,9 @@ function buildCreateLbCommands(
|
||||
},
|
||||
{ type: "flag", value: " \\\n --name" },
|
||||
{ type: "value", value: ` ${tgName}` },
|
||||
{ type: "flag", value: " \\\n --protocol HTTP --port" },
|
||||
{ type: "flag", value: " \\\n --protocol" },
|
||||
{ type: "value", value: ` ${tgProtocol}` },
|
||||
{ type: "flag", value: " --port" },
|
||||
{ type: "value", value: ` ${tgPort}` },
|
||||
{ type: "flag", value: " \\\n --target-type instance --vpc-id" },
|
||||
{ type: "value", value: ` ${tgVpc || "<vpc-id>"}` },
|
||||
@@ -674,7 +930,8 @@ function buildCreateLbCommands(
|
||||
{ type: "value", value: ` ${name}` },
|
||||
{ type: "flag", value: " \\\n --scheme" },
|
||||
{ type: "value", value: ` ${scheme}` },
|
||||
{ type: "flag", value: " \\\n --type application" },
|
||||
{ type: "flag", value: " \\\n --type" },
|
||||
{ type: "value", value: ` ${lbTypeValue}` },
|
||||
]
|
||||
if (subnets.length > 0) {
|
||||
lbParts.push(
|
||||
@@ -697,20 +954,34 @@ function buildCreateLbCommands(
|
||||
commands.push({ label: "Create Load Balancer", parts: lbParts })
|
||||
|
||||
// Create Listener
|
||||
commands.push({
|
||||
label: "Create Listener",
|
||||
parts: [
|
||||
{ type: "bin", value: "AWS_PROFILE=spinifex aws elbv2 create-listener" },
|
||||
{ type: "flag", value: " \\\n --load-balancer-arn" },
|
||||
{ type: "variable", value: ' "$LB_ARN"' },
|
||||
{ type: "flag", value: " \\\n --protocol" },
|
||||
{ type: "value", value: ` ${listenerProtocol}` },
|
||||
{ type: "flag", value: " \\\n --port" },
|
||||
{ type: "value", value: ` ${listenerPort}` },
|
||||
{ type: "flag", value: " \\\n --default-actions" },
|
||||
{ type: "value", value: ' Type=forward,TargetGroupArn="$TG_ARN"' },
|
||||
],
|
||||
})
|
||||
const listenerParts: CommandPart[] = [
|
||||
{ type: "bin", value: "AWS_PROFILE=spinifex aws elbv2 create-listener" },
|
||||
{ type: "flag", value: " \\\n --load-balancer-arn" },
|
||||
{ type: "variable", value: ' "$LB_ARN"' },
|
||||
{ type: "flag", value: " \\\n --protocol" },
|
||||
{ type: "value", value: ` ${listenerProtocol}` },
|
||||
{ type: "flag", value: " \\\n --port" },
|
||||
{ type: "value", value: ` ${listenerPort}` },
|
||||
]
|
||||
const secureListener =
|
||||
listenerProtocol === "HTTPS" || listenerProtocol === "TLS"
|
||||
if (secureListener && certificateArn) {
|
||||
listenerParts.push(
|
||||
{ type: "flag", value: " \\\n --certificates" },
|
||||
{ type: "value", value: ` CertificateArn=${certificateArn}` },
|
||||
)
|
||||
if (listenerProtocol === "HTTPS" && sslPolicy) {
|
||||
listenerParts.push(
|
||||
{ type: "flag", value: " \\\n --ssl-policy" },
|
||||
{ type: "value", value: ` ${sslPolicy}` },
|
||||
)
|
||||
}
|
||||
}
|
||||
listenerParts.push(
|
||||
{ type: "flag", value: " \\\n --default-actions" },
|
||||
{ type: "value", value: ' Type=forward,TargetGroupArn="$TG_ARN"' },
|
||||
)
|
||||
commands.push({ label: "Create Listener", parts: listenerParts })
|
||||
|
||||
return commands
|
||||
}
|
||||
|
||||
+22
-16
@@ -99,6 +99,8 @@ export function LoadBalancerDetailPage({ arn }: Props) {
|
||||
const vpcSecurityGroups = (sgsData.SecurityGroups ?? []).filter(
|
||||
(sg) => sg.VpcId === lb.VpcId,
|
||||
)
|
||||
// NLBs carry no security groups, so the editor tab is hidden for them.
|
||||
const isNlb = lb.Type === "network"
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -136,7 +138,9 @@ export function LoadBalancerDetailPage({ arn }: Props) {
|
||||
<TabsList>
|
||||
<TabsTab value="overview">Overview</TabsTab>
|
||||
<TabsTab value="listeners">Listeners</TabsTab>
|
||||
<TabsTab value="security-groups">Security groups</TabsTab>
|
||||
{!isNlb && (
|
||||
<TabsTab value="security-groups">Security groups</TabsTab>
|
||||
)}
|
||||
<TabsTab value="attributes">Attributes</TabsTab>
|
||||
<TabsTab value="tags">Tags</TabsTab>
|
||||
</TabsList>
|
||||
@@ -195,21 +199,23 @@ export function LoadBalancerDetailPage({ arn }: Props) {
|
||||
<ListenersTab loadBalancerArn={arn} vpcId={lb.VpcId} />
|
||||
</TabsPanel>
|
||||
|
||||
<TabsPanel value="security-groups">
|
||||
<SecurityGroupsEditor
|
||||
available={vpcSecurityGroups}
|
||||
current={currentSecurityGroups}
|
||||
error={setSecurityGroupsMutation.error}
|
||||
isPending={setSecurityGroupsMutation.isPending}
|
||||
isSuccess={setSecurityGroupsMutation.isSuccess}
|
||||
onSubmit={(securityGroupIds) =>
|
||||
setSecurityGroupsMutation.mutate({
|
||||
loadBalancerArn: arn,
|
||||
securityGroupIds,
|
||||
})
|
||||
}
|
||||
/>
|
||||
</TabsPanel>
|
||||
{!isNlb && (
|
||||
<TabsPanel value="security-groups">
|
||||
<SecurityGroupsEditor
|
||||
available={vpcSecurityGroups}
|
||||
current={currentSecurityGroups}
|
||||
error={setSecurityGroupsMutation.error}
|
||||
isPending={setSecurityGroupsMutation.isPending}
|
||||
isSuccess={setSecurityGroupsMutation.isSuccess}
|
||||
onSubmit={(securityGroupIds) =>
|
||||
setSecurityGroupsMutation.mutate({
|
||||
loadBalancerArn: arn,
|
||||
securityGroupIds,
|
||||
})
|
||||
}
|
||||
/>
|
||||
</TabsPanel>
|
||||
)}
|
||||
|
||||
<TabsPanel value="attributes">
|
||||
<AttributesEditor
|
||||
|
||||
+66
@@ -96,6 +96,8 @@ function seedClient() {
|
||||
qc.setQueryData(["ec2", "subnets"], { Subnets: SUBNETS })
|
||||
qc.setQueryData(["ec2", "securityGroups"], { SecurityGroups: SGS })
|
||||
qc.setQueryData(["elbv2", "targetGroups"], { TargetGroups: [EXISTING_TG] })
|
||||
qc.setQueryData(["acm", "certificates"], { CertificateSummaryList: [] })
|
||||
qc.setQueryData(["elbv2", "sslPolicies"], { SslPolicies: [] })
|
||||
return qc
|
||||
}
|
||||
|
||||
@@ -224,6 +226,70 @@ describe("create-load-balancer route", () => {
|
||||
])
|
||||
})
|
||||
|
||||
it("selecting Network creates an NLB with a TCP listener and target group", async () => {
|
||||
const user = userEvent.setup()
|
||||
sdk.setHandler("CreateTargetGroupCommand", () => ({
|
||||
TargetGroups: [{ TargetGroupArn: "arn:tg:new" }],
|
||||
}))
|
||||
sdk.setHandler("CreateLoadBalancerCommand", () => ({
|
||||
LoadBalancers: [{ LoadBalancerArn: "arn:lb:new" }],
|
||||
}))
|
||||
sdk.setHandler("CreateListenerCommand", () => ({
|
||||
Listeners: [{ ListenerArn: "arn:listener:new" }],
|
||||
}))
|
||||
|
||||
renderWithClient(<CreateLoadBalancerPage />, seedClient())
|
||||
|
||||
await user.click(screen.getByLabelText("Network Load Balancer"))
|
||||
|
||||
await user.type(
|
||||
screen.getByLabelText("Name", { selector: "#lb-name" }),
|
||||
"my-nlb",
|
||||
)
|
||||
await user.type(
|
||||
screen.getByLabelText("Name", { selector: "#tg-name" }),
|
||||
"my-tg",
|
||||
)
|
||||
await selectSubnets(user)
|
||||
|
||||
await user.click(
|
||||
screen.getByRole("button", { name: "Create Load Balancer" }),
|
||||
)
|
||||
|
||||
await waitFor(() => {
|
||||
expect(routerState.navigate).toHaveBeenCalled()
|
||||
})
|
||||
|
||||
const createCalls = sdk.send.mock.calls.filter((call) =>
|
||||
(
|
||||
call[0] as { constructor: { name: string } }
|
||||
).constructor.name.startsWith("Create"),
|
||||
)
|
||||
const byName = (name: string) =>
|
||||
createCalls.find(
|
||||
(call) =>
|
||||
(call[0] as { constructor: { name: string } }).constructor.name ===
|
||||
name,
|
||||
)?.[0].input as Record<string, unknown> | undefined
|
||||
|
||||
expect(byName("CreateLoadBalancerCommand")).toMatchObject({
|
||||
Type: "network",
|
||||
})
|
||||
// NLB hides the security-group field, so none are submitted.
|
||||
expect(byName("CreateLoadBalancerCommand")?.SecurityGroups).toBeUndefined()
|
||||
expect(byName("CreateTargetGroupCommand")).toMatchObject({
|
||||
Protocol: "TCP",
|
||||
HealthCheckProtocol: "TCP",
|
||||
})
|
||||
// TCP health checks have neither an HTTP path nor a matcher.
|
||||
expect(byName("CreateTargetGroupCommand")?.Matcher).toBeUndefined()
|
||||
expect(byName("CreateTargetGroupCommand")?.HealthCheckPath).toBeUndefined()
|
||||
expect(byName("CreateListenerCommand")).toMatchObject({
|
||||
Protocol: "TCP",
|
||||
Port: 80,
|
||||
})
|
||||
})
|
||||
|
||||
it("surfaces wizard failure with partial cleanup guidance when LB step fails", async () => {
|
||||
const user = userEvent.setup()
|
||||
sdk.setHandler("CreateTargetGroupCommand", () => ({
|
||||
|
||||
+7
-1
@@ -1,11 +1,15 @@
|
||||
import { createFileRoute } from "@tanstack/react-router"
|
||||
|
||||
import { acmCertificatesQueryOptions } from "@/queries/acm"
|
||||
import {
|
||||
ec2SecurityGroupsQueryOptions,
|
||||
ec2SubnetsQueryOptions,
|
||||
ec2VpcsQueryOptions,
|
||||
} from "@/queries/ec2"
|
||||
import { elbv2TargetGroupsQueryOptions } from "@/queries/elbv2"
|
||||
import {
|
||||
elbv2SslPoliciesQueryOptions,
|
||||
elbv2TargetGroupsQueryOptions,
|
||||
} from "@/queries/elbv2"
|
||||
|
||||
import { CreateLoadBalancerPage } from "./-components/create-load-balancer-page"
|
||||
|
||||
@@ -18,6 +22,8 @@ export const Route = createFileRoute(
|
||||
context.queryClient.ensureQueryData(ec2SubnetsQueryOptions),
|
||||
context.queryClient.ensureQueryData(ec2SecurityGroupsQueryOptions),
|
||||
context.queryClient.ensureQueryData(elbv2TargetGroupsQueryOptions),
|
||||
context.queryClient.ensureQueryData(acmCertificatesQueryOptions),
|
||||
context.queryClient.ensureQueryData(elbv2SslPoliciesQueryOptions),
|
||||
])
|
||||
},
|
||||
head: () => ({
|
||||
|
||||
+38
@@ -121,6 +121,44 @@ describe("load-balancer detail route", () => {
|
||||
expect(screen.getByText("application")).toBeInTheDocument()
|
||||
expect(screen.getByText("internet-facing")).toBeInTheDocument()
|
||||
expect(screen.getByText("sg-1")).toBeInTheDocument()
|
||||
expect(
|
||||
screen.getByRole("tab", { name: "Security groups" }),
|
||||
).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it("hides the Security groups tab for a network load balancer", () => {
|
||||
const qc = createTestQueryClient()
|
||||
qc.setQueryData(["elbv2", "loadBalancers", LB_ARN], {
|
||||
LoadBalancers: [
|
||||
{
|
||||
LoadBalancerArn: LB_ARN,
|
||||
LoadBalancerName: "my-nlb",
|
||||
DNSName: "my-nlb.example",
|
||||
Type: "network",
|
||||
Scheme: "internet-facing",
|
||||
IpAddressType: "ipv4",
|
||||
VpcId: "vpc-aaa",
|
||||
State: { Code: "active" },
|
||||
AvailabilityZones: [{ ZoneName: "az-1", SubnetId: "subnet-a" }],
|
||||
},
|
||||
],
|
||||
})
|
||||
qc.setQueryData(["elbv2", "loadBalancers", LB_ARN, "attributes"], {
|
||||
Attributes: [],
|
||||
})
|
||||
qc.setQueryData(["elbv2", "tags", LB_ARN], { TagDescriptions: [] })
|
||||
qc.setQueryData(["elbv2", "listeners", LB_ARN], { Listeners: [] })
|
||||
qc.setQueryData(["elbv2", "targetGroups"], { TargetGroups: [] })
|
||||
qc.setQueryData(["ec2", "subnets"], {
|
||||
Subnets: [{ SubnetId: "subnet-a", CidrBlock: "10.0.1.0/24", Tags: [] }],
|
||||
})
|
||||
qc.setQueryData(["ec2", "securityGroups"], { SecurityGroups: [] })
|
||||
|
||||
renderWithClient(<LoadBalancerDetailPage arn={LB_ARN} />, qc)
|
||||
|
||||
expect(screen.getByText("my-nlb")).toBeInTheDocument()
|
||||
expect(screen.queryByRole("tab", { name: "Security groups" })).toBeNull()
|
||||
expect(screen.getByRole("tab", { name: "Listeners" })).toBeInTheDocument()
|
||||
})
|
||||
|
||||
it("renders a not-found state when the LB ARN is unknown", () => {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user