feat(ui): HTTPS listeners — ACM certificate + SSL policy (Phase C) (#290)

* feat(ui): HTTPS listeners with ACM certificate + SSL policy

Expose HTTPS in the load balancer listener UI. The ListenerForm gains a
HTTPS protocol option that reveals a certificate selector (backed by a new
ACM ListCertificates query), an inline certificate import dialog
(ImportCertificate), and an SSL security-policy selector (DescribeSSLPolicies).
CreateListener/ModifyListener now carry Certificates + SslPolicy for HTTPS;
the listeners table summarises the policy and certificate per HTTPS listener.

Adds an ACM client (getAcmClient) and @aws-sdk/client-acm. Server, gateway
and ACM endpoints already exist (epic phases A + B); this is frontend-only.

* fix: ACM JSON timestamps, react-compiler watch reactivity, scroll-chaining

- gateway/acm: serialise responses with jsonutil.BuildJSON so time.Time
  fields emit epoch seconds (AWS JSON 1.1 wire format). encoding/json
  emitted RFC3339 strings the JS SDK rejected with 'Expected real number',
  crashing the LB detail Listeners tab once any cert exists.
- frontend: replace watch() with useWatch across forms so the React
  Compiler tracks the subscription and re-renders on field change
  (HTTPS listener cert/policy fields now reveal). Add toggle regression
  test for listener-form.
- frontend: scope overscroll-none to html,body instead of *, restoring
  wheel scroll-chaining over nested scroll containers (sidebar, tables,
  dialogs).
This commit is contained in:
Josh Siviour
2026-06-04 14:19:30 +10:00
committed by GitHub
parent bcb49cd771
commit 216b9c7682
119 changed files with 1205 additions and 189 deletions
+7 -2
View File
@@ -9,15 +9,20 @@ import (
"log/slog"
"net/http"
"github.com/aws/aws-sdk-go/private/protocol/json/jsonutil"
"github.com/mulgadc/spinifex/spinifex/awserrors"
)
// JSONContentType is the AWS JSON 1.1 content type ACM clients expect.
const JSONContentType = "application/x-amz-json-1.1"
// WriteJSONResponse serialises obj as a 200 AWS JSON 1.1 response.
// WriteJSONResponse serialises obj as a 200 AWS JSON 1.1 response. obj is an
// aws-sdk-go *Output struct whose time.Time fields must serialise as epoch
// seconds (the AWS JSON 1.1 timestamp wire format); encoding/json would emit
// RFC3339 strings the AWS SDKs reject with "Expected real number". jsonutil
// is the marshaler the SDK itself uses for this protocol.
func WriteJSONResponse(w http.ResponseWriter, obj any) {
body, err := json.Marshal(obj)
body, err := jsonutil.BuildJSON(obj)
if err != nil {
slog.Error("ACM: failed to marshal response JSON", "err", err)
http.Error(w, awserrors.ErrorInternalError, http.StatusInternalServerError)
+1 -1
View File
@@ -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{Aa as s,Da as c,F as l,Fa as u,h as d,ka as f,lo as p,mo as m,so as h}from"./index.js";var g=h(),_=m();function v(){let m=(0,g.c)(24),{bucket:h,_splat:v}=d.useParams(),y=f(v??``),{data:b}=t(l(h,y)),x=o(),S;m[0]===b.Contents?S=m[1]:(S=b.Contents??[],m[0]=b.Contents,m[1]=S);let C=S,w;m[2]===b.CommonPrefixes?w=m[3]:(w=b.CommonPrefixes??[],m[2]=b.CommonPrefixes,m[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;m[4]===O?k=m[5]:(k=(0,_.jsx)(n,{to:O,children:`Back`}),m[4]=O,m[5]=k);let A;m[6]!==h||m[7]!==y||m[8]!==x.isPending||m[9]!==x.mutateAsync?(A=(0,_.jsx)(a,{bucket:h,isPending:x.isPending,onUpload:x.mutateAsync,prefix:y}),m[6]=h,m[7]=y,m[8]=x.isPending,m[9]=x.mutateAsync,m[10]=A):A=m[10];let j;m[11]===x.error?j=m[12]:(j=x.error&&(0,_.jsx)(e,{error:x.error,msg:`Failed to upload object`}),m[11]=x.error,m[12]=j);let M;m[13]!==h||m[14]!==T||m[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:u(s(e.Prefix,y)),fullPrefix:c(e.Prefix,y)},e.Prefix):null)})]}),m[13]=h,m[14]=T,m[15]=y,m[16]=M):M=m[16];let N;m[17]!==h||m[18]!==C||m[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:s(e.Key,y),fullKey:c(e.Key,y),object:e},e.Key):null)]}),m[17]=h,m[18]=C,m[19]=y,m[20]=N):N=m[20];let P;return m[21]!==T.length||m[22]!==C.length?(P=C.length===0&&T.length===0&&(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this folder.`}),m[21]=T.length,m[22]=C.length,m[23]=P):P=m[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};
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};
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,F as c,Fa as l,mo as u,so as d}from"./index.js";import{t as f}from"./page-heading.js";var p=d(),m=u();function h(){let u=(0,p.c)(31),{bucket:d}=s.useParams(),h;u[0]===d?h=u[1]:(h=c(d),u[0]=d,u[1]=h);let{data:g}=t(h),_=o(),v;u[2]===g.Contents?v=u[3]:(v=g.Contents??[],u[2]=g.Contents,u[3]=v);let y=v,b;u[4]===g.CommonPrefixes?b=u[5]:(b=g.CommonPrefixes??[],u[4]=g.CommonPrefixes,u[5]=b);let x=b,S;u[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,m.jsx)(n,{to:`/s3/ls`,children:`Back to buckets`}),u[6]=S):S=u[6];let C;u[7]!==d||u[8]!==_.isPending||u[9]!==_.mutateAsync?(C=(0,m.jsx)(a,{bucket:d,isPending:_.isPending,onUpload:_.mutateAsync}),u[7]=d,u[8]=_.isPending,u[9]=_.mutateAsync,u[10]=C):C=u[10];let w;u[11]!==d||u[12]!==C?(w=(0,m.jsx)(f,{actions:C,title:d}),u[11]=d,u[12]=C,u[13]=w):w=u[13];let T;u[14]===_.error?T=u[15]:(T=_.error&&(0,m.jsx)(e,{error:_.error,msg:`Failed to upload object`}),u[14]=_.error,u[15]=T);let E;u[16]!==d||u[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:l(e.Prefix),fullPrefix:e.Prefix},e.Prefix):null)})]}),u[16]=d,u[17]=x,u[18]=E):E=u[18];let D;u[19]!==d||u[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)]}),u[19]=d,u[20]=y,u[21]=D):D=u[21];let O;u[22]!==x.length||u[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.`}),u[22]=x.length,u[23]=y.length,u[24]=O):O=u[24];let k;return u[25]!==w||u[26]!==T||u[27]!==E||u[28]!==D||u[29]!==O?(k=(0,m.jsxs)(m.Fragment,{children:[S,w,T,E,D,O]}),u[25]=w,u[26]=T,u[27]=E,u[28]=D,u[29]=O,u[30]=k):k=u[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,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};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{t}from"./back-link.js";import{R as n,mo as r,so as i,t 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=r();function f(){let r=(0,u.c)(14),{id:i}=a.useParams(),f;r[0]===i?f=r[1]:(f=n(i),r[0]=i,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};
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};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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{Ti as i,d as a,et as o,mo as s,so as c,uo 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=s();function b(){let s=(0,v.c)(53),{id:c}=a.useParams(),b=l(),x;s[0]===c?x=s[1]:(x=o(c),s[0]=c,s[1]=x);let{data:S}=t(x),C=S.Volumes?.[0],w=C?.VolumeId,T=r(),E=C?.Size??1,D;s[2]===E?D=s[3]:(D=h(g.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),s[2]=E,s[3]=D);let O;s[4]===E?O=s[5]:(O={size:E},s[4]=E,s[5]=O);let k;s[6]!==D||s[7]!==O?(k={resolver:D,defaultValues:O},s[6]=D,s[7]=O,s[8]=k):k=s[8];let{handleSubmit:A,register:j,formState:M}=m(k),{errors:N,isSubmitting:P}=M;if(!w){let e;return s[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.`})]}),s[9]=e):e=s[9],e}let F;s[10]!==T||s[11]!==b||s[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},s[10]=T,s[11]=b,s[12]=w,s[13]=F):F=s[13];let I=F,L,R;s[14]===w?(L=s[15],R=s[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`}),s[14]=w,s[15]=L,s[16]=R);let z;s[17]===T.error?z=s[18]:(z=T.error&&(0,y.jsx)(e,{error:T.error,msg:`Failed to resize volume`}),s[17]=T.error,s[18]=z);let B;s[19]!==A||s[20]!==I?(B=A(I),s[19]=A,s[20]=I,s[21]=B):B=s[21];let V;s[22]===E?V=s[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`]})}),s[22]=E,s[23]=V);let H;s[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(d,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),s[24]=H):H=s[24];let U=!!N.size,W=E+1,G;s[25]===j?G=s[26]:(G=j(`size`,{valueAsNumber:!0}),s[25]=j,s[26]=G);let K;s[27]!==U||s[28]!==W||s[29]!==G?(K=(0,y.jsx)(i,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),s[27]=U,s[28]=W,s[29]=G,s[30]=K):K=s[30];let q;s[31]===N.size?q=s[32]:(q=(0,y.jsx)(f,{errors:[N.size]}),s[31]=N.size,s[32]=q);let J;s[33]!==K||s[34]!==q?(J=(0,y.jsxs)(p,{children:[H,K,q]}),s[33]=K,s[34]=q,s[35]=J):J=s[35];let Y;s[36]!==b||s[37]!==w?(Y=async()=>await b({to:`/ec2/describe-volumes/$id`,params:{id:w}}),s[36]=b,s[37]=w,s[38]=Y):Y=s[38];let X;s[39]!==P||s[40]!==T.isPending||s[41]!==Y?(X=(0,y.jsx)(_,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),s[39]=P,s[40]=T.isPending,s[41]=Y,s[42]=X):X=s[42];let Z;s[43]!==V||s[44]!==J||s[45]!==X||s[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),s[43]=V,s[44]=J,s[45]=X,s[46]=B,s[47]=Z):Z=s[47];let Q;return s[48]!==Z||s[49]!==L||s[50]!==R||s[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),s[48]=Z,s[49]=L,s[50]=R,s[51]=z,s[52]=Q):Q=s[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{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};
+1 -1
View File
@@ -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{$ as a,Pa as o,Po as s,Ta as c,f as l,ho as u,lo as d,mo as f,nt as p,uo 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(u()),x=f();function S(){let{id:s}=l.useParams(),u=m(),{data:f}=t(p(s)),{data:S}=t(a),C=f.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),u({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)(c,{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)(d,{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{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};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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{Po as a,Ta as o,U as s,ho as c,ja as l,mo as u,r as d,uo 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 _=a(c()),v=u();function y(){let{id:a}=d.useParams(),c=f(),{data:u}=t(s(a)),y=u.KeyPairs?.[0],b=i(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(a),c({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=l(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)(o,{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{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};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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{G as a,H as o,Po as s,Ta as c,a as l,ho as u,lo as d,mo as f,uo 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(u()),b=f();function x(){let{id:s}=l.useParams(),u=p(),{data:f}=t(a(s)),{data:x}=t(o),S=i(),[C,w]=(0,y.useState)(!1),T=f.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)(d,{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),u({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{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};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -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{Po as s,Ta as c,Ti as l,X as u,ho as d,ja as f,lo as p,mo as m,q as h,s as g,uo 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=s(d()),P=m();function F(){let{id:s}=g.useParams(),d=_(),{data:m}=t(u(s)),{data:F}=t(h),I=m.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),d({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=f(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)(c,{disabled:!K,onClick:()=>B(!0),size:`sm`,variant:`destructive`,children:[(0,P.jsx)(i,{className:`size-4`}),`Delete`]}),(0,P.jsxs)(c,{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)(p,{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)(l,{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{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};
+1 -1
View File
@@ -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{Pa as a,Po as o,Q as s,Ta as c,c as l,ho as u,lo as d,mo as f,uo 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(u()),b=f();function x(){let{id:o}=l.useParams(),u=p(),{data:f}=t(s(o)),x=f.Subnets?.[0],S=i(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(o),u({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=a(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)(c,{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)(d,{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{$ 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};
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{Po as a,Ta as o,b as s,ho as c,ja as l,mo as u,p as d,so as f,uo as p,y 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=a(c()),b=f(),x=u();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}=d.useParams(),c=decodeURIComponent(a),u=p(),{data:f}=t(m(c)),b=f.Policy,C=i(),[w,T]=(0,y.useState)(!1),{data:E}=t(s(c,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)(o,{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:l(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(c),u({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{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};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{Kn as e,fo as t,lr 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};
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};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{ja as e,lo as t,mo as n,so 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=e(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)(t,{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)(t,{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};
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};
@@ -1 +1 @@
import{Xa as e,lo as t,mo as n,so as r}from"./index.js";var i=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),a=r(),o=n();function s(e){let n=(0,a.c)(7),r,s;n[0]===e?(r=n[1],s=n[2]):({children:r,...s}=e,n[0]=e,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)(t,{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{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};
+1 -1
View File
@@ -1 +1 @@
import{Oa as e,Qa as t,Za as n,oo as r,so 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=t,c=`span`,l=r({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{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};
+1 -1
View File
@@ -1 +1 @@
import{Oa as e,mo as t,so 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{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};
+1 -1
View File
@@ -1 +1 @@
import{Xa as e}from"./index.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
import{uo as e}from"./index.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
@@ -1 +1 @@
import{Xa as e}from"./index.js";var t=e(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]);export{t};
import{uo 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{Xa as e}from"./index.js";var t=e(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]);export{t};
import{uo 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{Oa as r,Po as i,Ta as a,Xa as o,ho as s,mo as c,so as l}from"./index.js";import{t as u}from"./use-copy-to-clipboard.js";var d=o(`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=i(s(),1),m=c(),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{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(`
`)}function _(i){let o=(0,f.c)(18),{commands:s}=i,[c,l]=(0,p.useState)(!1),{copied:h,copy:_}=u();if(s.length===0)return null;let b;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=()=>l(y),o[0]=b):b=o[0];let x,S;o[1]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,m.jsx)(d,{className:`size-3.5`}),S=(0,m.jsx)(`span`,{children:`AWS CLI`}),o[1]=x,o[2]=S):(x=o[1],S=o[2]);let C=c&&`rotate-180`,w;o[3]===C?w=o[4]:(w=r(`ml-auto size-3.5 transition-transform`,C),o[3]=C,o[4]=w);let T;o[5]===w?T=o[6]:(T=(0,m.jsx)(t,{className:w}),o[5]=w,o[6]=T);let E;o[7]!==c||o[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]}),o[7]=c,o[8]=T,o[9]=E):E=o[9];let D;o[10]!==s||o[11]!==h||o[12]!==_||o[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:s.length>1?`${s.length} commands`:`command`}),(0,m.jsxs)(a,{type:`button`,variant:`ghost`,size:`xs`,onClick:async()=>await _(g(s)),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:s.map((e,t)=>(0,m.jsxs)(`div`,{children:[s.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<s.length-1&&(0,m.jsx)(`div`,{className:`my-2`})]},e.label))})]}),o[10]=s,o[11]=h,o[12]=_,o[13]=c,o[14]=D):D=o[14];let O;return o[15]!==E||o[16]!==D?(O=(0,m.jsxs)(`div`,{className:`rounded-md border border-border`,children:[E,D]}),o[15]=E,o[16]=D,o[17]=O):O=o[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,[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};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{Xa 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{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};
@@ -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{Ti as i,gr as a,mo as o,so as s,uo as c,vr 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{t as g}from"./form-actions.js";var _=s(),v=a({bucketName:l().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`)}),y=o();function b(){let a=(0,_.c)(40),o=c(),s=r(),l;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(l={resolver:h(v)},a[0]=l):l=a[0];let{handleSubmit:b,register:S,watch:C,formState:w}=m(l),{errors:T,isSubmitting:E}=w,D;a[1]!==s||a[2]!==o?(D=async e=>{await s.mutateAsync(e),o({to:`/s3/ls`})},a[1]=s,a[2]=o,a[3]=D):D=a[3];let O=D,k,A;a[4]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,y.jsx)(t,{to:`/s3/ls`,children:`Back to buckets`}),A=(0,y.jsx)(u,{title:`Create Bucket`}),a[4]=k,a[5]=A):(k=a[4],A=a[5]);let j;a[6]===s.error?j=a[7]:(j=s.error&&(0,y.jsx)(e,{error:s.error,msg:`Failed to create bucket`}),a[6]=s.error,a[7]=j);let M;a[8]!==b||a[9]!==O?(M=b(O),a[8]=b,a[9]=O,a[10]=M):M=a[10];let N;a[11]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(d,{children:(0,y.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),a[11]=N):N=a[11];let P=!!T.bucketName,F;a[12]===S?F=a[13]:(F=S(`bucketName`),a[12]=S,a[13]=F);let I;a[14]!==P||a[15]!==F?(I=(0,y.jsx)(i,{"aria-invalid":P,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...F}),a[14]=P,a[15]=F,a[16]=I):I=a[16];let L;a[17]===T.bucketName?L=a[18]:(L=(0,y.jsx)(f,{errors:[T.bucketName]}),a[17]=T.bucketName,a[18]=L);let R;a[19]!==I||a[20]!==L?(R=(0,y.jsxs)(p,{children:[N,I,L]}),a[19]=I,a[20]=L,a[21]=R):R=a[21];let z;a[22]===C?z=a[23]:(z=x(C),a[22]=C,a[23]=z);let B;a[24]===z?B=a[25]:(B=(0,y.jsx)(n,{commands:z}),a[24]=z,a[25]=B);let V;a[26]===o?V=a[27]:(V=async()=>await o({to:`/s3/ls`}),a[26]=o,a[27]=V);let H;a[28]!==s.isPending||a[29]!==E||a[30]!==V?(H=(0,y.jsx)(g,{isPending:s.isPending,isSubmitting:E,onCancel:V,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),a[28]=s.isPending,a[29]=E,a[30]=V,a[31]=H):H=a[31];let U;a[32]!==R||a[33]!==B||a[34]!==H||a[35]!==M?(U=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:M,children:[R,B,H]}),a[32]=R,a[33]=B,a[34]=H,a[35]=M,a[36]=U):U=a[36];let W;return a[37]!==U||a[38]!==j?(W=(0,y.jsxs)(y.Fragment,{children:[k,A,j,U]}),a[37]=U,a[38]=j,a[39]=W):W=a[39],W}function x(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{b 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,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};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -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 o}from"./select.js";import{t as s}from"./cli-command-panel.js";import{c}from"./ec2.js";import{Ti as l,mo as u,so as d,uo as f}from"./index.js";import{t as p}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{i as ee,n as te,t as ne}from"./zod.js";import{i as _}from"./ec22.js";import{t as v}from"./form-actions.js";var y=d(),b=u();function x(){let u=(0,y.c)(52),d=f(),x=c(),S;u[0]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:ne(_),defaultValues:{groupName:``,strategy:`spread`}},u[0]=S):S=u[0];let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=ee(S),{errors:k,isSubmitting:A}=O,j;u[1]!==x||u[2]!==d?(j=async e=>{d({to:`/ec2/describe-placement-groups/$id`,params:{id:(await x.mutateAsync(e)).PlacementGroup?.GroupId??``}})},u[1]=x,u[2]=d,u[3]=j):j=u[3];let M=j,N,P;u[4]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,b.jsx)(t,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,b.jsx)(p,{title:`Create Placement Group`}),u[4]=N,u[5]=P):(N=u[4],P=u[5]);let F;u[6]===x.error?F=u[7]:(F=x.error&&(0,b.jsx)(e,{error:x.error,msg:`Failed to create placement group`}),u[6]=x.error,u[7]=F);let I;u[8]!==T||u[9]!==M?(I=T(M),u[8]=T,u[9]=M,u[10]=I):I=u[10];let L;u[11]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,b.jsx)(m,{children:(0,b.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),u[11]=L):L=u[11];let R=!!k.groupName,z;u[12]===E?z=u[13]:(z=E(`groupName`),u[12]=E,u[13]=z);let B;u[14]!==R||u[15]!==z?(B=(0,b.jsx)(l,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),u[14]=R,u[15]=z,u[16]=B):B=u[16];let V;u[17]===k.groupName?V=u[18]:(V=(0,b.jsx)(h,{errors:[k.groupName]}),u[17]=k.groupName,u[18]=V);let H;u[19]!==B||u[20]!==V?(H=(0,b.jsxs)(g,{children:[L,B,V]}),u[19]=B,u[20]=V,u[21]=H):H=u[21];let U;u[22]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,b.jsx)(m,{children:(0,b.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),u[22]=U):U=u[22];let W;u[23]===k.strategy?W=u[24]:(W=e=>{let{field:t}=e;return(0,b.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,b.jsx)(a,{"aria-invalid":!!k.strategy,className:`w-full`,id:`strategy`,children:(0,b.jsx)(n,{})}),(0,b.jsxs)(i,{children:[(0,b.jsx)(r,{value:`spread`,children:`spread`}),(0,b.jsx)(r,{value:`cluster`,children:`cluster`})]})]})},u[23]=k.strategy,u[24]=W);let G;u[25]!==w||u[26]!==W?(G=(0,b.jsx)(te,{control:w,name:`strategy`,render:W}),u[25]=w,u[26]=W,u[27]=G):G=u[27];let K;u[28]===k.strategy?K=u[29]:(K=(0,b.jsx)(h,{errors:[k.strategy]}),u[28]=k.strategy,u[29]=K);let q;u[30]!==G||u[31]!==K?(q=(0,b.jsxs)(g,{children:[U,G,K]}),u[30]=G,u[31]=K,u[32]=q):q=u[32];let J;u[33]===D?J=u[34]:(J=C(D),u[33]=D,u[34]=J);let Y;u[35]===J?Y=u[36]:(Y=(0,b.jsx)(s,{commands:J}),u[35]=J,u[36]=Y);let X;u[37]===d?X=u[38]:(X=async()=>await d({to:`/ec2/describe-placement-groups`}),u[37]=d,u[38]=X);let Z;u[39]!==x.isPending||u[40]!==A||u[41]!==X?(Z=(0,b.jsx)(v,{isPending:x.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),u[39]=x.isPending,u[40]=A,u[41]=X,u[42]=Z):Z=u[42];let Q;u[43]!==H||u[44]!==q||u[45]!==Y||u[46]!==Z||u[47]!==I?(Q=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),u[43]=H,u[44]=q,u[45]=Y,u[46]=Z,u[47]=I,u[48]=Q):Q=u[48];let $;return u[49]!==Q||u[50]!==F?($=(0,b.jsxs)(b.Fragment,{children:[N,P,F,Q]}),u[49]=Q,u[50]=F,u[51]=$):$=u[51],$}function S(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function C(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?S(n):`<GroupName>`}`},{type:`flag`,value:` \\
--strategy`},{type:`value`,value:` ${i||`spread`}`}]}]}export{x as component};
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:` \\
--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{Ti as i,mo as a,so as o,uo 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 f}from"./textarea.js";import{i as p,t as m}from"./zod.js";import{t as h}from"./form-actions.js";import{t as g}from"./iam2.js";var ee=o(),_=a(),te=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function v(){let a=(0,ee.c)(63),o=s(),v=r(),y;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={resolver:m(g),defaultValues:{policyDocument:te}},a[0]=y):y=a[0];let{handleSubmit:b,register:x,watch:S,formState:re}=p(y),{errors:C,isSubmitting:w}=re,T;a[1]!==v||a[2]!==o?(T=async e=>{await v.mutateAsync(e),o({to:`/iam/list-policies`})},a[1]=v,a[2]=o,a[3]=T):T=a[3];let E=T,D,O;a[4]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,_.jsx)(t,{to:`/iam/list-policies`,children:`Back to policies`}),O=(0,_.jsx)(c,{title:`Create Policy`}),a[4]=D,a[5]=O):(D=a[4],O=a[5]);let k;a[6]===v.error?k=a[7]:(k=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create policy`}),a[6]=v.error,a[7]=k);let A;a[8]!==b||a[9]!==E?(A=b(E),a[8]=b,a[9]=E,a[10]=A):A=a[10];let j;a[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,_.jsx)(l,{children:(0,_.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),a[11]=j):j=a[11];let M=!!C.policyName,N;a[12]===x?N=a[13]:(N=x(`policyName`),a[12]=x,a[13]=N);let P;a[14]!==M||a[15]!==N?(P=(0,_.jsx)(i,{"aria-invalid":M,id:`policyName`,placeholder:`my-policy...`,...N}),a[14]=M,a[15]=N,a[16]=P):P=a[16];let F;a[17]===C.policyName?F=a[18]:(F=(0,_.jsx)(u,{errors:[C.policyName]}),a[17]=C.policyName,a[18]=F);let I;a[19]!==P||a[20]!==F?(I=(0,_.jsxs)(d,{children:[j,P,F]}),a[19]=P,a[20]=F,a[21]=I):I=a[21];let L;a[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(l,{children:(0,_.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),a[22]=L):L=a[22];let R;a[23]===x?R=a[24]:(R=x(`description`),a[23]=x,a[24]=R);let z;a[25]===R?z=a[26]:(z=(0,_.jsx)(i,{id:`description`,placeholder:`A brief description of this policy...`,...R}),a[25]=R,a[26]=z);let B;a[27]===C.description?B=a[28]:(B=(0,_.jsx)(u,{errors:[C.description]}),a[27]=C.description,a[28]=B);let V;a[29]!==z||a[30]!==B?(V=(0,_.jsxs)(d,{children:[L,z,B]}),a[29]=z,a[30]=B,a[31]=V):V=a[31];let H;a[32]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,_.jsx)(l,{children:(0,_.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),a[32]=H):H=a[32];let U=!!C.policyDocument,W;a[33]===x?W=a[34]:(W=x(`policyDocument`),a[33]=x,a[34]=W);let G;a[35]!==U||a[36]!==W?(G=(0,_.jsx)(f,{"aria-invalid":U,className:`font-mono text-sm`,id:`policyDocument`,rows:15,...W}),a[35]=U,a[36]=W,a[37]=G):G=a[37];let K;a[38]===C.policyDocument?K=a[39]:(K=(0,_.jsx)(u,{errors:[C.policyDocument]}),a[38]=C.policyDocument,a[39]=K);let q;a[40]!==G||a[41]!==K?(q=(0,_.jsxs)(d,{children:[H,G,K]}),a[40]=G,a[41]=K,a[42]=q):q=a[42];let J;a[43]===S?J=a[44]:(J=ne(S),a[43]=S,a[44]=J);let Y;a[45]===J?Y=a[46]:(Y=(0,_.jsx)(n,{commands:J}),a[45]=J,a[46]=Y);let X;a[47]===o?X=a[48]:(X=async()=>await o({to:`/iam/list-policies`}),a[47]=o,a[48]=X);let Z;a[49]!==v.isPending||a[50]!==w||a[51]!==X?(Z=(0,_.jsx)(h,{isPending:v.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),a[49]=v.isPending,a[50]=w,a[51]=X,a[52]=Z):Z=a[52];let Q;a[53]!==I||a[54]!==V||a[55]!==q||a[56]!==Y||a[57]!==Z||a[58]!==A?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,V,q,Y,Z]}),a[53]=I,a[54]=V,a[55]=q,a[56]=Y,a[57]=Z,a[58]=A,a[59]=Q):Q=a[59];let $;return a[60]!==Q||a[61]!==k?($=(0,_.jsxs)(_.Fragment,{children:[D,O,k,Q]}),a[60]=Q,a[61]=k,a[62]=$):$=a[62],$}function ne(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{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:` \\
--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{v as component};
--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{Pa as s,Ti as re,mo as c,rt as ie,so as l,uo as ae}from"./index.js";import{t as oe}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{i as se,n as ce,t as le}from"./zod.js";import{a as ue}from"./ec22.js";import{t as de}from"./form-actions.js";var fe=l(),p=c();function m(){let r=(0,fe.c)(69),s=ae(),{data:c}=t(ie),l=ne(),m;r[0]===c.Vpcs?m=r[1]:(m=c.Vpcs??[],r[0]=c.Vpcs,r[1]=m);let h=m,g;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(g=le(ue),r[2]=g):g=r[2];let _=h[0]?.VpcId??``,v;r[3]===_?v=r[4]:(v={resolver:g,defaultValues:{groupName:``,description:``,vpcId:_}},r[3]=_,r[4]=v);let{control:y,handleSubmit:b,register:x,watch:S,formState:he}=se(v),{errors:C,isSubmitting:w}=he,T;r[5]!==l||r[6]!==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[5]=l,r[6]=s,r[7]=T):T=r[7];let E=T,D,O;r[8]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,p.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,p.jsx)(oe,{title:`Create Security Group`}),r[8]=D,r[9]=O):(D=r[8],O=r[9]);let k;r[10]===l.error?k=r[11]:(k=l.error&&(0,p.jsx)(e,{error:l.error,msg:`Failed to create security group`}),r[10]=l.error,r[11]=k);let A;r[12]!==b||r[13]!==E?(A=b(E),r[12]=b,r[13]=E,r[14]=A):A=r[14];let j;r[15]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),r[15]=j):j=r[15];let M=!!C.groupName,N;r[16]===x?N=r[17]:(N=x(`groupName`),r[16]=x,r[17]=N);let P;r[18]!==M||r[19]!==N?(P=(0,p.jsx)(re,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),r[18]=M,r[19]=N,r[20]=P):P=r[20];let F;r[21]===C.groupName?F=r[22]:(F=(0,p.jsx)(d,{errors:[C.groupName]}),r[21]=C.groupName,r[22]=F);let I;r[23]!==P||r[24]!==F?(I=(0,p.jsxs)(f,{children:[j,P,F]}),r[23]=P,r[24]=F,r[25]=I):I=r[25];let L;r[26]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),r[26]=L):L=r[26];let R=!!C.description,z;r[27]===x?z=r[28]:(z=x(`description`),r[27]=x,r[28]=z);let B;r[29]!==R||r[30]!==z?(B=(0,p.jsx)(re,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),r[29]=R,r[30]=z,r[31]=B):B=r[31];let V;r[32]===C.description?V=r[33]:(V=(0,p.jsx)(d,{errors:[C.description]}),r[32]=C.description,r[33]=V);let H;r[34]!==B||r[35]!==V?(H=(0,p.jsxs)(f,{children:[L,B,V]}),r[34]=B,r[35]=V,r[36]=H):H=r[36];let U;r[37]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(u,{children:(0,p.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),r[37]=U):U=r[37];let W;r[38]!==C.vpcId||r[39]!==h?(W=e=>{let{field:t}=e;return(0,p.jsxs)(o,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,p.jsx)(a,{"aria-invalid":!!C.vpcId,className:`w-full`,id:`vpcId`,children:(0,p.jsx)(n,{})}),(0,p.jsx)(i,{children:h.map(pe)})]})},r[38]=C.vpcId,r[39]=h,r[40]=W):W=r[40];let G;r[41]!==y||r[42]!==W?(G=(0,p.jsx)(ce,{control:y,name:`vpcId`,render:W}),r[41]=y,r[42]=W,r[43]=G):G=r[43];let K;r[44]===C.vpcId?K=r[45]:(K=(0,p.jsx)(d,{errors:[C.vpcId]}),r[44]=C.vpcId,r[45]=K);let q;r[46]!==G||r[47]!==K?(q=(0,p.jsxs)(f,{children:[U,G,K]}),r[46]=G,r[47]=K,r[48]=q):q=r[48];let J;r[49]===S?J=r[50]:(J=me(S),r[49]=S,r[50]=J);let Y;r[51]===J?Y=r[52]:(Y=(0,p.jsx)(te,{commands:J}),r[51]=J,r[52]=Y);let X;r[53]===s?X=r[54]:(X=async()=>await s({to:`/ec2/describe-security-groups`}),r[53]=s,r[54]=X);let Z;r[55]!==l.isPending||r[56]!==w||r[57]!==X?(Z=(0,p.jsx)(de,{isPending:l.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),r[55]=l.isPending,r[56]=w,r[57]=X,r[58]=Z):Z=r[58];let Q;r[59]!==I||r[60]!==H||r[61]!==q||r[62]!==Y||r[63]!==Z||r[64]!==A?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),r[59]=I,r[60]=H,r[61]=q,r[62]=Y,r[63]=Z,r[64]=A,r[65]=Q):Q=r[65];let $;return r[66]!==Q||r[67]!==k?($=(0,p.jsxs)(p.Fragment,{children:[D,O,k,Q]}),r[66]=Q,r[67]=k,r[68]=$):$=r[68],$}function pe(e){let t=s(e.Tags);return(0,p.jsx)(r,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function me(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{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:` \\
--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{m as component};
--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 o,t as s}from"./select.js";import{t as c}from"./cli-command-panel.js";import{u as l}from"./ec2.js";import{P as u,mo as d,so as f,tt as p,uo as ee}from"./index.js";import{t as te}from"./page-heading.js";import{a as m,r as ne,t as h}from"./field.js";import{t as re}from"./textarea.js";import{i as ie,n as ae,t as g}from"./zod.js";import{o as _}from"./ec22.js";import{t as v}from"./form-actions.js";var oe=f(),y=d();function b(){let i=(0,oe.c)(51),d=ee(),{data:f}=t(p),b=l(),x;i[0]===f.Volumes?x=i[1]:(x=f.Volumes??[],i[0]=f.Volumes,i[1]=x);let S=x,{volumeId:C}=u.useSearch(),w=C??S[0]?.VolumeId??``,T;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=g(_),i[2]=T):T=i[2];let E;i[3]===w?E=i[4]:(E={resolver:T,defaultValues:{volumeId:w,description:``}},i[3]=w,i[4]=E);let{control:D,handleSubmit:O,register:k,watch:A,formState:j}=ie(E),{errors:M,isSubmitting:N}=j,P;i[5]!==b||i[6]!==d?(P=async e=>{await b.mutateAsync(e),d({to:`/ec2/describe-snapshots`})},i[5]=b,i[6]=d,i[7]=P):P=i[7];let F=P,I,L;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,y.jsx)(n,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,y.jsx)(te,{title:`Create Snapshot`}),i[8]=I,i[9]=L):(I=i[8],L=i[9]);let R;i[10]===b.error?R=i[11]:(R=b.error&&(0,y.jsx)(e,{error:b.error,msg:`Failed to create snapshot`}),i[10]=b.error,i[11]=R);let z;i[12]!==O||i[13]!==F?(z=O(F),i[12]=O,i[13]=F,i[14]=z):z=i[14];let B;i[15]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),i[15]=B):B=i[15];let V;i[16]!==M.volumeId||i[17]!==S?(V=e=>{let{field:t}=e;return(0,y.jsxs)(s,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(o,{"aria-invalid":!!M.volumeId,className:`w-full`,id:`volumeId`,children:(0,y.jsx)(r,{})}),(0,y.jsx)(a,{children:S.map(se)})]})},i[16]=M.volumeId,i[17]=S,i[18]=V):V=i[18];let H;i[19]!==D||i[20]!==V?(H=(0,y.jsx)(ae,{control:D,name:`volumeId`,render:V}),i[19]=D,i[20]=V,i[21]=H):H=i[21];let U;i[22]===M.volumeId?U=i[23]:(U=(0,y.jsx)(ne,{errors:[M.volumeId]}),i[22]=M.volumeId,i[23]=U);let W;i[24]!==H||i[25]!==U?(W=(0,y.jsxs)(h,{children:[B,H,U]}),i[24]=H,i[25]=U,i[26]=W):W=i[26];let G;i[27]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,y.jsx)(m,{children:(0,y.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),i[27]=G):G=i[27];let K;i[28]===k?K=i[29]:(K=k(`description`),i[28]=k,i[29]=K);let q;i[30]===K?q=i[31]:(q=(0,y.jsxs)(h,{children:[G,(0,y.jsx)(re,{id:`description`,placeholder:`Snapshot description`,...K})]}),i[30]=K,i[31]=q);let J;i[32]===A?J=i[33]:(J=ce(A),i[32]=A,i[33]=J);let Y;i[34]===J?Y=i[35]:(Y=(0,y.jsx)(c,{commands:J}),i[34]=J,i[35]=Y);let X;i[36]===d?X=i[37]:(X=async()=>await d({to:`/ec2/describe-snapshots`}),i[36]=d,i[37]=X);let Z;i[38]!==b.isPending||i[39]!==N||i[40]!==X?(Z=(0,y.jsx)(v,{isPending:b.isPending,isSubmitting:N,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),i[38]=b.isPending,i[39]=N,i[40]=X,i[41]=Z):Z=i[41];let Q;i[42]!==W||i[43]!==q||i[44]!==Y||i[45]!==Z||i[46]!==z?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),i[42]=W,i[43]=q,i[44]=Y,i[45]=Z,i[46]=z,i[47]=Q):Q=i[47];let $;return i[48]!==Q||i[49]!==R?($=(0,y.jsxs)(y.Fragment,{children:[I,L,R,Q]}),i[48]=Q,i[49]=R,i[50]=$):$=i[50],$}function se(e){return(0,y.jsxs)(i,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function ce(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{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:` \\
--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{b as component};
--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,4 +1,4 @@
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{mo as a,rt as o,uo 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{i 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{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:` \\
--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:` \\
@@ -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{Ti as i,mo as a,so as o,uo 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{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(),_=a();function v(){let a=(0,g.c)(51),o=s(),v=r(),b;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:p(h)},a[0]=b):b=a[0];let{handleSubmit:x,register:S,watch:C,formState:w}=f(b),{errors:T,isSubmitting:E}=w,D;a[1]!==v||a[2]!==o?(D=async e=>{await v.mutateAsync(e),o({to:`/iam/list-users`})},a[1]=v,a[2]=o,a[3]=D):D=a[3];let O=D,k,A;a[4]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,_.jsx)(t,{to:`/iam/list-users`,children:`Back to users`}),A=(0,_.jsx)(c,{title:`Create User`}),a[4]=k,a[5]=A):(k=a[4],A=a[5]);let j;a[6]===v.error?j=a[7]:(j=v.error&&(0,_.jsx)(e,{error:v.error,msg:`Failed to create user`}),a[6]=v.error,a[7]=j);let M;a[8]!==x||a[9]!==O?(M=x(O),a[8]=x,a[9]=O,a[10]=M):M=a[10];let N;a[11]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,_.jsx)(l,{children:(0,_.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),a[11]=N):N=a[11];let P=!!T.userName,F;a[12]===S?F=a[13]:(F=S(`userName`),a[12]=S,a[13]=F);let I;a[14]!==P||a[15]!==F?(I=(0,_.jsx)(i,{"aria-invalid":P,id:`userName`,placeholder:`my-user...`,...F}),a[14]=P,a[15]=F,a[16]=I):I=a[16];let L;a[17]===T.userName?L=a[18]:(L=(0,_.jsx)(u,{errors:[T.userName]}),a[17]=T.userName,a[18]=L);let R;a[19]!==I||a[20]!==L?(R=(0,_.jsxs)(d,{children:[N,I,L]}),a[19]=I,a[20]=L,a[21]=R):R=a[21];let z;a[22]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,_.jsx)(l,{children:(0,_.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),a[22]=z):z=a[22];let B;a[23]===S?B=a[24]:(B=S(`path`),a[23]=S,a[24]=B);let V;a[25]===B?V=a[26]:(V=(0,_.jsx)(i,{id:`path`,placeholder:`/`,...B}),a[25]=B,a[26]=V);let H;a[27]===T.path?H=a[28]:(H=(0,_.jsx)(u,{errors:[T.path]}),a[27]=T.path,a[28]=H);let U;a[29]!==V||a[30]!==H?(U=(0,_.jsxs)(d,{children:[z,V,H]}),a[29]=V,a[30]=H,a[31]=U):U=a[31];let W;a[32]===C?W=a[33]:(W=y(C),a[32]=C,a[33]=W);let G;a[34]===W?G=a[35]:(G=(0,_.jsx)(n,{commands:W}),a[34]=W,a[35]=G);let K;a[36]===o?K=a[37]:(K=async()=>await o({to:`/iam/list-users`}),a[36]=o,a[37]=K);let q;a[38]!==v.isPending||a[39]!==E||a[40]!==K?(q=(0,_.jsx)(m,{isPending:v.isPending,isSubmitting:E,onCancel:K,pendingLabel:`Creating...`,submitLabel:`Create User`}),a[38]=v.isPending,a[39]=E,a[40]=K,a[41]=q):q=a[41];let J;a[42]!==R||a[43]!==U||a[44]!==G||a[45]!==q||a[46]!==M?(J=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:M,children:[R,U,G,q]}),a[42]=R,a[43]=U,a[44]=G,a[45]=q,a[46]=M,a[47]=J):J=a[47];let Y;return a[48]!==J||a[49]!==j?(Y=(0,_.jsxs)(_.Fragment,{children:[k,A,j,J]}),a[48]=J,a[49]=j,a[50]=Y):Y=a[50],Y}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{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};
@@ -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{L as re,Ti as ie,mo as s,so as c,uo 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=l(),{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)(ie,{"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{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:` \\
--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 @@
import{mo as e,so 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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{mo as t,so as n,z 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=n(),l=t();function u(){let t=(0,c.c)(3),{data:n}=e(r),a;if(t[0]!==n.Images){let e=(n.Images??[]).filter(f),r;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,l.jsx)(i,{title:`Images`}),t[2]=r):r=t[2],a=(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 images found.`})]}),t[0]=n.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};
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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{H as t,Ta as n,lo as r,mo as i,so 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=i(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let i=(0,l.c)(3),{data:a}=e(t),s;if(i[0]!==a.Reservations){let e=(a.Reservations?.flatMap(h)??[]).toSorted(m),t;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/run-instances`,children:(0,u.jsx)(n,{children:`Run Instances`})}),title:`Instances`}),i[2]=t):t=i[2],s=(0,u.jsxs)(u.Fragment,{children:[t,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.`})]}),i[0]=a.Reservations,i[1]=s}else s=i[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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Ta as t,W as n,lo as r,mo as i,so 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=i();function u(){let i=(0,c.c)(4),{data:a}=e(n),s;if(i[0]!==a.KeyPairs){let e=(a.KeyPairs??[]).toSorted(f),n;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,l.jsx)(r,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(t,{variant:`outline`,children:`Import Key Pair`})}),i[2]=n):n=i[2];let c;i[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)(r,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(t,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),i[3]=c):c=i[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.`})]}),i[0]=a.KeyPairs,i[1]=s}else s=i[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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{O as t,Ta as n,ja as r,lo as i,mo as a,so as o,uo 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=a();function f(){let a=(0,u.c)(10),o=s(),{data:f}=e(t),m;a[0]===f.LoadBalancers?m=a[1]:(m=f.LoadBalancers??[],a[0]=f.LoadBalancers,a[1]=m);let h=m,g;a[2]===o?g=a[3]:(g=(0,d.jsx)(c,{actions:(0,d.jsx)(n,{onClick:async()=>await o({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),a[2]=o,a[3]=g);let _;a[4]!==h||a[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 t=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(t)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(i,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(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:r(e.CreatedTime)})]},t)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),a[4]=h,a[5]=o,a[6]=_):_=a[6];let v;return a[7]!==g||a[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),a[7]=g,a[8]=_,a[9]=v):v=a[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component};
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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{K as t,Ta as n,lo as r,mo as i,so 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=i();function d(){let i=(0,l.c)(5),{data:a}=e(t),s;i[0]===a.PlacementGroups?s=i[1]:(s=a.PlacementGroups??[],i[0]=a.PlacementGroups,i[1]=s);let c=s,d;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(n,{children:`Create Placement Group`})}),title:`Placement Groups`}),i[2]=d):d=i[2];let p;return i[3]===c?p=i[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.`})]}),i[3]=c,i[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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Ta as t,Y as n,lo as r,mo as i,so 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=i();function u(){let i=(0,c.c)(5),{data:a}=e(n),s;i[0]===a.SecurityGroups?s=i[1]:(s=a.SecurityGroups??[],i[0]=a.SecurityGroups,i[1]=s);let u=s,f;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/ec2/create-security-group`,children:(0,l.jsx)(t,{children:`Create Security Group`})}),title:`Security Groups`}),i[2]=f):f=i[2];let p;return i[3]===u?p=i[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.`})]}),i[3]=u,i[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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Ta as t,Z as n,lo as r,mo as i,so 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=i();function d(){let i=(0,l.c)(5),{data:a}=e(n),s;i[0]===a.Snapshots?s=i[1]:(s=a.Snapshots??[],i[0]=a.Snapshots,i[1]=s);let c=s,d;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(t,{children:`Create Snapshot`})}),title:`Snapshots`}),i[2]=d):d=i[2];let p;return i[3]===c?p=i[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.`})]}),i[3]=c,i[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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{$ as t,Pa as n,Ta as r,lo as i,mo as a,so 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=a();function f(){let n=(0,u.c)(5),{data:a}=e(t),o;n[0]===a.Subnets?o=n[1]:(o=a.Subnets??[],n[0]=a.Subnets,n[1]=o);let c=o,l;n[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(i,{to:`/ec2/create-subnet`,children:(0,d.jsx)(r,{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{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};
@@ -1 +1 @@
import{t as e}from"./useQuery.js";import{t}from"./useSuspenseQuery.js";import{M as n,N as r,Ta as i,lo as a,mo as o,so as s,uo as c}from"./index.js";import{t as l}from"./page-heading.js";var u=s(),d=o();function f(){let e=(0,u.c)(6),r=c(),{data:o}=t(n),s;e[0]===o.TargetGroups?s=e[1]:(s=o.TargetGroups??[],e[0]=o.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)(a,{to:`/ec2/create-target-group`,children:(0,d.jsx)(i,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==r||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 r({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)(a,{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]=r,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:i}=t,a;n[0]===i?a=n[1]:(a=r(i),n[0]=i,n[1]=a);let{data:o,isLoading:s}=e(a);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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Ta as t,lo as n,mo as r,so as i,tt 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=r();function d(){let r=(0,l.c)(5),{data:i}=e(a),s;r[0]===i.Volumes?s=r[1]:(s=i.Volumes??[],r[0]=i.Volumes,r[1]=s);let c=s,d;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(n,{to:`/ec2/create-volume`,children:(0,u.jsx)(t,{children:`Create Volume`})}),title:`Volumes`}),r[2]=d):d=r[2];let p;return r[3]===c?p=r[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.`})]}),r[3]=c,r[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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Pa as t,Ta as n,lo as r,mo as i,rt as a,so 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=i();function f(){let t=(0,u.c)(5),{data:i}=e(a),o;t[0]===i.Vpcs?o=t[1]:(o=i.Vpcs??[],t[0]=i.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)(r,{to:`/ec2/create-vpc`,children:(0,d.jsx)(n,{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 n=t(e.Tags);return(0,d.jsx)(l,{badge:(0,d.jsx)(c,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:n?`${e.VpcId} (${n})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component};
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};
@@ -1 +1 @@
import{mo as e,so 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{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};
@@ -1 +1 @@
import{Xa 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{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};
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
import{F as e,I as t,P as n}from"./ec2.js";import{dr as r,fr as i,gr as a,hr as o,mr as s,pr as c,vr as l}from"./index.js";var u=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/,d=l().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=a({imageId:l(`Please select an Image`),instanceType:l(`Please select an instance type`),keyName:l(`Please select a key pair`).min(1,`Key pair is required`),subnetId:l().optional(),placementGroupName:l().optional(),count:s(`Instance count must be a whole number`).min(1,`Instance count must be at least 1`),rootDeviceName:l().optional(),rootVolumeSize:o().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:r(f).optional(),rootDeleteOnTermination:c().optional()}),m=a({keyName:d}),h=a({keyName:d,publicKeyMaterial:l().min(1,`Public key is required`).refine(e=>e.trim().length>0,`Public key cannot be empty`)}),g=a({size:o().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:l().min(1,`Availability zone is required`)}),_=a({size:o().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`)}),v=a({volumeId:l().min(1,`Volume is required`),description:l().optional()});a({sourceSnapshotId:l().min(1,`Source snapshot is required`),sourceRegion:l().min(1,`Source region is required`),description:l().optional()}),a({volumeId:l().min(1,`Volume is required`),instanceId:l().min(1,`Instance is required`),device:l().optional()}),a({volumeId:l().min(1,`Volume is required`),instanceId:l().optional(),force:c().optional()}),a({instanceType:l().min(1,`Instance type is required`)}),a({name:l().min(1,`Name is required`),description:l().optional()});var y=a({vpcId:l().min(1,`VPC is required`),cidrBlock:l().min(1,`CIDR block is required`).regex(u,`Must be a valid CIDR block (e.g. 10.0.1.0/24)`),availabilityZone:l().optional()});a({cidrBlock:l().min(1,`CIDR block is required`).regex(u,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`),name:l().optional()});var b=a({key:l().min(1,`Key is required`),value:l()}),x=a({mode:r([`vpc-only`,`vpc-and-more`]),namePrefix:l().optional(),autoGenerateNames:c(),cidrBlock:l().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:r([`default`,`dedicated`]),publicSubnetCount:o().int().min(0).max(1),privateSubnetCount:o().int().min(0).max(2),publicSubnetCidrs:i(l()),privateSubnetCidrs:i(l()),tags:i(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=a({groupName:l().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:l().min(1,`Strategy is required`)}),C=a({groupName:l().min(1,`Group name is required`).max(255,`Group name must be 255 characters or less`),description:l().min(1,`Description is required`).max(255,`Description must be 255 characters or less`),vpcId:l().min(1,`VPC is required`)}),w=a({ipProtocol:l().min(1,`Protocol is required`),fromPort:o().int().min(-1).max(65535),toPort:o().int().min(-1).max(65535),cidrIp:l().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,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};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{_r as e,dr as t,fr as n,gr as r,hr as i,vr as a}from"./index.js";var o=/^(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$/,s=a().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=a().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=i().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:a().min(1,`Tag key is required`).max(128),value:a().max(256)}),d=r({protocol:t([`HTTP`]),path:a().min(1,`Path is required`).max(1024),port:a().min(1),intervalSeconds:i().int().min(5).max(300),timeoutSeconds:i().int().min(2).max(120),healthyThresholdCount:i().int().min(2).max(10),unhealthyThresholdCount:i().int().min(2).max(10),matcher:a().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`]),port:l,vpcId:a().min(1,`VPC is required`),healthCheck:d,tags:n(u)}),p=r({protocol:t([`HTTP`]),port:l,defaultTargetGroupArn:a().min(1,`Target group is required`)}),m=/^[!-~]+$/,h=r({field:t([`host-header`,`path-pattern`,`http-header`,`http-request-method`,`source-ip`,`query-string`]),httpHeaderName:a().max(40).optional(),rawValues:a().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(!m.test(e)){t.addIssue({code:`custom`,path:[`rawValues`],message:`Value "${e}" contains whitespace or non-ASCII characters`});return}}),g=r({priority:i().int(`Priority must be a whole number`).min(1,`Priority must be at least 1`).max(5e4,`Priority must be at most 50000`),conditions:n(h).min(1,`At least one condition is required`).max(5,`Up to 5 conditions per rule`),forwardTargetGroupArn:a().min(1,`Target group is required`)}),_=r({name:s,scheme:t([`internet-facing`,`internal`]),vpcId:a().min(1,`VPC is required`),subnetIds:n(a()).min(2,`At least 2 subnets are required for an ALB`),securityGroupIds:n(a()),tags:n(u),listener:r({protocol:t([`HTTP`]),port:l,targetGroupMode:t([`new`,`existing`]),existingTargetGroupArn:a().optional()}).refine(e=>e.targetGroupMode===`existing`?!!e.existingTargetGroupArn:!0,{error:`Target group is required`,path:[`existingTargetGroupArn`]})});r({targets:n(r({instanceId:a().min(1,`Instance is required`),port:l.optional()})).min(1,`At least one target is required`)}),e(a(),a());export{f as i,_ as n,g as r,p as t};
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};
@@ -1 +1 @@
import{Co as e,Do as t,Mo as n,Oo as r,Po as i,go as a,ho as o,mo as s,po as c,so as l,vo as u,xo as d}from"./index.js";var f=class extends n{#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 n=this.options;this.options=this.#e.defaultMutationOptions(e),t(this.options,n)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&d(n.mutationKey)!==d(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??a();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(e){u.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(o(),1);function m(t,n){let i=c(n),[a]=p.useState(()=>new f(i,t));p.useEffect(()=>{a.setOptions(t)},[a,t]);let o=p.useSyncExternalStore(p.useCallback(e=>a.subscribe(u.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),s=p.useCallback((t,n)=>{a.mutate(t,n).catch(e)},[a]);if(o.error&&r(a.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}var h=l(),g=s();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,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};
@@ -1 +1 @@
import{Yn as e,Zn 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:t,responseSchema:n,initialResponseContainer:r}){let i=this.marshaller,a=n.getEventStreamMember(),o=n.getMemberSchema(a).getMemberSchemas(),s=Symbol(`initialResponseMarker`),c=i.deserialize(t.body,async t=>{let r=``;for(let e in t)if(e!==`__type`){r=e;break}let i=t[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??e)(i):c.isStructSchema()&&(a[s]=await this.deserializer.read(c,i));else if(n){let e=t[r].headers[s]?.value;e!=null&&(c.isNumericSchema()?e&&typeof e==`object`&&`bytes`in e?a[s]=BigInt(e.toString()):a[s]=Number(e):a[s]=e)}}if(o)return{[r]:a};if(i.byteLength===0)return{[r]:{}}}return{[r]:await this.deserializer.read(n,i)}}else return{$unknown:t}}),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(e,n,r){let i=this.serializer,a=e,o=null,s,c=n.getSchema()[4].includes(e),l={};if(c){let t=n.getMemberSchema(e);if(t.isStructSchema()){for(let[n,i]of t.structIterator()){let{eventHeader:t,eventPayload:a}=i.getMergedTraits();if(a)o=n;else if(t){let t=r[e][n],a=`binary`;i.isNumericSchema()?a=(-2)**31<=t&&t<=2**31-1?`integer`:`long`:i.isTimestampSchema()?a=`timestamp`:i.isStringSchema()?a=`string`:i.isBooleanSchema()&&(a=`boolean`),t!=null&&(l[n]={type:a,value:t},delete r[e][n])}}if(o!==null){let n=t.getMemberSchema(o);n.isBlobSchema()?s=`application/octet-stream`:n.isStringSchema()&&(s=`text/plain`),i.write(n,r[e][o])}else i.write(t,r[e])}else if(t.isUnitSchema())i.write(t,{});else throw Error(`@smithy/core/event-streams - non-struct member not supported in event stream union.`)}else{let[t,n]=r[e];a=t,i.write(15,n)}let u=i.flush()??new Uint8Array;return{body:typeof u==`string`?(this.serdeContext?.utf8Decoder??t)(u):u,eventType:a,explicitPayloadContentType:s,additionalHeaders:l}}};export{n as EventStreamSerde};
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};
+1 -1
View File
@@ -1 +1 @@
import{Oa as e,Za as t,ho as n,mo as r,so as i}from"./index.js";n();var a=i(),o=r();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=t(`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{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};
@@ -1 +1 @@
import{Ta as e,mo as t,so as n}from"./index.js";var r=n(),i=t();function a(t){let n=(0,r.c)(9),{isSubmitting:a,isPending:o,onCancel:s,submitLabel:c,pendingLabel:l}=t,u=a||o,d;n[0]!==u||n[1]!==s?(d=(0,i.jsx)(e,{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)(e,{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};
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};
+1 -1
View File
@@ -1 +1 @@
import{n as e}from"./error-banner.js";import{At as t,Dt as n,Et as r,Fn as i,In as a,Mt as o,Nt as s,Ot as c,Pt as l,Tt as u,jt as d,kt as f,po as p,so as m,st as h}from"./index.js";var g=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachUserPolicy`,{}).n(`IAMClient`,`AttachUserPolicyCommand`).sc(u).build(){},_=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateAccessKey`,{}).n(`IAMClient`,`CreateAccessKeyCommand`).sc(r).build(){},v=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreatePolicy`,{}).n(`IAMClient`,`CreatePolicyCommand`).sc(n).build(){},y=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateUser`,{}).n(`IAMClient`,`CreateUserCommand`).sc(c).build(){},b=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteAccessKey`,{}).n(`IAMClient`,`DeleteAccessKeyCommand`).sc(f).build(){},x=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeletePolicy`,{}).n(`IAMClient`,`DeletePolicyCommand`).sc(t).build(){},S=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteUser`,{}).n(`IAMClient`,`DeleteUserCommand`).sc(d).build(){},C=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachUserPolicy`,{}).n(`IAMClient`,`DetachUserPolicyCommand`).sc(o).build(){},w=class extends i.classBuilder().ep(l).m(function(e,t,n,r){return[a(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`UpdateAccessKey`,{}).n(`IAMClient`,`UpdateAccessKeyCommand`).sc(s).build(){},T=m();function E(){let t=(0,T.c)(2),n=p(),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 h().send(t)}function O(){let t=(0,T.c)(2),n=p(),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 h().send(t)}function A(){let t=(0,T.c)(2),n=p(),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 h().send(t)}function M(){let t=(0,T.c)(2),n=p(),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 h().send(r)}function P(){let t=(0,T.c)(2),n=p(),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 h().send(i)}function I(){let t=(0,T.c)(2),n=p(),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 h().send(t)}function R(){let t=(0,T.c)(2),n=p(),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 h().send(t)}function B(){let t=(0,T.c)(2),n=p(),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 h().send(r)}function H(){let t=(0,T.c)(2),n=p(),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 h().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,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};
+1 -1
View File
@@ -1 +1 @@
import{gr as e,vr 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,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};
@@ -1,3 +1,3 @@
import{t as e}from"./error-banner.js";import{t}from"./back-link.js";import{t as n}from"./cli-command-panel.js";import{w as r}from"./ec2.js";import{Ti as i,mo as a,so as o,uo 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 f}from"./textarea.js";import{i as p,t as m}from"./zod.js";import{u as h}from"./ec22.js";import{t as g}from"./form-actions.js";var _=o(),v=a();function y(){let a=(0,_.c)(53),o=s(),y=r(),x;a[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:m(h)},a[0]=x):x=a[0];let{handleSubmit:S,register:C,watch:w,formState:T}=p(x),{errors:E,isSubmitting:D}=T,O;a[1]!==y||a[2]!==o?(O=async e=>{await y.mutateAsync(e),o({to:`/ec2/describe-key-pairs`})},a[1]=y,a[2]=o,a[3]=O):O=a[3];let k=O,A,j;a[4]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,v.jsx)(t,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),j=(0,v.jsx)(c,{title:`Import Key Pair`}),a[4]=A,a[5]=j):(A=a[4],j=a[5]);let M;a[6]===y.error?M=a[7]:(M=y.error&&(0,v.jsx)(e,{error:y.error,msg:`Failed to import key pair`}),a[6]=y.error,a[7]=M);let N;a[8]!==S||a[9]!==k?(N=S(k),a[8]=S,a[9]=k,a[10]=N):N=a[10];let P;a[11]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,v.jsx)(l,{children:(0,v.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),a[11]=P):P=a[11];let F=!!E.keyName,I;a[12]===C?I=a[13]:(I=C(`keyName`),a[12]=C,a[13]=I);let L;a[14]!==F||a[15]!==I?(L=(0,v.jsx)(i,{"aria-invalid":F,id:`keyName`,placeholder:`my-key-pair…`,...I}),a[14]=F,a[15]=I,a[16]=L):L=a[16];let R;a[17]===E.keyName?R=a[18]:(R=(0,v.jsx)(u,{errors:[E.keyName]}),a[17]=E.keyName,a[18]=R);let z;a[19]!==L||a[20]!==R?(z=(0,v.jsxs)(d,{children:[P,L,R]}),a[19]=L,a[20]=R,a[21]=z):z=a[21];let B,V;a[22]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,v.jsx)(l,{children:(0,v.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),V=(0,v.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)`}),a[22]=B,a[23]=V):(B=a[22],V=a[23]);let H=!!E.publicKeyMaterial,U;a[24]===C?U=a[25]:(U=C(`publicKeyMaterial`),a[24]=C,a[25]=U);let W;a[26]!==H||a[27]!==U?(W=(0,v.jsx)(f,{"aria-invalid":H,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...U}),a[26]=H,a[27]=U,a[28]=W):W=a[28];let G;a[29]===E.publicKeyMaterial?G=a[30]:(G=(0,v.jsx)(u,{errors:[E.publicKeyMaterial]}),a[29]=E.publicKeyMaterial,a[30]=G);let K;a[31]!==W||a[32]!==G?(K=(0,v.jsxs)(d,{children:[B,V,W,G]}),a[31]=W,a[32]=G,a[33]=K):K=a[33];let q;a[34]===w?q=a[35]:(q=b(w),a[34]=w,a[35]=q);let J;a[36]===q?J=a[37]:(J=(0,v.jsx)(n,{commands:q}),a[36]=q,a[37]=J);let Y;a[38]===o?Y=a[39]:(Y=async()=>await o({to:`/ec2/describe-key-pairs`}),a[38]=o,a[39]=Y);let X;a[40]!==y.isPending||a[41]!==D||a[42]!==Y?(X=(0,v.jsx)(g,{isPending:y.isPending,isSubmitting:D,onCancel:Y,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),a[40]=y.isPending,a[41]=D,a[42]=Y,a[43]=X):X=a[43];let Z;a[44]!==z||a[45]!==K||a[46]!==J||a[47]!==X||a[48]!==N?(Z=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[z,K,J,X]}),a[44]=z,a[45]=K,a[46]=J,a[47]=X,a[48]=N,a[49]=Z):Z=a[49];let Q;return a[50]!==Z||a[51]!==M?(Q=(0,v.jsxs)(v.Fragment,{children:[A,j,M,Z]}),a[50]=Z,a[51]=M,a[52]=Q):Q=a[52],Q}function b(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 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:` \\
--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{y as component};
--public-key-material`},{type:`value`,value:` fileb://path/to/key.pub`}]}]}export{_ as component};
@@ -0,0 +1 @@
import{er as e,tr 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:t,responseSchema:n,initialResponseContainer:r}){let i=this.marshaller,a=n.getEventStreamMember(),o=n.getMemberSchema(a).getMemberSchemas(),s=Symbol(`initialResponseMarker`),c=i.deserialize(t.body,async t=>{let r=``;for(let e in t)if(e!==`__type`){r=e;break}let i=t[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??e)(i):c.isStructSchema()&&(a[s]=await this.deserializer.read(c,i));else if(n){let e=t[r].headers[s]?.value;e!=null&&(c.isNumericSchema()?e&&typeof e==`object`&&`bytes`in e?a[s]=BigInt(e.toString()):a[s]=Number(e):a[s]=e)}}if(o)return{[r]:a};if(i.byteLength===0)return{[r]:{}}}return{[r]:await this.deserializer.read(n,i)}}else return{$unknown:t}}),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(e,n,r){let i=this.serializer,a=e,o=null,s,c=n.getSchema()[4].includes(e),l={};if(c){let t=n.getMemberSchema(e);if(t.isStructSchema()){for(let[n,i]of t.structIterator()){let{eventHeader:t,eventPayload:a}=i.getMergedTraits();if(a)o=n;else if(t){let t=r[e][n],a=`binary`;i.isNumericSchema()?a=(-2)**31<=t&&t<=2**31-1?`integer`:`long`:i.isTimestampSchema()?a=`timestamp`:i.isStringSchema()?a=`string`:i.isBooleanSchema()&&(a=`boolean`),t!=null&&(l[n]={type:a,value:t},delete r[e][n])}}if(o!==null){let n=t.getMemberSchema(o);n.isBlobSchema()?s=`application/octet-stream`:n.isStringSchema()&&(s=`text/plain`),i.write(n,r[e][o])}else i.write(t,r[e])}else if(t.isUnitSchema())i.write(t,{});else throw Error(`@smithy/core/event-streams - non-struct member not supported in event stream union.`)}else{let[t,n]=r[e];a=t,i.write(15,n)}let u=i.flush()??new Uint8Array;return{body:typeof u==`string`?(this.serdeContext?.utf8Decoder??t)(u):u,eventType:a,explicitPayloadContentType:s,additionalHeaders:l}}};export{n as EventStreamSerde};
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{lo as e,mo as t,so 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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{Ta as t,lo as n,mo as r,so as i,v 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)(3),{data:i}=e(a),s;if(r[0]!==i.Policies){let e=(i.Policies??[]).toSorted(f),a;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(n,{to:`/iam/create-policy`,children:(0,l.jsx)(t,{children:`Create Policy`})}),title:`Policies`}),r[2]=a):a=r[2],s=(0,l.jsxs)(l.Fragment,{children:[a,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.`})]}),r[0]=i.Policies,r[1]=s}else s=r[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{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};
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{S as t,Ta as n,lo as r,mo as i,so 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=i();function u(){let i=(0,c.c)(3),{data:a}=e(t),s;if(i[0]!==a.Users){let e=(a.Users??[]).toSorted(f),t;i[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,l.jsx)(o,{actions:(0,l.jsx)(r,{to:`/iam/create-user`,children:(0,l.jsx)(n,{children:`Create User`})}),title:`Users`}),i[2]=t):t=i[2],s=(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 IAM users found.`})]}),i[0]=a.Users,i[1]=s}else s=i[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{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};
+1 -1
View File
@@ -1 +1 @@
import{Po as e,Ta as t,Ti as n,Xt as r,at as i,cr as a,ho as o,it as s,mo as c,so as l,sr as u,ur 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=l(),E=e(o()),D=c();function O(){let[e,o]=(0,E.useState)(null),{register:c,handleSubmit:l,formState:{errors:v,isSubmitting:y}}=g({resolver:_(u)});async function b(e){o(null),s(),d(e);try{await i().send(new r({})),window.location.href=`/`}catch{a(),s(),o(`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:l(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)(n,{"aria-invalid":!!v.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...c(`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)(n,{"aria-invalid":!!v.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...c(`secretAccessKey`)}),(0,D.jsx)(m,{errors:[v.secretAccessKey]})]}),(0,D.jsx)(t,{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{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};
+1 -1
View File
@@ -1 +1 @@
import{t as e}from"./useSuspenseQuery.js";import{I as t,Ta as n,ja as r,lo as i,mo as a,so 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=a();function d(){let r=(0,l.c)(5),{data:a}=e(t),o;r[0]===a.Buckets?o=r[1]:(o=a.Buckets??[],r[0]=a.Buckets,r[1]=o);let c=o,d;r[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(i,{to:`/s3/create-bucket`,children:(0,u.jsx)(n,{children:`Create Bucket`})}),title:`Buckets`}),r[2]=d):d=r[2];let p;return r[3]===c?p=r[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.`})]}),r[3]=c,r[4]=p),p}function f(e){return e.Name?(0,u.jsx)(c,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${r(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{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};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{mo as e,so 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{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};
+1 -1
View File
@@ -1 +1 @@
import{Xa as e}from"./index.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
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};
+1 -1
View File
@@ -1 +1 @@
import{co as e,mo as t,so as n}from"./index.js";var r=n(),i=t(),a=()=>{let t=(0,r.c)(1),n;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,i.jsx)(e,{}),t[0]=n):n=t[0],n};export{a as component};
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};
@@ -1 +1 @@
import{co as e,mo as t,so as n}from"./index.js";var r=n(),i=t(),a=()=>{let t=(0,r.c)(1),n;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,i.jsx)(e,{}),t[0]=n):n=t[0],n};export{a as component};
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};
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
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{Oa as e,mo as t,so 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{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};
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{Oa as e,mo as t,so 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{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};
@@ -1 +1 @@
import{Xa 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{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};
@@ -1 +1 @@
import{Xa 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{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};
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
import{Po as e,ho as t,so 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{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};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -14,6 +14,7 @@
},
"dependencies": {
"@aws-crypto/sha256-browser": "^5.2.0",
"@aws-sdk/client-acm": "^3.1057.0",
"@aws-sdk/client-ec2": "^3.1045.0",
"@aws-sdk/client-elastic-load-balancing-v2": "^3.1045.0",
"@aws-sdk/client-iam": "^3.1045.0",
+281 -1
View File
@@ -11,6 +11,9 @@ importers:
'@aws-crypto/sha256-browser':
specifier: ^5.2.0
version: 5.2.0
'@aws-sdk/client-acm':
specifier: ^3.1057.0
version: 3.1057.0
'@aws-sdk/client-ec2':
specifier: ^3.1045.0
version: 3.1045.0
@@ -179,6 +182,10 @@ packages:
'@aws-crypto/util@5.2.0':
resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==}
'@aws-sdk/client-acm@3.1057.0':
resolution: {integrity: sha512-CmYDvRAl+VVaBWpcH2nOjney8dFcS9SsbjNLjE9Ldqy5p+I2TpSJiAmysR8wvqFb3zzt3Ebt66oNPwLKcJx6bw==}
engines: {node: '>=20.0.0'}
'@aws-sdk/client-ec2@3.1045.0':
resolution: {integrity: sha512-/ShpsuHZbpwiNBSRc6rupxFRh/NqKTaxAZv34w58tPFOgghpJ8vPX2VV+FZiZJWHqrdQfwk7PhStxRpOz+ru+w==}
engines: {node: '>=20.0.0'}
@@ -195,6 +202,10 @@ packages:
resolution: {integrity: sha512-fsuO3Y6t+3Ro9Bsg41DKj4Sfy53CGSrhnMldNplWmG8Tx0UbYk+YDa4RD1hVlJpERw4JBmPkl0+J9qlxMh1pcA==}
engines: {node: '>=20.0.0'}
'@aws-sdk/core@3.974.15':
resolution: {integrity: sha512-UpA0rTGW/tHGITcCqHisbuuEPraYg9GG+mWmXjY5+RxZBMLGe6aL9oe0ix50LztwAcPIkGZLH0yWdMIkCM10hw==}
engines: {node: '>=20.0.0'}
'@aws-sdk/core@3.974.8':
resolution: {integrity: sha512-njR2qoG6ZuB0kvAS2FyICsFZJ6gmCcf2X/7JcD14sUvGDm26wiZ5BrA6LOiUxKFEF+IVe7kdroxyE00YlkiYsw==}
engines: {node: '>=20.0.0'}
@@ -207,34 +218,66 @@ packages:
resolution: {integrity: sha512-XT0jtf8Fw9JE6ppsQeoNnZRiG+jqRixMT1v1ZR17G60UvVdsQmTG8nbEyHuEPfMxDXEhfdARaM/XiEhca4lGHQ==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-env@3.972.41':
resolution: {integrity: sha512-n1EbJ98yvPWWdHZZv8bRBMqqDQJrtgtxyJ4xLy2Uqrh25BCOZQ7nnS1CsFXvuH8r0b0KVHDZEGEH5FxmEMP8jg==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-http@3.972.36':
resolution: {integrity: sha512-DPoGWfy7J7RKxvbf5kOKIGQkD2ek3dbKgzKIGrnLuvZBz5myU+Im/H6pmc14QcnFbqHMqxvtWSgRDSJW3qXLQg==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-http@3.972.43':
resolution: {integrity: sha512-TT76RN1NkI9WoyZqCNxOw6/WBMF7pYOTJcXbMokNFU+euSG40Kaf/t/FhDACVZWP+43wEM6ZynIPIkzS1wR1iA==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-ini@3.972.38':
resolution: {integrity: sha512-oDzUBu2MGJFgoar05sPMCwSrhw44ASyccrHzj66vO69OZqi7I6hZZxXfuPLC8OCzW7C+sU+bI73XHij41yekgQ==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-ini@3.972.46':
resolution: {integrity: sha512-hvcgcwOiS0nb2XFb5Op1Pz/vYaWz5K8kKullziGpdNRuG0NwzRXseuPt2CoBqknHGaSPVesu1aOn2OcctEYdCA==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-login@3.972.38':
resolution: {integrity: sha512-g1NosS8qe4OF++G2UFCM5ovSkgipC7YYor5KCWatG0UoMSO5YFj9C8muePlyVmOBV/WTI16Jo3/s1NUo/o1Bww==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-login@3.972.45':
resolution: {integrity: sha512-MZQv4SNjByk1iOKmrqmzcUF/uCB05wjvEHyXKxmGQTUANTIVayX6HPUF0bzkWLvtnkH7sAn9kUCfkXbSpj9sDA==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-node@3.972.39':
resolution: {integrity: sha512-HEswDQyxUtadoZ/bJsPPENHg7R0Lzym5LuMksJeHvqhCOpP+rtkDLKI4/ZChH4w3cf5kG8n6bZuI8PzajoiqMg==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-node@3.972.47':
resolution: {integrity: sha512-HrId+C0DWA5qDIyLG64/kjUB2RNtPypxmABnIctK+TA1P1kHlOYoE/Wf5T5tKOMKgb08P7k/zNyhvfJ3lh5Oag==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-process@3.972.34':
resolution: {integrity: sha512-T3IFs4EVmVi1dVN5RciFnklCANSzvrQd/VuHY9ThHSQmYkTogjcGkoJEr+oNUPQZnso52183088NqysMPji1/Q==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-process@3.972.41':
resolution: {integrity: sha512-7I/n1zkysouLOWvkEhjNEP4vMnD2v4kzzr3/3QBdrripEpn7ap1/I5DF3Hou1SUqkKWo1f3oPGMyFAA1FAMvsQ==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-sso@3.972.38':
resolution: {integrity: sha512-5ZxG+t0+3Q3QPh8KEjX6syskhgNf7I0MN7oGioTf6Lm1NTjfP7sIcYGNsthXC2qR8vcD3edNZwCr2ovfSSWuRA==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-sso@3.972.45':
resolution: {integrity: sha512-oHgbz/eFD8IKiksqDsz9ZMU4A59BpQq4QwJedBnGD80ZqYcHPPHZBwjBnxLVkB7iRVVHWpDclR8yWdD2PkQIUA==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-web-identity@3.972.38':
resolution: {integrity: sha512-lYHFF30DGI20jZcYX8cm6Ns0V7f1dDN6g/MBDLTyD/5iw+bXs3yBr2iAiHDkx4RFU5JgsnZvCHYKiRVPRdmOgw==}
engines: {node: '>=20.0.0'}
'@aws-sdk/credential-provider-web-identity@3.972.45':
resolution: {integrity: sha512-CDhzKdb2onv5bpnjn/acgdNmJOQthPDLsPizU7rZflsEcgMMp8Mlri+U5hdxf8ldvZJpvM3vLU6D56vfJm5AMQ==}
engines: {node: '>=20.0.0'}
'@aws-sdk/lib-storage@3.1045.0':
resolution: {integrity: sha512-F7dp2ST/83Iz6JTMMmUYEXxg7R1JDewfvzJeWWiDTwe0vLsg67JTN7OsBe6G8DWYbLQ+EyPWkyc3oFnxOjCVfg==}
engines: {node: '>=20.0.0'}
@@ -285,6 +328,10 @@ packages:
resolution: {integrity: sha512-iz+B29TXcAZsJpwB+AwG/TTGA5l/VnmMZ2UxtiySOZjI6gCdmviXPwdgzcmuazMy16rXoPY4mYCGe7zdNKfx5A==}
engines: {node: '>=20.0.0'}
'@aws-sdk/nested-clients@3.997.13':
resolution: {integrity: sha512-2pA6eyb5nSo/ZD2cayhOTEMoGQYgspq0RI05GDLkzQ3ajZ6isS6waV6E92Am/hz4LIlLUTrbwPLurJ/fuiHvkg==}
engines: {node: '>=20.0.0'}
'@aws-sdk/nested-clients@3.997.6':
resolution: {integrity: sha512-WBDnqatJl+kGObpfmfSxqnXeYTu3Me8wx8WCtvoxX3pfWrrTv8I4WTMSSs7PZqcRcVh8WeUKMgGFjMG+52SR1w==}
engines: {node: '>=20.0.0'}
@@ -297,10 +344,18 @@ packages:
resolution: {integrity: sha512-+CMIt3e1VzlklAECmG+DtP1sV8iKq25FuA0OKpnJ4KA0kxUtd7CgClY7/RU6VzJBQwbN4EJ9Ue6plvqx1qGadw==}
engines: {node: '>=20.0.0'}
'@aws-sdk/signature-v4-multi-region@3.996.30':
resolution: {integrity: sha512-HULDLMVzkmTSEv6//7kx2kRevp/VYUpm8hJNNFbmhxDn0fUiGTxVcM9yg31TukvTq8nyOBDUN2gH0o5IRbKjdw==}
engines: {node: '>=20.0.0'}
'@aws-sdk/token-providers@3.1041.0':
resolution: {integrity: sha512-Th7kPI6YPtvJUcdznooXJMy+9rQWjmEF81LxaJssngBzuysK4a/x+l8kjm1zb7nYsUPbndnBdUnwng/3PLvtGw==}
engines: {node: '>=20.0.0'}
'@aws-sdk/token-providers@3.1056.0':
resolution: {integrity: sha512-81duvlltQlsfn5K+o8zILcystBRdbT1G2JJYVCML5NZHBz4CL/zf+sAemCtBh/uh6RQUMyInGeZLQ7/8igZhbA==}
engines: {node: '>=20.0.0'}
'@aws-sdk/types@3.973.6':
resolution: {integrity: sha512-Atfcy4E++beKtwJHiDln2Nby8W/mam64opFPTiHEqgsthqeydFS1pY+OUlN1ouNOmf8ArPU/6cDS65anOP3KQw==}
engines: {node: '>=20.0.0'}
@@ -309,6 +364,10 @@ packages:
resolution: {integrity: sha512-gjlAdtHMbtR9X5iIhVUvbVcy55KnznpC6bkDUWW9z915bi0ckdUr5cjf16Kp6xq0bP5HBD2xzgbL9F9Quv5vUw==}
engines: {node: '>=20.0.0'}
'@aws-sdk/types@3.973.9':
resolution: {integrity: sha512-kuBfgQVdcz5Bmapc4A13YbpVw/pXkesfhetcFYwbntqas8sF41OHyd4o28+/TG2ZQdHBsv90Lsu5y6oitvYCdg==}
engines: {node: '>=20.0.0'}
'@aws-sdk/util-arn-parser@3.972.3':
resolution: {integrity: sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA==}
engines: {node: '>=20.0.0'}
@@ -341,6 +400,10 @@ packages:
resolution: {integrity: sha512-PMYKKtJd70IsSG0yHrdAbxBr+ZWBKLvzFZfD3/urxgf6hXVMzuU5M+3MJ5G67RpOmLBu1fAUN65SbWuKUCOlAA==}
engines: {node: '>=20.0.0'}
'@aws-sdk/xml-builder@3.972.26':
resolution: {integrity: sha512-cDbrqvDS73whl6YAPSPq0U6whzG6UWI9PuWh0wrUuGoZexhWEqhdunbukV7iBoaWnFV1AODutM5hOD6rtn439g==}
engines: {node: '>=20.0.0'}
'@aws/lambda-invoke-store@0.2.4':
resolution: {integrity: sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ==}
engines: {node: '>=18.0.0'}
@@ -997,10 +1060,18 @@ packages:
resolution: {integrity: sha512-x7BlLbUFL8NWCGjMF9C+1N5cVCxcPa7g6Tv9B4A2luWx3be3oU8hQ96wIwxe/s7OhIzvoJH73HAUSg5JXVlEtQ==}
engines: {node: '>=18.0.0'}
'@smithy/core@3.24.5':
resolution: {integrity: sha512-Kt8phUg45M15EjhYAbZ+fFikYneijLu9Liugz8ZsYz2i8j0hzGv27LWKpEHYRfvj+LyCOSijpcR/2i8RouV+cA==}
engines: {node: '>=18.0.0'}
'@smithy/credential-provider-imds@4.2.14':
resolution: {integrity: sha512-Au28zBN48ZAoXdooGUHemuVBrkE+Ie6RPmGNIAJsFqj33Vhb6xAgRifUydZ2aY+M+KaMAETAlKk5NC5h1G7wpg==}
engines: {node: '>=18.0.0'}
'@smithy/credential-provider-imds@4.3.6':
resolution: {integrity: sha512-tHhdiWZfG1ZIh2YcRfPJmY2gHcBmqbAzqm3ER4TIDFYsSEqTD5tICT7cgQ/kI8LRakxp12myOYyK68XPn7MnHw==}
engines: {node: '>=18.0.0'}
'@smithy/eventstream-codec@4.2.14':
resolution: {integrity: sha512-erZq0nOIpzfeZdCyzZjdJb4nVSKLUmSkaQUVkRGQTXs30gyUGeKnrYEg+Xe1W5gE3aReS7IgsvANwVPxSzY6Pw==}
engines: {node: '>=18.0.0'}
@@ -1025,6 +1096,10 @@ packages:
resolution: {integrity: sha512-bXOvQzaSm6MnmLaWA1elgfQcAtN4UP3vXqV97bHuoOrHQOJiLT3ds6o9eo5bqd0TJfRFpzdGnDQdW3FACiAVdw==}
engines: {node: '>=18.0.0'}
'@smithy/fetch-http-handler@5.4.5':
resolution: {integrity: sha512-SK3VMeH0fibgdTg2QeB+O4p7Yy/2E5HBOHJeC58FshkDdeuX8lOgO7PfjYfLyPLP1ch55j91cQqKBzDS0mRjSQ==}
engines: {node: '>=18.0.0'}
'@smithy/hash-blob-browser@4.2.15':
resolution: {integrity: sha512-0PJ4Al3fg2nM4qKrAIxyNcApgqHAXcBkN8FeizOz69z0rb26uZ6lMESYtxegaTlXB5Hj84JfwMPavMrwDMjucA==}
engines: {node: '>=18.0.0'}
@@ -1081,6 +1156,10 @@ packages:
resolution: {integrity: sha512-iB+orM4x3xrr57X3YaXazfKnntl0LHlZB1kcXSGzMV1Tt0+YwEjGlbjk/44qEGtBzXAz6yFDzkYTKSV6Pj2HUg==}
engines: {node: '>=18.0.0'}
'@smithy/node-http-handler@4.7.5':
resolution: {integrity: sha512-3dA9TQ+ybRSZ/m0wnbZhiBy4Dezjgq1Ib/ZZrYTpJDBgpoLLU/SDzZc/g0x0MNAdOJe1wPcM+x2PBRmoOur+Sw==}
engines: {node: '>=18.0.0'}
'@smithy/property-provider@4.2.14':
resolution: {integrity: sha512-WuM31CgfsnQ/10i7NYr0PyxqknD72Y5uMfUMVSniPjbEPceiTErb4eIqJQ+pdxNEAUEWrewrGjIRjVbVHsxZiQ==}
engines: {node: '>=18.0.0'}
@@ -1109,6 +1188,10 @@ packages:
resolution: {integrity: sha512-1D9Y/nmlVjCeSivCbhZ7hgEpmHyY1h0GvpSZt3l0xcD9JjmjVC1CHOozS6+Gh+/ldMH8JuJ6cujObQqfayAVFA==}
engines: {node: '>=18.0.0'}
'@smithy/signature-v4@5.4.5':
resolution: {integrity: sha512-QBJKWGqIknH0dc9LWpfH1mkdokAx6iXYN3UcQ3eY6uIEyScuoQAhfl94ge7ozUy9WgFUdE8xsvwBjaYBbWmPNA==}
engines: {node: '>=18.0.0'}
'@smithy/smithy-client@4.12.13':
resolution: {integrity: sha512-y/Pcj1V9+qG98gyu1gvftHB7rDpdh+7kIBIggs55yGm3JdtBV8GT8IFF3a1qxZ79QnaJHX9GXzvBG6tAd+czJA==}
engines: {node: '>=18.0.0'}
@@ -1117,6 +1200,10 @@ packages:
resolution: {integrity: sha512-59b5HtSVrVR/eYNei3BUj3DCPKD/G7EtDDe7OEJE7i7FtQFugYo6MxbotS8mVJkLNVf8gYaAlEBwwtJ9HzhWSg==}
engines: {node: '>=18.0.0'}
'@smithy/types@4.14.2':
resolution: {integrity: sha512-P+otAxbV4CqBybp7EkcJCrig63yE2E7PuNVOmilVMRcx/O+QDzGULTrKsq4DV13gSfak9ObPrWaHl/9bL5YcWw==}
engines: {node: '>=18.0.0'}
'@smithy/url-parser@4.2.14':
resolution: {integrity: sha512-p06BiBigJ8bTA3MgnOfCtDUWnAMY0YfedO/GRpmc7p+wg3KW8vbXy1xwSu5ASy0wV7rRYtlfZOIKH4XqfhjSQQ==}
engines: {node: '>=18.0.0'}
@@ -1871,6 +1958,10 @@ packages:
resolution: {integrity: sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==}
hasBin: true
fast-xml-parser@5.7.3:
resolution: {integrity: sha512-C0AaNuC+mscy6vrAQKAc/rMq+zAPHodfHGZu4sGVehvAQt/JLG1O5zEcYcXSY5zSqr4YVgxsB+pHXTq0i7eDlg==}
hasBin: true
fdir@6.5.0:
resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==}
engines: {node: '>=12.0.0'}
@@ -2662,10 +2753,23 @@ snapshots:
'@aws-crypto/util@5.2.0':
dependencies:
'@aws-sdk/types': 3.973.6
'@aws-sdk/types': 3.973.8
'@smithy/util-utf8': 2.3.0
tslib: 2.8.1
'@aws-sdk/client-acm@3.1057.0':
dependencies:
'@aws-crypto/sha256-browser': 5.2.0
'@aws-crypto/sha256-js': 5.2.0
'@aws-sdk/core': 3.974.15
'@aws-sdk/credential-provider-node': 3.972.47
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/fetch-http-handler': 5.4.5
'@smithy/node-http-handler': 4.7.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/client-ec2@3.1045.0':
dependencies:
'@aws-crypto/sha256-browser': 5.2.0
@@ -2862,6 +2966,17 @@ snapshots:
transitivePeerDependencies:
- aws-crt
'@aws-sdk/core@3.974.15':
dependencies:
'@aws-sdk/types': 3.973.9
'@aws-sdk/xml-builder': 3.972.26
'@aws/lambda-invoke-store': 0.2.4
'@smithy/core': 3.24.5
'@smithy/signature-v4': 5.4.5
'@smithy/types': 4.14.2
bowser: 2.14.1
tslib: 2.8.1
'@aws-sdk/core@3.974.8':
dependencies:
'@aws-sdk/types': 3.973.8
@@ -2892,6 +3007,14 @@ snapshots:
'@smithy/types': 4.14.1
tslib: 2.8.1
'@aws-sdk/credential-provider-env@3.972.41':
dependencies:
'@aws-sdk/core': 3.974.15
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/credential-provider-http@3.972.36':
dependencies:
'@aws-sdk/core': 3.974.8
@@ -2905,6 +3028,16 @@ snapshots:
'@smithy/util-stream': 4.5.25
tslib: 2.8.1
'@aws-sdk/credential-provider-http@3.972.43':
dependencies:
'@aws-sdk/core': 3.974.15
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/fetch-http-handler': 5.4.5
'@smithy/node-http-handler': 4.7.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/credential-provider-ini@3.972.38':
dependencies:
'@aws-sdk/core': 3.974.8
@@ -2924,6 +3057,22 @@ snapshots:
transitivePeerDependencies:
- aws-crt
'@aws-sdk/credential-provider-ini@3.972.46':
dependencies:
'@aws-sdk/core': 3.974.15
'@aws-sdk/credential-provider-env': 3.972.41
'@aws-sdk/credential-provider-http': 3.972.43
'@aws-sdk/credential-provider-login': 3.972.45
'@aws-sdk/credential-provider-process': 3.972.41
'@aws-sdk/credential-provider-sso': 3.972.45
'@aws-sdk/credential-provider-web-identity': 3.972.45
'@aws-sdk/nested-clients': 3.997.13
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/credential-provider-imds': 4.3.6
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/credential-provider-login@3.972.38':
dependencies:
'@aws-sdk/core': 3.974.8
@@ -2937,6 +3086,15 @@ snapshots:
transitivePeerDependencies:
- aws-crt
'@aws-sdk/credential-provider-login@3.972.45':
dependencies:
'@aws-sdk/core': 3.974.15
'@aws-sdk/nested-clients': 3.997.13
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/credential-provider-node@3.972.39':
dependencies:
'@aws-sdk/credential-provider-env': 3.972.34
@@ -2954,6 +3112,20 @@ snapshots:
transitivePeerDependencies:
- aws-crt
'@aws-sdk/credential-provider-node@3.972.47':
dependencies:
'@aws-sdk/credential-provider-env': 3.972.41
'@aws-sdk/credential-provider-http': 3.972.43
'@aws-sdk/credential-provider-ini': 3.972.46
'@aws-sdk/credential-provider-process': 3.972.41
'@aws-sdk/credential-provider-sso': 3.972.45
'@aws-sdk/credential-provider-web-identity': 3.972.45
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/credential-provider-imds': 4.3.6
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/credential-provider-process@3.972.34':
dependencies:
'@aws-sdk/core': 3.974.8
@@ -2963,6 +3135,14 @@ snapshots:
'@smithy/types': 4.14.1
tslib: 2.8.1
'@aws-sdk/credential-provider-process@3.972.41':
dependencies:
'@aws-sdk/core': 3.974.15
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/credential-provider-sso@3.972.38':
dependencies:
'@aws-sdk/core': 3.974.8
@@ -2976,6 +3156,16 @@ snapshots:
transitivePeerDependencies:
- aws-crt
'@aws-sdk/credential-provider-sso@3.972.45':
dependencies:
'@aws-sdk/core': 3.974.15
'@aws-sdk/nested-clients': 3.997.13
'@aws-sdk/token-providers': 3.1056.0
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/credential-provider-web-identity@3.972.38':
dependencies:
'@aws-sdk/core': 3.974.8
@@ -2988,6 +3178,15 @@ snapshots:
transitivePeerDependencies:
- aws-crt
'@aws-sdk/credential-provider-web-identity@3.972.45':
dependencies:
'@aws-sdk/core': 3.974.15
'@aws-sdk/nested-clients': 3.997.13
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/lib-storage@3.1045.0(@aws-sdk/client-s3@3.1045.0)':
dependencies:
'@aws-sdk/client-s3': 3.1045.0
@@ -3106,6 +3305,19 @@ snapshots:
'@smithy/util-retry': 4.3.8
tslib: 2.8.1
'@aws-sdk/nested-clients@3.997.13':
dependencies:
'@aws-crypto/sha256-browser': 5.2.0
'@aws-crypto/sha256-js': 5.2.0
'@aws-sdk/core': 3.974.15
'@aws-sdk/signature-v4-multi-region': 3.996.30
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/fetch-http-handler': 5.4.5
'@smithy/node-http-handler': 4.7.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/nested-clients@3.997.6':
dependencies:
'@aws-crypto/sha256-browser': 5.2.0
@@ -3167,6 +3379,13 @@ snapshots:
'@smithy/types': 4.14.1
tslib: 2.8.1
'@aws-sdk/signature-v4-multi-region@3.996.30':
dependencies:
'@aws-sdk/types': 3.973.9
'@smithy/signature-v4': 5.4.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/token-providers@3.1041.0':
dependencies:
'@aws-sdk/core': 3.974.8
@@ -3179,6 +3398,15 @@ snapshots:
transitivePeerDependencies:
- aws-crt
'@aws-sdk/token-providers@3.1056.0':
dependencies:
'@aws-sdk/core': 3.974.15
'@aws-sdk/nested-clients': 3.997.13
'@aws-sdk/types': 3.973.9
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/types@3.973.6':
dependencies:
'@smithy/types': 4.14.1
@@ -3189,6 +3417,11 @@ snapshots:
'@smithy/types': 4.14.1
tslib: 2.8.1
'@aws-sdk/types@3.973.9':
dependencies:
'@smithy/types': 4.14.2
tslib: 2.8.1
'@aws-sdk/util-arn-parser@3.972.3':
dependencies:
tslib: 2.8.1
@@ -3235,6 +3468,12 @@ snapshots:
fast-xml-parser: 5.7.2
tslib: 2.8.1
'@aws-sdk/xml-builder@3.972.26':
dependencies:
'@smithy/types': 4.14.2
fast-xml-parser: 5.7.3
tslib: 2.8.1
'@aws/lambda-invoke-store@0.2.4': {}
'@babel/code-frame@7.29.0':
@@ -3745,6 +3984,12 @@ snapshots:
'@smithy/uuid': 1.1.2
tslib: 2.8.1
'@smithy/core@3.24.5':
dependencies:
'@aws-crypto/crc32': 5.2.0
'@smithy/types': 4.14.2
tslib: 2.8.1
'@smithy/credential-provider-imds@4.2.14':
dependencies:
'@smithy/node-config-provider': 4.3.14
@@ -3753,6 +3998,12 @@ snapshots:
'@smithy/url-parser': 4.2.14
tslib: 2.8.1
'@smithy/credential-provider-imds@4.3.6':
dependencies:
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@smithy/eventstream-codec@4.2.14':
dependencies:
'@aws-crypto/crc32': 5.2.0
@@ -3791,6 +4042,12 @@ snapshots:
'@smithy/util-base64': 4.3.2
tslib: 2.8.1
'@smithy/fetch-http-handler@5.4.5':
dependencies:
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@smithy/hash-blob-browser@4.2.15':
dependencies:
'@smithy/chunked-blob-reader': 5.2.2
@@ -3886,6 +4143,12 @@ snapshots:
'@smithy/types': 4.14.1
tslib: 2.8.1
'@smithy/node-http-handler@4.7.5':
dependencies:
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@smithy/property-provider@4.2.14':
dependencies:
'@smithy/types': 4.14.1
@@ -3927,6 +4190,12 @@ snapshots:
'@smithy/util-utf8': 4.2.2
tslib: 2.8.1
'@smithy/signature-v4@5.4.5':
dependencies:
'@smithy/core': 3.24.5
'@smithy/types': 4.14.2
tslib: 2.8.1
'@smithy/smithy-client@4.12.13':
dependencies:
'@smithy/core': 3.23.17
@@ -3941,6 +4210,10 @@ snapshots:
dependencies:
tslib: 2.8.1
'@smithy/types@4.14.2':
dependencies:
tslib: 2.8.1
'@smithy/url-parser@4.2.14':
dependencies:
'@smithy/querystring-parser': 4.2.14
@@ -4728,6 +5001,13 @@ snapshots:
path-expression-matcher: 1.5.0
strnum: 2.3.0
fast-xml-parser@5.7.3:
dependencies:
'@nodable/entities': 2.1.0
fast-xml-builder: 1.2.0
path-expression-matcher: 1.5.0
strnum: 2.3.0
fdir@6.5.0(picomatch@4.0.4):
optionalDependencies:
picomatch: 4.0.4
@@ -0,0 +1,151 @@
import { useState } from "react"
import { ErrorBanner } from "@/components/error-banner"
import {
AlertDialog,
AlertDialogAction,
AlertDialogCancel,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
} from "@/components/ui/alert-dialog"
import { Field, FieldTitle } from "@/components/ui/field"
import { Textarea } from "@/components/ui/textarea"
import { useImportCertificate } from "@/mutations/acm"
interface CertificateImportDialogProps {
open: boolean
onOpenChange: (open: boolean) => void
// Called with the new certificate ARN once the import succeeds.
onImported: (certificateArn: string) => void
}
export function CertificateImportDialog({
open,
onOpenChange,
onImported,
}: CertificateImportDialogProps) {
const [certificate, setCertificate] = useState("")
const [privateKey, setPrivateKey] = useState("")
const [certificateChain, setCertificateChain] = useState("")
const importMutation = useImportCertificate()
const reset = () => {
setCertificate("")
setPrivateKey("")
setCertificateChain("")
importMutation.reset()
}
const handleOpenChange = (next: boolean) => {
if (!next) {
reset()
}
onOpenChange(next)
}
const canSubmit =
certificate.trim().length > 0 && privateKey.trim().length > 0
const handleImport = async () => {
if (!canSubmit) {
return
}
try {
const result = await importMutation.mutateAsync({
certificate,
privateKey,
certificateChain,
})
if (result.CertificateArn) {
onImported(result.CertificateArn)
}
reset()
onOpenChange(false)
} catch {
// surfaced via importMutation.error
}
}
return (
<AlertDialog onOpenChange={handleOpenChange} open={open}>
<AlertDialogContent
className="grid-cols-[minmax(0,1fr)]"
style={{ maxWidth: "36rem", width: "calc(100vw - 2rem)" }}
>
<AlertDialogHeader>
<AlertDialogTitle>Import certificate</AlertDialogTitle>
<AlertDialogDescription>
Paste a PEM-encoded certificate and its private key. The optional
chain is appended for intermediate CAs.
</AlertDialogDescription>
</AlertDialogHeader>
{importMutation.error && (
<ErrorBanner
error={importMutation.error}
msg="Failed to import certificate"
/>
)}
<div className="min-w-0 space-y-4">
<Field>
<FieldTitle>
<label htmlFor="cert-body">Certificate body</label>
</FieldTitle>
<Textarea
className="font-mono text-xs"
id="cert-body"
onChange={(e) => setCertificate(e.target.value)}
placeholder="-----BEGIN CERTIFICATE-----"
rows={5}
value={certificate}
/>
</Field>
<Field>
<FieldTitle>
<label htmlFor="cert-key">Private key</label>
</FieldTitle>
<Textarea
className="font-mono text-xs"
id="cert-key"
onChange={(e) => setPrivateKey(e.target.value)}
placeholder="-----BEGIN PRIVATE KEY-----"
rows={5}
value={privateKey}
/>
</Field>
<Field>
<FieldTitle>
<label htmlFor="cert-chain">Certificate chain (optional)</label>
</FieldTitle>
<Textarea
className="font-mono text-xs"
id="cert-chain"
onChange={(e) => setCertificateChain(e.target.value)}
placeholder="-----BEGIN CERTIFICATE-----"
rows={4}
value={certificateChain}
/>
</Field>
</div>
<AlertDialogFooter>
<AlertDialogCancel disabled={importMutation.isPending}>
Cancel
</AlertDialogCancel>
<AlertDialogAction
disabled={!canSubmit || importMutation.isPending}
onClick={handleImport}
>
{importMutation.isPending ? "Importing…" : "Import"}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
)
}
@@ -1,8 +1,17 @@
import type { TargetGroup } from "@aws-sdk/client-elastic-load-balancing-v2"
import { render, screen } from "@testing-library/react"
import type { CertificateSummary } from "@aws-sdk/client-acm"
import type {
SslPolicy,
TargetGroup,
} from "@aws-sdk/client-elastic-load-balancing-v2"
import { screen } from "@testing-library/react"
import userEvent from "@testing-library/user-event"
import { useForm } from "react-hook-form"
import { describe, expect, it } from "vitest"
import {
createTestQueryClient,
renderWithClient,
} from "@/test/elbv2-integration"
import type { CreateListenerFormData } from "@/types/elbv2"
import { ListenerForm } from "./listener-form"
@@ -24,29 +33,116 @@ const TGS: TargetGroup[] = [
},
]
function Harness({ targetGroups }: { targetGroups: TargetGroup[] }) {
const CERTS: CertificateSummary[] = [
{
CertificateArn: "arn:aws:acm:ap-southeast-2:1:certificate/abc-123",
DomainName: "example.com",
},
]
const POLICIES: SslPolicy[] = [
{ Name: "ELBSecurityPolicy-2016-08" },
{ Name: "ELBSecurityPolicy-TLS13-1-2-2021-06" },
]
function Harness({
targetGroups,
protocol = "HTTP",
}: {
targetGroups: TargetGroup[]
protocol?: "HTTP" | "HTTPS"
}) {
const form = useForm<CreateListenerFormData>({
defaultValues: {
protocol: "HTTP",
port: 80,
protocol,
port: protocol === "HTTPS" ? 443 : 80,
defaultTargetGroupArn: "",
},
})
return <ListenerForm form={form} targetGroups={targetGroups} />
return (
<ListenerForm
certificates={CERTS}
form={form}
sslPolicies={POLICIES}
targetGroups={targetGroups}
/>
)
}
function renderHarness(props: Parameters<typeof Harness>[0]) {
return renderWithClient(<Harness {...props} />, createTestQueryClient())
}
describe("ListenerForm", () => {
it("renders protocol, port, and target-group selectors", () => {
render(<Harness targetGroups={TGS} />)
renderHarness({ targetGroups: TGS })
expect(screen.getByLabelText("Protocol")).toBeInTheDocument()
expect(screen.getByLabelText("Port")).toBeInTheDocument()
expect(screen.getByLabelText("Default target group")).toBeInTheDocument()
})
it("shows empty-state message when no target groups available", () => {
render(<Harness targetGroups={[]} />)
renderHarness({ targetGroups: [] })
expect(
screen.getByText(/no target groups available in this vpc/i),
).toBeInTheDocument()
})
it("hides certificate and security-policy fields for HTTP", () => {
renderHarness({ targetGroups: TGS, protocol: "HTTP" })
expect(screen.queryByLabelText("Certificate")).not.toBeInTheDocument()
expect(screen.queryByLabelText("Security policy")).not.toBeInTheDocument()
})
it("reveals certificate and security-policy fields for HTTPS", () => {
renderHarness({ targetGroups: TGS, protocol: "HTTPS" })
expect(screen.getByLabelText("Certificate")).toBeInTheDocument()
expect(screen.getByLabelText("Security policy")).toBeInTheDocument()
expect(
screen.getByRole("button", { name: /import certificate/i }),
).toBeInTheDocument()
})
// Guards the React Compiler regression: the TLS fields are gated on a
// watched value. A plain `watch("protocol")` read gets memoised once by the
// compiler and never updates, so switching protocol at runtime never reveals
// the fields. `useWatch` keeps the subscription reactive — this test fails if
// it regresses to `watch`.
it("reveals certificate fields when protocol switches HTTP -> HTTPS at runtime", async () => {
function ToggleHarness() {
const form = useForm<CreateListenerFormData>({
defaultValues: {
protocol: "HTTP",
port: 80,
defaultTargetGroupArn: "",
},
})
return (
<>
<button
onClick={() => form.setValue("protocol", "HTTPS")}
type="button"
>
go-https
</button>
<ListenerForm
certificates={CERTS}
form={form}
sslPolicies={POLICIES}
targetGroups={TGS}
/>
</>
)
}
renderWithClient(<ToggleHarness />, createTestQueryClient())
expect(screen.queryByLabelText("Certificate")).not.toBeInTheDocument()
await userEvent.click(screen.getByRole("button", { name: "go-https" }))
await expect(
screen.findByLabelText("Certificate"),
).resolves.toBeInTheDocument()
expect(screen.getByLabelText("Security policy")).toBeInTheDocument()
})
})
@@ -1,7 +1,14 @@
import type { TargetGroup } from "@aws-sdk/client-elastic-load-balancing-v2"
import type { CertificateSummary } from "@aws-sdk/client-acm"
import type {
SslPolicy,
TargetGroup,
} from "@aws-sdk/client-elastic-load-balancing-v2"
import { useState } from "react"
import type { UseFormReturn } from "react-hook-form"
import { Controller } from "react-hook-form"
import { Controller, useWatch } from "react-hook-form"
import { CertificateImportDialog } from "@/components/elbv2/certificate-import-dialog"
import { Button } from "@/components/ui/button"
import { Field, FieldError, FieldTitle } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
import {
@@ -11,20 +18,64 @@ import {
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
import type { CreateListenerFormData } from "@/types/elbv2"
import { type CreateListenerFormData, DEFAULT_SSL_POLICY } from "@/types/elbv2"
interface ListenerFormProps {
form: UseFormReturn<CreateListenerFormData>
targetGroups: TargetGroup[]
certificates?: CertificateSummary[]
sslPolicies?: SslPolicy[]
}
export function ListenerForm({ form, targetGroups }: ListenerFormProps) {
const HTTP_PORT = 80
const HTTPS_PORT = 443
function certLabel(cert: CertificateSummary): string {
const id = cert.CertificateArn?.split("/").pop() ?? cert.CertificateArn ?? ""
return cert.DomainName ? `${cert.DomainName} · ${id}` : id
}
export function ListenerForm({
form,
targetGroups,
certificates = [],
sslPolicies = [],
}: ListenerFormProps) {
const {
control,
register,
getValues,
setValue,
formState: { errors },
} = form
const [importOpen, setImportOpen] = useState(false)
const protocol = useWatch({ control, name: "protocol" })
const isHttps = protocol === "HTTPS"
// Side-effects of a protocol switch, applied after the field's own onChange:
// adjust the default port (only when still on the other protocol's default)
// and toggle the TLS fields. Moving to HTTP clears cert + policy so the
// server doesn't reject them.
const applyProtocolDefaults = (next: "HTTP" | "HTTPS" | null) => {
const current = getValues("port")
if (next === "HTTPS") {
if (current === HTTP_PORT) {
setValue("port", HTTPS_PORT)
}
if (!getValues("sslPolicy")) {
setValue("sslPolicy", DEFAULT_SSL_POLICY)
}
} else {
if (current === HTTPS_PORT) {
setValue("port", HTTP_PORT)
}
setValue("certificateArn", undefined)
setValue("sslPolicy", undefined)
}
}
return (
<>
<Field>
@@ -35,12 +86,19 @@ export function ListenerForm({ form, targetGroups }: ListenerFormProps) {
control={control}
name="protocol"
render={({ field }) => (
<Select onValueChange={field.onChange} value={field.value}>
<Select
onValueChange={(next: "HTTP" | "HTTPS" | null) => {
field.onChange(next)
applyProtocolDefaults(next)
}}
value={field.value}
>
<SelectTrigger className="w-full" id="listener-protocol">
<SelectValue />
</SelectTrigger>
<SelectContent>
<SelectItem value="HTTP">HTTP</SelectItem>
<SelectItem value="HTTPS">HTTPS</SelectItem>
</SelectContent>
</Select>
)}
@@ -55,13 +113,103 @@ export function ListenerForm({ form, targetGroups }: ListenerFormProps) {
aria-invalid={!!errors.port}
id="listener-port"
inputMode="numeric"
placeholder="80"
placeholder={isHttps ? "443" : "80"}
type="number"
{...register("port", { valueAsNumber: true })}
/>
<FieldError errors={[errors.port]} />
</Field>
{isHttps && (
<>
<Field>
<FieldTitle>
<label htmlFor="listener-certificate">Certificate</label>
</FieldTitle>
<Controller
control={control}
name="certificateArn"
render={({ field }) => (
<Select
onValueChange={field.onChange}
value={field.value ?? ""}
>
<SelectTrigger
aria-invalid={!!errors.certificateArn}
className="w-full"
id="listener-certificate"
>
<SelectValue placeholder="Select certificate" />
</SelectTrigger>
<SelectContent>
{certificates.map((cert) => (
<SelectItem
key={cert.CertificateArn}
value={cert.CertificateArn ?? ""}
>
{certLabel(cert)}
</SelectItem>
))}
</SelectContent>
</Select>
)}
/>
<FieldError errors={[errors.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>
<Field>
<FieldTitle>
<label htmlFor="listener-ssl-policy">Security policy</label>
</FieldTitle>
<Controller
control={control}
name="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>
<CertificateImportDialog
onImported={(arn) =>
setValue("certificateArn", arn, { shouldValidate: true })
}
onOpenChange={setImportOpen}
open={importOpen}
/>
</>
)}
<Field>
<FieldTitle>
<label htmlFor="listener-default-tg">Default target group</label>
@@ -8,6 +8,7 @@ const mockSend = vi.fn()
vi.mock("@/lib/awsClient", () => ({
getElbv2Client: () => ({ send: mockSend }),
getAcmClient: () => ({ send: mockSend }),
}))
import { ListenersTab } from "./listeners-tab"
@@ -27,6 +28,8 @@ function createWrapper(queryClient: QueryClient) {
function seedClient(opts: {
listeners?: unknown
targetGroups?: unknown
certificates?: unknown
sslPolicies?: unknown
}): QueryClient {
const queryClient = new QueryClient({
defaultOptions: {
@@ -46,6 +49,14 @@ function seedClient(opts: {
["elbv2", "targetGroups"],
opts.targetGroups ?? { TargetGroups: [] },
)
queryClient.setQueryData(
["acm", "certificates"],
opts.certificates ?? { CertificateSummaryList: [] },
)
queryClient.setQueryData(
["elbv2", "sslPolicies"],
opts.sslPolicies ?? { SslPolicies: [] },
)
return queryClient
}
@@ -244,4 +255,73 @@ describe("ListenersTab", () => {
DefaultActions: [{ Type: "forward", TargetGroupArn: TG_ARN_A }],
})
})
it("edits an HTTPS listener, prefilling cert + policy, and ModifyListener carries TLS fields", async () => {
const CERT_ARN = "arn:aws:acm:ap-southeast-2:1:certificate/abc-123"
const queryClient = seedClient({
listeners: {
Listeners: [
{
ListenerArn: "arn:listener/1",
LoadBalancerArn: LB_ARN,
Protocol: "HTTPS",
Port: 443,
SslPolicy: "ELBSecurityPolicy-2016-08",
Certificates: [{ CertificateArn: CERT_ARN, IsDefault: true }],
DefaultActions: [{ Type: "forward", TargetGroupArn: TG_ARN_A }],
},
],
},
targetGroups: {
TargetGroups: [
{
TargetGroupArn: TG_ARN_A,
TargetGroupName: "tg-a",
Protocol: "HTTP",
Port: 80,
VpcId: "vpc-aaa",
},
],
},
certificates: {
CertificateSummaryList: [
{ CertificateArn: CERT_ARN, DomainName: "example.com" },
],
},
sslPolicies: { SslPolicies: [{ Name: "ELBSecurityPolicy-2016-08" }] },
})
mockSend.mockResolvedValue({})
const user = userEvent.setup()
render(<ListenersTab loadBalancerArn={LB_ARN} vpcId="vpc-aaa" />, {
wrapper: createWrapper(queryClient),
})
// The TLS column summarises the policy + cert id for HTTPS listeners.
expect(
screen.getByText(/ELBSecurityPolicy-2016-08 · abc-123/),
).toBeInTheDocument()
await user.click(screen.getByLabelText("Edit listener HTTPS:443"))
await expect(
screen.findByRole("alertdialog", { name: /edit listener/i }),
).resolves.toBeInTheDocument()
// The HTTPS-only fields are prefilled from the listener record.
expect(screen.getByLabelText("Certificate")).toBeInTheDocument()
expect(screen.getByLabelText("Security policy")).toBeInTheDocument()
const before = mockSend.mock.calls.length
await user.click(screen.getByRole("button", { name: /save changes/i }))
await waitFor(() =>
expect(mockSend.mock.calls.length).toBeGreaterThan(before),
)
const call = mockSend.mock.calls[before]?.[0]
expect(call.input).toStrictEqual({
ListenerArn: "arn:listener/1",
Protocol: "HTTPS",
Port: 443,
DefaultActions: [{ Type: "forward", TargetGroupArn: TG_ARN_A }],
Certificates: [{ CertificateArn: CERT_ARN }],
SslPolicy: "ELBSecurityPolicy-2016-08",
})
})
})

Some files were not shown because too many files have changed in this diff Show More