mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-23 04:36:40 +00:00
chore: migrate to vite8
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
minimum-release-time=3d
|
||||
exclude-packages-from-minimum-release-time=vite,@vitejs/*
|
||||
@@ -0,0 +1 @@
|
||||
import{Dt as e,Et as t,jt as n,nt as r}from"./awsClient.js";var i=class extends n.classBuilder().ep(t).m(function(t,n,r,i){return[e(r,t.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstances`,{}).n(`EC2Client`,`DescribeInstancesCommand`).sc(r).build(){};export{i as t};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{c as B,G as $,H as C,z as F,j as s,y as K,I as b,J as k,L}from"./index.js";import{u as E}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{E as S}from"./error-banner.js";import{a as U}from"./s3.js";import{U as A,F as I,O as R}from"./upload-button.js";import"./delete-confirmation-dialog.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";function V(){const e=B.c(24),{bucket:n,_splat:v}=$.useParams(),r=C(v||""),{data:m}=E(F(n,r)),a=U();let d;e[0]!==m.Contents?(d=m.Contents||[],e[0]=m.Contents,e[1]=d):d=e[1];const o=d;let p;e[2]!==m.CommonPrefixes?(p=m.CommonPrefixes||[],e[2]=m.CommonPrefixes,e[3]=p):p=e[3];const i=p,u=r.split("/").filter(Boolean),y=[{name:n,path:`/s3/ls/${n}`},...u.map((t,l)=>{const c=`${u.slice(0,l+1).join("/")}/`;return{name:t,path:`/s3/ls/${n}/${c}`}})],P=u.length>1?`/s3/ls/${n}/${u.slice(0,-1).join("/")}/`:`/s3/ls/${n}`;let f;e[4]!==P?(f=s.jsx(O,{to:P,children:"Back"}),e[4]=P,e[5]=f):f=e[5];let x;e[6]!==n||e[7]!==r||e[8]!==a.isPending||e[9]!==a.mutateAsync?(x=s.jsx(A,{bucket:n,isPending:a.isPending,onUpload:a.mutateAsync,prefix:r}),e[6]=n,e[7]=r,e[8]=a.isPending,e[9]=a.mutateAsync,e[10]=x):x=e[10];let h;e[11]!==a.error?(h=a.error&&s.jsx(S,{error:a.error,msg:"Failed to upload object"}),e[11]=a.error,e[12]=h):h=e[12];let g;e[13]!==n||e[14]!==i||e[15]!==r?(g=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=K(b(t.Prefix,r)),c=k(t.Prefix,r);return s.jsx(I,{bucketName:n,folderName:l,fullPrefix:c},t.Prefix)})})]}),e[13]=n,e[14]=i,e[15]=r,e[16]=g):g=e[16];let j;e[17]!==n||e[18]!==o||e[19]!==r?(j=o.length>0&&s.jsxs("div",{className:"space-y-2",children:[s.jsx("h2",{className:"mb-3 font-semibold text-lg",children:"Objects"}),o.map(t=>{if(!t.Key)return null;const l=b(t.Key,r),c=k(t.Key,r);return s.jsx(R,{bucketName:n,displayName:l,fullKey:c,object:t},t.Key)})]}),e[17]=n,e[18]=o,e[19]=r,e[20]=j):j=e[20];let N;return e[21]!==i.length||e[22]!==o.length?(N=o.length===0&&i.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this folder."}),e[21]=i.length,e[22]=o.length,e[23]=N):N=e[23],s.jsxs(s.Fragment,{children:[f,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:y.map((t,l)=>s.jsxs("div",{className:"flex items-center gap-2",children:[l>0&&s.jsx("span",{children:"/"}),l===y.length-1?s.jsx("span",{className:"text-foreground",children:t.name}):s.jsx(L,{className:"hover:text-foreground",to:t.path,children:t.name})]},t.path))}),x]})}),h,g,j,N]})}export{V as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./error-banner.js";import"./useRouterState.js";import{t as i}from"./link.js";import{c as a,i as o,r as s,t as c}from"./utils.js";import"./button.js";import{t as l}from"./back-link.js";import{n as u,r as d,t as f}from"./upload-button.js";import"./awsClient.js";import{r as p}from"./s3.js";import{t as m}from"./s32.js";import{d as h}from"./index.js";import"./alert-dialog.js";import"./delete-confirmation-dialog.js";var g=t(),_=e();function v(){let e=(0,g.c)(24),{bucket:t,_splat:v}=h.useParams(),y=s(v||``),{data:b}=n(m(t,y)),x=p(),S;e[0]===b.Contents?S=e[1]:(S=b.Contents||[],e[0]=b.Contents,e[1]=S);let C=S,w;e[2]===b.CommonPrefixes?w=e[3]:(w=b.CommonPrefixes||[],e[2]=b.CommonPrefixes,e[3]=w);let T=w,E=y.split(`/`).filter(Boolean),D=[{name:t,path:`/s3/ls/${t}`},...E.map((e,n)=>({name:e,path:`/s3/ls/${t}/${`${E.slice(0,n+1).join(`/`)}/`}`}))],O=E.length>1?`/s3/ls/${t}/${E.slice(0,-1).join(`/`)}/`:`/s3/ls/${t}`,k;e[4]===O?k=e[5]:(k=(0,_.jsx)(l,{to:O,children:`Back`}),e[4]=O,e[5]=k);let A;e[6]!==t||e[7]!==y||e[8]!==x.isPending||e[9]!==x.mutateAsync?(A=(0,_.jsx)(f,{bucket:t,isPending:x.isPending,onUpload:x.mutateAsync,prefix:y}),e[6]=t,e[7]=y,e[8]=x.isPending,e[9]=x.mutateAsync,e[10]=A):A=e[10];let j;e[11]===x.error?j=e[12]:(j=x.error&&(0,_.jsx)(r,{error:x.error,msg:`Failed to upload object`}),e[11]=x.error,e[12]=j);let M;e[13]!==t||e[14]!==T||e[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)(d,{bucketName:t,folderName:a(o(e.Prefix,y)),fullPrefix:c(e.Prefix,y)},e.Prefix):null)})]}),e[13]=t,e[14]=T,e[15]=y,e[16]=M):M=e[16];let N;e[17]!==t||e[18]!==C||e[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)(u,{bucketName:t,displayName:o(e.Key,y),fullKey:c(e.Key,y),object:e},e.Key):null)]}),e[17]=t,e[18]=C,e[19]=y,e[20]=N):N=e[20];let P;return e[21]!==T.length||e[22]!==C.length?(P=C.length===0&&T.length===0&&(0,_.jsx)(`p`,{className:`text-muted-foreground`,children:`No objects found in this folder.`}),e[21]=T.length,e[22]=C.length,e[23]=P):P=e[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)(i,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./awsClient.js";import{l as r}from"./ec22.js";import{t as i}from"./page-heading.js";var a=t(),o=e();function s(){let e=(0,a.c)(2),{data:t}=n(r),s=`${t?.Regions?.[0]?.RegionName} Dashboard`,c;return e[0]===s?c=e[1]:(c=(0,o.jsx)(i,{title:s}),e[0]=s,e[1]=c),c}export{s as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./error-banner.js";import"./useRouterState.js";import{c as i}from"./utils.js";import"./button.js";import{t as a}from"./back-link.js";import{n as o,r as s,t as c}from"./upload-button.js";import"./awsClient.js";import{r as l}from"./s3.js";import{t as u}from"./s32.js";import{f as d}from"./index.js";import{t as f}from"./page-heading.js";import"./alert-dialog.js";import"./delete-confirmation-dialog.js";var p=t(),m=e();function h(){let e=(0,p.c)(31),{bucket:t}=d.useParams(),h;e[0]===t?h=e[1]:(h=u(t),e[0]=t,e[1]=h);let{data:g}=n(h),_=l(),v;e[2]===g.Contents?v=e[3]:(v=g.Contents||[],e[2]=g.Contents,e[3]=v);let y=v,b;e[4]===g.CommonPrefixes?b=e[5]:(b=g.CommonPrefixes||[],e[4]=g.CommonPrefixes,e[5]=b);let x=b,S;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,m.jsx)(a,{to:`/s3/ls`,children:`Back to buckets`}),e[6]=S):S=e[6];let C;e[7]!==t||e[8]!==_.isPending||e[9]!==_.mutateAsync?(C=(0,m.jsx)(c,{bucket:t,isPending:_.isPending,onUpload:_.mutateAsync}),e[7]=t,e[8]=_.isPending,e[9]=_.mutateAsync,e[10]=C):C=e[10];let w;e[11]!==t||e[12]!==C?(w=(0,m.jsx)(f,{actions:C,title:t}),e[11]=t,e[12]=C,e[13]=w):w=e[13];let T;e[14]===_.error?T=e[15]:(T=_.error&&(0,m.jsx)(r,{error:_.error,msg:`Failed to upload object`}),e[14]=_.error,e[15]=T);let E;e[16]!==t||e[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)(s,{bucketName:t,folderName:i(e.Prefix),fullPrefix:e.Prefix},e.Prefix):null)})]}),e[16]=t,e[17]=x,e[18]=E):E=e[18];let D;e[19]!==t||e[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)(o,{bucketName:t,displayName:e.Key,fullKey:e.Key,object:e},e.Key):null)]}),e[19]=t,e[20]=y,e[21]=D):D=e[21];let O;e[22]!==x.length||e[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.`}),e[22]=x.length,e[23]=y.length,e[24]=O):O=e[24];let k;return e[25]!==w||e[26]!==T||e[27]!==E||e[28]!==D||e[29]!==O?(k=(0,m.jsxs)(m.Fragment,{children:[S,w,T,E,D,O]}),e[25]=w,e[26]=T,e[27]=E,e[28]=D,e[29]=O,e[30]=k):k=e[30],k}export{h as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{aK as D,u as b,aL as f,w as v,r as g,j as e,n as I,B as C,L as V}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{B as u}from"./back-link.js";import{D as S}from"./delete-confirmation-dialog.js";import{D as n,a as t}from"./detail-row.js";import{E as y}from"./error-banner.js";import{P}from"./page-heading.js";import{S as B}from"./state-badge.js";import{g as k}from"./ec2.js";import{T as w}from"./trash-2.js";import"./alert-dialog.js";function z(){const{id:l}=D.useParams(),m=b(),{data:p}=d(f(l)),{data:x}=d(v),s=p.Vpcs?.[0],r=k(),[j,o]=g.useState(!1),i=x.Subnets?.filter(a=>a.VpcId===l)??[],h=async()=>{try{await r.mutateAsync(l),m({to:"/ec2/describe-vpcs"})}finally{o(!1)}};if(!s?.VpcId)return e.jsxs(e.Fragment,{children:[e.jsx(u,{to:"/ec2/describe-vpcs",children:"Back to VPCs"}),e.jsx("p",{className:"text-muted-foreground",children:"VPC not found."})]});const c=I(s.Tags);return e.jsxs(e.Fragment,{children:[e.jsx(u,{to:"/ec2/describe-vpcs",children:"Back to VPCs"}),r.error&&e.jsx(y,{error:r.error,msg:"Failed to delete VPC"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(P,{actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(C,{onClick:()=>o(!0),size:"sm",variant:"destructive",children:[e.jsx(w,{className:"size-4"}),"Delete"]}),e.jsx(B,{state:s.State})]}),subtitle:"VPC Details",title:c?`${s.VpcId} (${c})`:s.VpcId}),e.jsxs(n,{children:[e.jsx(n.Header,{children:"VPC Information"}),e.jsxs(n.Content,{children:[e.jsx(t,{label:"VPC ID",value:s.VpcId}),e.jsx(t,{label:"State",value:s.State}),e.jsx(t,{label:"CIDR Block",value:s.CidrBlock}),e.jsx(t,{label:"Is Default",value:s.IsDefault?"Yes":"No"}),e.jsx(t,{label:"DHCP Options ID",value:s.DhcpOptionsId}),e.jsx(t,{label:"Instance Tenancy",value:s.InstanceTenancy}),e.jsx(t,{label:"Owner ID",value:s.OwnerId})]})]}),i.length>0&&e.jsxs(n,{children:[e.jsxs(n.Header,{children:["Subnets (",i.length,")"]}),i.map(a=>a.SubnetId?e.jsxs(n.Content,{children:[e.jsx(t,{label:"Subnet ID",value:e.jsx(V,{className:"text-primary hover:underline",params:{id:a.SubnetId},to:"/ec2/describe-subnets/$id",children:a.SubnetId})}),e.jsx(t,{label:"CIDR Block",value:a.CidrBlock}),e.jsx(t,{label:"Availability Zone",value:a.AvailabilityZone}),e.jsx(t,{label:"State",value:a.State})]},a.SubnetId):null)]})]}),e.jsx(S,{description:`Are you sure you want to delete the VPC "${s.VpcId}"? This action cannot be undone. The VPC must have no associated subnets or internet gateways.`,isPending:r.isPending,onConfirm:h,onOpenChange:o,open:j,title:"Delete VPC"})]})}export{z as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import"./utils.js";import{t as r}from"./back-link.js";import"./awsClient.js";import{n as i}from"./ec22.js";import{t as a}from"./index.js";import{t as o}from"./page-heading.js";import{t as s}from"./state-badge.js";import"./detail-row.js";import{t as c}from"./ami-details.js";var l=t(),u=e();function d(){let e=(0,l.c)(14),{id:t}=a.useParams(),d;e[0]===t?d=e[1]:(d=i(t),e[0]=t,e[1]=d);let{data:f}=n(d),p=f?.Images?.[0];if(!p?.ImageId){let t;return e[2]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r,{to:`/ec2/describe-images`,children:`Back to images`}),(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]}),e[2]=t):t=e[2],t}let m;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,u.jsx)(r,{to:`/ec2/describe-images`,children:`Back to images`}),e[3]=m):m=e[3];let h;e[4]===p.State?h=e[5]:(h=(0,u.jsx)(s,{state:p.State}),e[4]=p.State,e[5]=h);let g;e[6]!==p.ImageId||e[7]!==h?(g=(0,u.jsx)(o,{actions:h,subtitle:`EC2 Image Details`,title:p.ImageId}),e[6]=p.ImageId,e[7]=h,e[8]=g):g=e[8];let _;e[9]===p?_=e[10]:(_=(0,u.jsx)(c,{image:p,showExtendedDetails:!0}),e[9]=p,e[10]=_);let v;return e[11]!==g||e[12]!==_?(v=(0,u.jsxs)(u.Fragment,{children:[m,(0,u.jsxs)(`div`,{className:`space-y-6`,children:[g,_]})]}),e[11]=g,e[12]=_,e[13]=v):v=e[13],v}export{d as component};
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{cY as b,u as p,cZ as x,r as j,j as e,n as S,B as f,L as h}from"./index.js";import{u as D}from"./useSuspenseQuery.js";import{B as l}from"./back-link.js";import{D as g}from"./delete-confirmation-dialog.js";import{D as o,a as s}from"./detail-row.js";import{E as v}from"./error-banner.js";import{P as I}from"./page-heading.js";import{S as y}from"./state-badge.js";import{l as C}from"./ec2.js";import{T as B}from"./trash-2.js";import"./alert-dialog.js";function Z(){const{id:r}=b.useParams(),u=p(),{data:c}=D(x(r)),t=c.Subnets?.[0],a=C(),[d,n]=j.useState(!1),m=async()=>{try{await a.mutateAsync(r),u({to:"/ec2/describe-subnets"})}finally{n(!1)}};if(!t?.SubnetId)return e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/ec2/describe-subnets",children:"Back to Subnets"}),e.jsx("p",{className:"text-muted-foreground",children:"Subnet not found."})]});const i=S(t.Tags);return e.jsxs(e.Fragment,{children:[e.jsx(l,{to:"/ec2/describe-subnets",children:"Back to Subnets"}),a.error&&e.jsx(v,{error:a.error,msg:"Failed to delete subnet"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(I,{actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(f,{onClick:()=>n(!0),size:"sm",variant:"destructive",children:[e.jsx(B,{className:"size-4"}),"Delete"]}),e.jsx(y,{state:t.State})]}),subtitle:"Subnet Details",title:i?`${t.SubnetId} (${i})`:t.SubnetId}),e.jsxs(o,{children:[e.jsx(o.Header,{children:"Subnet Information"}),e.jsxs(o.Content,{children:[e.jsx(s,{label:"Subnet ID",value:t.SubnetId}),e.jsx(s,{label:"VPC ID",value:t.VpcId?e.jsx(h,{className:"text-primary hover:underline",params:{id:t.VpcId},to:"/ec2/describe-vpcs/$id",children:t.VpcId}):"—"}),e.jsx(s,{label:"State",value:t.State}),e.jsx(s,{label:"CIDR Block",value:t.CidrBlock}),e.jsx(s,{label:"Availability Zone",value:t.AvailabilityZone}),e.jsx(s,{label:"Available IP Count",value:t.AvailableIpAddressCount?.toString()}),e.jsx(s,{label:"Map Public IP on Launch",value:t.MapPublicIpOnLaunch?"Yes":"No"}),e.jsx(s,{label:"Default for AZ",value:t.DefaultForAz?"Yes":"No"})]})]})]}),e.jsx(g,{description:`Are you sure you want to delete the subnet "${t.SubnetId}"? This action cannot be undone.`,isPending:a.isPending,onConfirm:m,onOpenChange:n,open:d,title:"Delete Subnet"})]})}export{Z as component};
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./error-banner.js";import"./useRouterState.js";import{t as a}from"./link.js";import{a as o}from"./utils.js";import{t as s}from"./useNavigate.js";import{t as c}from"./button.js";import{t as l}from"./createLucideIcon.js";import{t as u}from"./back-link.js";import{t as d}from"./trash-2.js";import"./separator.js";import"./awsClient.js";import{d as f,n as p}from"./ec2.js";import{l as m,u as h}from"./ec22.js";import{O as g,i 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{i as A,t as j}from"./field.js";import{t as M}from"./delete-confirmation-dialog.js";var N=l(`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`}]]),P=e(n()),F=t();function I(){let{id:e}=_.useParams(),t=s(),{data:n}=r(h(e)),{data:l}=r(m),I=n.Snapshots?.[0],L=f(),R=p(),[z,B]=(0,P.useState)(!1),[V,H]=(0,P.useState)(!1),[U,W]=(0,P.useState)(``),G=l.Regions?.[0]?.RegionName??`ap-southeast-2`,K=I?.State===`completed`,q=async()=>{try{await L.mutateAsync(e),t({to:`/ec2/describe-snapshots`})}finally{B(!1)}},J=async()=>{try{await R.mutateAsync({sourceSnapshotId:e,sourceRegion:G,description:U||void 0}),H(!1),W(``)}catch{}};if(!I?.SnapshotId)return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(u,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),(0,F.jsx)(`p`,{className:`text-muted-foreground`,children:`Snapshot not found.`})]});let Y=o(I.StartTime);return(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)(u,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L.error&&(0,F.jsx)(i,{error:L.error,msg:`Failed to delete snapshot`}),R.error&&(0,F.jsx)(i,{error:R.error,msg:`Failed to copy snapshot`}),(0,F.jsxs)(`div`,{className:`space-y-6`,children:[(0,F.jsx)(v,{actions:(0,F.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,F.jsxs)(c,{disabled:!K,onClick:()=>B(!0),size:`sm`,variant:`destructive`,children:[(0,F.jsx)(d,{className:`size-4`}),`Delete`]}),(0,F.jsxs)(c,{disabled:!K,onClick:()=>H(!0),size:`sm`,variant:`outline`,children:[(0,F.jsx)(N,{className:`size-4`}),`Copy Snapshot`]}),(0,F.jsx)(y,{state:I.State})]}),subtitle:`EC2 Snapshot Details`,title:I.SnapshotId}),(0,F.jsxs)(b,{children:[(0,F.jsx)(b.Header,{children:`Snapshot Information`}),(0,F.jsxs)(b.Content,{children:[(0,F.jsx)(x,{label:`Snapshot ID`,value:I.SnapshotId}),(0,F.jsx)(x,{label:`Volume ID`,value:I.VolumeId?(0,F.jsx)(a,{className:`text-primary hover:underline`,params:{id:I.VolumeId},to:`/ec2/describe-volumes/$id`,children:I.VolumeId}):void 0}),(0,F.jsx)(x,{label:`Volume Size`,value:`${I.VolumeSize} GiB`}),(0,F.jsx)(x,{label:`State`,value:I.State}),(0,F.jsx)(x,{label:`Description`,value:I.Description}),(0,F.jsx)(x,{label:`Progress`,value:I.Progress}),(0,F.jsx)(x,{label:`Start Time`,value:Y}),(0,F.jsx)(x,{label:`Owner ID`,value:I.OwnerId}),(0,F.jsx)(x,{label:`Encrypted`,value:I.Encrypted?`Yes`:`No`})]})]})]}),(0,F.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,F.jsx)(k,{onOpenChange:H,open:V,children:(0,F.jsxs)(C,{children:[(0,F.jsxs)(O,{children:[(0,F.jsx)(w,{children:`Copy Snapshot`}),(0,F.jsx)(S,{children:`Create a copy of this snapshot in the current region.`})]}),(0,F.jsxs)(j,{children:[(0,F.jsx)(A,{children:(0,F.jsx)(`label`,{htmlFor:`copyDescription`,children:`Description (optional)`})}),(0,F.jsx)(g,{id:`copyDescription`,onChange:e=>W(e.target.value),placeholder:`Description for the snapshot copy`,value:U})]}),(0,F.jsxs)(E,{children:[(0,F.jsx)(D,{children:`Cancel`}),(0,F.jsx)(T,{disabled:R.isPending,onClick:J,children:R.isPending?`Copying…`:`Copy Snapshot`})]})]})})]})}export{I as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{K as w,c_ as k,u as N,c$ as B,f as P,r as l,j as e,i as T,B as m,L as F}from"./index.js";import{u}from"./useSuspenseQuery.js";import{B as x}from"./back-link.js";import{D as R}from"./delete-confirmation-dialog.js";import{D as c,a as t}from"./detail-row.js";import{E as g}from"./error-banner.js";import{P as z}from"./page-heading.js";import{S as E}from"./state-badge.js";import{g as V,f as O,b as L,a as $,c as H,d as M,e as Q,h as _}from"./alert-dialog.js";import{b as G,a as K}from"./field.js";import{I as Y}from"./input.js";import{m as q,n as J}from"./ec2.js";import{T as U}from"./trash-2.js";const W=[["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"}]],X=w("copy",W);function he(){const{id:n}=k.useParams(),j=N(),{data:D}=u(B(n)),{data:y}=u(P),s=D.Snapshots?.[0],a=q(),o=J(),[S,i]=l.useState(!1),[f,r]=l.useState(!1),[p,d]=l.useState(""),C=y.Regions?.[0]?.RegionName??"ap-southeast-2",h=s?.State==="completed",v=async()=>{try{await a.mutateAsync(n),j({to:"/ec2/describe-snapshots"})}finally{i(!1)}},b=async()=>{try{await o.mutateAsync({sourceSnapshotId:n,sourceRegion:C,description:p||void 0}),r(!1),d("")}catch{}};if(!s?.SnapshotId)return e.jsxs(e.Fragment,{children:[e.jsx(x,{to:"/ec2/describe-snapshots",children:"Back to snapshots"}),e.jsx("p",{className:"text-muted-foreground",children:"Snapshot not found."})]});const I=T(s.StartTime);return e.jsxs(e.Fragment,{children:[e.jsx(x,{to:"/ec2/describe-snapshots",children:"Back to snapshots"}),a.error&&e.jsx(g,{error:a.error,msg:"Failed to delete snapshot"}),o.error&&e.jsx(g,{error:o.error,msg:"Failed to copy snapshot"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(z,{actions:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(m,{disabled:!h,onClick:()=>i(!0),size:"sm",variant:"destructive",children:[e.jsx(U,{className:"size-4"}),"Delete"]}),e.jsxs(m,{disabled:!h,onClick:()=>r(!0),size:"sm",variant:"outline",children:[e.jsx(X,{className:"size-4"}),"Copy Snapshot"]}),e.jsx(E,{state:s.State})]}),subtitle:"EC2 Snapshot Details",title:s.SnapshotId}),e.jsxs(c,{children:[e.jsx(c.Header,{children:"Snapshot Information"}),e.jsxs(c.Content,{children:[e.jsx(t,{label:"Snapshot ID",value:s.SnapshotId}),e.jsx(t,{label:"Volume ID",value:s.VolumeId?e.jsx(F,{className:"text-primary hover:underline",params:{id:s.VolumeId},to:"/ec2/describe-volumes/$id",children:s.VolumeId}):void 0}),e.jsx(t,{label:"Volume Size",value:`${s.VolumeSize} GiB`}),e.jsx(t,{label:"State",value:s.State}),e.jsx(t,{label:"Description",value:s.Description}),e.jsx(t,{label:"Progress",value:s.Progress}),e.jsx(t,{label:"Start Time",value:I}),e.jsx(t,{label:"Owner ID",value:s.OwnerId}),e.jsx(t,{label:"Encrypted",value:s.Encrypted?"Yes":"No"})]})]})]}),e.jsx(R,{description:`Are you sure you want to delete the snapshot "${s.SnapshotId}"? This action cannot be undone.`,isPending:a.isPending,onConfirm:v,onOpenChange:i,open:S,title:"Delete Snapshot"}),e.jsx(V,{onOpenChange:r,open:f,children:e.jsxs(O,{children:[e.jsxs(L,{children:[e.jsx($,{children:"Copy Snapshot"}),e.jsx(H,{children:"Create a copy of this snapshot in the current region."})]}),e.jsxs(G,{children:[e.jsx(K,{children:e.jsx("label",{htmlFor:"copyDescription",children:"Description (optional)"})}),e.jsx(Y,{id:"copyDescription",onChange:A=>d(A.target.value),placeholder:"Description for the snapshot copy",value:p})]}),e.jsxs(M,{children:[e.jsx(Q,{children:"Cancel"}),e.jsx(_,{disabled:o.isPending,onClick:b,children:o.isPending?"Copying…":"Copy Snapshot"})]})]})})]})}export{he as component};
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./error-banner.js";import"./useRouterState.js";import{t as a}from"./link.js";import{s as o}from"./utils.js";import{t as s}from"./useNavigate.js";import{t as c}from"./button.js";import{t as l}from"./back-link.js";import{t as u}from"./trash-2.js";import"./awsClient.js";import{f as d}from"./ec2.js";import{f}from"./ec22.js";import{a 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"./alert-dialog.js";import{t as v}from"./delete-confirmation-dialog.js";var y=e(n()),b=t();function x(){let{id:e}=p.useParams(),t=s(),{data:n}=r(f(e)),x=n.Subnets?.[0],S=d(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(e),t({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=o(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(i,{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)(u,{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)(a,{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};
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{c as f,d5 as u,j as t,d4 as p}from"./index.js";import{u as x}from"./useSuspenseQuery.js";import{B as d}from"./back-link.js";import{P as I}from"./page-heading.js";import{S as j}from"./state-badge.js";import{A as h}from"./ami-details.js";import"./detail-row.js";function _(){const e=f.c(14),{id:n}=u.useParams();let o;e[0]!==n?(o=p(n),e[0]=n,e[1]=o):o=e[1];const{data:g}=x(o),s=g?.Images?.[0];if(!s?.ImageId){let l;return e[2]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsxs(t.Fragment,{children:[t.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),t.jsx("p",{className:"text-muted-foreground",children:"Image not found."})]}),e[2]=l):l=e[2],l}let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(d,{to:"/ec2/describe-images",children:"Back to images"}),e[3]=r):r=e[3];let a;e[4]!==s.State?(a=t.jsx(j,{state:s.State}),e[4]=s.State,e[5]=a):a=e[5];let i;e[6]!==s.ImageId||e[7]!==a?(i=t.jsx(I,{actions:a,subtitle:"EC2 Image Details",title:s.ImageId}),e[6]=s.ImageId,e[7]=a,e[8]=i):i=e[8];let m;e[9]!==s?(m=t.jsx(h,{image:s,showExtendedDetails:!0}),e[9]=s,e[10]=m):m=e[10];let c;return e[11]!==i||e[12]!==m?(c=t.jsxs(t.Fragment,{children:[r,t.jsxs("div",{className:"space-y-6",children:[i,m]})]}),e[11]=i,e[12]=m,e[13]=c):c=e[13],c}export{_ as component};
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./error-banner.js";import"./useRouterState.js";import{t as a}from"./link.js";import{s as o}from"./utils.js";import{t as s}from"./useNavigate.js";import{t as c}from"./button.js";import{t as l}from"./back-link.js";import{t as u}from"./trash-2.js";import"./awsClient.js";import{m as d}from"./ec2.js";import{g as f,p}from"./ec22.js";import{c 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"./alert-dialog.js";import{t as y}from"./delete-confirmation-dialog.js";var b=e(n()),x=t();function S(){let{id:e}=m.useParams(),t=s(),{data:n}=r(f(e)),{data:S}=r(p),C=n.Vpcs?.[0],w=d(),[T,E]=(0,b.useState)(!1),D=S.Subnets?.filter(t=>t.VpcId===e)??[],O=async()=>{try{await w.mutateAsync(e),t({to:`/ec2/describe-vpcs`})}finally{E(!1)}};if(!C?.VpcId)return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(l,{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)(l,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(i,{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)(u,{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};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as f,j as e,aw as j,u as P,ax as h,r as g,ay as v,B as N,i as b}from"./index.js";import{u}from"./useSuspenseQuery.js";import{B as p}from"./back-link.js";import{D as C}from"./delete-confirmation-dialog.js";import{D as l,a as n}from"./detail-row.js";import{E as w}from"./error-banner.js";import{P as A}from"./page-heading.js";import{h as I}from"./iam.js";import{T as B}from"./trash-2.js";import"./alert-dialog.js";function R(r){const t=f.c(4),{document:a}=r;let s;try{let i;t[0]!==a?(i=JSON.stringify(JSON.parse(a),null,2),t[0]=a,t[1]=i):i=t[1],s=i}catch{s=a}let o;return t[2]!==s?(o=e.jsx("pre",{className:"overflow-auto rounded-md border bg-muted p-4 font-mono text-sm",children:s}),t[2]=s,t[3]=o):o=t[3],o}function J(){const{policyArn:r}=j.useParams(),t=decodeURIComponent(r),a=P(),{data:s}=u(h(t)),o=s.Policy,i=I(),[y,c]=g.useState(!1),x=o?.DefaultVersionId??"v1",{data:m}=u(v(t,x)),d=m?.PolicyVersion?.Document?decodeURIComponent(m.PolicyVersion.Document):null,D=async()=>{try{await i.mutateAsync(t),a({to:"/iam/list-policies"})}finally{c(!1)}};return o?e.jsxs(e.Fragment,{children:[e.jsx(p,{to:"/iam/list-policies",children:"Back to policies"}),i.error&&e.jsx(w,{error:i.error,msg:"Failed to delete policy"}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(A,{actions:e.jsxs(N,{onClick:()=>c(!0),size:"sm",variant:"destructive",children:[e.jsx(B,{className:"size-4"}),"Delete"]}),subtitle:"IAM Policy Details",title:o.PolicyName??""}),e.jsxs(l,{children:[e.jsx(l.Header,{children:"Policy Information"}),e.jsxs(l.Content,{children:[e.jsx(n,{label:"Policy Name",value:o.PolicyName}),e.jsx(n,{label:"Policy ID",value:o.PolicyId}),e.jsx(n,{label:"ARN",value:o.Arn}),e.jsx(n,{label:"Path",value:o.Path}),e.jsx(n,{label:"Description",value:o.Description||"-"}),e.jsx(n,{label:"Created",value:b(o.CreateDate)})]})]}),d&&e.jsxs(l,{children:[e.jsx(l.Header,{children:"Policy Document"}),e.jsx("div",{className:"p-4",children:e.jsx(R,{document:d})})]})]}),e.jsx(C,{description:`Are you sure you want to delete the policy "${o.PolicyName}"? This action cannot be undone.`,isPending:i.isPending,onConfirm:D,onOpenChange:c,open:y,title:"Delete Policy"})]}):e.jsxs(e.Fragment,{children:[e.jsx(p,{to:"/iam/list-policies",children:"Back to policies"}),e.jsx("p",{className:"text-muted-foreground",children:"Policy not found."})]})}export{J as component};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./error-banner.js";import"./useRouterState.js";import{a as o}from"./utils.js";import{t as s}from"./useNavigate.js";import{t as c}from"./button.js";import{t as l}from"./back-link.js";import{t as u}from"./trash-2.js";import"./awsClient.js";import{o as d}from"./iam.js";import{a as f,i as p}from"./iam2.js";import{l as m}from"./index.js";import{t as h}from"./page-heading.js";import{n as g,t as _}from"./detail-row.js";import"./alert-dialog.js";import{t as v}from"./delete-confirmation-dialog.js";var y=e(n()),b=r(),x=t();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:e}=m.useParams(),t=decodeURIComponent(e),n=s(),{data:r}=i(p(t)),b=r.Policy,C=d(),[w,T]=(0,y.useState)(!1),{data:E}=i(f(t,b?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return b?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(l,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,x.jsx)(a,{error:C.error,msg:`Failed to delete policy`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(c,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(u,{className:`size-4`}),`Delete`]}),subtitle:`IAM 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:o(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(t),n({to:`/iam/list-policies`})}finally{T(!1)}},onOpenChange:T,open:w,title:`Delete Policy`})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(l,{to:`/iam/list-policies`,children:`Back to policies`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{C as component};
|
||||
+1
-2
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{c as g,i as k,j as t,L as M}from"./index.js";import{D as T,a}from"./detail-row.js";function C(s){const e=g.c(58),{image:l,showExtendedDetails:P}=s,i=P===void 0?!1:P;let E;e[0]!==l.CreationDate?(E=k(l.CreationDate),e[0]=l.CreationDate,e[1]=E):E=e[1];const R=E,S=i?"AMI Information":"AMI Details";let o;e[2]!==S?(o=t.jsx(T.Header,{children:S}),e[2]=S,e[3]=o):o=e[3];let r;e[4]!==l.ImageId||e[5]!==i?(r=l.ImageId&&!i?t.jsx(M,{className:"text-primary hover:underline",params:{id:l.ImageId},to:"/ec2/describe-images/$id",children:l.ImageId}):l.ImageId,e[4]=l.ImageId,e[5]=i,e[6]=r):r=e[6];let c;e[7]!==r?(c=t.jsx(a,{label:"AMI ID",value:r}),e[7]=r,e[8]=c):c=e[8];let n;e[9]!==l.Name?(n=t.jsx(a,{label:"AMI Name",value:l.Name}),e[9]=l.Name,e[10]=n):n=e[10];let u;e[11]!==l.Description?(u=t.jsx(a,{label:"Description",value:l.Description}),e[11]=l.Description,e[12]=u):u=e[12];let m;e[13]!==l.Architecture?(m=t.jsx(a,{label:"Architecture",value:l.Architecture}),e[13]=l.Architecture,e[14]=m):m=e[14];let v;e[15]!==l.VirtualizationType?(v=t.jsx(a,{label:"Virtualization Type",value:l.VirtualizationType}),e[15]=l.VirtualizationType,e[16]=v):v=e[16];const A=l.Platform||"Linux";let D;e[17]!==A?(D=t.jsx(a,{label:"Platform",value:A}),e[17]=A,e[18]=D):D=e[18];let d;e[19]!==l.PlatformDetails?(d=t.jsx(a,{label:"Platform Details",value:l.PlatformDetails}),e[19]=l.PlatformDetails,e[20]=d):d=e[20];let x;e[21]!==l.ImageType?(x=t.jsx(a,{label:"Image Type",value:l.ImageType}),e[21]=l.ImageType,e[22]=x):x=e[22];let b;e[23]!==l.RootDeviceType?(b=t.jsx(a,{label:"Root Device Type",value:l.RootDeviceType}),e[23]=l.RootDeviceType,e[24]=b):b=e[24];let j;e[25]!==l.RootDeviceName?(j=t.jsx(a,{label:"Root Device Name",value:l.RootDeviceName}),e[25]=l.RootDeviceName,e[26]=j):j=e[26];let f;e[27]!==l.OwnerId?(f=t.jsx(a,{label:"Owner",value:l.OwnerId}),e[27]=l.OwnerId,e[28]=f):f=e[28];let I;e[29]!==l.State?(I=t.jsx(a,{label:"State",value:l.State}),e[29]=l.State,e[30]=I):I=e[30];let h;e[31]!==R||e[32]!==l.Public||e[33]!==i?(h=i&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Creation Date",value:R}),t.jsx(a,{label:"Public",value:l.Public?"Yes":"No"})]}),e[31]=R,e[32]=l.Public,e[33]=i,e[34]=h):h=e[34];let p;e[35]!==v||e[36]!==D||e[37]!==d||e[38]!==x||e[39]!==b||e[40]!==j||e[41]!==f||e[42]!==I||e[43]!==h||e[44]!==c||e[45]!==n||e[46]!==u||e[47]!==m?(p=t.jsxs(T.Content,{children:[c,n,u,m,v,D,d,x,b,j,f,I,h]}),e[35]=v,e[36]=D,e[37]=d,e[38]=x,e[39]=b,e[40]=j,e[41]=f,e[42]=I,e[43]=h,e[44]=c,e[45]=n,e[46]=u,e[47]=m,e[48]=p):p=e[48];let N;e[49]!==p||e[50]!==o?(N=t.jsxs(T,{children:[o,p]}),e[49]=p,e[50]=o,e[51]=N):N=e[51];let y;e[52]!==l.BlockDeviceMappings||e[53]!==i?(y=i&&l.BlockDeviceMappings&&l.BlockDeviceMappings.length>0&&l.BlockDeviceMappings.map(w),e[52]=l.BlockDeviceMappings,e[53]=i,e[54]=y):y=e[54];let V;return e[55]!==N||e[56]!==y?(V=t.jsxs(t.Fragment,{children:[N,y]}),e[55]=N,e[56]=y,e[57]=V):V=e[57],V}function w(s){return t.jsxs(T,{children:[t.jsxs(T.Header,{children:["Block Device: ",s.DeviceName]}),t.jsxs(T.Content,{children:[t.jsx(a,{label:"Device Name",value:s.DeviceName}),s.Ebs&&t.jsxs(t.Fragment,{children:[t.jsx(a,{label:"Volume Size",value:s.Ebs.VolumeSize?`${s.Ebs.VolumeSize} GB`:void 0}),t.jsx(a,{label:"Volume Type",value:s.Ebs.VolumeType}),t.jsx(a,{label:"Delete On Termination",value:s.Ebs.DeleteOnTermination?"Yes":"No"}),t.jsx(a,{label:"Encrypted",value:s.Ebs.Encrypted?"Yes":"No"}),s.Ebs.SnapshotId&&t.jsx(a,{label:"Snapshot ID",value:t.jsx(M,{className:"text-primary hover:underline",params:{id:s.Ebs.SnapshotId},to:"/ec2/describe-snapshots/$id",children:s.Ebs.SnapshotId})})]}),s.VirtualName&&t.jsx(a,{label:"Virtual Name",value:s.VirtualName})]})]},s.DeviceName)}export{C as A};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{a as r}from"./utils.js";import{n as i,t as a}from"./detail-row.js";var o=t(),s=e();function c(e){let t=(0,o.c)(58),{image:c,showExtendedDetails:u}=e,d=u===void 0?!1:u,f;t[0]===c.CreationDate?f=t[1]:(f=r(c.CreationDate),t[0]=c.CreationDate,t[1]=f);let p=f,m=d?`AMI Information`:`AMI Details`,h;t[2]===m?h=t[3]:(h=(0,s.jsx)(i.Header,{children:m}),t[2]=m,t[3]=h);let g;t[4]!==c.ImageId||t[5]!==d?(g=c.ImageId&&!d?(0,s.jsx)(n,{className:`text-primary hover:underline`,params:{id:c.ImageId},to:`/ec2/describe-images/$id`,children:c.ImageId}):c.ImageId,t[4]=c.ImageId,t[5]=d,t[6]=g):g=t[6];let _;t[7]===g?_=t[8]:(_=(0,s.jsx)(a,{label:`AMI ID`,value:g}),t[7]=g,t[8]=_);let v;t[9]===c.Name?v=t[10]:(v=(0,s.jsx)(a,{label:`AMI Name`,value:c.Name}),t[9]=c.Name,t[10]=v);let y;t[11]===c.Description?y=t[12]:(y=(0,s.jsx)(a,{label:`Description`,value:c.Description}),t[11]=c.Description,t[12]=y);let b;t[13]===c.Architecture?b=t[14]:(b=(0,s.jsx)(a,{label:`Architecture`,value:c.Architecture}),t[13]=c.Architecture,t[14]=b);let x;t[15]===c.VirtualizationType?x=t[16]:(x=(0,s.jsx)(a,{label:`Virtualization Type`,value:c.VirtualizationType}),t[15]=c.VirtualizationType,t[16]=x);let S=c.Platform||`Linux`,C;t[17]===S?C=t[18]:(C=(0,s.jsx)(a,{label:`Platform`,value:S}),t[17]=S,t[18]=C);let w;t[19]===c.PlatformDetails?w=t[20]:(w=(0,s.jsx)(a,{label:`Platform Details`,value:c.PlatformDetails}),t[19]=c.PlatformDetails,t[20]=w);let T;t[21]===c.ImageType?T=t[22]:(T=(0,s.jsx)(a,{label:`Image Type`,value:c.ImageType}),t[21]=c.ImageType,t[22]=T);let E;t[23]===c.RootDeviceType?E=t[24]:(E=(0,s.jsx)(a,{label:`Root Device Type`,value:c.RootDeviceType}),t[23]=c.RootDeviceType,t[24]=E);let D;t[25]===c.RootDeviceName?D=t[26]:(D=(0,s.jsx)(a,{label:`Root Device Name`,value:c.RootDeviceName}),t[25]=c.RootDeviceName,t[26]=D);let O;t[27]===c.OwnerId?O=t[28]:(O=(0,s.jsx)(a,{label:`Owner`,value:c.OwnerId}),t[27]=c.OwnerId,t[28]=O);let k;t[29]===c.State?k=t[30]:(k=(0,s.jsx)(a,{label:`State`,value:c.State}),t[29]=c.State,t[30]=k);let A;t[31]!==p||t[32]!==c.Public||t[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`})]}),t[31]=p,t[32]=c.Public,t[33]=d,t[34]=A):A=t[34];let j;t[35]!==x||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==D||t[41]!==O||t[42]!==k||t[43]!==A||t[44]!==_||t[45]!==v||t[46]!==y||t[47]!==b?(j=(0,s.jsxs)(i.Content,{children:[_,v,y,b,x,C,w,T,E,D,O,k,A]}),t[35]=x,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=O,t[42]=k,t[43]=A,t[44]=_,t[45]=v,t[46]=y,t[47]=b,t[48]=j):j=t[48];let M;t[49]!==j||t[50]!==h?(M=(0,s.jsxs)(i,{children:[h,j]}),t[49]=j,t[50]=h,t[51]=M):M=t[51];let N;t[52]!==c.BlockDeviceMappings||t[53]!==d?(N=d&&c.BlockDeviceMappings&&c.BlockDeviceMappings.length>0&&c.BlockDeviceMappings.map(l),t[52]=c.BlockDeviceMappings,t[53]=d,t[54]=N):N=t[54];let P;return t[55]!==M||t[56]!==N?(P=(0,s.jsxs)(s.Fragment,{children:[M,N]}),t[55]=M,t[56]=N,t[57]=P):P=t[57],P}function l(e){return(0,s.jsxs)(i,{children:[(0,s.jsxs)(i.Header,{children:[`Block Device: `,e.DeviceName]}),(0,s.jsxs)(i.Content,{children:[(0,s.jsx)(a,{label:`Device Name`,value:e.DeviceName}),e.Ebs&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a,{label:`Volume Size`,value:e.Ebs.VolumeSize?`${e.Ebs.VolumeSize} GB`:void 0}),(0,s.jsx)(a,{label:`Volume Type`,value:e.Ebs.VolumeType}),(0,s.jsx)(a,{label:`Delete On Termination`,value:e.Ebs.DeleteOnTermination?`Yes`:`No`}),(0,s.jsx)(a,{label:`Encrypted`,value:e.Ebs.Encrypted?`Yes`:`No`}),e.Ebs.SnapshotId&&(0,s.jsx)(a,{label:`Snapshot ID`,value:(0,s.jsx)(n,{className:`text-primary hover:underline`,params:{id:e.Ebs.SnapshotId},to:`/ec2/describe-snapshots/$id`,children:e.Ebs.SnapshotId})})]}),e.VirtualName&&(0,s.jsx)(a,{label:`Virtual Name`,value:e.VirtualName})]})]},e.DeviceName)}export{c as t};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{K as o,c as r,j as l,L 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{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./createLucideIcon.js";var i=r(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),a=t(),o=e();function s(e){let t=(0,a.c)(7),r,s;t[0]===e?(r=t[1],s=t[2]):({children:r,...s}=e,t[0]=e,t[1]=r,t[2]=s);let c;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,o.jsx)(i,{className:`size-4`}),t[3]=c):c=t[3];let l;return t[4]!==r||t[5]!==s?(l=(0,o.jsxs)(n,{className:`mb-6 inline-flex items-center gap-2 text-sm`,...s,children:[c,r]}),t[4]=r,t[5]=s,t[6]=l):l=t[6],l}export{s as t};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{K 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{t as e}from"./createLucideIcon.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{o as C,k as P,c as _,u as v,j as t}from"./index.js";import{a as E,u as z}from"./zod.js";import{B as M}from"./back-link.js";import{E as L}from"./error-banner.js";import{F as $}from"./form-actions.js";import{P as A}from"./page-heading.js";import{F as I,a as R,b as H}from"./field.js";import{I as O}from"./input.js";import{u as T}from"./s3.js";const q=C({bucketName:P().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")});function Y(){const e=_.c(35),r=v(),s=T();let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f={resolver:E(q)},e[0]=f):f=e[0];const{handleSubmit:j,register:B,formState:S}=z(f),{errors:b,isSubmitting:y}=S;let p;e[1]!==s||e[2]!==r?(p=async w=>{await s.mutateAsync(w),r({to:"/s3/ls"})},e[1]=s,e[2]=r,e[3]=p):p=e[3];const N=p;let k,x;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(M,{to:"/s3/ls",children:"Back to buckets"}),x=t.jsx(A,{title:"Create Bucket"}),e[4]=k,e[5]=x):(k=e[4],x=e[5]);let a;e[6]!==s.error?(a=s.error&&t.jsx(L,{error:s.error,msg:"Failed to create bucket"}),e[6]=s.error,e[7]=a):a=e[7];let i;e[8]!==j||e[9]!==N?(i=j(N),e[8]=j,e[9]=N,e[10]=i):i=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(R,{children:t.jsx("label",{htmlFor:"bucketName",children:"Bucket Name"})}),e[11]=h):h=e[11];const F=!!b.bucketName;let o;e[12]!==B?(o=B("bucketName"),e[12]=B,e[13]=o):o=e[13];let n;e[14]!==F||e[15]!==o?(n=t.jsx(O,{"aria-invalid":F,id:"bucketName",placeholder:"my-bucket",type:"text",...o}),e[14]=F,e[15]=o,e[16]=n):n=e[16];let c;e[17]!==b.bucketName?(c=t.jsx(I,{errors:[b.bucketName]}),e[17]=b.bucketName,e[18]=c):c=e[18];let l;e[19]!==n||e[20]!==c?(l=t.jsxs(H,{children:[h,n,c]}),e[19]=n,e[20]=c,e[21]=l):l=e[21];let m;e[22]!==r?(m=()=>r({to:"/s3/ls"}),e[22]=r,e[23]=m):m=e[23];let u;e[24]!==s.isPending||e[25]!==y||e[26]!==m?(u=t.jsx($,{isPending:s.isPending,isSubmitting:y,onCancel:m,pendingLabel:"Creating\\u2026",submitLabel:"Create Bucket"}),e[24]=s.isPending,e[25]=y,e[26]=m,e[27]=u):u=e[27];let d;e[28]!==l||e[29]!==u||e[30]!==i?(d=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:i,children:[l,u]}),e[28]=l,e[29]=u,e[30]=i,e[31]=d):d=e[31];let g;return e[32]!==d||e[33]!==a?(g=t.jsxs(t.Fragment,{children:[k,x,a,d]}),e[32]=d,e[33]=a,e[34]=g):g=e[34],g}export{Y as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./error-banner.js";import"./useRouterState.js";import"./utils.js";import{t as r}from"./useNavigate.js";import"./button.js";import{t as i}from"./back-link.js";import"./separator.js";import{Qt as a,Zt as o}from"./awsClient.js";import{t as s}from"./s3.js";import{O as c}from"./index.js";import{t as l}from"./page-heading.js";import{i as u,n as d,t as f}from"./field.js";import{r as p,t as m}from"./zod.js";import{t as h}from"./form-actions.js";var g=t(),_=o({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`)}),v=e();function y(){let e=(0,g.c)(35),t=r(),a=s(),o;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(o={resolver:m(_)},e[0]=o):o=e[0];let{handleSubmit:y,register:b,formState:x}=p(o),{errors:S,isSubmitting:C}=x,w;e[1]!==a||e[2]!==t?(w=async e=>{await a.mutateAsync(e),t({to:`/s3/ls`})},e[1]=a,e[2]=t,e[3]=w):w=e[3];let T=w,E,D;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,v.jsx)(i,{to:`/s3/ls`,children:`Back to buckets`}),D=(0,v.jsx)(l,{title:`Create Bucket`}),e[4]=E,e[5]=D):(E=e[4],D=e[5]);let O;e[6]===a.error?O=e[7]:(O=a.error&&(0,v.jsx)(n,{error:a.error,msg:`Failed to create bucket`}),e[6]=a.error,e[7]=O);let k;e[8]!==y||e[9]!==T?(k=y(T),e[8]=y,e[9]=T,e[10]=k):k=e[10];let A;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,v.jsx)(u,{children:(0,v.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),e[11]=A):A=e[11];let j=!!S.bucketName,M;e[12]===b?M=e[13]:(M=b(`bucketName`),e[12]=b,e[13]=M);let N;e[14]!==j||e[15]!==M?(N=(0,v.jsx)(c,{"aria-invalid":j,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...M}),e[14]=j,e[15]=M,e[16]=N):N=e[16];let P;e[17]===S.bucketName?P=e[18]:(P=(0,v.jsx)(d,{errors:[S.bucketName]}),e[17]=S.bucketName,e[18]=P);let F;e[19]!==N||e[20]!==P?(F=(0,v.jsxs)(f,{children:[A,N,P]}),e[19]=N,e[20]=P,e[21]=F):F=e[21];let I;e[22]===t?I=e[23]:(I=()=>t({to:`/s3/ls`}),e[22]=t,e[23]=I);let L;e[24]!==a.isPending||e[25]!==C||e[26]!==I?(L=(0,v.jsx)(h,{isPending:a.isPending,isSubmitting:C,onCancel:I,pendingLabel:`Creating\\u2026`,submitLabel:`Create Bucket`}),e[24]=a.isPending,e[25]=C,e[26]=I,e[27]=L):L=e[27];let R;e[28]!==F||e[29]!==L||e[30]!==k?(R=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:k,children:[F,L]}),e[28]=F,e[29]=L,e[30]=k,e[31]=R):R=e[31];let z;return e[32]!==R||e[33]!==O?(z=(0,v.jsxs)(v.Fragment,{children:[E,D,O,R]}),e[32]=R,e[33]=O,e[34]=z):z=e[34],z}export{y as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{c as V,u as H,j as t}from"./index.js";import{a as Y,u as $}from"./zod.js";import{B as q}from"./back-link.js";import{E as z}from"./error-banner.js";import{F as G}from"./form-actions.js";import{P as K}from"./page-heading.js";import{F as k,a as I,b as R}from"./field.js";import{I as J}from"./input.js";import{T as Q}from"./textarea.js";import{a as W}from"./iam.js";import{a as X}from"./iam2.js";const Z=JSON.stringify({Version:"2012-10-17",Statement:[{Effect:"Allow",Action:"*",Resource:"*"}]},null,2);function pe(){const e=V.c(58),s=H(),o=W();let S;e[0]===Symbol.for("react.memo_cache_sentinel")?(S={resolver:Y(X),defaultValues:{policyDocument:Z}},e[0]=S):S=e[0];const{handleSubmit:L,register:l,formState:M}=$(S),{errors:i,isSubmitting:T}=M;let F;e[1]!==o||e[2]!==s?(F=async U=>{await o.mutateAsync(U),s({to:"/iam/list-policies"})},e[1]=o,e[2]=s,e[3]=F):F=e[3];const w=F;let D,_;e[4]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(q,{to:"/iam/list-policies",children:"Back to policies"}),_=t.jsx(K,{title:"Create Policy"}),e[4]=D,e[5]=_):(D=e[4],_=e[5]);let r;e[6]!==o.error?(r=o.error&&t.jsx(z,{error:o.error,msg:"Failed to create policy"}),e[6]=o.error,e[7]=r):r=e[7];let c;e[8]!==L||e[9]!==w?(c=L(w),e[8]=L,e[9]=w,e[10]=c):c=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(I,{children:t.jsx("label",{htmlFor:"policyName",children:"Policy Name"})}),e[11]=C):C=e[11];const B=!!i.policyName;let a;e[12]!==l?(a=l("policyName"),e[12]=l,e[13]=a):a=e[13];let n;e[14]!==B||e[15]!==a?(n=t.jsx(J,{"aria-invalid":B,id:"policyName",placeholder:"my-policy...",...a}),e[14]=B,e[15]=a,e[16]=n):n=e[16];let m;e[17]!==i.policyName?(m=t.jsx(k,{errors:[i.policyName]}),e[17]=i.policyName,e[18]=m):m=e[18];let p;e[19]!==n||e[20]!==m?(p=t.jsxs(R,{children:[C,n,m]}),e[19]=n,e[20]=m,e[21]=p):p=e[21];let E;e[22]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(I,{children:t.jsx("label",{htmlFor:"description",children:"Description (optional)"})}),e[22]=E):E=e[22];let f;e[23]!==l?(f=l("description"),e[23]=l,e[24]=f):f=e[24];let d;e[25]!==f?(d=t.jsx(J,{id:"description",placeholder:"A brief description of this policy...",...f}),e[25]=f,e[26]=d):d=e[26];let y;e[27]!==i.description?(y=t.jsx(k,{errors:[i.description]}),e[27]=i.description,e[28]=y):y=e[28];let u;e[29]!==d||e[30]!==y?(u=t.jsxs(R,{children:[E,d,y]}),e[29]=d,e[30]=y,e[31]=u):u=e[31];let A;e[32]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(I,{children:t.jsx("label",{htmlFor:"policyDocument",children:"Policy Document (JSON)"})}),e[32]=A):A=e[32];const O=!!i.policyDocument;let x;e[33]!==l?(x=l("policyDocument"),e[33]=l,e[34]=x):x=e[34];let h;e[35]!==O||e[36]!==x?(h=t.jsx(Q,{"aria-invalid":O,className:"font-mono text-sm",id:"policyDocument",rows:15,...x}),e[35]=O,e[36]=x,e[37]=h):h=e[37];let j;e[38]!==i.policyDocument?(j=t.jsx(k,{errors:[i.policyDocument]}),e[38]=i.policyDocument,e[39]=j):j=e[39];let b;e[40]!==h||e[41]!==j?(b=t.jsxs(R,{children:[A,h,j]}),e[40]=h,e[41]=j,e[42]=b):b=e[42];let g;e[43]!==s?(g=()=>s({to:"/iam/list-policies"}),e[43]=s,e[44]=g):g=e[44];let N;e[45]!==o.isPending||e[46]!==T||e[47]!==g?(N=t.jsx(G,{isPending:o.isPending,isSubmitting:T,onCancel:g,pendingLabel:"Creating...",submitLabel:"Create Policy"}),e[45]=o.isPending,e[46]=T,e[47]=g,e[48]=N):N=e[48];let P;e[49]!==p||e[50]!==u||e[51]!==b||e[52]!==N||e[53]!==c?(P=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:c,children:[p,u,b,N]}),e[49]=p,e[50]=u,e[51]=b,e[52]=N,e[53]=c,e[54]=P):P=e[54];let v;return e[55]!==P||e[56]!==r?(v=t.jsxs(t.Fragment,{children:[D,_,r,P]}),e[55]=P,e[56]=r,e[57]=v):v=e[57],v}export{pe as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./error-banner.js";import"./useRouterState.js";import"./utils.js";import{t as r}from"./useNavigate.js";import"./button.js";import{t as i}from"./back-link.js";import"./separator.js";import"./awsClient.js";import{r as a}from"./iam.js";import{O as o}from"./index.js";import{t as s}from"./page-heading.js";import{i as c,n as l,t as u}from"./field.js";import{t as d}from"./textarea.js";import{r as f,t as p}from"./zod.js";import{t as m}from"./form-actions.js";import{t as h}from"./iam3.js";var g=t(),_=e(),v=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function y(){let e=(0,g.c)(58),t=r(),y=a(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:p(h),defaultValues:{policyDocument:v}},e[0]=b):b=e[0];let{handleSubmit:x,register:S,formState:C}=f(b),{errors:w,isSubmitting:T}=C,E;e[1]!==y||e[2]!==t?(E=async e=>{await y.mutateAsync(e),t({to:`/iam/list-policies`})},e[1]=y,e[2]=t,e[3]=E):E=e[3];let D=E,O,k;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,_.jsx)(i,{to:`/iam/list-policies`,children:`Back to policies`}),k=(0,_.jsx)(s,{title:`Create Policy`}),e[4]=O,e[5]=k):(O=e[4],k=e[5]);let A;e[6]===y.error?A=e[7]:(A=y.error&&(0,_.jsx)(n,{error:y.error,msg:`Failed to create policy`}),e[6]=y.error,e[7]=A);let j;e[8]!==x||e[9]!==D?(j=x(D),e[8]=x,e[9]=D,e[10]=j):j=e[10];let M;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),e[11]=M):M=e[11];let N=!!w.policyName,P;e[12]===S?P=e[13]:(P=S(`policyName`),e[12]=S,e[13]=P);let F;e[14]!==N||e[15]!==P?(F=(0,_.jsx)(o,{"aria-invalid":N,id:`policyName`,placeholder:`my-policy...`,...P}),e[14]=N,e[15]=P,e[16]=F):F=e[16];let I;e[17]===w.policyName?I=e[18]:(I=(0,_.jsx)(l,{errors:[w.policyName]}),e[17]=w.policyName,e[18]=I);let L;e[19]!==F||e[20]!==I?(L=(0,_.jsxs)(u,{children:[M,F,I]}),e[19]=F,e[20]=I,e[21]=L):L=e[21];let R;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[22]=R):R=e[22];let z;e[23]===S?z=e[24]:(z=S(`description`),e[23]=S,e[24]=z);let B;e[25]===z?B=e[26]:(B=(0,_.jsx)(o,{id:`description`,placeholder:`A brief description of this policy...`,...z}),e[25]=z,e[26]=B);let V;e[27]===w.description?V=e[28]:(V=(0,_.jsx)(l,{errors:[w.description]}),e[27]=w.description,e[28]=V);let H;e[29]!==B||e[30]!==V?(H=(0,_.jsxs)(u,{children:[R,B,V]}),e[29]=B,e[30]=V,e[31]=H):H=e[31];let U;e[32]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),e[32]=U):U=e[32];let W=!!w.policyDocument,G;e[33]===S?G=e[34]:(G=S(`policyDocument`),e[33]=S,e[34]=G);let K;e[35]!==W||e[36]!==G?(K=(0,_.jsx)(d,{"aria-invalid":W,className:`font-mono text-sm`,id:`policyDocument`,rows:15,...G}),e[35]=W,e[36]=G,e[37]=K):K=e[37];let q;e[38]===w.policyDocument?q=e[39]:(q=(0,_.jsx)(l,{errors:[w.policyDocument]}),e[38]=w.policyDocument,e[39]=q);let J;e[40]!==K||e[41]!==q?(J=(0,_.jsxs)(u,{children:[U,K,q]}),e[40]=K,e[41]=q,e[42]=J):J=e[42];let Y;e[43]===t?Y=e[44]:(Y=()=>t({to:`/iam/list-policies`}),e[43]=t,e[44]=Y);let X;e[45]!==y.isPending||e[46]!==T||e[47]!==Y?(X=(0,_.jsx)(m,{isPending:y.isPending,isSubmitting:T,onCancel:Y,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),e[45]=y.isPending,e[46]=T,e[47]=Y,e[48]=X):X=e[48];let Z;e[49]!==L||e[50]!==H||e[51]!==J||e[52]!==X||e[53]!==j?(Z=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,J,X]}),e[49]=L,e[50]=H,e[51]=J,e[52]=X,e[53]=j,e[54]=Z):Z=e[54];let Q;return e[55]!==Z||e[56]!==A?(Q=(0,_.jsxs)(_.Fragment,{children:[O,k,A,Z]}),e[55]=Z,e[56]=A,e[57]=Q):Q=e[57],Q}export{y as component};
|
||||
@@ -1 +1 @@
|
||||
import{c as z,u as G,p as H,R as M,j as t}from"./index.js";import{a as O,u as $,C as q}from"./zod.js";import{u as J}from"./useSuspenseQuery.js";import{B as K}from"./back-link.js";import{E as U}from"./error-banner.js";import{F as W}from"./form-actions.js";import{P as X}from"./page-heading.js";import{F as Y,b as L,a as N}from"./field.js";import{S as Z,a as ee,b as te,c as se,d as oe}from"./select.js";import{T as re}from"./textarea.js";import{c as le}from"./ec2.js";import{d as ie}from"./ec22.js";import"./check.js";function Ie(){const e=z.c(46),o=G(),{data:y}=J(H),s=le();let x;e[0]!==y.Volumes?(x=y.Volumes??[],e[0]=y.Volumes,e[1]=x):x=e[1];const S=x,{volumeId:A}=M.useSearch(),_=A??S[0]?.VolumeId??"";let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=O(ie),e[2]=j):j=e[2];let b;e[3]!==_?(b={resolver:j,defaultValues:{volumeId:_,description:""}},e[3]=_,e[4]=b):b=e[4];const{control:P,handleSubmit:B,register:E,formState:D}=$(b),{errors:r,isSubmitting:R}=D;let g;e[5]!==s||e[6]!==o?(g=async k=>{await s.mutateAsync(k),o({to:"/ec2/describe-snapshots"})},e[5]=s,e[6]=o,e[7]=g):g=e[7];const T=g;let I,v;e[8]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(K,{to:"/ec2/describe-snapshots",children:"Back to snapshots"}),v=t.jsx(X,{title:"Create Snapshot"}),e[8]=I,e[9]=v):(I=e[8],v=e[9]);let l;e[10]!==s.error?(l=s.error&&t.jsx(U,{error:s.error,msg:"Failed to create snapshot"}),e[10]=s.error,e[11]=l):l=e[11];let i;e[12]!==B||e[13]!==T?(i=B(T),e[12]=B,e[13]=T,e[14]=i):i=e[14];let V;e[15]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx(N,{children:t.jsx("label",{htmlFor:"volumeId",children:"Volume"})}),e[15]=V):V=e[15];let a;e[16]!==r.volumeId||e[17]!==S?(a=k=>{const{field:w}=k;return t.jsxs(Z,{onValueChange:Q=>w.onChange(Q),value:w.value??"",children:[t.jsx(ee,{"aria-invalid":!!r.volumeId,className:"w-full",id:"volumeId",children:t.jsx(te,{})}),t.jsx(se,{children:S.map(ae)})]})},e[16]=r.volumeId,e[17]=S,e[18]=a):a=e[18];let n;e[19]!==P||e[20]!==a?(n=t.jsx(q,{control:P,name:"volumeId",render:a}),e[19]=P,e[20]=a,e[21]=n):n=e[21];let m;e[22]!==r.volumeId?(m=t.jsx(Y,{errors:[r.volumeId]}),e[22]=r.volumeId,e[23]=m):m=e[23];let c;e[24]!==n||e[25]!==m?(c=t.jsxs(L,{children:[V,n,m]}),e[24]=n,e[25]=m,e[26]=c):c=e[26];let C;e[27]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(N,{children:t.jsx("label",{htmlFor:"description",children:"Description (optional)"})}),e[27]=C):C=e[27];let d;e[28]!==E?(d=E("description"),e[28]=E,e[29]=d):d=e[29];let u;e[30]!==d?(u=t.jsxs(L,{children:[C,t.jsx(re,{id:"description",placeholder:"Snapshot description",...d})]}),e[30]=d,e[31]=u):u=e[31];let p;e[32]!==o?(p=()=>o({to:"/ec2/describe-snapshots"}),e[32]=o,e[33]=p):p=e[33];let f;e[34]!==s.isPending||e[35]!==R||e[36]!==p?(f=t.jsx(W,{isPending:s.isPending,isSubmitting:R,onCancel:p,pendingLabel:"Creating\\u2026",submitLabel:"Create Snapshot"}),e[34]=s.isPending,e[35]=R,e[36]=p,e[37]=f):f=e[37];let h;e[38]!==c||e[39]!==u||e[40]!==f||e[41]!==i?(h=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:i,children:[c,u,f]}),e[38]=c,e[39]=u,e[40]=f,e[41]=i,e[42]=h):h=e[42];let F;return e[43]!==h||e[44]!==l?(F=t.jsxs(t.Fragment,{children:[I,v,l,h]}),e[43]=h,e[44]=l,e[45]=F):F=e[45],F}function ae(e){return t.jsxs(oe,{value:e.VolumeId??"",children:[e.VolumeId," (",e.Size," GiB)"]},e.VolumeId)}export{Ie as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as ee}from"./useSuspenseQuery.js";import{t as n}from"./error-banner.js";import"./useRouterState.js";import"./utils.js";import{t as r}from"./useNavigate.js";import"./button.js";import{t as i}from"./back-link.js";import{a,i as o,n as s,r as c,t as l}from"./select.js";import"./separator.js";import"./awsClient.js";import{o as u}from"./ec2.js";import{h as d}from"./ec22.js";import{p as f}from"./index.js";import{t as p}from"./page-heading.js";import{i as m,n as te,t as h}from"./field.js";import{t as g}from"./textarea.js";import{n as _,r as v,t as y}from"./zod.js";import{r as b}from"./ec23.js";import{t as ne}from"./form-actions.js";var re=t(),x=e();function S(){let e=(0,re.c)(46),t=r(),{data:c}=ee(d),S=u(),w;e[0]===c.Volumes?w=e[1]:(w=c.Volumes??[],e[0]=c.Volumes,e[1]=w);let T=w,{volumeId:E}=f.useSearch(),D=E??T[0]?.VolumeId??``,O;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(O=y(b),e[2]=O):O=e[2];let k;e[3]===D?k=e[4]:(k={resolver:O,defaultValues:{volumeId:D,description:``}},e[3]=D,e[4]=k);let{control:A,handleSubmit:j,register:M,formState:N}=v(k),{errors:P,isSubmitting:F}=N,I;e[5]!==S||e[6]!==t?(I=async e=>{await S.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[5]=S,e[6]=t,e[7]=I):I=e[7];let L=I,R,z;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,x.jsx)(i,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),z=(0,x.jsx)(p,{title:`Create Snapshot`}),e[8]=R,e[9]=z):(R=e[8],z=e[9]);let B;e[10]===S.error?B=e[11]:(B=S.error&&(0,x.jsx)(n,{error:S.error,msg:`Failed to create snapshot`}),e[10]=S.error,e[11]=B);let V;e[12]!==j||e[13]!==L?(V=j(L),e[12]=j,e[13]=L,e[14]=V):V=e[14];let H;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,x.jsx)(m,{children:(0,x.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[15]=H):H=e[15];let U;e[16]!==P.volumeId||e[17]!==T?(U=e=>{let{field:t}=e;return(0,x.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,x.jsx)(o,{"aria-invalid":!!P.volumeId,className:`w-full`,id:`volumeId`,children:(0,x.jsx)(a,{})}),(0,x.jsx)(s,{children:T.map(C)})]})},e[16]=P.volumeId,e[17]=T,e[18]=U):U=e[18];let W;e[19]!==A||e[20]!==U?(W=(0,x.jsx)(_,{control:A,name:`volumeId`,render:U}),e[19]=A,e[20]=U,e[21]=W):W=e[21];let G;e[22]===P.volumeId?G=e[23]:(G=(0,x.jsx)(te,{errors:[P.volumeId]}),e[22]=P.volumeId,e[23]=G);let K;e[24]!==W||e[25]!==G?(K=(0,x.jsxs)(h,{children:[H,W,G]}),e[24]=W,e[25]=G,e[26]=K):K=e[26];let q;e[27]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,x.jsx)(m,{children:(0,x.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[27]=q):q=e[27];let J;e[28]===M?J=e[29]:(J=M(`description`),e[28]=M,e[29]=J);let Y;e[30]===J?Y=e[31]:(Y=(0,x.jsxs)(h,{children:[q,(0,x.jsx)(g,{id:`description`,placeholder:`Snapshot description`,...J})]}),e[30]=J,e[31]=Y);let X;e[32]===t?X=e[33]:(X=()=>t({to:`/ec2/describe-snapshots`}),e[32]=t,e[33]=X);let Z;e[34]!==S.isPending||e[35]!==F||e[36]!==X?(Z=(0,x.jsx)(ne,{isPending:S.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating\\u2026`,submitLabel:`Create Snapshot`}),e[34]=S.isPending,e[35]=F,e[36]=X,e[37]=Z):Z=e[37];let Q;e[38]!==K||e[39]!==Y||e[40]!==Z||e[41]!==V?(Q=(0,x.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[K,Y,Z]}),e[38]=K,e[39]=Y,e[40]=Z,e[41]=V,e[42]=Q):Q=e[42];let $;return e[43]!==Q||e[44]!==B?($=(0,x.jsxs)(x.Fragment,{children:[R,z,B,Q]}),e[43]=Q,e[44]=B,e[45]=$):$=e[45],$}function C(e){return(0,x.jsxs)(c,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}export{S as component};
|
||||
@@ -1 +1 @@
|
||||
import{c as se,u as le,m as ie,l as re,j as t,n as ne}from"./index.js";import{a as ae,u as oe,C as J}from"./zod.js";import{u as K}from"./useSuspenseQuery.js";import{B as ce}from"./back-link.js";import{E as de}from"./error-banner.js";import{F as me}from"./form-actions.js";import{P as ue}from"./page-heading.js";import{F as U,a as q,b as z}from"./field.js";import{I as fe}from"./input.js";import{S as W,a as X,b as Y,c as ee,d as G}from"./select.js";import{b as pe}from"./ec2.js";import{b as be}from"./ec22.js";import"./check.js";function Ne(){const e=se.c(61),s=le(),{data:w}=K(ie),{data:T}=K(re),l=pe();let C;e[0]!==w.Vpcs?(C=w.Vpcs??[],e[0]=w.Vpcs,e[1]=C):C=e[1];const B=C;let V;e[2]!==T.AvailabilityZones?(V=T.AvailabilityZones??[],e[2]=T.AvailabilityZones,e[3]=V):V=e[3];const D=V;let k;e[4]===Symbol.for("react.memo_cache_sentinel")?(k=ae(be),e[4]=k):k=e[4];const L=B[0]?.VpcId??"";let F;e[5]!==L?(F={resolver:k,defaultValues:{vpcId:L,cidrBlock:"10.0.1.0/24",availabilityZone:""}},e[5]=L,e[6]=F):F=e[6];const{control:n,handleSubmit:Q,register:R,formState:te}=oe(F),{errors:i,isSubmitting:O}=te;let Z;e[7]!==l||e[8]!==s?(Z=async y=>{const r=(await l.mutateAsync(y)).Subnet?.SubnetId;s(r?{to:"/ec2/describe-subnets/$id",params:{id:r}}:{to:"/ec2/describe-subnets"})},e[7]=l,e[8]=s,e[9]=Z):Z=e[9];const H=Z;let _,N;e[10]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(ce,{to:"/ec2/describe-subnets",children:"Back to Subnets"}),N=t.jsx(ue,{title:"Create Subnet"}),e[10]=_,e[11]=N):(_=e[10],N=e[11]);let a;e[12]!==l.error?(a=l.error&&t.jsx(de,{error:l.error,msg:"Failed to create subnet"}),e[12]=l.error,e[13]=a):a=e[13];let o;e[14]!==Q||e[15]!==H?(o=Q(H),e[14]=Q,e[15]=H,e[16]=o):o=e[16];let A;e[17]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(q,{children:t.jsx("label",{htmlFor:"vpcId",children:"VPC"})}),e[17]=A):A=e[17];let c;e[18]!==i.vpcId||e[19]!==B?(c=y=>{const{field:I}=y;return t.jsxs(W,{onValueChange:r=>I.onChange(r),value:I.value??"",children:[t.jsx(X,{"aria-invalid":!!i.vpcId,className:"w-full",id:"vpcId",children:t.jsx(Y,{})}),t.jsx(ee,{children:B.map(he)})]})},e[18]=i.vpcId,e[19]=B,e[20]=c):c=e[20];let d;e[21]!==n||e[22]!==c?(d=t.jsx(J,{control:n,name:"vpcId",render:c}),e[21]=n,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==i.vpcId?(m=t.jsx(U,{errors:[i.vpcId]}),e[24]=i.vpcId,e[25]=m):m=e[25];let u;e[26]!==d||e[27]!==m?(u=t.jsxs(z,{children:[A,d,m]}),e[26]=d,e[27]=m,e[28]=u):u=e[28];let P;e[29]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(q,{children:t.jsx("label",{htmlFor:"cidrBlock",children:"CIDR Block"})}),e[29]=P):P=e[29];const M=!!i.cidrBlock;let f;e[30]!==R?(f=R("cidrBlock"),e[30]=R,e[31]=f):f=e[31];let p;e[32]!==M||e[33]!==f?(p=t.jsx(fe,{"aria-invalid":M,id:"cidrBlock",placeholder:"10.0.1.0/24",...f}),e[32]=M,e[33]=f,e[34]=p):p=e[34];let b;e[35]!==i.cidrBlock?(b=t.jsx(U,{errors:[i.cidrBlock]}),e[35]=i.cidrBlock,e[36]=b):b=e[36];let x;e[37]!==p||e[38]!==b?(x=t.jsxs(z,{children:[P,p,b]}),e[37]=p,e[38]=b,e[39]=x):x=e[39];let $;e[40]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(q,{children:t.jsx("label",{htmlFor:"availabilityZone",children:"Availability Zone (optional)"})}),e[40]=$):$=e[40];let h;e[41]!==D?(h=y=>{const{field:I}=y;return t.jsxs(W,{onValueChange:r=>I.onChange(r==="none"?"":r),value:I.value||"none",children:[t.jsx(X,{className:"w-full",id:"availabilityZone",children:t.jsx(Y,{})}),t.jsxs(ee,{children:[t.jsx(G,{value:"none",children:"none"}),D.map(xe)]})]})},e[41]=D,e[42]=h):h=e[42];let j;e[43]!==n||e[44]!==h?(j=t.jsxs(z,{children:[$,t.jsx(J,{control:n,name:"availabilityZone",render:h})]}),e[43]=n,e[44]=h,e[45]=j):j=e[45];let v;e[46]!==s?(v=()=>s({to:"/ec2/describe-subnets"}),e[46]=s,e[47]=v):v=e[47];let S;e[48]!==l.isPending||e[49]!==O||e[50]!==v?(S=t.jsx(me,{isPending:l.isPending,isSubmitting:O,onCancel:v,pendingLabel:"Creating\\u2026",submitLabel:"Create Subnet"}),e[48]=l.isPending,e[49]=O,e[50]=v,e[51]=S):S=e[51];let g;e[52]!==o||e[53]!==u||e[54]!==x||e[55]!==j||e[56]!==S?(g=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[u,x,j,S]}),e[52]=o,e[53]=u,e[54]=x,e[55]=j,e[56]=S,e[57]=g):g=e[57];let E;return e[58]!==g||e[59]!==a?(E=t.jsxs(t.Fragment,{children:[_,N,a,g]}),e[58]=g,e[59]=a,e[60]=E):E=e[60],E}function xe(e){return t.jsx(G,{value:e.ZoneName??"",children:e.ZoneName},e.ZoneName)}function he(e){const s=ne(e.Tags);return t.jsx(G,{value:e.VpcId??"",children:s?`${e.VpcId} (${s})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{Ne as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as ee}from"./error-banner.js";import"./useRouterState.js";import{s as r}from"./utils.js";import{t as te}from"./useNavigate.js";import"./button.js";import{t as i}from"./back-link.js";import{a,i as o,n as s,r as c,t as l}from"./select.js";import"./separator.js";import"./awsClient.js";import{s as ne}from"./ec2.js";import{_ as re,t as ie}from"./ec22.js";import{O as ae}from"./index.js";import{t as oe}from"./page-heading.js";import{i as u,n as d,t as f}from"./field.js";import{n as p,r as se,t as ce}from"./zod.js";import{i as m}from"./ec23.js";import{t as le}from"./form-actions.js";var ue=t(),h=e();function g(){let e=(0,ue.c)(61),t=te(),{data:r}=n(re),{data:g}=n(ie),_=ne(),v;e[0]===r.Vpcs?v=e[1]:(v=r.Vpcs??[],e[0]=r.Vpcs,e[1]=v);let y=v,b;e[2]===g.AvailabilityZones?b=e[3]:(b=g.AvailabilityZones??[],e[2]=g.AvailabilityZones,e[3]=b);let x=b,S;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(S=ce(m),e[4]=S):S=e[4];let C=y[0]?.VpcId??``,w;e[5]===C?w=e[6]:(w={resolver:S,defaultValues:{vpcId:C,cidrBlock:`10.0.1.0/24`,availabilityZone:``}},e[5]=C,e[6]=w);let{control:T,handleSubmit:E,register:D,formState:pe}=se(w),{errors:O,isSubmitting:k}=pe,A;e[7]!==_||e[8]!==t?(A=async e=>{let n=(await _.mutateAsync(e)).Subnet?.SubnetId;t(n?{to:`/ec2/describe-subnets/$id`,params:{id:n}}:{to:`/ec2/describe-subnets`})},e[7]=_,e[8]=t,e[9]=A):A=e[9];let j=A,M,N;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,h.jsx)(i,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),N=(0,h.jsx)(oe,{title:`Create Subnet`}),e[10]=M,e[11]=N):(M=e[10],N=e[11]);let P;e[12]===_.error?P=e[13]:(P=_.error&&(0,h.jsx)(ee,{error:_.error,msg:`Failed to create subnet`}),e[12]=_.error,e[13]=P);let F;e[14]!==E||e[15]!==j?(F=E(j),e[14]=E,e[15]=j,e[16]=F):F=e[16];let I;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[17]=I):I=e[17];let L;e[18]!==O.vpcId||e[19]!==y?(L=e=>{let{field:t}=e;return(0,h.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,h.jsx)(o,{"aria-invalid":!!O.vpcId,className:`w-full`,id:`vpcId`,children:(0,h.jsx)(a,{})}),(0,h.jsx)(s,{children:y.map(fe)})]})},e[18]=O.vpcId,e[19]=y,e[20]=L):L=e[20];let R;e[21]!==T||e[22]!==L?(R=(0,h.jsx)(p,{control:T,name:`vpcId`,render:L}),e[21]=T,e[22]=L,e[23]=R):R=e[23];let z;e[24]===O.vpcId?z=e[25]:(z=(0,h.jsx)(d,{errors:[O.vpcId]}),e[24]=O.vpcId,e[25]=z);let B;e[26]!==R||e[27]!==z?(B=(0,h.jsxs)(f,{children:[I,R,z]}),e[26]=R,e[27]=z,e[28]=B):B=e[28];let V;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`cidrBlock`,children:`CIDR Block`})}),e[29]=V):V=e[29];let H=!!O.cidrBlock,U;e[30]===D?U=e[31]:(U=D(`cidrBlock`),e[30]=D,e[31]=U);let W;e[32]!==H||e[33]!==U?(W=(0,h.jsx)(ae,{"aria-invalid":H,id:`cidrBlock`,placeholder:`10.0.1.0/24`,...U}),e[32]=H,e[33]=U,e[34]=W):W=e[34];let G;e[35]===O.cidrBlock?G=e[36]:(G=(0,h.jsx)(d,{errors:[O.cidrBlock]}),e[35]=O.cidrBlock,e[36]=G);let K;e[37]!==W||e[38]!==G?(K=(0,h.jsxs)(f,{children:[V,W,G]}),e[37]=W,e[38]=G,e[39]=K):K=e[39];let q;e[40]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone (optional)`})}),e[40]=q):q=e[40];let J;e[41]===x?J=e[42]:(J=e=>{let{field:t}=e;return(0,h.jsxs)(l,{onValueChange:e=>t.onChange(e===`none`?``:e),value:t.value||`none`,children:[(0,h.jsx)(o,{className:`w-full`,id:`availabilityZone`,children:(0,h.jsx)(a,{})}),(0,h.jsxs)(s,{children:[(0,h.jsx)(c,{value:`none`,children:`none`}),x.map(de)]})]})},e[41]=x,e[42]=J);let Y;e[43]!==T||e[44]!==J?(Y=(0,h.jsxs)(f,{children:[q,(0,h.jsx)(p,{control:T,name:`availabilityZone`,render:J})]}),e[43]=T,e[44]=J,e[45]=Y):Y=e[45];let X;e[46]===t?X=e[47]:(X=()=>t({to:`/ec2/describe-subnets`}),e[46]=t,e[47]=X);let Z;e[48]!==_.isPending||e[49]!==k||e[50]!==X?(Z=(0,h.jsx)(le,{isPending:_.isPending,isSubmitting:k,onCancel:X,pendingLabel:`Creating\\u2026`,submitLabel:`Create Subnet`}),e[48]=_.isPending,e[49]=k,e[50]=X,e[51]=Z):Z=e[51];let Q;e[52]!==F||e[53]!==B||e[54]!==K||e[55]!==Y||e[56]!==Z?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[B,K,Y,Z]}),e[52]=F,e[53]=B,e[54]=K,e[55]=Y,e[56]=Z,e[57]=Q):Q=e[57];let $;return e[58]!==Q||e[59]!==P?($=(0,h.jsxs)(h.Fragment,{children:[M,N,P,Q]}),e[58]=Q,e[59]=P,e[60]=$):$=e[60],$}function de(e){return(0,h.jsx)(c,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function fe(e){let t=r(e.Tags);return(0,h.jsx)(c,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{g as component};
|
||||
@@ -1 +1 @@
|
||||
import{c as R,u as H,j as t}from"./index.js";import{a as M,u as T}from"./zod.js";import{B as $}from"./back-link.js";import{E as q}from"./error-banner.js";import{F as z}from"./form-actions.js";import{P as D}from"./page-heading.js";import{F as B,a as k,b as L}from"./field.js";import{I as w}from"./input.js";import{u as G}from"./iam.js";import{c as J}from"./iam2.js";function re(){const e=R.c(46),i=H(),r=G();let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={resolver:M(J)},e[0]=g):g=e[0];const{handleSubmit:C,register:a,formState:A}=T(g),{errors:s,isSubmitting:U}=A;let F;e[1]!==r||e[2]!==i?(F=async I=>{await r.mutateAsync(I),i({to:"/iam/list-users"})},e[1]=r,e[2]=i,e[3]=F):F=e[3];const E=F;let N,S;e[4]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx($,{to:"/iam/list-users",children:"Back to users"}),S=t.jsx(D,{title:"Create User"}),e[4]=N,e[5]=S):(N=e[4],S=e[5]);let l;e[6]!==r.error?(l=r.error&&t.jsx(q,{error:r.error,msg:"Failed to create user"}),e[6]=r.error,e[7]=l):l=e[7];let o;e[8]!==C||e[9]!==E?(o=C(E),e[8]=C,e[9]=E,e[10]=o):o=e[10];let y;e[11]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx(k,{children:t.jsx("label",{htmlFor:"userName",children:"User Name"})}),e[11]=y):y=e[11];const v=!!s.userName;let m;e[12]!==a?(m=a("userName"),e[12]=a,e[13]=m):m=e[13];let n;e[14]!==v||e[15]!==m?(n=t.jsx(w,{"aria-invalid":v,id:"userName",placeholder:"my-user...",...m}),e[14]=v,e[15]=m,e[16]=n):n=e[16];let c;e[17]!==s.userName?(c=t.jsx(B,{errors:[s.userName]}),e[17]=s.userName,e[18]=c):c=e[18];let f;e[19]!==n||e[20]!==c?(f=t.jsxs(L,{children:[y,n,c]}),e[19]=n,e[20]=c,e[21]=f):f=e[21];let _;e[22]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(k,{children:t.jsx("label",{htmlFor:"path",children:"Path (optional)"})}),e[22]=_):_=e[22];let u;e[23]!==a?(u=a("path"),e[23]=a,e[24]=u):u=e[24];let p;e[25]!==u?(p=t.jsx(w,{id:"path",placeholder:"/",...u}),e[25]=u,e[26]=p):p=e[26];let h;e[27]!==s.path?(h=t.jsx(B,{errors:[s.path]}),e[27]=s.path,e[28]=h):h=e[28];let d;e[29]!==p||e[30]!==h?(d=t.jsxs(L,{children:[_,p,h]}),e[29]=p,e[30]=h,e[31]=d):d=e[31];let x;e[32]!==i?(x=()=>i({to:"/iam/list-users"}),e[32]=i,e[33]=x):x=e[33];let j;e[34]!==r.isPending||e[35]!==U||e[36]!==x?(j=t.jsx(z,{isPending:r.isPending,isSubmitting:U,onCancel:x,pendingLabel:"Creating...",submitLabel:"Create User"}),e[34]=r.isPending,e[35]=U,e[36]=x,e[37]=j):j=e[37];let b;e[38]!==f||e[39]!==d||e[40]!==j||e[41]!==o?(b=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[f,d,j]}),e[38]=f,e[39]=d,e[40]=j,e[41]=o,e[42]=b):b=e[42];let P;return e[43]!==b||e[44]!==l?(P=t.jsxs(t.Fragment,{children:[N,S,l,b]}),e[43]=b,e[44]=l,e[45]=P):P=e[45],P}export{re as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./error-banner.js";import"./useRouterState.js";import"./utils.js";import{t as r}from"./useNavigate.js";import"./button.js";import{t as i}from"./back-link.js";import"./separator.js";import"./awsClient.js";import{i as a}from"./iam.js";import{O as o}from"./index.js";import{t as s}from"./page-heading.js";import{i as c,n as l,t as u}from"./field.js";import{r as d,t as f}from"./zod.js";import{t as p}from"./form-actions.js";import{n as m}from"./iam3.js";var h=t(),g=e();function _(){let e=(0,h.c)(46),t=r(),_=a(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:f(m)},e[0]=v):v=e[0];let{handleSubmit:y,register:b,formState:x}=d(v),{errors:S,isSubmitting:C}=x,w;e[1]!==_||e[2]!==t?(w=async e=>{await _.mutateAsync(e),t({to:`/iam/list-users`})},e[1]=_,e[2]=t,e[3]=w):w=e[3];let T=w,E,D;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,g.jsx)(i,{to:`/iam/list-users`,children:`Back to users`}),D=(0,g.jsx)(s,{title:`Create User`}),e[4]=E,e[5]=D):(E=e[4],D=e[5]);let O;e[6]===_.error?O=e[7]:(O=_.error&&(0,g.jsx)(n,{error:_.error,msg:`Failed to create user`}),e[6]=_.error,e[7]=O);let k;e[8]!==y||e[9]!==T?(k=y(T),e[8]=y,e[9]=T,e[10]=k):k=e[10];let A;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,g.jsx)(c,{children:(0,g.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),e[11]=A):A=e[11];let j=!!S.userName,M;e[12]===b?M=e[13]:(M=b(`userName`),e[12]=b,e[13]=M);let N;e[14]!==j||e[15]!==M?(N=(0,g.jsx)(o,{"aria-invalid":j,id:`userName`,placeholder:`my-user...`,...M}),e[14]=j,e[15]=M,e[16]=N):N=e[16];let P;e[17]===S.userName?P=e[18]:(P=(0,g.jsx)(l,{errors:[S.userName]}),e[17]=S.userName,e[18]=P);let F;e[19]!==N||e[20]!==P?(F=(0,g.jsxs)(u,{children:[A,N,P]}),e[19]=N,e[20]=P,e[21]=F):F=e[21];let I;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(c,{children:(0,g.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[22]=I):I=e[22];let L;e[23]===b?L=e[24]:(L=b(`path`),e[23]=b,e[24]=L);let R;e[25]===L?R=e[26]:(R=(0,g.jsx)(o,{id:`path`,placeholder:`/`,...L}),e[25]=L,e[26]=R);let z;e[27]===S.path?z=e[28]:(z=(0,g.jsx)(l,{errors:[S.path]}),e[27]=S.path,e[28]=z);let B;e[29]!==R||e[30]!==z?(B=(0,g.jsxs)(u,{children:[I,R,z]}),e[29]=R,e[30]=z,e[31]=B):B=e[31];let V;e[32]===t?V=e[33]:(V=()=>t({to:`/iam/list-users`}),e[32]=t,e[33]=V);let H;e[34]!==_.isPending||e[35]!==C||e[36]!==V?(H=(0,g.jsx)(p,{isPending:_.isPending,isSubmitting:C,onCancel:V,pendingLabel:`Creating...`,submitLabel:`Create User`}),e[34]=_.isPending,e[35]=C,e[36]=V,e[37]=H):H=e[37];let U;e[38]!==F||e[39]!==B||e[40]!==H||e[41]!==k?(U=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:k,children:[F,B,H]}),e[38]=F,e[39]=B,e[40]=H,e[41]=k,e[42]=U):U=e[42];let W;return e[43]!==U||e[44]!==O?(W=(0,g.jsxs)(g.Fragment,{children:[E,D,O,U]}),e[43]=U,e[44]=O,e[45]=W):W=e[45],W}export{_ as component};
|
||||
@@ -1 +1 @@
|
||||
import{c as H,u as M,l as O,j as i}from"./index.js";import{a as $,u as q,C as J}from"./zod.js";import{u as K}from"./useSuspenseQuery.js";import{B as U}from"./back-link.js";import{E as W}from"./error-banner.js";import{F as X}from"./form-actions.js";import{P as Y}from"./page-heading.js";import{F as Q,a as R,b as T}from"./field.js";import{I as ee}from"./input.js";import{S as ie,a as te,b as le,c as ae,d as se}from"./select.js";import{a as re}from"./ec2.js";import{a as oe}from"./ec22.js";import"./check.js";function ge(){const e=H.c(52),a=M(),{data:_}=K(O),t=re();let y;e[0]!==_.AvailabilityZones?(y=_.AvailabilityZones??[],e[0]=_.AvailabilityZones,e[1]=y):y=e[1];const h=y,N=h[0]?.ZoneName??"";let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=$(oe),e[2]=j):j=e[2];let Z;e[3]!==N?(Z={resolver:j,defaultValues:{size:1,availabilityZone:N}},e[3]=N,e[4]=Z):Z=e[4];const{control:V,handleSubmit:P,register:B,formState:D}=q(Z),{errors:l,isSubmitting:E}=D;let g;e[5]!==t||e[6]!==a?(g=async I=>{await t.mutateAsync(I),a({to:"/ec2/describe-volumes"})},e[5]=t,e[6]=a,e[7]=g):g=e[7];const k=g;let S,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=i.jsx(U,{to:"/ec2/describe-volumes",children:"Back to volumes"}),C=i.jsx(Y,{title:"Create Volume"}),e[8]=S,e[9]=C):(S=e[8],C=e[9]);let s;e[10]!==t.error?(s=t.error&&i.jsx(W,{error:t.error,msg:"Failed to create volume"}),e[10]=t.error,e[11]=s):s=e[11];let r;e[12]!==P||e[13]!==k?(r=P(k),e[12]=P,e[13]=k,e[14]=r):r=e[14];let F;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=i.jsx(R,{children:i.jsx("label",{htmlFor:"size",children:"Size (GiB)"})}),e[15]=F):F=e[15];const w=!!l.size;let o;e[16]!==B?(o=B("size",{valueAsNumber:!0}),e[16]=B,e[17]=o):o=e[17];let n;e[18]!==w||e[19]!==o?(n=i.jsx(ee,{"aria-invalid":w,id:"size",max:16384,min:1,type:"number",...o}),e[18]=w,e[19]=o,e[20]=n):n=e[20];let m;e[21]!==l.size?(m=i.jsx(Q,{errors:[l.size]}),e[21]=l.size,e[22]=m):m=e[22];let c;e[23]!==n||e[24]!==m?(c=i.jsxs(T,{children:[F,n,m]}),e[23]=n,e[24]=m,e[25]=c):c=e[25];let z;e[26]===Symbol.for("react.memo_cache_sentinel")?(z=i.jsx(R,{children:i.jsx("label",{htmlFor:"availabilityZone",children:"Availability Zone"})}),e[26]=z):z=e[26];let u;e[27]!==h||e[28]!==l.availabilityZone?(u=I=>{const{field:L}=I;return i.jsxs(ie,{onValueChange:G=>L.onChange(G),value:L.value??"",children:[i.jsx(te,{"aria-invalid":!!l.availabilityZone,className:"w-full",id:"availabilityZone",children:i.jsx(le,{})}),i.jsx(ae,{children:h.map(ne)})]})},e[27]=h,e[28]=l.availabilityZone,e[29]=u):u=e[29];let f;e[30]!==V||e[31]!==u?(f=i.jsx(J,{control:V,name:"availabilityZone",render:u}),e[30]=V,e[31]=u,e[32]=f):f=e[32];let d;e[33]!==l.availabilityZone?(d=i.jsx(Q,{errors:[l.availabilityZone]}),e[33]=l.availabilityZone,e[34]=d):d=e[34];let b;e[35]!==f||e[36]!==d?(b=i.jsxs(T,{children:[z,f,d]}),e[35]=f,e[36]=d,e[37]=b):b=e[37];let v;e[38]!==a?(v=()=>a({to:"/ec2/describe-volumes"}),e[38]=a,e[39]=v):v=e[39];let x;e[40]!==t.isPending||e[41]!==E||e[42]!==v?(x=i.jsx(X,{isPending:t.isPending,isSubmitting:E,onCancel:v,pendingLabel:"Creating\\u2026",submitLabel:"Create Volume"}),e[40]=t.isPending,e[41]=E,e[42]=v,e[43]=x):x=e[43];let p;e[44]!==c||e[45]!==b||e[46]!==x||e[47]!==r?(p=i.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:r,children:[c,b,x]}),e[44]=c,e[45]=b,e[46]=x,e[47]=r,e[48]=p):p=e[48];let A;return e[49]!==p||e[50]!==s?(A=i.jsxs(i.Fragment,{children:[S,C,s,p]}),e[49]=p,e[50]=s,e[51]=A):A=e[51],A}function ne(e){return i.jsx(se,{value:e.ZoneName??"",children:e.ZoneName},e.ZoneName)}export{ge as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./error-banner.js";import"./useRouterState.js";import"./utils.js";import{t as i}from"./useNavigate.js";import"./button.js";import{t as a}from"./back-link.js";import{a as o,i as ee,n as s,r as c,t as l}from"./select.js";import"./separator.js";import"./awsClient.js";import{c as u}from"./ec2.js";import{t as d}from"./ec22.js";import{O as f}from"./index.js";import{t as te}from"./page-heading.js";import{i as p,n as m,t as h}from"./field.js";import{n as ne,r as re,t as g}from"./zod.js";import{a as _}from"./ec23.js";import{t as ie}from"./form-actions.js";var v=t(),y=e();function b(){let e=(0,v.c)(52),t=i(),{data:c}=n(d),b=u(),S;e[0]===c.AvailabilityZones?S=e[1]:(S=c.AvailabilityZones??[],e[0]=c.AvailabilityZones,e[1]=S);let C=S,w=C[0]?.ZoneName??``,T;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(T=g(_),e[2]=T):T=e[2];let E;e[3]===w?E=e[4]:(E={resolver:T,defaultValues:{size:1,availabilityZone:w}},e[3]=w,e[4]=E);let{control:D,handleSubmit:O,register:k,formState:A}=re(E),{errors:j,isSubmitting:M}=A,N;e[5]!==b||e[6]!==t?(N=async e=>{await b.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=b,e[6]=t,e[7]=N):N=e[7];let P=N,F,I;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,y.jsx)(a,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),I=(0,y.jsx)(te,{title:`Create Volume`}),e[8]=F,e[9]=I):(F=e[8],I=e[9]);let L;e[10]===b.error?L=e[11]:(L=b.error&&(0,y.jsx)(r,{error:b.error,msg:`Failed to create volume`}),e[10]=b.error,e[11]=L);let R;e[12]!==O||e[13]!==P?(R=O(P),e[12]=O,e[13]=P,e[14]=R):R=e[14];let z;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,y.jsx)(p,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),e[15]=z):z=e[15];let B=!!j.size,V;e[16]===k?V=e[17]:(V=k(`size`,{valueAsNumber:!0}),e[16]=k,e[17]=V);let H;e[18]!==B||e[19]!==V?(H=(0,y.jsx)(f,{"aria-invalid":B,id:`size`,max:16384,min:1,type:`number`,...V}),e[18]=B,e[19]=V,e[20]=H):H=e[20];let U;e[21]===j.size?U=e[22]:(U=(0,y.jsx)(m,{errors:[j.size]}),e[21]=j.size,e[22]=U);let W;e[23]!==H||e[24]!==U?(W=(0,y.jsxs)(h,{children:[z,H,U]}),e[23]=H,e[24]=U,e[25]=W):W=e[25];let G;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,y.jsx)(p,{children:(0,y.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),e[26]=G):G=e[26];let K;e[27]!==C||e[28]!==j.availabilityZone?(K=e=>{let{field:t}=e;return(0,y.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(ee,{"aria-invalid":!!j.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,y.jsx)(o,{})}),(0,y.jsx)(s,{children:C.map(x)})]})},e[27]=C,e[28]=j.availabilityZone,e[29]=K):K=e[29];let q;e[30]!==D||e[31]!==K?(q=(0,y.jsx)(ne,{control:D,name:`availabilityZone`,render:K}),e[30]=D,e[31]=K,e[32]=q):q=e[32];let J;e[33]===j.availabilityZone?J=e[34]:(J=(0,y.jsx)(m,{errors:[j.availabilityZone]}),e[33]=j.availabilityZone,e[34]=J);let Y;e[35]!==q||e[36]!==J?(Y=(0,y.jsxs)(h,{children:[G,q,J]}),e[35]=q,e[36]=J,e[37]=Y):Y=e[37];let X;e[38]===t?X=e[39]:(X=()=>t({to:`/ec2/describe-volumes`}),e[38]=t,e[39]=X);let Z;e[40]!==b.isPending||e[41]!==M||e[42]!==X?(Z=(0,y.jsx)(ie,{isPending:b.isPending,isSubmitting:M,onCancel:X,pendingLabel:`Creating\\u2026`,submitLabel:`Create Volume`}),e[40]=b.isPending,e[41]=M,e[42]=X,e[43]=Z):Z=e[43];let Q;e[44]!==W||e[45]!==Y||e[46]!==Z||e[47]!==R?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:R,children:[W,Y,Z]}),e[44]=W,e[45]=Y,e[46]=Z,e[47]=R,e[48]=Q):Q=e[48];let $;return e[49]!==Q||e[50]!==L?($=(0,y.jsxs)(y.Fragment,{children:[F,I,L,Q]}),e[49]=Q,e[50]=L,e[51]=$):$=e[51],$}function x(e){return(0,y.jsx)(c,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}export{b as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as R,u as w,j as t}from"./index.js";import{a as A,u as $}from"./zod.js";import{B as D}from"./back-link.js";import{E as H}from"./error-banner.js";import{F as M}from"./form-actions.js";import{P as T}from"./page-heading.js";import{F as q,b as _,a as E}from"./field.js";import{I}from"./input.js";import{u as z}from"./ec2.js";import{c as G}from"./ec22.js";function re(){const e=R.c(41),s=w(),r=z();let h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={resolver:A(G),defaultValues:{cidrBlock:"10.0.0.0/16",name:""}},e[0]=h):h=e[0];const{handleSubmit:v,register:i,formState:L}=$(h),{errors:b,isSubmitting:P}=L;let j;e[1]!==r||e[2]!==s?(j=async N=>{const y=(await r.mutateAsync(N)).Vpc?.VpcId;s(y?{to:"/ec2/describe-vpcs/$id",params:{id:y}}:{to:"/ec2/describe-vpcs"})},e[1]=r,e[2]=s,e[3]=j):j=e[3];const S=j;let g,B;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(D,{to:"/ec2/describe-vpcs",children:"Back to VPCs"}),B=t.jsx(T,{title:"Create VPC"}),e[4]=g,e[5]=B):(g=e[4],B=e[5]);let l;e[6]!==r.error?(l=r.error&&t.jsx(H,{error:r.error,msg:"Failed to create VPC"}),e[6]=r.error,e[7]=l):l=e[7];let o;e[8]!==v||e[9]!==S?(o=v(S),e[8]=v,e[9]=S,e[10]=o):o=e[10];let k;e[11]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(E,{children:t.jsx("label",{htmlFor:"cidrBlock",children:"CIDR Block"})}),e[11]=k):k=e[11];const V=!!b.cidrBlock;let c;e[12]!==i?(c=i("cidrBlock"),e[12]=i,e[13]=c):c=e[13];let a;e[14]!==V||e[15]!==c?(a=t.jsx(I,{"aria-invalid":V,id:"cidrBlock",placeholder:"10.0.0.0/16",...c}),e[14]=V,e[15]=c,e[16]=a):a=e[16];let n;e[17]!==b.cidrBlock?(n=t.jsx(q,{errors:[b.cidrBlock]}),e[17]=b.cidrBlock,e[18]=n):n=e[18];let m;e[19]!==a||e[20]!==n?(m=t.jsxs(_,{children:[k,a,n]}),e[19]=a,e[20]=n,e[21]=m):m=e[21];let C;e[22]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(E,{children:t.jsx("label",{htmlFor:"name",children:"Name (optional)"})}),e[22]=C):C=e[22];let d;e[23]!==i?(d=i("name"),e[23]=i,e[24]=d):d=e[24];let f;e[25]!==d?(f=t.jsxs(_,{children:[C,t.jsx(I,{id:"name",placeholder:"my-vpc",...d})]}),e[25]=d,e[26]=f):f=e[26];let p;e[27]!==s?(p=()=>s({to:"/ec2/describe-vpcs"}),e[27]=s,e[28]=p):p=e[28];let u;e[29]!==r.isPending||e[30]!==P||e[31]!==p?(u=t.jsx(M,{isPending:r.isPending,isSubmitting:P,onCancel:p,pendingLabel:"Creating\\u2026",submitLabel:"Create VPC"}),e[29]=r.isPending,e[30]=P,e[31]=p,e[32]=u):u=e[32];let x;e[33]!==m||e[34]!==f||e[35]!==u||e[36]!==o?(x=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[m,f,u]}),e[33]=m,e[34]=f,e[35]=u,e[36]=o,e[37]=x):x=e[37];let F;return e[38]!==x||e[39]!==l?(F=t.jsxs(t.Fragment,{children:[g,B,l,x]}),e[38]=x,e[39]=l,e[40]=F):F=e[40],F}export{re as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./error-banner.js";import"./useRouterState.js";import"./utils.js";import{t as r}from"./useNavigate.js";import"./button.js";import{t as i}from"./back-link.js";import"./separator.js";import"./awsClient.js";import{l as a}from"./ec2.js";import"./ec22.js";import{O as o}from"./index.js";import{t as s}from"./page-heading.js";import{i as c,n as l,t as u}from"./field.js";import{r as d,t as f}from"./zod.js";import{o as p}from"./ec23.js";import{t as m}from"./form-actions.js";var h=t(),g=e();function _(){let e=(0,h.c)(41),t=r(),_=a(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:f(p),defaultValues:{cidrBlock:`10.0.0.0/16`,name:``}},e[0]=v):v=e[0];let{handleSubmit:y,register:b,formState:x}=d(v),{errors:S,isSubmitting:C}=x,w;e[1]!==_||e[2]!==t?(w=async e=>{let n=(await _.mutateAsync(e)).Vpc?.VpcId;t(n?{to:`/ec2/describe-vpcs/$id`,params:{id:n}}:{to:`/ec2/describe-vpcs`})},e[1]=_,e[2]=t,e[3]=w):w=e[3];let T=w,E,D;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,g.jsx)(i,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),D=(0,g.jsx)(s,{title:`Create VPC`}),e[4]=E,e[5]=D):(E=e[4],D=e[5]);let O;e[6]===_.error?O=e[7]:(O=_.error&&(0,g.jsx)(n,{error:_.error,msg:`Failed to create VPC`}),e[6]=_.error,e[7]=O);let k;e[8]!==y||e[9]!==T?(k=y(T),e[8]=y,e[9]=T,e[10]=k):k=e[10];let A;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,g.jsx)(c,{children:(0,g.jsx)(`label`,{htmlFor:`cidrBlock`,children:`CIDR Block`})}),e[11]=A):A=e[11];let j=!!S.cidrBlock,M;e[12]===b?M=e[13]:(M=b(`cidrBlock`),e[12]=b,e[13]=M);let N;e[14]!==j||e[15]!==M?(N=(0,g.jsx)(o,{"aria-invalid":j,id:`cidrBlock`,placeholder:`10.0.0.0/16`,...M}),e[14]=j,e[15]=M,e[16]=N):N=e[16];let P;e[17]===S.cidrBlock?P=e[18]:(P=(0,g.jsx)(l,{errors:[S.cidrBlock]}),e[17]=S.cidrBlock,e[18]=P);let F;e[19]!==N||e[20]!==P?(F=(0,g.jsxs)(u,{children:[A,N,P]}),e[19]=N,e[20]=P,e[21]=F):F=e[21];let I;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(c,{children:(0,g.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[22]=I):I=e[22];let L;e[23]===b?L=e[24]:(L=b(`name`),e[23]=b,e[24]=L);let R;e[25]===L?R=e[26]:(R=(0,g.jsxs)(u,{children:[I,(0,g.jsx)(o,{id:`name`,placeholder:`my-vpc`,...L})]}),e[25]=L,e[26]=R);let z;e[27]===t?z=e[28]:(z=()=>t({to:`/ec2/describe-vpcs`}),e[27]=t,e[28]=z);let B;e[29]!==_.isPending||e[30]!==C||e[31]!==z?(B=(0,g.jsx)(m,{isPending:_.isPending,isSubmitting:C,onCancel:z,pendingLabel:`Creating\\u2026`,submitLabel:`Create VPC`}),e[29]=_.isPending,e[30]=C,e[31]=z,e[32]=B):B=e[32];let V;e[33]!==F||e[34]!==R||e[35]!==B||e[36]!==k?(V=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:k,children:[F,R,B]}),e[33]=F,e[34]=R,e[35]=B,e[36]=k,e[37]=V):V=e[37];let H;return e[38]!==V||e[39]!==O?(H=(0,g.jsxs)(g.Fragment,{children:[E,D,O,V]}),e[38]=V,e[39]=O,e[40]=H):H=e[40],H}export{_ as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,r as t}from"./compiler-runtime.js";import{P as n,S as r,_ as i,a,v as o}from"./button.js";var s=e(t()),c=0;function l(e,t=`mui`){let[n,r]=s.useState(e),i=e||n;return s.useEffect(()=>{n??(c+=1,r(`${t}-${c}`))},[n,t]),i}var u=a.useId;function d(e,t){if(u!==void 0){let n=u();return e??(t?`${t}-${n}`:n)}return l(e,t)}function f(e){return d(e,`base-ui`)}function p(e){return e?.ownerDocument||document}var m=typeof navigator<`u`,h=w(),g=E(),_=T(),v=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),y=h.platform===`MacIntel`&&h.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(h.platform);m&&/firefox/i.test(_);var b=m&&/apple/i.test(navigator.vendor);m&&/Edg/i.test(_);var x=m&&/android/i.test(g)||/android/i.test(_),S=m&&g.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,C=_.includes(`jsdom/`);function w(){if(!m)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function T(){if(!m)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function E(){if(!m)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}var D=`data-base-ui-focusable`,O=`active`,k=`selected`,A=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,j=`ArrowLeft`,M=`ArrowRight`,N=`ArrowUp`,P=`ArrowDown`;function F(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function I(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&r(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function L(e,t){if(!i(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(I(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function R(e){return`composedPath`in e?e.composedPath()[0]:e.target}function ee(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function z(e){return e.matches(`html,body`)}function B(e){return o(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function V(e){return e?e.getAttribute(`role`)===`combobox`&&B(e):!1}function H(e){if(!e||C)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function U(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}var W=`none`,G=`trigger-press`,K=`trigger-hover`,q=`trigger-focus`,J=`outside-press`,Y=`item-press`,X=`close-press`,Z=`focus-out`,Q=`escape-key`,$=`list-navigation`,te=`cancel-open`,ne=`disabled`,re=`imperative-action`,ie=`window-resize`;function ae(e,t,r,i){let a=!1,o=!1,s=i??n;return{reason:e,event:t??new Event(`base-ui`),cancel(){a=!0},allowPropagation(){o=!0},get isCanceled(){return a},get isPropagationAllowed(){return o},trigger:r,...s}}export{N as A,p as B,V as C,P as D,O as E,y as F,d as H,C as I,S as L,k as M,A as N,j as O,x as P,b as R,L as S,H as T,f as V,I as _,Q as a,ee as b,Y as c,J as d,q as f,F as g,ie as h,ne as i,D as j,M as k,$ as l,G as m,te as n,Z as o,K as p,X as r,re as s,ae as t,W as u,U as v,B as w,z as x,R as y,v as z};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,r as t}from"./compiler-runtime.js";var n=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),r=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),i=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),a=e=>{let t=i(e);return t.charAt(0).toUpperCase()+t.slice(1)},o={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},s=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},c=e(t()),l=(0,c.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:a=``,children:l,iconNode:u,...d},f)=>(0,c.createElement)(`svg`,{ref:f,...o,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:n(`lucide`,a),...!l&&!s(d)&&{"aria-hidden":`true`},...d},[...u.map(([e,t])=>(0,c.createElement)(e,t)),...Array.isArray(l)?l:[l]])),u=(e,t)=>{let i=(0,c.forwardRef)(({className:i,...o},s)=>(0,c.createElement)(l,{ref:s,iconNode:t,className:n(`lucide-${r(a(e))}`,`lucide-${e}`,i),...o}));return i.displayName=a(e),i};export{u as t};
|
||||
@@ -1 +1 @@
|
||||
import{c as j,j as l}from"./index.js";import{a as p,c as A,b as C,e as u,d as b,h as E,f as R,g as _}from"./alert-dialog.js";function F(h){const e=j.c(19),{open:d,onOpenChange:f,title:D,description:g,isPending:r,onConfirm:m}=h;let t;e[0]!==D?(t=l.jsx(p,{children:D}),e[0]=D,e[1]=t):t=e[1];let i;e[2]!==g?(i=l.jsx(A,{children:g}),e[2]=g,e[3]=i):i=e[3];let s;e[4]!==t||e[5]!==i?(s=l.jsxs(C,{children:[t,i]}),e[4]=t,e[5]=i,e[6]=s):s=e[6];let a;e[7]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsx(u,{children:"Cancel"}),e[7]=a):a=e[7];const x=r?"Deleting…":"Delete";let n;e[8]!==r||e[9]!==m||e[10]!==x?(n=l.jsxs(b,{children:[a,l.jsx(E,{disabled:r,onClick:m,children:x})]}),e[8]=r,e[9]=m,e[10]=x,e[11]=n):n=e[11];let o;e[12]!==s||e[13]!==n?(o=l.jsxs(R,{children:[s,n]}),e[12]=s,e[13]=n,e[14]=o):o=e[14];let c;return e[15]!==f||e[16]!==d||e[17]!==o?(c=l.jsx(_,{onOpenChange:f,open:d,children:o}),e[15]=f,e[16]=d,e[17]=o,e[18]=c):c=e[18],c}export{F as D};
|
||||
import{n as e,t}from"./compiler-runtime.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:_}=e,v;t[0]===m?v=t[1]:(v=(0,d.jsx)(i,{children:m}),t[0]=m,t[1]=v);let y;t[2]===h?y=t[3]:(y=(0,d.jsx)(n,{children:h}),t[2]=h,t[3]=y);let b;t[4]!==v||t[5]!==y?(b=(0,d.jsxs)(c,{children:[v,y]}),t[4]=v,t[5]=y,t[6]=b):b=t[6];let x;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,d.jsx)(s,{children:`Cancel`}),t[7]=x):x=t[7];let S=g?`Deleting…`:`Delete`,C;t[8]!==g||t[9]!==_||t[10]!==S?(C=(0,d.jsxs)(o,{children:[x,(0,d.jsx)(a,{disabled:g,onClick:_,children:S})]}),t[8]=g,t[9]=_,t[10]=S,t[11]=C):C=t[11];let w;t[12]!==b||t[13]!==C?(w=(0,d.jsxs)(r,{children:[b,C]}),t[12]=b,t[13]=C,t[14]=w):w=t[14];let T;return t[15]!==p||t[16]!==f||t[17]!==w?(T=(0,d.jsx)(l,{onOpenChange:p,open:f,children:w}),t[15]=p,t[16]=f,t[17]=w,t[18]=T):T=t[18],T}export{f as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import"./utils.js";import"./awsClient.js";import{r}from"./ec22.js";import{t as i}from"./page-heading.js";import{t as a}from"./state-badge.js";import{t as o}from"./list-card.js";var s=t(),c=e();function l(){let e=(0,s.c)(5),{data:t}=n(r),a;e[0]===t.Images?a=e[1]:(a=t.Images||[],e[0]=t.Images,e[1]=a);let o=a,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,c.jsx)(i,{title:`EC2 Images`}),e[2]=l):l=e[2];let d;return e[3]===o?d=e[4]:(d=(0,c.jsxs)(c.Fragment,{children:[l,o.length>0?(0,c.jsx)(`div`,{className:`space-y-4`,children:o.map(u)}):(0,c.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[3]=o,e[4]=d),d}function u(e){return e.ImageId?(0,c.jsx)(o,{badge:(0,c.jsx)(a,{state:e.State}),params:{id:e.ImageId},subtitle:e.Name,title:e.ImageId,to:`/ec2/describe-images/$id`},e.ImageId):null}export{l as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import"./utils.js";import{t as i}from"./button.js";import"./awsClient.js";import{o as a}from"./ec22.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=t(),u=e(),d={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function f(){let e=(0,l.c)(3),{data:t}=n(a),s;if(e[0]!==t.Reservations){let n=(t.Reservations?.flatMap(h)||[]).toSorted(m),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/run-instances`,children:(0,u.jsx)(i,{children:`Run Instances`})}),title:`EC2 Instances`}),e[2]=a):a=e[2],s=(0,u.jsxs)(u.Fragment,{children:[a,n.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:n.map(p)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances found.`})]}),e[0]=t.Reservations,e[1]=s}else s=e[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} • ${e.ImageId}`,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};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import"./utils.js";import{t as i}from"./button.js";import"./awsClient.js";import{c as a}from"./ec22.js";import{t as o}from"./page-heading.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(4),{data:t}=n(a),s;if(e[0]!==t.KeyPairs){let n=(t.KeyPairs||[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(r,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(i,{variant:`outline`,children:`Import Key Pair`})}),e[2]=a):a=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(o,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[a,(0,l.jsx)(r,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(i,{children:`Create Key Pair`})})]}),title:`EC2 Key Pairs`}),e[3]=c):c=e[3],s=(0,l.jsxs)(l.Fragment,{children:[c,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),e[0]=t.KeyPairs,e[1]=s}else s=e[1];return s}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:`${e.KeyPairId} • ${e.KeyType}`,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};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import"./utils.js";import{t as i}from"./button.js";import"./awsClient.js";import{d as a}from"./ec22.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=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Snapshots?s=e[1]:(s=t.Snapshots||[],e[0]=t.Snapshots,e[1]=s);let c=s,d;e[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)(i,{children:`Create Snapshot`})}),title:`EC2 Snapshots`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[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};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import{s as i}from"./utils.js";import{t as a}from"./button.js";import"./awsClient.js";import{p as o}from"./ec22.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=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Subnets?i=e[1]:(i=t.Subnets||[],e[0]=t.Subnets,e[1]=i);let c=i,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-subnet`,children:(0,d.jsx)(a,{children:`Create Subnet`})}),title:`Subnets`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[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.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.SubnetId)return null;let t=i(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};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import"./utils.js";import{t as i}from"./button.js";import"./awsClient.js";import{h as a}from"./ec22.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=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(a),s;e[0]===t.Volumes?s=e[1]:(s=t.Volumes||[],e[0]=t.Volumes,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(r,{to:`/ec2/create-volume`,children:(0,u.jsx)(i,{children:`Create Volume`})}),title:`EC2 Volumes`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[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 • ${e.VolumeType}`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import{s as i}from"./utils.js";import{t as a}from"./button.js";import"./awsClient.js";import{_ as o}from"./ec22.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=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=n(o),i;e[0]===t.Vpcs?i=e[1]:(i=t.Vpcs||[],e[0]=t.Vpcs,e[1]=i);let c=i,l;e[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)(a,{children:`Create VPC`})}),title:`VPCs`}),e[2]=l):l=e[2];let f;return e[3]===c?f=e[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.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.VpcId)return null;let t=i(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
@@ -1 +1 @@
|
||||
import{c as i,j as n}from"./index.js";function d(l){const e=i.c(2),{children:s}=l;let t;return e[0]!==s?(t=n.jsx("div",{className:"rounded-lg border bg-card",children:s}),e[0]=s,e[1]=t):t=e[1],t}function m(l){const e=i.c(2),{children:s}=l;let t;return e[0]!==s?(t=n.jsx("div",{className:"border-b p-4",children:n.jsx("h2",{className:"font-semibold",children:s})}),e[0]=s,e[1]=t):t=e[1],t}function f(l){const e=i.c(2),{children:s}=l;let t;return e[0]!==s?(t=n.jsx("div",{className:"grid gap-4 p-4 sm:grid-cols-2",children:s}),e[0]=s,e[1]=t):t=e[1],t}const x=Object.assign(d,{Header:m,Content:f});function j(l){const e=i.c(9),{label:s,value:t}=l;let r;e[0]!==s?(r=n.jsx("dt",{className:"text-muted-foreground text-sm",children:s}),e[0]=s,e[1]=r):r=e[1];let c;e[2]!==t?(c=t||n.jsx("span",{className:"text-muted-foreground",children:"—"}),e[2]=t,e[3]=c):c=e[3];let o;e[4]!==c?(o=n.jsx("dd",{className:"mt-1 font-mono text-sm",children:c}),e[4]=c,e[5]=o):o=e[5];let a;return e[6]!==r||e[7]!==o?(a=n.jsxs("div",{children:[r,o]}),e[6]=r,e[7]=o,e[8]=a):a=e[8],a}export{x as D,j as a};
|
||||
import{n as e,t}from"./compiler-runtime.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
@@ -1 +1 @@
|
||||
import{K 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{t as e}from"./createLucideIcon.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};
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{o as i,k as e,aO as a,aP as o,aQ as c}from"./index.js";const n=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/,t=e().min(1,"Key name is required").max(255,"Key name must be 255 characters or less").regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,"Key name contains invalid characters"),m=i({imageId:e("Please select an Image"),instanceType:e("Please select an instance type"),keyName:e("Please select a key pair"),subnetId:e().optional(),count:o("Instance count must be a whole number").min(1,"Instance count must be at least 1")}),l=i({keyName:t}),u=i({keyName:t,publicKeyMaterial:e().min(1,"Public key is required").refine(s=>s.trim().length>0,"Public key cannot be empty")}),d=i({size:a().int("Size must be a whole number").min(1,"Size must be at least 1 GiB").max(16384,"Size must be at most 16384 GiB"),availabilityZone:e().min(1,"Availability zone is required")}),b=i({size:a().int("Size must be a whole number").min(1,"Size must be at least 1 GiB")}),p=i({volumeId:e().min(1,"Volume is required"),description:e().optional()});i({sourceSnapshotId:e().min(1,"Source snapshot is required"),sourceRegion:e().min(1,"Source region is required"),description:e().optional()});i({volumeId:e().min(1,"Volume is required"),instanceId:e().min(1,"Instance is required"),device:e().optional()});i({volumeId:e().min(1,"Volume is required"),instanceId:e().optional(),force:c().optional()});i({instanceType:e().min(1,"Instance type is required")});i({name:e().min(1,"Name is required"),description:e().optional()});const y=i({vpcId:e().min(1,"VPC is required"),cidrBlock:e().min(1,"CIDR block is required").regex(n,"Must be a valid CIDR block (e.g. 10.0.1.0/24)"),availabilityZone:e().optional()}),I=i({cidrBlock:e().min(1,"CIDR block is required").regex(n,"Must be a valid CIDR block (e.g. 10.0.0.0/16)"),name:e().optional()});export{d as a,y as b,I as c,p as d,l as e,m as f,u as i,b as m};
|
||||
import{t as e}from"./queryOptions.js";import{$ as t,Dt as n,Et as r,at as i,ct as a,et as o,it as s,jt as c,n as l,ot as u,rt as d,st as f,tt as p}from"./awsClient.js";import{t as m}from"./DescribeInstancesCommand.js";var h=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeAvailabilityZones`,{}).n(`EC2Client`,`DescribeAvailabilityZonesCommand`).sc(t).build(){},g=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeImages`,{}).n(`EC2Client`,`DescribeImagesCommand`).sc(o).build(){},_=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeInstanceTypes`,{}).n(`EC2Client`,`DescribeInstanceTypesCommand`).sc(p).build(){},v=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeKeyPairs`,{}).n(`EC2Client`,`DescribeKeyPairsCommand`).sc(d).build(){},y=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeRegions`,{}).n(`EC2Client`,`DescribeRegionsCommand`).sc(s).build(){},b=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSnapshots`,{}).n(`EC2Client`,`DescribeSnapshotsCommand`).sc(i).build(){},x=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeSubnets`,{}).n(`EC2Client`,`DescribeSubnetsCommand`).sc(u).build(){},S=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVolumes`,{}).n(`EC2Client`,`DescribeVolumesCommand`).sc(f).build(){},C=class extends c.classBuilder().ep(r).m(function(e,t,r,i){return[n(r,e.getEndpointParameterInstructions())]}).s(`AmazonEC2`,`DescribeVpcs`,{}).n(`EC2Client`,`DescribeVpcsCommand`).sc(a).build(){},w=e({queryKey:[`ec2`,`availabilityZones`],queryFn:()=>{let e=new h({});return l().send(e)},staleTime:3e5}),T=e({queryKey:[`ec2`,`instances`],queryFn:()=>{let e=new m({});return l().send(e)},refetchInterval:5e3}),E=t=>e({queryKey:[`ec2`,`instances`,t],queryFn:()=>{let e=new m({InstanceIds:[t]});return l().send(e)},refetchInterval:5e3}),D=e({queryKey:[`ec2`,`instances`,`types`],queryFn:()=>{let e=new _({Filters:[{Name:`capacity`,Values:[`true`]}]});return l().send(e)},refetchInterval:5e3}),O=e({queryKey:[`ec2`,`images`],queryFn:()=>{let e=new g({});return l().send(e)}}),k=t=>e({queryKey:[`ec2`,`images`,t??`none`],queryFn:()=>{if(!t)return{Images:[],$metadata:{}};let e=new g({ImageIds:[t]});return l().send(e)}}),A=e({queryKey:[`ec2`,`keypairs`],queryFn:()=>{let e=new v({});return l().send(e)}}),j=t=>e({queryKey:[`ec2`,`keypairs`,t],queryFn:()=>{let e=new v({KeyPairIds:[t]});return l().send(e)}}),M=e({queryKey:[`ec2`,`regions`],queryFn:()=>{let e=new y({});return l().send(e)},staleTime:3e5}),N=e({queryKey:[`ec2`,`subnets`],queryFn:()=>{let e=new x({});return l().send(e)}}),P=t=>e({queryKey:[`ec2`,`subnets`,t],queryFn:()=>{let e=new x({SubnetIds:[t]});return l().send(e)}}),F=e({queryKey:[`ec2`,`snapshots`],queryFn:()=>{let e=new b({});return l().send(e)},refetchInterval:5e3}),I=t=>e({queryKey:[`ec2`,`snapshots`,t],queryFn:()=>{let e=new b({SnapshotIds:[t]});return l().send(e)},refetchInterval:5e3}),L=e({queryKey:[`ec2`,`vpcs`],queryFn:()=>{let e=new C({});return l().send(e)}}),R=t=>e({queryKey:[`ec2`,`vpcs`,t],queryFn:()=>{let e=new C({VpcIds:[t]});return l().send(e)}}),z=e({queryKey:[`ec2`,`volumes`],queryFn:()=>{let e=new S({});return l().send(e)},refetchInterval:5e3}),B=t=>e({queryKey:[`ec2`,`volumes`,t],queryFn:()=>{let e=new S({VolumeIds:[t]});return l().send(e)},refetchInterval:5e3});export{L as _,D as a,A as c,F as d,P as f,R as g,z as h,E as i,M as l,B as m,k as n,T as o,N as p,O as r,j as s,w as t,I as u};
|
||||
@@ -0,0 +1 @@
|
||||
import{Jt as e,Qt as t,Xt as n,Yt as r,Zt as i}from"./awsClient.js";var a=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/\d{1,2}$/,o=t().min(1,`Key name is required`).max(255,`Key name must be 255 characters or less`).regex(/^[\w\s._\-:/()#,@[\]+=&;{}!$*]+$/,`Key name contains invalid characters`),s=i({imageId:t(`Please select an Image`),instanceType:t(`Please select an instance type`),keyName:t(`Please select a key pair`),subnetId:t().optional(),count:r(`Instance count must be a whole number`).min(1,`Instance count must be at least 1`)}),c=i({keyName:o}),l=i({keyName:o,publicKeyMaterial:t().min(1,`Public key is required`).refine(e=>e.trim().length>0,`Public key cannot be empty`)}),u=i({size:n().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:t().min(1,`Availability zone is required`)}),d=i({size:n().int(`Size must be a whole number`).min(1,`Size must be at least 1 GiB`)}),f=i({volumeId:t().min(1,`Volume is required`),description:t().optional()});i({sourceSnapshotId:t().min(1,`Source snapshot is required`),sourceRegion:t().min(1,`Source region is required`),description:t().optional()}),i({volumeId:t().min(1,`Volume is required`),instanceId:t().min(1,`Instance is required`),device:t().optional()}),i({volumeId:t().min(1,`Volume is required`),instanceId:t().optional(),force:e().optional()}),i({instanceType:t().min(1,`Instance type is required`)}),i({name:t().min(1,`Name is required`),description:t().optional()});var p=i({vpcId:t().min(1,`VPC is required`),cidrBlock:t().min(1,`CIDR block is required`).regex(a,`Must be a valid CIDR block (e.g. 10.0.1.0/24)`),availabilityZone:t().optional()}),m=i({cidrBlock:t().min(1,`CIDR block is required`).regex(a,`Must be a valid CIDR block (e.g. 10.0.0.0/16)`),name:t().optional()});export{u as a,d as c,p as i,c as n,m as o,f as r,l as s,s as t};
|
||||
@@ -1 +1 @@
|
||||
import{bb as d,be as m,bq as c,br as b,bo as l,ar as p,r as h,bg as v,bp as f,c as y,j as u}from"./index.js";var x=class extends d{#e;#i=void 0;#t;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){const t=this.options;this.options=this.#e.defaultMutationOptions(e),m(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#t,observer:this}),t?.mutationKey&&this.options.mutationKey&&c(t.mutationKey)!==c(this.options.mutationKey)?this.reset():this.#t?.state.status==="pending"&&this.#t.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#t?.removeObserver(this)}onMutationUpdate(e){this.#r(),this.#o(e)}getCurrentResult(){return this.#i}reset(){this.#t?.removeObserver(this),this.#t=void 0,this.#r(),this.#o()}mutate(e,t){return this.#s=t,this.#t?.removeObserver(this),this.#t=this.#e.getMutationCache().build(this.#e,this.options),this.#t.addObserver(this),this.#t.execute(e)}#r(){const e=this.#t?.state??b();this.#i={...e,isPending:e.status==="pending",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset}}#o(e){l.batch(()=>{if(this.#s&&this.hasListeners()){const t=this.#i.variables,r=this.#i.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#s.onSuccess?.(e.data,t,r,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(e.data,null,t,r,s)}catch(i){Promise.reject(i)}}else if(e?.type==="error"){try{this.#s.onError?.(e.error,t,r,s)}catch(i){Promise.reject(i)}try{this.#s.onSettled?.(void 0,e.error,t,r,s)}catch(i){Promise.reject(i)}}}this.listeners.forEach(t=>{t(this.#i)})})}};function g(e,t){const r=p(),[s]=h.useState(()=>new x(r,e));h.useEffect(()=>{s.setOptions(e)},[s,e]);const i=h.useSyncExternalStore(h.useCallback(o=>s.subscribe(l.batchCalls(o)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),n=h.useCallback((o,a)=>{s.mutate(o,a).catch(v)},[s]);if(i.error&&f(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:n,mutateAsync:i.mutate}}function E(e){const t=y.c(7),{msg:r,error:s}=e;let i;s&&(i=s.name!=="Error"?s.name:s.message);let n;t[0]!==r?(n=r&&u.jsx("h2",{className:"text-destructive text-sm",children:r}),t[0]=r,t[1]=n):n=t[1];let o;t[2]!==i?(o=i&&u.jsx("p",{className:"text-destructive text-sm",children:i}),t[2]=i,t[3]=o):o=t[3];let a;return t[4]!==n||t[5]!==o?(a=u.jsxs("div",{className:"mb-6 max-w-4xl rounded-md border border-destructive bg-destructive/10 p-4",children:[n,o]}),t[4]=n,t[5]=o,t[6]=a):a=t[6],a}export{E,g as u};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{D as i,M as a,O as o,S as s,c,g as l,n as u}from"./QueryClientProvider.js";import{j 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),i(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&l(t.mutationKey)!==l(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??d();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){c.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=e(n(),1);function m(e,t){let n=u(t),[r]=p.useState(()=>new f(n,e));p.useEffect(()=>{r.setOptions(e)},[r,e]);let i=p.useSyncExternalStore(p.useCallback(e=>r.subscribe(c.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=p.useCallback((e,t)=>{r.mutate(e,t).catch(s)},[r]);if(i.error&&o(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var h=r(),g=t();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};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./toUtf8.browser.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=Object.keys(e).find(e=>e!==`__type`)??``,{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=Object.keys(e).find(e=>e!==`__type`)??``,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,t]of Object.entries(u.value))r[e]=t}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
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{c as x,j as c,B as a}from"./index.js";function f(r){const t=x.c(9),{isSubmitting:m,isPending:u,onCancel:l,submitLabel:p,pendingLabel:d}=r,e=m||u;let n;t[0]!==e||t[1]!==l?(n=c.jsx(a,{disabled:e,onClick:l,type:"button",variant:"outline",children:"Cancel"}),t[0]=e,t[1]=l,t[2]=n):n=t[2];const o=e?d:p;let s;t[3]!==e||t[4]!==o?(s=c.jsx(a,{disabled:e,type:"submit",children:o}),t[3]=e,t[4]=o,t[5]=s):s=t[5];let i;return t[6]!==n||t[7]!==s?(i=c.jsxs("div",{className:"flex gap-2",children:[n,s]}),t[6]=n,t[7]=s,t[8]=i):i=t[8],i}export{f as F};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./button.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
@@ -1 +1 @@
|
||||
import{P as a,az as i,S as r,aA as d,aB as y,aC as C,aD as p,aE as A,aF as f,aG as P,aH as I,aI as U,c as o,ar as u,aJ as l}from"./index.js";import{u as m}from"./error-banner.js";class K extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","AttachUserPolicy",{}).n("IAMClient","AttachUserPolicyCommand").sc(d).build(){}class D extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","CreateAccessKey",{}).n("IAMClient","CreateAccessKeyCommand").sc(y).build(){}class g extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","CreatePolicy",{}).n("IAMClient","CreatePolicyCommand").sc(C).build(){}class S extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","CreateUser",{}).n("IAMClient","CreateUserCommand").sc(p).build(){}class M extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","DeleteAccessKey",{}).n("IAMClient","DeleteAccessKeyCommand").sc(A).build(){}class q extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","DeletePolicy",{}).n("IAMClient","DeletePolicyCommand").sc(f).build(){}class $ extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","DeleteUser",{}).n("IAMClient","DeleteUserCommand").sc(P).build(){}class h extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","DetachUserPolicy",{}).n("IAMClient","DetachUserPolicyCommand").sc(I).build(){}class N extends a.classBuilder().ep(i).m(function(t,n,s,c){return[r(s,t.getEndpointParameterInstructions())]}).s("AWSIdentityManagementV20100508","UpdateAccessKey",{}).n("IAMClient","UpdateAccessKeyCommand").sc(U).build(){}function k(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:E,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","users"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function E(e){const t=new S({UserName:e.userName,Path:e.path||void 0});return l().send(t)}function z(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:v,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","users"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function v(e){const t=new $({UserName:e});return l().send(t)}function G(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:x,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","access-keys"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function x(e){const t=new D({UserName:e});return l().send(t)}function H(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:b,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","access-keys"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function b(e){const{userName:t,accessKeyId:n}=e,s=new M({UserName:t,AccessKeyId:n});return l().send(s)}function J(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:B,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","access-keys"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function B(e){const{userName:t,accessKeyId:n,status:s}=e,c=new N({UserName:t,AccessKeyId:n,Status:s});return l().send(c)}function R(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:F,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","policies"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function F(e){const t=new g({PolicyName:e.policyName,Description:e.description||void 0,PolicyDocument:e.policyDocument});return l().send(t)}function j(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:Q,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","policies"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function Q(e){const t=new q({PolicyArn:e});return l().send(t)}function L(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:w,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","attached-user-policies"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function w(e){const{userName:t,policyArn:n}=e,s=new K({UserName:t,PolicyArn:n});return l().send(s)}function O(){const e=o.c(2),t=u();let n;return e[0]!==t?(n={mutationFn:V,onSuccess:()=>{t.invalidateQueries({queryKey:["iam","attached-user-policies"]})}},e[0]=t,e[1]=n):n=e[1],m(n)}function V(e){const{userName:t,policyArn:n}=e,s=new h({UserName:t,PolicyArn:n});return l().send(s)}export{R as a,z as b,G as c,H as d,J as e,L as f,O as g,j as h,k as u};
|
||||
import{t as e}from"./compiler-runtime.js";import{n as t}from"./QueryClientProvider.js";import{n}from"./error-banner.js";import{A as r,C as i,D as a,Dt as o,E as s,O as c,R as l,T as u,jt as d,k as f,r as p,w as m,z as h}from"./awsClient.js";var g=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`AttachUserPolicy`,{}).n(`IAMClient`,`AttachUserPolicyCommand`).sc(i).build(){},_=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateAccessKey`,{}).n(`IAMClient`,`CreateAccessKeyCommand`).sc(m).build(){},v=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreatePolicy`,{}).n(`IAMClient`,`CreatePolicyCommand`).sc(u).build(){},y=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`CreateUser`,{}).n(`IAMClient`,`CreateUserCommand`).sc(s).build(){},b=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteAccessKey`,{}).n(`IAMClient`,`DeleteAccessKeyCommand`).sc(a).build(){},x=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeletePolicy`,{}).n(`IAMClient`,`DeletePolicyCommand`).sc(c).build(){},S=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DeleteUser`,{}).n(`IAMClient`,`DeleteUserCommand`).sc(f).build(){},C=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`DetachUserPolicy`,{}).n(`IAMClient`,`DetachUserPolicyCommand`).sc(r).build(){},w=class extends d.classBuilder().ep(h).m(function(e,t,n,r){return[o(n,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`UpdateAccessKey`,{}).n(`IAMClient`,`UpdateAccessKeyCommand`).sc(l).build(){},T=e();function E(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:D,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`users`]})}},e[0]=r,e[1]=i),n(i)}function D(e){let t=new y({UserName:e.userName,Path:e.path||void 0});return p().send(t)}function O(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:k,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`users`]})}},e[0]=r,e[1]=i),n(i)}function k(e){let t=new S({UserName:e});return p().send(t)}function A(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:j,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=r,e[1]=i),n(i)}function j(e){let t=new _({UserName:e});return p().send(t)}function M(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:N,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=r,e[1]=i),n(i)}function N(e){let{userName:t,accessKeyId:n}=e,r=new b({UserName:t,AccessKeyId:n});return p().send(r)}function P(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:F,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`access-keys`]})}},e[0]=r,e[1]=i),n(i)}function F(e){let{userName:t,accessKeyId:n,status:r}=e,i=new w({UserName:t,AccessKeyId:n,Status:r});return p().send(i)}function I(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:L,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`policies`]})}},e[0]=r,e[1]=i),n(i)}function L(e){let t=new v({PolicyName:e.policyName,Description:e.description||void 0,PolicyDocument:e.policyDocument});return p().send(t)}function R(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:z,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`policies`]})}},e[0]=r,e[1]=i),n(i)}function z(e){let t=new x({PolicyArn:e});return p().send(t)}function B(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:V,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},e[0]=r,e[1]=i),n(i)}function V(e){let{userName:t,policyArn:n}=e,r=new g({UserName:t,PolicyArn:n});return p().send(r)}function H(){let e=(0,T.c)(2),r=t(),i;return e[0]===r?i=e[1]:(i={mutationFn:U,onSuccess:()=>{r.invalidateQueries({queryKey:[`iam`,`attached-user-policies`]})}},e[0]=r,e[1]=i),n(i)}function U(e){let{userName:t,policyArn:n}=e,r=new C({UserName:t,PolicyArn:n});return p().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
@@ -1 +1 @@
|
||||
import{o as r,k as e}from"./index.js";const c=r({userName:e().min(1,"User name is required").max(64,"User name must be 64 characters or less").regex(/^[\w+=,.@-]+$/,"User name contains invalid characters"),path:e().optional()}),i=r({policyName:e().min(1,"Policy name is required").max(128,"Policy name must be 128 characters or less"),description:e().optional(),policyDocument:e().min(1,"Policy document is required").refine(a=>{try{return JSON.parse(a),!0}catch{return!1}},{message:"Policy document must be valid JSON"})});export{i as a,c};
|
||||
import{t as e}from"./queryOptions.js";import{Dt as t,F as n,I as r,L as i,M as a,N as o,P as s,j as c,jt as l,r as u,z as d}from"./awsClient.js";var f=class extends l.classBuilder().ep(d).m(function(e,n,r,i){return[t(r,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicy`,{}).n(`IAMClient`,`GetPolicyCommand`).sc(c).build(){},p=class extends l.classBuilder().ep(d).m(function(e,n,r,i){return[t(r,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetPolicyVersion`,{}).n(`IAMClient`,`GetPolicyVersionCommand`).sc(a).build(){},m=class extends l.classBuilder().ep(d).m(function(e,n,r,i){return[t(r,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`GetUser`,{}).n(`IAMClient`,`GetUserCommand`).sc(o).build(){},h=class extends l.classBuilder().ep(d).m(function(e,n,r,i){return[t(r,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAccessKeys`,{}).n(`IAMClient`,`ListAccessKeysCommand`).sc(s).build(){},g=class extends l.classBuilder().ep(d).m(function(e,n,r,i){return[t(r,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListAttachedUserPolicies`,{}).n(`IAMClient`,`ListAttachedUserPoliciesCommand`).sc(n).build(){},_=class extends l.classBuilder().ep(d).m(function(e,n,r,i){return[t(r,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListPolicies`,{}).n(`IAMClient`,`ListPoliciesCommand`).sc(r).build(){},v=class extends l.classBuilder().ep(d).m(function(e,n,r,i){return[t(r,e.getEndpointParameterInstructions())]}).s(`AWSIdentityManagementV20100508`,`ListUsers`,{}).n(`IAMClient`,`ListUsersCommand`).sc(i).build(){},y=e({queryKey:[`iam`,`users`],queryFn:()=>{let e=new v({});return u().send(e)},staleTime:3e5}),b=t=>e({queryKey:[`iam`,`users`,t],queryFn:()=>{let e=new m({UserName:t});return u().send(e)},staleTime:3e5}),x=t=>e({queryKey:[`iam`,`access-keys`,t],queryFn:()=>{let e=new h({UserName:t});return u().send(e)},staleTime:3e5}),S=e({queryKey:[`iam`,`policies`],queryFn:()=>{let e=new _({Scope:`Local`});return u().send(e)},staleTime:3e5}),C=t=>e({queryKey:[`iam`,`policies`,t],queryFn:()=>{let e=new f({PolicyArn:t});return u().send(e)},staleTime:3e5}),w=(t,n)=>e({queryKey:[`iam`,`policy-versions`,t,n],queryFn:()=>{let e=new p({PolicyArn:t,VersionId:n});return u().send(e)},staleTime:3e5}),T=t=>e({queryKey:[`iam`,`attached-user-policies`,t],queryFn:()=>{let e=new g({UserName:t});return u().send(e)},staleTime:3e5});export{w as a,C as i,T as n,b as o,S as r,y as s,x as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{Qt as e,Zt as t}from"./awsClient.js";var n=t({userName:e().min(1,`User name is required`).max(64,`User name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`User name contains invalid characters`),path:e().optional()}),r=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`),description:e().optional(),policyDocument:e().min(1,`Policy document is required`).refine(e=>{try{return JSON.parse(e),!0}catch{return!1}},{message:`Policy document must be valid JSON`})});export{n,r as t};
|
||||
@@ -1 +1 @@
|
||||
import{c as T,u as H,j as t}from"./index.js";import{a as Q,u as R}from"./zod.js";import{B as z}from"./back-link.js";import{E as D}from"./error-banner.js";import{F as O}from"./form-actions.js";import{P as $}from"./page-heading.js";import{F as E,a as v,b as w}from"./field.js";import{I as q}from"./input.js";import{T as G}from"./textarea.js";import{d as J}from"./ec2.js";import{i as U}from"./ec22.js";function le(){const e=T.c(48),s=H(),r=J();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j={resolver:Q(U)},e[0]=j):j=e[0];const{handleSubmit:F,register:a,formState:C}=R(j),{errors:i,isSubmitting:_}=C;let k;e[1]!==r||e[2]!==s?(k=async L=>{await r.mutateAsync(L),s({to:"/ec2/describe-key-pairs"})},e[1]=r,e[2]=s,e[3]=k):k=e[3];const M=k;let g,A;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(z,{to:"/ec2/describe-key-pairs",children:"Back to key pairs"}),A=t.jsx($,{title:"Import Key Pair"}),e[4]=g,e[5]=A):(g=e[4],A=e[5]);let l;e[6]!==r.error?(l=r.error&&t.jsx(D,{error:r.error,msg:"Failed to import key pair"}),e[6]=r.error,e[7]=l):l=e[7];let o;e[8]!==F||e[9]!==M?(o=F(M),e[8]=F,e[9]=M,e[10]=o):o=e[10];let K;e[11]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsx(v,{children:t.jsx("label",{htmlFor:"keyName",children:"Key Pair Name"})}),e[11]=K):K=e[11];const B=!!i.keyName;let m;e[12]!==a?(m=a("keyName"),e[12]=a,e[13]=m):m=e[13];let n;e[14]!==B||e[15]!==m?(n=t.jsx(q,{"aria-invalid":B,id:"keyName",placeholder:"my-key-pair…",...m}),e[14]=B,e[15]=m,e[16]=n):n=e[16];let c;e[17]!==i.keyName?(c=t.jsx(E,{errors:[i.keyName]}),e[17]=i.keyName,e[18]=c):c=e[18];let p;e[19]!==n||e[20]!==c?(p=t.jsxs(w,{children:[K,n,c]}),e[19]=n,e[20]=c,e[21]=p):p=e[21];let P,N;e[22]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(v,{children:t.jsx("label",{htmlFor:"publicKeyMaterial",children:"Public Key"})}),N=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]=P,e[23]=N):(P=e[22],N=e[23]);const I=!!i.publicKeyMaterial;let f;e[24]!==a?(f=a("publicKeyMaterial"),e[24]=a,e[25]=f):f=e[25];let y;e[26]!==I||e[27]!==f?(y=t.jsx(G,{"aria-invalid":I,id:"publicKeyMaterial",placeholder:"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…",rows:8,...f}),e[26]=I,e[27]=f,e[28]=y):y=e[28];let d;e[29]!==i.publicKeyMaterial?(d=t.jsx(E,{errors:[i.publicKeyMaterial]}),e[29]=i.publicKeyMaterial,e[30]=d):d=e[30];let u;e[31]!==y||e[32]!==d?(u=t.jsxs(w,{children:[P,N,y,d]}),e[31]=y,e[32]=d,e[33]=u):u=e[33];let b;e[34]!==s?(b=()=>s({to:"/ec2/describe-key-pairs"}),e[34]=s,e[35]=b):b=e[35];let x;e[36]!==r.isPending||e[37]!==_||e[38]!==b?(x=t.jsx(O,{isPending:r.isPending,isSubmitting:_,onCancel:b,pendingLabel:"Importing…",submitLabel:"Import Key Pair"}),e[36]=r.isPending,e[37]=_,e[38]=b,e[39]=x):x=e[39];let h;e[40]!==p||e[41]!==u||e[42]!==x||e[43]!==o?(h=t.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:o,children:[p,u,x]}),e[40]=p,e[41]=u,e[42]=x,e[43]=o,e[44]=h):h=e[44];let S;return e[45]!==h||e[46]!==l?(S=t.jsxs(t.Fragment,{children:[g,A,l,h]}),e[45]=h,e[46]=l,e[47]=S):S=e[47],S}export{le as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./error-banner.js";import"./useRouterState.js";import"./utils.js";import{t as r}from"./useNavigate.js";import"./button.js";import{t as i}from"./back-link.js";import"./separator.js";import"./awsClient.js";import{_ as a}from"./ec2.js";import"./ec22.js";import{O as o}from"./index.js";import{t as s}from"./page-heading.js";import{i as c,n as l,t as u}from"./field.js";import{t as d}from"./textarea.js";import{r as f,t as p}from"./zod.js";import{s as m}from"./ec23.js";import{t as h}from"./form-actions.js";var g=t(),_=e();function v(){let e=(0,g.c)(48),t=r(),v=a(),y;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={resolver:p(m)},e[0]=y):y=e[0];let{handleSubmit:b,register:x,formState:S}=f(y),{errors:C,isSubmitting:w}=S,T;e[1]!==v||e[2]!==t?(T=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[1]=v,e[2]=t,e[3]=T):T=e[3];let E=T,D,O;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,_.jsx)(i,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),O=(0,_.jsx)(s,{title:`Import Key Pair`}),e[4]=D,e[5]=O):(D=e[4],O=e[5]);let k;e[6]===v.error?k=e[7]:(k=v.error&&(0,_.jsx)(n,{error:v.error,msg:`Failed to import key pair`}),e[6]=v.error,e[7]=k);let A;e[8]!==b||e[9]!==E?(A=b(E),e[8]=b,e[9]=E,e[10]=A):A=e[10];let j;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[11]=j):j=e[11];let M=!!C.keyName,N;e[12]===x?N=e[13]:(N=x(`keyName`),e[12]=x,e[13]=N);let P;e[14]!==M||e[15]!==N?(P=(0,_.jsx)(o,{"aria-invalid":M,id:`keyName`,placeholder:`my-key-pair…`,...N}),e[14]=M,e[15]=N,e[16]=P):P=e[16];let F;e[17]===C.keyName?F=e[18]:(F=(0,_.jsx)(l,{errors:[C.keyName]}),e[17]=C.keyName,e[18]=F);let I;e[19]!==P||e[20]!==F?(I=(0,_.jsxs)(u,{children:[j,P,F]}),e[19]=P,e[20]=F,e[21]=I):I=e[21];let L,R;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),R=(0,_.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)`}),e[22]=L,e[23]=R):(L=e[22],R=e[23]);let z=!!C.publicKeyMaterial,B;e[24]===x?B=e[25]:(B=x(`publicKeyMaterial`),e[24]=x,e[25]=B);let V;e[26]!==z||e[27]!==B?(V=(0,_.jsx)(d,{"aria-invalid":z,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...B}),e[26]=z,e[27]=B,e[28]=V):V=e[28];let H;e[29]===C.publicKeyMaterial?H=e[30]:(H=(0,_.jsx)(l,{errors:[C.publicKeyMaterial]}),e[29]=C.publicKeyMaterial,e[30]=H);let U;e[31]!==V||e[32]!==H?(U=(0,_.jsxs)(u,{children:[L,R,V,H]}),e[31]=V,e[32]=H,e[33]=U):U=e[33];let W;e[34]===t?W=e[35]:(W=()=>t({to:`/ec2/describe-key-pairs`}),e[34]=t,e[35]=W);let G;e[36]!==v.isPending||e[37]!==w||e[38]!==W?(G=(0,_.jsx)(h,{isPending:v.isPending,isSubmitting:w,onCancel:W,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[36]=v.isPending,e[37]=w,e[38]=W,e[39]=G):G=e[39];let K;e[40]!==I||e[41]!==U||e[42]!==G||e[43]!==A?(K=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,U,G]}),e[40]=I,e[41]=U,e[42]=G,e[43]=A,e[44]=K):K=e[44];let q;return e[45]!==K||e[46]!==k?(q=(0,_.jsxs)(_.Fragment,{children:[D,O,k,K]}),e[45]=K,e[46]=k,e[47]=q):q=e[47],q}export{v as component};
|
||||
+2
-1
File diff suppressed because one or more lines are too long
+10
-81
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
import{c as o,w as c,j as t,n as m,L as u,B as l}from"./index.js";import{u as d}from"./useSuspenseQuery.js";import{L as p}from"./list-card.js";import{P as S}from"./page-heading.js";import{S as f}from"./state-badge.js";function y(){const e=o.c(5),{data:s}=d(c);let n;e[0]!==s.Subnets?(n=s.Subnets||[],e[0]=s.Subnets,e[1]=n):n=e[1];const a=n;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(S,{actions:t.jsx(u,{to:"/ec2/create-subnet",children:t.jsx(l,{children:"Create Subnet"})}),title:"Subnets"}),e[2]=r):r=e[2];let i;return e[3]!==a?(i=t.jsxs(t.Fragment,{children:[r,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(b)}):t.jsx("p",{className:"text-muted-foreground",children:"No subnets found."})]}),e[3]=a,e[4]=i):i=e[4],i}function b(e){if(!e.SubnetId)return null;const s=m(e.Tags);return t.jsx(p,{badge:t.jsx(f,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??""} • ${e.AvailabilityZone??""}`,title:s?`${e.SubnetId} (${s})`:e.SubnetId,to:"/ec2/describe-subnets/$id"},e.SubnetId)}export{y as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as i,E as c,j as e,L as m,B as p}from"./index.js";import{u as l}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as u}from"./page-heading.js";import{S}from"./state-badge.js";function b(){const t=i.c(5),{data:r}=l(c);let s;t[0]!==r.Snapshots?(s=r.Snapshots||[],t[0]=r.Snapshots,t[1]=s):s=t[1];const o=s;let a;t[2]===Symbol.for("react.memo_cache_sentinel")?(a=e.jsx(u,{actions:e.jsx(m,{to:"/ec2/create-snapshot",children:e.jsx(p,{children:"Create Snapshot"})}),title:"EC2 Snapshots"}),t[2]=a):a=t[2];let n;return t[3]!==o?(n=e.jsxs(e.Fragment,{children:[a,o.length>0?e.jsx("div",{className:"space-y-4",children:o.map(h)}):e.jsx("p",{className:"text-muted-foreground",children:"No snapshots found."})]}),t[3]=o,t[4]=n):n=t[4],n}function h(t){return t.SnapshotId?e.jsx(d,{badge:e.jsx(S,{state:t.State}),params:{id:t.SnapshotId},subtitle:`${t.VolumeSize} GiB • ${t.VolumeId}`,title:t.SnapshotId,to:"/ec2/describe-snapshots/$id"},t.SnapshotId):null}export{b as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as m,t as l,j as t,L 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:s}=p(l);let r;if(e[0]!==s.KeyPairs){const a=(s.KeyPairs||[]).toSorted(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],r=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]=s.KeyPairs,e[1]=r}else r=e[1];return r}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,s){const r=e.KeyName?.toLowerCase()??"",a=s.KeyName?.toLowerCase()??"";return r.localeCompare(a)}export{P as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as i,F as c,j as e,L as m,B as d}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as l}from"./page-heading.js";import{S as I}from"./state-badge.js";const o={running:0,pending:1,stopping:2,"shutting-down":3,stopped:4,terminated:5};function R(){const t=i.c(3),{data:s}=p(c);let n;if(t[0]!==s.Reservations){const a=(s.Reservations?.flatMap(g)||[]).toSorted(x);let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=e.jsx(l,{actions:e.jsx(m,{to:"/ec2/run-instances",children:e.jsx(d,{children:"Run Instances"})}),title:"EC2 Instances"}),t[2]=r):r=t[2],n=e.jsxs(e.Fragment,{children:[r,a.length>0?e.jsx("div",{className:"space-y-4",children:a.map(f)}):e.jsx("p",{className:"text-muted-foreground",children:"No instances found."})]}),t[0]=s.Reservations,t[1]=n}else n=t[1];return n}function f(t){return t.InstanceId?e.jsx(u,{badge:e.jsx(I,{state:t.State?.Name}),params:{id:t.InstanceId},subtitle:`${t.InstanceType} • ${t.ImageId}`,title:t.InstanceId,to:"/ec2/describe-instances/$id"},t.InstanceId):null}function x(t,s){const n=o[t.State?.Name??""]??6,a=o[s.State?.Name??""]??6;return n!==a?n-a:(t.InstanceId??"").localeCompare(s.InstanceId??"")}function g(t){return t.Instances||[]}export{R as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as n,q as i,j as t}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as l}from"./list-card.js";import{P as d}from"./page-heading.js";import{S as p}from"./state-badge.js";function h(){const e=n.c(5),{data:o}=c(i);let s;e[0]!==o.Images?(s=o.Images||[],e[0]=o.Images,e[1]=s):s=e[1];const a=s;let m;e[2]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(d,{title:"EC2 Images"}),e[2]=m):m=e[2];let r;return e[3]!==a?(r=t.jsxs(t.Fragment,{children:[m,a.length>0?t.jsx("div",{className:"space-y-4",children:a.map(u)}):t.jsx("p",{className:"text-muted-foreground",children:"No images found."})]}),e[3]=a,e[4]=r):r=e[4],r}function u(e){return e.ImageId?t.jsx(l,{badge:t.jsx(p,{state:e.State}),params:{id:e.ImageId},subtitle:e.Name,title:e.ImageId,to:"/ec2/describe-images/$id"},e.ImageId):null}export{h as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{d6 as z,d7 as x}from"./index.js";class T{marshaller;serializer;deserializer;serdeContext;defaultContentType;constructor({marshaller:i,serializer:n,deserializer:o,serdeContext:c,defaultContentType:d}){this.marshaller=i,this.serializer=n,this.deserializer=o,this.serdeContext=c,this.defaultContentType=d}async serializeEventStream({eventStream:i,requestSchema:n,initialRequest:o}){const c=this.marshaller,d=n.getEventStreamMember(),p=n.getMemberSchema(d),y=this.serializer,f=this.defaultContentType,h=Symbol("initialRequestMarker"),S={async*[Symbol.asyncIterator](){if(o){const r={":event-type":{type:"string",value:"initial-request"},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:f}};y.write(n,o);const t=y.flush();yield{[h]:!0,headers:r,body:t}}for await(const r of i)yield r}};return c.serialize(S,r=>{if(r[h])return{headers:r.headers,body:r.body};const t=Object.keys(r).find(s=>s!=="__type")??"",{additionalHeaders:e,body:a,eventType:l,explicitPayloadContentType:m}=this.writeEventBody(t,p,r);return{headers:{":event-type":{type:"string",value:l},":message-type":{type:"string",value:"event"},":content-type":{type:"string",value:m??f},...e},body:a}})}async deserializeEventStream({response:i,responseSchema:n,initialResponseContainer:o}){const c=this.marshaller,d=n.getEventStreamMember(),y=n.getMemberSchema(d).getMemberSchemas(),f=Symbol("initialResponseMarker"),h=c.deserialize(i.body,async t=>{const e=Object.keys(t).find(l=>l!=="__type")??"",a=t[e].body;if(e==="initial-response"){const l=await this.deserializer.read(n,a);return delete l[d],{[f]:!0,...l}}else if(e in y){const l=y[e];if(l.isStructSchema()){const m={};let u=!1;for(const[s,g]of l.structIterator()){const{eventHeader:v,eventPayload:w}=g.getMergedTraits();if(u=u||!!(v||w),w)g.isBlobSchema()?m[s]=a:g.isStringSchema()?m[s]=(this.serdeContext?.utf8Encoder??z)(a):g.isStructSchema()&&(m[s]=await this.deserializer.read(g,a));else if(v){const b=t[e].headers[s]?.value;b!=null&&(g.isNumericSchema()?b&&typeof b=="object"&&"bytes"in b?m[s]=BigInt(b.toString()):m[s]=Number(b):m[s]=b)}}if(u)return{[e]:m};if(a.byteLength===0)return{[e]:{}}}return{[e]:await this.deserializer.read(l,a)}}else return{$unknown:t}}),S=h[Symbol.asyncIterator](),r=await S.next();if(r.done)return h;if(r.value?.[f]){if(!n)throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");for(const[t,e]of Object.entries(r.value))o[t]=e}return{async*[Symbol.asyncIterator](){for(r?.value?.[f]||(yield r.value);;){const{done:t,value:e}=await S.next();if(t)break;yield e}}}}writeEventBody(i,n,o){const c=this.serializer;let d=i,p=null,y;const f=n.getSchema()[4].includes(i),h={};if(f){const t=n.getMemberSchema(i);if(t.isStructSchema()){for(const[e,a]of t.structIterator()){const{eventHeader:l,eventPayload:m}=a.getMergedTraits();if(m)p=e;else if(l){const u=o[i][e];let s="binary";a.isNumericSchema()?(-2)**31<=u&&u<=2**31-1?s="integer":s="long":a.isTimestampSchema()?s="timestamp":a.isStringSchema()?s="string":a.isBooleanSchema()&&(s="boolean"),u!=null&&(h[e]={type:s,value:u},delete o[i][e])}}if(p!==null){const e=t.getMemberSchema(p);e.isBlobSchema()?y="application/octet-stream":e.isStringSchema()&&(y="text/plain"),c.write(e,o[i][p])}else c.write(t,o[i])}else if(t.isUnitSchema())c.write(t,{});else throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union.")}else{const[t,e]=o[i];d=t,c.write(15,e)}const S=c.flush()??new Uint8Array;return{body:typeof S=="string"?(this.serdeContext?.utf8Decoder??x)(S):S,eventType:d,explicitPayloadContentType:y,additionalHeaders:h}}}export{T as EventStreamSerde};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as n,f as r,j as i}from"./index.js";import{u as a}from"./useSuspenseQuery.js";import{P as p}from"./page-heading.js";function f(){const e=n.c(2),{data:t}=a(r),s=`${t?.Regions?.[0]?.RegionName} Dashboard`;let o;return e[0]!==s?(o=i.jsx(p,{title:s}),e[0]=s,e[1]=o):o=e[1],o}export{f as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as i,h as c,j as t,i as m,L as u,B as l}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as f}from"./page-heading.js";function N(){const e=i.c(5),{data:n}=p(c);let s;e[0]!==n.Buckets?(s=n.Buckets||[],e[0]=n.Buckets,e[1]=s):s=e[1];const a=s;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(f,{actions:t.jsx(u,{to:"/s3/create-bucket",children:t.jsx(l,{children:"Create Bucket"})}),title:"S3 Buckets"}),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(x)}):t.jsx("p",{className:"text-muted-foreground",children:"No buckets found."})]}),e[3]=a,e[4]=o):o=e[4],o}function x(e){return e.Name?t.jsx(d,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${m(e.CreationDate)}`:void 0,title:e.Name,to:"/s3/ls/$bucket"},e.Name):null}export{N as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as b,x as y,j as s,y as k,z as N}from"./index.js";import{u as B}from"./useSuspenseQuery.js";import{B as O}from"./back-link.js";import{E as C}from"./error-banner.js";import{P as F}from"./page-heading.js";import{a as K}from"./s3.js";import{U as v,F as E,O as U}from"./upload-button.js";import"./delete-confirmation-dialog.js";import"./alert-dialog.js";import"./download.js";import"./trash-2.js";function $(){const e=b.c(31),{bucket:t}=y.useParams();let x;e[0]!==t?(x=N(t),e[0]=t,e[1]=x):x=e[1];const{data:i}=B(x),r=K();let p;e[2]!==i.Contents?(p=i.Contents||[],e[2]=i.Contents,e[3]=p):p=e[3];const n=p;let h;e[4]!==i.CommonPrefixes?(h=i.CommonPrefixes||[],e[4]=i.CommonPrefixes,e[5]=h):h=e[5];const l=h;let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(O,{to:"/s3/ls",children:"Back to buckets"}),e[6]=g):g=e[6];let a;e[7]!==t||e[8]!==r.isPending||e[9]!==r.mutateAsync?(a=s.jsx(v,{bucket:t,isPending:r.isPending,onUpload:r.mutateAsync}),e[7]=t,e[8]=r.isPending,e[9]=r.mutateAsync,e[10]=a):a=e[10];let m;e[11]!==t||e[12]!==a?(m=s.jsx(F,{actions:a,title:t}),e[11]=t,e[12]=a,e[13]=m):m=e[13];let c;e[14]!==r.error?(c=r.error&&s.jsx(C,{error:r.error,msg:"Failed to upload object"}),e[14]=r.error,e[15]=c):c=e[15];let u;e[16]!==t||e[17]!==l?(u=l.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:l.map(o=>{if(!o.Prefix)return null;const P=k(o.Prefix);return s.jsx(E,{bucketName:t,folderName:P,fullPrefix:o.Prefix},o.Prefix)})})]}),e[16]=t,e[17]=l,e[18]=u):u=e[18];let f;e[19]!==t||e[20]!==n?(f=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(o=>o.Key?s.jsx(U,{bucketName:t,displayName:o.Key,fullKey:o.Key,object:o},o.Key):null)]}),e[19]=t,e[20]=n,e[21]=f):f=e[21];let d;e[22]!==l.length||e[23]!==n.length?(d=n.length===0&&l.length===0&&s.jsx("p",{className:"text-muted-foreground",children:"No objects found in this bucket."}),e[22]=l.length,e[23]=n.length,e[24]=d):d=e[24];let j;return e[25]!==m||e[26]!==c||e[27]!==u||e[28]!==f||e[29]!==d?(j=s.jsxs(s.Fragment,{children:[g,m,c,u,f,d]}),e[25]=m,e[26]=c,e[27]=u,e[28]=f,e[29]=d,e[30]=j):j=e[30],j}export{$ as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as m,A as n,j as s,i,L as c,B as l}from"./index.js";import{u}from"./useSuspenseQuery.js";import{L as p}from"./list-card.js";import{P as d}from"./page-heading.js";function C(){const e=m.c(3),{data:r}=u(n);let t;if(e[0]!==r.Users){const a=(r.Users||[]).toSorted(U);let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(d,{actions:s.jsx(c,{to:"/iam/create-user",children:s.jsx(l,{children:"Create User"})}),title:"IAM Users"}),e[2]=o):o=e[2],t=s.jsxs(s.Fragment,{children:[o,a.length>0?s.jsx("div",{className:"space-y-4",children:a.map(f)}):s.jsx("p",{className:"text-muted-foreground",children:"No IAM users found."})]}),e[0]=r.Users,e[1]=t}else t=e[1];return t}function f(e){return e.UserName?s.jsx(p,{params:{userName:e.UserName},subtitle:`${e.UserId} • ${e.Path??"/"} • Created ${i(e.CreateDate)}`,title:e.UserName,to:"/iam/list-users/$userName"},e.UserName):null}function U(e,r){const t=e.UserName?.toLowerCase()??"",a=r.UserName?.toLowerCase()??"";return t.localeCompare(a)}export{C as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as n,C as a,j as t,i as c,L as m,B as l}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as d}from"./page-heading.js";function h(){const e=n.c(3),{data:i}=p(a);let o;if(e[0]!==i.Policies){const s=(i.Policies||[]).toSorted(x);let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(d,{actions:t.jsx(m,{to:"/iam/create-policy",children:t.jsx(l,{children:"Create Policy"})}),title:"IAM Policies"}),e[2]=r):r=e[2],o=t.jsxs(t.Fragment,{children:[r,s.length>0?t.jsx("div",{className:"space-y-4",children:s.map(f)}):t.jsx("p",{className:"text-muted-foreground",children:"No IAM policies found."})]}),e[0]=i.Policies,e[1]=o}else o=e[1];return o}function f(e){return e.Arn?t.jsx(u,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:`${e.Arn} • Created ${c(e.CreateDate)}`,title:e.PolicyName??"",to:"/iam/list-policies/$policyArn"},e.Arn):null}function x(e,i){const o=e.PolicyName?.toLowerCase()??"",s=i.PolicyName?.toLowerCase()??"";return o.localeCompare(s)}export{h as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c,m as i,j as t,n as m,L as d,B as l}from"./index.js";import{u as p}from"./useSuspenseQuery.js";import{L as u}from"./list-card.js";import{P as f}from"./page-heading.js";import{S as x}from"./state-badge.js";function P(){const e=c.c(5),{data:s}=p(i);let a;e[0]!==s.Vpcs?(a=s.Vpcs||[],e[0]=s.Vpcs,e[1]=a):a=e[1];const r=a;let n;e[2]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(f,{actions:t.jsx(d,{to:"/ec2/create-vpc",children:t.jsx(l,{children:"Create VPC"})}),title:"VPCs"}),e[2]=n):n=e[2];let o;return e[3]!==r?(o=t.jsxs(t.Fragment,{children:[n,r.length>0?t.jsx("div",{className:"space-y-4",children:r.map(V)}):t.jsx("p",{className:"text-muted-foreground",children:"No VPCs found."})]}),e[3]=r,e[4]=o):o=e[4],o}function V(e){if(!e.VpcId)return null;const s=m(e.Tags);return t.jsx(u,{badge:t.jsx(x,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??"",title:s?`${e.VpcId} (${s})`:e.VpcId,to:"/ec2/describe-vpcs/$id"},e.VpcId)}export{P as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{c as m,p as l,j as t,L as n,B as u}from"./index.js";import{u as c}from"./useSuspenseQuery.js";import{L as d}from"./list-card.js";import{P as p}from"./page-heading.js";import{S as f}from"./state-badge.js";function y(){const e=m.c(5),{data:i}=c(l);let s;e[0]!==i.Volumes?(s=i.Volumes||[],e[0]=i.Volumes,e[1]=s):s=e[1];const o=s;let r;e[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(p,{actions:t.jsx(n,{to:"/ec2/create-volume",children:t.jsx(u,{children:"Create Volume"})}),title:"EC2 Volumes"}),e[2]=r):r=e[2];let a;return e[3]!==o?(a=t.jsxs(t.Fragment,{children:[r,o.length>0?t.jsx("div",{className:"space-y-4",children:o.map(x)}):t.jsx("p",{className:"text-muted-foreground",children:"No volumes found."})]}),e[3]=o,e[4]=a):a=e[4],a}function x(e){return e.VolumeId?t.jsx(d,{badge:t.jsx(f,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB • ${e.VolumeType}`,title:e.VolumeId,to:"/ec2/describe-volumes/$id"},e.VolumeId):null}export{y as component};
|
||||
@@ -1 +0,0 @@
|
||||
import{r as b,b2 as h,b6 as U,b7 as $,b8 as A,b9 as K,ba as S,j as F,c as q,a as z}from"./index.js";import{u as G,d as H,e as J,f as O,g as Q,h as W}from"./field.js";const X=b.forwardRef(function(e,a){const{render:r,className:l,id:i,name:o,value:s,disabled:I=!1,onValueChange:w,defaultValue:v,autoFocus:f=!1,...V}=e,{state:D,name:N,disabled:P,setTouched:g,setDirty:T,validityData:j,setFocused:d,setFilled:c,validationMode:k,validation:n}=G(),x=P||I,R=N??o,L={...D,disabled:x},{labelId:M}=H(),y=J({id:i});h(()=>{const t=s!=null;n.inputRef.current?.value||t&&s!==""?c(!0):t&&s===""&&c(!1)},[n.inputRef,c,s]);const p=b.useRef(null);h(()=>{f&&p.current===U($(p.current))&&d(!0)},[f,d]);const[B]=O({controlled:s,default:v,name:"FieldControl",state:"value"}),C=s!==void 0,E=C?B:void 0;return Q({id:y,name:R,commit:n.commit,value:E,getValue:()=>n.inputRef.current?.value,controlRef:n.inputRef}),A("input",e,{ref:[a,p],state:L,props:[{id:y,disabled:x,name:R,ref:n.inputRef,"aria-labelledby":M,autoFocus:f,...C?{value:E}:{defaultValue:v},onChange(t){const m=t.currentTarget.value;w?.(m,K(S,t.nativeEvent)),T(m!==j.initialValue),c(m!=="")},onFocus(){d(!0)},onBlur(t){g(!0),d(!1),k==="onBlur"&&n.commit(t.currentTarget.value)},onKeyDown(t){t.currentTarget.tagName==="INPUT"&&t.key==="Enter"&&(g(!0),n.commit(t.currentTarget.value))}},n.getInputValidationProps(),V],stateAttributesMapping:W})}),Y=b.forwardRef(function(e,a){return F.jsx(X,{ref:a,...e})});function te(u){const e=q.c(10);let a,r,l;e[0]!==u?({className:a,type:l,...r}=u,e[0]=u,e[1]=a,e[2]=r,e[3]=l):(a=e[1],r=e[2],l=e[3]);let i;e[4]!==a?(i=z("h-7 w-full min-w-0 rounded-md border border-input bg-input/20 px-2 py-0.5 text-sm outline-none transition-colors file:inline-flex file:h-6 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-xs/relaxed placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none 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),e[4]=a,e[5]=i):i=e[5];let o;return e[6]!==r||e[7]!==i||e[8]!==l?(o=F.jsx(Y,{className:i,"data-slot":"input",type:l,...r}),e[6]=r,e[7]=i,e[8]=l,e[9]=o):o=e[9],o}export{te as I};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{A as r,E as ee,a as i,c as a,d as o,k as s,t as c}from"./useRouterState.js";import{f as te,p as ne,u as l}from"./utils.js";import{t as u}from"./useRouter.js";var d=`Error preloading route! ☝️`;t();var f=e(n(),1),re=e(l(),1);function p(e,t){let n=u(),l=te(t),{activeProps:p,inactiveProps:_,activeOptions:v,to:y,preload:fe,preloadDelay:pe,hashScrollIntoView:b,replace:me,startTransition:he,resetScroll:ge,viewTransition:_e,children:x,target:S,disabled:C,style:w,className:T,onClick:E,onBlur:D,onFocus:O,onMouseEnter:k,onMouseLeave:A,onTouchStart:j,ignoreBlocker:ve,params:ye,search:be,hash:xe,state:Se,mask:Ce,reloadDocument:we,unsafeRelative:Te,from:Ee,_fromLocation:De,...M}=e,N=i(),Oe=c({select:e=>{let t=e.matches[e.matches.length-1];return{search:t?.search,hash:e.location.hash,path:t?.pathname}},structuralSharing:!0}),P=e.from,F=f.useMemo(()=>({...e,from:P}),[n,Oe,P,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),I=f.useMemo(()=>n.buildLocation({...F}),[n,F]),L=I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,R=I.maskedLocation?I.maskedLocation.external:I.external,z=f.useMemo(()=>le(L,R,n.history,C),[C,R,L,n.history]),B=f.useMemo(()=>{if(z?.external)return r(z.href,n.protocolAllowlist)?void 0:z.href;if(!ue(y)&&!(typeof y!=`string`||y.indexOf(`:`)===-1))try{return new URL(y),r(y,n.protocolAllowlist)?void 0:y}catch{}},[y,z,n.protocolAllowlist]),V=c({select:e=>{if(B)return!1;if(v?.exact){if(!a(e.location.pathname,I.pathname,n.basepath))return!1}else{let t=o(e.location.pathname,n.basepath),r=o(I.pathname,n.basepath);if(!(t.startsWith(r)&&(t.length===r.length||t[r.length]===`/`)))return!1}return(v?.includeSearch??!0)&&!ee(e.location.search,I.search,{partial:!v?.exact,ignoreUndefined:!v?.explicitUndefined})?!1:v?.includeHash?N&&e.location.hash===I.hash:!0}}),H=V?s(p,{})??ie:m,U=V?m:s(_,{})??m,W=[T,H.className,U.className].filter(Boolean).join(` `),G=(w||H.style||U.style)&&{...w,...H.style,...U.style},[ke,K]=f.useState(!1),q=f.useRef(!1),J=e.reloadDocument||B?!1:fe??n.options.defaultPreload,Y=pe??n.options.defaultPreloadDelay??0,X=f.useCallback(()=>{n.preloadRoute({...F,_builtLocation:I}).catch(e=>{console.warn(e),console.warn(d)})},[n,F,I]);ne(l,f.useCallback(e=>{e?.isIntersecting&&X()},[X]),ce,{disabled:!!C||J!==`viewport`}),f.useEffect(()=>{q.current||!C&&J===`render`&&(X(),q.current=!0)},[C,X,J]);let Ae=e=>{let t=e.currentTarget.getAttribute(`target`),r=S===void 0?t:S;if(!C&&!de(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,re.flushSync)(()=>{K(!0)});let t=n.subscribe(`onResolved`,()=>{t(),K(!1)});n.navigate({...F,replace:me,resetScroll:ge,hashScrollIntoView:b,startTransition:he,viewTransition:_e,ignoreBlocker:ve})}};if(B)return{...M,ref:l,href:B,...x&&{children:x},...S&&{target:S},...C&&{disabled:C},...w&&{style:w},...T&&{className:T},...E&&{onClick:E},...D&&{onBlur:D},...O&&{onFocus:O},...k&&{onMouseEnter:k},...A&&{onMouseLeave:A},...j&&{onTouchStart:j}};let Z=e=>{if(C||J!==`intent`)return;if(!Y){X();return}let t=e.currentTarget;if(h.has(t))return;let n=setTimeout(()=>{h.delete(t),X()},Y);h.set(t,n)},Q=e=>{C||J!==`intent`||X()},$=e=>{if(C||!J||!Y)return;let t=e.currentTarget,n=h.get(t);n&&(clearTimeout(n),h.delete(t))};return{...M,...H,...U,href:z?.href,ref:l,onClick:g([E,Ae]),onBlur:g([D,$]),onFocus:g([O,Z]),onMouseEnter:g([k,Z]),onMouseLeave:g([A,$]),onTouchStart:g([j,Q]),disabled:!!C,target:S,...G&&{style:G},...W&&{className:W},...C&&ae,...V&&oe,...N&&ke&&se}}var m={},ie={className:`active`},ae={role:`link`,"aria-disabled":!0},oe={"data-status":`active`,"aria-current":`page`},se={"data-transitioning":`transitioning`},h=new WeakMap,ce={rootMargin:`100px`},g=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function le(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function ue(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var _=f.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:ee,...i}=p(r,t),a=typeof r.children==`function`?r.children({isActive:i[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=i;return f.createElement(`a`,t,a)}return f.createElement(n,i,a)});function de(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}export{_ as t};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as u,j as m,L 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 c;e[6]!==r?(c=m.jsx("h3",{className:"font-semibold",children:r}),e[6]=r,e[7]=c):c=e[7];let n;e[8]!==t?(n=t&&m.jsx("p",{className:"mt-1 font-medium text-muted-foreground text-sm",children:t}),e[8]=t,e[9]=n):n=e[9];let a;e[10]!==l||e[11]!==c||e[12]!==n?(a=m.jsxs("div",{className:"flex-1",children:[c,n,l]}),e[10]=l,e[11]=c,e[12]=n,e[13]=a):a=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]!==a||e[17]!==o?(d=m.jsxs("div",{className:"flex items-start justify-between",children:[a,o]}),e[16]=a,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{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";var r=t(),i=e();function a(e){let t=(0,r.c)(22),a,o,s,c,l;t[0]===e?(a=t[1],o=t[2],s=t[3],c=t[4],l=t[5]):({title:l,subtitle:c,badge:a,children:o,...s}=e,t[0]=e,t[1]=a,t[2]=o,t[3]=s,t[4]=c,t[5]=l);let u;t[6]===l?u=t[7]:(u=(0,i.jsx)(`h3`,{className:`font-semibold`,children:l}),t[6]=l,t[7]=u);let d;t[8]===c?d=t[9]:(d=c&&(0,i.jsx)(`p`,{className:`mt-1 text-sm font-medium text-muted-foreground`,children:c}),t[8]=c,t[9]=d);let f;t[10]!==o||t[11]!==u||t[12]!==d?(f=(0,i.jsxs)(`div`,{className:`flex-1`,children:[u,d,o]}),t[10]=o,t[11]=u,t[12]=d,t[13]=f):f=t[13];let p;t[14]===a?p=t[15]:(p=a&&(0,i.jsx)(`div`,{className:`ml-4`,children:a}),t[14]=a,t[15]=p);let m;t[16]!==f||t[17]!==p?(m=(0,i.jsxs)(`div`,{className:`flex items-start justify-between`,children:[f,p]}),t[16]=f,t[17]=p,t[18]=m):m=t[18];let h;return t[19]!==s||t[20]!==m?(h=(0,i.jsx)(n,{className:`block rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,...s,children:m}),t[19]=s,t[20]=m,t[21]=h):h=t[21],h}export{a as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import{a as i}from"./utils.js";import{t as a}from"./button.js";import"./awsClient.js";import{r as o}from"./iam2.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(3),{data:t}=n(o),i;if(e[0]!==t.Policies){let n=(t.Policies||[]).toSorted(p),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/iam/create-policy`,children:(0,u.jsx)(a,{children:`Create Policy`})}),title:`IAM Policies`}),e[2]=o):o=e[2],i=(0,u.jsxs)(u.Fragment,{children:[o,n.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:n.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),e[0]=t.Policies,e[1]=i}else i=e[1];return i}function f(e){return e.Arn?(0,u.jsx)(c,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:`${e.Arn} • Created ${i(e.CreateDate)}`,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function p(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{d as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import{a as i}from"./utils.js";import{t as a}from"./button.js";import"./awsClient.js";import{s as o}from"./iam2.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(3),{data:t}=n(o),i;if(e[0]!==t.Users){let n=(t.Users||[]).toSorted(p),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/iam/create-user`,children:(0,u.jsx)(a,{children:`Create User`})}),title:`IAM Users`}),e[2]=o):o=e[2],i=(0,u.jsxs)(u.Fragment,{children:[o,n.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:n.map(f)}):(0,u.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),e[0]=t.Users,e[1]=i}else i=e[1];return i}function f(e){return e.UserName?(0,u.jsx)(c,{params:{userName:e.UserName},subtitle:`${e.UserId} • ${e.Path??`/`} • Created ${i(e.CreateDate)}`,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function p(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{d as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as A,a as F,j as c,u as G,r as O,b as T,d as $,s as Y,g as k,D as H,e as J,B as U}from"./index.js";import{a as W,u as q}from"./zod.js";import{F as M,a as L,b as R,c as Q}from"./field.js";import{I as X}from"./input.js";function V(e){const s=A.c(10);let t,a,l;s[0]!==e?({className:t,size:l,...a}=e,s[0]=e,s[1]=t,s[2]=a,s[3]=l):(t=s[1],a=s[2],l=s[3]);const r=l===void 0?"default":l;let i;s[4]!==t?(i=F("group/card flex flex-col gap-4 overflow-hidden rounded-lg bg-card py-4 text-card-foreground text-xs/relaxed 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",t),s[4]=t,s[5]=i):i=s[5];let n;return s[6]!==a||s[7]!==r||s[8]!==i?(n=c.jsx("div",{className:i,"data-size":r,"data-slot":"card",...a}),s[6]=a,s[7]=r,s[8]=i,s[9]=n):n=s[9],n}function Z(e){const s=A.c(8);let t,a;s[0]!==e?({className:t,...a}=e,s[0]=e,s[1]=t,s[2]=a):(t=s[1],a=s[2]);let l;s[3]!==t?(l=F("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3",t),s[3]=t,s[4]=l):l=s[4];let r;return s[5]!==a||s[6]!==l?(r=c.jsx("div",{className:l,"data-slot":"card-header",...a}),s[5]=a,s[6]=l,s[7]=r):r=s[7],r}function ee(e){const s=A.c(8);let t,a;s[0]!==e?({className:t,...a}=e,s[0]=e,s[1]=t,s[2]=a):(t=s[1],a=s[2]);let l;s[3]!==t?(l=F("font-medium text-sm",t),s[3]=t,s[4]=l):l=s[4];let r;return s[5]!==a||s[6]!==l?(r=c.jsx("div",{className:l,"data-slot":"card-title",...a}),s[5]=a,s[6]=l,s[7]=r):r=s[7],r}function se(e){const s=A.c(8);let t,a;s[0]!==e?({className:t,...a}=e,s[0]=e,s[1]=t,s[2]=a):(t=s[1],a=s[2]);let l;s[3]!==t?(l=F("px-4 group-data-[size=sm]/card:px-3",t),s[3]=t,s[4]=l):l=s[4];let r;return s[5]!==a||s[6]!==l?(r=c.jsx("div",{className:l,"data-slot":"card-content",...a}),s[5]=a,s[6]=l,s[7]=r):r=s[7],r}function ie(){const e=A.c(44),s=G(),[t,a]=O.useState(null);let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={resolver:W(T)},e[0]=l):l=e[0];const{register:r,handleSubmit:i,formState:n}=q(l),{errors:o,isSubmitting:I}=n;let N;e[1]!==s?(N=async function(B){a(null),$(),Y(B);try{await k().send(new H({})),s({to:"/"})}catch{J(),$(),a("Invalid credentials. Please check your Access Key ID and Secret Access Key.")}},e[1]=s,e[2]=N):N=e[2];const _=N;let v;e[3]===Symbol.for("react.memo_cache_sentinel")?(v=c.jsx(Z,{children:c.jsx(ee,{children:"AWS Credentials"})}),e[3]=v):v=e[3];let d;e[4]!==t?(d=t&&c.jsx("p",{className:"mb-4 rounded-md bg-destructive/10 p-3 text-destructive text-sm",children:t}),e[4]=t,e[5]=d):d=e[5];let m;e[6]!==i||e[7]!==_?(m=i(_),e[6]=i,e[7]=_,e[8]=m):m=e[8];let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=c.jsx(L,{children:c.jsx("label",{htmlFor:"accessKeyId",children:"Access Key ID"})}),e[9]=C):C=e[9];const z=!!o.accessKeyId;let f;e[10]!==r?(f=r("accessKeyId"),e[10]=r,e[11]=f):f=e[11];let u;e[12]!==z||e[13]!==f?(u=c.jsx(X,{"aria-invalid":z,autoComplete:"username",id:"accessKeyId",placeholder:"AKIAIOSFODNN7EXAMPLE",...f}),e[12]=z,e[13]=f,e[14]=u):u=e[14];let p;e[15]!==o.accessKeyId?(p=c.jsx(M,{errors:[o.accessKeyId]}),e[15]=o.accessKeyId,e[16]=p):p=e[16];let x;e[17]!==p||e[18]!==u?(x=c.jsxs(R,{children:[C,u,p]}),e[17]=p,e[18]=u,e[19]=x):x=e[19];let E;e[20]===Symbol.for("react.memo_cache_sentinel")?(E=c.jsx(L,{children:c.jsx("label",{htmlFor:"secretAccessKey",children:"Secret Access Key"})}),e[20]=E):E=e[20];const D=!!o.secretAccessKey;let h;e[21]!==r?(h=r("secretAccessKey"),e[21]=r,e[22]=h):h=e[22];let g;e[23]!==D||e[24]!==h?(g=c.jsx(X,{"aria-invalid":D,autoComplete:"current-password",id:"secretAccessKey",placeholder:"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY",type:"password",...h}),e[23]=D,e[24]=h,e[25]=g):g=e[25];let y;e[26]!==o.secretAccessKey?(y=c.jsx(M,{errors:[o.secretAccessKey]}),e[26]=o.secretAccessKey,e[27]=y):y=e[27];let b;e[28]!==g||e[29]!==y?(b=c.jsxs(R,{children:[E,g,y]}),e[28]=g,e[29]=y,e[30]=b):b=e[30];const P=I?"Signing in...":"Sign In";let j;e[31]!==I||e[32]!==P?(j=c.jsx(U,{className:"w-full",disabled:I,type:"submit",children:P}),e[31]=I,e[32]=P,e[33]=j):j=e[33];let K;e[34]!==x||e[35]!==b||e[36]!==j?(K=c.jsxs(Q,{children:[x,b,j]}),e[34]=x,e[35]=b,e[36]=j,e[37]=K):K=e[37];let S;e[38]!==K||e[39]!==m?(S=c.jsx("form",{onSubmit:m,children:K}),e[38]=K,e[39]=m,e[40]=S):S=e[40];let w;return e[41]!==S||e[42]!==d?(w=c.jsx("div",{className:"flex flex-1 items-center justify-center",children:c.jsxs(V,{className:"w-full max-w-sm",children:[v,c.jsxs(se,{children:[d,S]})]})}),e[41]=S,e[42]=d,e[43]=w):w=e[43],w}export{ie as component};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./utils.js";import{t as a}from"./useNavigate.js";import{t as o}from"./button.js";import"./separator.js";import{Gt as s,Wt as c,n as l,qt as u,t as d}from"./awsClient.js";import{t as f}from"./DescribeInstancesCommand.js";import{O as p}from"./index.js";import{i as m,n as h,r as g,t as _}from"./field.js";import{r as v,t as y}from"./zod.js";var b=e(n()),x=r(),S=t();function C(e){let t=(0,x.c)(10),n,r,a;t[0]===e?(n=t[1],r=t[2],a=t[3]):({className:n,size:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=a);let o=a===void 0?`default`:a,s;t[4]===n?s=t[5]:(s=i(`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`,n),t[4]=n,t[5]=s);let c;return t[6]!==r||t[7]!==o||t[8]!==s?(c=(0,S.jsx)(`div`,{className:s,"data-size":o,"data-slot":`card`,...r}),t[6]=r,t[7]=o,t[8]=s,t[9]=c):c=t[9],c}function w(e){let t=(0,x.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`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`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,S.jsx)(`div`,{className:a,"data-slot":`card-header`,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function T(e){let t=(0,x.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`text-sm font-medium`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,S.jsx)(`div`,{className:a,"data-slot":`card-title`,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function E(e){let t=(0,x.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let a;t[3]===n?a=t[4]:(a=i(`px-4 group-data-[size=sm]/card:px-3`,n),t[3]=n,t[4]=a);let o;return t[5]!==r||t[6]!==a?(o=(0,S.jsx)(`div`,{className:a,"data-slot":`card-content`,...r}),t[5]=r,t[6]=a,t[7]=o):o=t[7],o}function D(){let e=(0,x.c)(44),t=a(),[n,r]=(0,b.useState)(null),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={resolver:y(c)},e[0]=i):i=e[0];let{register:D,handleSubmit:O,formState:k}=v(i),{errors:A,isSubmitting:j}=k,M;e[1]===t?M=e[2]:(M=async function(e){r(null),d(),u(e);try{await l().send(new f({})),t({to:`/`})}catch{s(),d(),r(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}},e[1]=t,e[2]=M);let N=M,P;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,S.jsx)(w,{children:(0,S.jsx)(T,{children:`AWS Credentials`})}),e[3]=P):P=e[3];let F;e[4]===n?F=e[5]:(F=n&&(0,S.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:n}),e[4]=n,e[5]=F);let I;e[6]!==O||e[7]!==N?(I=O(N),e[6]=O,e[7]=N,e[8]=I):I=e[8];let L;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,S.jsx)(m,{children:(0,S.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),e[9]=L):L=e[9];let R=!!A.accessKeyId,z;e[10]===D?z=e[11]:(z=D(`accessKeyId`),e[10]=D,e[11]=z);let B;e[12]!==R||e[13]!==z?(B=(0,S.jsx)(p,{"aria-invalid":R,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...z}),e[12]=R,e[13]=z,e[14]=B):B=e[14];let V;e[15]===A.accessKeyId?V=e[16]:(V=(0,S.jsx)(h,{errors:[A.accessKeyId]}),e[15]=A.accessKeyId,e[16]=V);let H;e[17]!==V||e[18]!==B?(H=(0,S.jsxs)(_,{children:[L,B,V]}),e[17]=V,e[18]=B,e[19]=H):H=e[19];let U;e[20]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,S.jsx)(m,{children:(0,S.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),e[20]=U):U=e[20];let W=!!A.secretAccessKey,G;e[21]===D?G=e[22]:(G=D(`secretAccessKey`),e[21]=D,e[22]=G);let K;e[23]!==W||e[24]!==G?(K=(0,S.jsx)(p,{"aria-invalid":W,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...G}),e[23]=W,e[24]=G,e[25]=K):K=e[25];let q;e[26]===A.secretAccessKey?q=e[27]:(q=(0,S.jsx)(h,{errors:[A.secretAccessKey]}),e[26]=A.secretAccessKey,e[27]=q);let J;e[28]!==K||e[29]!==q?(J=(0,S.jsxs)(_,{children:[U,K,q]}),e[28]=K,e[29]=q,e[30]=J):J=e[30];let Y=j?`Signing in...`:`Sign In`,X;e[31]!==j||e[32]!==Y?(X=(0,S.jsx)(o,{className:`w-full`,disabled:j,type:`submit`,children:Y}),e[31]=j,e[32]=Y,e[33]=X):X=e[33];let Z;e[34]!==H||e[35]!==J||e[36]!==X?(Z=(0,S.jsxs)(g,{children:[H,J,X]}),e[34]=H,e[35]=J,e[36]=X,e[37]=Z):Z=e[37];let Q;e[38]!==Z||e[39]!==I?(Q=(0,S.jsx)(`form`,{onSubmit:I,children:Z}),e[38]=Z,e[39]=I,e[40]=Q):Q=e[40];let $;return e[41]!==Q||e[42]!==F?($=(0,S.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,S.jsxs)(C,{className:`w-full max-w-sm`,children:[P,(0,S.jsxs)(E,{children:[F,Q]})]})}),e[41]=Q,e[42]=F,e[43]=$):$=e[43],$}export{D as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import"./useRouterState.js";import{t as r}from"./link.js";import{a as i}from"./utils.js";import{t as a}from"./button.js";import"./awsClient.js";import{n as o}from"./s32.js";import{t as s}from"./page-heading.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=n(o),i;e[0]===t.Buckets?i=e[1]:(i=t.Buckets||[],e[0]=t.Buckets,e[1]=i);let c=i,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(r,{to:`/s3/create-bucket`,children:(0,u.jsx)(a,{children:`Create Bucket`})}),title:`S3 Buckets`}),e[2]=d):d=e[2];let p;return e[3]===c?p=e[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.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.Name?(0,u.jsx)(c,{params:{bucket:e.Name},subtitle:e.CreationDate?`Created: ${i(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,r as t}from"./compiler-runtime.js";function n(e){return!!e?.isNotFound}var r=`__root__`;function i(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function a(e){return e instanceof Response&&!!e.options}var o=e(t(),1),s=o.createContext(void 0),c=o.createContext(void 0);export{r as a,i,s as n,n as o,a as r,c as t};
|
||||
@@ -1 +1 @@
|
||||
import{c as o,j as n}from"./index.js";function f(m){const e=o.c(12),{title:x,subtitle:r,actions:c}=m;let t;e[0]!==x?(t=n.jsx("h1",{className:"text-3xl",children:x}),e[0]=x,e[1]=t):t=e[1];let s;e[2]!==r?(s=r&&n.jsx("p",{className:"mt-1 text-muted-foreground",children:r}),e[2]=r,e[3]=s):s=e[3];let i;e[4]!==t||e[5]!==s?(i=n.jsxs("div",{children:[t,s]}),e[4]=t,e[5]=s,e[6]=i):i=e[6];let l;e[7]!==c?(l=c&&n.jsx("div",{children:c}),e[7]=c,e[8]=l):l=e[8];let a;return e[9]!==i||e[10]!==l?(a=n.jsxs("div",{className:"mb-6 flex items-start justify-between",children:[i,l]}),e[9]=i,e[10]=l,e[11]=a):a=e[11],a}export{f as P};
|
||||
import{n as e,t}from"./compiler-runtime.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};
|
||||
@@ -0,0 +1 @@
|
||||
function e(e){return e}export{e as t};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as o,j as s,O as n}from"./index.js";const r=()=>{const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(n,{}),e[0]=t):t=e[0],t};export{r as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import"./useRouterState.js";import{A as n}from"./index.js";var r=t(),i=e(),a=()=>{let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t};export{a as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as o,j as s,O as n}from"./index.js";const r=()=>{const e=o.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(n,{}),e[0]=t):t=e[0],t};export{r as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import"./useRouterState.js";import{A as n}from"./index.js";var r=t(),i=e(),a=()=>{let e=(0,r.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,i.jsx)(n,{}),e[0]=t):t=e[0],t};export{a as component};
|
||||
@@ -1 +1 @@
|
||||
import{u as $,q,t as R,v as U,w as H,j as e,B as C}from"./index.js";import{u as L,a as M,C as x}from"./zod.js";import{u as h}from"./useSuspenseQuery.js";import{B as W}from"./back-link.js";import{E as S}from"./error-banner.js";import{P as z}from"./page-heading.js";import{b as c,a as l,F as j}from"./field.js";import{I as G}from"./input.js";import{S as p,a as y,b as I,c as g,d as o}from"./select.js";import{f as J}from"./ec2.js";import{f as X}from"./ec22.js";import"./check.js";function oe(){const f=$(),{data:T}=h(q),{data:F}=h(R),{data:k}=h(U),{data:w}=h(H),r=J(),b=T.Images??[],N=F.KeyPairs??[],P=w.Subnets??[],d=k.InstanceTypes?.reduce((n,a)=>{const s=a.InstanceType;return s&&(n[s]=(n[s]||0)+1),n},{})??{},i=Object.keys(d).sort(),K=b[0]?.ImageId,B=N[0]?.KeyName,V=i.find(n=>n.endsWith(".nano"))??i[0],{control:m,handleSubmit:A,register:E,watch:O,formState:{errors:t,isSubmitting:v}}=L({resolver:M(X.refine(n=>n.count<=(d[n.instanceType]??1),{message:"Cannot exceed available capacity",path:["count"]})),defaultValues:{count:1,imageId:K??"",keyName:B??"",instanceType:V??""}}),u=O("instanceType"),Q=u?d[u]??1:1,D=async n=>{await r.mutateAsync(n),f({to:"/ec2/describe-instances"})};return e.jsxs(e.Fragment,{children:[e.jsx(W,{to:"/ec2/describe-instances",children:"Back to instances"}),e.jsx(z,{title:"Run EC2 Instances"}),i.length===0&&e.jsx(S,{msg:"No compute available. No new instances can be created until compute is available."}),r.error&&e.jsx(S,{error:r.error,msg:"Failed to create instance"}),e.jsxs("form",{className:"max-w-4xl space-y-6",onSubmit:A(D),children:[e.jsxs(c,{children:[e.jsx(l,{children:e.jsx("label",{htmlFor:"imageId",children:"Image"})}),e.jsx(x,{control:m,name:"imageId",render:({field:n})=>{const a=b.find(s=>s.ImageId===n.value);return e.jsxs(p,{onValueChange:s=>n.onChange(s),value:n.value??"",children:[e.jsx(y,{"aria-invalid":!!t.imageId,className:"w-full",id:"imageId",children:e.jsx(I,{children:a?`${a.Name||"Unnamed"} (${a.Architecture})`:""})}),e.jsx(g,{children:b.map(s=>e.jsxs(o,{value:s.ImageId??"",children:[s.Name||"Unnamed"," (",s.Architecture,")"]},s.ImageId))})]})}}),e.jsx(j,{errors:[t.imageId]})]}),e.jsxs(c,{children:[e.jsx(l,{children:e.jsx("label",{htmlFor:"instanceType",children:"Instance Type"})}),e.jsx(x,{control:m,name:"instanceType",render:({field:n})=>e.jsxs(p,{onValueChange:a=>n.onChange(a),value:n.value?n.value:"",children:[e.jsx(y,{"aria-invalid":!!t.instanceType,className:"w-full",id:"instanceType",children:e.jsx(I,{})}),e.jsx(g,{children:i.map(a=>e.jsxs(o,{value:a,children:[a," (",d[a]," available)"]},a))})]})}),e.jsx(j,{errors:[t.instanceType]})]}),e.jsxs(c,{children:[e.jsx(l,{children:e.jsx("label",{htmlFor:"keyName",children:"Key Pair"})}),e.jsx(x,{control:m,name:"keyName",render:({field:n})=>e.jsxs(p,{onValueChange:a=>n.onChange(a),value:n.value?n.value:"",children:[e.jsx(y,{"aria-invalid":!!t.keyName,className:"w-full",id:"keyName",children:e.jsx(I,{})}),e.jsx(g,{children:N.map(a=>e.jsx(o,{value:a.KeyName??"",children:a.KeyName},a.KeyPairId))})]})}),e.jsx(j,{errors:[t.keyName]})]}),e.jsxs(c,{children:[e.jsx(l,{children:e.jsx("label",{htmlFor:"subnetId",children:"Subnet"})}),e.jsx(x,{control:m,name:"subnetId",render:({field:n})=>e.jsxs(p,{onValueChange:a=>n.onChange(a==="none"?void 0:a),value:n.value??"none",children:[e.jsx(y,{className:"w-full",id:"subnetId",children:e.jsx(I,{})}),e.jsxs(g,{children:[e.jsx(o,{value:"none",children:"none"}),P.map(a=>e.jsx(o,{value:a.SubnetId??"",children:a.SubnetId},a.SubnetId))]})]})})]}),e.jsxs(c,{children:[e.jsx(l,{children:e.jsx("label",{htmlFor:"count",children:"Number of Instances"})}),e.jsx(G,{"aria-describedby":"count-description","aria-invalid":!!t.count,id:"count",type:"number",...E("count",{valueAsNumber:!0})}),e.jsx("p",{className:"text-muted-foreground text-xs",id:"count-description",children:u&&`Available capacity for ${u}: ${Q}`}),e.jsx(j,{errors:[t.count]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(C,{disabled:v||r.isPending,onClick:()=>f({to:"/ec2/describe-instances"}),type:"button",variant:"outline",children:"Cancel"}),e.jsx(C,{disabled:v||r.isPending||i.length===0,type:"submit",children:v||r.isPending?"Creating…":"Create Instance"})]})]})]})}export{oe as component};
|
||||
import{n as e}from"./compiler-runtime.js";import{t}from"./useSuspenseQuery.js";import{t as n}from"./error-banner.js";import"./useRouterState.js";import"./utils.js";import{t as r}from"./useNavigate.js";import{t as i}from"./button.js";import{t as a}from"./back-link.js";import{a as o,i as s,n as c,r as l,t as u}from"./select.js";import"./separator.js";import"./awsClient.js";import{i as d}from"./ec2.js";import{a as f,c as p,p as m,r as h}from"./ec22.js";import{O as g}from"./index.js";import{t as _}from"./page-heading.js";import{i as v,n as y,t as b}from"./field.js";import{n as x,r as S,t as C}from"./zod.js";import{t as w}from"./ec23.js";var T=e();function E(){let e=r(),{data:E}=t(h),{data:D}=t(p),{data:O}=t(f),{data:k}=t(m),A=d(),j=E.Images??[],M=D.KeyPairs??[],N=k.Subnets??[],P={};for(let e of O.InstanceTypes??[]){let t=e.InstanceType;t&&(P[t]=(P[t]||0)+1)}let F=Object.keys(P).toSorted(),I=j[0]?.ImageId,L=M[0]?.KeyName,R=F.find(e=>e.endsWith(`.nano`))??F[0],{control:z,handleSubmit:B,register:V,watch:H,formState:{errors:U,isSubmitting:W}}=S({resolver:C(w.refine(e=>e.count<=(P[e.instanceType]??1),{message:`Cannot exceed available capacity`,path:[`count`]})),defaultValues:{count:1,imageId:I??``,keyName:L??``,instanceType:R??``}}),G=H(`instanceType`),K=G?P[G]??1:1;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(a,{to:`/ec2/describe-instances`,children:`Back to instances`}),(0,T.jsx)(_,{title:`Run EC2 Instances`}),F.length===0&&(0,T.jsx)(n,{msg:`No compute available. No new instances can be created until compute is available.`}),A.error&&(0,T.jsx)(n,{error:A.error,msg:`Failed to create instance`}),(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B(async t=>{await A.mutateAsync(t),e({to:`/ec2/describe-instances`})}),children:[(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`imageId`,children:`Image`})}),(0,T.jsx)(x,{control:z,name:`imageId`,render:({field:e})=>{let t=j.find(t=>t.ImageId===e.value);return(0,T.jsxs)(u,{onValueChange:t=>e.onChange(t),value:e.value??``,children:[(0,T.jsx)(s,{"aria-invalid":!!U.imageId,className:`w-full`,id:`imageId`,children:(0,T.jsx)(o,{children:t?`${t.Name||`Unnamed`} (${t.Architecture})`:``})}),(0,T.jsx)(c,{children:j.map(e=>(0,T.jsxs)(l,{value:e.ImageId??``,children:[e.Name||`Unnamed`,` (`,e.Architecture,`)`]},e.ImageId))})]})}}),(0,T.jsx)(y,{errors:[U.imageId]})]}),(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`instanceType`,children:`Instance Type`})}),(0,T.jsx)(x,{control:z,name:`instanceType`,render:({field:e})=>(0,T.jsxs)(u,{onValueChange:t=>e.onChange(t),value:e.value||``,children:[(0,T.jsx)(s,{"aria-invalid":!!U.instanceType,className:`w-full`,id:`instanceType`,children:(0,T.jsx)(o,{})}),(0,T.jsx)(c,{children:F.map(e=>(0,T.jsxs)(l,{value:e,children:[e,` (`,P[e],` available)`]},e))})]})}),(0,T.jsx)(y,{errors:[U.instanceType]})]}),(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair`})}),(0,T.jsx)(x,{control:z,name:`keyName`,render:({field:e})=>(0,T.jsxs)(u,{onValueChange:t=>e.onChange(t),value:e.value||``,children:[(0,T.jsx)(s,{"aria-invalid":!!U.keyName,className:`w-full`,id:`keyName`,children:(0,T.jsx)(o,{})}),(0,T.jsx)(c,{children:M.map(e=>(0,T.jsx)(l,{value:e.KeyName??``,children:e.KeyName},e.KeyPairId))})]})}),(0,T.jsx)(y,{errors:[U.keyName]})]}),(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`subnetId`,children:`Subnet`})}),(0,T.jsx)(x,{control:z,name:`subnetId`,render:({field:e})=>(0,T.jsxs)(u,{onValueChange:t=>e.onChange(t===`none`?void 0:t),value:e.value??`none`,children:[(0,T.jsx)(s,{className:`w-full`,id:`subnetId`,children:(0,T.jsx)(o,{})}),(0,T.jsxs)(c,{children:[(0,T.jsx)(l,{value:`none`,children:`none`}),N.map(e=>(0,T.jsx)(l,{value:e.SubnetId??``,children:e.SubnetId},e.SubnetId))]})]})})]}),(0,T.jsxs)(b,{children:[(0,T.jsx)(v,{children:(0,T.jsx)(`label`,{htmlFor:`count`,children:`Number of Instances`})}),(0,T.jsx)(g,{"aria-describedby":`count-description`,"aria-invalid":!!U.count,id:`count`,type:`number`,...V(`count`,{valueAsNumber:!0})}),(0,T.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`count-description`,children:G&&`Available capacity for ${G}: ${K}`}),(0,T.jsx)(y,{errors:[U.count]})]}),(0,T.jsxs)(`div`,{className:`flex gap-2`,children:[(0,T.jsx)(i,{disabled:W||A.isPending,onClick:()=>e({to:`/ec2/describe-instances`}),type:`button`,variant:`outline`,children:`Cancel`}),(0,T.jsx)(i,{disabled:W||A.isPending||F.length===0,type:`submit`,children:W||A.isPending?`Creating…`:`Create Instance`})]})]})]})}export{E as component};
|
||||
+3
-3
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{t as e}from"./queryOptions.js";import{Dt as t,_ as n,d as r,f as i,g as a,i as o,jt as s}from"./awsClient.js";var c=class extends s.classBuilder().ep(a).m(function(e,r,i,a){return[t(i,e.getEndpointParameterInstructions()),n(i)]}).s(`AmazonS3`,`ListBuckets`,{}).n(`S3Client`,`ListBucketsCommand`).sc(r).build(){},l=class extends s.classBuilder().ep({...a,Bucket:{type:`contextParams`,name:`Bucket`},Prefix:{type:`contextParams`,name:`Prefix`}}).m(function(e,r,i,a){return[t(i,e.getEndpointParameterInstructions()),n(i)]}).s(`AmazonS3`,`ListObjectsV2`,{}).n(`S3Client`,`ListObjectsV2Command`).sc(i).build(){},u=e({queryKey:[`s3`,`buckets`],queryFn:()=>{let e=new c({});return o().send(e)}}),d=(t,n)=>e({queryKey:[`s3`,`buckets`,t,`objects`,n??``],queryFn:()=>{let e=new l({Bucket:t,Prefix:n,Delimiter:`/`});return o().send(e)}});export{u as n,d as t};
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{u as i}from"./utils.js";import{F as a,P as o,R as s,_ as c,i as l,o as u,z as d}from"./button.js";import{V as f}from"./createBaseUIEventDetails.js";var p=function(e){return e.disabled=`data-disabled`,e.valid=`data-valid`,e.invalid=`data-invalid`,e.touched=`data-touched`,e.dirty=`data-dirty`,e.filled=`data-filled`,e.focused=`data-focused`,e}({}),m={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},h={valid(e){return e===null?null:e?{[p.valid]:``}:{[p.invalid]:``}}},g=e(n()),_=g.createContext({invalid:void 0,name:void 0,validityData:{state:m,errors:[],error:``,value:``,initialValue:null},setValidityData:a,disabled:void 0,touched:!1,setTouched:a,dirty:!1,setDirty:a,filled:!1,setFilled:a,focused:!1,setFocused:a,validate:()=>null,validationMode:`onSubmit`,validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=o)=>e,getInputValidationProps:(e=o)=>e,inputRef:{current:null},commit:async()=>{}}});function v(e=!0){let t=g.useContext(_);if(t.setValidityData===a&&!e)throw Error(d(28));return t}var y=g.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:a,validationMode:`onSubmit`,submitAttemptedRef:{current:!1}});function b(){return g.useContext(y)}var x=g.createContext({controlId:void 0,registerControlId:a,labelId:void 0,setLabelId:a,messageIds:[],setMessageIds:a,getDescriptionProps:e=>e});function S(){return g.useContext(x)}function C(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}function w({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=g.useRef(e!==void 0),[a,o]=g.useState(t);return[i?e:a,g.useCallback(e=>{i||o(e)},[])]}function T(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=S(),d=f(t),p=n?i:void 0,m=s(()=>Symbol(`labelable-control`)),h=g.useRef(!1),_=g.useRef(t!=null),v=u(()=>{!h.current||o===a||(h.current=!1,o(m.current,void 0))});return l(()=>{if(o===a)return;let e;if(n){let n=r?.current;e=c(n)&&n.closest(`label`)!=null?t??null:p??d}else if(t!=null)_.current=!0,e=t;else if(_.current)e=d;else{v();return}if(e===void 0){v();return}h.current=!0,o(m.current,e)},[t,r,p,o,n,d,m,v]),g.useEffect(()=>v,[v]),i??d}var E=e(i());function D(e){let{enabled:t=!0,value:n,id:r,name:i,controlRef:a,commit:o}=e,{formRef:s}=b(),{invalid:c,markedDirtyRef:d,validityData:f,setValidityData:p}=v(),m=u(e.getValue);l(()=>{if(!t)return;let e=n;e===void 0&&(e=m()),f.initialValue===null&&e!==null&&p(t=>({...t,initialValue:e}))},[t,p,n,f.initialValue,m]),l(()=>{!t||!r||s.current.fields.set(r,{getValue:m,name:i,controlRef:a,validityData:C(f,c),validate(e=!0){let t=n;t===void 0&&(t=m()),d.current=!0,e?E.flushSync(()=>o(t)):o(t)}})},[o,a,t,s,m,r,c,d,i,f,n]),l(()=>{let e=s.current.fields;return()=>{r&&e.delete(r)}},[s,r])}r(),t();export{b as a,S as i,T as n,v as o,w as r,h as s,D as t};
|
||||
@@ -1 +1 @@
|
||||
import{c as d,a,j as g}from"./index.js";const l=["running","available","completed","Active"],o=["stopped","error"],c=["pending","shutting-down","stopping"];function s(t){return t&&l.includes(t)?"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-100":t&&o.includes(t)?"bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-100":t&&c.includes(t)?"bg-yellow-100 text-yellow-800 dark:bg-yellow-900 dark:text-yellow-100":t==="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 u(t){const e=d.c(5),{state:r}=t;let n;e[0]!==r?(n=a("rounded-full px-2 py-1 text-xs",s(r)),e[0]=r,e[1]=n):n=e[1];let i;return e[2]!==r||e[3]!==n?(i=g.jsx("div",{className:n,children:r}),e[2]=r,e[3]=n,e[4]=i):i=e[4],i}export{u as S};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{n}from"./utils.js";var r=t(),i=e(),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(e){let t=(0,r.c)(5),{state:a}=e,o;t[0]===a?o=t[1]:(o=n(`rounded-full px-2 py-1 text-xs`,c(a)),t[0]=a,t[1]=o);let s;return t[2]!==a||t[3]!==o?(s=(0,i.jsx)(`div`,{className:o,children:a}),t[2]=a,t[3]=o,t[4]=s):s=t[4],s}export{l as t};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{c as n,a as o,j as d}from"./index.js";function c(s){const e=n.c(8);let i,r;e[0]!==s?({className:i,...r}=s,e[0]=s,e[1]=i,e[2]=r):(i=e[1],r=e[2]);let t;e[3]!==i?(t=o("field-sizing-content flex min-h-16 w-full resize-none rounded-md border border-input bg-input/20 px-2 py-2 text-sm outline-none transition-colors 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",i),e[3]=i,e[4]=t):t=e[4];let a;return e[5]!==r||e[6]!==t?(a=d.jsx("textarea",{className:t,"data-slot":"textarea",...r}),e[5]=r,e[6]=t,e[7]=a):a=e[7],a}export{c as T};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{n}from"./utils.js";var r=t(),i=e();function a(e){let t=(0,r.c)(8),a,o;t[0]===e?(a=t[1],o=t[2]):({className:a,...o}=e,t[0]=e,t[1]=a,t[2]=o);let s;t[3]===a?s=t[4]:(s=n(`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),t[3]=a,t[4]=s);let c;return t[5]!==o||t[6]!==s?(c=(0,i.jsx)(`textarea`,{className:s,"data-slot":`textarea`,...o}),t[5]=o,t[6]=s,t[7]=c):c=t[7],c}export{a as t};
|
||||
@@ -0,0 +1 @@
|
||||
var e=e=>new TextEncoder().encode(e),t=e=>{if(typeof e==`string`)return e;if(typeof e!=`object`||typeof e.byteOffset!=`number`||typeof e.byteLength!=`number`)throw Error(`@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.`);return new TextDecoder(`utf-8`).decode(e)};export{e as n,t};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{K 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{t as e}from"./createLucideIcon.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{K as u,M as g,N as j,P as b,Q as y,S as k,T as C,c as w,j as t,L as N,r as h,i as v,U as M,V as S,B as D}from"./index.js";import{D as R}from"./delete-confirmation-dialog.js";import{E}from"./error-banner.js";import{g as L,b as O,c as z}from"./s3.js";import{D as B}from"./download.js";import{T as P}from"./trash-2.js";const $=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],A=u("file",$);const F=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],U=u("folder",F);const T=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],_=u("upload",T),I=c=>(e,a)=>async n=>{const r=await e(n),{response:s}=r;if(g.isInstance(s)&&s.headers.expires){s.headers.expiresstring=s.headers.expires;try{j(s.headers.expires)}catch(o){a.logger?.warn(`AWS SDK Warning for ${a.clientName}::${a.commandName} response parsing (${s.headers.expires}): ${o}`),delete s.headers.expires}}return r},H={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},K=c=>({applyToStack:e=>{e.addRelativeTo(I(),H)}});class V extends b.classBuilder().ep({...y,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(e,a,n,r){return[k(n,e.getEndpointParameterInstructions()),L(n,{requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC64NVME","CRC32","CRC32C","SHA256","SHA1"]}),O(n),K()]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").sc(C).build(){}function X(c){const e=w.c(9),{folderName:a,fullPrefix:n,bucketName:r}=c;let s;e[0]!==r||e[1]!==n?(s={bucket:r,_splat:n},e[0]=r,e[1]=n,e[2]=s):s=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(U,{className:"size-5 text-muted-foreground"}),e[3]=o):o=e[3];let i;e[4]!==a?(i=t.jsx("span",{className:"font-medium",children:a}),e[4]=a,e[5]=i):i=e[5];let l;return e[6]!==s||e[7]!==i?(l=t.jsxs(N,{className:"flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent",params:s,to:"/s3/ls/$bucket/$",children:[o,i]}),e[6]=s,e[7]=i,e[8]=l):l=e[8],l}function Y({object:c,bucketName:e,displayName:a,fullKey:n}){const[r,s]=h.useState(!1),o=z();async function i(){try{const m=new V({Bucket:e,Key:n}),p=await S().send(m);if(p.Body){const x=await p.Body.transformToByteArray(),f=URL.createObjectURL(new Blob([x])),d=document.createElement("a");d.href=f,d.download=a,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(f)}}catch{throw new Error("Failed to download object")}}async function l(){try{await o.mutateAsync({bucket:e,key:n})}finally{s(!1)}}return t.jsxs("div",{children:[o.error&&t.jsx(E,{error:o.error,msg:"Failed to delete object"}),t.jsxs("div",{className:"flex items-center justify-between rounded-lg border bg-card p-4",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(A,{className:"size-5 text-muted-foreground"}),t.jsxs("div",{children:[t.jsx("h3",{className:"font-medium",children:a}),c.LastModified&&t.jsxs("p",{className:"text-muted-foreground text-sm",children:["Last Modified: ",v(c.LastModified)]})]})]}),t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"text-muted-foreground text-sm",children:M(c.Size||0)}),t.jsx("button",{className:"rounded-md p-2 transition-colors hover:bg-accent",onClick:i,type:"button",children:t.jsx(B,{className:"size-4"})}),t.jsx("button",{className:"rounded-md p-2 text-destructive transition-colors hover:bg-accent",onClick:()=>s(!0),type:"button",children:t.jsx(P,{className:"size-4"})})]}),t.jsx(R,{description:t.jsxs(t.Fragment,{children:["Are you sure you want to delete ",t.jsx("strong",{children:a}),"? This action cannot be undone."]}),isPending:o.isPending,onConfirm:l,onOpenChange:s,open:r,title:"Delete Object"})]})]},c.Key)}function ee({bucket:c,prefix:e="",isPending:a,onUpload:n}){const r=h.useRef(null);async function s(o){const i=o.target.files;if(!(!i||i.length===0))try{await Promise.all(Array.from(i).map(l=>{const m=`${e}${l.name}`;return n({bucket:c,key:m,file:l})}))}finally{r.current&&(r.current.value="")}}return t.jsxs(t.Fragment,{children:[t.jsx("input",{accept:"*/*","aria-label":"Choose files to upload",className:"hidden",multiple:!0,onChange:s,ref:r,type:"file"}),t.jsxs(D,{disabled:a,onClick:()=>r.current?.click(),size:"sm",children:[t.jsx(_,{className:"mr-2 size-4"}),a?"Uploading…":"Upload Files"]})]})}export{X as F,Y as O,ee as U};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./error-banner.js";import{t as a}from"./link.js";import{a as o,o as s}from"./utils.js";import{t as c}from"./button.js";import{t as l}from"./createLucideIcon.js";import{t as u}from"./download.js";import{t as d}from"./trash-2.js";import{Dt as f,Ht as p,It as m,g as h,i as g,jt as _,u as v}from"./awsClient.js";import{a as y,i as b,n as x}from"./s3.js";import{t as S}from"./delete-confirmation-dialog.js";var C=l(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),w=l(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),T=l(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),E=e=>(e,t)=>async n=>{let r=await e(n),{response:i}=r;if(p.isInstance(i)&&i.headers.expires){i.headers.expiresstring=i.headers.expires;try{m(i.headers.expires)}catch(e){t.logger?.warn(`AWS SDK Warning for ${t.clientName}::${t.commandName} response parsing (${i.headers.expires}): ${e}`),delete i.headers.expires}}return r},D={tags:[`S3`],name:`s3ExpiresMiddleware`,override:!0,relation:`after`,toMiddleware:`deserializerMiddleware`},O=e=>({applyToStack:t=>{t.addRelativeTo(E(e),D)}}),k=class extends _.classBuilder().ep({...h,Bucket:{type:`contextParams`,name:`Bucket`},Key:{type:`contextParams`,name:`Key`}}).m(function(e,t,n,r){return[f(n,e.getEndpointParameterInstructions()),y(n,{requestChecksumRequired:!1,requestValidationModeMember:`ChecksumMode`,responseAlgorithms:[`CRC64NVME`,`CRC32`,`CRC32C`,`SHA256`,`SHA1`]}),b(n),O(n)]}).s(`AmazonS3`,`GetObject`,{}).n(`S3Client`,`GetObjectCommand`).sc(v).build(){},A=r(),j=t();function M(e){let t=(0,A.c)(9),{folderName:n,fullPrefix:r,bucketName:i}=e,o;t[0]!==i||t[1]!==r?(o={bucket:i,_splat:r},t[0]=i,t[1]=r,t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,j.jsx)(w,{className:`size-5 text-muted-foreground`}),t[3]=s):s=t[3];let c;t[4]===n?c=t[5]:(c=(0,j.jsx)(`span`,{className:`font-medium`,children:n}),t[4]=n,t[5]=c);let l;return t[6]!==o||t[7]!==c?(l=(0,j.jsxs)(a,{className:`flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,params:o,to:`/s3/ls/$bucket/$`,children:[s,c]}),t[6]=o,t[7]=c,t[8]=l):l=t[8],l}var N=e(n(),1);function P({object:e,bucketName:t,displayName:n,fullKey:r}){let[a,c]=(0,N.useState)(!1),l=x();async function f(){try{let e=new k({Bucket:t,Key:r}),i=await g().send(e);if(i.Body){let e=await i.Body.transformToByteArray(),t=URL.createObjectURL(new Blob([e])),r=document.createElement(`a`);r.href=t,r.download=n,document.body.append(r),r.click(),r.remove(),URL.revokeObjectURL(t)}}catch{throw Error(`Failed to download object`)}}async function p(){try{await l.mutateAsync({bucket:t,key:r})}finally{c(!1)}}return(0,j.jsxs)(`div`,{children:[l.error&&(0,j.jsx)(i,{error:l.error,msg:`Failed to delete object`}),(0,j.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border bg-card p-4`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(C,{className:`size-5 text-muted-foreground`}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h3`,{className:`font-medium`,children:n}),e.LastModified&&(0,j.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Last Modified: `,o(e.LastModified)]})]})]}),(0,j.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,j.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:s(e.Size||0)}),(0,j.jsx)(`button`,{className:`rounded-md p-2 transition-colors hover:bg-accent`,onClick:f,type:`button`,children:(0,j.jsx)(u,{className:`size-4`})}),(0,j.jsx)(`button`,{className:`rounded-md p-2 text-destructive transition-colors hover:bg-accent`,onClick:()=>c(!0),type:`button`,children:(0,j.jsx)(d,{className:`size-4`})})]}),(0,j.jsx)(S,{description:(0,j.jsxs)(j.Fragment,{children:[`Are you sure you want to delete `,(0,j.jsx)(`strong`,{children:n}),`? This action cannot be undone.`]}),isPending:l.isPending,onConfirm:p,onOpenChange:c,open:a,title:`Delete Object`})]})]},e.Key)}function F({bucket:e,prefix:t=``,isPending:n,onUpload:r}){let i=(0,N.useRef)(null);async function a(n){let a=n.target.files;if(!(!a||a.length===0))try{await Promise.all([...a].map(n=>r({bucket:e,key:`${t}${n.name}`,file:n})))}finally{i.current&&(i.current.value=``)}}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`input`,{accept:`*/*`,"aria-label":`Choose files to upload`,className:`hidden`,multiple:!0,onChange:a,ref:i,type:`file`}),(0,j.jsxs)(c,{disabled:n,onClick:()=>i.current?.click(),size:`sm`,children:[(0,j.jsx)(T,{className:`mr-2 size-4`}),n?`Uploading…`:`Upload Files`]})]})}export{P as n,M as r,F as t};
|
||||
@@ -1 +1 @@
|
||||
import{K as p,c as m,r as s}from"./index.js";const f=[["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"}]],y=p("triangle-alert",f),d=2e3;function T(){const e=m.c(5),[n,i]=s.useState(!1),t=s.useRef(null);let r,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>()=>{t.current&&clearTimeout(t.current)},o=[],e[0]=r,e[1]=o):(r=e[0],o=e[1]),s.useEffect(r,o);let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=async u=>{await navigator.clipboard.writeText(u),i(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>i(!1),d)},e[2]=c):c=e[2];const l=c;let a;return e[3]!==n?(a={copied:n,copy:l},e[3]=n,e[4]=a):a=e[4],a}export{y as T,T as u};
|
||||
import{a as e,r as t,t as n}from"./compiler-runtime.js";import{t as r}from"./createLucideIcon.js";var i=r(`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`}]]),a=n(),o=e(t(),1),s=2e3;function c(){let e=(0,a.c)(5),[t,n]=(0,o.useState)(!1),r=(0,o.useRef)(null),i,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=()=>()=>{r.current&&clearTimeout(r.current)},c=[],e[0]=i,e[1]=c):(i=e[0],c=e[1]),(0,o.useEffect)(i,c);let l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=async e=>{await navigator.clipboard.writeText(e),n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),s)},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{i as n,c as t};
|
||||
@@ -0,0 +1 @@
|
||||
import{a as e,r as t}from"./compiler-runtime.js";import{t as n}from"./useRouter.js";var r=e(t(),1);function i(e){let t=n();return r.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}export{i as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{a as e,r as t}from"./compiler-runtime.js";var n=!0;function r(e,t){if(!n){if(e)return;var r=`Warning: `+t;typeof console<`u`&&console.warn(r);try{throw Error(r)}catch{}}}var i=e(t(),1),a=i.createContext(null);function o(e){let t=i.useContext(a);return r(!((e?.warn??!0)&&!t),`useRouter must be used inside a <RouterProvider> component!`),t}export{a as n,r,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
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user