mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-19 19:01:42 +00:00
fix: form error handling
This commit is contained in:
@@ -112,6 +112,11 @@ func (s *VolumeServiceImpl) DescribeVolumes(input *ec2.DescribeVolumesInput) (*e
|
||||
// Extract volume ID from prefix (remove trailing slash)
|
||||
volumeID := strings.TrimSuffix(prefixStr, "/")
|
||||
|
||||
// Skip internal sub-volumes (EFI and cloud-init partitions)
|
||||
if strings.HasSuffix(volumeID, "-efi") || strings.HasSuffix(volumeID, "-cloudinit") {
|
||||
continue
|
||||
}
|
||||
|
||||
vol, err := s.getVolumeByID(volumeID)
|
||||
if err != nil {
|
||||
slog.Error("Failed to get volume", "volumeId", volumeID, "err", err)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as k,aG as v,aH as B,aC as $,j as s,aB as C,aI as P,aJ as y,aE as K}from"./index.js";import{u as F}from"./useSuspenseQuery.js";import{B as L}from"./back-link.js";import{F as S,O as E,U as I}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function J(){const e=k.c(20),{bucket:n,_splat:b}=v.useParams(),a=B(b||""),{data:o}=F($(n,a));let c;e[0]!==o.Contents?(c=o.Contents||[],e[0]=o.Contents,e[1]=c):c=e[1];const r=c;let h;e[2]!==o.CommonPrefixes?(h=o.CommonPrefixes||[],e[2]=o.CommonPrefixes,e[3]=h):h=e[3];const i=h,x=a.split("/").filter(Boolean),N=[{name:n,path:`/s3/ls/${n}`},...x.map((t,l)=>{const m=`${x.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${m}`}})],g=x.length>1?`/s3/ls/${n}/${x.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let d;e[4]!==g?(d=s.jsx(L,{to:g,children:"Back"}),e[4]=g,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==a?(f=s.jsx(I,{bucket:n,prefix:a}),e[6]=n,e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==i||e[11]!==a?(p=i.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:i.map(t=>{if(!t.Prefix)return null;const l=C(P(t.Prefix,a)),m=y(t.Prefix,a);return s.jsx(S,{bucketName:n,folderName:l,fullPrefix:m},t.Prefix)})})]}),e[9]=n,e[10]=i,e[11]=a,e[12]=p):p=e[12];let u;e[13]!==n||e[14]!==r||e[15]!==a?(u=r.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),r.map(t=>{if(!t.Key)return null;const l=P(t.Key,a),m=y(t.Key,a);return s.jsx(E,{bucketName:n,displayName:l,fullKey:m,object:t},t.Key)})]}),e[13]=n,e[14]=r,e[15]=a,e[16]=u):u=e[16];let j;return e[17]!==i.length||e[18]!==r.length?(j=r.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[17]=i.length,e[18]=r.length,e[19]=j):j=e[19],s.jsxs(s.Fragment,{children:[d,s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:N.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===N.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(K,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),f]})}),p,u,j]})}export{J as component};
|
||||
import{c as k,aF as v,aG as B,aB as $,j as s,aA as C,aH as P,aI as y,aD as F}from"./index.js";import{u as K}from"./useSuspenseQuery.js";import{B as L}from"./back-link.js";import{F as S,O as I,U as O}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function H(){const e=k.c(20),{bucket:n,_splat:b}=v.useParams(),a=B(b||""),{data:o}=K($(n,a));let c;e[0]!==o.Contents?(c=o.Contents||[],e[0]=o.Contents,e[1]=c):c=e[1];const r=c;let h;e[2]!==o.CommonPrefixes?(h=o.CommonPrefixes||[],e[2]=o.CommonPrefixes,e[3]=h):h=e[3];const i=h,x=a.split("/").filter(Boolean),N=[{name:n,path:`/s3/ls/${n}`},...x.map((t,l)=>{const m=`${x.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${m}`}})],g=x.length>1?`/s3/ls/${n}/${x.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let d;e[4]!==g?(d=s.jsx(L,{to:g,children:"Back"}),e[4]=g,e[5]=d):d=e[5];let f;e[6]!==n||e[7]!==a?(f=s.jsx(O,{bucket:n,prefix:a}),e[6]=n,e[7]=a,e[8]=f):f=e[8];let p;e[9]!==n||e[10]!==i||e[11]!==a?(p=i.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:i.map(t=>{if(!t.Prefix)return null;const l=C(P(t.Prefix,a)),m=y(t.Prefix,a);return s.jsx(S,{bucketName:n,folderName:l,fullPrefix:m},t.Prefix)})})]}),e[9]=n,e[10]=i,e[11]=a,e[12]=p):p=e[12];let u;e[13]!==n||e[14]!==r||e[15]!==a?(u=r.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),r.map(t=>{if(!t.Key)return null;const l=P(t.Key,a),m=y(t.Key,a);return s.jsx(I,{bucketName:n,displayName:l,fullKey:m,object:t},t.Key)})]}),e[13]=n,e[14]=r,e[15]=a,e[16]=u):u=e[16];let j;return e[17]!==i.length||e[18]!==r.length?(j=r.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[17]=i.length,e[18]=r.length,e[19]=j):j=e[19],s.jsxs(s.Fragment,{children:[d,s.jsx("div",{className:"mb-6",children:s.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:N.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===N.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(F,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),f]})}),p,u,j]})}export{H as component};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as O,bn as q,u as D,bo as J,j as s,bp as K,B as M}from"./index.js";import{a as T,u as U,I as W}from"./zod.js";import{u as X}from"./useSuspenseQuery.js";import{B as A}from"./back-link.js";import{E as Y,L as Z}from"./error-banner.js";import{P as ee}from"./page-heading.js";import{c as se}from"./ec2.js";import"./useMutation.js";function ce(){const e=O.c(57),{id:k}=q.useParams(),o=D();let N;e[0]!==k?(N=K(k),e[0]=k,e[1]=N):N=e[1];const{data:Q}=X(N),L=Q.Volumes?.[0],t=L?.VolumeId,l=se(),i=L?.Size??1;let a;e[2]!==i?(a=T(J.refine(r=>r.size>i,{message:`New size must be greater than current size (${i} GiB)`,path:["size"]})),e[2]=i,e[3]=a):a=e[3];let n;e[4]!==i?(n={size:i},e[4]=i,e[5]=n):n=e[5];let S;e[6]!==a||e[7]!==n?(S={resolver:a,defaultValues:n},e[6]=a,e[7]=n,e[8]=S):S=e[8];const{handleSubmit:F,register:$,formState:H}=U(S),{errors:B,isSubmitting:w}=H;if(!t){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(s.Fragment,{children:[s.jsx(A,{to:"/ec2/describe-volumes",children:"Back to volumes"}),s.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[9]=r):r=e[9],r}let V;e[10]!==l||e[11]!==o||e[12]!==t?(V=async r=>{await l.mutateAsync({...r,volumeId:t}),o({to:"/ec2/describe-volumes/$id",params:{id:t}})},e[10]=l,e[11]=o,e[12]=t,e[13]=V):V=e[13];const E=V;let m,c;e[14]!==t?(m=s.jsx(A,{params:{id:t},to:"/ec2/describe-volumes/$id",children:"Back to volume"}),c=s.jsx(ee,{subtitle:t,title:"Resize Volume"}),e[14]=t,e[15]=m,e[16]=c):(m=e[15],c=e[16]);let u;e[17]!==l.error?(u=l.error&&s.jsx(Y,{error:l.error,msg:"Failed to resize volume"}),e[17]=l.error,e[18]=u):u=e[18];let d;e[19]!==F||e[20]!==E?(d=F(E),e[19]=F,e[20]=E,e[21]=d):d=e[21];let f;e[22]!==i?(f=s.jsx("div",{className:"space-y-2",children:s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Current size: ",i," GiB"]})}),e[22]=i,e[23]=f):f=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=s.jsx(Z,{htmlFor:"size",children:"New size (GiB)"}),e[24]=P):P=e[24];const I=i+1;let p;e[25]!==$?(p=$("size",{valueAsNumber:!0}),e[25]=$,e[26]=p):p=e[26];let x;e[27]!==I||e[28]!==p?(x=s.jsx(W,{id:"size",min:I,type:"number",...p}),e[27]=I,e[28]=p,e[29]=x):x=e[29];let b;e[30]!==B.size?(b=B.size&&s.jsx("p",{className:"text-destructive text-sm",children:B.size.message}),e[30]=B.size,e[31]=b):b=e[31];let h;e[32]!==x||e[33]!==b?(h=s.jsxs("div",{className:"space-y-2",children:[P,x,b]}),e[32]=x,e[33]=b,e[34]=h):h=e[34];const _=w||l.isPending;let z;e[35]!==o||e[36]!==t?(z=()=>o({to:"/ec2/describe-volumes/$id",params:{id:t}}),e[35]=o,e[36]=t,e[37]=z):z=e[37];let g;e[38]!==_||e[39]!==z?(g=s.jsx(M,{disabled:_,onClick:z,type:"button",variant:"outline",children:"Cancel"}),e[38]=_,e[39]=z,e[40]=g):g=e[40];const C=w||l.isPending,G=w||l.isPending?"Resizing…":"Resize Volume";let j;e[41]!==C||e[42]!==G?(j=s.jsx(M,{disabled:C,type:"submit",children:G}),e[41]=C,e[42]=G,e[43]=j):j=e[43];let v;e[44]!==g||e[45]!==j?(v=s.jsxs("div",{className:"flex gap-2",children:[g,j]}),e[44]=g,e[45]=j,e[46]=v):v=e[46];let y;e[47]!==f||e[48]!==h||e[49]!==v||e[50]!==d?(y=s.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:d,children:[f,h,v]}),e[47]=f,e[48]=h,e[49]=v,e[50]=d,e[51]=y):y=e[51];let R;return e[52]!==y||e[53]!==m||e[54]!==c||e[55]!==u?(R=s.jsxs(s.Fragment,{children:[m,c,u,y]}),e[52]=y,e[53]=m,e[54]=c,e[55]=u,e[56]=R):R=e[56],R}export{ce as component};
|
||||
import{c as T,bm as q,u as D,bn as J,j as s,bo as K,B as Q}from"./index.js";import{a as U,u as W,I as X,F as Y,b as Z,c as ee}from"./field.js";import{u as se}from"./useSuspenseQuery.js";import{B as H}from"./back-link.js";import{E as te}from"./error-banner.js";import{P as ie}from"./page-heading.js";import{c as le}from"./ec2.js";import"./useMutation.js";function fe(){const e=T.c(58),{id:R}=q.useParams(),o=D();let S;e[0]!==R?(S=K(R),e[0]=R,e[1]=S):S=e[1];const{data:L}=se(S),A=L.Volumes?.[0],t=A?.VolumeId,l=le(),i=A?.Size??1;let n;e[2]!==i?(n=U(J.refine(r=>r.size>i,{message:`New size must be greater than current size (${i} GiB)`,path:["size"]})),e[2]=i,e[3]=n):n=e[3];let a;e[4]!==i?(a={size:i},e[4]=i,e[5]=a):a=e[5];let B;e[6]!==n||e[7]!==a?(B={resolver:n,defaultValues:a},e[6]=n,e[7]=a,e[8]=B):B=e[8];const{handleSubmit:k,register:E,formState:O}=W(B),{errors:V,isSubmitting:$}=O;if(!t){let r;return e[9]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(s.Fragment,{children:[s.jsx(H,{to:"/ec2/describe-volumes",children:"Back to volumes"}),s.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[9]=r):r=e[9],r}let F;e[10]!==l||e[11]!==o||e[12]!==t?(F=async r=>{await l.mutateAsync({...r,volumeId:t}),o({to:"/ec2/describe-volumes/$id",params:{id:t}})},e[10]=l,e[11]=o,e[12]=t,e[13]=F):F=e[13];const w=F;let m,c;e[14]!==t?(m=s.jsx(H,{params:{id:t},to:"/ec2/describe-volumes/$id",children:"Back to volume"}),c=s.jsx(ie,{subtitle:t,title:"Resize Volume"}),e[14]=t,e[15]=m,e[16]=c):(m=e[15],c=e[16]);let u;e[17]!==l.error?(u=l.error&&s.jsx(te,{error:l.error,msg:"Failed to resize volume"}),e[17]=l.error,e[18]=u):u=e[18];let d;e[19]!==k||e[20]!==w?(d=k(w),e[19]=k,e[20]=w,e[21]=d):d=e[21];let f;e[22]!==i?(f=s.jsx("div",{className:"space-y-2",children:s.jsxs("p",{className:"text-muted-foreground text-sm",children:["Current size: ",i," GiB"]})}),e[22]=i,e[23]=f):f=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(Z,{children:s.jsx("label",{htmlFor:"size",children:"New size (GiB)"})}),e[24]=N):N=e[24];const I=!!V.size,_=i+1;let p;e[25]!==E?(p=E("size",{valueAsNumber:!0}),e[25]=E,e[26]=p):p=e[26];let x;e[27]!==I||e[28]!==_||e[29]!==p?(x=s.jsx(X,{"aria-invalid":I,id:"size",min:_,type:"number",...p}),e[27]=I,e[28]=_,e[29]=p,e[30]=x):x=e[30];let b;e[31]!==V.size?(b=s.jsx(Y,{errors:[V.size]}),e[31]=V.size,e[32]=b):b=e[32];let h;e[33]!==x||e[34]!==b?(h=s.jsxs(ee,{children:[N,x,b]}),e[33]=x,e[34]=b,e[35]=h):h=e[35];const C=$||l.isPending;let j;e[36]!==o||e[37]!==t?(j=()=>o({to:"/ec2/describe-volumes/$id",params:{id:t}}),e[36]=o,e[37]=t,e[38]=j):j=e[38];let z;e[39]!==C||e[40]!==j?(z=s.jsx(Q,{disabled:C,onClick:j,type:"button",variant:"outline",children:"Cancel"}),e[39]=C,e[40]=j,e[41]=z):z=e[41];const G=$||l.isPending,M=$||l.isPending?"Resizing…":"Resize Volume";let g;e[42]!==G||e[43]!==M?(g=s.jsx(Q,{disabled:G,type:"submit",children:M}),e[42]=G,e[43]=M,e[44]=g):g=e[44];let v;e[45]!==z||e[46]!==g?(v=s.jsxs("div",{className:"flex gap-2",children:[z,g]}),e[45]=z,e[46]=g,e[47]=v):v=e[47];let y;e[48]!==f||e[49]!==h||e[50]!==v||e[51]!==d?(y=s.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:d,children:[f,h,v]}),e[48]=f,e[49]=h,e[50]=v,e[51]=d,e[52]=y):y=e[52];let P;return e[53]!==y||e[54]!==m||e[55]!==c||e[56]!==u?(P=s.jsxs(s.Fragment,{children:[m,c,u,y]}),e[53]=y,e[54]=m,e[55]=c,e[56]=u,e[57]=P):P=e[57],P}export{fe as component};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as _,bx as E,by as K,j as l,aE as R,bz as k,B as z,bp as Z}from"./index.js";import{u as H}from"./useSuspenseQuery.js";import{B as C}from"./back-link.js";import{D as p,a as s}from"./detail-row.js";import{P}from"./page-heading.js";import{B as $}from"./badge.js";function M(){const e=_.c(49),{id:D}=E.useParams();let h;e[0]!==D?(h=Z(D),e[0]=D,e[1]=h):h=e[1];const{data:N}=H(h),t=N.Volumes?.[0];if(!t?.VolumeId){let T;return e[2]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsxs(l.Fragment,{children:[l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),l.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[2]=T):T=e[2],T}let V;e[3]!==t.CreateTime?(V=K(t.CreateTime),e[3]=t.CreateTime,e[4]=V):V=e[4];const A=V;let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[5]=y):y=e[5];let a;e[6]!==t.State||e[7]!==t.VolumeId?(a=t.State==="available"?l.jsx(R,{className:k({variant:"outline"}),params:{id:t.VolumeId},to:"/ec2/modify-volume/$id",children:"Resize Volume"}):l.jsx(z,{disabled:!0,variant:"outline",children:"Resize Volume"}),e[6]=t.State,e[7]=t.VolumeId,e[8]=a):a=e[8];let i;e[9]!==t.State?(i=t.State&&l.jsx($,{variant:t.State==="available"?"default":"outline",children:t.State}),e[9]=t.State,e[10]=i):i=e[10];let o;e[11]!==a||e[12]!==i?(o=l.jsxs("div",{className:"flex items-center gap-2",children:[a,i]}),e[11]=a,e[12]=i,e[13]=o):o=e[13];let n;e[14]!==o||e[15]!==t.VolumeId?(n=l.jsx(P,{actions:o,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[14]=o,e[15]=t.VolumeId,e[16]=n):n=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(p.Header,{children:"Volume Information"}),e[17]=I):I=e[17];let m;e[18]!==t.VolumeId?(m=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[18]=t.VolumeId,e[19]=m):m=e[19];const B=`${t.Size} GiB`;let r;e[20]!==B?(r=l.jsx(s,{label:"Size",value:B}),e[20]=B,e[21]=r):r=e[21];let c;e[22]!==t.VolumeType?(c=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[22]=t.VolumeType,e[23]=c):c=e[23];let u;e[24]!==t.State?(u=l.jsx(s,{label:"State",value:t.State}),e[24]=t.State,e[25]=u):u=e[25];let d;e[26]!==t.AvailabilityZone?(d=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[26]=t.AvailabilityZone,e[27]=d):d=e[27];let f;e[28]!==A?(f=l.jsx(s,{label:"Create Time",value:A}),e[28]=A,e[29]=f):f=e[29];const g=t.Encrypted?"Yes":"No";let x;e[30]!==g?(x=l.jsx(s,{label:"Encrypted",value:g}),e[30]=g,e[31]=x):x=e[31];let b;e[32]!==t.KmsKeyId?(b=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[32]=t.KmsKeyId,e[33]=b):b=e[33];let j;e[34]!==r||e[35]!==c||e[36]!==u||e[37]!==d||e[38]!==f||e[39]!==x||e[40]!==b||e[41]!==m?(j=l.jsxs(p,{children:[I,l.jsxs(p.Content,{children:[m,r,c,u,d,f,x,b]})]}),e[34]=r,e[35]=c,e[36]=u,e[37]=d,e[38]=f,e[39]=x,e[40]=b,e[41]=m,e[42]=j):j=e[42];let v;e[43]!==t.Attachments?(v=t.Attachments&&t.Attachments.length>0&&l.jsxs(p,{children:[l.jsx(p.Header,{children:"Attachments"}),l.jsx(p.Content,{children:t.Attachments.map(F)})]}),e[43]=t.Attachments,e[44]=v):v=e[44];let S;return e[45]!==j||e[46]!==v||e[47]!==n?(S=l.jsxs(l.Fragment,{children:[y,l.jsxs("div",{className:"space-y-6",children:[n,j,v]})]}),e[45]=j,e[46]=v,e[47]=n,e[48]=S):S=e[48],S}function F(e){return l.jsxs("div",{className:"space-y-2 border-b pb-2 last:border-0 last:pb-0",children:[l.jsx(s,{label:"Instance ID",value:e.InstanceId}),l.jsx(s,{label:"Device",value:e.Device}),l.jsx(s,{label:"Status",value:e.State}),l.jsx(s,{label:"Attach Time",value:K(e.AttachTime)}),l.jsx(s,{label:"Delete on Termination",value:e.DeleteOnTermination?"Yes":"No"})]},e.InstanceId)}export{M as component};
|
||||
import{c as N,bx as R,by as K,j as l,aD as k,bz as z,B as E,bo as Z}from"./index.js";import{u as H}from"./useSuspenseQuery.js";import{B as C}from"./back-link.js";import{D as p,a as s}from"./detail-row.js";import{P}from"./page-heading.js";import{B as $}from"./badge.js";function M(){const e=N.c(49),{id:T}=R.useParams();let V;e[0]!==T?(V=Z(T),e[0]=T,e[1]=V):V=e[1];const{data:_}=H(V),t=_.Volumes?.[0];if(!t?.VolumeId){let D;return e[2]===Symbol.for("react.memo_cache_sentinel")?(D=l.jsxs(l.Fragment,{children:[l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),l.jsx("p",{className:"text-muted-foreground",children:"Volume not found."})]}),e[2]=D):D=e[2],D}let h;e[3]!==t.CreateTime?(h=K(t.CreateTime),e[3]=t.CreateTime,e[4]=h):h=e[4];const A=h;let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(C,{to:"/ec2/describe-volumes",children:"Back to volumes"}),e[5]=y):y=e[5];let a;e[6]!==t.State||e[7]!==t.VolumeId?(a=t.State==="available"?l.jsx(k,{className:z({variant:"outline"}),params:{id:t.VolumeId},to:"/ec2/modify-volume/$id",children:"Resize Volume"}):l.jsx(E,{disabled:!0,variant:"outline",children:"Resize Volume"}),e[6]=t.State,e[7]=t.VolumeId,e[8]=a):a=e[8];let i;e[9]!==t.State?(i=t.State&&l.jsx($,{variant:t.State==="available"?"default":"outline",children:t.State}),e[9]=t.State,e[10]=i):i=e[10];let o;e[11]!==a||e[12]!==i?(o=l.jsxs("div",{className:"flex items-center gap-2",children:[a,i]}),e[11]=a,e[12]=i,e[13]=o):o=e[13];let n;e[14]!==o||e[15]!==t.VolumeId?(n=l.jsx(P,{actions:o,subtitle:"EC2 Volume Details",title:t.VolumeId}),e[14]=o,e[15]=t.VolumeId,e[16]=n):n=e[16];let I;e[17]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(p.Header,{children:"Volume Information"}),e[17]=I):I=e[17];let m;e[18]!==t.VolumeId?(m=l.jsx(s,{label:"Volume ID",value:t.VolumeId}),e[18]=t.VolumeId,e[19]=m):m=e[19];const B=`${t.Size} GiB`;let r;e[20]!==B?(r=l.jsx(s,{label:"Size",value:B}),e[20]=B,e[21]=r):r=e[21];let u;e[22]!==t.VolumeType?(u=l.jsx(s,{label:"Volume Type",value:t.VolumeType}),e[22]=t.VolumeType,e[23]=u):u=e[23];let c;e[24]!==t.State?(c=l.jsx(s,{label:"State",value:t.State}),e[24]=t.State,e[25]=c):c=e[25];let d;e[26]!==t.AvailabilityZone?(d=l.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e[26]=t.AvailabilityZone,e[27]=d):d=e[27];let f;e[28]!==A?(f=l.jsx(s,{label:"Create Time",value:A}),e[28]=A,e[29]=f):f=e[29];const g=t.Encrypted?"Yes":"No";let x;e[30]!==g?(x=l.jsx(s,{label:"Encrypted",value:g}),e[30]=g,e[31]=x):x=e[31];let j;e[32]!==t.KmsKeyId?(j=l.jsx(s,{label:"KMS Key ID",value:t.KmsKeyId}),e[32]=t.KmsKeyId,e[33]=j):j=e[33];let v;e[34]!==r||e[35]!==u||e[36]!==c||e[37]!==d||e[38]!==f||e[39]!==x||e[40]!==j||e[41]!==m?(v=l.jsxs(p,{children:[I,l.jsxs(p.Content,{children:[m,r,u,c,d,f,x,j]})]}),e[34]=r,e[35]=u,e[36]=c,e[37]=d,e[38]=f,e[39]=x,e[40]=j,e[41]=m,e[42]=v):v=e[42];let b;e[43]!==t.Attachments?(b=t.Attachments&&t.Attachments.length>0&&l.jsxs(p,{children:[l.jsx(p.Header,{children:"Attachments"}),t.Attachments.map(F)]}),e[43]=t.Attachments,e[44]=b):b=e[44];let S;return e[45]!==v||e[46]!==b||e[47]!==n?(S=l.jsxs(l.Fragment,{children:[y,l.jsxs("div",{className:"space-y-6",children:[n,v,b]})]}),e[45]=v,e[46]=b,e[47]=n,e[48]=S):S=e[48],S}function F(e){return l.jsxs(p.Content,{children:[l.jsx(s,{label:"Instance ID",value:e.InstanceId}),l.jsx(s,{label:"Device",value:e.Device}),l.jsx(s,{label:"Status",value:e.State}),l.jsx(s,{label:"Attach Time",value:K(e.AttachTime)}),l.jsx(s,{label:"Delete on Termination",value:e.DeleteOnTermination?"Yes":"No"})]},e.InstanceId)}export{M as component};
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{g as o,c as r,j as l,aE as a}from"./index.js";const m=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],x=o("arrow-left",m);function p(i){const e=r.c(7);let s,t;e[0]!==i?({children:s,...t}=i,e[0]=i,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(x,{className:"size-4"}),e[3]=n):n=e[3];let c;return e[4]!==s||e[5]!==t?(c=l.jsxs(a,{className:"mb-6 inline-flex items-center gap-2 text-sm",...t,children:[n,s]}),e[4]=s,e[5]=t,e[6]=c):c=e[6],c}export{p as B};
|
||||
import{f as o,c as r,j as l,aD as a}from"./index.js";const m=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],f=o("arrow-left",m);function p(i){const e=r.c(7);let s,t;e[0]!==i?({children:s,...t}=i,e[0]=i,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let n;e[3]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(f,{className:"size-4"}),e[3]=n):n=e[3];let c;return e[4]!==s||e[5]!==t?(c=l.jsxs(a,{className:"mb-6 inline-flex items-center gap-2 text-sm",...t,children:[n,s]}),e[4]=s,e[5]=t,e[6]=c):c=e[6],c}export{p as B};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as g,a5 as f,a as b,b as p,c6 as m}from"./index.js";const h=p("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-[0.625rem] 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 y(d){const e=g.c(13);let t,i,a,s,r;if(e[0]!==d){const{className:l,variant:u,render:v,...c}=d;t=v,r=u===void 0?"default":u,s=m,i="span",a=f({className:b(h({className:l,variant:r}))},c),e[0]=d,e[1]=t,e[2]=i,e[3]=a,e[4]=s,e[5]=r}else t=e[1],i=e[2],a=e[3],s=e[4],r=e[5];let n;e[6]!==r?(n={slot:"badge",variant:r},e[6]=r,e[7]=n):n=e[7];let o;return e[8]!==t||e[9]!==i||e[10]!==a||e[11]!==n?(o={defaultTagName:i,props:a,render:t,state:n},e[8]=t,e[9]=i,e[10]=a,e[11]=n,e[12]=o):o=e[12],s(o)}export{y as B};
|
||||
import{c as g,a4 as f,a as b,bw as p,c6 as m}from"./index.js";const h=p("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden whitespace-nowrap rounded-full border border-transparent px-2 py-0.5 font-medium text-[0.625rem] 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 y(d){const e=g.c(13);let t,i,a,s,r;if(e[0]!==d){const{className:l,variant:u,render:v,...c}=d;t=v,r=u===void 0?"default":u,s=m,i="span",a=f({className:b(h({className:l,variant:r}))},c),e[0]=d,e[1]=t,e[2]=i,e[3]=a,e[4]=s,e[5]=r}else t=e[1],i=e[2],a=e[3],s=e[4],r=e[5];let n;e[6]!==r?(n={slot:"badge",variant:r},e[6]=r,e[7]=n):n=e[7];let o;return e[8]!==t||e[9]!==i||e[10]!==a||e[11]!==n?(o={defaultTagName:i,props:a,render:t,state:n},e[8]=t,e[9]=i,e[10]=a,e[11]=n,e[12]=o):o=e[12],s(o)}export{y as B};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{g as c}from"./index.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
|
||||
import{f as c}from"./index.js";const e=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],t=c("check",e);export{t as C};
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{g as o}from"./index.js";const a=[["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"}]],e=o("download",a);export{e as D};
|
||||
import{f as o}from"./index.js";const a=[["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"}]],e=o("download",a);export{e as D};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{b3 as c,bP as o,b5 as i,bQ as C,bR as p,bS as f,bT as E,bU as b,bV as P,bW as K,bX as S,bY as w,c as r,bk as u,bZ as m,aF as l,ax as y}from"./index.js";import{u as d}from"./useMutation.js";class q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(C).build(){}class R extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(p).build(){}class $ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(f).build(){}class v extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ModifyVolume",{}).n("EC2Client","ModifyVolumeCommand").sc(E).build(){}class g extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(b).build(){}class Q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(P).build(){}class x extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(K).build(){}class z extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(S).build(){}class T extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(w).build(){}const A=/\s+/;function X(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function F(e){const n=new x({InstanceIds:[e]});return await m().send(n)}function h(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function M(e){const n=new z({InstanceIds:[e]});return await m().send(n)}function j(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:_,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function _(e){const n=new T({InstanceIds:[e]});return await m().send(n)}function H(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function B(e){const n=new g({InstanceIds:[e]});return await m().send(n)}function U(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:D,onSuccess:async s=>{await n.cancelQueries(l);const a=n.getQueryData(l.queryKey);if(a&&s.Instances){const I={Instances:s.Instances,OwnerId:s.OwnerId,RequesterId:s.RequesterId,ReservationId:s.ReservationId,Groups:[]};n.setQueryData(l.queryKey,{...a,Reservations:[...a.Reservations||[],I]})}n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function D(e){const n=new Q({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SecurityGroupIds:e.securityGroupIds,SubnetId:e.subnetId});return await m().send(n)}function Y(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:V,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function V(e){const n=new q({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function Z(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:k,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function k(e){const t=e.publicKeyMaterial.trim().split(A).slice(0,2).join(" "),s=new $({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function J(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:N,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function N(e){const n=new R({KeyPairId:e});return await m().send(n)}function L(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:G,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function G(e){const n=new v({VolumeId:e.volumeId,Size:e.size});return await m().send(n)}export{Y as a,U as b,L as c,J as d,X as e,h as f,H as g,j as h,Z as u};
|
||||
import{b2 as c,bP as o,b4 as i,bQ as C,bR as p,bS as f,bT as E,bU as b,bV as P,bW as K,bX as w,bY as S,c as r,bj as u,bZ as m,aE as l,aw as y}from"./index.js";import{u as d}from"./useMutation.js";class q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","CreateKeyPair",{}).n("EC2Client","CreateKeyPairCommand").sc(C).build(){}class R extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","DeleteKeyPair",{}).n("EC2Client","DeleteKeyPairCommand").sc(p).build(){}class $ extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ImportKeyPair",{}).n("EC2Client","ImportKeyPairCommand").sc(f).build(){}class v extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","ModifyVolume",{}).n("EC2Client","ModifyVolumeCommand").sc(E).build(){}class g extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RebootInstances",{}).n("EC2Client","RebootInstancesCommand").sc(b).build(){}class Q extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","RunInstances",{}).n("EC2Client","RunInstancesCommand").sc(P).build(){}class x extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StartInstances",{}).n("EC2Client","StartInstancesCommand").sc(K).build(){}class z extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","StopInstances",{}).n("EC2Client","StopInstancesCommand").sc(w).build(){}class T extends c.classBuilder().ep(o).m(function(n,t,s,a){return[i(s,n.getEndpointParameterInstructions())]}).s("AmazonEC2","TerminateInstances",{}).n("EC2Client","TerminateInstancesCommand").sc(S).build(){}const A=/\s+/;function W(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:M,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function M(e){const n=new x({InstanceIds:[e]});return await m().send(n)}function X(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:_,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function _(e){const n=new z({InstanceIds:[e]});return await m().send(n)}function h(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:B,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function B(e){const n=new T({InstanceIds:[e]});return await m().send(n)}function H(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function F(e){const n=new g({InstanceIds:[e]});return await m().send(n)}function U(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:D,onSuccess:async s=>{await n.cancelQueries(l);const a=n.getQueryData(l.queryKey);if(a&&s.Instances){const I={Instances:s.Instances,OwnerId:s.OwnerId,RequesterId:s.RequesterId,ReservationId:s.ReservationId,Groups:[]};n.setQueryData(l.queryKey,{...a,Reservations:[...a.Reservations||[],I]})}n.invalidateQueries({queryKey:["ec2","instances"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function D(e){const n=new Q({ImageId:e.imageId,InstanceType:e.instanceType,KeyName:e.keyName,MinCount:e.count,MaxCount:e.count,SecurityGroupIds:e.securityGroupIds,SubnetId:e.subnetId});return await m().send(n)}function Y(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:V,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function V(e){const n=new q({KeyName:e.keyName,KeyType:"rsa"});return await m().send(n)}function Z(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:N,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function N(e){const t=e.publicKeyMaterial.trim().split(A).slice(0,2).join(" "),s=new $({KeyName:e.keyName,PublicKeyMaterial:new TextEncoder().encode(t)});return await m().send(s)}function J(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:k,onSuccess:()=>{n.invalidateQueries(y)}},e[0]=n,e[1]=t):t=e[1],d(t)}async function k(e){const n=new R({KeyPairId:e});return await m().send(n)}function L(){const e=r.c(2),n=u();let t;return e[0]!==n?(t={mutationFn:G,onSuccess:()=>{n.invalidateQueries({queryKey:["ec2","volumes"]})}},e[0]=n,e[1]=t):t=e[1],d(t)}async function G(e){const n=new v({VolumeId:e.volumeId,Size:e.size});return await m().send(n)}export{Y as a,U as b,L as c,J as d,W as e,X as f,H as g,h,Z as u};
|
||||
|
||||
@@ -1 +1 @@
|
||||
import{c as o,a as d,j as n}from"./index.js";function m(a){const e=o.c(8);let s,r;e[0]!==a?({className:s,...r}=a,e[0]=a,e[1]=s,e[2]=r):(s=e[1],r=e[2]);let t;e[3]!==s?(t=d("flex select-none items-center gap-2 font-medium text-sm/relaxed leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",s),e[3]=s,e[4]=t):t=e[4];let l;return e[5]!==r||e[6]!==t?(l=n.jsx("label",{className:t,"data-slot":"label",...r}),e[5]=r,e[6]=t,e[7]=l):l=e[7],l}function p(a){const e=o.c(7),{msg:s,error:r}=a;let t;e[0]!==s?(t=s&&n.jsx("h2",{className:"text-destructive text-sm",children:s}),e[0]=s,e[1]=t):t=e[1];let l;e[2]!==r?(l=r&&n.jsx("p",{className:"text-destructive text-sm",children:r.message}),e[2]=r,e[3]=l):l=e[3];let i;return e[4]!==t||e[5]!==l?(i=n.jsxs("div",{className:"mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4",children:[t,l]}),e[4]=t,e[5]=l,e[6]=i):i=e[6],i}export{p as E,m as L};
|
||||
import{c as o,j as m}from"./index.js";function n(l){const e=o.c(7),{msg:r,error:c}=l;let t;e[0]!==r?(t=r&&m.jsx("h2",{className:"text-destructive text-sm",children:r}),e[0]=r,e[1]=t):t=e[1];let s;e[2]!==c?(s=c&&m.jsx("p",{className:"text-destructive text-sm",children:c.message}),e[2]=c,e[3]=s):s=e[3];let i;return e[4]!==t||e[5]!==s?(i=m.jsxs("div",{className:"mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4",children:[t,s]}),e[4]=t,e[5]=s,e[6]=i):i=e[6],i}export{n as E};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{c as R,u as T,j as t,i as z,B as w}from"./index.js";import{a as D,u as O,I as $}from"./zod.js";import{B as q}from"./back-link.js";import{E as G,L}from"./error-banner.js";import{P as J}from"./page-heading.js";import{T as U}from"./textarea.js";import{u as V}from"./ec2.js";import"./useMutation.js";function re(){const e=R.c(51),r=T(),s=V();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:D(z)},e[0]=g):g=e[0];const{handleSubmit:_,register:a,formState:H}=O(g),{errors:i,isSubmitting:M}=H;let N;e[1]!==s||e[2]!==r?(N=async Q=>{await s.mutateAsync(Q),r({to:"/ec2/describe-key-pairs"})},e[1]=s,e[2]=r,e[3]=N):N=e[3];const I=N;let A,K;e[4]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(q,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),K=t.jsx(J,{title:"Import Key Pair"}),e[4]=A,e[5]=K):(A=e[4],K=e[5]);let l;e[6]!==s.error?(l=s.error&&t.jsx(G,{error:s.error,msg:"Failed to import key pair"}),e[6]=s.error,e[7]=l):l=e[7];let o;e[8]!==_||e[9]!==I?(o=_(I),e[8]=_,e[9]=I,e[10]=o):o=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(L,{htmlFor:"keyName",children:"Key Pair Name"}),e[11]=P):P=e[11];let c;e[12]!==a?(c=a("keyName"),e[12]=a,e[13]=c):c=e[13];let m;e[14]!==c?(m=t.jsx($,{id:"keyName",placeholder:"my-key-pair…",...c}),e[14]=c,e[15]=m):m=e[15];let n;e[16]!==i.keyName?(n=i.keyName&&t.jsx("p",{className:"text-destructive text-xs",children:i.keyName.message}),e[16]=i.keyName,e[17]=n):n=e[17];let p;e[18]!==n||e[19]!==m?(p=t.jsxs("div",{className:"space-y-2",children:[P,m,n]}),e[18]=n,e[19]=m,e[20]=p):p=e[20];let S,v;e[21]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(L,{htmlFor:"publicKeyMaterial",children:"Public Key"}),v=t.jsx("p",{className:"text-muted-foreground text-xs",id:"publicKey-description",children:"Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)"}),e[21]=S,e[22]=v):(S=e[21],v=e[22]);let y;e[23]!==a?(y=a("publicKeyMaterial"),e[23]=a,e[24]=y):y=e[24];let d;e[25]!==y?(d=t.jsx(U,{id:"publicKeyMaterial",placeholder:"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…",rows:8,...y}),e[25]=y,e[26]=d):d=e[26];let f;e[27]!==i.publicKeyMaterial?(f=i.publicKeyMaterial&&t.jsx("p",{className:"text-destructive text-sm",children:i.publicKeyMaterial.message}),e[27]=i.publicKeyMaterial,e[28]=f):f=e[28];let u;e[29]!==d||e[30]!==f?(u=t.jsxs("div",{className:"space-y-2",children:[S,v,d,f]}),e[29]=d,e[30]=f,e[31]=u):u=e[31];const E=M||s.isPending;let x;e[32]!==r?(x=()=>r({to:"/ec2/describe-key-pairs"}),e[32]=r,e[33]=x):x=e[33];let b;e[34]!==E||e[35]!==x?(b=t.jsx(w,{disabled:E,onClick:x,type:"button",variant:"outline",children:"Cancel"}),e[34]=E,e[35]=x,e[36]=b):b=e[36];const F=M||s.isPending,C=M||s.isPending?"Importing…":"Import Key Pair";let h;e[37]!==F||e[38]!==C?(h=t.jsx(w,{disabled:F,type:"submit",children:C}),e[37]=F,e[38]=C,e[39]=h):h=e[39];let j;e[40]!==b||e[41]!==h?(j=t.jsxs("div",{className:"flex gap-2",children:[b,h]}),e[40]=b,e[41]=h,e[42]=j):j=e[42];let k;e[43]!==p||e[44]!==u||e[45]!==j||e[46]!==o?(k=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[p,u,j]}),e[43]=p,e[44]=u,e[45]=j,e[46]=o,e[47]=k):k=e[47];let B;return e[48]!==k||e[49]!==l?(B=t.jsxs(t.Fragment,{children:[A,K,l,k]}),e[48]=k,e[49]=l,e[50]=B):B=e[50],B}export{re as component};
|
||||
import{c as O,u as $,j as t,i as q,B as H}from"./index.js";import{a as G,u as J,I as U,F as Q,b as R,c as z}from"./field.js";import{B as V}from"./back-link.js";import{E as W}from"./error-banner.js";import{P as X}from"./page-heading.js";import{T as Y}from"./textarea.js";import{u as Z}from"./ec2.js";import"./useMutation.js";function ce(){const e=O.c(53),s=$(),i=Z();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:G(q)},e[0]=g):g=e[0];const{handleSubmit:_,register:l,formState:D}=J(g),{errors:r,isSubmitting:M}=D;let A;e[1]!==i||e[2]!==s?(A=async L=>{await i.mutateAsync(L),s({to:"/ec2/describe-key-pairs"})},e[1]=i,e[2]=s,e[3]=A):A=e[3];const v=A;let K,N;e[4]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(V,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),N=t.jsx(X,{title:"Import Key Pair"}),e[4]=K,e[5]=N):(K=e[4],N=e[5]);let a;e[6]!==i.error?(a=i.error&&t.jsx(W,{error:i.error,msg:"Failed to import key pair"}),e[6]=i.error,e[7]=a):a=e[7];let o;e[8]!==_||e[9]!==v?(o=_(v),e[8]=_,e[9]=v,e[10]=o):o=e[10];let P;e[11]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(R,{children:t.jsx("label",{htmlFor:"keyName",children:"Key Pair Name"})}),e[11]=P):P=e[11];const I=!!r.keyName;let c;e[12]!==l?(c=l("keyName"),e[12]=l,e[13]=c):c=e[13];let n;e[14]!==I||e[15]!==c?(n=t.jsx(U,{"aria-invalid":I,id:"keyName",placeholder:"my-key-pair…",...c}),e[14]=I,e[15]=c,e[16]=n):n=e[16];let m;e[17]!==r.keyName?(m=t.jsx(Q,{errors:[r.keyName]}),e[17]=r.keyName,e[18]=m):m=e[18];let p;e[19]!==n||e[20]!==m?(p=t.jsxs(z,{children:[P,n,m]}),e[19]=n,e[20]=m,e[21]=p):p=e[21];let S,B;e[22]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(R,{children:t.jsx("label",{htmlFor:"publicKeyMaterial",children:"Public Key"})}),B=t.jsx("p",{className:"text-muted-foreground text-xs",id:"publicKey-description",children:"Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)"}),e[22]=S,e[23]=B):(S=e[22],B=e[23]);const E=!!r.publicKeyMaterial;let d;e[24]!==l?(d=l("publicKeyMaterial"),e[24]=l,e[25]=d):d=e[25];let y;e[26]!==E||e[27]!==d?(y=t.jsx(Y,{"aria-invalid":E,id:"publicKeyMaterial",placeholder:"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…",rows:8,...d}),e[26]=E,e[27]=d,e[28]=y):y=e[28];let f;e[29]!==r.publicKeyMaterial?(f=t.jsx(Q,{errors:[r.publicKeyMaterial]}),e[29]=r.publicKeyMaterial,e[30]=f):f=e[30];let u;e[31]!==y||e[32]!==f?(u=t.jsxs(z,{children:[S,B,y,f]}),e[31]=y,e[32]=f,e[33]=u):u=e[33];const C=M||i.isPending;let x;e[34]!==s?(x=()=>s({to:"/ec2/describe-key-pairs"}),e[34]=s,e[35]=x):x=e[35];let b;e[36]!==C||e[37]!==x?(b=t.jsx(H,{disabled:C,onClick:x,type:"button",variant:"outline",children:"Cancel"}),e[36]=C,e[37]=x,e[38]=b):b=e[38];const w=M||i.isPending,T=M||i.isPending?"Importing…":"Import Key Pair";let h;e[39]!==w||e[40]!==T?(h=t.jsx(H,{disabled:w,type:"submit",children:T}),e[39]=w,e[40]=T,e[41]=h):h=e[41];let j;e[42]!==b||e[43]!==h?(j=t.jsxs("div",{className:"flex gap-2",children:[b,h]}),e[42]=b,e[43]=h,e[44]=j):j=e[44];let k;e[45]!==p||e[46]!==u||e[47]!==j||e[48]!==o?(k=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[p,u,j]}),e[45]=p,e[46]=u,e[47]=j,e[48]=o,e[49]=k):k=e[49];let F;return e[50]!==k||e[51]!==a?(F=t.jsxs(t.Fragment,{children:[K,N,a,k]}),e[50]=k,e[51]=a,e[52]=F):F=e[52],F}export{ce as component};
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{c as i,f as m,j as t}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as l}from"./list-card.js";import{P as u}from"./page-heading.js";function N(){const e=i.c(5),{data:n}=c(m);let s;e[0]!==n.Buckets?(s=n.Buckets||[],e[0]=n.Buckets,e[1]=s):s=e[1];const r=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(u,{title:"S3 Buckets"}),e[2]=a):a=e[2];let o;return e[3]!==r?(o=t.jsxs(t.Fragment,{children:[a,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No buckets found."})]}),e[3]=r,e[4]=o):o=e[4],o}function p(e){return e.Name?t.jsx(l,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${e.CreationDate.toLocaleString()}`:void 0,title:e.Name,to:"/s3/ls/$bucket"},e.Name):null}export{N as component};
|
||||
import{c as i,d as m,j as t}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as l}from"./list-card.js";import{P as u}from"./page-heading.js";function N(){const e=i.c(5),{data:n}=c(m);let s;e[0]!==n.Buckets?(s=n.Buckets||[],e[0]=n.Buckets,e[1]=s):s=e[1];const r=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(u,{title:"S3 Buckets"}),e[2]=a):a=e[2];let o;return e[3]!==r?(o=t.jsxs(t.Fragment,{children:[a,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No buckets found."})]}),e[3]=r,e[4]=o):o=e[4],o}function p(e){return e.Name?t.jsx(l,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${e.CreationDate.toLocaleString()}`:void 0,title:e.Name,to:"/s3/ls/$bucket"},e.Name):null}export{N as component};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as g,aA as b,j as s,aB as P,aC as y}from"./index.js";import{u as k}from"./useSuspenseQuery.js";import{B as N}from"./back-link.js";import{P as B}from"./page-heading.js";import{F as C,O,U as K}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function _(){const e=g.c(26),{bucket:t}=b.useParams();let u;e[0]!==t?(u=y(t),e[0]=t,e[1]=u):u=e[1];const{data:i}=k(u);let x;e[2]!==i.Contents?(x=i.Contents||[],e[2]=i.Contents,e[3]=x):x=e[3];const n=x;let d;e[4]!==i.CommonPrefixes?(d=i.CommonPrefixes||[],e[4]=i.CommonPrefixes,e[5]=d):d=e[5];const o=d;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(N,{to:"/s3/ls",children:"Back to buckets"}),e[6]=h):h=e[6];let r;e[7]!==t?(r=s.jsx(K,{bucket:t}),e[7]=t,e[8]=r):r=e[8];let m;e[9]!==t||e[10]!==r?(m=s.jsx(B,{actions:r,title:t}),e[9]=t,e[10]=r,e[11]=m):m=e[11];let a;e[12]!==t||e[13]!==o?(a=o.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:o.map(l=>{if(!l.Prefix)return null;const j=P(l.Prefix);return s.jsx(C,{bucketName:t,folderName:j,fullPrefix:l.Prefix},l.Prefix)})})]}),e[12]=t,e[13]=o,e[14]=a):a=e[14];let c;e[15]!==t||e[16]!==n?(c=n.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),n.map(l=>l.Key?s.jsx(O,{bucketName:t,displayName:l.Key,fullKey:l.Key,object:l},l.Key):null)]}),e[15]=t,e[16]=n,e[17]=c):c=e[17];let f;e[18]!==o.length||e[19]!==n.length?(f=n.length===0&&o.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this bucket."}),e[18]=o.length,e[19]=n.length,e[20]=f):f=e[20];let p;return e[21]!==m||e[22]!==a||e[23]!==c||e[24]!==f?(p=s.jsxs(s.Fragment,{children:[h,m,a,c,f]}),e[21]=m,e[22]=a,e[23]=c,e[24]=f,e[25]=p):p=e[25],p}export{_ as component};
|
||||
import{c as g,az as b,j as s,aA as P,aB as y}from"./index.js";import{u as k}from"./useSuspenseQuery.js";import{B as N}from"./back-link.js";import{P as B}from"./page-heading.js";import{F as C,O,U as K}from"./upload-button.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";import"./useMutation.js";function _(){const e=g.c(26),{bucket:t}=b.useParams();let u;e[0]!==t?(u=y(t),e[0]=t,e[1]=u):u=e[1];const{data:i}=k(u);let x;e[2]!==i.Contents?(x=i.Contents||[],e[2]=i.Contents,e[3]=x):x=e[3];const n=x;let d;e[4]!==i.CommonPrefixes?(d=i.CommonPrefixes||[],e[4]=i.CommonPrefixes,e[5]=d):d=e[5];const o=d;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(N,{to:"/s3/ls",children:"Back to buckets"}),e[6]=h):h=e[6];let r;e[7]!==t?(r=s.jsx(K,{bucket:t}),e[7]=t,e[8]=r):r=e[8];let m;e[9]!==t||e[10]!==r?(m=s.jsx(B,{actions:r,title:t}),e[9]=t,e[10]=r,e[11]=m):m=e[11];let a;e[12]!==t||e[13]!==o?(a=o.length>0&&s.jsxs("div",{className:"mb-6",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Folders"}),s.jsx("div",{className:"space-y-2",children:o.map(l=>{if(!l.Prefix)return null;const j=P(l.Prefix);return s.jsx(C,{bucketName:t,folderName:j,fullPrefix:l.Prefix},l.Prefix)})})]}),e[12]=t,e[13]=o,e[14]=a):a=e[14];let c;e[15]!==t||e[16]!==n?(c=n.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),n.map(l=>l.Key?s.jsx(O,{bucketName:t,displayName:l.Key,fullKey:l.Key,object:l},l.Key):null)]}),e[15]=t,e[16]=n,e[17]=c):c=e[17];let f;e[18]!==o.length||e[19]!==n.length?(f=n.length===0&&o.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this bucket."}),e[18]=o.length,e[19]=n.length,e[20]=f):f=e[20];let p;return e[21]!==m||e[22]!==a||e[23]!==c||e[24]!==f?(p=s.jsxs(s.Fragment,{children:[h,m,a,c,f]}),e[21]=m,e[22]=a,e[23]=c,e[24]=f,e[25]=p):p=e[25],p}export{_ as component};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as l,aD as m,j as t}from"./index.js";import{u as n}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as c}from"./page-heading.js";import{B as d}from"./badge.js";function h(){const e=l.c(5),{data:r}=n(m);let s;e[0]!==r.Volumes?(s=r.Volumes||[],e[0]=r.Volumes,e[1]=s):s=e[1];const o=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(c,{title:"EC2 Volumes"}),e[2]=a):a=e[2];let i;return e[3]!==o?(i=t.jsxs(t.Fragment,{children:[a,o.length>0?t.jsx("div",{className:"space-y-4",children:o.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=o,e[4]=i):i=e[4],i}function p(e){return e.VolumeId?t.jsx(u,{badge:e.State?t.jsx(d,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{h as component};
|
||||
import{c as l,aC as m,j as t}from"./index.js";import{u as n}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as c}from"./page-heading.js";import{B as d}from"./badge.js";function h(){const e=l.c(5),{data:r}=n(m);let s;e[0]!==r.Volumes?(s=r.Volumes||[],e[0]=r.Volumes,e[1]=s):s=e[1];const o=s;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(c,{title:"EC2 Volumes"}),e[2]=a):a=e[2];let i;return e[3]!==o?(i=t.jsxs(t.Fragment,{children:[a,o.length>0?t.jsx("div",{className:"space-y-4",children:o.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=o,e[4]=i):i=e[4],i}function p(e){return e.VolumeId?t.jsx(u,{badge:e.State?t.jsx(d,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{h as component};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as m,ax as l,j as t,aE as n,B as c}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as y}from"./page-heading.js";function P(){const e=m.c(4),{data:r}=p(l);let s;if(e[0]!==r.KeyPairs){const a=[...r.KeyPairs||[]].sort(x);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(n,{to:"/ec2/import-key-pair",children:t.jsx(c,{variant:"outline",children:"Import Key Pair"})}),e[2]=i):i=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(y,{actions:t.jsxs("div",{className:"flex gap-2",children:[i,t.jsx(n,{to:"/ec2/create-key-pair",children:t.jsx(c,{children:"Create Key Pair"})})]}),title:"EC2 Key Pairs"}),e[3]=o):o=e[3],s=t.jsxs(t.Fragment,{children:[o,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(u)}):t.jsx("p",{className:"text-muted-foreground",children:"No key pairs found."})]}),e[0]=r.KeyPairs,e[1]=s}else s=e[1];return s}function u(e){return e.KeyPairId?t.jsx(d,{params:{id:e.KeyPairId},subtitle:`${e.KeyPairId} • ${e.KeyType}`,title:e.KeyName??"",to:"/ec2/describe-key-pairs/$id"},e.KeyPairId):null}function x(e,r){const s=e.KeyName?.toLowerCase()??"",a=r.KeyName?.toLowerCase()??"";return s.localeCompare(a)}export{P as component};
|
||||
import{c as m,aw as l,j as t,aD as n,B as c}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as y}from"./page-heading.js";function P(){const e=m.c(4),{data:r}=p(l);let s;if(e[0]!==r.KeyPairs){const a=[...r.KeyPairs||[]].sort(f);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(n,{to:"/ec2/import-key-pair",children:t.jsx(c,{variant:"outline",children:"Import Key Pair"})}),e[2]=i):i=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(y,{actions:t.jsxs("div",{className:"flex gap-2",children:[i,t.jsx(n,{to:"/ec2/create-key-pair",children:t.jsx(c,{children:"Create Key Pair"})})]}),title:"EC2 Key Pairs"}),e[3]=o):o=e[3],s=t.jsxs(t.Fragment,{children:[o,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(u)}):t.jsx("p",{className:"text-muted-foreground",children:"No key pairs found."})]}),e[0]=r.KeyPairs,e[1]=s}else s=e[1];return s}function u(e){return e.KeyPairId?t.jsx(d,{params:{id:e.KeyPairId},subtitle:`${e.KeyPairId} • ${e.KeyType}`,title:e.KeyName??"",to:"/ec2/describe-key-pairs/$id"},e.KeyPairId):null}function f(e,r){const s=e.KeyName?.toLowerCase()??"",a=r.KeyName?.toLowerCase()??"";return s.localeCompare(a)}export{P as component};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as o,aF as c,j as t,aE as i,B as m}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as p}from"./state-badge.js";function y(){const e=o.c(3),{data:a}=d(c);let s;if(e[0]!==a.Reservations){const r=a.Reservations?.flatMap(I)||[];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(l,{actions:t.jsx(i,{to:"/ec2/run-instances",children:t.jsx(m,{children:"Run Instances"})}),title:"EC2 Instances"}),e[2]=n):n=e[2],s=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),e[0]=a.Reservations,e[1]=s}else s=e[1];return s}function f(e){return e.InstanceId?t.jsx(u,{badge:t.jsx(p,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType} • ${e.ImageId}`,title:e.InstanceId,to:"/ec2/describe-instances/$id"},e.InstanceId):null}function I(e){return e.Instances||[]}export{y as component};
|
||||
import{c as o,aE as c,j as t,aD as i,B as m}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as p}from"./state-badge.js";function y(){const e=o.c(3),{data:a}=d(c);let s;if(e[0]!==a.Reservations){const r=a.Reservations?.flatMap(I)||[];let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(l,{actions:t.jsx(i,{to:"/ec2/run-instances",children:t.jsx(m,{children:"Run Instances"})}),title:"EC2 Instances"}),e[2]=n):n=e[2],s=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),e[0]=a.Reservations,e[1]=s}else s=e[1];return s}function f(e){return e.InstanceId?t.jsx(u,{badge:t.jsx(p,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType} • ${e.ImageId}`,title:e.InstanceId,to:"/ec2/describe-instances/$id"},e.InstanceId):null}function I(e){return e.Instances||[]}export{y as component};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as n,aw as i,j as t}from"./index.js";import{u as l}from"./useSuspenseQuery.js";import{L as c}from"./list-card.js";import{P as d}from"./page-heading.js";import{B as u}from"./badge.js";function h(){const e=n.c(5),{data:m}=l(i);let s;e[0]!==m.Images?(s=m.Images||[],e[0]=m.Images,e[1]=s):s=e[1];const a=s;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(d,{title:"EC2 Images"}),e[2]=r):r=e[2];let o;return e[3]!==a?(o=t.jsxs(t.Fragment,{children:[r,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No images found."})]}),e[3]=a,e[4]=o):o=e[4],o}function p(e){return e.ImageId?t.jsx(c,{badge:e.State?t.jsx(u,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.ImageId},subtitle:e.Name,title:e.ImageId,to:"/ec2/describe-images/$id"},e.ImageId):null}export{h as component};
|
||||
import{c as n,av as i,j as t}from"./index.js";import{u as l}from"./useSuspenseQuery.js";import{L as c}from"./list-card.js";import{P as d}from"./page-heading.js";import{B as u}from"./badge.js";function h(){const e=n.c(5),{data:m}=l(i);let s;e[0]!==m.Images?(s=m.Images||[],e[0]=m.Images,e[1]=s):s=e[1];const a=s;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(d,{title:"EC2 Images"}),e[2]=r):r=e[2];let o;return e[3]!==a?(o=t.jsxs(t.Fragment,{children:[r,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(p)}):t.jsx("p",{className:"text-muted-foreground",children:"No images found."})]}),e[3]=a,e[4]=o):o=e[4],o}function p(e){return e.ImageId?t.jsx(c,{badge:e.State?t.jsx(u,{variant:e.State==="available"?"default":"outline",children:e.State}):void 0,params:{id:e.ImageId},subtitle:e.Name,title:e.ImageId,to:"/ec2/describe-images/$id"},e.ImageId):null}export{h as component};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as u,j as m,aE as h}from"./index.js";function b(x){const e=u.c(22);let s,l,i,t,r;e[0]!==x?({title:r,subtitle:t,badge:s,children:l,...i}=x,e[0]=x,e[1]=s,e[2]=l,e[3]=i,e[4]=t,e[5]=r):(s=e[1],l=e[2],i=e[3],t=e[4],r=e[5]);let a;e[6]!==r?(a=m.jsx("h3",{className:"font-semibold",children:r}),e[6]=r,e[7]=a):a=e[7];let c;e[8]!==t?(c=t&&m.jsx("p",{className:"mt-1 font-medium text-muted-foreground text-sm",children:t}),e[8]=t,e[9]=c):c=e[9];let n;e[10]!==l||e[11]!==a||e[12]!==c?(n=m.jsxs("div",{className:"flex-1",children:[a,c,l]}),e[10]=l,e[11]=a,e[12]=c,e[13]=n):n=e[13];let o;e[14]!==s?(o=s&&m.jsx("div",{className:"ml-4",children:s}),e[14]=s,e[15]=o):o=e[15];let d;e[16]!==n||e[17]!==o?(d=m.jsxs("div",{className:"flex items-start justify-between",children:[n,o]}),e[16]=n,e[17]=o,e[18]=d):d=e[18];let f;return e[19]!==i||e[20]!==d?(f=m.jsx(h,{className:"block rounded-lg border bg-card p-4 transition-colors hover:bg-accent",...i,children:d}),e[19]=i,e[20]=d,e[21]=f):f=e[21],f}export{b as L};
|
||||
import{c as u,j as m,aD as h}from"./index.js";function b(x){const e=u.c(22);let s,l,i,t,r;e[0]!==x?({title:r,subtitle:t,badge:s,children:l,...i}=x,e[0]=x,e[1]=s,e[2]=l,e[3]=i,e[4]=t,e[5]=r):(s=e[1],l=e[2],i=e[3],t=e[4],r=e[5]);let a;e[6]!==r?(a=m.jsx("h3",{className:"font-semibold",children:r}),e[6]=r,e[7]=a):a=e[7];let c;e[8]!==t?(c=t&&m.jsx("p",{className:"mt-1 font-medium text-muted-foreground text-sm",children:t}),e[8]=t,e[9]=c):c=e[9];let n;e[10]!==l||e[11]!==a||e[12]!==c?(n=m.jsxs("div",{className:"flex-1",children:[a,c,l]}),e[10]=l,e[11]=a,e[12]=c,e[13]=n):n=e[13];let o;e[14]!==s?(o=s&&m.jsx("div",{className:"ml-4",children:s}),e[14]=s,e[15]=o):o=e[15];let d;e[16]!==n||e[17]!==o?(d=m.jsxs("div",{className:"flex items-start justify-between",children:[n,o]}),e[16]=n,e[17]=o,e[18]=d):d=e[18];let f;return e[19]!==i||e[20]!==d?(f=m.jsx(h,{className:"block rounded-lg border bg-card p-4 transition-colors hover:bg-accent",...i,children:d}),e[19]=i,e[20]=d,e[21]=f):f=e[21],f}export{b as L};
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{g as a}from"./index.js";const t=[["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"}]],o=a("trash-2",t);export{o as T};
|
||||
import{f as a}from"./index.js";const t=[["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"}]],o=a("trash-2",t);export{o as T};
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{b_ as l,b$ as d,c0 as a,c1 as b,c2 as h,bk as p,r as o,c3 as m,c4 as v}from"./index.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??b();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u};
|
||||
import{b_ as l,b$ as d,c0 as a,c1 as b,c2 as h,bj as p,r as o,c3 as m,c4 as v}from"./index.js";var y=class extends l{#s;#i=void 0;#t;#e;constructor(t,s){super(),this.#s=t,this.setOptions(s),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const s=this.options;this.options=this.#s.defaultMutationOptions(t),d(this.options,s)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),s?.mutationKey&&this.options.mutationKey&&a(s.mutationKey)!==a(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#o(t)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(t,s){return this.#e=s,this.#t?.removeObserver(this),this.#t=this.#s.getMutationCache().build(this.#s,this.options),this.#t.addObserver(this),this.#t.execute(t)}#r(){const t=this.#t?.state??b();this.#i={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){h.batch(()=>{if(this.#e&&this.hasListeners()){const s=this.#i.variables,r=this.#i.context,e={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(t.data,null,s,r,e)}catch(i){Promise.reject(i)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,s,r,e)}catch(i){Promise.reject(i)}try{this.#e.onSettled?.(void 0,t.error,s,r,e)}catch(i){Promise.reject(i)}}}this.listeners.forEach(s=>{s(this.#i)})})}};function O(t,s){const r=p(),[e]=o.useState(()=>new y(r,t));o.useEffect(()=>{e.setOptions(t)},[e,t]);const i=o.useSyncExternalStore(o.useCallback(n=>e.subscribe(h.batchCalls(n)),[e]),()=>e.getCurrentResult(),()=>e.getCurrentResult()),u=o.useCallback((n,c)=>{e.mutate(n,c).catch(m)},[e]);if(i.error&&v(e.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:u,mutateAsync:i.mutate}}export{O as u};
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -7,8 +7,8 @@ import { BackLink } from "@/components/back-link"
|
||||
import { ErrorBanner } from "@/components/error-banner"
|
||||
import { PageHeading } from "@/components/page-heading"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Field, FieldError, FieldTitle } from "@/components/ui/field"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import {
|
||||
Select,
|
||||
SelectContent,
|
||||
@@ -46,7 +46,6 @@ export const Route = createFileRoute("/_auth/ec2/(instances)/run-instances")({
|
||||
component: CreateInstance,
|
||||
})
|
||||
|
||||
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: this is a complex form
|
||||
function CreateInstance() {
|
||||
const navigate = useNavigate()
|
||||
const { data: imagesData } = useSuspenseQuery(ec2ImagesQueryOptions)
|
||||
@@ -142,8 +141,10 @@ function CreateInstance() {
|
||||
|
||||
<form className="max-w-4xl space-y-6" onSubmit={handleSubmit(onSubmit)}>
|
||||
{/* ImageSelection */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="imageId">Image</Label>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="imageId">Image</label>
|
||||
</FieldTitle>
|
||||
<Controller
|
||||
control={control}
|
||||
name="imageId"
|
||||
@@ -156,7 +157,11 @@ function CreateInstance() {
|
||||
onValueChange={(value) => field.onChange(value)}
|
||||
value={field.value ?? ""}
|
||||
>
|
||||
<SelectTrigger className="w-full" id="imageId">
|
||||
<SelectTrigger
|
||||
aria-invalid={!!errors.imageId}
|
||||
className="w-full"
|
||||
id="imageId"
|
||||
>
|
||||
<SelectValue>
|
||||
{selectedImage
|
||||
? `${selectedImage.Name || "Unnamed"} (${selectedImage.Architecture})`
|
||||
@@ -177,14 +182,14 @@ function CreateInstance() {
|
||||
)
|
||||
}}
|
||||
/>
|
||||
{errors.imageId && (
|
||||
<p className="text-destructive text-sm">{errors.imageId.message}</p>
|
||||
)}
|
||||
</div>
|
||||
<FieldError errors={[errors.imageId]} />
|
||||
</Field>
|
||||
|
||||
{/* Instance Type */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="instanceType">Instance Type</Label>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="instanceType">Instance Type</label>
|
||||
</FieldTitle>
|
||||
<Controller
|
||||
control={control}
|
||||
name="instanceType"
|
||||
@@ -193,7 +198,11 @@ function CreateInstance() {
|
||||
onValueChange={(value) => field.onChange(value)}
|
||||
value={field.value ? field.value : ""}
|
||||
>
|
||||
<SelectTrigger className="w-full" id="instanceType">
|
||||
<SelectTrigger
|
||||
aria-invalid={!!errors.instanceType}
|
||||
className="w-full"
|
||||
id="instanceType"
|
||||
>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -206,16 +215,14 @@ function CreateInstance() {
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{errors.instanceType && (
|
||||
<p className="text-destructive text-sm">
|
||||
{errors.instanceType.message}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<FieldError errors={[errors.instanceType]} />
|
||||
</Field>
|
||||
|
||||
{/* Key Pair */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="keyName">Key Pair</Label>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="keyName">Key Pair</label>
|
||||
</FieldTitle>
|
||||
<Controller
|
||||
control={control}
|
||||
name="keyName"
|
||||
@@ -224,7 +231,11 @@ function CreateInstance() {
|
||||
onValueChange={(value) => field.onChange(value)}
|
||||
value={field.value ? field.value : ""}
|
||||
>
|
||||
<SelectTrigger className="w-full" id="keyName">
|
||||
<SelectTrigger
|
||||
aria-invalid={!!errors.keyName}
|
||||
className="w-full"
|
||||
id="keyName"
|
||||
>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
@@ -240,15 +251,16 @@ function CreateInstance() {
|
||||
</Select>
|
||||
)}
|
||||
/>
|
||||
{errors.keyName && (
|
||||
<p className="text-destructive text-sm">{errors.keyName.message}</p>
|
||||
)}
|
||||
</div>
|
||||
<FieldError errors={[errors.keyName]} />
|
||||
</Field>
|
||||
|
||||
{/* Instance Count */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="count">Number of Instances</Label>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="count">Number of Instances</label>
|
||||
</FieldTitle>
|
||||
<Input
|
||||
aria-invalid={!!errors.count}
|
||||
id="count"
|
||||
type="number"
|
||||
{...register("count", { valueAsNumber: true })}
|
||||
@@ -257,10 +269,8 @@ function CreateInstance() {
|
||||
{selectedInstanceType &&
|
||||
`Available capacity for ${selectedInstanceType}: ${maxCount}`}
|
||||
</p>
|
||||
{errors.count && (
|
||||
<p className="text-destructive text-sm">{errors.count.message}</p>
|
||||
)}
|
||||
</div>
|
||||
<FieldError errors={[errors.count]} />
|
||||
</Field>
|
||||
|
||||
{/* Actions */}
|
||||
<div className="flex gap-2">
|
||||
|
||||
@@ -7,8 +7,8 @@ import { BackLink } from "@/components/back-link"
|
||||
import { ErrorBanner } from "@/components/error-banner"
|
||||
import { PageHeading } from "@/components/page-heading"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Field, FieldError, FieldTitle } from "@/components/ui/field"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import { useCreateKeyPair } from "@/mutations/ec2"
|
||||
import { type CreateKeyPairData, createKeyPairSchema } from "@/types/ec2"
|
||||
import { PrivateKeyModal } from "../-components/private-key-modal"
|
||||
@@ -66,17 +66,18 @@ function CreateKeyPair() {
|
||||
|
||||
<form className="max-w-4xl space-y-6" onSubmit={handleSubmit(onSubmit)}>
|
||||
{/* Key Name */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="keyName">Key Pair Name</Label>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="keyName">Key Pair Name</label>
|
||||
</FieldTitle>
|
||||
<Input
|
||||
aria-invalid={!!errors.keyName}
|
||||
id="keyName"
|
||||
placeholder="my-key-pair…"
|
||||
{...register("keyName")}
|
||||
/>
|
||||
{errors.keyName && (
|
||||
<p className="text-destructive text-sm">{errors.keyName.message}</p>
|
||||
)}
|
||||
</div>
|
||||
<FieldError errors={[errors.keyName]} />
|
||||
</Field>
|
||||
|
||||
{/* Actions */}
|
||||
<div className="flex gap-2">
|
||||
|
||||
@@ -6,8 +6,8 @@ import { BackLink } from "@/components/back-link"
|
||||
import { ErrorBanner } from "@/components/error-banner"
|
||||
import { PageHeading } from "@/components/page-heading"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Field, FieldError, FieldTitle } from "@/components/ui/field"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import { Textarea } from "@/components/ui/textarea"
|
||||
import { useImportKeyPair } from "@/mutations/ec2"
|
||||
import { type ImportKeyPairData, importKeyPairSchema } from "@/types/ec2"
|
||||
@@ -55,21 +55,24 @@ function ImportKeyPair() {
|
||||
|
||||
<form className="max-w-4xl space-y-6" onSubmit={handleSubmit(onSubmit)}>
|
||||
{/* Key Name */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="keyName">Key Pair Name</Label>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="keyName">Key Pair Name</label>
|
||||
</FieldTitle>
|
||||
<Input
|
||||
aria-invalid={!!errors.keyName}
|
||||
id="keyName"
|
||||
placeholder="my-key-pair…"
|
||||
{...register("keyName")}
|
||||
/>
|
||||
{errors.keyName && (
|
||||
<p className="text-destructive text-xs">{errors.keyName.message}</p>
|
||||
)}
|
||||
</div>
|
||||
<FieldError errors={[errors.keyName]} />
|
||||
</Field>
|
||||
|
||||
{/* Public Key Material */}
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="publicKeyMaterial">Public Key</Label>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="publicKeyMaterial">Public Key</label>
|
||||
</FieldTitle>
|
||||
<p
|
||||
className="text-muted-foreground text-xs"
|
||||
id="publicKey-description"
|
||||
@@ -77,17 +80,14 @@ function ImportKeyPair() {
|
||||
Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)
|
||||
</p>
|
||||
<Textarea
|
||||
aria-invalid={!!errors.publicKeyMaterial}
|
||||
id="publicKeyMaterial"
|
||||
placeholder="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…"
|
||||
rows={8}
|
||||
{...register("publicKeyMaterial")}
|
||||
/>
|
||||
{errors.publicKeyMaterial && (
|
||||
<p className="text-destructive text-sm">
|
||||
{errors.publicKeyMaterial.message}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
<FieldError errors={[errors.publicKeyMaterial]} />
|
||||
</Field>
|
||||
|
||||
{/* Actions */}
|
||||
<div className="flex gap-2">
|
||||
|
||||
+15
-23
@@ -99,29 +99,21 @@ function VolumeDetail() {
|
||||
{volume.Attachments && volume.Attachments.length > 0 && (
|
||||
<DetailCard>
|
||||
<DetailCard.Header>Attachments</DetailCard.Header>
|
||||
<DetailCard.Content>
|
||||
{volume.Attachments.map((attachment) => (
|
||||
<div
|
||||
className="space-y-2 border-b pb-2 last:border-0 last:pb-0"
|
||||
key={attachment.InstanceId}
|
||||
>
|
||||
<DetailRow
|
||||
label="Instance ID"
|
||||
value={attachment.InstanceId}
|
||||
/>
|
||||
<DetailRow label="Device" value={attachment.Device} />
|
||||
<DetailRow label="Status" value={attachment.State} />
|
||||
<DetailRow
|
||||
label="Attach Time"
|
||||
value={formatDateTime(attachment.AttachTime)}
|
||||
/>
|
||||
<DetailRow
|
||||
label="Delete on Termination"
|
||||
value={attachment.DeleteOnTermination ? "Yes" : "No"}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</DetailCard.Content>
|
||||
{volume.Attachments.map((attachment) => (
|
||||
<DetailCard.Content key={attachment.InstanceId}>
|
||||
<DetailRow label="Instance ID" value={attachment.InstanceId} />
|
||||
<DetailRow label="Device" value={attachment.Device} />
|
||||
<DetailRow label="Status" value={attachment.State} />
|
||||
<DetailRow
|
||||
label="Attach Time"
|
||||
value={formatDateTime(attachment.AttachTime)}
|
||||
/>
|
||||
<DetailRow
|
||||
label="Delete on Termination"
|
||||
value={attachment.DeleteOnTermination ? "Yes" : "No"}
|
||||
/>
|
||||
</DetailCard.Content>
|
||||
))}
|
||||
</DetailCard>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -7,8 +7,8 @@ import { BackLink } from "@/components/back-link"
|
||||
import { ErrorBanner } from "@/components/error-banner"
|
||||
import { PageHeading } from "@/components/page-heading"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Field, FieldError, FieldTitle } from "@/components/ui/field"
|
||||
import { Input } from "@/components/ui/input"
|
||||
import { Label } from "@/components/ui/label"
|
||||
import { useModifyVolume } from "@/mutations/ec2"
|
||||
import { ec2VolumeQueryOptions } from "@/queries/ec2"
|
||||
import { type ModifyVolumeFormData, modifyVolumeSchema } from "@/types/ec2"
|
||||
@@ -93,18 +93,19 @@ function ModifyVolume() {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="size">New size (GiB)</Label>
|
||||
<Field>
|
||||
<FieldTitle>
|
||||
<label htmlFor="size">New size (GiB)</label>
|
||||
</FieldTitle>
|
||||
<Input
|
||||
aria-invalid={!!errors.size}
|
||||
id="size"
|
||||
min={currentSize + 1}
|
||||
type="number"
|
||||
{...register("size", { valueAsNumber: true })}
|
||||
/>
|
||||
{errors.size && (
|
||||
<p className="text-destructive text-sm">{errors.size.message}</p>
|
||||
)}
|
||||
</div>
|
||||
<FieldError errors={[errors.size]} />
|
||||
</Field>
|
||||
|
||||
<div className="flex gap-2">
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user