mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-20 03:11:46 +00:00
feat(ec2): Launch Templates UI + launch-from-template (#501)
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Ht as r,It as i,Lt as a,Pt as o}from"./auth.js";import{n as s,r as c,t as l}from"./upload-button.js";import{r as u}from"./s3.js";import{Cn as d,D as f,Dr as p,En as m,ha as h}from"./index.js";var g=t(),_=e();function v(){let e=(0,g.c)(24),{bucket:t,_splat:v}=f.useParams(),y=i(v??``),{data:b}=h(p(t,y)),x=u(),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)=>{let r=`${E.slice(0,n+1).join(`/`)}/`;return{name:e,path:`/s3/ls/${t}/${r}`}})],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)(m,{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)(l,{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)(d,{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=>{if(!e.Prefix)return null;let n=r(a(e.Prefix,y)),i=o(e.Prefix,y);return(0,_.jsx)(c,{bucketName:t,folderName:n,fullPrefix:i},e.Prefix)})})]}),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=>{if(!e.Key)return null;let n=a(e.Key,y),r=o(e.Key,y);return(0,_.jsx)(s,{bucketName:t,displayName:n,fullKey:r,object:e},e.Key)})]}),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)(n,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Ht as r,It as i,Lt as a,Pt as o}from"./auth.js";import{n as s,r as c,t as l}from"./upload-button.js";import{r as u}from"./s3.js";import{Da as d,In as f,Lr as p,Nn as m,O as h}from"./index.js";var g=t(),_=e();function v(){let e=(0,g.c)(24),{bucket:t,_splat:v}=h.useParams(),y=i(v??``),{data:b}=d(p(t,y)),x=u(),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)=>{let r=`${E.slice(0,n+1).join(`/`)}/`;return{name:e,path:`/s3/ls/${t}/${r}`}})],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)(f,{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)(l,{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)(m,{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=>{if(!e.Prefix)return null;let n=r(a(e.Prefix,y)),i=o(e.Prefix,y);return(0,_.jsx)(c,{bucketName:t,folderName:n,fullPrefix:i},e.Prefix)})})]}),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=>{if(!e.Key)return null;let n=a(e.Key,y),r=o(e.Key,y);return(0,_.jsx)(s,{bucketName:t,displayName:n,fullKey:r,object:e},e.Key)})]}),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)(n,{className:`hover:text-foreground`,to:e.path,children:e.name})]},e.path))}),A]})}),j,M,N,P]})}export{v as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Ht as n}from"./auth.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{Cn as s,Dr as c,En as l,H as u,fn as d,ha as f}from"./index.js";var p=t(),m=e();function h(){let e=(0,p.c)(31),{bucket:t}=u.useParams(),h;e[0]===t?h=e[1]:(h=c(t),e[0]=t,e[1]=h);let{data:g}=f(h),_=o(),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)(l,{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)(a,{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)(d,{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)(s,{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=>{if(!e.Prefix)return null;let r=n(e.Prefix);return(0,m.jsx)(i,{bucketName:t,folderName:r,fullPrefix:e.Prefix},e.Prefix)})})]}),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)(r,{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};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Ht as n}from"./auth.js";import{n as r,r as i,t as a}from"./upload-button.js";import{r as o}from"./s3.js";import{Da as s,In as c,Lr as l,Nn as u,Sn as d,U as f}from"./index.js";var p=t(),m=e();function h(){let e=(0,p.c)(31),{bucket:t}=f.useParams(),h;e[0]===t?h=e[1]:(h=l(t),e[0]=t,e[1]=h);let{data:g}=s(h),_=o(),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)(c,{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)(a,{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)(d,{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)(u,{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=>{if(!e.Prefix)return null;let r=n(e.Prefix);return(0,m.jsx)(i,{bucketName:t,folderName:r,fullPrefix:e.Prefix},e.Prefix)})})]}),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)(r,{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};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{Vt as r}from"./auth.js";import{t as i}from"./trash-2.js";import{t as a}from"./button.js";import{Cn as o,En as s,Lr as c,Vt as l,Xt as u,_n as d,fn as f,gn as p,ha as m,hn as h,kr as g,ot as _,pa as v,r as y,vn as b,yn as x}from"./index.js";import{t as S}from"./delete-confirmation-dialog.js";import{n as C,t as w}from"./detail-row.js";var T=t(n()),E=e();function D(){let{id:e}=y.useParams(),t=v(),{data:n}=m(g(e)),{data:D}=m(c),O=_(),k=l(),A=u(),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(``),F=n.Addresses?.[0],I=D.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.State?.Name===`running`||e.State?.Name===`stopped`)??[],L=async()=>{try{await A.mutateAsync(e),t({to:`/ec2/describe-addresses`})}finally{M(!1)}},R=async()=>{N&&await O.mutateAsync({allocationId:e,instanceId:N})},z=async()=>{F?.AssociationId&&await k.mutateAsync(F.AssociationId)};if(!F?.AllocationId)return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(s,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`Elastic IP not found.`})]});let B=!!F.AssociationId,V=r(F.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(s,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(o,{error:A.error??O.error??k.error??void 0,msg:`Elastic IP action failed`}),(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsx)(f,{actions:(0,E.jsxs)(a,{disabled:B||A.isPending,onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,E.jsx)(i,{className:`size-4`}),`Release`]}),subtitle:`Elastic IP Details`,title:V?`${F.AllocationId} (${V})`:F.AllocationId}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Elastic IP Information`}),(0,E.jsxs)(C.Content,{children:[(0,E.jsx)(w,{label:`Allocation ID`,value:F.AllocationId}),(0,E.jsx)(w,{label:`Public IP`,value:F.PublicIp}),(0,E.jsx)(w,{label:`Domain`,value:F.Domain}),(0,E.jsx)(w,{label:`Association ID`,value:F.AssociationId??`—`}),(0,E.jsx)(w,{label:`Instance ID`,value:F.InstanceId??`—`}),(0,E.jsx)(w,{label:`Private IP`,value:F.PrivateIpAddress??`—`})]})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Association`}),(0,E.jsx)(C.Content,{children:B?(0,E.jsx)(a,{disabled:k.isPending,onClick:z,size:`sm`,variant:`outline`,children:`Disassociate`}):(0,E.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,E.jsx)(`div`,{className:`flex-1`,children:(0,E.jsxs)(h,{onValueChange:e=>P(e??``),value:N,children:[(0,E.jsx)(b,{className:`w-full`,children:(0,E.jsx)(x,{placeholder:`Select an instance`})}),(0,E.jsx)(p,{children:I.map(e=>{let t=r(e.Tags);return(0,E.jsx)(d,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(a,{disabled:!N||O.isPending,onClick:R,size:`sm`,children:`Associate`})]})})]})]}),(0,E.jsx)(S,{description:`Are you sure you want to release the Elastic IP "${F.AllocationId}" (${F.PublicIp})? This action cannot be undone.`,isPending:A.isPending,onConfirm:L,onOpenChange:M,open:j,title:`Release Elastic IP`})]})}export{D as component};
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{Vt as r}from"./auth.js";import{t as i}from"./trash-2.js";import{t as a}from"./button.js";import{Da as o,Dn as s,En as c,In as l,Nn as u,On as d,Sn as f,Ta as p,Tn as m,Xt as h,dt as g,kn as _,on as v,qr as y,r as b,zr as x}from"./index.js";import{t as S}from"./delete-confirmation-dialog.js";import{n as C,t as w}from"./detail-row.js";var T=t(n()),E=e();function D(){let{id:e}=b.useParams(),t=p(),{data:n}=o(x(e)),{data:D}=o(y),O=g(),k=h(),A=v(),[j,M]=(0,T.useState)(!1),[N,P]=(0,T.useState)(``),F=n.Addresses?.[0],I=D.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.State?.Name===`running`||e.State?.Name===`stopped`)??[],L=async()=>{try{await A.mutateAsync(e),t({to:`/ec2/describe-addresses`})}finally{M(!1)}},R=async()=>{N&&await O.mutateAsync({allocationId:e,instanceId:N})},z=async()=>{F?.AssociationId&&await k.mutateAsync(F.AssociationId)};if(!F?.AllocationId)return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(l,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(0,E.jsx)(`p`,{className:`text-muted-foreground`,children:`Elastic IP not found.`})]});let B=!!F.AssociationId,V=r(F.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(l,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(u,{error:A.error??O.error??k.error??void 0,msg:`Elastic IP action failed`}),(0,E.jsxs)(`div`,{className:`space-y-6`,children:[(0,E.jsx)(f,{actions:(0,E.jsxs)(a,{disabled:B||A.isPending,onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,E.jsx)(i,{className:`size-4`}),`Release`]}),subtitle:`Elastic IP Details`,title:V?`${F.AllocationId} (${V})`:F.AllocationId}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Elastic IP Information`}),(0,E.jsxs)(C.Content,{children:[(0,E.jsx)(w,{label:`Allocation ID`,value:F.AllocationId}),(0,E.jsx)(w,{label:`Public IP`,value:F.PublicIp}),(0,E.jsx)(w,{label:`Domain`,value:F.Domain}),(0,E.jsx)(w,{label:`Association ID`,value:F.AssociationId??`—`}),(0,E.jsx)(w,{label:`Instance ID`,value:F.InstanceId??`—`}),(0,E.jsx)(w,{label:`Private IP`,value:F.PrivateIpAddress??`—`})]})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(C.Header,{children:`Association`}),(0,E.jsx)(C.Content,{children:B?(0,E.jsx)(a,{disabled:k.isPending,onClick:z,size:`sm`,variant:`outline`,children:`Disassociate`}):(0,E.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,E.jsx)(`div`,{className:`flex-1`,children:(0,E.jsxs)(m,{onValueChange:e=>P(e??``),value:N,children:[(0,E.jsx)(d,{className:`w-full`,children:(0,E.jsx)(_,{placeholder:`Select an instance`})}),(0,E.jsx)(c,{children:I.map(e=>{let t=r(e.Tags);return(0,E.jsx)(s,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(a,{disabled:!N||O.isPending,onClick:R,size:`sm`,children:`Associate`})]})})]})]}),(0,E.jsx)(S,{description:`Are you sure you want to release the Elastic IP "${F.AllocationId}" (${F.PublicIp})? This action cannot be undone.`,isPending:A.isPending,onConfirm:L,onOpenChange:M,open:j,title:`Release Elastic IP`})]})}export{D as component};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./link.js";import{Vt as i}from"./auth.js";import{t as a}from"./trash-2.js";import{t as o}from"./button.js";import{Cn as s,En as c,Lt as l,ei as u,fn as d,ha as f,pa as p,ri as m,v as h}from"./index.js";import{t as g}from"./delete-confirmation-dialog.js";import{n as _,t as v}from"./detail-row.js";import{t as y}from"./state-badge.js";var b=t(n()),x=e();function S(){let{id:e}=h.useParams(),t=p(),{data:n}=f(m(e)),{data:S}=f(u),C=n.Vpcs?.[0],w=l(),[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)(c,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=i(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(c,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(s,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(d,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(o,{onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(a,{className:`size-4`}),`Delete`]}),(0,x.jsx)(y,{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)(r,{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)(g,{description:`Are you sure you want to delete the VPC "${C.VpcId}"? This action cannot be undone. The VPC must have no associated subnets or internet gateways.`,isPending:w.isPending,onConfirm:O,onOpenChange:E,open:T,title:`Delete VPC`})]})}export{S as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Bn as n,Da as r,In as i,Ln as a,Nn as o,Sn as s,Ta as c,ea as l,gn as u,mn as d,pi as f,rn as p,st as m,v as h,vn as g}from"./index.js";import{t as _}from"./form-actions.js";var v=t(),y=e();function b(){let e=(0,v.c)(53),{id:t}=h.useParams(),b=c(),x;e[0]===t?x=e[1]:(x=f(t),e[0]=t,e[1]=x);let{data:S}=r(x),C=S.Volumes?.[0],w=C?.VolumeId,T=p(),E=C?.Size??1,D;e[2]===E?D=e[3]:(D=a(m.refine(e=>e.size>E,{message:`New size must be greater than current size (${E} GiB)`,path:[`size`]})),e[2]=E,e[3]=D);let O;e[4]===E?O=e[5]:(O={size:E},e[4]=E,e[5]=O);let k;e[6]!==D||e[7]!==O?(k={resolver:D,defaultValues:O},e[6]=D,e[7]=O,e[8]=k):k=e[8];let{handleSubmit:A,register:j,formState:M}=n(k),{errors:N,isSubmitting:P}=M;if(!w){let t;return e[9]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(i,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),(0,y.jsx)(`p`,{className:`text-muted-foreground`,children:`Volume not found.`})]}),e[9]=t):t=e[9],t}let F;e[10]!==T||e[11]!==b||e[12]!==w?(F=async e=>{await T.mutateAsync({...e,volumeId:w}),b({to:`/ec2/describe-volumes/$id`,params:{id:w}})},e[10]=T,e[11]=b,e[12]=w,e[13]=F):F=e[13];let I=F,L,R;e[14]===w?(L=e[15],R=e[16]):(L=(0,y.jsx)(i,{params:{id:w},to:`/ec2/describe-volumes/$id`,children:`Back to volume`}),R=(0,y.jsx)(s,{subtitle:w,title:`Resize Volume`}),e[14]=w,e[15]=L,e[16]=R);let z;e[17]===T.error?z=e[18]:(z=T.error&&(0,y.jsx)(o,{error:T.error,msg:`Failed to resize volume`}),e[17]=T.error,e[18]=z);let B;e[19]!==A||e[20]!==I?(B=A(I),e[19]=A,e[20]=I,e[21]=B):B=e[21];let V;e[22]===E?V=e[23]:(V=(0,y.jsx)(`div`,{className:`space-y-2`,children:(0,y.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Current size: `,E,` GiB`]})}),e[22]=E,e[23]=V);let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,y.jsx)(g,{children:(0,y.jsx)(`label`,{htmlFor:`size`,children:`New size (GiB)`})}),e[24]=H):H=e[24];let U=!!N.size,W=E+1,G;e[25]===j?G=e[26]:(G=j(`size`,{valueAsNumber:!0}),e[25]=j,e[26]=G);let K;e[27]!==U||e[28]!==W||e[29]!==G?(K=(0,y.jsx)(l,{"aria-invalid":U,id:`size`,min:W,type:`number`,...G}),e[27]=U,e[28]=W,e[29]=G,e[30]=K):K=e[30];let q;e[31]===N.size?q=e[32]:(q=(0,y.jsx)(u,{errors:[N.size]}),e[31]=N.size,e[32]=q);let J;e[33]!==K||e[34]!==q?(J=(0,y.jsxs)(d,{children:[H,K,q]}),e[33]=K,e[34]=q,e[35]=J):J=e[35];let Y;e[36]!==b||e[37]!==w?(Y=async()=>await b({to:`/ec2/describe-volumes/$id`,params:{id:w}}),e[36]=b,e[37]=w,e[38]=Y):Y=e[38];let X;e[39]!==P||e[40]!==T.isPending||e[41]!==Y?(X=(0,y.jsx)(_,{isPending:T.isPending,isSubmitting:P,onCancel:Y,pendingLabel:`Resizing\\u2026`,submitLabel:`Resize Volume`}),e[39]=P,e[40]=T.isPending,e[41]=Y,e[42]=X):X=e[42];let Z;e[43]!==V||e[44]!==J||e[45]!==X||e[46]!==B?(Z=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:B,children:[V,J,X]}),e[43]=V,e[44]=J,e[45]=X,e[46]=B,e[47]=Z):Z=e[47];let Q;return e[48]!==Z||e[49]!==L||e[50]!==R||e[51]!==z?(Q=(0,y.jsxs)(y.Fragment,{children:[L,R,z,Z]}),e[48]=Z,e[49]=L,e[50]=R,e[51]=z,e[52]=Q):Q=e[52],Q}export{b as component};
|
||||
+1
-17
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{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{r as a}from"./auth.js";import{t as o}from"./circle-arrow-up.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{Cn as l,En as u,Nr as d,Rt as f,_i as p,fn as m,ha as h,hi as g,i as _,ma as v,pa as y}from"./index.js";import{a as b,i as x,l as S,n as C,o as w,r as T,s as E,t as D}from"./alert-dialog.js";import{t as O}from"./delete-confirmation-dialog.js";import{t as k}from"./state-badge.js";import{r as A}from"./system-managed.js";import{t as j}from"./ami-details.js";var M=t(n()),N=r();function P(){let e=(0,N.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n={mutationFn:F,onSuccess:()=>{t.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=t,e[1]=n),v(n)}async function F(e){let t=a();if(!t)throw Error(`Not authenticated`);return await p({action:`PromoteImage`,credentials:t,params:{ImageId:e}})}var I=e(),L=`000000000000`;function R(){let{id:e}=_.useParams(),t=y(),{data:n}=h(d(e)),r=n?.Images?.[0],{isAdmin:i}=g(),a=f(),p=P(),[v,N]=(0,M.useState)(!1),[F,R]=(0,M.useState)(!1);if(!r?.ImageId||A(r))return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u,{to:`/ec2/describe-images`,children:`Back to images`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]});let z=r.OwnerId===L;async function B(){try{await a.mutateAsync(e),t({to:`/ec2/describe-images`})}finally{N(!1)}}async function V(){try{await p.mutateAsync(e),R(!1)}catch{}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(u,{to:`/ec2/describe-images`,children:`Back to images`}),a.error&&(0,I.jsx)(l,{error:a.error,msg:`Failed to deregister image`}),p.error&&(0,I.jsx)(l,{error:p.error,msg:`Failed to promote image`}),(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(m,{actions:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&!z&&(0,I.jsxs)(c,{onClick:()=>R(!0),size:`sm`,variant:`outline`,children:[(0,I.jsx)(o,{className:`size-4`}),`Promote to System`]}),(0,I.jsxs)(c,{onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,I.jsx)(s,{className:`size-4`}),`Deregister`]}),(0,I.jsx)(k,{state:r.State})]}),subtitle:`Image Details`,title:r.ImageId}),(0,I.jsx)(j,{image:r,showExtendedDetails:!0})]}),(0,I.jsx)(O,{description:`Are you sure you want to deregister "${r.ImageId}"? The backing snapshot will not be deleted.`,isPending:a.isPending,onConfirm:B,onOpenChange:N,open:v,title:`Deregister Image`}),(0,I.jsx)(D,{onOpenChange:R,open:F,children:(0,I.jsxs)(x,{children:[(0,I.jsxs)(E,{children:[(0,I.jsx)(S,{children:`Promote to System Image`}),(0,I.jsxs)(b,{children:[`This will make “`,r.ImageId,`” visible to all accounts as a system image. This cannot be undone via the UI.`]})]}),(0,I.jsxs)(w,{children:[(0,I.jsx)(T,{children:`Cancel`}),(0,I.jsx)(C,{disabled:p.isPending,onClick:V,children:p.isPending?`Promoting…`:`Promote`})]})]})})]})}export{R as component};
|
||||
import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{r as a}from"./auth.js";import{t as o}from"./circle-arrow-up.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{Da as l,Di as u,Ea as d,In as f,Nn as p,Sn as m,Ta as h,Ur as g,i as _,ki as v,qt as y}from"./index.js";import{a as b,i as x,l as S,n as C,o as w,r as T,s as E,t as D}from"./alert-dialog.js";import{t as O}from"./delete-confirmation-dialog.js";import{t as k}from"./state-badge.js";import{r as A}from"./system-managed.js";import{t as j}from"./ami-details.js";var M=t(n()),N=r();function P(){let e=(0,N.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n={mutationFn:F,onSuccess:()=>{t.invalidateQueries({queryKey:[`ec2`,`images`]})}},e[0]=t,e[1]=n),d(n)}async function F(e){let t=a();if(!t)throw Error(`Not authenticated`);return await v({action:`PromoteImage`,credentials:t,params:{ImageId:e}})}var I=e(),L=`000000000000`;function R(){let{id:e}=_.useParams(),t=h(),{data:n}=l(g(e)),r=n?.Images?.[0],{isAdmin:i}=u(),a=y(),d=P(),[v,N]=(0,M.useState)(!1),[F,R]=(0,M.useState)(!1);if(!r?.ImageId||A(r))return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f,{to:`/ec2/describe-images`,children:`Back to images`}),(0,I.jsx)(`p`,{className:`text-muted-foreground`,children:`Image not found.`})]});let z=r.OwnerId===L;async function B(){try{await a.mutateAsync(e),t({to:`/ec2/describe-images`})}finally{N(!1)}}async function V(){try{await d.mutateAsync(e),R(!1)}catch{}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(f,{to:`/ec2/describe-images`,children:`Back to images`}),a.error&&(0,I.jsx)(p,{error:a.error,msg:`Failed to deregister image`}),d.error&&(0,I.jsx)(p,{error:d.error,msg:`Failed to promote image`}),(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(m,{actions:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&!z&&(0,I.jsxs)(c,{onClick:()=>R(!0),size:`sm`,variant:`outline`,children:[(0,I.jsx)(o,{className:`size-4`}),`Promote to System`]}),(0,I.jsxs)(c,{onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,I.jsx)(s,{className:`size-4`}),`Deregister`]}),(0,I.jsx)(k,{state:r.State})]}),subtitle:`Image Details`,title:r.ImageId}),(0,I.jsx)(j,{image:r,showExtendedDetails:!0})]}),(0,I.jsx)(O,{description:`Are you sure you want to deregister "${r.ImageId}"? The backing snapshot will not be deleted.`,isPending:a.isPending,onConfirm:B,onOpenChange:N,open:v,title:`Deregister Image`}),(0,I.jsx)(D,{onOpenChange:R,open:F,children:(0,I.jsxs)(x,{children:[(0,I.jsxs)(E,{children:[(0,I.jsx)(S,{children:`Promote to System Image`}),(0,I.jsxs)(b,{children:[`This will make “`,r.ImageId,`” visible to all accounts as a system image. This cannot be undone via the UI.`]})]}),(0,I.jsxs)(w,{children:[(0,I.jsx)(T,{children:`Cancel`}),(0,I.jsx)(C,{disabled:d.isPending,onClick:V,children:d.isPending?`Promoting…`:`Promote`})]})]})})]})}export{R as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./link.js";import{Vt as i}from"./auth.js";import{t as a}from"./trash-2.js";import{t as o}from"./button.js";import{Cn as s,Dt as c,En as l,Rr as u,_n as d,fn as f,gn as p,ha as m,hn as h,ii as g,lt as _,o as v,pa as y,vn as b,yn as x,zt as S}from"./index.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";var E=t(n()),D=e();function O(){let{id:e}=v.useParams(),t=y(),{data:n}=m(u(e)),{data:O}=m(g),k=_(),A=S(),j=c(),[M,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(``),I=n.InternetGateways?.[0],L=O.Vpcs??[],R=async()=>{try{await j.mutateAsync(e),t({to:`/ec2/describe-internet-gateways`})}finally{N(!1)}},z=async()=>{P&&await k.mutateAsync({internetGatewayId:e,vpcId:P})},B=async t=>{await A.mutateAsync({internetGatewayId:e,vpcId:t})};if(!I?.InternetGatewayId)return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(l,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`Internet Gateway not found.`})]});let V=I.Attachments?.[0],H=!!V?.VpcId,U=i(I.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(l,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(s,{error:j.error??k.error??A.error??void 0,msg:`Internet Gateway action failed`}),(0,D.jsxs)(`div`,{className:`space-y-6`,children:[(0,D.jsx)(f,{actions:(0,D.jsxs)(o,{disabled:H||j.isPending,onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,D.jsx)(a,{className:`size-4`}),`Delete`]}),subtitle:`Internet Gateway Details`,title:U?`${I.InternetGatewayId} (${U})`:I.InternetGatewayId}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`Internet Gateway Information`}),(0,D.jsxs)(w.Content,{children:[(0,D.jsx)(T,{label:`Internet Gateway ID`,value:I.InternetGatewayId}),(0,D.jsx)(T,{label:`Owner ID`,value:I.OwnerId??`—`}),(0,D.jsx)(T,{label:`State`,value:V?.State??`detached`})]})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`VPC Attachment`}),(0,D.jsx)(w.Content,{children:H?(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(r,{className:`text-primary hover:underline`,params:{id:V.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:V.VpcId}),(0,D.jsx)(o,{disabled:A.isPending,onClick:async()=>await B(V.VpcId??``),size:`sm`,variant:`outline`,children:`Detach`})]}):(0,D.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,D.jsx)(`div`,{className:`flex-1`,children:(0,D.jsxs)(h,{onValueChange:e=>F(e??``),value:P,children:[(0,D.jsx)(b,{className:`w-full`,children:(0,D.jsx)(x,{placeholder:`Select a VPC`})}),(0,D.jsx)(p,{children:L.map(e=>{let t=i(e.Tags);return(0,D.jsx)(d,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(o,{disabled:!P||k.isPending,onClick:z,size:`sm`,children:`Attach`})]})})]})]}),(0,D.jsx)(C,{description:`Are you sure you want to delete the Internet Gateway "${I.InternetGatewayId}"? This action cannot be undone.`,isPending:j.isPending,onConfirm:R,onOpenChange:N,open:M,title:`Delete Internet Gateway`})]})}export{O as component};
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./link.js";import{Vt as i}from"./auth.js";import{t as a}from"./trash-2.js";import{t as o}from"./button.js";import{Da as s,Dn as c,En as l,In as u,Jr as d,Jt as f,Nn as p,On as m,Pt as h,Sn as g,Ta as _,Tn as v,gi as y,kn as b,mt as x,o as S}from"./index.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";var E=t(n()),D=e();function O(){let{id:e}=S.useParams(),t=_(),{data:n}=s(d(e)),{data:O}=s(y),k=x(),A=f(),j=h(),[M,N]=(0,E.useState)(!1),[P,F]=(0,E.useState)(``),I=n.InternetGateways?.[0],L=O.Vpcs??[],R=async()=>{try{await j.mutateAsync(e),t({to:`/ec2/describe-internet-gateways`})}finally{N(!1)}},z=async()=>{P&&await k.mutateAsync({internetGatewayId:e,vpcId:P})},B=async t=>{await A.mutateAsync({internetGatewayId:e,vpcId:t})};if(!I?.InternetGatewayId)return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(u,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(0,D.jsx)(`p`,{className:`text-muted-foreground`,children:`Internet Gateway not found.`})]});let V=I.Attachments?.[0],H=!!V?.VpcId,U=i(I.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(u,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(p,{error:j.error??k.error??A.error??void 0,msg:`Internet Gateway action failed`}),(0,D.jsxs)(`div`,{className:`space-y-6`,children:[(0,D.jsx)(g,{actions:(0,D.jsxs)(o,{disabled:H||j.isPending,onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,D.jsx)(a,{className:`size-4`}),`Delete`]}),subtitle:`Internet Gateway Details`,title:U?`${I.InternetGatewayId} (${U})`:I.InternetGatewayId}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`Internet Gateway Information`}),(0,D.jsxs)(w.Content,{children:[(0,D.jsx)(T,{label:`Internet Gateway ID`,value:I.InternetGatewayId}),(0,D.jsx)(T,{label:`Owner ID`,value:I.OwnerId??`—`}),(0,D.jsx)(T,{label:`State`,value:V?.State??`detached`})]})]}),(0,D.jsxs)(w,{children:[(0,D.jsx)(w.Header,{children:`VPC Attachment`}),(0,D.jsx)(w.Content,{children:H?(0,D.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,D.jsx)(r,{className:`text-primary hover:underline`,params:{id:V.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:V.VpcId}),(0,D.jsx)(o,{disabled:A.isPending,onClick:async()=>await B(V.VpcId??``),size:`sm`,variant:`outline`,children:`Detach`})]}):(0,D.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,D.jsx)(`div`,{className:`flex-1`,children:(0,D.jsxs)(v,{onValueChange:e=>F(e??``),value:P,children:[(0,D.jsx)(m,{className:`w-full`,children:(0,D.jsx)(b,{placeholder:`Select a VPC`})}),(0,D.jsx)(l,{children:L.map(e=>{let t=i(e.Tags);return(0,D.jsx)(c,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(o,{disabled:!P||k.isPending,onClick:z,size:`sm`,children:`Attach`})]})})]})]}),(0,D.jsx)(C,{description:`Are you sure you want to delete the Internet Gateway "${I.InternetGatewayId}"? This action cannot be undone.`,isPending:j.isPending,onConfirm:R,onOpenChange:N,open:M,title:`Delete Internet Gateway`})]})}export{O as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{Rt as r}from"./auth.js";import{t as i}from"./trash-2.js";import{t as a}from"./button.js";import{Br as o,Cn as s,En as c,Ot as l,fn as u,ha as d,pa as f,s as p}from"./index.js";import{t as m}from"./delete-confirmation-dialog.js";import{n as h,t as g}from"./detail-row.js";var _=t(n()),v=e();function y(){let{id:e}=p.useParams(),t=f(),{data:n}=d(o(e)),y=n.KeyPairs?.[0],b=l(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=r(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(s,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(u,{actions:(0,v.jsxs)(a,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(i,{className:`size-4`}),`Delete`]}),subtitle:`Key Pair Details`,title:y.KeyName??``}),(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Key Pair Information`}),(0,v.jsxs)(h.Content,{children:[(0,v.jsx)(g,{label:`Key Pair ID`,value:y.KeyPairId}),(0,v.jsx)(g,{label:`Key Name`,value:y.KeyName}),(0,v.jsx)(g,{label:`Key Type`,value:y.KeyType}),(0,v.jsx)(g,{label:`Key Fingerprint`,value:y.KeyFingerprint}),(0,v.jsx)(g,{label:`Creation Date`,value:w})]})]}),y.Tags&&y.Tags.length>0&&(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Tags`}),(0,v.jsx)(h.Content,{children:y.Tags.map(e=>(0,v.jsx)(g,{label:e.Key??``,value:e.Value},e.Key))})]})]}),(0,v.jsx)(m,{description:`Are you sure you want to delete the key pair "${y.KeyName}"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.`,isPending:b.isPending,onConfirm:C,onOpenChange:S,open:x,title:`Delete Key Pair`})]})}export{y as component};
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{Rt as r}from"./auth.js";import{t as i}from"./trash-2.js";import{t as a}from"./button.js";import{Da as o,Ft as s,In as c,Nn as l,Sn as u,Ta as d,Xr as f,s as p}from"./index.js";import{t as m}from"./delete-confirmation-dialog.js";import{n as h,t as g}from"./detail-row.js";var _=t(n()),v=e();function y(){let{id:e}=p.useParams(),t=d(),{data:n}=o(f(e)),y=n.KeyPairs?.[0],b=s(),[x,S]=(0,_.useState)(!1),C=async()=>{try{await b.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})}finally{S(!1)}};if(!y?.KeyPairId)return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=r(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(l,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(u,{actions:(0,v.jsxs)(a,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(i,{className:`size-4`}),`Delete`]}),subtitle:`Key Pair Details`,title:y.KeyName??``}),(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Key Pair Information`}),(0,v.jsxs)(h.Content,{children:[(0,v.jsx)(g,{label:`Key Pair ID`,value:y.KeyPairId}),(0,v.jsx)(g,{label:`Key Name`,value:y.KeyName}),(0,v.jsx)(g,{label:`Key Type`,value:y.KeyType}),(0,v.jsx)(g,{label:`Key Fingerprint`,value:y.KeyFingerprint}),(0,v.jsx)(g,{label:`Creation Date`,value:w})]})]}),y.Tags&&y.Tags.length>0&&(0,v.jsxs)(h,{children:[(0,v.jsx)(h.Header,{children:`Tags`}),(0,v.jsx)(h.Content,{children:y.Tags.map(e=>(0,v.jsx)(g,{label:e.Key??``,value:e.Value},e.Key))})]})]}),(0,v.jsx)(m,{description:`Are you sure you want to delete the key pair "${y.KeyName}"? This action cannot be undone. Any instances using this key pair will no longer be able to be accessed with it.`,isPending:b.isPending,onConfirm:C,onOpenChange:S,open:x,title:`Delete Key Pair`})]})}export{y as component};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./link.js";import{t as i}from"./trash-2.js";import{t as a}from"./button.js";import{At as o,Cn as s,En as c,Lr as l,Wr as u,fn as d,ha as f,pa as p,u as m}from"./index.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=t(n()),b=e();function x(){let{id:e}=m.useParams(),t=p(),{data:n}=f(u(e)),{data:x}=f(l),S=o(),[C,w]=(0,y.useState)(!1),T=n.PlacementGroups?.[0],E=x.Reservations?.flatMap(e=>e.Instances??[]).filter(e=>e.Placement?.GroupName===T?.GroupName)??[];return T?.GroupId?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(s,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(d,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(a,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(i,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:T.State})]}),subtitle:`Placement Group Details`,title:T.GroupName??T.GroupId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Placement Group Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Group ID`,value:T.GroupId}),(0,b.jsx)(_,{label:`Group Name`,value:T.GroupName}),(0,b.jsx)(_,{label:`Strategy`,value:T.Strategy}),(0,b.jsx)(_,{label:`State`,value:T.State}),(0,b.jsx)(_,{label:`Spread Level`,value:T.SpreadLevel})]})]}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Instances`}),E.length>0?E.map(e=>(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Instance ID`,value:e.InstanceId?(0,b.jsx)(r,{className:`text-primary hover:underline`,params:{id:e.InstanceId},to:`/ec2/describe-instances/$id`,children:e.InstanceId}):void 0}),(0,b.jsx)(_,{label:`State`,value:e.State?.Name}),(0,b.jsx)(_,{label:`Instance Type`,value:e.InstanceType}),(0,b.jsx)(_,{label:`Availability Zone`,value:e.Placement?.AvailabilityZone})]},e.InstanceId)):(0,b.jsx)(g.Content,{children:(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No instances in this placement group.`})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the placement group "${T.GroupName}"? The group must have no running instances.`,isPending:S.isPending,onConfirm:async()=>{if(T?.GroupName)try{await S.mutateAsync(T.GroupName),t({to:`/ec2/describe-placement-groups`})}finally{w(!1)}},onOpenChange:w,open:C,title:`Delete Placement Group`})]}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Placement group not found.`})]})}export{x as component};
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./link.js";import{Vt as i}from"./auth.js";import{t as a}from"./trash-2.js";import{t as o}from"./button.js";import{Da as s,In as c,Nn as l,Rt as u,Sn as d,Ta as f,ei as p,u as m}from"./index.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./state-badge.js";var y=t(n()),b=e();function x(){let{id:e}=m.useParams(),t=f(),{data:n}=s(p(e)),x=u(),[S,C]=(0,y.useState)(!1),w=n.NatGateways?.[0],T=async()=>{try{await x.mutateAsync(e),t({to:`/ec2/describe-nat-gateways`})}finally{C(!1)}};if(!w?.NatGatewayId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`NAT Gateway not found.`})]});let E=i(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(l,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(d,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(o,{disabled:x.isPending,onClick:()=>C(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(a,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:w.State})]}),subtitle:`NAT Gateway Details`,title:E?`${w.NatGatewayId} (${E})`:w.NatGatewayId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`NAT Gateway Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`NAT Gateway ID`,value:w.NatGatewayId}),(0,b.jsx)(_,{label:`State`,value:w.State}),(0,b.jsx)(_,{label:`Connectivity`,value:w.ConnectivityType}),(0,b.jsx)(_,{label:`Subnet ID`,value:w.SubnetId?(0,b.jsx)(r,{className:`text-primary hover:underline`,params:{id:w.SubnetId},to:`/ec2/describe-subnets/$id`,children:w.SubnetId}):`—`}),(0,b.jsx)(_,{label:`VPC ID`,value:w.VpcId?(0,b.jsx)(r,{className:`text-primary hover:underline`,params:{id:w.VpcId},to:`/ec2/describe-vpcs/$id`,children:w.VpcId}):`—`}),(0,b.jsx)(_,{label:`Public IP`,value:D?.PublicIp??`—`}),(0,b.jsx)(_,{label:`Allocation ID`,value:D?.AllocationId?(0,b.jsx)(r,{className:`text-primary hover:underline`,params:{id:D.AllocationId},to:`/ec2/describe-addresses/$id`,children:D.AllocationId}):`—`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the NAT Gateway "${w.NatGatewayId}"? This action cannot be undone. The associated Elastic IP is not released.`,isPending:x.isPending,onConfirm:T,onOpenChange:C,open:S,title:`Delete NAT Gateway`})]})}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./link.js";import{Rt as i}from"./auth.js";import{t as a}from"./trash-2.js";import{t as o}from"./button.js";import{D as s,h as c,t as l}from"./iam.js";import{C as u,Cn as d,En as f,fn as p,ha as m,pa as h,ur as g,yr as _}from"./index.js";import{t as v}from"./delete-confirmation-dialog.js";import{n as y,t as b}from"./detail-row.js";var x=t(n()),S=e();function C(){let{instanceProfileName:e}=u.useParams(),t=h(),{data:n}=m(g(e)),{data:C}=m(_),w=c(),T=l(),E=s(),[D,O]=(0,x.useState)(!1),[k,A]=(0,x.useState)(!1),[j,M]=(0,x.useState)(null),N=n.InstanceProfile,P=N?.Roles??[],F=C.Roles??[],I=new Set(P.map(e=>e.RoleName)),L=F.filter(e=>e.RoleName&&!I.has(e.RoleName)),R=async()=>{try{await w.mutateAsync(e),t({to:`/iam/list-instance-profiles`})}finally{O(!1)}},z=async t=>{await T.mutateAsync({instanceProfileName:e,roleName:t}),A(!1)},B=async t=>{M(t);try{await E.mutateAsync({instanceProfileName:e,roleName:t})}finally{M(null)}};return N?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),w.error&&(0,S.jsx)(d,{error:w.error,msg:`Failed to delete instance profile`}),T.error&&(0,S.jsx)(d,{error:T.error,msg:`Failed to add role`}),E.error&&(0,S.jsx)(d,{error:E.error,msg:`Failed to remove role`}),(0,S.jsxs)(`div`,{className:`space-y-6`,children:[(0,S.jsx)(p,{actions:(0,S.jsxs)(o,{onClick:()=>O(!0),size:`sm`,variant:`destructive`,children:[(0,S.jsx)(a,{className:`size-4`}),`Delete`]}),subtitle:`Instance Profile Details`,title:N.InstanceProfileName??``}),(0,S.jsxs)(y,{children:[(0,S.jsx)(y.Header,{children:`Instance Profile Information`}),(0,S.jsxs)(y.Content,{children:[(0,S.jsx)(b,{label:`Name`,value:N.InstanceProfileName}),(0,S.jsx)(b,{label:`ID`,value:N.InstanceProfileId}),(0,S.jsx)(b,{label:`ARN`,value:N.Arn}),(0,S.jsx)(b,{label:`Path`,value:N.Path}),(0,S.jsx)(b,{label:`Created`,value:i(N.CreateDate)})]})]}),(0,S.jsxs)(y,{children:[(0,S.jsx)(y.Header,{children:(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`span`,{children:`Roles`}),(0,S.jsx)(o,{onClick:()=>A(!k),size:`sm`,children:`Add Role`})]})}),(0,S.jsxs)(y.Content,{children:[k&&L.length>0&&(0,S.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a role to add:`}),(0,S.jsx)(`div`,{className:`space-y-1`,children:L.map(e=>(0,S.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:T.isPending,onClick:()=>{e.RoleName&&z(e.RoleName)},type:`button`,children:[(0,S.jsx)(`span`,{children:e.RoleName}),(0,S.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.RoleName))})]}),k&&L.length===0&&(0,S.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No roles available to add.`}),P.length>0?(0,S.jsx)(`div`,{className:`col-span-2 space-y-3`,children:P.map(e=>(0,S.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,S.jsx)(r,{className:`text-sm font-medium text-primary hover:underline`,params:{roleName:e.RoleName??``},to:`/iam/list-roles/$roleName`,children:e.RoleName}),(0,S.jsx)(o,{disabled:j===e.RoleName,onClick:()=>{e.RoleName&&B(e.RoleName)},size:`sm`,variant:`outline`,children:`Remove`})]},e.RoleName))}):(0,S.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No roles in this instance profile.`})]})]})]}),(0,S.jsx)(v,{description:`Are you sure you want to delete the instance profile "${e}"? This action cannot be undone. You must remove all roles first.`,isPending:w.isPending,onConfirm:R,onOpenChange:O,open:D,title:`Delete Instance Profile`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(f,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),(0,S.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance profile not found.`})]})}export{C as component};
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{t as r}from"./link.js";import{Rt as i}from"./auth.js";import{t as a}from"./trash-2.js";import{t as o}from"./button.js";import{D as s,h as c,t as l}from"./iam.js";import{Da as u,In as d,Nn as f,Sn as p,Ta as m,br as h,kr as g,w as _}from"./index.js";import{t as v}from"./delete-confirmation-dialog.js";import{n as y,t as b}from"./detail-row.js";var x=t(n()),S=e();function C(){let{instanceProfileName:e}=_.useParams(),t=m(),{data:n}=u(h(e)),{data:C}=u(g),w=c(),T=l(),E=s(),[D,O]=(0,x.useState)(!1),[k,A]=(0,x.useState)(!1),[j,M]=(0,x.useState)(null),N=n.InstanceProfile,P=N?.Roles??[],F=C.Roles??[],I=new Set(P.map(e=>e.RoleName)),L=F.filter(e=>e.RoleName&&!I.has(e.RoleName)),R=async()=>{try{await w.mutateAsync(e),t({to:`/iam/list-instance-profiles`})}finally{O(!1)}},z=async t=>{await T.mutateAsync({instanceProfileName:e,roleName:t}),A(!1)},B=async t=>{M(t);try{await E.mutateAsync({instanceProfileName:e,roleName:t})}finally{M(null)}};return N?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(d,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),w.error&&(0,S.jsx)(f,{error:w.error,msg:`Failed to delete instance profile`}),T.error&&(0,S.jsx)(f,{error:T.error,msg:`Failed to add role`}),E.error&&(0,S.jsx)(f,{error:E.error,msg:`Failed to remove role`}),(0,S.jsxs)(`div`,{className:`space-y-6`,children:[(0,S.jsx)(p,{actions:(0,S.jsxs)(o,{onClick:()=>O(!0),size:`sm`,variant:`destructive`,children:[(0,S.jsx)(a,{className:`size-4`}),`Delete`]}),subtitle:`Instance Profile Details`,title:N.InstanceProfileName??``}),(0,S.jsxs)(y,{children:[(0,S.jsx)(y.Header,{children:`Instance Profile Information`}),(0,S.jsxs)(y.Content,{children:[(0,S.jsx)(b,{label:`Name`,value:N.InstanceProfileName}),(0,S.jsx)(b,{label:`ID`,value:N.InstanceProfileId}),(0,S.jsx)(b,{label:`ARN`,value:N.Arn}),(0,S.jsx)(b,{label:`Path`,value:N.Path}),(0,S.jsx)(b,{label:`Created`,value:i(N.CreateDate)})]})]}),(0,S.jsxs)(y,{children:[(0,S.jsx)(y.Header,{children:(0,S.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,S.jsx)(`span`,{children:`Roles`}),(0,S.jsx)(o,{onClick:()=>A(!k),size:`sm`,children:`Add Role`})]})}),(0,S.jsxs)(y.Content,{children:[k&&L.length>0&&(0,S.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,S.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a role to add:`}),(0,S.jsx)(`div`,{className:`space-y-1`,children:L.map(e=>(0,S.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:T.isPending,onClick:()=>{e.RoleName&&z(e.RoleName)},type:`button`,children:[(0,S.jsx)(`span`,{children:e.RoleName}),(0,S.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.RoleName))})]}),k&&L.length===0&&(0,S.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No roles available to add.`}),P.length>0?(0,S.jsx)(`div`,{className:`col-span-2 space-y-3`,children:P.map(e=>(0,S.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,S.jsx)(r,{className:`text-sm font-medium text-primary hover:underline`,params:{roleName:e.RoleName??``},to:`/iam/list-roles/$roleName`,children:e.RoleName}),(0,S.jsx)(o,{disabled:j===e.RoleName,onClick:()=>{e.RoleName&&B(e.RoleName)},size:`sm`,variant:`outline`,children:`Remove`})]},e.RoleName))}):(0,S.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No roles in this instance profile.`})]})]})]}),(0,S.jsx)(v,{description:`Are you sure you want to delete the instance profile "${e}"? This action cannot be undone. You must remove all roles first.`,isPending:w.isPending,onConfirm:R,onOpenChange:O,open:D,title:`Delete Instance Profile`})]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(d,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),(0,S.jsx)(`p`,{className:`text-muted-foreground`,children:`Instance profile not found.`})]})}export{C as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{Rt as r}from"./auth.js";import{t as i}from"./trash-2.js";import{t as a}from"./button.js";import{g as o}from"./iam.js";import{Cn as s,En as c,fn as l,ha as u,hr as d,mr as f,pa as p,w as m}from"./index.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./policy-document-viewer.js";var y=t(n()),b=e();function x(){let{policyArn:e}=m.useParams(),t=decodeURIComponent(e),n=p(),{data:x}=u(f(t)),S=x.Policy,C=o(),[w,T]=(0,y.useState)(!1),{data:E}=u(d(t,S?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return S?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,b.jsx)(s,{error:C.error,msg:`Failed to delete policy`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(l,{actions:(0,b.jsxs)(a,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(i,{className:`size-4`}),`Delete`]}),subtitle:`Policy Details`,title:S.PolicyName??``}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Policy Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Policy Name`,value:S.PolicyName}),(0,b.jsx)(_,{label:`Policy ID`,value:S.PolicyId}),(0,b.jsx)(_,{label:`ARN`,value:S.Arn}),(0,b.jsx)(_,{label:`Path`,value:S.Path}),(0,b.jsx)(_,{label:`Description`,value:S.Description??`-`}),(0,b.jsx)(_,{label:`Created`,value:r(S.CreateDate)})]})]}),D&&(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Policy Document`}),(0,b.jsx)(`div`,{className:`p-4`,children:(0,b.jsx)(v,{document:D})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the policy "${S.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,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{to:`/iam/list-policies`,children:`Back to policies`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{x as component};
|
||||
import{n as e,o as t,r as n}from"./compiler-runtime.js";import{Rt as r}from"./auth.js";import{t as i}from"./trash-2.js";import{t as a}from"./button.js";import{g as o}from"./iam.js";import{Da as s,In as c,Nn as l,Sn as u,T as d,Ta as f,Tr as p,wr as m}from"./index.js";import{t as h}from"./delete-confirmation-dialog.js";import{n as g,t as _}from"./detail-row.js";import{t as v}from"./policy-document-viewer.js";var y=t(n()),b=e();function x(){let{policyArn:e}=d.useParams(),t=decodeURIComponent(e),n=f(),{data:x}=s(m(t)),S=x.Policy,C=o(),[w,T]=(0,y.useState)(!1),{data:E}=s(p(t,S?.DefaultVersionId??`v1`)),D=E?.PolicyVersion?.Document?decodeURIComponent(E.PolicyVersion.Document):null;return S?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,b.jsx)(l,{error:C.error,msg:`Failed to delete policy`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(u,{actions:(0,b.jsxs)(a,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(i,{className:`size-4`}),`Delete`]}),subtitle:`Policy Details`,title:S.PolicyName??``}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Policy Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Policy Name`,value:S.PolicyName}),(0,b.jsx)(_,{label:`Policy ID`,value:S.PolicyId}),(0,b.jsx)(_,{label:`ARN`,value:S.Arn}),(0,b.jsx)(_,{label:`Path`,value:S.Path}),(0,b.jsx)(_,{label:`Description`,value:S.Description??`-`}),(0,b.jsx)(_,{label:`Created`,value:r(S.CreateDate)})]})]}),D&&(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Policy Document`}),(0,b.jsx)(`div`,{className:`p-4`,children:(0,b.jsx)(v,{document:D})})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the policy "${S.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,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(c,{to:`/iam/list-policies`,children:`Back to policies`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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{t as e}from"./queryOptions.js";import{r as t}from"./auth.js";import{_i as n}from"./index.js";var r=e({queryKey:[`admin`,`nodes`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetNodes`,credentials:e})},staleTime:1e4}),i=e({queryKey:[`admin`,`vms`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetVMs`,credentials:e})},staleTime:1e4}),a=e({queryKey:[`admin`,`storageStatus`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetStorageStatus`,credentials:e})},staleTime:1e4});export{a as n,i as r,r as t};
|
||||
import{t as e}from"./queryOptions.js";import{r as t}from"./auth.js";import{ki as n}from"./index.js";var r=e({queryKey:[`admin`,`nodes`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetNodes`,credentials:e})},staleTime:1e4}),i=e({queryKey:[`admin`,`vms`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetVMs`,credentials:e})},staleTime:1e4}),a=e({queryKey:[`admin`,`storageStatus`],queryFn:async()=>{let e=t();if(!e)throw Error(`Not authenticated`);return await n({action:`GetStorageStatus`,credentials:e})},staleTime:1e4});export{a as n,i as r,r as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{An as n,Cn as r,Dn as i,En as a,Hi as o,U as s,at as c,cn as l,fn as u,in as d,jn as f,pa as p,wn as m}from"./index.js";import{t as h}from"./form-actions.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=p(),v=c(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:i(s),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=n(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=f(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).AllocationId;t(n?{to:`/ec2/describe-addresses/$id`,params:{id:n}}:{to:`/ec2/describe-addresses`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(a,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(u,{title:`Allocate Elastic IP`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(r,{error:v.error,msg:`Failed to allocate Elastic IP`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(l,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(d,{children:[P,(0,_.jsx)(o,{id:`name`,placeholder:`my-elastic-ip`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(m,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>await t({to:`/ec2/describe-addresses`}),e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(h,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Allocating…`,submitLabel:`Allocate`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Bn as n,G as r,In as i,Ln as a,Nn as o,Pn as s,Sn as c,Ta as l,Vn as u,ea as d,mn as f,ut as p,vn as m}from"./index.js";import{t as h}from"./form-actions.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=l(),v=p(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:a(r),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=n(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=u(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).AllocationId;t(n?{to:`/ec2/describe-addresses/$id`,params:{id:n}}:{to:`/ec2/describe-addresses`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(i,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(c,{title:`Allocate Elastic IP`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(o,{error:v.error,msg:`Failed to allocate Elastic IP`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(m,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(f,{children:[P,(0,_.jsx)(d,{id:`name`,placeholder:`my-elastic-ip`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(s,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>await t({to:`/ec2/describe-addresses`}),e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(h,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Allocating…`,submitLabel:`Allocate`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 allocate-address`},{type:`flag`,value:` \\
|
||||
--domain`},{type:`value`,value:` vpc`}];return e.trim()&&t.push({type:`flag`,value:` \\
|
||||
--tag-specifications`},{type:`value`,value:` 'ResourceType=elastic-ip,Tags=[{Key=Name,Value=${e.trim()}}]'`}),[{label:`Allocate Elastic IP`,parts:t}]}export{v as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{t as e}from"./compiler-runtime.js";import{f as t,t as n}from"./dist.js";import{Ft as r}from"./auth.js";import{da as i}from"./index.js";var a=e(),o=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(e){let n=(0,a.c)(13),s,c,l,u,d;if(n[0]!==e){let{className:a,variant:f,render:p,...m}=e;s=p,d=f===void 0?`default`:f,u=i,c=`span`,l=t({className:r(o({className:a,variant:d}))},m),n[0]=e,n[1]=s,n[2]=c,n[3]=l,n[4]=u,n[5]=d}else s=n[1],c=n[2],l=n[3],u=n[4],d=n[5];let f;n[6]===d?f=n[7]:(f={slot:`badge`,variant:d},n[6]=d,n[7]=f);let p;return n[8]!==s||n[9]!==c||n[10]!==l||n[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},n[8]=s,n[9]=c,n[10]=l,n[11]=f,n[12]=p):p=n[12],u(p)}export{s as t};
|
||||
import{t as e}from"./compiler-runtime.js";import{f as t,t as n}from"./dist.js";import{Ft as r}from"./auth.js";import{Ca as i}from"./index.js";var a=e(),o=n(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-[0.625rem] font-medium whitespace-nowrap transition-all transition-colors focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-2.5!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-input/20 text-foreground dark:bg-input/30 [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s(e){let n=(0,a.c)(13),s,c,l,u,d;if(n[0]!==e){let{className:a,variant:f,render:p,...m}=e;s=p,d=f===void 0?`default`:f,u=i,c=`span`,l=t({className:r(o({className:a,variant:d}))},m),n[0]=e,n[1]=s,n[2]=c,n[3]=l,n[4]=u,n[5]=d}else s=n[1],c=n[2],l=n[3],u=n[4],d=n[5];let f;n[6]===d?f=n[7]:(f={slot:`badge`,variant:d},n[6]=d,n[7]=f);let p;return n[8]!==s||n[9]!==c||n[10]!==l||n[11]!==f?(p={defaultTagName:c,props:l,render:s,state:f},n[8]=s,n[9]=c,n[10]=l,n[11]=f,n[12]=p):p=n[12],u(p)}export{s as t};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{Ai as a,n as o}from"./awsClient.js";import{Cn as s,cn as c,fi as l,in as u,ma as d,mi as f,pi as p}from"./index.js";import{a as m,i as ee,l as te,n as h,o as g,r as _,s as v,t as y}from"./alert-dialog.js";import{t as b}from"./textarea.js";var x=class extends f(l,p,`ImportCertificate`,a){},S=t(n(),1),C=r(),w=new TextEncoder;function T(){let e=(0,C.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n={mutationFn:E,onSuccess:()=>{t.invalidateQueries({queryKey:[`acm`,`certificates`]})}},e[0]=t,e[1]=n),d(n)}async function E(e){let t=new x({Certificate:w.encode(e.certificate),PrivateKey:w.encode(e.privateKey),CertificateChain:e.certificateChain&&e.certificateChain.length>0?w.encode(e.certificateChain):void 0});return await o().send(t)}var D=e();function O(e){let t=(0,C.c)(54),{open:n,onOpenChange:r,onImported:i}=e,[a,o]=(0,S.useState)(``),[l,d]=(0,S.useState)(``),[f,p]=(0,S.useState)(``),x=T(),w;t[0]===x?w=t[1]:(w=()=>{o(``),d(``),p(``),x.reset()},t[0]=x,t[1]=w);let E=w,O;t[2]!==r||t[3]!==E?(O=e=>{e||E(),r(e)},t[2]=r,t[3]=E,t[4]=O):O=t[4];let k=O,A;t[5]!==a||t[6]!==l?(A=a.trim().length>0&&l.trim().length>0,t[5]=a,t[6]=l,t[7]=A):A=t[7];let j=A,M;t[8]!==j||t[9]!==a||t[10]!==f||t[11]!==x||t[12]!==i||t[13]!==r||t[14]!==l||t[15]!==E?(M=async()=>{if(j)try{let e=await x.mutateAsync({certificate:a,privateKey:l,certificateChain:f});e.CertificateArn&&i(e.CertificateArn),E(),r(!1)}catch{}},t[8]=j,t[9]=a,t[10]=f,t[11]=x,t[12]=i,t[13]=r,t[14]=l,t[15]=E,t[16]=M):M=t[16];let N=M,P;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(P={maxWidth:`36rem`,width:`calc(100vw - 2rem)`},t[17]=P):P=t[17];let F;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,D.jsxs)(v,{children:[(0,D.jsx)(te,{children:`Import certificate`}),(0,D.jsx)(m,{children:`Paste a PEM-encoded certificate and its private key. The optional chain is appended for intermediate CAs.`})]}),t[18]=F):F=t[18];let I;t[19]===x.error?I=t[20]:(I=x.error&&(0,D.jsx)(s,{error:x.error,msg:`Failed to import certificate`}),t[19]=x.error,t[20]=I);let L;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,D.jsx)(c,{children:(0,D.jsx)(`label`,{htmlFor:`cert-body`,children:`Certificate body`})}),t[21]=L):L=t[21];let R;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>o(e.target.value),t[22]=R):R=t[22];let z;t[23]===a?z=t[24]:(z=(0,D.jsxs)(u,{children:[L,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-body`,onChange:R,placeholder:`-----BEGIN CERTIFICATE-----`,rows:5,value:a})]}),t[23]=a,t[24]=z);let B;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,D.jsx)(c,{children:(0,D.jsx)(`label`,{htmlFor:`cert-key`,children:`Private key`})}),t[25]=B):B=t[25];let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>d(e.target.value),t[26]=V):V=t[26];let H;t[27]===l?H=t[28]:(H=(0,D.jsxs)(u,{children:[B,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-key`,onChange:V,placeholder:`-----BEGIN PRIVATE KEY-----`,rows:5,value:l})]}),t[27]=l,t[28]=H);let U;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,D.jsx)(c,{children:(0,D.jsx)(`label`,{htmlFor:`cert-chain`,children:`Certificate chain (optional)`})}),t[29]=U):U=t[29];let W;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>p(e.target.value),t[30]=W):W=t[30];let G;t[31]===f?G=t[32]:(G=(0,D.jsxs)(u,{children:[U,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:f})]}),t[31]=f,t[32]=G);let K;t[33]!==z||t[34]!==H||t[35]!==G?(K=(0,D.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[z,H,G]}),t[33]=z,t[34]=H,t[35]=G,t[36]=K):K=t[36];let q;t[37]===x.isPending?q=t[38]:(q=(0,D.jsx)(_,{disabled:x.isPending,children:`Cancel`}),t[37]=x.isPending,t[38]=q);let J=!j||x.isPending,Y=x.isPending?`Importing…`:`Import`,X;t[39]!==N||t[40]!==J||t[41]!==Y?(X=(0,D.jsx)(h,{disabled:J,onClick:N,children:Y}),t[39]=N,t[40]=J,t[41]=Y,t[42]=X):X=t[42];let Z;t[43]!==q||t[44]!==X?(Z=(0,D.jsxs)(g,{children:[q,X]}),t[43]=q,t[44]=X,t[45]=Z):Z=t[45];let Q;t[46]!==K||t[47]!==Z||t[48]!==I?(Q=(0,D.jsxs)(ee,{className:`grid-cols-[minmax(0,1fr)]`,style:P,children:[F,I,K,Z]}),t[46]=K,t[47]=Z,t[48]=I,t[49]=Q):Q=t[49];let $;return t[50]!==k||t[51]!==n||t[52]!==Q?($=(0,D.jsx)(y,{onOpenChange:k,open:n,children:Q}),t[50]=k,t[51]=n,t[52]=Q,t[53]=$):$=t[53],$}export{O as t};
|
||||
import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{Li as a,n as o}from"./awsClient.js";import{Ea as s,Ei as c,Nn as l,Ti as u,mn as d,vn as f,wi as p}from"./index.js";import{a as m,i as h,l as ee,n as te,o as g,r as _,s as v,t as y}from"./alert-dialog.js";import{t as b}from"./textarea.js";var x=class extends c(p,u,`ImportCertificate`,a){},S=t(n(),1),C=r(),w=new TextEncoder;function T(){let e=(0,C.c)(2),t=i(),n;return e[0]===t?n=e[1]:(n={mutationFn:E,onSuccess:()=>{t.invalidateQueries({queryKey:[`acm`,`certificates`]})}},e[0]=t,e[1]=n),s(n)}async function E(e){let t=new x({Certificate:w.encode(e.certificate),PrivateKey:w.encode(e.privateKey),CertificateChain:e.certificateChain&&e.certificateChain.length>0?w.encode(e.certificateChain):void 0});return await o().send(t)}var D=e();function O(e){let t=(0,C.c)(54),{open:n,onOpenChange:r,onImported:i}=e,[a,o]=(0,S.useState)(``),[s,c]=(0,S.useState)(``),[u,p]=(0,S.useState)(``),x=T(),w;t[0]===x?w=t[1]:(w=()=>{o(``),c(``),p(``),x.reset()},t[0]=x,t[1]=w);let E=w,O;t[2]!==r||t[3]!==E?(O=e=>{e||E(),r(e)},t[2]=r,t[3]=E,t[4]=O):O=t[4];let k=O,A;t[5]!==a||t[6]!==s?(A=a.trim().length>0&&s.trim().length>0,t[5]=a,t[6]=s,t[7]=A):A=t[7];let j=A,M;t[8]!==j||t[9]!==a||t[10]!==u||t[11]!==x||t[12]!==i||t[13]!==r||t[14]!==s||t[15]!==E?(M=async()=>{if(j)try{let e=await x.mutateAsync({certificate:a,privateKey:s,certificateChain:u});e.CertificateArn&&i(e.CertificateArn),E(),r(!1)}catch{}},t[8]=j,t[9]=a,t[10]=u,t[11]=x,t[12]=i,t[13]=r,t[14]=s,t[15]=E,t[16]=M):M=t[16];let N=M,P;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(P={maxWidth:`36rem`,width:`calc(100vw - 2rem)`},t[17]=P):P=t[17];let F;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,D.jsxs)(v,{children:[(0,D.jsx)(ee,{children:`Import certificate`}),(0,D.jsx)(m,{children:`Paste a PEM-encoded certificate and its private key. The optional chain is appended for intermediate CAs.`})]}),t[18]=F):F=t[18];let I;t[19]===x.error?I=t[20]:(I=x.error&&(0,D.jsx)(l,{error:x.error,msg:`Failed to import certificate`}),t[19]=x.error,t[20]=I);let L;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-body`,children:`Certificate body`})}),t[21]=L):L=t[21];let R;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(R=e=>o(e.target.value),t[22]=R):R=t[22];let z;t[23]===a?z=t[24]:(z=(0,D.jsxs)(d,{children:[L,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-body`,onChange:R,placeholder:`-----BEGIN CERTIFICATE-----`,rows:5,value:a})]}),t[23]=a,t[24]=z);let B;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-key`,children:`Private key`})}),t[25]=B):B=t[25];let V;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=e=>c(e.target.value),t[26]=V):V=t[26];let H;t[27]===s?H=t[28]:(H=(0,D.jsxs)(d,{children:[B,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-key`,onChange:V,placeholder:`-----BEGIN PRIVATE KEY-----`,rows:5,value:s})]}),t[27]=s,t[28]=H);let U;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,D.jsx)(f,{children:(0,D.jsx)(`label`,{htmlFor:`cert-chain`,children:`Certificate chain (optional)`})}),t[29]=U):U=t[29];let W;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(W=e=>p(e.target.value),t[30]=W):W=t[30];let G;t[31]===u?G=t[32]:(G=(0,D.jsxs)(d,{children:[U,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:u})]}),t[31]=u,t[32]=G);let K;t[33]!==z||t[34]!==H||t[35]!==G?(K=(0,D.jsxs)(`div`,{className:`min-w-0 space-y-4`,children:[z,H,G]}),t[33]=z,t[34]=H,t[35]=G,t[36]=K):K=t[36];let q;t[37]===x.isPending?q=t[38]:(q=(0,D.jsx)(_,{disabled:x.isPending,children:`Cancel`}),t[37]=x.isPending,t[38]=q);let J=!j||x.isPending,Y=x.isPending?`Importing…`:`Import`,X;t[39]!==N||t[40]!==J||t[41]!==Y?(X=(0,D.jsx)(te,{disabled:J,onClick:N,children:Y}),t[39]=N,t[40]=J,t[41]=Y,t[42]=X):X=t[42];let Z;t[43]!==q||t[44]!==X?(Z=(0,D.jsxs)(g,{children:[q,X]}),t[43]=q,t[44]=X,t[45]=Z):Z=t[45];let Q;t[46]!==K||t[47]!==Z||t[48]!==I?(Q=(0,D.jsxs)(h,{className:`grid-cols-[minmax(0,1fr)]`,style:P,children:[F,I,K,Z]}),t[46]=K,t[47]=Z,t[48]=I,t[49]=Q):Q=t[49];let $;return t[50]!==k||t[51]!==n||t[52]!==Q?($=(0,D.jsx)(y,{onOpenChange:k,open:n,children:Q}),t[50]=k,t[51]=n,t[52]=Q,t[53]=$):$=t[53],$}export{O as t};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{f as n,u as r}from"./auth.js";import{t as i}from"./s3.js";import{An as a,Cn as o,Dn as s,En as c,Hi as l,cn as u,fn as d,in as f,jn as p,on as m,pa as h,wn as g}from"./index.js";import{t as _}from"./form-actions.js";var v=t(),y=r({bucketName:n().min(3,`Bucket name must be at least 3 characters`).max(63,`Bucket name must be at most 63 characters`).regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,`Must start and end with a lowercase letter or number`).regex(/^[a-z0-9.-]+$/,`Only lowercase letters, numbers, hyphens, and periods allowed`).refine(e=>!e.includes(`..`),`Must not contain consecutive periods`).refine(e=>!(e.includes(`.-`)||e.includes(`-.`)),`Must not contain adjacent period and hyphen`)}),b=e();function x(){let e=(0,v.c)(44),t=h(),n=i(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={resolver:s(y)},e[0]=r):r=e[0];let{handleSubmit:x,register:C,control:w,formState:T}=a(r),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=p(O),A;e[3]===k?A=e[4]:(A=e=>e?k[e]:void 0,e[3]=k,e[4]=A);let j=A,M;e[5]!==n||e[6]!==t?(M=async e=>{await n.mutateAsync(e),t({to:`/s3/ls`})},e[5]=n,e[6]=t,e[7]=M):M=e[7];let N=M,P,F;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(c,{to:`/s3/ls`,children:`Back to buckets`}),F=(0,b.jsx)(d,{title:`Create Bucket`}),e[8]=P,e[9]=F):(P=e[8],F=e[9]);let I;e[10]===n.error?I=e[11]:(I=n.error&&(0,b.jsx)(o,{error:n.error,msg:`Failed to create bucket`}),e[10]=n.error,e[11]=I);let L;e[12]!==x||e[13]!==N?(L=x(N),e[12]=x,e[13]=N,e[14]=L):L=e[14];let R;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,b.jsx)(u,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),e[15]=R):R=e[15];let z=!!E.bucketName,B;e[16]===C?B=e[17]:(B=C(`bucketName`),e[16]=C,e[17]=B);let V;e[18]!==z||e[19]!==B?(V=(0,b.jsx)(l,{"aria-invalid":z,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...B}),e[18]=z,e[19]=B,e[20]=V):V=e[20];let H;e[21]===E.bucketName?H=e[22]:(H=(0,b.jsx)(m,{errors:[E.bucketName]}),e[21]=E.bucketName,e[22]=H);let U;e[23]!==V||e[24]!==H?(U=(0,b.jsxs)(f,{children:[R,V,H]}),e[23]=V,e[24]=H,e[25]=U):U=e[25];let W;e[26]===j?W=e[27]:(W=S(j),e[26]=j,e[27]=W);let G;e[28]===W?G=e[29]:(G=(0,b.jsx)(g,{commands:W}),e[28]=W,e[29]=G);let K;e[30]===t?K=e[31]:(K=async()=>await t({to:`/s3/ls`}),e[30]=t,e[31]=K);let q;e[32]!==n.isPending||e[33]!==D||e[34]!==K?(q=(0,b.jsx)(_,{isPending:n.isPending,isSubmitting:D,onCancel:K,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),e[32]=n.isPending,e[33]=D,e[34]=K,e[35]=q):q=e[35];let J;e[36]!==U||e[37]!==G||e[38]!==q||e[39]!==L?(J=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[U,G,q]}),e[36]=U,e[37]=G,e[38]=q,e[39]=L,e[40]=J):J=e[40];let Y;return e[41]!==J||e[42]!==I?(Y=(0,b.jsxs)(b.Fragment,{children:[P,F,I,J]}),e[41]=J,e[42]=I,e[43]=Y):Y=e[43],Y}function S(e){let t=e(`bucketName`);return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<BucketName>`}`}]}]}export{x as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{f as n,u as r}from"./auth.js";import{t as i}from"./s3.js";import{Bn as a,In as o,Ln as s,Nn as c,Pn as l,Sn as u,Ta as d,Vn as f,ea as p,gn as m,mn as h,vn as g}from"./index.js";import{t as _}from"./form-actions.js";var v=t(),y=r({bucketName:n().min(3,`Bucket name must be at least 3 characters`).max(63,`Bucket name must be at most 63 characters`).regex(/^[a-z0-9][a-z0-9.-]*[a-z0-9]$/,`Must start and end with a lowercase letter or number`).regex(/^[a-z0-9.-]+$/,`Only lowercase letters, numbers, hyphens, and periods allowed`).refine(e=>!e.includes(`..`),`Must not contain consecutive periods`).refine(e=>!(e.includes(`.-`)||e.includes(`-.`)),`Must not contain adjacent period and hyphen`)}),b=e();function x(){let e=(0,v.c)(44),t=d(),n=i(),r;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={resolver:s(y)},e[0]=r):r=e[0];let{handleSubmit:x,register:C,control:w,formState:T}=a(r),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=f(O),A;e[3]===k?A=e[4]:(A=e=>e?k[e]:void 0,e[3]=k,e[4]=A);let j=A,M;e[5]!==n||e[6]!==t?(M=async e=>{await n.mutateAsync(e),t({to:`/s3/ls`})},e[5]=n,e[6]=t,e[7]=M):M=e[7];let N=M,P,F;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,b.jsx)(o,{to:`/s3/ls`,children:`Back to buckets`}),F=(0,b.jsx)(u,{title:`Create Bucket`}),e[8]=P,e[9]=F):(P=e[8],F=e[9]);let I;e[10]===n.error?I=e[11]:(I=n.error&&(0,b.jsx)(c,{error:n.error,msg:`Failed to create bucket`}),e[10]=n.error,e[11]=I);let L;e[12]!==x||e[13]!==N?(L=x(N),e[12]=x,e[13]=N,e[14]=L):L=e[14];let R;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,b.jsx)(g,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),e[15]=R):R=e[15];let z=!!E.bucketName,B;e[16]===C?B=e[17]:(B=C(`bucketName`),e[16]=C,e[17]=B);let V;e[18]!==z||e[19]!==B?(V=(0,b.jsx)(p,{"aria-invalid":z,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...B}),e[18]=z,e[19]=B,e[20]=V):V=e[20];let H;e[21]===E.bucketName?H=e[22]:(H=(0,b.jsx)(m,{errors:[E.bucketName]}),e[21]=E.bucketName,e[22]=H);let U;e[23]!==V||e[24]!==H?(U=(0,b.jsxs)(h,{children:[R,V,H]}),e[23]=V,e[24]=H,e[25]=U):U=e[25];let W;e[26]===j?W=e[27]:(W=S(j),e[26]=j,e[27]=W);let G;e[28]===W?G=e[29]:(G=(0,b.jsx)(l,{commands:W}),e[28]=W,e[29]=G);let K;e[30]===t?K=e[31]:(K=async()=>await t({to:`/s3/ls`}),e[30]=t,e[31]=K);let q;e[32]!==n.isPending||e[33]!==D||e[34]!==K?(q=(0,b.jsx)(_,{isPending:n.isPending,isSubmitting:D,onCancel:K,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),e[32]=n.isPending,e[33]=D,e[34]=K,e[35]=q):q=e[35];let J;e[36]!==U||e[37]!==G||e[38]!==q||e[39]!==L?(J=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[U,G,q]}),e[36]=U,e[37]=G,e[38]=q,e[39]=L,e[40]=J):J=e[40];let Y;return e[41]!==J||e[42]!==I?(Y=(0,b.jsxs)(b.Fragment,{children:[P,F,I,J]}),e[41]=J,e[42]=I,e[43]=Y):Y=e[43],Y}function S(e){let t=e(`bucketName`);return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<BucketName>`}`}]}]}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{s as n}from"./iam.js";import{An as r,Cn as i,Dn as a,En as o,Hi as s,cn as c,fn as l,in as u,jn as d,on as f,pa as p,wn as m}from"./index.js";import{t as h}from"./form-actions.js";import{n as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=p(),y=n(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:a(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=r(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=d(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-groups`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(o,{to:`/iam/list-groups`,children:`Back to groups`}),P=(0,v.jsx)(l,{title:`Create Group`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(i,{error:y.error,msg:`Failed to create group`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(c,{children:(0,v.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[15]=L):L=e[15];let R=!!T.groupName,z;e[16]===S?z=e[17]:(z=S(`groupName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(s,{"aria-invalid":R,id:`groupName`,placeholder:`my-group...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.groupName?V=e[22]:(V=(0,v.jsx)(f,{errors:[T.groupName]}),e[21]=T.groupName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(u,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(c,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(s,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(f,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(u,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(m,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-groups`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(h,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Group`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-group`},{type:`flag`,value:` --group-name`},{type:`value`,value:` ${n||`<GroupName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create Group`,parts:a}]}export{y as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{s as n}from"./iam.js";import{Bn as r,In as i,Ln as a,Nn as o,Pn as s,Sn as c,Ta as l,Vn as u,ea as d,gn as f,mn as p,vn as m}from"./index.js";import{t as h}from"./form-actions.js";import{n as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=l(),y=n(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:a(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=r(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=u(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-groups`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(i,{to:`/iam/list-groups`,children:`Back to groups`}),P=(0,v.jsx)(c,{title:`Create Group`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(o,{error:y.error,msg:`Failed to create group`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(m,{children:(0,v.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[15]=L):L=e[15];let R=!!T.groupName,z;e[16]===S?z=e[17]:(z=S(`groupName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(d,{"aria-invalid":R,id:`groupName`,placeholder:`my-group...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.groupName?V=e[22]:(V=(0,v.jsx)(f,{errors:[T.groupName]}),e[21]=T.groupName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(p,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(m,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(d,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(f,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(p,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(s,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-groups`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(h,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Group`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-group`},{type:`flag`,value:` --group-name`},{type:`value`,value:` ${n||`<GroupName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create Group`,parts:a}]}export{y as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{c as n}from"./iam.js";import{An as r,Cn as i,Dn as a,En as o,Hi as s,cn as c,fn as l,in as u,jn as d,on as f,pa as p,wn as m}from"./index.js";import{t as h}from"./form-actions.js";import{r as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=p(),y=n(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:a(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=r(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=d(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-instance-profiles`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(o,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),P=(0,v.jsx)(l,{title:`Create Instance Profile`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(i,{error:y.error,msg:`Failed to create instance profile`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(c,{children:(0,v.jsx)(`label`,{htmlFor:`instanceProfileName`,children:`Instance Profile Name`})}),e[15]=L):L=e[15];let R=!!T.instanceProfileName,z;e[16]===S?z=e[17]:(z=S(`instanceProfileName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(s,{"aria-invalid":R,id:`instanceProfileName`,placeholder:`my-instance-profile...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.instanceProfileName?V=e[22]:(V=(0,v.jsx)(f,{errors:[T.instanceProfileName]}),e[21]=T.instanceProfileName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(u,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(c,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(s,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(f,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(u,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(m,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-instance-profiles`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(h,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Instance Profile`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`instanceProfileName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-instance-profile`},{type:`flag`,value:` --instance-profile-name`},{type:`value`,value:` ${n||`<InstanceProfileName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create Instance Profile`,parts:a}]}export{y as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{c as n}from"./iam.js";import{Bn as r,In as i,Ln as a,Nn as o,Pn as s,Sn as c,Ta as l,Vn as u,ea as d,gn as f,mn as p,vn as m}from"./index.js";import{t as h}from"./form-actions.js";import{r as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=l(),y=n(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:a(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=r(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=u(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-instance-profiles`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(i,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),P=(0,v.jsx)(c,{title:`Create Instance Profile`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(o,{error:y.error,msg:`Failed to create instance profile`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(m,{children:(0,v.jsx)(`label`,{htmlFor:`instanceProfileName`,children:`Instance Profile Name`})}),e[15]=L):L=e[15];let R=!!T.instanceProfileName,z;e[16]===S?z=e[17]:(z=S(`instanceProfileName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(d,{"aria-invalid":R,id:`instanceProfileName`,placeholder:`my-instance-profile...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.instanceProfileName?V=e[22]:(V=(0,v.jsx)(f,{errors:[T.instanceProfileName]}),e[21]=T.instanceProfileName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(p,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(m,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(d,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(f,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(p,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(s,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-instance-profiles`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(h,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Instance Profile`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`instanceProfileName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-instance-profile`},{type:`flag`,value:` --instance-profile-name`},{type:`value`,value:` ${n||`<InstanceProfileName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create Instance Profile`,parts:a}]}export{y as component};
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{An as n,Cn as r,Dn as i,En as a,G as o,Hi as s,cn as c,fn as l,ht as u,in as d,jn as f,pa as p,wn as m}from"./index.js";import{t as h}from"./form-actions.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=p(),v=u(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:i(o),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=n(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=f(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).InternetGateway?.InternetGatewayId;t(n?{to:`/ec2/describe-internet-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-internet-gateways`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(a,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),j=(0,_.jsx)(l,{title:`Create Internet Gateway`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(r,{error:v.error,msg:`Failed to create Internet Gateway`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(c,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(d,{children:[P,(0,_.jsx)(s,{id:`name`,placeholder:`my-internet-gateway`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(m,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>await t({to:`/ec2/describe-internet-gateways`}),e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(h,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Creating…`,submitLabel:`Create`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-internet-gateway`}];return e.trim()&&t.push({type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Bn as n,In as r,Ln as i,Nn as a,Pn as o,Sn as s,Ta as c,Vn as l,bt as u,ea as d,mn as f,q as p,vn as m}from"./index.js";import{t as h}from"./form-actions.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=c(),v=u(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:i(p),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=n(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=l(E),O;e[3]!==v||e[4]!==t?(O=async e=>{let n=(await v.mutateAsync({name:e.name?.trim()??void 0})).InternetGateway?.InternetGatewayId;t(n?{to:`/ec2/describe-internet-gateways/$id`,params:{id:n}}:{to:`/ec2/describe-internet-gateways`})},e[3]=v,e[4]=t,e[5]=O):O=e[5];let k=O,A,j;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,_.jsx)(r,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),j=(0,_.jsx)(s,{title:`Create Internet Gateway`}),e[6]=A,e[7]=j):(A=e[6],j=e[7]);let M;e[8]===v.error?M=e[9]:(M=v.error&&(0,_.jsx)(a,{error:v.error,msg:`Failed to create Internet Gateway`}),e[8]=v.error,e[9]=M);let N;e[10]!==S||e[11]!==k?(N=S(k),e[10]=S,e[11]=k,e[12]=N):N=e[12];let P;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,_.jsx)(m,{children:(0,_.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=P):P=e[13];let F;e[14]===C?F=e[15]:(F=C(`name`),e[14]=C,e[15]=F);let I;e[16]===F?I=e[17]:(I=(0,_.jsxs)(f,{children:[P,(0,_.jsx)(d,{id:`name`,placeholder:`my-internet-gateway`,...F})]}),e[16]=F,e[17]=I);let L=D.name??``,R;e[18]===L?R=e[19]:(R=y(L),e[18]=L,e[19]=R);let z;e[20]===R?z=e[21]:(z=(0,_.jsx)(o,{commands:R}),e[20]=R,e[21]=z);let B;e[22]===t?B=e[23]:(B=async()=>await t({to:`/ec2/describe-internet-gateways`}),e[22]=t,e[23]=B);let V;e[24]!==v.isPending||e[25]!==T||e[26]!==B?(V=(0,_.jsx)(h,{isPending:v.isPending,isSubmitting:T,onCancel:B,pendingLabel:`Creating…`,submitLabel:`Create`}),e[24]=v.isPending,e[25]=T,e[26]=B,e[27]=V):V=e[27];let H;e[28]!==I||e[29]!==z||e[30]!==V||e[31]!==N?(H=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:N,children:[I,z,V]}),e[28]=I,e[29]=z,e[30]=V,e[31]=N,e[32]=H):H=e[32];let U;return e[33]!==H||e[34]!==M?(U=(0,_.jsxs)(_.Fragment,{children:[A,j,M,H]}),e[33]=H,e[34]=M,e[35]=U):U=e[35],U}function y(e){let t=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-internet-gateway`}];return e.trim()&&t.push({type:`flag`,value:` \\
|
||||
--tag-specifications`},{type:`value`,value:` 'ResourceType=internet-gateway,Tags=[{Key=Name,Value=${e.trim()}}]'`}),[{label:`Create Internet Gateway`,parts:t}]}export{v as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,4 @@
|
||||
import{n as e}from"./compiler-runtime.js";import{Bn as t,In as n,Ln as r,Nn as i,Pn as a,Sn as o,St as s,Ta as c,Y as l,ea as u,gn as d,lt as f,mn as p,vn as m}from"./index.js";import{t as h}from"./form-actions.js";import{t as g}from"./launch-template-data-fields.js";var _=e();function v(){let e=c(),v=s(),{control:y,handleSubmit:x,register:S,watch:C,formState:{errors:w,isSubmitting:T}}=t({resolver:r(l),defaultValues:{launchTemplateName:``,versionDescription:``,imageId:``,instanceType:``,securityGroupIds:[],userData:``}}),E=C();return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(n,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),(0,_.jsx)(o,{title:`Create Launch Template`}),v.error&&(0,_.jsx)(i,{error:v.error,msg:`Failed to create launch template`}),(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:x(async t=>{let n=(await v.mutateAsync(t)).LaunchTemplate?.LaunchTemplateId;if(!n){e({to:`/ec2/describe-launch-templates`});return}e({to:`/ec2/describe-launch-templates/$id`,params:{id:n}})}),children:[(0,_.jsxs)(p,{children:[(0,_.jsx)(m,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateName`,children:`Name`})}),(0,_.jsx)(u,{"aria-invalid":!!w.launchTemplateName,id:`launchTemplateName`,placeholder:`my-launch-template`,...S(`launchTemplateName`)}),(0,_.jsx)(d,{errors:[w.launchTemplateName]})]}),(0,_.jsxs)(p,{children:[(0,_.jsx)(m,{children:(0,_.jsx)(`label`,{htmlFor:`versionDescription`,children:`Version Description`})}),(0,_.jsx)(u,{id:`versionDescription`,placeholder:`Initial version`,...S(`versionDescription`)})]}),(0,_.jsx)(g,{control:y,errors:w,register:S}),(0,_.jsx)(a,{commands:b(E.launchTemplateName??``,E.versionDescription??``,f(E))}),(0,_.jsx)(h,{isPending:v.isPending,isSubmitting:T,onCancel:async()=>await e({to:`/ec2/describe-launch-templates`}),pendingLabel:`Creating…`,submitLabel:`Create Launch Template`})]})]})}function y(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function b(e,t,n){let r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-launch-template`},{type:`flag`,value:` \\
|
||||
--launch-template-name`},{type:`value`,value:` ${e?y(e):`<name>`}`}];return t&&r.push({type:`flag`,value:` \\
|
||||
--version-description`},{type:`value`,value:` ${y(t)}`}),r.push({type:`flag`,value:` \\
|
||||
--launch-template-data`},{type:`value`,value:` ${y(JSON.stringify(n))}`}),[{label:`Create Launch Template`,parts:r}]}export{v as component};
|
||||
+13
-13
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,3 +1,3 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{An as n,Cn as r,Dn as i,En as ee,Hi as te,J as a,On as ne,_n as o,cn as s,fn as c,gn as l,hn as u,in as d,jn as f,on as p,pa as m,vn as h,vt as g,wn as _,yn as v}from"./index.js";import{t as re}from"./form-actions.js";var ie=t(),y=e();function b(){let e=(0,ie.c)(56),t=m(),b=g(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:i(a),defaultValues:{groupName:``,strategy:`spread`}},e[0]=x):x=e[0];let{control:S,handleSubmit:C,register:w,formState:oe}=n(x),{errors:T,isSubmitting:E}=oe,D;e[1]===S?D=e[2]:(D={control:S},e[1]=S,e[2]=D);let O=f(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==b||e[6]!==t?(j=async e=>{let n=await b.mutateAsync(e);t({to:`/ec2/describe-placement-groups/$id`,params:{id:n.PlacementGroup?.GroupId??``}})},e[5]=b,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(ee,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,y.jsx)(c,{title:`Create Placement Group`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===b.error?F=e[11]:(F=b.error&&(0,y.jsx)(r,{error:b.error,msg:`Failed to create placement group`}),e[10]=b.error,e[11]=F);let I;e[12]!==C||e[13]!==M?(I=C(M),e[12]=C,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,y.jsx)(s,{children:(0,y.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[15]=L):L=e[15];let R=!!T.groupName,z;e[16]===w?z=e[17]:(z=w(`groupName`),e[16]=w,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,y.jsx)(te,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.groupName?V=e[22]:(V=(0,y.jsx)(p,{errors:[T.groupName]}),e[21]=T.groupName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,y.jsxs)(d,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,y.jsx)(s,{children:(0,y.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),e[26]=U):U=e[26];let W;e[27]===T.strategy?W=e[28]:(W=e=>{let{field:t}=e;return(0,y.jsxs)(u,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(h,{"aria-invalid":!!T.strategy,className:`w-full`,id:`strategy`,children:(0,y.jsx)(v,{})}),(0,y.jsxs)(l,{children:[(0,y.jsx)(o,{value:`spread`,children:`spread`}),(0,y.jsx)(o,{value:`cluster`,children:`cluster`})]})]})},e[27]=T.strategy,e[28]=W);let G;e[29]!==S||e[30]!==W?(G=(0,y.jsx)(ne,{control:S,name:`strategy`,render:W}),e[29]=S,e[30]=W,e[31]=G):G=e[31];let K;e[32]===T.strategy?K=e[33]:(K=(0,y.jsx)(p,{errors:[T.strategy]}),e[32]=T.strategy,e[33]=K);let q;e[34]!==G||e[35]!==K?(q=(0,y.jsxs)(d,{children:[U,G,K]}),e[34]=G,e[35]=K,e[36]=q):q=e[36];let J;e[37]===A?J=e[38]:(J=ae(A),e[37]=A,e[38]=J);let Y;e[39]===J?Y=e[40]:(Y=(0,y.jsx)(_,{commands:J}),e[39]=J,e[40]=Y);let X;e[41]===t?X=e[42]:(X=async()=>await t({to:`/ec2/describe-placement-groups`}),e[41]=t,e[42]=X);let Z;e[43]!==b.isPending||e[44]!==E||e[45]!==X?(Z=(0,y.jsx)(re,{isPending:b.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),e[43]=b.isPending,e[44]=E,e[45]=X,e[46]=Z):Z=e[46];let Q;e[47]!==H||e[48]!==q||e[49]!==Y||e[50]!==Z||e[51]!==I?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[47]=H,e[48]=q,e[49]=Y,e[50]=Z,e[51]=I,e[52]=Q):Q=e[52];let $;return e[53]!==Q||e[54]!==F?($=(0,y.jsxs)(y.Fragment,{children:[N,P,F,Q]}),e[53]=Q,e[54]=F,e[55]=$):$=e[55],$}function x(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ae(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`strategy`),i=typeof r==`string`?r:``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Bn as n,Dn as r,En as i,In as a,Ln as ee,Nn as o,On as te,Pn as ne,Q as re,Rn as ie,Sn as s,Ta as c,Tn as l,Tt as u,Vn as d,ea as f,gn as p,kn as m,mn as h,vn as g}from"./index.js";import{t as _}from"./form-actions.js";var v=t(),y=e();function b(){let e=(0,v.c)(56),t=c(),b=u(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:ee(re),defaultValues:{groupName:``,strategy:`spread`}},e[0]=x):x=e[0];let{control:S,handleSubmit:C,register:w,formState:oe}=n(x),{errors:T,isSubmitting:E}=oe,D;e[1]===S?D=e[2]:(D={control:S},e[1]=S,e[2]=D);let O=d(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==b||e[6]!==t?(j=async e=>{let n=await b.mutateAsync(e);t({to:`/ec2/describe-placement-groups/$id`,params:{id:n.PlacementGroup?.GroupId??``}})},e[5]=b,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,y.jsx)(a,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,y.jsx)(s,{title:`Create Placement Group`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===b.error?F=e[11]:(F=b.error&&(0,y.jsx)(o,{error:b.error,msg:`Failed to create placement group`}),e[10]=b.error,e[11]=F);let I;e[12]!==C||e[13]!==M?(I=C(M),e[12]=C,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,y.jsx)(g,{children:(0,y.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[15]=L):L=e[15];let R=!!T.groupName,z;e[16]===w?z=e[17]:(z=w(`groupName`),e[16]=w,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,y.jsx)(f,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.groupName?V=e[22]:(V=(0,y.jsx)(p,{errors:[T.groupName]}),e[21]=T.groupName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,y.jsxs)(h,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,y.jsx)(g,{children:(0,y.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),e[26]=U):U=e[26];let W;e[27]===T.strategy?W=e[28]:(W=e=>{let{field:t}=e;return(0,y.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,y.jsx)(te,{"aria-invalid":!!T.strategy,className:`w-full`,id:`strategy`,children:(0,y.jsx)(m,{})}),(0,y.jsxs)(i,{children:[(0,y.jsx)(r,{value:`spread`,children:`spread`}),(0,y.jsx)(r,{value:`cluster`,children:`cluster`})]})]})},e[27]=T.strategy,e[28]=W);let G;e[29]!==S||e[30]!==W?(G=(0,y.jsx)(ie,{control:S,name:`strategy`,render:W}),e[29]=S,e[30]=W,e[31]=G):G=e[31];let K;e[32]===T.strategy?K=e[33]:(K=(0,y.jsx)(p,{errors:[T.strategy]}),e[32]=T.strategy,e[33]=K);let q;e[34]!==G||e[35]!==K?(q=(0,y.jsxs)(h,{children:[U,G,K]}),e[34]=G,e[35]=K,e[36]=q):q=e[36];let J;e[37]===A?J=e[38]:(J=ae(A),e[37]=A,e[38]=J);let Y;e[39]===J?Y=e[40]:(Y=(0,y.jsx)(ne,{commands:J}),e[39]=J,e[40]=Y);let X;e[41]===t?X=e[42]:(X=async()=>await t({to:`/ec2/describe-placement-groups`}),e[41]=t,e[42]=X);let Z;e[43]!==b.isPending||e[44]!==E||e[45]!==X?(Z=(0,y.jsx)(_,{isPending:b.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),e[43]=b.isPending,e[44]=E,e[45]=X,e[46]=Z):Z=e[46];let Q;e[47]!==H||e[48]!==q||e[49]!==Y||e[50]!==Z||e[51]!==I?(Q=(0,y.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[47]=H,e[48]=q,e[49]=Y,e[50]=Z,e[51]=I,e[52]=Q):Q=e[52];let $;return e[53]!==Q||e[54]!==F?($=(0,y.jsxs)(y.Fragment,{children:[N,P,F,Q]}),e[53]=Q,e[54]=F,e[55]=$):$=e[55],$}function x(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ae(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`strategy`),i=typeof r==`string`?r:``;return[{label:`Create Placement Group`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-placement-group`},{type:`flag`,value:` \\
|
||||
--group-name`},{type:`value`,value:` ${n?x(n):`<GroupName>`}`},{type:`flag`,value:` \\
|
||||
--strategy`},{type:`value`,value:` ${i||`spread`}`}]}]}export{b as component};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{l as n}from"./iam.js";import{An as r,Cn as i,Dn as a,En as o,Hi as s,On as c,cn as l,fn as ee,in as u,jn as te,on as d,pa as ne,wn as re}from"./index.js";import{t as ie}from"./form-actions.js";import{t as ae}from"./json-editor.js";import{i as oe}from"./iam2.js";var se=t(),f=e(),p=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function m(){let e=(0,se.c)(67),t=ne(),m=n(),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={resolver:a(oe),defaultValues:{policyDocument:p}},e[0]=g):g=e[0];let{handleSubmit:_,register:v,control:y,formState:ce}=r(g),{errors:b,isSubmitting:x}=ce,S;e[1]===y?S=e[2]:(S={control:y},e[1]=y,e[2]=S);let C=te(S),w;e[3]===C?w=e[4]:(w=e=>e?C[e]:void 0,e[3]=C,e[4]=w);let T=w,E;e[5]!==m||e[6]!==t?(E=async e=>{await m.mutateAsync(e),t({to:`/iam/list-policies`})},e[5]=m,e[6]=t,e[7]=E):E=e[7];let D=E,O,k;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,f.jsx)(o,{to:`/iam/list-policies`,children:`Back to policies`}),k=(0,f.jsx)(ee,{title:`Create Policy`}),e[8]=O,e[9]=k):(O=e[8],k=e[9]);let A;e[10]===m.error?A=e[11]:(A=m.error&&(0,f.jsx)(i,{error:m.error,msg:`Failed to create policy`}),e[10]=m.error,e[11]=A);let j;e[12]!==_||e[13]!==D?(j=_(D),e[12]=_,e[13]=D,e[14]=j):j=e[14];let M;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),e[15]=M):M=e[15];let N=!!b.policyName,P;e[16]===v?P=e[17]:(P=v(`policyName`),e[16]=v,e[17]=P);let F;e[18]!==N||e[19]!==P?(F=(0,f.jsx)(s,{"aria-invalid":N,id:`policyName`,placeholder:`my-policy...`,...P}),e[18]=N,e[19]=P,e[20]=F):F=e[20];let I;e[21]===b.policyName?I=e[22]:(I=(0,f.jsx)(d,{errors:[b.policyName]}),e[21]=b.policyName,e[22]=I);let L;e[23]!==F||e[24]!==I?(L=(0,f.jsxs)(u,{children:[M,F,I]}),e[23]=F,e[24]=I,e[25]=L):L=e[25];let R;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[26]=R):R=e[26];let z;e[27]===v?z=e[28]:(z=v(`description`),e[27]=v,e[28]=z);let B;e[29]===z?B=e[30]:(B=(0,f.jsx)(s,{id:`description`,placeholder:`A brief description of this policy...`,...z}),e[29]=z,e[30]=B);let V;e[31]===b.description?V=e[32]:(V=(0,f.jsx)(d,{errors:[b.description]}),e[31]=b.description,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,f.jsxs)(u,{children:[R,B,V]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),e[36]=U):U=e[36];let W;e[37]===b.policyDocument?W=e[38]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,f.jsx)(ae,{error:!!b.policyDocument,id:`policyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[37]=b.policyDocument,e[38]=W);let G;e[39]!==y||e[40]!==W?(G=(0,f.jsx)(c,{control:y,name:`policyDocument`,render:W}),e[39]=y,e[40]=W,e[41]=G):G=e[41];let K;e[42]===b.policyDocument?K=e[43]:(K=(0,f.jsx)(d,{errors:[b.policyDocument]}),e[42]=b.policyDocument,e[43]=K);let q;e[44]!==G||e[45]!==K?(q=(0,f.jsxs)(u,{children:[U,G,K]}),e[44]=G,e[45]=K,e[46]=q):q=e[46];let J;e[47]===T?J=e[48]:(J=h(T),e[47]=T,e[48]=J);let Y;e[49]===J?Y=e[50]:(Y=(0,f.jsx)(re,{commands:J}),e[49]=J,e[50]=Y);let X;e[51]===t?X=e[52]:(X=async()=>await t({to:`/iam/list-policies`}),e[51]=t,e[52]=X);let Z;e[53]!==m.isPending||e[54]!==x||e[55]!==X?(Z=(0,f.jsx)(ie,{isPending:m.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),e[53]=m.isPending,e[54]=x,e[55]=X,e[56]=Z):Z=e[56];let Q;e[57]!==L||e[58]!==H||e[59]!==q||e[60]!==Y||e[61]!==Z||e[62]!==j?(Q=(0,f.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[57]=L,e[58]=H,e[59]=q,e[60]=Y,e[61]=Z,e[62]=j,e[63]=Q):Q=e[63];let $;return e[64]!==Q||e[65]!==A?($=(0,f.jsxs)(f.Fragment,{children:[O,k,A,Q]}),e[64]=Q,e[65]=A,e[66]=$):$=e[66],$}function h(e){let t=e(`policyName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`policyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{l as n}from"./iam.js";import{Bn as r,In as i,Ln as a,Nn as o,Pn as s,Rn as c,Sn as ee,Ta as te,Vn as ne,ea as l,gn as u,mn as d,vn as f}from"./index.js";import{t as re}from"./form-actions.js";import{t as ie}from"./json-editor.js";import{i as ae}from"./iam2.js";var oe=t(),p=e(),m=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function h(){let e=(0,oe.c)(67),t=te(),h=n(),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={resolver:a(ae),defaultValues:{policyDocument:m}},e[0]=g):g=e[0];let{handleSubmit:_,register:v,control:y,formState:ce}=r(g),{errors:b,isSubmitting:x}=ce,S;e[1]===y?S=e[2]:(S={control:y},e[1]=y,e[2]=S);let C=ne(S),w;e[3]===C?w=e[4]:(w=e=>e?C[e]:void 0,e[3]=C,e[4]=w);let T=w,E;e[5]!==h||e[6]!==t?(E=async e=>{await h.mutateAsync(e),t({to:`/iam/list-policies`})},e[5]=h,e[6]=t,e[7]=E):E=e[7];let D=E,O,k;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,p.jsx)(i,{to:`/iam/list-policies`,children:`Back to policies`}),k=(0,p.jsx)(ee,{title:`Create Policy`}),e[8]=O,e[9]=k):(O=e[8],k=e[9]);let A;e[10]===h.error?A=e[11]:(A=h.error&&(0,p.jsx)(o,{error:h.error,msg:`Failed to create policy`}),e[10]=h.error,e[11]=A);let j;e[12]!==_||e[13]!==D?(j=_(D),e[12]=_,e[13]=D,e[14]=j):j=e[14];let M;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsx)(f,{children:(0,p.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),e[15]=M):M=e[15];let N=!!b.policyName,P;e[16]===v?P=e[17]:(P=v(`policyName`),e[16]=v,e[17]=P);let F;e[18]!==N||e[19]!==P?(F=(0,p.jsx)(l,{"aria-invalid":N,id:`policyName`,placeholder:`my-policy...`,...P}),e[18]=N,e[19]=P,e[20]=F):F=e[20];let I;e[21]===b.policyName?I=e[22]:(I=(0,p.jsx)(u,{errors:[b.policyName]}),e[21]=b.policyName,e[22]=I);let L;e[23]!==F||e[24]!==I?(L=(0,p.jsxs)(d,{children:[M,F,I]}),e[23]=F,e[24]=I,e[25]=L):L=e[25];let R;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,p.jsx)(f,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[26]=R):R=e[26];let z;e[27]===v?z=e[28]:(z=v(`description`),e[27]=v,e[28]=z);let B;e[29]===z?B=e[30]:(B=(0,p.jsx)(l,{id:`description`,placeholder:`A brief description of this policy...`,...z}),e[29]=z,e[30]=B);let V;e[31]===b.description?V=e[32]:(V=(0,p.jsx)(u,{errors:[b.description]}),e[31]=b.description,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,p.jsxs)(d,{children:[R,B,V]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(f,{children:(0,p.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),e[36]=U):U=e[36];let W;e[37]===b.policyDocument?W=e[38]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,p.jsx)(ie,{error:!!b.policyDocument,id:`policyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[37]=b.policyDocument,e[38]=W);let G;e[39]!==y||e[40]!==W?(G=(0,p.jsx)(c,{control:y,name:`policyDocument`,render:W}),e[39]=y,e[40]=W,e[41]=G):G=e[41];let K;e[42]===b.policyDocument?K=e[43]:(K=(0,p.jsx)(u,{errors:[b.policyDocument]}),e[42]=b.policyDocument,e[43]=K);let q;e[44]!==G||e[45]!==K?(q=(0,p.jsxs)(d,{children:[U,G,K]}),e[44]=G,e[45]=K,e[46]=q):q=e[46];let J;e[47]===T?J=e[48]:(J=se(T),e[47]=T,e[48]=J);let Y;e[49]===J?Y=e[50]:(Y=(0,p.jsx)(s,{commands:J}),e[49]=J,e[50]=Y);let X;e[51]===t?X=e[52]:(X=async()=>await t({to:`/iam/list-policies`}),e[51]=t,e[52]=X);let Z;e[53]!==h.isPending||e[54]!==x||e[55]!==X?(Z=(0,p.jsx)(re,{isPending:h.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),e[53]=h.isPending,e[54]=x,e[55]=X,e[56]=Z):Z=e[56];let Q;e[57]!==L||e[58]!==H||e[59]!==q||e[60]!==Y||e[61]!==Z||e[62]!==j?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[57]=L,e[58]=H,e[59]=q,e[60]=Y,e[61]=Z,e[62]=j,e[63]=Q):Q=e[63];let $;return e[64]!==Q||e[65]!==A?($=(0,p.jsxs)(p.Fragment,{children:[O,k,A,Q]}),e[64]=Q,e[65]=A,e[66]=$):$=e[66],$}function se(e){let t=e(`policyName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`policyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\
|
||||
--policy-name`},{type:`value`,value:` ${n||`<PolicyName>`}`}];return i&&s.push({type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${i}"`}),s.push({type:`flag`,value:` \\
|
||||
--policy-document`},{type:`value`,value:` '${o||`<PolicyDocument>`}'`}),[{label:`Create Policy`,parts:s}]}export{m as component};
|
||||
--policy-document`},{type:`value`,value:` '${o||`<PolicyDocument>`}'`}),[{label:`Create Policy`,parts:s}]}export{h as component};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{u as n}from"./iam.js";import{An as r,Cn as i,Dn as a,En as o,Hi as s,On as c,cn as l,fn as ee,in as u,jn as te,on as d,pa as ne,wn as re}from"./index.js";import{t as ie}from"./form-actions.js";import{t as ae}from"./json-editor.js";import{a as oe,t as se}from"./iam2.js";var f=t(),p=e();function m(){let e=(0,f.c)(67),t=ne(),m=n(),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={resolver:a(oe),defaultValues:{assumeRolePolicyDocument:se}},e[0]=g):g=e[0];let{handleSubmit:_,register:v,control:y,formState:ce}=r(g),{errors:b,isSubmitting:x}=ce,S;e[1]===y?S=e[2]:(S={control:y},e[1]=y,e[2]=S);let C=te(S),w;e[3]===C?w=e[4]:(w=e=>e?C[e]:void 0,e[3]=C,e[4]=w);let T=w,E;e[5]!==m||e[6]!==t?(E=async e=>{await m.mutateAsync(e),t({to:`/iam/list-roles`})},e[5]=m,e[6]=t,e[7]=E):E=e[7];let D=E,O,k;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,p.jsx)(o,{to:`/iam/list-roles`,children:`Back to roles`}),k=(0,p.jsx)(ee,{title:`Create Role`}),e[8]=O,e[9]=k):(O=e[8],k=e[9]);let A;e[10]===m.error?A=e[11]:(A=m.error&&(0,p.jsx)(i,{error:m.error,msg:`Failed to create role`}),e[10]=m.error,e[11]=A);let j;e[12]!==_||e[13]!==D?(j=_(D),e[12]=_,e[13]=D,e[14]=j):j=e[14];let M;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`roleName`,children:`Role Name`})}),e[15]=M):M=e[15];let N=!!b.roleName,P;e[16]===v?P=e[17]:(P=v(`roleName`),e[16]=v,e[17]=P);let F;e[18]!==N||e[19]!==P?(F=(0,p.jsx)(s,{"aria-invalid":N,id:`roleName`,placeholder:`my-role...`,...P}),e[18]=N,e[19]=P,e[20]=F):F=e[20];let I;e[21]===b.roleName?I=e[22]:(I=(0,p.jsx)(d,{errors:[b.roleName]}),e[21]=b.roleName,e[22]=I);let L;e[23]!==F||e[24]!==I?(L=(0,p.jsxs)(u,{children:[M,F,I]}),e[23]=F,e[24]=I,e[25]=L):L=e[25];let R;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[26]=R):R=e[26];let z;e[27]===v?z=e[28]:(z=v(`description`),e[27]=v,e[28]=z);let B;e[29]===z?B=e[30]:(B=(0,p.jsx)(s,{id:`description`,placeholder:`A brief description of this role...`,...z}),e[29]=z,e[30]=B);let V;e[31]===b.description?V=e[32]:(V=(0,p.jsx)(d,{errors:[b.description]}),e[31]=b.description,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,p.jsxs)(u,{children:[R,B,V]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,p.jsx)(l,{children:(0,p.jsx)(`label`,{htmlFor:`assumeRolePolicyDocument`,children:`Trust Policy (JSON)`})}),e[36]=U):U=e[36];let W;e[37]===b.assumeRolePolicyDocument?W=e[38]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,p.jsx)(ae,{error:!!b.assumeRolePolicyDocument,id:`assumeRolePolicyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[37]=b.assumeRolePolicyDocument,e[38]=W);let G;e[39]!==y||e[40]!==W?(G=(0,p.jsx)(c,{control:y,name:`assumeRolePolicyDocument`,render:W}),e[39]=y,e[40]=W,e[41]=G):G=e[41];let K;e[42]===b.assumeRolePolicyDocument?K=e[43]:(K=(0,p.jsx)(d,{errors:[b.assumeRolePolicyDocument]}),e[42]=b.assumeRolePolicyDocument,e[43]=K);let q;e[44]!==G||e[45]!==K?(q=(0,p.jsxs)(u,{children:[U,G,K]}),e[44]=G,e[45]=K,e[46]=q):q=e[46];let J;e[47]===T?J=e[48]:(J=h(T),e[47]=T,e[48]=J);let Y;e[49]===J?Y=e[50]:(Y=(0,p.jsx)(re,{commands:J}),e[49]=J,e[50]=Y);let X;e[51]===t?X=e[52]:(X=async()=>await t({to:`/iam/list-roles`}),e[51]=t,e[52]=X);let Z;e[53]!==m.isPending||e[54]!==x||e[55]!==X?(Z=(0,p.jsx)(ie,{isPending:m.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Role`}),e[53]=m.isPending,e[54]=x,e[55]=X,e[56]=Z):Z=e[56];let Q;e[57]!==L||e[58]!==H||e[59]!==q||e[60]!==Y||e[61]!==Z||e[62]!==j?(Q=(0,p.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[57]=L,e[58]=H,e[59]=q,e[60]=Y,e[61]=Z,e[62]=j,e[63]=Q):Q=e[63];let $;return e[64]!==Q||e[65]!==A?($=(0,p.jsxs)(p.Fragment,{children:[O,k,A,Q]}),e[64]=Q,e[65]=A,e[66]=$):$=e[66],$}function h(e){let t=e(`roleName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`assumeRolePolicyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-role`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{u as n}from"./iam.js";import{Bn as r,In as i,Ln as a,Nn as o,Pn as s,Rn as c,Sn as ee,Ta as te,Vn as ne,ea as l,gn as u,mn as d,vn as f}from"./index.js";import{t as re}from"./form-actions.js";import{t as ie}from"./json-editor.js";import{a as ae,t as oe}from"./iam2.js";var p=t(),m=e();function h(){let e=(0,p.c)(67),t=te(),h=n(),g;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={resolver:a(ae),defaultValues:{assumeRolePolicyDocument:oe}},e[0]=g):g=e[0];let{handleSubmit:_,register:v,control:y,formState:ce}=r(g),{errors:b,isSubmitting:x}=ce,S;e[1]===y?S=e[2]:(S={control:y},e[1]=y,e[2]=S);let C=ne(S),w;e[3]===C?w=e[4]:(w=e=>e?C[e]:void 0,e[3]=C,e[4]=w);let T=w,E;e[5]!==h||e[6]!==t?(E=async e=>{await h.mutateAsync(e),t({to:`/iam/list-roles`})},e[5]=h,e[6]=t,e[7]=E):E=e[7];let D=E,O,k;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,m.jsx)(i,{to:`/iam/list-roles`,children:`Back to roles`}),k=(0,m.jsx)(ee,{title:`Create Role`}),e[8]=O,e[9]=k):(O=e[8],k=e[9]);let A;e[10]===h.error?A=e[11]:(A=h.error&&(0,m.jsx)(o,{error:h.error,msg:`Failed to create role`}),e[10]=h.error,e[11]=A);let j;e[12]!==_||e[13]!==D?(j=_(D),e[12]=_,e[13]=D,e[14]=j):j=e[14];let M;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,m.jsx)(f,{children:(0,m.jsx)(`label`,{htmlFor:`roleName`,children:`Role Name`})}),e[15]=M):M=e[15];let N=!!b.roleName,P;e[16]===v?P=e[17]:(P=v(`roleName`),e[16]=v,e[17]=P);let F;e[18]!==N||e[19]!==P?(F=(0,m.jsx)(l,{"aria-invalid":N,id:`roleName`,placeholder:`my-role...`,...P}),e[18]=N,e[19]=P,e[20]=F):F=e[20];let I;e[21]===b.roleName?I=e[22]:(I=(0,m.jsx)(u,{errors:[b.roleName]}),e[21]=b.roleName,e[22]=I);let L;e[23]!==F||e[24]!==I?(L=(0,m.jsxs)(d,{children:[M,F,I]}),e[23]=F,e[24]=I,e[25]=L):L=e[25];let R;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,m.jsx)(f,{children:(0,m.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[26]=R):R=e[26];let z;e[27]===v?z=e[28]:(z=v(`description`),e[27]=v,e[28]=z);let B;e[29]===z?B=e[30]:(B=(0,m.jsx)(l,{id:`description`,placeholder:`A brief description of this role...`,...z}),e[29]=z,e[30]=B);let V;e[31]===b.description?V=e[32]:(V=(0,m.jsx)(u,{errors:[b.description]}),e[31]=b.description,e[32]=V);let H;e[33]!==B||e[34]!==V?(H=(0,m.jsxs)(d,{children:[R,B,V]}),e[33]=B,e[34]=V,e[35]=H):H=e[35];let U;e[36]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,m.jsx)(f,{children:(0,m.jsx)(`label`,{htmlFor:`assumeRolePolicyDocument`,children:`Trust Policy (JSON)`})}),e[36]=U):U=e[36];let W;e[37]===b.assumeRolePolicyDocument?W=e[38]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,m.jsx)(ie,{error:!!b.assumeRolePolicyDocument,id:`assumeRolePolicyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[37]=b.assumeRolePolicyDocument,e[38]=W);let G;e[39]!==y||e[40]!==W?(G=(0,m.jsx)(c,{control:y,name:`assumeRolePolicyDocument`,render:W}),e[39]=y,e[40]=W,e[41]=G):G=e[41];let K;e[42]===b.assumeRolePolicyDocument?K=e[43]:(K=(0,m.jsx)(u,{errors:[b.assumeRolePolicyDocument]}),e[42]=b.assumeRolePolicyDocument,e[43]=K);let q;e[44]!==G||e[45]!==K?(q=(0,m.jsxs)(d,{children:[U,G,K]}),e[44]=G,e[45]=K,e[46]=q):q=e[46];let J;e[47]===T?J=e[48]:(J=se(T),e[47]=T,e[48]=J);let Y;e[49]===J?Y=e[50]:(Y=(0,m.jsx)(s,{commands:J}),e[49]=J,e[50]=Y);let X;e[51]===t?X=e[52]:(X=async()=>await t({to:`/iam/list-roles`}),e[51]=t,e[52]=X);let Z;e[53]!==h.isPending||e[54]!==x||e[55]!==X?(Z=(0,m.jsx)(re,{isPending:h.isPending,isSubmitting:x,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Role`}),e[53]=h.isPending,e[54]=x,e[55]=X,e[56]=Z):Z=e[56];let Q;e[57]!==L||e[58]!==H||e[59]!==q||e[60]!==Y||e[61]!==Z||e[62]!==j?(Q=(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[57]=L,e[58]=H,e[59]=q,e[60]=Y,e[61]=Z,e[62]=j,e[63]=Q):Q=e[63];let $;return e[64]!==Q||e[65]!==A?($=(0,m.jsxs)(m.Fragment,{children:[O,k,A,Q]}),e[64]=Q,e[65]=A,e[66]=$):$=e[66],$}function se(e){let t=e(`roleName`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=e(`assumeRolePolicyDocument`),o=typeof a==`string`?a:``,s=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-role`},{type:`flag`,value:` \\
|
||||
--role-name`},{type:`value`,value:` ${n||`<RoleName>`}`}];return i&&s.push({type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${i}"`}),s.push({type:`flag`,value:` \\
|
||||
--assume-role-policy-document`},{type:`value`,value:` '${o||`<TrustPolicy>`}'`}),[{label:`Create Role`,parts:s}]}export{m as component};
|
||||
--assume-role-policy-document`},{type:`value`,value:` '${o||`<TrustPolicy>`}'`}),[{label:`Create Role`,parts:s}]}export{h as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Vt as n}from"./auth.js";import{An as r,Cn as i,Dn as a,En as o,Hi as s,On as c,X as l,_n as u,bt as d,cn as f,fn as p,gn as m,ha as h,hn as g,ii as _,in as v,on as y,pa as b,vn as x,yn as S}from"./index.js";import{t as C}from"./form-actions.js";var w=t(),T=e();function E(){let e=(0,w.c)(44),t=b(),{data:n}=h(_),u=d(),E;e[0]===n.Vpcs?E=e[1]:(E=n.Vpcs??[],e[0]=n.Vpcs,e[1]=E);let O=E,k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:a(l),defaultValues:{vpcId:``,name:``}},e[2]=k):k=e[2];let{control:A,handleSubmit:j,register:M,formState:N}=r(k),{errors:P,isSubmitting:F}=N,I;e[3]!==u||e[4]!==t?(I=async e=>{let n=(await u.mutateAsync({vpcId:e.vpcId,name:e.name?.trim()?e.name.trim():void 0})).RouteTable?.RouteTableId;t(n?{to:`/ec2/describe-route-tables/$id`,params:{id:n}}:{to:`/ec2/describe-route-tables`})},e[3]=u,e[4]=t,e[5]=I):I=e[5];let L=I,R,z;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(o,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(p,{title:`Create Route Table`}),e[6]=R,e[7]=z):(R=e[6],z=e[7]);let B;e[8]===u.error?B=e[9]:(B=u.error&&(0,T.jsx)(i,{error:u.error,msg:`Failed to create Route Table`}),e[8]=u.error,e[9]=B);let V;e[10]!==j||e[11]!==L?(V=j(L),e[10]=j,e[11]=L,e[12]=V):V=e[12];let H;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,T.jsx)(f,{children:(0,T.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=H):H=e[13];let U;e[14]===M?U=e[15]:(U=M(`name`),e[14]=M,e[15]=U);let W;e[16]===U?W=e[17]:(W=(0,T.jsxs)(v,{children:[H,(0,T.jsx)(s,{id:`name`,placeholder:`my-route-table`,...U})]}),e[16]=U,e[17]=W);let G;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,T.jsx)(f,{children:(0,T.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[18]=G):G=e[18];let K;e[19]!==P.vpcId||e[20]!==O?(K=e=>{let{field:t}=e;return(0,T.jsxs)(g,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,T.jsx)(x,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(S,{placeholder:`Select a VPC`})}),(0,T.jsx)(m,{children:O.map(D)})]})},e[19]=P.vpcId,e[20]=O,e[21]=K):K=e[21];let q;e[22]!==A||e[23]!==K?(q=(0,T.jsx)(c,{control:A,name:`vpcId`,render:K}),e[22]=A,e[23]=K,e[24]=q):q=e[24];let J;e[25]===P.vpcId?J=e[26]:(J=(0,T.jsx)(y,{errors:[P.vpcId]}),e[25]=P.vpcId,e[26]=J);let Y;e[27]!==q||e[28]!==J?(Y=(0,T.jsxs)(v,{children:[G,q,J]}),e[27]=q,e[28]=J,e[29]=Y):Y=e[29];let X;e[30]===t?X=e[31]:(X=async()=>await t({to:`/ec2/describe-route-tables`}),e[30]=t,e[31]=X);let Z;e[32]!==u.isPending||e[33]!==F||e[34]!==X?(Z=(0,T.jsx)(C,{isPending:u.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),e[32]=u.isPending,e[33]=F,e[34]=X,e[35]=Z):Z=e[35];let Q;e[36]!==W||e[37]!==Y||e[38]!==Z||e[39]!==V?(Q=(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[W,Y,Z]}),e[36]=W,e[37]=Y,e[38]=Z,e[39]=V,e[40]=Q):Q=e[40];let $;return e[41]!==Q||e[42]!==B?($=(0,T.jsxs)(T.Fragment,{children:[R,z,B,Q]}),e[41]=Q,e[42]=B,e[43]=$):$=e[43],$}function D(e){let t=n(e.Tags);return(0,T.jsx)(u,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{E as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Vt as n}from"./auth.js";import{Bn as r,Da as i,Dn as a,Dt as o,En as s,In as c,Ln as l,Nn as u,On as d,Rn as f,Sn as p,Ta as m,Tn as h,ea as g,et as _,gi as v,gn as y,kn as b,mn as x,vn as S}from"./index.js";import{t as C}from"./form-actions.js";var w=t(),T=e();function E(){let e=(0,w.c)(44),t=m(),{data:n}=i(v),a=o(),E;e[0]===n.Vpcs?E=e[1]:(E=n.Vpcs??[],e[0]=n.Vpcs,e[1]=E);let O=E,k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:l(_),defaultValues:{vpcId:``,name:``}},e[2]=k):k=e[2];let{control:A,handleSubmit:j,register:M,formState:N}=r(k),{errors:P,isSubmitting:F}=N,I;e[3]!==a||e[4]!==t?(I=async e=>{let n=(await a.mutateAsync({vpcId:e.vpcId,name:e.name?.trim()?e.name.trim():void 0})).RouteTable?.RouteTableId;t(n?{to:`/ec2/describe-route-tables/$id`,params:{id:n}}:{to:`/ec2/describe-route-tables`})},e[3]=a,e[4]=t,e[5]=I):I=e[5];let L=I,R,z;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,T.jsx)(c,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(p,{title:`Create Route Table`}),e[6]=R,e[7]=z):(R=e[6],z=e[7]);let B;e[8]===a.error?B=e[9]:(B=a.error&&(0,T.jsx)(u,{error:a.error,msg:`Failed to create Route Table`}),e[8]=a.error,e[9]=B);let V;e[10]!==j||e[11]!==L?(V=j(L),e[10]=j,e[11]=L,e[12]=V):V=e[12];let H;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,T.jsx)(S,{children:(0,T.jsx)(`label`,{htmlFor:`name`,children:`Name (optional)`})}),e[13]=H):H=e[13];let U;e[14]===M?U=e[15]:(U=M(`name`),e[14]=M,e[15]=U);let W;e[16]===U?W=e[17]:(W=(0,T.jsxs)(x,{children:[H,(0,T.jsx)(g,{id:`name`,placeholder:`my-route-table`,...U})]}),e[16]=U,e[17]=W);let G;e[18]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,T.jsx)(S,{children:(0,T.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[18]=G):G=e[18];let K;e[19]!==P.vpcId||e[20]!==O?(K=e=>{let{field:t}=e;return(0,T.jsxs)(h,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,T.jsx)(d,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(b,{placeholder:`Select a VPC`})}),(0,T.jsx)(s,{children:O.map(D)})]})},e[19]=P.vpcId,e[20]=O,e[21]=K):K=e[21];let q;e[22]!==A||e[23]!==K?(q=(0,T.jsx)(f,{control:A,name:`vpcId`,render:K}),e[22]=A,e[23]=K,e[24]=q):q=e[24];let J;e[25]===P.vpcId?J=e[26]:(J=(0,T.jsx)(y,{errors:[P.vpcId]}),e[25]=P.vpcId,e[26]=J);let Y;e[27]!==q||e[28]!==J?(Y=(0,T.jsxs)(x,{children:[G,q,J]}),e[27]=q,e[28]=J,e[29]=Y):Y=e[29];let X;e[30]===t?X=e[31]:(X=async()=>await t({to:`/ec2/describe-route-tables`}),e[30]=t,e[31]=X);let Z;e[32]!==a.isPending||e[33]!==F||e[34]!==X?(Z=(0,T.jsx)(C,{isPending:a.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),e[32]=a.isPending,e[33]=F,e[34]=X,e[35]=Z):Z=e[35];let Q;e[36]!==W||e[37]!==Y||e[38]!==Z||e[39]!==V?(Q=(0,T.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:V,children:[W,Y,Z]}),e[36]=W,e[37]=Y,e[38]=Z,e[39]=V,e[40]=Q):Q=e[40];let $;return e[41]!==Q||e[42]!==B?($=(0,T.jsxs)(T.Fragment,{children:[R,z,B,Q]}),e[41]=Q,e[42]=B,e[43]=$):$=e[43],$}function D(e){let t=n(e.Tags);return(0,T.jsx)(a,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}export{E as component};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Vt as n}from"./auth.js";import{An as r,Cn as ee,Dn as i,En as te,Hi as a,On as ne,Z as re,_n as o,cn as s,fn as ie,gn as ae,ha as oe,hn as se,ii as ce,in as c,jn as le,on as l,pa as ue,vn as de,wn as fe,xt as pe,yn as me}from"./index.js";import{t as he}from"./form-actions.js";var ge=t(),u=e();function d(){let e=(0,ge.c)(73),t=ue(),{data:n}=oe(ce),o=pe(),d;e[0]===n.Vpcs?d=e[1]:(d=n.Vpcs??[],e[0]=n.Vpcs,e[1]=d);let f=d,p;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=i(re),e[2]=p):p=e[2];let m=f[0]?.VpcId??``,h;e[3]===m?h=e[4]:(h={resolver:p,defaultValues:{groupName:``,description:``,vpcId:m}},e[3]=m,e[4]=h);let{control:g,handleSubmit:_,register:v,formState:ye}=r(h),{errors:y,isSubmitting:b}=ye,x;e[5]===g?x=e[6]:(x={control:g},e[5]=g,e[6]=x);let S=le(x),C;e[7]===S?C=e[8]:(C=e=>e?S[e]:void 0,e[7]=S,e[8]=C);let w=C,T;e[9]!==o||e[10]!==t?(T=async e=>{let n=(await o.mutateAsync(e)).GroupId;t(n?{to:`/ec2/describe-security-groups/$id`,params:{id:n}}:{to:`/ec2/describe-security-groups`})},e[9]=o,e[10]=t,e[11]=T):T=e[11];let E=T,D,O;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,u.jsx)(te,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,u.jsx)(ie,{title:`Create Security Group`}),e[12]=D,e[13]=O):(D=e[12],O=e[13]);let k;e[14]===o.error?k=e[15]:(k=o.error&&(0,u.jsx)(ee,{error:o.error,msg:`Failed to create security group`}),e[14]=o.error,e[15]=k);let A;e[16]!==_||e[17]!==E?(A=_(E),e[16]=_,e[17]=E,e[18]=A):A=e[18];let j;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[19]=j):j=e[19];let M=!!y.groupName,N;e[20]===v?N=e[21]:(N=v(`groupName`),e[20]=v,e[21]=N);let P;e[22]!==M||e[23]!==N?(P=(0,u.jsx)(a,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),e[22]=M,e[23]=N,e[24]=P):P=e[24];let F;e[25]===y.groupName?F=e[26]:(F=(0,u.jsx)(l,{errors:[y.groupName]}),e[25]=y.groupName,e[26]=F);let I;e[27]!==P||e[28]!==F?(I=(0,u.jsxs)(c,{children:[j,P,F]}),e[27]=P,e[28]=F,e[29]=I):I=e[29];let L;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),e[30]=L):L=e[30];let R=!!y.description,z;e[31]===v?z=e[32]:(z=v(`description`),e[31]=v,e[32]=z);let B;e[33]!==R||e[34]!==z?(B=(0,u.jsx)(a,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),e[33]=R,e[34]=z,e[35]=B):B=e[35];let V;e[36]===y.description?V=e[37]:(V=(0,u.jsx)(l,{errors:[y.description]}),e[36]=y.description,e[37]=V);let H;e[38]!==B||e[39]!==V?(H=(0,u.jsxs)(c,{children:[L,B,V]}),e[38]=B,e[39]=V,e[40]=H):H=e[40];let U;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,u.jsx)(s,{children:(0,u.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[41]=U):U=e[41];let W;e[42]!==y.vpcId||e[43]!==f?(W=e=>{let{field:t}=e;return(0,u.jsxs)(se,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,u.jsx)(de,{"aria-invalid":!!y.vpcId,className:`w-full`,id:`vpcId`,children:(0,u.jsx)(me,{})}),(0,u.jsx)(ae,{children:f.map(_e)})]})},e[42]=y.vpcId,e[43]=f,e[44]=W):W=e[44];let G;e[45]!==g||e[46]!==W?(G=(0,u.jsx)(ne,{control:g,name:`vpcId`,render:W}),e[45]=g,e[46]=W,e[47]=G):G=e[47];let K;e[48]===y.vpcId?K=e[49]:(K=(0,u.jsx)(l,{errors:[y.vpcId]}),e[48]=y.vpcId,e[49]=K);let q;e[50]!==G||e[51]!==K?(q=(0,u.jsxs)(c,{children:[U,G,K]}),e[50]=G,e[51]=K,e[52]=q):q=e[52];let J;e[53]===w?J=e[54]:(J=ve(w),e[53]=w,e[54]=J);let Y;e[55]===J?Y=e[56]:(Y=(0,u.jsx)(fe,{commands:J}),e[55]=J,e[56]=Y);let X;e[57]===t?X=e[58]:(X=async()=>await t({to:`/ec2/describe-security-groups`}),e[57]=t,e[58]=X);let Z;e[59]!==o.isPending||e[60]!==b||e[61]!==X?(Z=(0,u.jsx)(he,{isPending:o.isPending,isSubmitting:b,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),e[59]=o.isPending,e[60]=b,e[61]=X,e[62]=Z):Z=e[62];let Q;e[63]!==A||e[64]!==I||e[65]!==H||e[66]!==q||e[67]!==Y||e[68]!==Z?(Q=(0,u.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),e[63]=A,e[64]=I,e[65]=H,e[66]=q,e[67]=Y,e[68]=Z,e[69]=Q):Q=e[69];let $;return e[70]!==k||e[71]!==Q?($=(0,u.jsxs)(u.Fragment,{children:[D,O,k,Q]}),e[70]=k,e[71]=Q,e[72]=$):$=e[72],$}function _e(e){let t=n(e.Tags);return(0,u.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ve(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`description`),ee=typeof r==`string`?r:``,i=e(`vpcId`),te=typeof i==`string`?i:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Vt as n}from"./auth.js";import{Bn as r,Da as ee,Dn as i,En as a,In as o,Ln as te,Nn as ne,On as re,Ot as ie,Pn as ae,Rn as oe,Sn as se,Ta as ce,Tn as le,Vn as ue,ea as de,gi as fe,gn as s,kn as pe,mn as c,tt as me,vn as l}from"./index.js";import{t as he}from"./form-actions.js";var ge=t(),u=e();function d(){let e=(0,ge.c)(73),t=ce(),{data:n}=ee(fe),i=ie(),d;e[0]===n.Vpcs?d=e[1]:(d=n.Vpcs??[],e[0]=n.Vpcs,e[1]=d);let f=d,p;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(p=te(me),e[2]=p):p=e[2];let m=f[0]?.VpcId??``,h;e[3]===m?h=e[4]:(h={resolver:p,defaultValues:{groupName:``,description:``,vpcId:m}},e[3]=m,e[4]=h);let{control:g,handleSubmit:_,register:v,formState:ye}=r(h),{errors:y,isSubmitting:b}=ye,x;e[5]===g?x=e[6]:(x={control:g},e[5]=g,e[6]=x);let S=ue(x),C;e[7]===S?C=e[8]:(C=e=>e?S[e]:void 0,e[7]=S,e[8]=C);let w=C,T;e[9]!==i||e[10]!==t?(T=async e=>{let n=(await i.mutateAsync(e)).GroupId;t(n?{to:`/ec2/describe-security-groups/$id`,params:{id:n}}:{to:`/ec2/describe-security-groups`})},e[9]=i,e[10]=t,e[11]=T):T=e[11];let E=T,D,O;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,u.jsx)(o,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,u.jsx)(se,{title:`Create Security Group`}),e[12]=D,e[13]=O):(D=e[12],O=e[13]);let k;e[14]===i.error?k=e[15]:(k=i.error&&(0,u.jsx)(ne,{error:i.error,msg:`Failed to create security group`}),e[14]=i.error,e[15]=k);let A;e[16]!==_||e[17]!==E?(A=_(E),e[16]=_,e[17]=E,e[18]=A):A=e[18];let j;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,u.jsx)(l,{children:(0,u.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[19]=j):j=e[19];let M=!!y.groupName,N;e[20]===v?N=e[21]:(N=v(`groupName`),e[20]=v,e[21]=N);let P;e[22]!==M||e[23]!==N?(P=(0,u.jsx)(de,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),e[22]=M,e[23]=N,e[24]=P):P=e[24];let F;e[25]===y.groupName?F=e[26]:(F=(0,u.jsx)(s,{errors:[y.groupName]}),e[25]=y.groupName,e[26]=F);let I;e[27]!==P||e[28]!==F?(I=(0,u.jsxs)(c,{children:[j,P,F]}),e[27]=P,e[28]=F,e[29]=I):I=e[29];let L;e[30]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,u.jsx)(l,{children:(0,u.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),e[30]=L):L=e[30];let R=!!y.description,z;e[31]===v?z=e[32]:(z=v(`description`),e[31]=v,e[32]=z);let B;e[33]!==R||e[34]!==z?(B=(0,u.jsx)(de,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),e[33]=R,e[34]=z,e[35]=B):B=e[35];let V;e[36]===y.description?V=e[37]:(V=(0,u.jsx)(s,{errors:[y.description]}),e[36]=y.description,e[37]=V);let H;e[38]!==B||e[39]!==V?(H=(0,u.jsxs)(c,{children:[L,B,V]}),e[38]=B,e[39]=V,e[40]=H):H=e[40];let U;e[41]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,u.jsx)(l,{children:(0,u.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[41]=U):U=e[41];let W;e[42]!==y.vpcId||e[43]!==f?(W=e=>{let{field:t}=e;return(0,u.jsxs)(le,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,u.jsx)(re,{"aria-invalid":!!y.vpcId,className:`w-full`,id:`vpcId`,children:(0,u.jsx)(pe,{})}),(0,u.jsx)(a,{children:f.map(_e)})]})},e[42]=y.vpcId,e[43]=f,e[44]=W):W=e[44];let G;e[45]!==g||e[46]!==W?(G=(0,u.jsx)(oe,{control:g,name:`vpcId`,render:W}),e[45]=g,e[46]=W,e[47]=G):G=e[47];let K;e[48]===y.vpcId?K=e[49]:(K=(0,u.jsx)(s,{errors:[y.vpcId]}),e[48]=y.vpcId,e[49]=K);let q;e[50]!==G||e[51]!==K?(q=(0,u.jsxs)(c,{children:[U,G,K]}),e[50]=G,e[51]=K,e[52]=q):q=e[52];let J;e[53]===w?J=e[54]:(J=ve(w),e[53]=w,e[54]=J);let Y;e[55]===J?Y=e[56]:(Y=(0,u.jsx)(ae,{commands:J}),e[55]=J,e[56]=Y);let X;e[57]===t?X=e[58]:(X=async()=>await t({to:`/ec2/describe-security-groups`}),e[57]=t,e[58]=X);let Z;e[59]!==i.isPending||e[60]!==b||e[61]!==X?(Z=(0,u.jsx)(he,{isPending:i.isPending,isSubmitting:b,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),e[59]=i.isPending,e[60]=b,e[61]=X,e[62]=Z):Z=e[62];let Q;e[63]!==A||e[64]!==I||e[65]!==H||e[66]!==q||e[67]!==Y||e[68]!==Z?(Q=(0,u.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),e[63]=A,e[64]=I,e[65]=H,e[66]=q,e[67]=Y,e[68]=Z,e[69]=Q):Q=e[69];let $;return e[70]!==k||e[71]!==Q?($=(0,u.jsxs)(u.Fragment,{children:[D,O,k,Q]}),e[70]=k,e[71]=Q,e[72]=$):$=e[72],$}function _e(e){let t=n(e.Tags);return(0,u.jsx)(i,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ve(e){let t=e(`groupName`),n=typeof t==`string`?t:``,r=e(`description`),ee=typeof r==`string`?r:``,i=e(`vpcId`),a=typeof i==`string`?i:``,o=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\
|
||||
--group-name`},{type:`value`,value:` ${n||`<GroupName>`}`},{type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${ee||`<Description>`}"`}];return te&&a.push({type:`flag`,value:` \\
|
||||
--vpc-id`},{type:`value`,value:` ${te}`}),[{label:`Create Security Group`,parts:a}]}export{d as component};
|
||||
--description`},{type:`value`,value:` "${ee||`<Description>`}"`}];return a&&o.push({type:`flag`,value:` \\
|
||||
--vpc-id`},{type:`value`,value:` ${a}`}),[{label:`Create Security Group`,parts:o}]}export{d as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1,3 +1,3 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{An as n,Cn as r,Dn as i,En as a,Nn as o,On as s,Q as c,St as ee,_n as l,cn as u,fn as te,gn as ne,ha as re,hn as ie,in as d,jn as ae,ni as oe,on as se,pa as f,vn as p,wn as ce,yn as le}from"./index.js";import{t as m}from"./form-actions.js";import{t as ue}from"./textarea.js";var de=t(),h=e();function g(){let e=(0,de.c)(55),t=f(),{data:l}=re(oe),g=ee(),y;e[0]===l.Volumes?y=e[1]:(y=l.Volumes??[],e[0]=l.Volumes,e[1]=y);let b=y,{volumeId:fe}=o.useSearch(),x=fe??b[0]?.VolumeId??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=i(c),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{volumeId:x,description:``}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,formState:D}=n(C),{errors:O,isSubmitting:k}=D,A;e[5]===w?A=e[6]:(A={control:w},e[5]=w,e[6]=A);let j=ae(A),M;e[7]===j?M=e[8]:(M=e=>e?j[e]:void 0,e[7]=j,e[8]=M);let N=M,P;e[9]!==g||e[10]!==t?(P=async e=>{await g.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[9]=g,e[10]=t,e[11]=P):P=e[11];let F=P,I,L;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,h.jsx)(a,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,h.jsx)(te,{title:`Create Snapshot`}),e[12]=I,e[13]=L):(I=e[12],L=e[13]);let R;e[14]===g.error?R=e[15]:(R=g.error&&(0,h.jsx)(r,{error:g.error,msg:`Failed to create snapshot`}),e[14]=g.error,e[15]=R);let z;e[16]!==T||e[17]!==F?(z=T(F),e[16]=T,e[17]=F,e[18]=z):z=e[18];let B;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[19]=B):B=e[19];let V;e[20]!==O.volumeId||e[21]!==b?(V=e=>{let{field:t}=e;return(0,h.jsxs)(ie,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,h.jsx)(p,{"aria-invalid":!!O.volumeId,className:`w-full`,id:`volumeId`,children:(0,h.jsx)(le,{})}),(0,h.jsx)(ne,{children:b.map(_)})]})},e[20]=O.volumeId,e[21]=b,e[22]=V):V=e[22];let H;e[23]!==w||e[24]!==V?(H=(0,h.jsx)(s,{control:w,name:`volumeId`,render:V}),e[23]=w,e[24]=V,e[25]=H):H=e[25];let U;e[26]===O.volumeId?U=e[27]:(U=(0,h.jsx)(se,{errors:[O.volumeId]}),e[26]=O.volumeId,e[27]=U);let W;e[28]!==H||e[29]!==U?(W=(0,h.jsxs)(d,{children:[B,H,U]}),e[28]=H,e[29]=U,e[30]=W):W=e[30];let G;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[31]=G):G=e[31];let K;e[32]===E?K=e[33]:(K=E(`description`),e[32]=E,e[33]=K);let q;e[34]===K?q=e[35]:(q=(0,h.jsxs)(d,{children:[G,(0,h.jsx)(ue,{id:`description`,placeholder:`Snapshot description`,...K})]}),e[34]=K,e[35]=q);let J;e[36]===N?J=e[37]:(J=v(N),e[36]=N,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,h.jsx)(ce,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/ec2/describe-snapshots`}),e[40]=t,e[41]=X);let Z;e[42]!==g.isPending||e[43]!==k||e[44]!==X?(Z=(0,h.jsx)(m,{isPending:g.isPending,isSubmitting:k,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),e[42]=g.isPending,e[43]=k,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==z||e[47]!==W||e[48]!==q||e[49]!==Y||e[50]!==Z?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),e[46]=z,e[47]=W,e[48]=q,e[49]=Y,e[50]=Z,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==R?($=(0,h.jsxs)(h.Fragment,{children:[I,L,R,Q]}),e[52]=Q,e[53]=R,e[54]=$):$=e[54],$}function _(e){return(0,h.jsxs)(l,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function v(e){let t=e(`volumeId`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Bn as n,Da as r,Dn as i,En as a,In as o,Ln as ee,Nn as te,On as ne,Pn as s,Rn as re,Sn as ie,Ta as ae,Tn as c,Un as l,Vn as u,gn as d,kn as f,kt as p,mi as m,mn as h,nt as oe,vn as g}from"./index.js";import{t as se}from"./form-actions.js";import{t as ce}from"./textarea.js";var le=t(),_=e();function v(){let e=(0,le.c)(55),t=ae(),{data:i}=r(m),v=p(),y;e[0]===i.Volumes?y=e[1]:(y=i.Volumes??[],e[0]=i.Volumes,e[1]=y);let b=y,{volumeId:fe}=l.useSearch(),x=fe??b[0]?.VolumeId??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=ee(oe),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{volumeId:x,description:``}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,formState:D}=n(C),{errors:O,isSubmitting:k}=D,A;e[5]===w?A=e[6]:(A={control:w},e[5]=w,e[6]=A);let j=u(A),M;e[7]===j?M=e[8]:(M=e=>e?j[e]:void 0,e[7]=j,e[8]=M);let N=M,P;e[9]!==v||e[10]!==t?(P=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[9]=v,e[10]=t,e[11]=P):P=e[11];let F=P,I,L;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,_.jsx)(o,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,_.jsx)(ie,{title:`Create Snapshot`}),e[12]=I,e[13]=L):(I=e[12],L=e[13]);let R;e[14]===v.error?R=e[15]:(R=v.error&&(0,_.jsx)(te,{error:v.error,msg:`Failed to create snapshot`}),e[14]=v.error,e[15]=R);let z;e[16]!==T||e[17]!==F?(z=T(F),e[16]=T,e[17]=F,e[18]=z):z=e[18];let B;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,_.jsx)(g,{children:(0,_.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[19]=B):B=e[19];let V;e[20]!==O.volumeId||e[21]!==b?(V=e=>{let{field:t}=e;return(0,_.jsxs)(c,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,_.jsx)(ne,{"aria-invalid":!!O.volumeId,className:`w-full`,id:`volumeId`,children:(0,_.jsx)(f,{})}),(0,_.jsx)(a,{children:b.map(ue)})]})},e[20]=O.volumeId,e[21]=b,e[22]=V):V=e[22];let H;e[23]!==w||e[24]!==V?(H=(0,_.jsx)(re,{control:w,name:`volumeId`,render:V}),e[23]=w,e[24]=V,e[25]=H):H=e[25];let U;e[26]===O.volumeId?U=e[27]:(U=(0,_.jsx)(d,{errors:[O.volumeId]}),e[26]=O.volumeId,e[27]=U);let W;e[28]!==H||e[29]!==U?(W=(0,_.jsxs)(h,{children:[B,H,U]}),e[28]=H,e[29]=U,e[30]=W):W=e[30];let G;e[31]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,_.jsx)(g,{children:(0,_.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[31]=G):G=e[31];let K;e[32]===E?K=e[33]:(K=E(`description`),e[32]=E,e[33]=K);let q;e[34]===K?q=e[35]:(q=(0,_.jsxs)(h,{children:[G,(0,_.jsx)(ce,{id:`description`,placeholder:`Snapshot description`,...K})]}),e[34]=K,e[35]=q);let J;e[36]===N?J=e[37]:(J=de(N),e[36]=N,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(s,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/ec2/describe-snapshots`}),e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==k||e[44]!==X?(Z=(0,_.jsx)(se,{isPending:v.isPending,isSubmitting:k,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),e[42]=v.isPending,e[43]=k,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==z||e[47]!==W||e[48]!==q||e[49]!==Y||e[50]!==Z?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),e[46]=z,e[47]=W,e[48]=q,e[49]=Y,e[50]=Z,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==R?($=(0,_.jsxs)(_.Fragment,{children:[I,L,R,Q]}),e[52]=Q,e[53]=R,e[54]=$):$=e[54],$}function ue(e){return(0,_.jsxs)(i,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function de(e){let t=e(`volumeId`),n=typeof t==`string`?t:``,r=e(`description`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\
|
||||
--volume-id`},{type:`value`,value:` ${n||`<VolumeId>`}`}];return i&&a.push({type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${i}"`}),[{label:`Create Snapshot`,parts:a}]}export{g as component};
|
||||
--description`},{type:`value`,value:` "${i}"`}),[{label:`Create Snapshot`,parts:a}]}export{v as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
import{n as e}from"./compiler-runtime.js";import{i as t}from"./elbv2.js";import{An as n,Cn as r,Dn as i,En as a,fn as o,ha as s,ii as c,pa as l,wn as u}from"./index.js";import{t as d}from"./form-actions.js";import{t as f}from"./target-group-form.js";import{a as p}from"./elbv22.js";var m=e();function h(){let e=l(),{data:h}=s(c),_=t(),v=h.Vpcs??[],y=n({resolver:i(p),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:v[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:b,watch:x,formState:{isSubmitting:S}}=y;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(a,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(o,{title:`Create Target Group`}),_.error&&(0,m.jsx)(r,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async t=>{try{let n=(await _.mutateAsync(t)).TargetGroups?.[0]?.TargetGroupArn;e(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(u,{commands:g(x)}),(0,m.jsx)(d,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await e({to:`/ec2/describe-target-groups`}),pendingLabel:`Creating…`,submitLabel:`Create Target Group`})]})]})}function g(e){let t=t=>{let n=e(t);return typeof n==`string`?n:``},n=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},r=t(`name`),i=t(`protocol`)||`HTTP`,a=n(`port`),o=t(`vpcId`),s=t(`healthCheck.protocol`)||`HTTP`,c=t(`healthCheck.path`)||`/`,l=t(`healthCheck.port`)||`traffic-port`,u=n(`healthCheck.intervalSeconds`),d=n(`healthCheck.timeoutSeconds`),f=n(`healthCheck.healthyThresholdCount`),p=n(`healthCheck.unhealthyThresholdCount`),m=t(`healthCheck.matcher`)||`200`,h=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\
|
||||
import{n as e}from"./compiler-runtime.js";import{i as t}from"./elbv2.js";import{Bn as n,Da as r,In as i,Ln as a,Nn as o,Pn as s,Sn as c,Ta as l,gi as u}from"./index.js";import{t as d}from"./form-actions.js";import{t as f}from"./target-group-form.js";import{a as p}from"./elbv22.js";var m=e();function h(){let e=l(),{data:h}=r(u),_=t(),v=h.Vpcs??[],y=n({resolver:a(p),defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:v[0]?.VpcId??``,healthCheck:{protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},tags:[]}}),{handleSubmit:b,watch:x,formState:{isSubmitting:S}}=y;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(i,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),(0,m.jsx)(c,{title:`Create Target Group`}),_.error&&(0,m.jsx)(o,{error:_.error,msg:`Failed to create target group`}),(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:b(async t=>{try{let n=(await _.mutateAsync(t)).TargetGroups?.[0]?.TargetGroupArn;e(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}}),children:[(0,m.jsx)(f,{form:y,vpcs:v}),(0,m.jsx)(s,{commands:g(x)}),(0,m.jsx)(d,{isPending:_.isPending,isSubmitting:S,onCancel:async()=>await e({to:`/ec2/describe-target-groups`}),pendingLabel:`Creating…`,submitLabel:`Create Target Group`})]})]})}function g(e){let t=t=>{let n=e(t);return typeof n==`string`?n:``},n=t=>{let n=e(t);return typeof n==`number`&&Number.isFinite(n)?n:void 0},r=t(`name`),i=t(`protocol`)||`HTTP`,a=n(`port`),o=t(`vpcId`),s=t(`healthCheck.protocol`)||`HTTP`,c=t(`healthCheck.path`)||`/`,l=t(`healthCheck.port`)||`traffic-port`,u=n(`healthCheck.intervalSeconds`),d=n(`healthCheck.timeoutSeconds`),f=n(`healthCheck.healthyThresholdCount`),p=n(`healthCheck.unhealthyThresholdCount`),m=t(`healthCheck.matcher`)||`200`,h=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\
|
||||
--name`},{type:`value`,value:` ${r||`<Name>`}`},{type:`flag`,value:` \\
|
||||
--protocol`},{type:`value`,value:` ${i}`},{type:`flag`,value:` \\
|
||||
--port`},{type:`value`,value:` ${a??80}`},{type:`flag`,value:` \\
|
||||
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{d as n}from"./iam.js";import{An as r,Cn as i,Dn as a,En as o,Hi as s,cn as c,fn as l,in as u,jn as d,on as f,pa as p,wn as m}from"./index.js";import{t as h}from"./form-actions.js";import{o as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=p(),y=n(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:a(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=r(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=d(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-users`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(o,{to:`/iam/list-users`,children:`Back to users`}),P=(0,v.jsx)(l,{title:`Create User`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(i,{error:y.error,msg:`Failed to create user`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(c,{children:(0,v.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),e[15]=L):L=e[15];let R=!!T.userName,z;e[16]===S?z=e[17]:(z=S(`userName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(s,{"aria-invalid":R,id:`userName`,placeholder:`my-user...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.userName?V=e[22]:(V=(0,v.jsx)(f,{errors:[T.userName]}),e[21]=T.userName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(u,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(c,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(s,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(f,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(u,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(m,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-users`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(h,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create User`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`userName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${n||`<UserName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create User`,parts:a}]}export{y as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{d as n}from"./iam.js";import{Bn as r,In as i,Ln as a,Nn as o,Pn as s,Sn as c,Ta as l,Vn as u,ea as d,gn as f,mn as p,vn as m}from"./index.js";import{t as h}from"./form-actions.js";import{o as g}from"./iam2.js";var _=t(),v=e();function y(){let e=(0,_.c)(55),t=l(),y=n(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:a(g)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=r(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=u(D),k;e[3]===O?k=e[4]:(k=e=>e?O[e]:void 0,e[3]=O,e[4]=k);let A=k,j;e[5]!==y||e[6]!==t?(j=async e=>{await y.mutateAsync(e),t({to:`/iam/list-users`})},e[5]=y,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,v.jsx)(i,{to:`/iam/list-users`,children:`Back to users`}),P=(0,v.jsx)(c,{title:`Create User`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===y.error?F=e[11]:(F=y.error&&(0,v.jsx)(o,{error:y.error,msg:`Failed to create user`}),e[10]=y.error,e[11]=F);let I;e[12]!==x||e[13]!==M?(I=x(M),e[12]=x,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,v.jsx)(m,{children:(0,v.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),e[15]=L):L=e[15];let R=!!T.userName,z;e[16]===S?z=e[17]:(z=S(`userName`),e[16]=S,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,v.jsx)(d,{"aria-invalid":R,id:`userName`,placeholder:`my-user...`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===T.userName?V=e[22]:(V=(0,v.jsx)(f,{errors:[T.userName]}),e[21]=T.userName,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,v.jsxs)(p,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,v.jsx)(m,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[26]=U):U=e[26];let W;e[27]===S?W=e[28]:(W=S(`path`),e[27]=S,e[28]=W);let G;e[29]===W?G=e[30]:(G=(0,v.jsx)(d,{id:`path`,placeholder:`/`,...W}),e[29]=W,e[30]=G);let K;e[31]===T.path?K=e[32]:(K=(0,v.jsx)(f,{errors:[T.path]}),e[31]=T.path,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,v.jsxs)(p,{children:[U,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===A?J=e[37]:(J=ee(A),e[36]=A,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,v.jsx)(s,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/iam/list-users`}),e[40]=t,e[41]=X);let Z;e[42]!==y.isPending||e[43]!==E||e[44]!==X?(Z=(0,v.jsx)(h,{isPending:y.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create User`}),e[42]=y.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==H||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==I?(Q=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[46]=H,e[47]=q,e[48]=Y,e[49]=Z,e[50]=I,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==F?($=(0,v.jsxs)(v.Fragment,{children:[N,P,F,Q]}),e[52]=Q,e[53]=F,e[54]=$):$=e[54],$}function ee(e){let t=e(`userName`),n=typeof t==`string`?t:``,r=e(`path`),i=typeof r==`string`?r:``,a=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${n||`<UserName>`}`}];return i&&i!==`/`&&a.push({type:`flag`,value:` --path`},{type:`value`,value:` ${i}`}),[{label:`Create User`,parts:a}]}export{y as component};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{An as n,Cn as r,Dn as i,En as a,Hi as ee,On as te,_n as o,cn as s,et as c,fn as l,gn as ne,ha as re,hn as u,in as d,jr as ie,on as f,pa as ae,vn as oe,wn as se,wt as ce,yn as p}from"./index.js";import{t as m}from"./form-actions.js";var h=t(),g=e();function _(){let e=(0,h.c)(57),t=ae(),{data:o}=re(ie),_=ce(),b;e[0]===o.AvailabilityZones?b=e[1]:(b=o.AvailabilityZones??[],e[0]=o.AvailabilityZones,e[1]=b);let x=b,S=x[0]?.ZoneName??``,C;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(C=i(c),e[2]=C):C=e[2];let w;e[3]===S?w=e[4]:(w={resolver:C,defaultValues:{size:1,availabilityZone:S}},e[3]=S,e[4]=w);let{control:T,handleSubmit:E,register:D,watch:O,formState:le}=n(w),{errors:k,isSubmitting:A}=le,j;e[5]!==_||e[6]!==t?(j=async e=>{await _.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=_,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,g.jsx)(a,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,g.jsx)(l,{title:`Create Volume`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===_.error?F=e[11]:(F=_.error&&(0,g.jsx)(r,{error:_.error,msg:`Failed to create volume`}),e[10]=_.error,e[11]=F);let I;e[12]!==E||e[13]!==M?(I=E(M),e[12]=E,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,g.jsx)(s,{children:(0,g.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),e[15]=L):L=e[15];let R=!!k.size,z;e[16]===D?z=e[17]:(z=D(`size`,{valueAsNumber:!0}),e[16]=D,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,g.jsx)(ee,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===k.size?V=e[22]:(V=(0,g.jsx)(f,{errors:[k.size]}),e[21]=k.size,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,g.jsxs)(d,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,g.jsx)(s,{children:(0,g.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),e[26]=U):U=e[26];let W;e[27]!==x||e[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,g.jsxs)(u,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,g.jsx)(oe,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,g.jsx)(p,{})}),(0,g.jsx)(ne,{children:x.map(v)})]})},e[27]=x,e[28]=k.availabilityZone,e[29]=W):W=e[29];let G;e[30]!==T||e[31]!==W?(G=(0,g.jsx)(te,{control:T,name:`availabilityZone`,render:W}),e[30]=T,e[31]=W,e[32]=G):G=e[32];let K;e[33]===k.availabilityZone?K=e[34]:(K=(0,g.jsx)(f,{errors:[k.availabilityZone]}),e[33]=k.availabilityZone,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,g.jsxs)(d,{children:[U,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===O?J=e[39]:(J=y(O),e[38]=O,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,g.jsx)(se,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>await t({to:`/ec2/describe-volumes`}),e[42]=t,e[43]=X);let Z;e[44]!==_.isPending||e[45]!==A||e[46]!==X?(Z=(0,g.jsx)(m,{isPending:_.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),e[44]=_.isPending,e[45]=A,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==H||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==I?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[48]=H,e[49]=q,e[50]=Y,e[51]=Z,e[52]=I,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==F?($=(0,g.jsxs)(g.Fragment,{children:[N,P,F,Q]}),e[54]=Q,e[55]=F,e[56]=$):$=e[56],$}function v(e){return(0,g.jsx)(o,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function y(e){let t=e(`size`),n=typeof t==`number`?t:0,r=e(`availabilityZone`),i=typeof r==`string`?r:``;return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Bn as n,Da as r,Dn as i,En as a,In as o,Ln as s,Nn as c,On as l,Pn as u,Rn as d,Sn as ee,Ta as te,Tn as ne,Vr as re,ea as ie,gn as f,it as ae,jt as oe,kn as se,mn as p,vn as m}from"./index.js";import{t as h}from"./form-actions.js";var ce=t(),g=e();function _(){let e=(0,ce.c)(57),t=te(),{data:i}=r(re),_=oe(),y;e[0]===i.AvailabilityZones?y=e[1]:(y=i.AvailabilityZones??[],e[0]=i.AvailabilityZones,e[1]=y);let b=y,x=b[0]?.ZoneName??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=s(ae),e[2]=S):S=e[2];let C;e[3]===x?C=e[4]:(C={resolver:S,defaultValues:{size:1,availabilityZone:x}},e[3]=x,e[4]=C);let{control:w,handleSubmit:T,register:E,watch:D,formState:O}=n(C),{errors:k,isSubmitting:A}=O,j;e[5]!==_||e[6]!==t?(j=async e=>{await _.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=_,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,g.jsx)(o,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,g.jsx)(ee,{title:`Create Volume`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===_.error?F=e[11]:(F=_.error&&(0,g.jsx)(c,{error:_.error,msg:`Failed to create volume`}),e[10]=_.error,e[11]=F);let I;e[12]!==T||e[13]!==M?(I=T(M),e[12]=T,e[13]=M,e[14]=I):I=e[14];let L;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,g.jsx)(m,{children:(0,g.jsx)(`label`,{htmlFor:`size`,children:`Size (GiB)`})}),e[15]=L):L=e[15];let R=!!k.size,z;e[16]===E?z=e[17]:(z=E(`size`,{valueAsNumber:!0}),e[16]=E,e[17]=z);let B;e[18]!==R||e[19]!==z?(B=(0,g.jsx)(ie,{"aria-invalid":R,id:`size`,max:16384,min:1,type:`number`,...z}),e[18]=R,e[19]=z,e[20]=B):B=e[20];let V;e[21]===k.size?V=e[22]:(V=(0,g.jsx)(f,{errors:[k.size]}),e[21]=k.size,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,g.jsxs)(p,{children:[L,B,V]}),e[23]=B,e[24]=V,e[25]=H):H=e[25];let U;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,g.jsx)(m,{children:(0,g.jsx)(`label`,{htmlFor:`availabilityZone`,children:`Availability Zone`})}),e[26]=U):U=e[26];let W;e[27]!==b||e[28]!==k.availabilityZone?(W=e=>{let{field:t}=e;return(0,g.jsxs)(ne,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,g.jsx)(l,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,g.jsx)(se,{})}),(0,g.jsx)(a,{children:b.map(v)})]})},e[27]=b,e[28]=k.availabilityZone,e[29]=W):W=e[29];let G;e[30]!==w||e[31]!==W?(G=(0,g.jsx)(d,{control:w,name:`availabilityZone`,render:W}),e[30]=w,e[31]=W,e[32]=G):G=e[32];let K;e[33]===k.availabilityZone?K=e[34]:(K=(0,g.jsx)(f,{errors:[k.availabilityZone]}),e[33]=k.availabilityZone,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,g.jsxs)(p,{children:[U,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===D?J=e[39]:(J=le(D),e[38]=D,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,g.jsx)(u,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>await t({to:`/ec2/describe-volumes`}),e[42]=t,e[43]=X);let Z;e[44]!==_.isPending||e[45]!==A||e[46]!==X?(Z=(0,g.jsx)(h,{isPending:_.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),e[44]=_.isPending,e[45]=A,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==H||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==I?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[48]=H,e[49]=q,e[50]=Y,e[51]=Z,e[52]=I,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==F?($=(0,g.jsxs)(g.Fragment,{children:[N,P,F,Q]}),e[54]=Q,e[55]=F,e[56]=$):$=e[56],$}function v(e){return(0,g.jsx)(i,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function le(e){let t=e(`size`),n=typeof t==`number`?t:0,r=e(`availabilityZone`),i=typeof r==`string`?r:``;return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\
|
||||
--size`},{type:`value`,value:` ${n||1}`},{type:`flag`,value:` \\
|
||||
--availability-zone`},{type:`value`,value:` ${i||`<AvailabilityZone>`}`}]}]}export{_ as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Ar as a,fn as o,ha as s}from"./index.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=s(a),r;e[0]===t.Addresses?r=e[1]:(r=t.Addresses??[],e[0]=t.Addresses,e[1]=r);let c=r,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(n,{to:`/ec2/allocate-address`,children:(0,u.jsx)(i,{children:`Allocate Elastic IP`})}),title:`Elastic IPs`}),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 Elastic IPs found.`})]}),e[3]=c,e[4]=p),p}function f(e){if(!e.AllocationId)return null;let t=r(e.Tags),n=e.AssociationId?`${e.PublicIp} • associated`:`${e.PublicIp} • available`;return(0,u.jsx)(c,{params:{id:e.AllocationId},subtitle:n,title:t?`${e.AllocationId} (${t})`:e.AllocationId??``,to:`/ec2/describe-addresses/$id`},e.AllocationId)}export{d as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Br as a,Da as o,Sn as s}from"./index.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=o(a),r;e[0]===t.Addresses?r=e[1]:(r=t.Addresses??[],e[0]=t.Addresses,e[1]=r);let c=r,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(n,{to:`/ec2/allocate-address`,children:(0,u.jsx)(i,{children:`Allocate Elastic IP`})}),title:`Elastic IPs`}),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 Elastic IPs found.`})]}),e[3]=c,e[4]=p),p}function f(e){if(!e.AllocationId)return null;let t=r(e.Tags),n=e.AssociationId?`${e.PublicIp} • associated`:`${e.PublicIp} • available`;return(0,u.jsx)(c,{params:{id:e.AllocationId},subtitle:n,title:t?`${e.AllocationId} (${t})`:e.AllocationId??``,to:`/ec2/describe-addresses/$id`},e.AllocationId)}export{d as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Pr as n,fn as r,ha as i}from"./index.js";import{t as a}from"./list-card.js";import{t as o}from"./state-badge.js";import{r as s}from"./system-managed.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=i(n),a;if(e[0]!==t.Images){let n=(t.Images??[]).filter(f),i;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,l.jsx)(r,{title:`Images`}),e[2]=i):i=e[2],a=(0,l.jsxs)(l.Fragment,{children:[i,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[0]=t.Images,e[1]=a}else a=e[1];return a}function d(e){return e.ImageId?(0,l.jsx)(a,{badge:(0,l.jsx)(o,{state:e.State}),params:{id:e.ImageId},subtitle:e.ImageId??``,title:e.Name??e.ImageId??``,to:`/ec2/describe-images/$id`},e.ImageId):null}function f(e){return!s(e)}export{u as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Da as n,Sn as r,Wr as i}from"./index.js";import{t as a}from"./list-card.js";import{t as o}from"./state-badge.js";import{r as s}from"./system-managed.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=n(i),a;if(e[0]!==t.Images){let n=(t.Images??[]).filter(f),i;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,l.jsx)(r,{title:`Images`}),e[2]=i):i=e[2],a=(0,l.jsxs)(l.Fragment,{children:[i,n.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:n.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No images found.`})]}),e[0]=t.Images,e[1]=a}else a=e[1];return a}function d(e){return e.ImageId?(0,l.jsx)(a,{badge:(0,l.jsx)(o,{state:e.State}),params:{id:e.ImageId},subtitle:e.ImageId??``,title:e.Name??e.ImageId??``,to:`/ec2/describe-images/$id`},e.ImageId):null}function f(e){return!s(e)}export{u as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Lr as i,fn as a,ha as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.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}=o(i),s;if(e[0]!==t.Reservations){let i=(t.Reservations?.flatMap(h)??[]).toSorted(m),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,u.jsx)(a,{actions:(0,u.jsx)(n,{to:`/ec2/run-instances`,children:(0,u.jsx)(r,{children:`Run Instances`})}),title:`Instances`}),e[2]=o):o=e[2],s=(0,u.jsxs)(u.Fragment,{children:[o,i.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:i.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)(s,{badge:(0,u.jsx)(c,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType}`,title:e.InstanceId,to:`/ec2/describe-instances/$id`},e.InstanceId):null}function m(e,t){let n=d[e.State?.Name??``]??6,r=d[t.State?.Name??``]??6;return n===r?(e.InstanceId??``).localeCompare(t.InstanceId??``):n-r}function h(e){return e.Instances??[]}export{f as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,qr as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.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}=i(o),s;if(e[0]!==t.Reservations){let i=(t.Reservations?.flatMap(h)??[]).toSorted(m),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,u.jsx)(a,{actions:(0,u.jsx)(n,{to:`/ec2/run-instances`,children:(0,u.jsx)(r,{children:`Run Instances`})}),title:`Instances`}),e[2]=o):o=e[2],s=(0,u.jsxs)(u.Fragment,{children:[o,i.length>0?(0,u.jsx)(`div`,{className:`space-y-4`,children:i.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)(s,{badge:(0,u.jsx)(c,{state:e.State?.Name}),params:{id:e.InstanceId},subtitle:`${e.InstanceType}`,title:e.InstanceId,to:`/ec2/describe-instances/$id`},e.InstanceId):null}function m(e,t){let n=d[e.State?.Name??``]??6,r=d[t.State?.Name??``]??6;return n===r?(e.InstanceId??``).localeCompare(t.InstanceId??``):n-r}function h(e){return e.Instances??[]}export{f as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{fn as a,ha as o,zr as s}from"./index.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=o(s),r;e[0]===t.InternetGateways?r=e[1]:(r=t.InternetGateways??[],e[0]=t.InternetGateways,e[1]=r);let c=r,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(a,{actions:(0,u.jsx)(n,{to:`/ec2/create-internet-gateway`,children:(0,u.jsx)(i,{children:`Create Internet Gateway`})}),title:`Internet Gateways`}),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 Internet Gateways found.`})]}),e[3]=c,e[4]=p),p}function f(e){if(!e.InternetGatewayId)return null;let t=r(e.Tags),n=e.Attachments?.[0]?.VpcId;return(0,u.jsx)(c,{params:{id:e.InternetGatewayId},subtitle:n?`attached to ${n}`:`detached`,title:t?`${e.InternetGatewayId} (${t})`:e.InternetGatewayId,to:`/ec2/describe-internet-gateways/$id`},e.InternetGatewayId)}export{d as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Da as a,Sn as o,Yr as s}from"./index.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=a(s),r;e[0]===t.InternetGateways?r=e[1]:(r=t.InternetGateways??[],e[0]=t.InternetGateways,e[1]=r);let c=r,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(n,{to:`/ec2/create-internet-gateway`,children:(0,u.jsx)(i,{children:`Create Internet Gateway`})}),title:`Internet Gateways`}),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 Internet Gateways found.`})]}),e[3]=c,e[4]=p),p}function f(e){if(!e.InternetGatewayId)return null;let t=r(e.Tags),n=e.Attachments?.[0]?.VpcId;return(0,u.jsx)(c,{params:{id:e.InternetGatewayId},subtitle:n?`attached to ${n}`:`detached`,title:t?`${e.InternetGatewayId} (${t})`:e.InternetGatewayId,to:`/ec2/describe-internet-gateways/$id`},e.InternetGatewayId)}export{d as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Vr as i,fn as a,ha as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(4),{data:t}=o(i),s;if(e[0]!==t.KeyPairs){let i=(t.KeyPairs??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(n,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(r,{variant:`outline`,children:`Import Key Pair`})}),e[2]=o):o=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(a,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[o,(0,l.jsx)(n,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(r,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),e[3]=c):c=e[3],s=(0,l.jsxs)(l.Fragment,{children:[c,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),e[0]=t.KeyPairs,e[1]=s}else s=e[1];return s}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:e.KeyPairId??``,title:e.KeyName??``,to:`/ec2/describe-key-pairs/$id`},e.KeyPairId):null}function f(e,t){let n=e.KeyName?.toLowerCase()??``,r=t.KeyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,Zr as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(4),{data:t}=i(o),s;if(e[0]!==t.KeyPairs){let i=(t.KeyPairs??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(n,{to:`/ec2/import-key-pair`,children:(0,l.jsx)(r,{variant:`outline`,children:`Import Key Pair`})}),e[2]=o):o=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,l.jsx)(a,{actions:(0,l.jsxs)(`div`,{className:`flex gap-2`,children:[o,(0,l.jsx)(n,{to:`/ec2/create-key-pair`,children:(0,l.jsx)(r,{children:`Create Key Pair`})})]}),title:`Key Pairs`}),e[3]=c):c=e[3],s=(0,l.jsxs)(l.Fragment,{children:[c,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No key pairs found.`})]}),e[0]=t.KeyPairs,e[1]=s}else s=e[1];return s}function d(e){return e.KeyPairId?(0,l.jsx)(s,{params:{id:e.KeyPairId},subtitle:e.KeyPairId??``,title:e.KeyName??``,to:`/ec2/describe-key-pairs/$id`},e.KeyPairId):null}function f(e,t){let n=e.KeyName?.toLowerCase()??``,r=t.KeyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
+1
@@ -0,0 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{$r as i,Da as a,Sn as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=a(i),s;e[0]===t.LaunchTemplates?s=e[1]:(s=t.LaunchTemplates??[],e[0]=t.LaunchTemplates,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(n,{to:`/ec2/create-launch-template`,children:(0,u.jsx)(r,{children:`Create Launch Template`})}),title:`Launch Templates`}),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 launch templates found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.LaunchTemplateId?(0,u.jsx)(s,{badge:(0,u.jsxs)(c,{variant:`secondary`,children:[`default v`,e.DefaultVersionNumber]}),params:{id:e.LaunchTemplateId},subtitle:`${e.LaunchTemplateId} • latest v${e.LatestVersionNumber}`,title:e.LaunchTemplateName??e.LaunchTemplateId,to:`/ec2/describe-launch-templates/$id`},e.LaunchTemplateId):null}export{d as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Rt as r}from"./auth.js";import{t as i}from"./button.js";import{fn as a,ha as o,pa as s,zn as c}from"./index.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(10),t=s(),{data:f}=o(c),m;e[0]===f.LoadBalancers?m=e[1]:(m=f.LoadBalancers??[],e[0]=f.LoadBalancers,e[1]=m);let h=m,g;e[2]===t?g=e[3]:(g=(0,d.jsx)(a,{actions:(0,d.jsx)(i,{onClick:async()=>await t({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),e[2]=t,e[3]=g);let _;e[4]!==h||e[5]!==t?(_=h.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DNS Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`State`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Scheme`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`})]})}),(0,d.jsx)(`tbody`,{children:h.map(e=>{if(!e.LoadBalancerArn)return null;let i=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(i)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(n,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(i)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??i})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:r(e.CreatedTime)})]},i)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),e[4]=h,e[5]=t,e[6]=_):_=e[6];let v;return e[7]!==g||e[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),e[7]=g,e[8]=_,e[9]=v):v=e[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Rt as r}from"./auth.js";import{t as i}from"./button.js";import{Da as a,Sn as o,Ta as s,Yn as c}from"./index.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(10),t=s(),{data:f}=a(c),m;e[0]===f.LoadBalancers?m=e[1]:(m=f.LoadBalancers??[],e[0]=f.LoadBalancers,e[1]=m);let h=m,g;e[2]===t?g=e[3]:(g=(0,d.jsx)(o,{actions:(0,d.jsx)(i,{onClick:async()=>await t({to:`/ec2/create-load-balancer`}),children:`Create Load Balancer`}),title:`Load Balancers`}),e[2]=t,e[3]=g);let _;e[4]!==h||e[5]!==t?(_=h.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DNS Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`State`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Scheme`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`})]})}),(0,d.jsx)(`tbody`,{children:h.map(e=>{if(!e.LoadBalancerArn)return null;let i=e.LoadBalancerArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-load-balancers/$id`,params:{id:encodeURIComponent(i)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(n,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(i)},to:`/ec2/describe-load-balancers/$id`,children:e.LoadBalancerName??i})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:r(e.CreatedTime)})]},i)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No load balancers found.`}),e[4]=h,e[5]=t,e[6]=_):_=e[6];let v;return e[7]!==g||e[8]!==_?(v=(0,d.jsxs)(d.Fragment,{children:[g,_]}),e[7]=g,e[8]=_,e[9]=v):v=e[9],v}function p(e){return e.stopPropagation()}var m=f;export{m as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Ur as a,fn as o,ha as s}from"./index.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=s(a),r;e[0]===t.NatGateways?r=e[1]:(r=t.NatGateways??[],e[0]=t.NatGateways,e[1]=r);let c=r,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(o,{actions:(0,d.jsx)(n,{to:`/ec2/create-nat-gateway`,children:(0,d.jsx)(i,{children:`Create NAT Gateway`})}),title:`NAT Gateways`}),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 NAT Gateways found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.NatGatewayId)return null;let t=r(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.NatGatewayId},subtitle:e.SubnetId??``,title:t?`${e.NatGatewayId} (${t})`:e.NatGatewayId,to:`/ec2/describe-nat-gateways/$id`},e.NatGatewayId)}export{f as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Da as a,Sn as o,ti as s}from"./index.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=a(s),r;e[0]===t.NatGateways?r=e[1]:(r=t.NatGateways??[],e[0]=t.NatGateways,e[1]=r);let c=r,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(o,{actions:(0,d.jsx)(n,{to:`/ec2/create-nat-gateway`,children:(0,d.jsx)(i,{children:`Create NAT Gateway`})}),title:`NAT Gateways`}),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 NAT Gateways found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.NatGatewayId)return null;let t=r(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.NatGatewayId},subtitle:e.SubnetId??``,title:t?`${e.NatGatewayId} (${t})`:e.NatGatewayId,to:`/ec2/describe-nat-gateways/$id`},e.NatGatewayId)}export{f as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Gr as i,fn as a,ha as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=o(i),s;e[0]===t.PlacementGroups?s=e[1]:(s=t.PlacementGroups??[],e[0]=t.PlacementGroups,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(a,{actions:(0,u.jsx)(n,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(r,{children:`Create Placement Group`})}),title:`Placement Groups`}),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 placement groups found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.GroupId},subtitle:`${e.Strategy} \u2022 ${e.GroupId}`,title:e.GroupName??e.GroupId,to:`/ec2/describe-placement-groups/$id`},e.GroupId):null}export{d as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,ri as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=i(o),s;e[0]===t.PlacementGroups?s=e[1]:(s=t.PlacementGroups??[],e[0]=t.PlacementGroups,e[1]=s);let c=s,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(a,{actions:(0,u.jsx)(n,{to:`/ec2/create-placement-group`,children:(0,u.jsx)(r,{children:`Create Placement Group`})}),title:`Placement Groups`}),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 placement groups found.`})]}),e[3]=c,e[4]=p),p}function f(e){return e.GroupId?(0,u.jsx)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.GroupId},subtitle:`${e.Strategy} \u2022 ${e.GroupId}`,title:e.GroupName??e.GroupId,to:`/ec2/describe-placement-groups/$id`},e.GroupId):null}export{d as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Jr as a,fn as o,ha as s}from"./index.js";import{t as c}from"./list-card.js";import{t as l}from"./badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=s(a),r;e[0]===t.RouteTables?r=e[1]:(r=t.RouteTables??[],e[0]=t.RouteTables,e[1]=r);let c=r,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(o,{actions:(0,d.jsx)(n,{to:`/ec2/create-route-table`,children:(0,d.jsx)(i,{children:`Create Route Table`})}),title:`Route Tables`}),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 Route Tables found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.RouteTableId)return null;let t=r(e.Tags),n=e.Associations?.some(h)??!1,i=e.Associations?.filter(m).length??0;return(0,d.jsx)(c,{badge:n?(0,d.jsx)(l,{variant:`secondary`,children:`Main`}):null,params:{id:e.RouteTableId},subtitle:`${e.VpcId??``} · ${i} subnet${i===1?``:`s`}`,title:t?`${e.RouteTableId} (${t})`:e.RouteTableId,to:`/ec2/describe-route-tables/$id`},e.RouteTableId)}function m(e){return e.SubnetId}function h(e){return e.Main}export{f as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Da as a,Sn as o,oi as s}from"./index.js";import{t as c}from"./list-card.js";import{t as l}from"./badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=a(s),r;e[0]===t.RouteTables?r=e[1]:(r=t.RouteTables??[],e[0]=t.RouteTables,e[1]=r);let c=r,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(o,{actions:(0,d.jsx)(n,{to:`/ec2/create-route-table`,children:(0,d.jsx)(i,{children:`Create Route Table`})}),title:`Route Tables`}),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 Route Tables found.`})]}),e[3]=c,e[4]=f),f}function p(e){if(!e.RouteTableId)return null;let t=r(e.Tags),n=e.Associations?.some(h)??!1,i=e.Associations?.filter(m).length??0;return(0,d.jsx)(c,{badge:n?(0,d.jsx)(l,{variant:`secondary`,children:`Main`}):null,params:{id:e.RouteTableId},subtitle:`${e.VpcId??``} · ${i} subnet${i===1?``:`s`}`,title:t?`${e.RouteTableId} (${t})`:e.RouteTableId,to:`/ec2/describe-route-tables/$id`},e.RouteTableId)}function m(e){return e.SubnetId}function h(e){return e.Main}export{f as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Xr as i,fn as a,ha as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=o(i),s;e[0]===t.SecurityGroups?s=e[1]:(s=t.SecurityGroups??[],e[0]=t.SecurityGroups,e[1]=s);let u=s,f;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(a,{actions:(0,l.jsx)(n,{to:`/ec2/create-security-group`,children:(0,l.jsx)(r,{children:`Create Security Group`})}),title:`Security Groups`}),e[2]=f):f=e[2];let p;return e[3]===u?p=e[4]:(p=(0,l.jsxs)(l.Fragment,{children:[f,u.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:u.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No security groups found.`})]}),e[3]=u,e[4]=p),p}function d(e){return e.GroupId?(0,l.jsx)(s,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:e.GroupName?`${e.GroupId} (${e.GroupName})`:e.GroupId,to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{u as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,ci as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(5),{data:t}=i(o),s;e[0]===t.SecurityGroups?s=e[1]:(s=t.SecurityGroups??[],e[0]=t.SecurityGroups,e[1]=s);let u=s,f;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,l.jsx)(a,{actions:(0,l.jsx)(n,{to:`/ec2/create-security-group`,children:(0,l.jsx)(r,{children:`Create Security Group`})}),title:`Security Groups`}),e[2]=f):f=e[2];let p;return e[3]===u?p=e[4]:(p=(0,l.jsxs)(l.Fragment,{children:[f,u.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:u.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No security groups found.`})]}),e[3]=u,e[4]=p),p}function d(e){return e.GroupId?(0,l.jsx)(s,{params:{id:e.GroupId},subtitle:e.VpcId??``,title:e.GroupName?`${e.GroupId} (${e.GroupName})`:e.GroupId,to:`/ec2/describe-security-groups/$id`},e.GroupId):null}export{u as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Qr as i,fn as a,ha as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=o(i),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)(a,{actions:(0,u.jsx)(n,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(r,{children:`Create Snapshot`})}),title:`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)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.SnapshotId},subtitle:`${e.VolumeSize} GiB \u2022 ${e.VolumeId}`,title:e.SnapshotId,to:`/ec2/describe-snapshots/$id`},e.SnapshotId):null}export{d as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,ui as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=i(o),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)(a,{actions:(0,u.jsx)(n,{to:`/ec2/create-snapshot`,children:(0,u.jsx)(r,{children:`Create Snapshot`})}),title:`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)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.SnapshotId},subtitle:`${e.VolumeSize} GiB \u2022 ${e.VolumeId}`,title:e.SnapshotId,to:`/ec2/describe-snapshots/$id`},e.SnapshotId):null}export{d as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{ei as a,fn as o,ha as s}from"./index.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=s(a),r;e[0]===t.Subnets?r=e[1]:(r=t.Subnets??[],e[0]=t.Subnets,e[1]=r);let c=r,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(o,{actions:(0,d.jsx)(n,{to:`/ec2/create-subnet`,children:(0,d.jsx)(i,{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=r(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??``} \u2022 ${e.AvailabilityZone??``}`,title:t?`${e.SubnetId} (${t})`:e.SubnetId,to:`/ec2/describe-subnets/$id`},e.SubnetId)}export{f as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Da as a,Sn as o,fi as s}from"./index.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=a(s),r;e[0]===t.Subnets?r=e[1]:(r=t.Subnets??[],e[0]=t.Subnets,e[1]=r);let c=r,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(o,{actions:(0,d.jsx)(n,{to:`/ec2/create-subnet`,children:(0,d.jsx)(i,{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=r(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.SubnetId},subtitle:`${e.CidrBlock??``} \u2022 ${e.AvailabilityZone??``}`,title:t?`${e.SubnetId} (${t})`:e.SubnetId,to:`/ec2/describe-subnets/$id`},e.SubnetId)}export{f as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{t as r}from"./link.js";import{t as i}from"./button.js";import{Gn as a,Wn as o,fn as s,ha as c,pa as l}from"./index.js";var u=t(),d=e();function f(){let e=(0,u.c)(6),t=l(),{data:n}=c(o),a;e[0]===n.TargetGroups?a=e[1]:(a=n.TargetGroups??[],e[0]=n.TargetGroups,e[1]=a);let f=a,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(s,{actions:(0,d.jsx)(r,{to:`/ec2/create-target-group`,children:(0,d.jsx)(i,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==t||e[4]!==f?(g=(0,d.jsxs)(d.Fragment,{children:[h,f.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Targets`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`})]})}),(0,d.jsx)(`tbody`,{children:f.map(e=>{if(!e.TargetGroupArn)return null;let n=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(r,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(n)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Port??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.TargetType??``}),(0,d.jsx)(m,{arn:n})]},n)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=t,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(e){let t=(0,u.c)(13),{arn:r}=e,i;t[0]===r?i=t[1]:(i=a(r),t[0]=r,t[1]=i);let{data:o,isLoading:s}=n(i);if(s){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`})]}),t[2]=e):e=t[2],e}let c,l;if(t[3]!==o?.TargetHealthDescriptions){c=o?.TargetHealthDescriptions??[];let e={};for(let t of c){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}l=Object.entries(e).map(h).join(`, `)||`—`,t[3]=o?.TargetHealthDescriptions,t[4]=c,t[5]=l}else c=t[4],l=t[5];let f=l,p;t[6]===c.length?p=t[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:c.length}),t[6]=c.length,t[7]=p);let m;t[8]===f?m=t[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),t[8]=f,t[9]=m);let g;return t[10]!==p||t[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),t[10]=p,t[11]=m,t[12]=g):g=t[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Oa as a,Sn as o,Ta as s,er as c,tr as l}from"./index.js";var u=t(),d=e();function f(){let e=(0,u.c)(6),t=s(),{data:a}=i(c),l;e[0]===a.TargetGroups?l=e[1]:(l=a.TargetGroups??[],e[0]=a.TargetGroups,e[1]=l);let f=l,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(o,{actions:(0,d.jsx)(n,{to:`/ec2/create-target-group`,children:(0,d.jsx)(r,{children:`Create Target Group`})}),title:`Target Groups`}),e[2]=h):h=e[2];let g;return e[3]!==t||e[4]!==f?(g=(0,d.jsxs)(d.Fragment,{children:[h,f.length>0?(0,d.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,d.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,d.jsx)(`thead`,{children:(0,d.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Protocol`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Port`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Target Type`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Targets`}),(0,d.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Health`})]})}),(0,d.jsx)(`tbody`,{children:f.map(e=>{if(!e.TargetGroupArn)return null;let r=e.TargetGroupArn;return(0,d.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(r)}}),children:[(0,d.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,d.jsx)(n,{className:`text-primary hover:underline`,onClick:p,params:{id:encodeURIComponent(r)},to:`/ec2/describe-target-groups/$id`,children:e.TargetGroupName??r})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Protocol??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Port??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.TargetType??``}),(0,d.jsx)(m,{arn:r})]},r)})})]})}):(0,d.jsx)(`p`,{className:`text-muted-foreground`,children:`No target groups found.`})]}),e[3]=t,e[4]=f,e[5]=g):g=e[5],g}function p(e){return e.stopPropagation()}function m(e){let t=(0,u.c)(13),{arn:n}=e,r;t[0]===n?r=t[1]:(r=l(n),t[0]=n,t[1]=r);let{data:i,isLoading:o}=a(r);if(o){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:`…`})]}),t[2]=e):e=t[2],e}let s,c;if(t[3]!==i?.TargetHealthDescriptions){s=i?.TargetHealthDescriptions??[];let e={};for(let t of s){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}c=Object.entries(e).map(h).join(`, `)||`—`,t[3]=i?.TargetHealthDescriptions,t[4]=s,t[5]=c}else s=t[4],c=t[5];let f=c,p;t[6]===s.length?p=t[7]:(p=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:s.length}),t[6]=s.length,t[7]=p);let m;t[8]===f?m=t[9]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:f}),t[8]=f,t[9]=m);let g;return t[10]!==p||t[11]!==m?(g=(0,d.jsxs)(d.Fragment,{children:[p,m]}),t[10]=p,t[11]=m,t[12]=g):g=t[12],g}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{fn as i,ha as a,ni as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=a(o),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)(i,{actions:(0,u.jsx)(n,{to:`/ec2/create-volume`,children:(0,u.jsx)(r,{children:`Create Volume`})}),title:`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)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,mi as o}from"./index.js";import{t as s}from"./list-card.js";import{t as c}from"./state-badge.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=i(o),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)(a,{actions:(0,u.jsx)(n,{to:`/ec2/create-volume`,children:(0,u.jsx)(r,{children:`Create Volume`})}),title:`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)(s,{badge:(0,u.jsx)(c,{state:e.State}),params:{id:e.VolumeId},subtitle:`${e.Size} GiB`,title:e.VolumeId,to:`/ec2/describe-volumes/$id`},e.VolumeId):null}export{d as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{fn as a,ha as o,ii as s}from"./index.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=o(s),r;e[0]===t.Vpcs?r=e[1]:(r=t.Vpcs??[],e[0]=t.Vpcs,e[1]=r);let c=r,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(a,{actions:(0,d.jsx)(n,{to:`/ec2/create-vpc`,children:(0,d.jsx)(i,{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=r(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:t?`${e.VpcId} (${t})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Vt as r}from"./auth.js";import{t as i}from"./button.js";import{Da as a,Sn as o,gi as s}from"./index.js";import{t as c}from"./list-card.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(5),{data:t}=a(s),r;e[0]===t.Vpcs?r=e[1]:(r=t.Vpcs??[],e[0]=t.Vpcs,e[1]=r);let c=r,l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,d.jsx)(o,{actions:(0,d.jsx)(n,{to:`/ec2/create-vpc`,children:(0,d.jsx)(i,{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=r(e.Tags);return(0,d.jsx)(c,{badge:(0,d.jsx)(l,{state:e.State}),params:{id:e.VpcId},subtitle:e.CidrBlock??``,title:t?`${e.VpcId} (${t})`:e.VpcId,to:`/ec2/describe-vpcs/$id`},e.VpcId)}export{f as component};
|
||||
@@ -1 +1 @@
|
||||
import{t as e}from"./compiler-runtime.js";import{n as t}from"./QueryClientProvider.js";import{$n as n,Qn as r,cr as i,er as a,i as o,lr as s,nr as c,or as l,tr as u,ur as d}from"./awsClient.js";import{di as f,li as p,ma as m,ui as h}from"./index.js";var g=class extends f(p,h,`BatchDeleteImage`,r){},_=class extends f(p,h,`CreateRepository`,n){},v=class extends f(p,h,`DeleteLifecyclePolicy`,a){},y=class extends f(p,h,`DeleteRepository`,u){},b=class extends f(p,h,`DeleteRepositoryPolicy`,c){},x=class extends f(p,h,`GetLifecyclePolicyPreview`,l){},S=class extends f(p,h,`PutImageTagMutability`,i){},C=class extends f(p,h,`PutLifecyclePolicy`,s){},w=class extends f(p,h,`SetRepositoryPolicy`,d){},T=e();function E(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),m(r)}async function D(e){let t=new _({repositoryName:e});return await o().send(t)}function O(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),m(r)}async function k(e){let t=new y({repositoryName:e,force:!0});return await o().send(t)}function A(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:j,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`images`]})}},e[0]=n,e[1]=r),m(r)}async function j(e){let t=new g({repositoryName:e.repositoryName,imageIds:e.imageIds});return await o().send(t)}function M(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:N,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`policy`]})}},e[0]=n,e[1]=r),m(r)}async function N(e){let t=new w({repositoryName:e.repositoryName,policyText:e.policyText});return await o().send(t)}function P(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),m(r)}async function F(e){let t=new S({repositoryName:e.repositoryName,imageTagMutability:e.imageTagMutability});return await o().send(t)}function I(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:L,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t,`policy`]})}},e[0]=n,e[1]=r),m(r)}async function L(e){let t=new b({repositoryName:e});return await o().send(t)}function R(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`lifecycle`]})}},e[0]=n,e[1]=r),m(r)}async function z(e){let t=new C({repositoryName:e.repositoryName,lifecyclePolicyText:e.lifecyclePolicyText});return await o().send(t)}function B(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:V,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t,`lifecycle`]})}},e[0]=n,e[1]=r),m(r)}async function V(e){let t=new v({repositoryName:e});return await o().send(t)}function H(){let e=(0,T.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:U},e[0]=t):t=e[0],m(t)}async function U(e){let t=new x({repositoryName:e});return await o().send(t)}export{I as a,R as c,O as i,M as l,E as n,H as o,B as r,P as s,A as t};
|
||||
import{t as e}from"./compiler-runtime.js";import{n as t}from"./QueryClientProvider.js";import{$n as n,Qn as r,cr as i,er as a,i as o,lr as s,nr as c,or as l,tr as u,ur as d}from"./awsClient.js";import{Ci as f,Ea as p,Si as m,xi as h}from"./index.js";var g=class extends f(h,m,`BatchDeleteImage`,r){},_=class extends f(h,m,`CreateRepository`,n){},v=class extends f(h,m,`DeleteLifecyclePolicy`,a){},y=class extends f(h,m,`DeleteRepository`,u){},b=class extends f(h,m,`DeleteRepositoryPolicy`,c){},x=class extends f(h,m,`GetLifecyclePolicyPreview`,l){},S=class extends f(h,m,`PutImageTagMutability`,i){},C=class extends f(h,m,`PutLifecyclePolicy`,s){},w=class extends f(h,m,`SetRepositoryPolicy`,d){},T=e();function E(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:D,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),p(r)}async function D(e){let t=new _({repositoryName:e});return await o().send(t)}function O(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:k,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),p(r)}async function k(e){let t=new y({repositoryName:e,force:!0});return await o().send(t)}function A(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:j,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`images`]})}},e[0]=n,e[1]=r),p(r)}async function j(e){let t=new g({repositoryName:e.repositoryName,imageIds:e.imageIds});return await o().send(t)}function M(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:N,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`policy`]})}},e[0]=n,e[1]=r),p(r)}async function N(e){let t=new w({repositoryName:e.repositoryName,policyText:e.policyText});return await o().send(t)}function P(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:F,onSuccess:()=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`]})}},e[0]=n,e[1]=r),p(r)}async function F(e){let t=new S({repositoryName:e.repositoryName,imageTagMutability:e.imageTagMutability});return await o().send(t)}function I(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:L,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t,`policy`]})}},e[0]=n,e[1]=r),p(r)}async function L(e){let t=new b({repositoryName:e});return await o().send(t)}function R(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:z,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t.repositoryName,`lifecycle`]})}},e[0]=n,e[1]=r),p(r)}async function z(e){let t=new C({repositoryName:e.repositoryName,lifecyclePolicyText:e.lifecyclePolicyText});return await o().send(t)}function B(){let e=(0,T.c)(2),n=t(),r;return e[0]===n?r=e[1]:(r={mutationFn:V,onSuccess:(e,t)=>{n.invalidateQueries({queryKey:[`ecr`,`repositories`,t,`lifecycle`]})}},e[0]=n,e[1]=r),p(r)}async function V(e){let t=new v({repositoryName:e});return await o().send(t)}function H(){let e=(0,T.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={mutationFn:U},e[0]=t):t=e[0],p(t)}async function U(e){let t=new x({repositoryName:e});return await o().send(t)}export{I as a,R as c,O as i,M as l,E as n,H as o,B as r,P as s,A 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
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{f as e,u as t}from"./auth.js";import{Er as n}from"./index.js";var r=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()}),i=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),description:e().optional(),policyDocument:n({label:`Policy document`})}),a=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),policyDocument:n({label:`Policy document`})}),o=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Principal:{Service:`ec2.amazonaws.com`},Action:`sts:AssumeRole`}]},null,2),s=t({roleName:e().min(1,`Role name is required`).max(64,`Role name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`Role name contains invalid characters`),path:e().optional(),description:e().optional(),assumeRolePolicyDocument:n({label:`Trust policy`})}),c=t({instanceProfileName:e().min(1,`Instance profile name is required`).max(128,`Instance profile name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Instance profile name contains invalid characters`),path:e().optional()}),l=t({groupName:e().min(1,`Group name is required`).max(128,`Group name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Group name contains invalid characters`),path:e().optional()});export{s as a,i,l as n,r as o,c as r,a as s,o as t};
|
||||
import{f as e,u as t}from"./auth.js";import{Ir as n}from"./index.js";var r=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()}),i=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),description:e().optional(),policyDocument:n({label:`Policy document`})}),a=t({policyName:e().min(1,`Policy name is required`).max(128,`Policy name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Policy name contains invalid characters`),policyDocument:n({label:`Policy document`})}),o=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Principal:{Service:`ec2.amazonaws.com`},Action:`sts:AssumeRole`}]},null,2),s=t({roleName:e().min(1,`Role name is required`).max(64,`Role name must be 64 characters or less`).regex(/^[\w+=,.@-]+$/,`Role name contains invalid characters`),path:e().optional(),description:e().optional(),assumeRolePolicyDocument:n({label:`Trust policy`})}),c=t({instanceProfileName:e().min(1,`Instance profile name is required`).max(128,`Instance profile name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Instance profile name contains invalid characters`),path:e().optional()}),l=t({groupName:e().min(1,`Group name is required`).max(128,`Group name must be 128 characters or less`).regex(/^[\w+=,.@-]+$/,`Group name contains invalid characters`),path:e().optional()});export{s as a,i,l as n,r as o,c as r,a as s,o as t};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{An as n,Cn as r,Dn as ee,En as i,Gt as te,Hi as a,cn as o,fn as s,in as c,jn as ne,nt as l,on as u,pa as d,wn as f}from"./index.js";import{t as p}from"./form-actions.js";import{t as m}from"./textarea.js";var h=t(),g=e();function _(){let e=(0,h.c)(57),t=d(),_=te(),y;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(y={resolver:ee(l)},e[0]=y):y=e[0];let{handleSubmit:b,register:x,control:S,formState:re}=n(y),{errors:C,isSubmitting:w}=re,T;e[1]===S?T=e[2]:(T={control:S},e[1]=S,e[2]=T);let E=ne(T),D;e[3]===E?D=e[4]:(D=e=>e?E[e]:void 0,e[3]=E,e[4]=D);let O=D,k;e[5]!==_||e[6]!==t?(k=async e=>{await _.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[5]=_,e[6]=t,e[7]=k):k=e[7];let A=k,j,M;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,g.jsx)(i,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,g.jsx)(s,{title:`Import Key Pair`}),e[8]=j,e[9]=M):(j=e[8],M=e[9]);let N;e[10]===_.error?N=e[11]:(N=_.error&&(0,g.jsx)(r,{error:_.error,msg:`Failed to import key pair`}),e[10]=_.error,e[11]=N);let P;e[12]!==b||e[13]!==A?(P=b(A),e[12]=b,e[13]=A,e[14]=P):P=e[14];let F;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,g.jsx)(o,{children:(0,g.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[15]=F):F=e[15];let I=!!C.keyName,L;e[16]===x?L=e[17]:(L=x(`keyName`),e[16]=x,e[17]=L);let R;e[18]!==I||e[19]!==L?(R=(0,g.jsx)(a,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),e[18]=I,e[19]=L,e[20]=R):R=e[20];let z;e[21]===C.keyName?z=e[22]:(z=(0,g.jsx)(u,{errors:[C.keyName]}),e[21]=C.keyName,e[22]=z);let B;e[23]!==R||e[24]!==z?(B=(0,g.jsxs)(c,{children:[F,R,z]}),e[23]=R,e[24]=z,e[25]=B):B=e[25];let V,H;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,g.jsx)(o,{children:(0,g.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,g.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),e[26]=V,e[27]=H):(V=e[26],H=e[27]);let U=!!C.publicKeyMaterial,W;e[28]===x?W=e[29]:(W=x(`publicKeyMaterial`),e[28]=x,e[29]=W);let G;e[30]!==U||e[31]!==W?(G=(0,g.jsx)(m,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),e[30]=U,e[31]=W,e[32]=G):G=e[32];let K;e[33]===C.publicKeyMaterial?K=e[34]:(K=(0,g.jsx)(u,{errors:[C.publicKeyMaterial]}),e[33]=C.publicKeyMaterial,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,g.jsxs)(c,{children:[V,H,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===O?J=e[39]:(J=v(O),e[38]=O,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,g.jsx)(f,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>await t({to:`/ec2/describe-key-pairs`}),e[42]=t,e[43]=X);let Z;e[44]!==_.isPending||e[45]!==w||e[46]!==X?(Z=(0,g.jsx)(p,{isPending:_.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[44]=_.isPending,e[45]=w,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==B||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==P?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),e[48]=B,e[49]=q,e[50]=Y,e[51]=Z,e[52]=P,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==N?($=(0,g.jsxs)(g.Fragment,{children:[j,M,N,Q]}),e[54]=Q,e[55]=N,e[56]=$):$=e[56],$}function v(e){let t=e(`keyName`);return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Bn as n,In as r,Ln as ee,Nn as i,Pn as te,Sn as a,Ta as o,Vn as s,ea as ne,en as re,gn as c,mn as l,ot as u,vn as d}from"./index.js";import{t as f}from"./form-actions.js";import{t as p}from"./textarea.js";var m=t(),h=e();function g(){let e=(0,m.c)(57),t=o(),g=re(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:ee(u)},e[0]=v):v=e[0];let{handleSubmit:y,register:b,control:x,formState:S}=n(v),{errors:C,isSubmitting:w}=S,T;e[1]===x?T=e[2]:(T={control:x},e[1]=x,e[2]=T);let E=s(T),D;e[3]===E?D=e[4]:(D=e=>e?E[e]:void 0,e[3]=E,e[4]=D);let O=D,k;e[5]!==g||e[6]!==t?(k=async e=>{await g.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[5]=g,e[6]=t,e[7]=k):k=e[7];let A=k,j,M;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,h.jsx)(r,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,h.jsx)(a,{title:`Import Key Pair`}),e[8]=j,e[9]=M):(j=e[8],M=e[9]);let N;e[10]===g.error?N=e[11]:(N=g.error&&(0,h.jsx)(i,{error:g.error,msg:`Failed to import key pair`}),e[10]=g.error,e[11]=N);let P;e[12]!==y||e[13]!==A?(P=y(A),e[12]=y,e[13]=A,e[14]=P):P=e[14];let F;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,h.jsx)(d,{children:(0,h.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[15]=F):F=e[15];let I=!!C.keyName,L;e[16]===b?L=e[17]:(L=b(`keyName`),e[16]=b,e[17]=L);let R;e[18]!==I||e[19]!==L?(R=(0,h.jsx)(ne,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),e[18]=I,e[19]=L,e[20]=R):R=e[20];let z;e[21]===C.keyName?z=e[22]:(z=(0,h.jsx)(c,{errors:[C.keyName]}),e[21]=C.keyName,e[22]=z);let B;e[23]!==R||e[24]!==z?(B=(0,h.jsxs)(l,{children:[F,R,z]}),e[23]=R,e[24]=z,e[25]=B):B=e[25];let V,H;e[26]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,h.jsx)(d,{children:(0,h.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,h.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[26]=V,e[27]=H):(V=e[26],H=e[27]);let U=!!C.publicKeyMaterial,W;e[28]===b?W=e[29]:(W=b(`publicKeyMaterial`),e[28]=b,e[29]=W);let G;e[30]!==U||e[31]!==W?(G=(0,h.jsx)(p,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),e[30]=U,e[31]=W,e[32]=G):G=e[32];let K;e[33]===C.publicKeyMaterial?K=e[34]:(K=(0,h.jsx)(c,{errors:[C.publicKeyMaterial]}),e[33]=C.publicKeyMaterial,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,h.jsxs)(l,{children:[V,H,G,K]}),e[35]=G,e[36]=K,e[37]=q):q=e[37];let J;e[38]===O?J=e[39]:(J=_(O),e[38]=O,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,h.jsx)(te,{commands:J}),e[40]=J,e[41]=Y);let X;e[42]===t?X=e[43]:(X=async()=>await t({to:`/ec2/describe-key-pairs`}),e[42]=t,e[43]=X);let Z;e[44]!==g.isPending||e[45]!==w||e[46]!==X?(Z=(0,h.jsx)(f,{isPending:g.isPending,isSubmitting:w,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[44]=g.isPending,e[45]=w,e[46]=X,e[47]=Z):Z=e[47];let Q;e[48]!==B||e[49]!==q||e[50]!==Y||e[51]!==Z||e[52]!==P?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),e[48]=B,e[49]=q,e[50]=Y,e[51]=Z,e[52]=P,e[53]=Q):Q=e[53];let $;return e[54]!==Q||e[55]!==N?($=(0,h.jsxs)(h.Fragment,{children:[j,M,N,Q]}),e[54]=Q,e[55]=N,e[56]=$):$=e[56],$}function _(e){let t=e(`keyName`);return[{label:`Import Key Pair`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 import-key-pair`},{type:`flag`,value:` \\
|
||||
--key-name`},{type:`value`,value:` ${(typeof t==`string`?t:``)||`<KeyName>`}`},{type:`flag`,value:` \\
|
||||
--public-key-material`},{type:`value`,value:` fileb://path/to/key.pub`}]}]}export{_ as component};
|
||||
--public-key-material`},{type:`value`,value:` fileb://path/to/key.pub`}]}]}export{g as component};
|
||||
File diff suppressed because one or more lines are too long
+22
-20
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{n as e,t}from"./compiler-runtime.js";import{Ft as n}from"./auth.js";import{wr as r}from"./index.js";import{t as i}from"./textarea.js";var a=t(),o=e();function s(e){let t=(0,a.c)(22),s,c,l,u,d,f;t[0]===e?(s=t[1],c=t[2],l=t[3],u=t[4],d=t[5],f=t[6]):({value:f,onChange:u,error:c,onBlur:l,className:s,...d}=e,t[0]=e,t[1]=s,t[2]=c,t[3]=l,t[4]=u,t[5]=d,t[6]=f);let p;t[7]!==l||t[8]!==u||t[9]!==f?(p=e=>{let t=r(f);t!==null&&t!==f&&u(t),l?.(e)},t[7]=l,t[8]=u,t[9]=f,t[10]=p):p=t[10];let m=p,h;t[11]===s?h=t[12]:(h=n(`font-mono text-sm`,s),t[11]=s,t[12]=h);let g;t[13]===u?g=t[14]:(g=e=>u(e.target.value),t[13]=u,t[14]=g);let _;return t[15]!==c||t[16]!==m||t[17]!==d||t[18]!==h||t[19]!==g||t[20]!==f?(_=(0,o.jsx)(i,{"aria-invalid":c,className:h,onBlur:m,onChange:g,value:f,...d}),t[15]=c,t[16]=m,t[17]=d,t[18]=h,t[19]=g,t[20]=f,t[21]=_):_=t[21],_}export{s as t};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{Ft as n}from"./auth.js";import{Pr as r}from"./index.js";import{t as i}from"./textarea.js";var a=t(),o=e();function s(e){let t=(0,a.c)(22),s,c,l,u,d,f;t[0]===e?(s=t[1],c=t[2],l=t[3],u=t[4],d=t[5],f=t[6]):({value:f,onChange:u,error:c,onBlur:l,className:s,...d}=e,t[0]=e,t[1]=s,t[2]=c,t[3]=l,t[4]=u,t[5]=d,t[6]=f);let p;t[7]!==l||t[8]!==u||t[9]!==f?(p=e=>{let t=r(f);t!==null&&t!==f&&u(t),l?.(e)},t[7]=l,t[8]=u,t[9]=f,t[10]=p):p=t[10];let m=p,h;t[11]===s?h=t[12]:(h=n(`font-mono text-sm`,s),t[11]=s,t[12]=h);let g;t[13]===u?g=t[14]:(g=e=>u(e.target.value),t[13]=u,t[14]=g);let _;return t[15]!==c||t[16]!==m||t[17]!==d||t[18]!==h||t[19]!==g||t[20]!==f?(_=(0,o.jsx)(i,{"aria-invalid":c,className:h,onBlur:m,onChange:g,value:f,...d}),t[15]=c,t[16]=m,t[17]=d,t[18]=h,t[19]=g,t[20]=f,t[21]=_):_=t[21],_}export{s as t};
|
||||
+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{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{fn as i,ha as a,z as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=a(o),s;if(e[0]!==t.clusters){let a=(t.clusters??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(i,{actions:(0,l.jsx)(n,{to:`/eks/create-cluster`,children:(0,l.jsx)(r,{children:`Create Cluster`})}),title:`Clusters`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,a.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:a.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No EKS clusters found.`})]}),e[0]=t.clusters,e[1]=s}else s=e[1];return s}function d(e){return(0,l.jsx)(s,{params:{clusterName:e},title:e,to:`/eks/list-clusters/$clusterName`},e)}function f(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}var p=u;export{p as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{B as i,Da as a,Sn as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=a(i),s;if(e[0]!==t.clusters){let i=(t.clusters??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(n,{to:`/eks/create-cluster`,children:(0,l.jsx)(r,{children:`Create Cluster`})}),title:`Clusters`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No EKS clusters found.`})]}),e[0]=t.clusters,e[1]=s}else s=e[1];return s}function d(e){return(0,l.jsx)(s,{params:{clusterName:e},title:e,to:`/eks/list-clusters/$clusterName`},e)}function f(e,t){return e.toLowerCase().localeCompare(t.toLowerCase())}var p=u;export{p as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{fn as i,ha as a,lr as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=a(o),s;if(e[0]!==t.Groups){let a=(t.Groups??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(i,{actions:(0,l.jsx)(n,{to:`/iam/create-group`,children:(0,l.jsx)(r,{children:`Create Group`})}),title:`Groups`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,a.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:a.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM groups found.`})]}),e[0]=t.Groups,e[1]=s}else s=e[1];return s}function d(e){return e.GroupName?(0,l.jsx)(s,{params:{groupName:e.GroupName},subtitle:e.Arn??``,title:e.GroupName,to:`/iam/list-groups/$groupName`},e.GroupName):null}function f(e,t){let n=e.GroupName?.toLowerCase()??``,r=t.GroupName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,yr as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=i(o),s;if(e[0]!==t.Groups){let i=(t.Groups??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(a,{actions:(0,l.jsx)(n,{to:`/iam/create-group`,children:(0,l.jsx)(r,{children:`Create Group`})}),title:`Groups`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM groups found.`})]}),e[0]=t.Groups,e[1]=s}else s=e[1];return s}function d(e){return e.GroupName?(0,l.jsx)(s,{params:{groupName:e.GroupName},subtitle:e.Arn??``,title:e.GroupName,to:`/iam/list-groups/$groupName`},e.GroupName):null}function f(e,t){let n=e.GroupName?.toLowerCase()??``,r=t.GroupName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{fn as i,fr as a,ha as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=o(a),s;if(e[0]!==t.InstanceProfiles){let a=(t.InstanceProfiles??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(i,{actions:(0,l.jsx)(n,{to:`/iam/create-instance-profile`,children:(0,l.jsx)(r,{children:`Create Instance Profile`})}),title:`Instance Profiles`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,a.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:a.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No instance profiles found.`})]}),e[0]=t.InstanceProfiles,e[1]=s}else s=e[1];return s}function d(e){return e.InstanceProfileName?(0,l.jsx)(s,{params:{instanceProfileName:e.InstanceProfileName},subtitle:e.Arn??``,title:e.InstanceProfileName,to:`/iam/list-instance-profiles/$instanceProfileName`},e.InstanceProfileName):null}function f(e,t){let n=e.InstanceProfileName?.toLowerCase()??``,r=t.InstanceProfileName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,Sr as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=i(o),s;if(e[0]!==t.InstanceProfiles){let i=(t.InstanceProfiles??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(a,{actions:(0,l.jsx)(n,{to:`/iam/create-instance-profile`,children:(0,l.jsx)(r,{children:`Create Instance Profile`})}),title:`Instance Profiles`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No instance profiles found.`})]}),e[0]=t.InstanceProfiles,e[1]=s}else s=e[1];return s}function d(e){return e.InstanceProfileName?(0,l.jsx)(s,{params:{instanceProfileName:e.InstanceProfileName},subtitle:e.Arn??``,title:e.InstanceProfileName,to:`/iam/list-instance-profiles/$instanceProfileName`},e.InstanceProfileName):null}function f(e,t){let n=e.InstanceProfileName?.toLowerCase()??``,r=t.InstanceProfileName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{fn as i,ha as a,pr as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=a(o),s;if(e[0]!==t.Policies){let a=(t.Policies??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(i,{actions:(0,l.jsx)(n,{to:`/iam/create-policy`,children:(0,l.jsx)(r,{children:`Create Policy`})}),title:`Policies`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,a.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:a.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),e[0]=t.Policies,e[1]=s}else s=e[1];return s}function d(e){return e.Arn?(0,l.jsx)(s,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:e.Arn??``,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function f(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Cr as i,Da as a,Sn as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=a(i),s;if(e[0]!==t.Policies){let i=(t.Policies??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(n,{to:`/iam/create-policy`,children:(0,l.jsx)(r,{children:`Create Policy`})}),title:`Policies`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM policies found.`})]}),e[0]=t.Policies,e[1]=s}else s=e[1];return s}function d(e){return e.Arn?(0,l.jsx)(s,{params:{policyArn:encodeURIComponent(e.Arn)},subtitle:e.Arn??``,title:e.PolicyName??``,to:`/iam/list-policies/$policyArn`},e.Arn):null}function f(e,t){let n=e.PolicyName?.toLowerCase()??``,r=t.PolicyName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{fn as i,ha as a,yr as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=a(o),s;if(e[0]!==t.Roles){let a=(t.Roles??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(i,{actions:(0,l.jsx)(n,{to:`/iam/create-role`,children:(0,l.jsx)(r,{children:`Create Role`})}),title:`Roles`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,a.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:a.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM roles found.`})]}),e[0]=t.Roles,e[1]=s}else s=e[1];return s}function d(e){return e.RoleName?(0,l.jsx)(s,{params:{roleName:e.RoleName},subtitle:e.Arn??``,title:e.RoleName,to:`/iam/list-roles/$roleName`},e.RoleName):null}function f(e,t){let n=e.RoleName?.toLowerCase()??``,r=t.RoleName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Sn as a,kr as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=i(o),s;if(e[0]!==t.Roles){let i=(t.Roles??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(a,{actions:(0,l.jsx)(n,{to:`/iam/create-role`,children:(0,l.jsx)(r,{children:`Create Role`})}),title:`Roles`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM roles found.`})]}),e[0]=t.Roles,e[1]=s}else s=e[1];return s}function d(e){return e.RoleName?(0,l.jsx)(s,{params:{roleName:e.RoleName},subtitle:e.Arn??``,title:e.RoleName,to:`/iam/list-roles/$roleName`},e.RoleName):null}function f(e,t){let n=e.RoleName?.toLowerCase()??``,r=t.RoleName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Cr as i,fn as a,ha as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=o(i),s;if(e[0]!==t.Users){let i=(t.Users??[]).toSorted(f),o;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,l.jsx)(a,{actions:(0,l.jsx)(n,{to:`/iam/create-user`,children:(0,l.jsx)(r,{children:`Create User`})}),title:`Users`}),e[2]=o):o=e[2],s=(0,l.jsxs)(l.Fragment,{children:[o,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),e[0]=t.Users,e[1]=s}else s=e[1];return s}function d(e){return e.UserName?(0,l.jsx)(s,{params:{userName:e.UserName},subtitle:e.UserId??``,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function f(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{t as r}from"./button.js";import{Da as i,Nr as a,Sn as o}from"./index.js";import{t as s}from"./list-card.js";var c=t(),l=e();function u(){let e=(0,c.c)(3),{data:t}=i(a),s;if(e[0]!==t.Users){let i=(t.Users??[]).toSorted(f),a;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,l.jsx)(o,{actions:(0,l.jsx)(n,{to:`/iam/create-user`,children:(0,l.jsx)(r,{children:`Create User`})}),title:`Users`}),e[2]=a):a=e[2],s=(0,l.jsxs)(l.Fragment,{children:[a,i.length>0?(0,l.jsx)(`div`,{className:`space-y-4`,children:i.map(d)}):(0,l.jsx)(`p`,{className:`text-muted-foreground`,children:`No IAM users found.`})]}),e[0]=t.Users,e[1]=s}else s=e[1];return s}function d(e){return e.UserName?(0,l.jsx)(s,{params:{userName:e.UserName},subtitle:e.UserId??``,title:e.UserName,to:`/iam/list-users/$userName`},e.UserName):null}function f(e,t){let n=e.UserName?.toLowerCase()??``,r=t.UserName?.toLowerCase()??``;return n.localeCompare(r)}export{u as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{i,t as a}from"./auth.js";import{t as o}from"./button.js";import{t as s}from"./awsClient.js";import{An as c,Dn as l,Hi as u,ai as d,cn as f,dn as p,gi as m,in as h,ln as g,on as _,sn as v,un as y}from"./index.js";import{a as b,o as x,r as S,t as C}from"./card.js";var w=r(),T=t(n()),E=e();function D(){let{reason:e}=d.useSearch(),[t,n]=(0,T.useState)(null),{register:r,handleSubmit:p,formState:{errors:g,isSubmitting:y}}=c({resolver:l(a)});async function w(e){n(null);try{i(await m(e)),s(),window.location.href=`/`}catch{n(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}}return(0,E.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,E.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col gap-4`,children:[(0,E.jsxs)(C,{children:[(0,E.jsx)(b,{children:(0,E.jsx)(x,{children:`AWS Credentials`})}),(0,E.jsxs)(S,{children:[e===`expired`&&!t&&(0,E.jsx)(`p`,{className:`mb-4 rounded-md bg-muted p-3 text-sm text-muted-foreground`,children:`Your session is no longer valid — please sign in again.`}),t&&(0,E.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:t}),(0,E.jsx)(`form`,{onSubmit:p(w),children:(0,E.jsxs)(v,{children:[(0,E.jsxs)(h,{children:[(0,E.jsx)(f,{children:(0,E.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),(0,E.jsx)(u,{"aria-invalid":!!g.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...r(`accessKeyId`)}),(0,E.jsx)(_,{errors:[g.accessKeyId]})]}),(0,E.jsxs)(h,{children:[(0,E.jsx)(f,{children:(0,E.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),(0,E.jsx)(u,{"aria-invalid":!!g.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...r(`secretAccessKey`)}),(0,E.jsx)(_,{errors:[g.secretAccessKey]})]}),(0,E.jsx)(o,{className:`w-full`,disabled:y,type:`submit`,children:y?`Signing in...`:`Sign In`})]})})]})]}),(0,E.jsx)(O,{})]})})}function O(){let e=(0,w.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-sm font-medium`,children:`Install Local Certificate Authority`}),(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`To avoid browser certificate warnings, download and install the Spinifex CA as a trusted root on your OS.`})]}),n=(0,E.jsx)(`a`,{className:`inline-flex h-8 w-full items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground`,download:`spinifex-ca.pem`,href:`/api/ca.pem`,children:`Download CA Certificate`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,E.jsx)(p,{className:`cursor-pointer text-xs text-muted-foreground underline-offset-4 hover:underline`,children:`Installation instructions`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,E.jsx)(C,{className:`border-muted bg-muted/30`,children:(0,E.jsx)(S,{className:`pt-4 pb-4`,children:(0,E.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,n,(0,E.jsxs)(g,{children:[r,(0,E.jsx)(y,{children:(0,E.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`macOS`}),(0,E.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain spinifex-ca.pem`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`Windows`}),(0,E.jsx)(`p`,{children:`Double-click the file → Install Certificate → Local Machine → Trusted Root Certification Authorities`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`Linux`}),(0,E.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo cp spinifex-ca.pem /usr/local/share/ca-certificates/spinifex-ca.crt && sudo update-ca-certificates`})]})]})})]})]})})}),e[3]=i):i=e[3],i}export{D as component};
|
||||
import{n as e,o as t,r as n,t as r}from"./compiler-runtime.js";import{i,t as a}from"./auth.js";import{t as o}from"./button.js";import{t as s}from"./awsClient.js";import{Bn as c,Ln as l,Oi as u,_i as d,_n as f,bn as p,ea as m,gn as h,mn as g,vn as _,xn as v,yn as y}from"./index.js";import{a as b,o as x,r as S,t as C}from"./card.js";var w=r(),T=t(n()),E=e();function D(){let{reason:e}=d.useSearch(),[t,n]=(0,T.useState)(null),{register:r,handleSubmit:p,formState:{errors:v,isSubmitting:y}}=c({resolver:l(a)});async function w(e){n(null);try{i(await u(e)),s(),window.location.href=`/`}catch{n(`Invalid credentials. Please check your Access Key ID and Secret Access Key.`)}}return(0,E.jsx)(`div`,{className:`flex flex-1 items-center justify-center`,children:(0,E.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col gap-4`,children:[(0,E.jsxs)(C,{children:[(0,E.jsx)(b,{children:(0,E.jsx)(x,{children:`AWS Credentials`})}),(0,E.jsxs)(S,{children:[e===`expired`&&!t&&(0,E.jsx)(`p`,{className:`mb-4 rounded-md bg-muted p-3 text-sm text-muted-foreground`,children:`Your session is no longer valid — please sign in again.`}),t&&(0,E.jsx)(`p`,{className:`mb-4 rounded-md bg-destructive/10 p-3 text-sm text-destructive`,children:t}),(0,E.jsx)(`form`,{onSubmit:p(w),children:(0,E.jsxs)(f,{children:[(0,E.jsxs)(g,{children:[(0,E.jsx)(_,{children:(0,E.jsx)(`label`,{htmlFor:`accessKeyId`,children:`Access Key ID`})}),(0,E.jsx)(m,{"aria-invalid":!!v.accessKeyId,autoComplete:`username`,id:`accessKeyId`,placeholder:`AKIAIOSFODNN7EXAMPLE`,...r(`accessKeyId`)}),(0,E.jsx)(h,{errors:[v.accessKeyId]})]}),(0,E.jsxs)(g,{children:[(0,E.jsx)(_,{children:(0,E.jsx)(`label`,{htmlFor:`secretAccessKey`,children:`Secret Access Key`})}),(0,E.jsx)(m,{"aria-invalid":!!v.secretAccessKey,autoComplete:`current-password`,id:`secretAccessKey`,placeholder:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY`,type:`password`,...r(`secretAccessKey`)}),(0,E.jsx)(h,{errors:[v.secretAccessKey]})]}),(0,E.jsx)(o,{className:`w-full`,disabled:y,type:`submit`,children:y?`Signing in...`:`Sign In`})]})})]})]}),(0,E.jsx)(O,{})]})})}function O(){let e=(0,w.c)(4),t,n;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`text-sm font-medium`,children:`Install Local Certificate Authority`}),(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`To avoid browser certificate warnings, download and install the Spinifex CA as a trusted root on your OS.`})]}),n=(0,E.jsx)(`a`,{className:`inline-flex h-8 w-full items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium hover:bg-accent hover:text-accent-foreground`,download:`spinifex-ca.pem`,href:`/api/ca.pem`,children:`Download CA Certificate`}),e[0]=t,e[1]=n):(t=e[0],n=e[1]);let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,E.jsx)(v,{className:`cursor-pointer text-xs text-muted-foreground underline-offset-4 hover:underline`,children:`Installation instructions`}),e[2]=r):r=e[2];let i;return e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,E.jsx)(C,{className:`border-muted bg-muted/30`,children:(0,E.jsx)(S,{className:`pt-4 pb-4`,children:(0,E.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,n,(0,E.jsxs)(y,{children:[r,(0,E.jsx)(p,{children:(0,E.jsxs)(`div`,{className:`mt-2 flex flex-col gap-2 text-xs text-muted-foreground`,children:[(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`macOS`}),(0,E.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain spinifex-ca.pem`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`Windows`}),(0,E.jsx)(`p`,{children:`Double-click the file → Install Certificate → Local Machine → Trusted Root Certification Authorities`})]}),(0,E.jsxs)(`div`,{children:[(0,E.jsx)(`p`,{className:`font-medium text-foreground`,children:`Linux`}),(0,E.jsx)(`code`,{className:`mt-1 block rounded bg-muted p-2 text-[11px] break-all`,children:`sudo cp spinifex-ca.pem /usr/local/share/ca-certificates/spinifex-ca.crt && sudo update-ca-certificates`})]})]})})]})]})})}),e[3]=i):i=e[3],i}export{D as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Rt as r}from"./auth.js";import{t as i}from"./button.js";import{Or as a,fn as o,ha as s}from"./index.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=s(a),r;e[0]===t.Buckets?r=e[1]:(r=t.Buckets??[],e[0]=t.Buckets,e[1]=r);let c=r,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(o,{actions:(0,u.jsx)(n,{to:`/s3/create-bucket`,children:(0,u.jsx)(i,{children:`Create Bucket`})}),title:`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: ${r(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./link.js";import{Rt as r}from"./auth.js";import{t as i}from"./button.js";import{Da as a,Rr as o,Sn as s}from"./index.js";import{t as c}from"./list-card.js";var l=t(),u=e();function d(){let e=(0,l.c)(5),{data:t}=a(o),r;e[0]===t.Buckets?r=e[1]:(r=t.Buckets??[],e[0]=t.Buckets,e[1]=r);let c=r,d;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,u.jsx)(s,{actions:(0,u.jsx)(n,{to:`/s3/create-bucket`,children:(0,u.jsx)(i,{children:`Create Bucket`})}),title:`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: ${r(e.CreationDate)}`:void 0,title:e.Name,to:`/s3/ls/$bucket`},e.Name):null}export{d as component};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{fa 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};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{wa 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{n as e,t}from"./compiler-runtime.js";import{fa 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};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{wa 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{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{c as r}from"./ecs.js";import{$n as i,An as a,Cn as o,Dn as s,En as c,Hi as l,On as u,Qn as d,Xr as f,_n as p,cn as m,ei as h,fn as g,gn as _,ha as v,hn as y,in as b,on as x,pa as S,qn as C,vn as w,yn as T}from"./index.js";import{t as E}from"./form-actions.js";import{i as D}from"./ecs2.js";var O=t(),k=e();function A(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function j({cluster:e}){let t=S(),C=r(),{data:O}=v(i),{data:j}=v(h),{data:M}=v(f),N=j.Subnets??[],P=M.SecurityGroups??[],{control:F,handleSubmit:I,register:L,watch:R,setValue:z,getValues:B,formState:{errors:V,isSubmitting:H}}=a({resolver:s(D),defaultValues:{cluster:e,taskDefinition:``,count:1,subnets:[],securityGroups:[],assignPublicIp:!1}}),{data:U}=n(d(R(`taskDefinition`))),W=U?.networkMode===`awsvpc`,G=R(`subnets`),K=R(`securityGroups`),q=(e,t)=>{let n=B(e);z(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})};function J(){t({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:e}})}function Y(e){C.mutate({cluster:e.cluster,taskDefinition:e.taskDefinition,count:e.count,awsvpc:W,subnets:e.subnets,securityGroups:e.securityGroups,assignPublicIp:e.assignPublicIp},{onSuccess:J})}let X=W&&G.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(c,{params:{clusterName:e},to:`/ecs/list-clusters/$clusterName`,children:e}),(0,k.jsx)(g,{subtitle:`Cluster: ${e}`,title:`Run Task`}),C.isError&&(0,k.jsx)(o,{error:C.error instanceof Error?C.error:void 0,msg:`Failed to run task.`}),(0,k.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:I(Y),children:[(0,k.jsxs)(b,{children:[(0,k.jsx)(m,{children:(0,k.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),(0,k.jsx)(u,{control:F,name:`taskDefinition`,render:({field:e})=>(0,k.jsxs)(y,{onValueChange:e.onChange,value:e.value,children:[(0,k.jsx)(w,{className:`w-full`,id:`taskDefinition`,children:(0,k.jsx)(T,{placeholder:`Select a task definition`})}),(0,k.jsx)(_,{children:O.map(e=>{let t=A(e);return(0,k.jsx)(p,{value:t,children:t},e)})})]})}),(0,k.jsx)(x,{errors:[V.taskDefinition]})]}),(0,k.jsxs)(b,{children:[(0,k.jsx)(m,{children:(0,k.jsx)(`label`,{htmlFor:`count`,children:`Count`})}),(0,k.jsx)(l,{id:`count`,type:`number`,...L(`count`,{valueAsNumber:!0})}),(0,k.jsx)(x,{errors:[V.count]})]}),W&&(0,k.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,k.jsx)(`div`,{className:`mt-2 space-y-1`,children:N.map(e=>(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{checked:G.includes(e.SubnetId??``),onChange:()=>q(`subnets`,e.SubnetId??``),type:`checkbox`}),(0,k.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,k.jsx)(`div`,{className:`mt-2 space-y-1`,children:P.map(e=>(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{checked:K.includes(e.GroupId??``),onChange:()=>q(`securityGroups`,e.GroupId??``),type:`checkbox`}),(0,k.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,k.jsx)(`input`,{type:`checkbox`,...L(`assignPublicIp`)}),(0,k.jsx)(`span`,{children:`Assign public IP`})]})]}),(0,k.jsx)(E,{isPending:C.isPending||X,isSubmitting:H,onCancel:J,pendingLabel:`Running…`,submitLabel:`Run Task`})]})]})}function M(){let e=(0,O.c)(2),{cluster:t}=C.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,k.jsx)(j,{cluster:t}),e[0]=t,e[1]=n),n}export{M as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{c as n}from"./ecs.js";import{Bn as r,Da as i,Dn as a,En as o,In as s,Ln as c,Nn as l,Oa as u,On as d,Rn as f,Sn as p,Ta as m,Tn as h,ci as g,cr as _,ea as v,fi as y,gn as b,kn as x,lr as S,mn as C,rr as w,vn as T}from"./index.js";import{t as E}from"./form-actions.js";import{i as D}from"./ecs2.js";var O=t(),k=e();function A(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function j({cluster:e}){let t=m(),w=n(),{data:O}=i(S),{data:j}=i(y),{data:M}=i(g),N=j.Subnets??[],P=M.SecurityGroups??[],{control:F,handleSubmit:I,register:L,watch:R,setValue:z,getValues:B,formState:{errors:V,isSubmitting:H}}=r({resolver:c(D),defaultValues:{cluster:e,taskDefinition:``,count:1,subnets:[],securityGroups:[],assignPublicIp:!1}}),{data:U}=u(_(R(`taskDefinition`))),W=U?.networkMode===`awsvpc`,G=R(`subnets`),K=R(`securityGroups`),q=(e,t)=>{let n=B(e);z(e,n.includes(t)?n.filter(e=>e!==t):[...n,t],{shouldValidate:!0})};function J(){t({to:`/ecs/list-clusters/$clusterName`,params:{clusterName:e}})}function Y(e){w.mutate({cluster:e.cluster,taskDefinition:e.taskDefinition,count:e.count,awsvpc:W,subnets:e.subnets,securityGroups:e.securityGroups,assignPublicIp:e.assignPublicIp},{onSuccess:J})}let X=W&&G.length===0;return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(s,{params:{clusterName:e},to:`/ecs/list-clusters/$clusterName`,children:e}),(0,k.jsx)(p,{subtitle:`Cluster: ${e}`,title:`Run Task`}),w.isError&&(0,k.jsx)(l,{error:w.error instanceof Error?w.error:void 0,msg:`Failed to run task.`}),(0,k.jsxs)(`form`,{className:`max-w-2xl space-y-6`,onSubmit:I(Y),children:[(0,k.jsxs)(C,{children:[(0,k.jsx)(T,{children:(0,k.jsx)(`label`,{htmlFor:`taskDefinition`,children:`Task definition`})}),(0,k.jsx)(f,{control:F,name:`taskDefinition`,render:({field:e})=>(0,k.jsxs)(h,{onValueChange:e.onChange,value:e.value,children:[(0,k.jsx)(d,{className:`w-full`,id:`taskDefinition`,children:(0,k.jsx)(x,{placeholder:`Select a task definition`})}),(0,k.jsx)(o,{children:O.map(e=>{let t=A(e);return(0,k.jsx)(a,{value:t,children:t},e)})})]})}),(0,k.jsx)(b,{errors:[V.taskDefinition]})]}),(0,k.jsxs)(C,{children:[(0,k.jsx)(T,{children:(0,k.jsx)(`label`,{htmlFor:`count`,children:`Count`})}),(0,k.jsx)(v,{id:`count`,type:`number`,...L(`count`,{valueAsNumber:!0})}),(0,k.jsx)(b,{errors:[V.count]})]}),W&&(0,k.jsxs)(`div`,{className:`space-y-4 rounded-lg border bg-card p-4`,children:[(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This task definition uses awsvpc networking. Select at least one subnet.`}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium`,children:`Subnets`}),(0,k.jsx)(`div`,{className:`mt-2 space-y-1`,children:N.map(e=>(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{checked:G.includes(e.SubnetId??``),onChange:()=>q(`subnets`,e.SubnetId??``),type:`checkbox`}),(0,k.jsxs)(`span`,{className:`font-mono`,children:[e.SubnetId,` (`,e.CidrBlock,`)`]})]},e.SubnetId))})]}),(0,k.jsxs)(`div`,{children:[(0,k.jsx)(`span`,{className:`text-sm font-medium`,children:`Security groups`}),(0,k.jsx)(`div`,{className:`mt-2 space-y-1`,children:P.map(e=>(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,k.jsx)(`input`,{checked:K.includes(e.GroupId??``),onChange:()=>q(`securityGroups`,e.GroupId??``),type:`checkbox`}),(0,k.jsxs)(`span`,{className:`font-mono`,children:[e.GroupId,` (`,e.GroupName,`)`]})]},e.GroupId))})]}),(0,k.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,k.jsx)(`input`,{type:`checkbox`,...L(`assignPublicIp`)}),(0,k.jsx)(`span`,{children:`Assign public IP`})]})]}),(0,k.jsx)(E,{isPending:w.isPending||X,isSubmitting:H,onCancel:J,pendingLabel:`Running…`,submitLabel:`Run Task`})]})]})}function M(){let e=(0,O.c)(2),{cluster:t}=w.useSearch(),n;return e[0]===t?n=e[1]:(n=(0,k.jsx)(j,{cluster:t}),e[0]=t,e[1]=n),n}export{M as component};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user