mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
chore: enable no-confusing-void-expression
This commit is contained in:
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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{$t as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{O as u,n as d,p as f}from"./iam.js";import{C as p,s as m}from"./iam2.js";import{t as h}from"./_groupName.js";import{t as g}from"./error-banner.js";import{t as _}from"./page-heading.js";import{t as v}from"./delete-confirmation-dialog.js";import{n as y,t as b}from"./detail-row.js";import{n as x,t as S}from"./inline-policies-panel.js";var C=e(n()),w=t();function T(){let{groupName:e}=h.useParams(),t=a(),{data:n}=r(m(e)),{data:T}=r(p),E=f(),D=d(),O=u(),[k,A]=(0,C.useState)(!1),[j,M]=(0,C.useState)(!1),[N,P]=(0,C.useState)(null),F=n.Group,I=n.Users??[],L=T.Users??[],R=new Set(I.map(e=>e.UserName)),z=L.filter(e=>e.UserName&&!R.has(e.UserName)),B=async()=>{try{await E.mutateAsync(e),t({to:`/iam/list-groups`})}finally{A(!1)}},V=async t=>{await D.mutateAsync({groupName:e,userName:t}),M(!1)},H=async t=>{P(t);try{await O.mutateAsync({groupName:e,userName:t})}finally{P(null)}};return F?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s,{to:`/iam/list-groups`,children:`Back to groups`}),E.error&&(0,w.jsx)(g,{error:E.error,msg:`Failed to delete group`}),D.error&&(0,w.jsx)(g,{error:D.error,msg:`Failed to add user`}),O.error&&(0,w.jsx)(g,{error:O.error,msg:`Failed to remove user`}),(0,w.jsxs)(`div`,{className:`space-y-6`,children:[(0,w.jsx)(_,{actions:(0,w.jsxs)(l,{onClick:()=>A(!0),size:`sm`,variant:`destructive`,children:[(0,w.jsx)(c,{className:`size-4`}),`Delete`]}),subtitle:`Group Details`,title:F.GroupName??``}),(0,w.jsxs)(y,{children:[(0,w.jsx)(y.Header,{children:`Group Information`}),(0,w.jsxs)(y.Content,{children:[(0,w.jsx)(b,{label:`Group Name`,value:F.GroupName}),(0,w.jsx)(b,{label:`Group ID`,value:F.GroupId}),(0,w.jsx)(b,{label:`ARN`,value:F.Arn}),(0,w.jsx)(b,{label:`Path`,value:F.Path}),(0,w.jsx)(b,{label:`Created`,value:o(F.CreateDate)})]})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(y.Header,{children:(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsx)(`span`,{children:`Members`}),(0,w.jsx)(l,{onClick:()=>M(!j),size:`sm`,children:`Add User`})]})}),(0,w.jsxs)(y.Content,{children:[j&&z.length>0&&(0,w.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,w.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a user to add:`}),(0,w.jsx)(`div`,{className:`space-y-1`,children:z.map(e=>(0,w.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:D.isPending,onClick:()=>{e.UserName&&V(e.UserName)},type:`button`,children:[(0,w.jsx)(`span`,{children:e.UserName}),(0,w.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.UserName))})]}),j&&z.length===0&&(0,w.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No users available to add.`}),I.length>0?(0,w.jsx)(`div`,{className:`col-span-2 space-y-3`,children:I.map(e=>(0,w.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,w.jsx)(i,{className:`text-sm font-medium hover:underline`,params:{userName:e.UserName??``},to:`/iam/list-users/$userName`,children:e.UserName}),(0,w.jsx)(l,{disabled:N===e.UserName,onClick:()=>{e.UserName&&H(e.UserName)},size:`sm`,variant:`outline`,children:`Remove`})]},e.UserName))}):(0,w.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No members.`})]})]}),(0,w.jsx)(x,{kind:`group`,name:e}),(0,w.jsx)(S,{kind:`group`,name:e})]}),(0,w.jsx)(v,{description:`Are you sure you want to delete the group "${e}"? This action cannot be undone. You must remove all members and detach all policies first.`,isPending:E.isPending,onConfirm:B,onOpenChange:A,open:k,title:`Delete Group`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s,{to:`/iam/list-groups`,children:`Back to groups`}),(0,w.jsx)(`p`,{className:`text-muted-foreground`,children:`Group not found.`})]})}export{T as component};
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{$t as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{O as u,n as d,p as f}from"./iam.js";import{C as p,s as m}from"./iam2.js";import{t as h}from"./_groupName.js";import{t as g}from"./error-banner.js";import{t as _}from"./page-heading.js";import{t as v}from"./delete-confirmation-dialog.js";import{n as y,t as b}from"./detail-row.js";import{n as x,t as S}from"./inline-policies-panel.js";var C=e(n()),w=t();function T(){let{groupName:e}=h.useParams(),t=a(),{data:n}=r(m(e)),{data:T}=r(p),E=f(),D=d(),O=u(),[k,A]=(0,C.useState)(!1),[j,M]=(0,C.useState)(!1),[N,P]=(0,C.useState)(null),F=n.Group,I=n.Users??[],L=T.Users??[],R=new Set(I.map(e=>e.UserName)),z=L.filter(e=>e.UserName&&!R.has(e.UserName)),B=async()=>{try{await E.mutateAsync(e),t({to:`/iam/list-groups`})}finally{A(!1)}},V=async t=>{await D.mutateAsync({groupName:e,userName:t}),M(!1)},H=async t=>{P(t);try{await O.mutateAsync({groupName:e,userName:t})}finally{P(null)}};return F?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s,{to:`/iam/list-groups`,children:`Back to groups`}),E.error&&(0,w.jsx)(g,{error:E.error,msg:`Failed to delete group`}),D.error&&(0,w.jsx)(g,{error:D.error,msg:`Failed to add user`}),O.error&&(0,w.jsx)(g,{error:O.error,msg:`Failed to remove user`}),(0,w.jsxs)(`div`,{className:`space-y-6`,children:[(0,w.jsx)(_,{actions:(0,w.jsxs)(l,{onClick:()=>{A(!0)},size:`sm`,variant:`destructive`,children:[(0,w.jsx)(c,{className:`size-4`}),`Delete`]}),subtitle:`Group Details`,title:F.GroupName??``}),(0,w.jsxs)(y,{children:[(0,w.jsx)(y.Header,{children:`Group Information`}),(0,w.jsxs)(y.Content,{children:[(0,w.jsx)(b,{label:`Group Name`,value:F.GroupName}),(0,w.jsx)(b,{label:`Group ID`,value:F.GroupId}),(0,w.jsx)(b,{label:`ARN`,value:F.Arn}),(0,w.jsx)(b,{label:`Path`,value:F.Path}),(0,w.jsx)(b,{label:`Created`,value:o(F.CreateDate)})]})]}),(0,w.jsxs)(y,{children:[(0,w.jsx)(y.Header,{children:(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsx)(`span`,{children:`Members`}),(0,w.jsx)(l,{onClick:()=>{M(!j)},size:`sm`,children:`Add User`})]})}),(0,w.jsxs)(y.Content,{children:[j&&z.length>0&&(0,w.jsxs)(`div`,{className:`col-span-2 space-y-2 rounded-md border p-3`,children:[(0,w.jsx)(`p`,{className:`text-sm font-medium`,children:`Select a user to add:`}),(0,w.jsx)(`div`,{className:`space-y-1`,children:z.map(e=>(0,w.jsxs)(`button`,{className:`flex w-full items-center justify-between rounded-md p-2 text-left text-sm hover:bg-accent`,disabled:D.isPending,onClick:()=>{e.UserName&&V(e.UserName)},type:`button`,children:[(0,w.jsx)(`span`,{children:e.UserName}),(0,w.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.UserName))})]}),j&&z.length===0&&(0,w.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No users available to add.`}),I.length>0?(0,w.jsx)(`div`,{className:`col-span-2 space-y-3`,children:I.map(e=>(0,w.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border p-3`,children:[(0,w.jsx)(i,{className:`text-sm font-medium hover:underline`,params:{userName:e.UserName??``},to:`/iam/list-users/$userName`,children:e.UserName}),(0,w.jsx)(l,{disabled:N===e.UserName,onClick:()=>{e.UserName&&H(e.UserName)},size:`sm`,variant:`outline`,children:`Remove`})]},e.UserName))}):(0,w.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`No members.`})]})]}),(0,w.jsx)(x,{kind:`group`,name:e}),(0,w.jsx)(S,{kind:`group`,name:e})]}),(0,w.jsx)(v,{description:`Are you sure you want to delete the group "${e}"? This action cannot be undone. You must remove all members and detach all policies first.`,isPending:E.isPending,onConfirm:B,onOpenChange:A,open:k,title:`Delete Group`})]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s,{to:`/iam/list-groups`,children:`Back to groups`}),(0,w.jsx)(`p`,{className:`text-muted-foreground`,children:`Group not found.`})]})}export{T as component};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./useNavigate.js";import{nn as a}from"./cluster-config.js";import{t as o}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{l as m,t as h}from"./ec2.js";import{$ as g,U as _,r as v}from"./ec22.js";import{t as y}from"./_id3.js";import{t as b}from"./error-banner.js";import{t as x}from"./page-heading.js";import{t as S}from"./delete-confirmation-dialog.js";import{n as C,t as w}from"./detail-row.js";var T=e(n()),E=t();function D(){let{id:e}=y.useParams(),t=i(),{data:n}=r(h(e)),{data:D}=r(m),O=v(),k=_(),A=g(),[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)(o,{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=a(F.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(o,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(b,{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)(x,{actions:(0,E.jsxs)(p,{disabled:B||A.isPending,onClick:()=>M(!0),size:`sm`,variant:`destructive`,children:[(0,E.jsx)(f,{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)(p,{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)(d,{onValueChange:e=>P(e??``),value:N,children:[(0,E.jsx)(u,{className:`w-full`,children:(0,E.jsx)(s,{placeholder:`Select an instance`})}),(0,E.jsx)(l,{children:I.map(e=>{let t=a(e.Tags);return(0,E.jsx)(c,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(p,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./useNavigate.js";import{nn as a}from"./cluster-config.js";import{t as o}from"./back-link.js";import{c as s,i as c,n as l,s as u,t as d}from"./select.js";import{t as f}from"./trash-2.js";import{t as p}from"./button.js";import{l as m,t as h}from"./ec2.js";import{$ as g,U as _,r as v}from"./ec22.js";import{t as y}from"./_id3.js";import{t as b}from"./error-banner.js";import{t as x}from"./page-heading.js";import{t as S}from"./delete-confirmation-dialog.js";import{n as C,t as w}from"./detail-row.js";var T=e(n()),E=t();function D(){let{id:e}=y.useParams(),t=i(),{data:n}=r(h(e)),{data:D}=r(m),O=v(),k=_(),A=g(),[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)(o,{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=a(F.Tags);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(o,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),(A.error??O.error??k.error)&&(0,E.jsx)(b,{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)(x,{actions:(0,E.jsxs)(p,{disabled:B||A.isPending,onClick:()=>{M(!0)},size:`sm`,variant:`destructive`,children:[(0,E.jsx)(f,{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)(p,{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)(d,{onValueChange:e=>{P(e??``)},value:N,children:[(0,E.jsx)(u,{className:`w-full`,children:(0,E.jsx)(s,{placeholder:`Select an instance`})}),(0,E.jsx)(l,{children:I.map(e=>{let t=a(e.Tags);return(0,E.jsx)(c,{value:e.InstanceId??``,children:t?`${e.InstanceId} (${t})`:e.InstanceId},e.InstanceId)})})]})}),(0,E.jsx)(p,{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};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{t as a}from"./useMutation.js";import{t as o}from"./useSuspenseQuery.js";import{t as s}from"./useNavigate.js";import{a as c}from"./cluster-config.js";import{t as l}from"./back-link.js";import{t as u}from"./circle-arrow-up.js";import{t as d}from"./trash-2.js";import{t as f}from"./button.js";import{n as p}from"./admin-context.js";import{n as m}from"./signed-fetch.js";import{a as h}from"./ec2.js";import{B as g}from"./ec22.js";import{t as _}from"./_id4.js";import{t as v}from"./error-banner.js";import{t as y}from"./page-heading.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{i as A}from"./system-managed.js";import{t as j}from"./ami-details.js";var M=e(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),a(n)}async function F(e){let t=c();if(!t)throw Error(`Not authenticated`);return await m({action:`PromoteImage`,credentials:t,params:{ImageId:e}})}var I=t(),L=`000000000000`;function R(){let{id:e}=_.useParams(),t=s(),{data:n}=o(h(e)),r=n?.Images?.[0],{isAdmin:i}=p(),a=g(),c=P(),[m,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)(l,{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 c.mutateAsync(e),R(!1)}catch{}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(l,{to:`/ec2/describe-images`,children:`Back to images`}),a.error&&(0,I.jsx)(v,{error:a.error,msg:`Failed to deregister image`}),c.error&&(0,I.jsx)(v,{error:c.error,msg:`Failed to promote image`}),(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(y,{actions:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&!z&&(0,I.jsxs)(f,{onClick:()=>R(!0),size:`sm`,variant:`outline`,children:[(0,I.jsx)(u,{className:`size-4`}),`Promote to System`]}),(0,I.jsxs)(f,{onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,I.jsx)(d,{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:m,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:c.isPending,onClick:V,children:c.isPending?`Promoting…`:`Promote`})]})]})})]})}export{R as component};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{t as a}from"./useMutation.js";import{t as o}from"./useSuspenseQuery.js";import{t as s}from"./useNavigate.js";import{a as c}from"./cluster-config.js";import{t as l}from"./back-link.js";import{t as u}from"./circle-arrow-up.js";import{t as d}from"./trash-2.js";import{t as f}from"./button.js";import{n as p}from"./admin-context.js";import{n as m}from"./signed-fetch.js";import{a as h}from"./ec2.js";import{B as g}from"./ec22.js";import{t as _}from"./_id4.js";import{t as v}from"./error-banner.js";import{t as y}from"./page-heading.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{i as A}from"./system-managed.js";import{t as j}from"./ami-details.js";var M=e(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),a(n)}async function F(e){let t=c();if(!t)throw Error(`Not authenticated`);return await m({action:`PromoteImage`,credentials:t,params:{ImageId:e}})}var I=t(),L=`000000000000`;function R(){let{id:e}=_.useParams(),t=s(),{data:n}=o(h(e)),r=n?.Images?.[0],{isAdmin:i}=p(),a=g(),c=P(),[m,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)(l,{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 c.mutateAsync(e),R(!1)}catch{}}return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(l,{to:`/ec2/describe-images`,children:`Back to images`}),a.error&&(0,I.jsx)(v,{error:a.error,msg:`Failed to deregister image`}),c.error&&(0,I.jsx)(v,{error:c.error,msg:`Failed to promote image`}),(0,I.jsxs)(`div`,{className:`space-y-6`,children:[(0,I.jsx)(y,{actions:(0,I.jsxs)(`div`,{className:`flex items-center gap-2`,children:[i&&!z&&(0,I.jsxs)(f,{onClick:()=>{R(!0)},size:`sm`,variant:`outline`,children:[(0,I.jsx)(u,{className:`size-4`}),`Promote to System`]}),(0,I.jsxs)(f,{onClick:()=>{N(!0)},size:`sm`,variant:`destructive`,children:[(0,I.jsx)(d,{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:m,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:c.isPending,onClick:V,children:c.isPending?`Promoting…`:`Promote`})]})]})})]})}export{R as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{nn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{c,i as l,n as u,s as d,t as f}from"./select.js";import{t as p}from"./trash-2.js";import{t as m}from"./button.js";import{M as h,u as g}from"./ec2.js";import{D as _,V as v,o as y}from"./ec22.js";import{t as b}from"./_id6.js";import{t as x}from"./error-banner.js";import{t as S}from"./page-heading.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";var E=e(n()),D=t();function O(){let{id:e}=b.useParams(),t=a(),{data:n}=r(g(e)),{data:O}=r(h),k=y(),A=v(),j=_(),[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)(s,{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=o(I.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(s,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(x,{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)(S,{actions:(0,D.jsxs)(m,{disabled:H||j.isPending,onClick:()=>N(!0),size:`sm`,variant:`destructive`,children:[(0,D.jsx)(p,{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)(i,{className:`text-primary hover:underline`,params:{id:V.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:V.VpcId}),(0,D.jsx)(m,{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)(f,{onValueChange:e=>F(e??``),value:P,children:[(0,D.jsx)(d,{className:`w-full`,children:(0,D.jsx)(c,{placeholder:`Select a VPC`})}),(0,D.jsx)(u,{children:L.map(e=>{let t=o(e.Tags);return(0,D.jsx)(l,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(m,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{nn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{c,i as l,n as u,s as d,t as f}from"./select.js";import{t as p}from"./trash-2.js";import{t as m}from"./button.js";import{M as h,u as g}from"./ec2.js";import{D as _,V as v,o as y}from"./ec22.js";import{t as b}from"./_id6.js";import{t as x}from"./error-banner.js";import{t as S}from"./page-heading.js";import{t as C}from"./delete-confirmation-dialog.js";import{n as w,t as T}from"./detail-row.js";var E=e(n()),D=t();function O(){let{id:e}=b.useParams(),t=a(),{data:n}=r(g(e)),{data:O}=r(h),k=y(),A=v(),j=_(),[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)(s,{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=o(I.Tags);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(s,{to:`/ec2/describe-internet-gateways`,children:`Back to Internet Gateways`}),(j.error??k.error??A.error)&&(0,D.jsx)(x,{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)(S,{actions:(0,D.jsxs)(m,{disabled:H||j.isPending,onClick:()=>{N(!0)},size:`sm`,variant:`destructive`,children:[(0,D.jsx)(p,{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)(i,{className:`text-primary hover:underline`,params:{id:V.VpcId??``},to:`/ec2/describe-vpcs/$id`,children:V.VpcId}),(0,D.jsx)(m,{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)(f,{onValueChange:e=>{F(e??``)},value:P,children:[(0,D.jsx)(d,{className:`w-full`,children:(0,D.jsx)(c,{placeholder:`Select a VPC`})}),(0,D.jsx)(u,{children:L.map(e=>{let t=o(e.Tags);return(0,D.jsx)(l,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)})})]})}),(0,D.jsx)(m,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./useNavigate.js";import{$t as a}from"./cluster-config.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{f as l}from"./ec2.js";import{O as u}from"./ec22.js";import{t as d}from"./_id7.js";import{t as f}from"./error-banner.js";import{t as p}from"./page-heading.js";import{t as m}from"./delete-confirmation-dialog.js";import{n as h,t as g}from"./detail-row.js";var _=e(n()),v=t();function y(){let{id:e}=d.useParams(),t=i(),{data:n}=r(l(e)),y=n.KeyPairs?.[0],b=u(),[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)(o,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=a(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(f,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(p,{actions:(0,v.jsxs)(c,{onClick:()=>S(!0),size:`sm`,variant:`destructive`,children:[(0,v.jsx)(s,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./useNavigate.js";import{$t as a}from"./cluster-config.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{f as l}from"./ec2.js";import{O as u}from"./ec22.js";import{t as d}from"./_id7.js";import{t as f}from"./error-banner.js";import{t as p}from"./page-heading.js";import{t as m}from"./delete-confirmation-dialog.js";import{n as h,t as g}from"./detail-row.js";var _=e(n()),v=t();function y(){let{id:e}=d.useParams(),t=i(),{data:n}=r(l(e)),y=n.KeyPairs?.[0],b=u(),[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)(o,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),(0,v.jsx)(`p`,{className:`text-muted-foreground`,children:`Key pair not found.`})]});let w=a(y.CreateTime);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(o,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),b.error&&(0,v.jsx)(f,{error:b.error,msg:`Failed to delete key pair`}),(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(p,{actions:(0,v.jsxs)(c,{onClick:()=>{S(!0)},size:`sm`,variant:`destructive`,children:[(0,v.jsx)(s,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{nn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{g as u}from"./ec2.js";import{j as d}from"./ec22.js";import{t as f}from"./_id10.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.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=e(n()),b=t();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),x=d(),[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)(s,{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=o(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(p,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{disabled:x.isPending,onClick:()=>C(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(c,{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)(i,{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)(i,{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)(i,{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};
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{nn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{g as u}from"./ec2.js";import{j as d}from"./ec22.js";import{t as f}from"./_id10.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.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=e(n()),b=t();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),x=d(),[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)(s,{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=o(w.Tags),D=w.NatGatewayAddresses?.[0];return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-nat-gateways`,children:`Back to NAT Gateways`}),x.error&&(0,b.jsx)(p,{error:x.error,msg:`Failed to delete NAT Gateway`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{disabled:x.isPending,onClick:()=>{C(!0)},size:`sm`,variant:`destructive`,children:[(0,b.jsx)(c,{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)(i,{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)(i,{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)(i,{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};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{l,v as u}from"./ec2.js";import{M as d}from"./ec22.js";import{t as f}from"./_id11.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.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=e(n()),b=t();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),{data:x}=r(l),S=d(),[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)(o,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(p,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{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)(i,{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)(o,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{l,v as u}from"./ec2.js";import{M as d}from"./ec22.js";import{t as f}from"./_id11.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.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=e(n()),b=t();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),{data:x}=r(l),S=d(),[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)(o,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),S.error&&(0,b.jsx)(p,{error:S.error,msg:`Failed to delete placement group`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(c,{onClick:()=>{w(!0)},size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{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)(i,{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)(o,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Placement group not found.`})]})}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{nn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{D as u}from"./ec2.js";import{L as d}from"./ec22.js";import{t as f}from"./_id13.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.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=e(n()),b=t();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),x=n.Subnets?.[0],S=d(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(e),t({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=o(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(p,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{onClick:()=>w(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(c,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:x.State})]}),subtitle:`Subnet Details`,title:E?`${x.SubnetId} (${E})`:x.SubnetId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Subnet Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Subnet ID`,value:x.SubnetId}),(0,b.jsx)(_,{label:`VPC ID`,value:x.VpcId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:x.VpcId},to:`/ec2/describe-vpcs/$id`,children:x.VpcId}):`—`}),(0,b.jsx)(_,{label:`State`,value:x.State}),(0,b.jsx)(_,{label:`CIDR Block`,value:x.CidrBlock}),(0,b.jsx)(_,{label:`Availability Zone`,value:x.AvailabilityZone}),(0,b.jsx)(_,{label:`Available IP Count`,value:x.AvailableIpAddressCount?.toString()}),(0,b.jsx)(_,{label:`Map Public IP on Launch`,value:x.MapPublicIpOnLaunch?`Yes`:`No`}),(0,b.jsx)(_,{label:`Default for AZ`,value:x.DefaultForAz?`Yes`:`No`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the subnet "${x.SubnetId}"? This action cannot be undone.`,isPending:S.isPending,onConfirm:T,onOpenChange:w,open:C,title:`Delete Subnet`})]})}export{x as component};
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{nn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{D as u}from"./ec2.js";import{L as d}from"./ec22.js";import{t as f}from"./_id13.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.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=e(n()),b=t();function x(){let{id:e}=f.useParams(),t=a(),{data:n}=r(u(e)),x=n.Subnets?.[0],S=d(),[C,w]=(0,y.useState)(!1),T=async()=>{try{await S.mutateAsync(e),t({to:`/ec2/describe-subnets`})}finally{w(!1)}};if(!x?.SubnetId)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Subnet not found.`})]});let E=o(x.Tags);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s,{to:`/ec2/describe-subnets`,children:`Back to Subnets`}),S.error&&(0,b.jsx)(p,{error:S.error,msg:`Failed to delete subnet`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,b.jsxs)(l,{onClick:()=>{w(!0)},size:`sm`,variant:`destructive`,children:[(0,b.jsx)(c,{className:`size-4`}),`Delete`]}),(0,b.jsx)(v,{state:x.State})]}),subtitle:`Subnet Details`,title:E?`${x.SubnetId} (${E})`:x.SubnetId}),(0,b.jsxs)(g,{children:[(0,b.jsx)(g.Header,{children:`Subnet Information`}),(0,b.jsxs)(g.Content,{children:[(0,b.jsx)(_,{label:`Subnet ID`,value:x.SubnetId}),(0,b.jsx)(_,{label:`VPC ID`,value:x.VpcId?(0,b.jsx)(i,{className:`text-primary hover:underline`,params:{id:x.VpcId},to:`/ec2/describe-vpcs/$id`,children:x.VpcId}):`—`}),(0,b.jsx)(_,{label:`State`,value:x.State}),(0,b.jsx)(_,{label:`CIDR Block`,value:x.CidrBlock}),(0,b.jsx)(_,{label:`Availability Zone`,value:x.AvailabilityZone}),(0,b.jsx)(_,{label:`Available IP Count`,value:x.AvailableIpAddressCount?.toString()}),(0,b.jsx)(_,{label:`Map Public IP on Launch`,value:x.MapPublicIpOnLaunch?`Yes`:`No`}),(0,b.jsx)(_,{label:`Default for AZ`,value:x.DefaultForAz?`Yes`:`No`})]})]})]}),(0,b.jsx)(h,{description:`Are you sure you want to delete the subnet "${x.SubnetId}"? This action cannot be undone.`,isPending:S.isPending,onConfirm:T,onOpenChange:w,open:C,title:`Delete Subnet`})]})}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
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"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{t as a}from"./input.js";import{k as o}from"./ec2.js";import{X as s}from"./ec22.js";import{t as c}from"./_id16.js";import{i as l,t as u}from"./zod.js";import{t as d}from"./error-banner.js";import{t as f}from"./form-actions.js";import{t as p}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{y as _}from"./ec23.js";var v=t(),y=e();function b(){let e=(0,v.c)(53),{id:t}=c.useParams(),b=r(),x;e[0]===t?x=e[1]:(x=o(t),e[0]=t,e[1]=x);let{data:S}=n(x),C=S.Volumes?.[0],w=C?.VolumeId,T=s(),E=C?.Size??1,D;e[2]===E?D=e[3]:(D=u(_.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}=l(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)(p,{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)(d,{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)(m,{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)(a,{"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)(h,{errors:[N.size]}),e[31]=N.size,e[32]=q);let J;e[33]!==K||e[34]!==q?(J=(0,y.jsxs)(g,{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)(f,{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};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{t as a}from"./input.js";import{k as o}from"./ec2.js";import{X as s}from"./ec22.js";import{t as c}from"./_id16.js";import{i as l,t as u}from"./zod.js";import{t as d}from"./error-banner.js";import{t as f}from"./form-actions.js";import{t as p}from"./page-heading.js";import{a as m,r as h,t as g}from"./field.js";import{y as _}from"./ec23.js";var v=t(),y=e();function b(){let e=(0,v.c)(53),{id:t}=c.useParams(),b=r(),x;e[0]===t?x=e[1]:(x=o(t),e[0]=t,e[1]=x);let{data:S}=n(x),C=S.Volumes?.[0],w=C?.VolumeId,T=s(),E=C?.Size??1,D;e[2]===E?D=e[3]:(D=u(_.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}=l(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)(p,{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)(d,{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)(m,{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)(a,{"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)(h,{errors:[N.size]}),e[31]=N.size,e[32]=q);let J;e[33]!==K||e[34]!==q?(J=(0,y.jsxs)(g,{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)(f,{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 +1 @@
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{nn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{O as u,j as d}from"./ec2.js";import{z as f}from"./ec22.js";import{t as p}from"./_id17.js";import{t as m}from"./error-banner.js";import{t as h}from"./page-heading.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=e(n()),x=t();function S(){let{id:e}=p.useParams(),t=a(),{data:n}=r(d(e)),{data:S}=r(u),C=n.Vpcs?.[0],w=f(),[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)(s,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=o(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(m,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(l,{onClick:()=>E(!0),size:`sm`,variant:`destructive`,children:[(0,x.jsx)(c,{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)(i,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{nn as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{O as u,j as d}from"./ec2.js";import{z as f}from"./ec22.js";import{t as p}from"./_id17.js";import{t as m}from"./error-banner.js";import{t as h}from"./page-heading.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=e(n()),x=t();function S(){let{id:e}=p.useParams(),t=a(),{data:n}=r(d(e)),{data:S}=r(u),C=n.Vpcs?.[0],w=f(),[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)(s,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),(0,x.jsx)(`p`,{className:`text-muted-foreground`,children:`VPC not found.`})]});let k=o(C.Tags);return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s,{to:`/ec2/describe-vpcs`,children:`Back to VPCs`}),w.error&&(0,x.jsx)(m,{error:w.error,msg:`Failed to delete VPC`}),(0,x.jsxs)(`div`,{className:`space-y-6`,children:[(0,x.jsx)(h,{actions:(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsxs)(l,{onClick:()=>{E(!0)},size:`sm`,variant:`destructive`,children:[(0,x.jsx)(c,{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)(i,{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};
|
||||
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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{$t as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{D as u,h as d,t as f}from"./iam.js";import{u as p,y as m}from"./iam2.js";import{t as h}from"./_instanceProfileName.js";import{t as g}from"./error-banner.js";import{t as _}from"./page-heading.js";import{t as v}from"./delete-confirmation-dialog.js";import{n as y,t as b}from"./detail-row.js";var x=e(n()),S=t();function C(){let{instanceProfileName:e}=h.useParams(),t=a(),{data:n}=r(p(e)),{data:C}=r(m),w=d(),T=f(),E=u(),[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)(s,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),w.error&&(0,S.jsx)(g,{error:w.error,msg:`Failed to delete instance profile`}),T.error&&(0,S.jsx)(g,{error:T.error,msg:`Failed to add role`}),E.error&&(0,S.jsx)(g,{error:E.error,msg:`Failed to remove role`}),(0,S.jsxs)(`div`,{className:`space-y-6`,children:[(0,S.jsx)(_,{actions:(0,S.jsxs)(l,{onClick:()=>O(!0),size:`sm`,variant:`destructive`,children:[(0,S.jsx)(c,{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:o(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)(l,{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)(i,{className:`text-sm font-medium text-primary hover:underline`,params:{roleName:e.RoleName??``},to:`/iam/list-roles/$roleName`,children:e.RoleName}),(0,S.jsx)(l,{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)(s,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{$t as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{D as u,h as d,t as f}from"./iam.js";import{u as p,y as m}from"./iam2.js";import{t as h}from"./_instanceProfileName.js";import{t as g}from"./error-banner.js";import{t as _}from"./page-heading.js";import{t as v}from"./delete-confirmation-dialog.js";import{n as y,t as b}from"./detail-row.js";var x=e(n()),S=t();function C(){let{instanceProfileName:e}=h.useParams(),t=a(),{data:n}=r(p(e)),{data:C}=r(m),w=d(),T=f(),E=u(),[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)(s,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),w.error&&(0,S.jsx)(g,{error:w.error,msg:`Failed to delete instance profile`}),T.error&&(0,S.jsx)(g,{error:T.error,msg:`Failed to add role`}),E.error&&(0,S.jsx)(g,{error:E.error,msg:`Failed to remove role`}),(0,S.jsxs)(`div`,{className:`space-y-6`,children:[(0,S.jsx)(_,{actions:(0,S.jsxs)(l,{onClick:()=>{O(!0)},size:`sm`,variant:`destructive`,children:[(0,S.jsx)(c,{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:o(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)(l,{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)(i,{className:`text-sm font-medium text-primary hover:underline`,params:{roleName:e.RoleName??``},to:`/iam/list-roles/$roleName`,children:e.RoleName}),(0,S.jsx)(l,{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)(s,{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};
|
||||
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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./useNavigate.js";import{$t as a}from"./cluster-config.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{g as l}from"./iam.js";import{h as u,m as d}from"./iam2.js";import{t as f}from"./_policyArn.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.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=e(n()),b=t();function x(){let{policyArn:e}=f.useParams(),t=decodeURIComponent(e),n=i(),{data:x}=r(d(t)),S=x.Policy,C=l(),[w,T]=(0,y.useState)(!1),E=S?.DefaultVersionId??`v1`,{data:D}=r(u(t,E)),O=D?.PolicyVersion?.Document?decodeURIComponent(D.PolicyVersion.Document):null;return S?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,b.jsx)(p,{error:C.error,msg:`Failed to delete policy`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(c,{onClick:()=>T(!0),size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{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:a(S.CreateDate)})]})]}),O&&(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:O})})]})]}),(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)(o,{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{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./useNavigate.js";import{$t as a}from"./cluster-config.js";import{t as o}from"./back-link.js";import{t as s}from"./trash-2.js";import{t as c}from"./button.js";import{g as l}from"./iam.js";import{h as u,m as d}from"./iam2.js";import{t as f}from"./_policyArn.js";import{t as p}from"./error-banner.js";import{t as m}from"./page-heading.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=e(n()),b=t();function x(){let{policyArn:e}=f.useParams(),t=decodeURIComponent(e),n=i(),{data:x}=r(d(t)),S=x.Policy,C=l(),[w,T]=(0,y.useState)(!1),E=S?.DefaultVersionId??`v1`,{data:D}=r(u(t,E)),O=D?.PolicyVersion?.Document?decodeURIComponent(D.PolicyVersion.Document):null;return S?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(o,{to:`/iam/list-policies`,children:`Back to policies`}),C.error&&(0,b.jsx)(p,{error:C.error,msg:`Failed to delete policy`}),(0,b.jsxs)(`div`,{className:`space-y-6`,children:[(0,b.jsx)(m,{actions:(0,b.jsxs)(c,{onClick:()=>{T(!0)},size:`sm`,variant:`destructive`,children:[(0,b.jsx)(s,{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:a(S.CreateDate)})]})]}),O&&(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:O})})]})]}),(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)(o,{to:`/iam/list-policies`,children:`Back to policies`}),(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`Policy not found.`})]})}export{x as component};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{$t as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{_ as u}from"./iam.js";import{d,v as f}from"./iam2.js";import{t as p}from"./_roleName.js";import{t as m}from"./error-banner.js";import{t as h}from"./page-heading.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"./policy-document-viewer.js";import{n as b,t as x}from"./inline-policies-panel.js";var S=e(n()),C=t();function w(){let{roleName:e}=p.useParams(),t=a(),{data:n}=r(f(e)),{data:w}=r(d(e)),T=u(),[E,D]=(0,S.useState)(!1),O=n.Role,k=w.InstanceProfiles??[],A=O?.AssumeRolePolicyDocument?decodeURIComponent(O.AssumeRolePolicyDocument):null;return O?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{to:`/iam/list-roles`,children:`Back to roles`}),T.error&&(0,C.jsx)(m,{error:T.error,msg:`Failed to delete role`}),(0,C.jsxs)(`div`,{className:`space-y-6`,children:[(0,C.jsx)(h,{actions:(0,C.jsxs)(l,{onClick:()=>D(!0),size:`sm`,variant:`destructive`,children:[(0,C.jsx)(c,{className:`size-4`}),`Delete`]}),subtitle:`Role Details`,title:O.RoleName??``}),(0,C.jsxs)(_,{children:[(0,C.jsx)(_.Header,{children:`Role Information`}),(0,C.jsxs)(_.Content,{children:[(0,C.jsx)(v,{label:`Role Name`,value:O.RoleName}),(0,C.jsx)(v,{label:`Role ID`,value:O.RoleId}),(0,C.jsx)(v,{label:`ARN`,value:O.Arn}),(0,C.jsx)(v,{label:`Path`,value:O.Path}),(0,C.jsx)(v,{label:`Description`,value:O.Description??`-`}),(0,C.jsx)(v,{label:`Created`,value:o(O.CreateDate)})]})]}),A&&(0,C.jsxs)(_,{children:[(0,C.jsx)(_.Header,{children:`Trust Policy`}),(0,C.jsx)(`div`,{className:`p-4`,children:(0,C.jsx)(y,{document:A})})]}),(0,C.jsx)(b,{kind:`role`,name:e}),(0,C.jsx)(x,{kind:`role`,name:e}),(0,C.jsxs)(_,{children:[(0,C.jsx)(_.Header,{children:`Instance Profiles`}),(0,C.jsx)(_.Content,{children:k.length>0?(0,C.jsx)(`div`,{className:`col-span-2 space-y-3`,children:k.map(e=>(0,C.jsxs)(i,{className:`flex items-center justify-between rounded-md border p-3 transition-colors hover:bg-accent`,params:{instanceProfileName:e.InstanceProfileName??``},to:`/iam/list-instance-profiles/$instanceProfileName`,children:[(0,C.jsx)(`p`,{className:`text-sm font-medium`,children:e.InstanceProfileName}),(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.InstanceProfileName))}):(0,C.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`This role is not in any instance profile.`})})]})]}),(0,C.jsx)(g,{description:`Are you sure you want to delete the role "${e}"? This action cannot be undone. You must detach all policies and remove it from all instance profiles first.`,isPending:T.isPending,onConfirm:async()=>{try{await T.mutateAsync(e),t({to:`/iam/list-roles`})}finally{D(!1)}},onOpenChange:D,open:E,title:`Delete Role`})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{to:`/iam/list-roles`,children:`Back to roles`}),(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:`Role not found.`})]})}export{w as component};
|
||||
import{a as e,n as t,r as n}from"./compiler-runtime.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{$t as o}from"./cluster-config.js";import{t as s}from"./back-link.js";import{t as c}from"./trash-2.js";import{t as l}from"./button.js";import{_ as u}from"./iam.js";import{d,v as f}from"./iam2.js";import{t as p}from"./_roleName.js";import{t as m}from"./error-banner.js";import{t as h}from"./page-heading.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"./policy-document-viewer.js";import{n as b,t as x}from"./inline-policies-panel.js";var S=e(n()),C=t();function w(){let{roleName:e}=p.useParams(),t=a(),{data:n}=r(f(e)),{data:w}=r(d(e)),T=u(),[E,D]=(0,S.useState)(!1),O=n.Role,k=w.InstanceProfiles??[],A=O?.AssumeRolePolicyDocument?decodeURIComponent(O.AssumeRolePolicyDocument):null;return O?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{to:`/iam/list-roles`,children:`Back to roles`}),T.error&&(0,C.jsx)(m,{error:T.error,msg:`Failed to delete role`}),(0,C.jsxs)(`div`,{className:`space-y-6`,children:[(0,C.jsx)(h,{actions:(0,C.jsxs)(l,{onClick:()=>{D(!0)},size:`sm`,variant:`destructive`,children:[(0,C.jsx)(c,{className:`size-4`}),`Delete`]}),subtitle:`Role Details`,title:O.RoleName??``}),(0,C.jsxs)(_,{children:[(0,C.jsx)(_.Header,{children:`Role Information`}),(0,C.jsxs)(_.Content,{children:[(0,C.jsx)(v,{label:`Role Name`,value:O.RoleName}),(0,C.jsx)(v,{label:`Role ID`,value:O.RoleId}),(0,C.jsx)(v,{label:`ARN`,value:O.Arn}),(0,C.jsx)(v,{label:`Path`,value:O.Path}),(0,C.jsx)(v,{label:`Description`,value:O.Description??`-`}),(0,C.jsx)(v,{label:`Created`,value:o(O.CreateDate)})]})]}),A&&(0,C.jsxs)(_,{children:[(0,C.jsx)(_.Header,{children:`Trust Policy`}),(0,C.jsx)(`div`,{className:`p-4`,children:(0,C.jsx)(y,{document:A})})]}),(0,C.jsx)(b,{kind:`role`,name:e}),(0,C.jsx)(x,{kind:`role`,name:e}),(0,C.jsxs)(_,{children:[(0,C.jsx)(_.Header,{children:`Instance Profiles`}),(0,C.jsx)(_.Content,{children:k.length>0?(0,C.jsx)(`div`,{className:`col-span-2 space-y-3`,children:k.map(e=>(0,C.jsxs)(i,{className:`flex items-center justify-between rounded-md border p-3 transition-colors hover:bg-accent`,params:{instanceProfileName:e.InstanceProfileName??``},to:`/iam/list-instance-profiles/$instanceProfileName`,children:[(0,C.jsx)(`p`,{className:`text-sm font-medium`,children:e.InstanceProfileName}),(0,C.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.Arn})]},e.InstanceProfileName))}):(0,C.jsx)(`p`,{className:`col-span-2 text-sm text-muted-foreground`,children:`This role is not in any instance profile.`})})]})]}),(0,C.jsx)(g,{description:`Are you sure you want to delete the role "${e}"? This action cannot be undone. You must detach all policies and remove it from all instance profiles first.`,isPending:T.isPending,onConfirm:async()=>{try{await T.mutateAsync(e),t({to:`/iam/list-roles`})}finally{D(!1)}},onOpenChange:D,open:E,title:`Delete Role`})]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{to:`/iam/list-roles`,children:`Back to roles`}),(0,C.jsx)(`p`,{className:`text-muted-foreground`,children:`Role not found.`})]})}export{w 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{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{n as o}from"./ec22.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{n as h}from"./ec23.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=n(),v=o(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=c(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=s(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)(r,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(f,{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)(u,{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)(p,{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)(m,{children:[P,(0,_.jsx)(a,{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)(i,{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)(d,{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{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{n as o}from"./ec22.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{n as h}from"./ec23.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=n(),v=o(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=c(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=s(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)(r,{to:`/ec2/describe-addresses`,children:`Back to Elastic IPs`}),j=(0,_.jsx)(f,{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)(u,{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)(p,{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)(m,{children:[P,(0,_.jsx)(a,{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)(i,{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)(d,{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
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{t as a}from"./useMutation.js";import{fa as o,n as s}from"./awsClient.js";import{i as c,n as l,r as u}from"./acm.js";import{t as d}from"./error-banner.js";import{a as f,t as p}from"./field.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 c(l,u,`ImportCertificate`,o){},S=e(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),a(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 s().send(t)}var D=t();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)(``),[l,u]=(0,S.useState)(``),x=T(),w;t[0]===x?w=t[1]:(w=()=>{o(``),c(``),u(``),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]!==l||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:l});e.CertificateArn&&i(e.CertificateArn),E(),r(!1)}catch{}},t[8]=j,t[9]=a,t[10]=l,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)(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)(d,{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)(p,{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)(p,{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=>u(e.target.value),t[30]=W):W=t[30];let G;t[31]===l?G=t[32]:(G=(0,D.jsxs)(p,{children:[U,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:l})]}),t[31]=l,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{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{n as i}from"./QueryClientProvider.js";import{t as a}from"./useMutation.js";import{fa as o,n as s}from"./awsClient.js";import{i as c,n as l,r as u}from"./acm.js";import{t as d}from"./error-banner.js";import{a as f,t as p}from"./field.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 c(l,u,`ImportCertificate`,o){},S=e(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),a(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 s().send(t)}var D=t();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)(``),[l,u]=(0,S.useState)(``),x=T(),w;t[0]===x?w=t[1]:(w=()=>{o(``),c(``),u(``),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]!==l||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:l});e.CertificateArn&&i(e.CertificateArn),E(),r(!1)}catch{}},t[8]=j,t[9]=a,t[10]=l,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)(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)(d,{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)(p,{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)(p,{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=>{u(e.target.value)},t[30]=W):W=t[30];let G;t[31]===l?G=t[32]:(G=(0,D.jsxs)(p,{children:[U,(0,D.jsx)(b,{className:`font-mono text-xs`,id:`cert-chain`,onChange:W,placeholder:`-----BEGIN CERTIFICATE-----`,rows:4,value:l})]}),t[31]=l,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};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{Xt as i}from"./cluster-config.js";import{t as a}from"./createLucideIcon.js";import{t as o}from"./check.js";import{t as s}from"./chevron-down.js";import{t as c}from"./copy.js";import{t as l}from"./button.js";import{t as u}from"./use-copy-to-clipboard.js";var d=a(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),f=r(),p=e(n(),1),m=t(),h={bin:`text-tactical-cyan font-semibold`,flag:`text-tactical-amber`,value:`text-foreground`,comment:`text-muted-foreground italic`,variable:`text-tactical-green font-semibold`};function g(e,t){return e.length>0?e:`<${t}>`}function _(e,t){return[{type:`flag`,value:` ${e}`},{type:`value`,value:` ${t}`}]}function v(e,t){return t===void 0||t===``||t===!1?[]:t===!0?[{type:`flag`,value:` ${e}`}]:_(e,t)}function y(e){return e.map(e=>e.parts.map(e=>e.value).join(``)).join(`
|
||||
|
||||
`)}function b(e){let t=(0,f.c)(18),{commands:n}=e,[r,a]=(0,p.useState)(!1),{copied:h,copy:g}=u();if(n.length===0)return null;let _;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>a(S),t[0]=_):_=t[0];let v,b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,m.jsx)(d,{className:`size-3.5`}),b=(0,m.jsx)(`span`,{children:`AWS CLI`}),t[1]=v,t[2]=b):(v=t[1],b=t[2]);let C=r&&`rotate-180`,w;t[3]===C?w=t[4]:(w=i(`ml-auto size-3.5 transition-transform`,C),t[3]=C,t[4]=w);let T;t[5]===w?T=t[6]:(T=(0,m.jsx)(s,{className:w}),t[5]=w,t[6]=T);let E;t[7]!==r||t[8]!==T?(E=(0,m.jsxs)(`button`,{type:`button`,onClick:_,className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":r,children:[v,b,T]}),t[7]=r,t[8]=T,t[9]=E):E=t[9];let D;t[10]!==n||t[11]!==h||t[12]!==g||t[13]!==r?(D=r&&(0,m.jsxs)(`div`,{className:`border-t border-border`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-3 py-1.5`,children:[(0,m.jsx)(`span`,{className:`text-[0.625rem] text-muted-foreground`,children:n.length>1?`${n.length} commands`:`command`}),(0,m.jsxs)(l,{type:`button`,variant:`ghost`,size:`xs`,onClick:async()=>await g(y(n)),children:[h?(0,m.jsx)(o,{className:`size-2.5`}):(0,m.jsx)(c,{className:`size-2.5`}),h?`Copied`:`Copy`]})]}),(0,m.jsx)(`div`,{className:`overflow-x-auto p-3`,children:n.map((e,t)=>(0,m.jsxs)(`div`,{children:[n.length>1&&(0,m.jsx)(`div`,{className:`mb-1 text-[0.625rem] font-medium text-muted-foreground`,children:e.label}),(0,m.jsx)(`pre`,{className:`font-mono text-xs/relaxed`,children:(0,m.jsx)(`code`,{children:e.parts.map(x)})}),t<n.length-1&&(0,m.jsx)(`div`,{className:`my-2`})]},e.label))})]}),t[10]=n,t[11]=h,t[12]=g,t[13]=r,t[14]=D):D=t[14];let O;return t[15]!==E||t[16]!==D?(O=(0,m.jsxs)(`div`,{className:`rounded-md border border-border`,children:[E,D]}),t[15]=E,t[16]=D,t[17]=O):O=t[17],O}function x(e,t){return(0,m.jsx)(`span`,{className:h[e.type],children:e.value},t)}function S(e){return!e}export{v as i,g as n,_ as r,b as t};
|
||||
`)}function b(e){let t=(0,f.c)(18),{commands:n}=e,[r,a]=(0,p.useState)(!1),{copied:h,copy:g}=u();if(n.length===0)return null;let _;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{a(S)},t[0]=_):_=t[0];let v,b;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,m.jsx)(d,{className:`size-3.5`}),b=(0,m.jsx)(`span`,{children:`AWS CLI`}),t[1]=v,t[2]=b):(v=t[1],b=t[2]);let C=r&&`rotate-180`,w;t[3]===C?w=t[4]:(w=i(`ml-auto size-3.5 transition-transform`,C),t[3]=C,t[4]=w);let T;t[5]===w?T=t[6]:(T=(0,m.jsx)(s,{className:w}),t[5]=w,t[6]=T);let E;t[7]!==r||t[8]!==T?(E=(0,m.jsxs)(`button`,{type:`button`,onClick:_,className:`flex w-full items-center gap-2 px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground`,"aria-expanded":r,children:[v,b,T]}),t[7]=r,t[8]=T,t[9]=E):E=t[9];let D;t[10]!==n||t[11]!==h||t[12]!==g||t[13]!==r?(D=r&&(0,m.jsxs)(`div`,{className:`border-t border-border`,children:[(0,m.jsxs)(`div`,{className:`flex items-center justify-between border-b border-border px-3 py-1.5`,children:[(0,m.jsx)(`span`,{className:`text-[0.625rem] text-muted-foreground`,children:n.length>1?`${n.length} commands`:`command`}),(0,m.jsxs)(l,{type:`button`,variant:`ghost`,size:`xs`,onClick:async()=>{await g(y(n))},children:[h?(0,m.jsx)(o,{className:`size-2.5`}):(0,m.jsx)(c,{className:`size-2.5`}),h?`Copied`:`Copy`]})]}),(0,m.jsx)(`div`,{className:`overflow-x-auto p-3`,children:n.map((e,t)=>(0,m.jsxs)(`div`,{children:[n.length>1&&(0,m.jsx)(`div`,{className:`mb-1 text-[0.625rem] font-medium text-muted-foreground`,children:e.label}),(0,m.jsx)(`pre`,{className:`font-mono text-xs/relaxed`,children:(0,m.jsx)(`code`,{children:e.parts.map(x)})}),t<n.length-1&&(0,m.jsx)(`div`,{className:`my-2`})]},e.label))})]}),t[10]=n,t[11]=h,t[12]=g,t[13]=r,t[14]=D):D=t[14];let O;return t[15]!==E||t[16]!==D?(O=(0,m.jsxs)(`div`,{className:`rounded-md border border-border`,children:[E,D]}),t[15]=E,t[16]=D,t[17]=O):O=t[17],O}function x(e,t){return(0,m.jsx)(`span`,{className:h[e.type],children:e.value},t)}function S(e){return!e}export{v as i,g as n,_ as r,b as t};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{h as r,p as i}from"./cluster-config.js";import{t as a}from"./back-link.js";import{t as o}from"./cli-command-panel.js";import{t as s}from"./input.js";import{t as c}from"./s3.js";import{a as l,i as u,t as d}from"./zod.js";import{t as f}from"./error-banner.js";import{t as p}from"./form-actions.js";import{t as m}from"./page-heading.js";import{a as h,r as g,t as _}from"./field.js";var v=t(),y=i({bucketName:r().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)(42),t=n(),r=c(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={resolver:d(y)},e[0]=i):i=e[0];let{handleSubmit:x,register:C,control:w,formState:T}=u(i),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=l(O),A;e[3]!==r||e[4]!==t?(A=async e=>{await r.mutateAsync(e),t({to:`/s3/ls`})},e[3]=r,e[4]=t,e[5]=A):A=e[5];let j=A,M,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,b.jsx)(a,{to:`/s3/ls`,children:`Back to buckets`}),N=(0,b.jsx)(m,{title:`Create Bucket`}),e[6]=M,e[7]=N):(M=e[6],N=e[7]);let P;e[8]===r.error?P=e[9]:(P=r.error&&(0,b.jsx)(f,{error:r.error,msg:`Failed to create bucket`}),e[8]=r.error,e[9]=P);let F;e[10]!==x||e[11]!==j?(F=x(j),e[10]=x,e[11]=j,e[12]=F):F=e[12];let I;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),e[13]=I):I=e[13];let L=!!E.bucketName,R;e[14]===C?R=e[15]:(R=C(`bucketName`),e[14]=C,e[15]=R);let z;e[16]!==R||e[17]!==L?(z=(0,b.jsx)(s,{"aria-invalid":L,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...R}),e[16]=R,e[17]=L,e[18]=z):z=e[18];let B;e[19]===E.bucketName?B=e[20]:(B=(0,b.jsx)(g,{errors:[E.bucketName]}),e[19]=E.bucketName,e[20]=B);let V;e[21]!==z||e[22]!==B?(V=(0,b.jsxs)(_,{children:[I,z,B]}),e[21]=z,e[22]=B,e[23]=V):V=e[23];let H;e[24]===k?H=e[25]:(H=S(k),e[24]=k,e[25]=H);let U;e[26]===H?U=e[27]:(U=(0,b.jsx)(o,{commands:H}),e[26]=H,e[27]=U);let W;e[28]===t?W=e[29]:(W=async()=>await t({to:`/s3/ls`}),e[28]=t,e[29]=W);let G;e[30]!==r.isPending||e[31]!==D||e[32]!==W?(G=(0,b.jsx)(p,{isPending:r.isPending,isSubmitting:D,onCancel:W,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),e[30]=r.isPending,e[31]=D,e[32]=W,e[33]=G):G=e[33];let K;e[34]!==V||e[35]!==U||e[36]!==G||e[37]!==F?(K=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,U,G]}),e[34]=V,e[35]=U,e[36]=G,e[37]=F,e[38]=K):K=e[38];let q;return e[39]!==K||e[40]!==P?(q=(0,b.jsxs)(b.Fragment,{children:[M,N,P,K]}),e[39]=K,e[40]=P,e[41]=q):q=e[41],q}function S(e){return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(e.bucketName??``)||`<BucketName>`}`}]}]}export{x as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{h as r,p as i}from"./cluster-config.js";import{t as a}from"./back-link.js";import{t as o}from"./cli-command-panel.js";import{t as s}from"./input.js";import{t as c}from"./s3.js";import{a as l,i as u,t as d}from"./zod.js";import{t as f}from"./error-banner.js";import{t as p}from"./form-actions.js";import{t as m}from"./page-heading.js";import{a as h,r as g,t as _}from"./field.js";var v=t(),y=i({bucketName:r().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)(42),t=n(),r=c(),i;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={resolver:d(y)},e[0]=i):i=e[0];let{handleSubmit:x,register:C,control:w,formState:T}=u(i),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=l(O),A;e[3]!==r||e[4]!==t?(A=async e=>{await r.mutateAsync(e),t({to:`/s3/ls`})},e[3]=r,e[4]=t,e[5]=A):A=e[5];let j=A,M,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,b.jsx)(a,{to:`/s3/ls`,children:`Back to buckets`}),N=(0,b.jsx)(m,{title:`Create Bucket`}),e[6]=M,e[7]=N):(M=e[6],N=e[7]);let P;e[8]===r.error?P=e[9]:(P=r.error&&(0,b.jsx)(f,{error:r.error,msg:`Failed to create bucket`}),e[8]=r.error,e[9]=P);let F;e[10]!==x||e[11]!==j?(F=x(j),e[10]=x,e[11]=j,e[12]=F):F=e[12];let I;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`bucketName`,children:`Bucket Name`})}),e[13]=I):I=e[13];let L=!!E.bucketName,R;e[14]===C?R=e[15]:(R=C(`bucketName`),e[14]=C,e[15]=R);let z;e[16]!==R||e[17]!==L?(z=(0,b.jsx)(s,{"aria-invalid":L,id:`bucketName`,placeholder:`my-bucket`,type:`text`,...R}),e[16]=R,e[17]=L,e[18]=z):z=e[18];let B;e[19]===E.bucketName?B=e[20]:(B=(0,b.jsx)(g,{errors:[E.bucketName]}),e[19]=E.bucketName,e[20]=B);let V;e[21]!==z||e[22]!==B?(V=(0,b.jsxs)(_,{children:[I,z,B]}),e[21]=z,e[22]=B,e[23]=V):V=e[23];let H;e[24]===k?H=e[25]:(H=S(k),e[24]=k,e[25]=H);let U;e[26]===H?U=e[27]:(U=(0,b.jsx)(o,{commands:H}),e[26]=H,e[27]=U);let W;e[28]===t?W=e[29]:(W=async()=>{await t({to:`/s3/ls`})},e[28]=t,e[29]=W);let G;e[30]!==r.isPending||e[31]!==D||e[32]!==W?(G=(0,b.jsx)(p,{isPending:r.isPending,isSubmitting:D,onCancel:W,pendingLabel:`Creating…`,submitLabel:`Create Bucket`}),e[30]=r.isPending,e[31]=D,e[32]=W,e[33]=G):G=e[33];let K;e[34]!==V||e[35]!==U||e[36]!==G||e[37]!==F?(K=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,U,G]}),e[34]=V,e[35]=U,e[36]=G,e[37]=F,e[38]=K):K=e[38];let q;return e[39]!==K||e[40]!==P?(q=(0,b.jsxs)(b.Fragment,{children:[M,N,P,K]}),e[39]=K,e[40]=P,e[41]=q):q=e[41],q}function S(e){return[{label:`Create Bucket`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws s3api create-bucket`},{type:`flag`,value:` --bucket`},{type:`value`,value:` ${(e.bucketName??``)||`<BucketName>`}`}]}]}export{x as component};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
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"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{s as o}from"./iam.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{n as g}from"./iam3.js";var _=t(),v=e();function y(){let e=(0,_.c)(53),t=n(),y=o(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:l(g)},e[0]=x):x=e[0];let{handleSubmit:S,register:C,control:w,formState:T}=c(x),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=s(O),A;e[3]!==y||e[4]!==t?(A=async e=>{await y.mutateAsync(e),t({to:`/iam/list-groups`})},e[3]=y,e[4]=t,e[5]=A):A=e[5];let j=A,M,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,v.jsx)(r,{to:`/iam/list-groups`,children:`Back to groups`}),N=(0,v.jsx)(f,{title:`Create Group`}),e[6]=M,e[7]=N):(M=e[6],N=e[7]);let P;e[8]===y.error?P=e[9]:(P=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create group`}),e[8]=y.error,e[9]=P);let F;e[10]!==S||e[11]!==j?(F=S(j),e[10]=S,e[11]=j,e[12]=F):F=e[12];let I;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[13]=I):I=e[13];let L=!!E.groupName,R;e[14]===C?R=e[15]:(R=C(`groupName`),e[14]=C,e[15]=R);let z;e[16]!==R||e[17]!==L?(z=(0,v.jsx)(a,{"aria-invalid":L,id:`groupName`,placeholder:`my-group...`,...R}),e[16]=R,e[17]=L,e[18]=z):z=e[18];let B;e[19]===E.groupName?B=e[20]:(B=(0,v.jsx)(m,{errors:[E.groupName]}),e[19]=E.groupName,e[20]=B);let V;e[21]!==z||e[22]!==B?(V=(0,v.jsxs)(h,{children:[I,z,B]}),e[21]=z,e[22]=B,e[23]=V):V=e[23];let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[24]=H):H=e[24];let U;e[25]===C?U=e[26]:(U=C(`path`),e[25]=C,e[26]=U);let W;e[27]===U?W=e[28]:(W=(0,v.jsx)(a,{id:`path`,placeholder:`/`,...U}),e[27]=U,e[28]=W);let G;e[29]===E.path?G=e[30]:(G=(0,v.jsx)(m,{errors:[E.path]}),e[29]=E.path,e[30]=G);let K;e[31]!==W||e[32]!==G?(K=(0,v.jsxs)(h,{children:[H,W,G]}),e[31]=W,e[32]=G,e[33]=K):K=e[33];let q;e[34]===k?q=e[35]:(q=b(k),e[34]=k,e[35]=q);let J;e[36]===q?J=e[37]:(J=(0,v.jsx)(i,{commands:q}),e[36]=q,e[37]=J);let Y;e[38]===t?Y=e[39]:(Y=async()=>await t({to:`/iam/list-groups`}),e[38]=t,e[39]=Y);let X;e[40]!==y.isPending||e[41]!==D||e[42]!==Y?(X=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:D,onCancel:Y,pendingLabel:`Creating...`,submitLabel:`Create Group`}),e[40]=y.isPending,e[41]=D,e[42]=Y,e[43]=X):X=e[43];let Z;e[44]!==V||e[45]!==K||e[46]!==J||e[47]!==X||e[48]!==F?(Z=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,K,J,X]}),e[44]=V,e[45]=K,e[46]=J,e[47]=X,e[48]=F,e[49]=Z):Z=e[49];let Q;return e[50]!==Z||e[51]!==P?(Q=(0,v.jsxs)(v.Fragment,{children:[M,N,P,Z]}),e[50]=Z,e[51]=P,e[52]=Q):Q=e[52],Q}function b(e){let t=e.groupName??``,n=e.path??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-group`},{type:`flag`,value:` --group-name`},{type:`value`,value:` ${t||`<GroupName>`}`}];return n&&n!==`/`&&r.push({type:`flag`,value:` --path`},{type:`value`,value:` ${n}`}),[{label:`Create Group`,parts:r}]}export{y as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{s as o}from"./iam.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{n as g}from"./iam3.js";var _=t(),v=e();function y(){let e=(0,_.c)(53),t=n(),y=o(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:l(g)},e[0]=x):x=e[0];let{handleSubmit:S,register:C,control:w,formState:T}=c(x),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=s(O),A;e[3]!==y||e[4]!==t?(A=async e=>{await y.mutateAsync(e),t({to:`/iam/list-groups`})},e[3]=y,e[4]=t,e[5]=A):A=e[5];let j=A,M,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,v.jsx)(r,{to:`/iam/list-groups`,children:`Back to groups`}),N=(0,v.jsx)(f,{title:`Create Group`}),e[6]=M,e[7]=N):(M=e[6],N=e[7]);let P;e[8]===y.error?P=e[9]:(P=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create group`}),e[8]=y.error,e[9]=P);let F;e[10]!==S||e[11]!==j?(F=S(j),e[10]=S,e[11]=j,e[12]=F):F=e[12];let I;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[13]=I):I=e[13];let L=!!E.groupName,R;e[14]===C?R=e[15]:(R=C(`groupName`),e[14]=C,e[15]=R);let z;e[16]!==R||e[17]!==L?(z=(0,v.jsx)(a,{"aria-invalid":L,id:`groupName`,placeholder:`my-group...`,...R}),e[16]=R,e[17]=L,e[18]=z):z=e[18];let B;e[19]===E.groupName?B=e[20]:(B=(0,v.jsx)(m,{errors:[E.groupName]}),e[19]=E.groupName,e[20]=B);let V;e[21]!==z||e[22]!==B?(V=(0,v.jsxs)(h,{children:[I,z,B]}),e[21]=z,e[22]=B,e[23]=V):V=e[23];let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[24]=H):H=e[24];let U;e[25]===C?U=e[26]:(U=C(`path`),e[25]=C,e[26]=U);let W;e[27]===U?W=e[28]:(W=(0,v.jsx)(a,{id:`path`,placeholder:`/`,...U}),e[27]=U,e[28]=W);let G;e[29]===E.path?G=e[30]:(G=(0,v.jsx)(m,{errors:[E.path]}),e[29]=E.path,e[30]=G);let K;e[31]!==W||e[32]!==G?(K=(0,v.jsxs)(h,{children:[H,W,G]}),e[31]=W,e[32]=G,e[33]=K):K=e[33];let q;e[34]===k?q=e[35]:(q=b(k),e[34]=k,e[35]=q);let J;e[36]===q?J=e[37]:(J=(0,v.jsx)(i,{commands:q}),e[36]=q,e[37]=J);let Y;e[38]===t?Y=e[39]:(Y=async()=>{await t({to:`/iam/list-groups`})},e[38]=t,e[39]=Y);let X;e[40]!==y.isPending||e[41]!==D||e[42]!==Y?(X=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:D,onCancel:Y,pendingLabel:`Creating...`,submitLabel:`Create Group`}),e[40]=y.isPending,e[41]=D,e[42]=Y,e[43]=X):X=e[43];let Z;e[44]!==V||e[45]!==K||e[46]!==J||e[47]!==X||e[48]!==F?(Z=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,K,J,X]}),e[44]=V,e[45]=K,e[46]=J,e[47]=X,e[48]=F,e[49]=Z):Z=e[49];let Q;return e[50]!==Z||e[51]!==P?(Q=(0,v.jsxs)(v.Fragment,{children:[M,N,P,Z]}),e[50]=Z,e[51]=P,e[52]=Q):Q=e[52],Q}function b(e){let t=e.groupName??``,n=e.path??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-group`},{type:`flag`,value:` --group-name`},{type:`value`,value:` ${t||`<GroupName>`}`}];return n&&n!==`/`&&r.push({type:`flag`,value:` --path`},{type:`value`,value:` ${n}`}),[{label:`Create Group`,parts:r}]}export{y as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{c as o}from"./iam.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{r as g}from"./iam3.js";var _=t(),v=e();function y(){let e=(0,_.c)(53),t=n(),y=o(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:l(g)},e[0]=x):x=e[0];let{handleSubmit:S,register:C,control:w,formState:T}=c(x),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=s(O),A;e[3]!==y||e[4]!==t?(A=async e=>{await y.mutateAsync(e),t({to:`/iam/list-instance-profiles`})},e[3]=y,e[4]=t,e[5]=A):A=e[5];let j=A,M,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,v.jsx)(r,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),N=(0,v.jsx)(f,{title:`Create Instance Profile`}),e[6]=M,e[7]=N):(M=e[6],N=e[7]);let P;e[8]===y.error?P=e[9]:(P=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create instance profile`}),e[8]=y.error,e[9]=P);let F;e[10]!==S||e[11]!==j?(F=S(j),e[10]=S,e[11]=j,e[12]=F):F=e[12];let I;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`instanceProfileName`,children:`Instance Profile Name`})}),e[13]=I):I=e[13];let L=!!E.instanceProfileName,R;e[14]===C?R=e[15]:(R=C(`instanceProfileName`),e[14]=C,e[15]=R);let z;e[16]!==R||e[17]!==L?(z=(0,v.jsx)(a,{"aria-invalid":L,id:`instanceProfileName`,placeholder:`my-instance-profile...`,...R}),e[16]=R,e[17]=L,e[18]=z):z=e[18];let B;e[19]===E.instanceProfileName?B=e[20]:(B=(0,v.jsx)(m,{errors:[E.instanceProfileName]}),e[19]=E.instanceProfileName,e[20]=B);let V;e[21]!==z||e[22]!==B?(V=(0,v.jsxs)(h,{children:[I,z,B]}),e[21]=z,e[22]=B,e[23]=V):V=e[23];let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[24]=H):H=e[24];let U;e[25]===C?U=e[26]:(U=C(`path`),e[25]=C,e[26]=U);let W;e[27]===U?W=e[28]:(W=(0,v.jsx)(a,{id:`path`,placeholder:`/`,...U}),e[27]=U,e[28]=W);let G;e[29]===E.path?G=e[30]:(G=(0,v.jsx)(m,{errors:[E.path]}),e[29]=E.path,e[30]=G);let K;e[31]!==W||e[32]!==G?(K=(0,v.jsxs)(h,{children:[H,W,G]}),e[31]=W,e[32]=G,e[33]=K):K=e[33];let q;e[34]===k?q=e[35]:(q=b(k),e[34]=k,e[35]=q);let J;e[36]===q?J=e[37]:(J=(0,v.jsx)(i,{commands:q}),e[36]=q,e[37]=J);let Y;e[38]===t?Y=e[39]:(Y=async()=>await t({to:`/iam/list-instance-profiles`}),e[38]=t,e[39]=Y);let X;e[40]!==y.isPending||e[41]!==D||e[42]!==Y?(X=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:D,onCancel:Y,pendingLabel:`Creating...`,submitLabel:`Create Instance Profile`}),e[40]=y.isPending,e[41]=D,e[42]=Y,e[43]=X):X=e[43];let Z;e[44]!==V||e[45]!==K||e[46]!==J||e[47]!==X||e[48]!==F?(Z=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,K,J,X]}),e[44]=V,e[45]=K,e[46]=J,e[47]=X,e[48]=F,e[49]=Z):Z=e[49];let Q;return e[50]!==Z||e[51]!==P?(Q=(0,v.jsxs)(v.Fragment,{children:[M,N,P,Z]}),e[50]=Z,e[51]=P,e[52]=Q):Q=e[52],Q}function b(e){let t=e.instanceProfileName??``,n=e.path??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-instance-profile`},{type:`flag`,value:` --instance-profile-name`},{type:`value`,value:` ${t||`<InstanceProfileName>`}`}];return n&&n!==`/`&&r.push({type:`flag`,value:` --path`},{type:`value`,value:` ${n}`}),[{label:`Create Instance Profile`,parts:r}]}export{y as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{c as o}from"./iam.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{r as g}from"./iam3.js";var _=t(),v=e();function y(){let e=(0,_.c)(53),t=n(),y=o(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:l(g)},e[0]=x):x=e[0];let{handleSubmit:S,register:C,control:w,formState:T}=c(x),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=s(O),A;e[3]!==y||e[4]!==t?(A=async e=>{await y.mutateAsync(e),t({to:`/iam/list-instance-profiles`})},e[3]=y,e[4]=t,e[5]=A):A=e[5];let j=A,M,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,v.jsx)(r,{to:`/iam/list-instance-profiles`,children:`Back to instance profiles`}),N=(0,v.jsx)(f,{title:`Create Instance Profile`}),e[6]=M,e[7]=N):(M=e[6],N=e[7]);let P;e[8]===y.error?P=e[9]:(P=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create instance profile`}),e[8]=y.error,e[9]=P);let F;e[10]!==S||e[11]!==j?(F=S(j),e[10]=S,e[11]=j,e[12]=F):F=e[12];let I;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`instanceProfileName`,children:`Instance Profile Name`})}),e[13]=I):I=e[13];let L=!!E.instanceProfileName,R;e[14]===C?R=e[15]:(R=C(`instanceProfileName`),e[14]=C,e[15]=R);let z;e[16]!==R||e[17]!==L?(z=(0,v.jsx)(a,{"aria-invalid":L,id:`instanceProfileName`,placeholder:`my-instance-profile...`,...R}),e[16]=R,e[17]=L,e[18]=z):z=e[18];let B;e[19]===E.instanceProfileName?B=e[20]:(B=(0,v.jsx)(m,{errors:[E.instanceProfileName]}),e[19]=E.instanceProfileName,e[20]=B);let V;e[21]!==z||e[22]!==B?(V=(0,v.jsxs)(h,{children:[I,z,B]}),e[21]=z,e[22]=B,e[23]=V):V=e[23];let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[24]=H):H=e[24];let U;e[25]===C?U=e[26]:(U=C(`path`),e[25]=C,e[26]=U);let W;e[27]===U?W=e[28]:(W=(0,v.jsx)(a,{id:`path`,placeholder:`/`,...U}),e[27]=U,e[28]=W);let G;e[29]===E.path?G=e[30]:(G=(0,v.jsx)(m,{errors:[E.path]}),e[29]=E.path,e[30]=G);let K;e[31]!==W||e[32]!==G?(K=(0,v.jsxs)(h,{children:[H,W,G]}),e[31]=W,e[32]=G,e[33]=K):K=e[33];let q;e[34]===k?q=e[35]:(q=b(k),e[34]=k,e[35]=q);let J;e[36]===q?J=e[37]:(J=(0,v.jsx)(i,{commands:q}),e[36]=q,e[37]=J);let Y;e[38]===t?Y=e[39]:(Y=async()=>{await t({to:`/iam/list-instance-profiles`})},e[38]=t,e[39]=Y);let X;e[40]!==y.isPending||e[41]!==D||e[42]!==Y?(X=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:D,onCancel:Y,pendingLabel:`Creating...`,submitLabel:`Create Instance Profile`}),e[40]=y.isPending,e[41]=D,e[42]=Y,e[43]=X):X=e[43];let Z;e[44]!==V||e[45]!==K||e[46]!==J||e[47]!==X||e[48]!==F?(Z=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,K,J,X]}),e[44]=V,e[45]=K,e[46]=J,e[47]=X,e[48]=F,e[49]=Z):Z=e[49];let Q;return e[50]!==Z||e[51]!==P?(Q=(0,v.jsxs)(v.Fragment,{children:[M,N,P,Z]}),e[50]=Z,e[51]=P,e[52]=Q):Q=e[52],Q}function b(e){let t=e.instanceProfileName??``,n=e.path??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-instance-profile`},{type:`flag`,value:` --instance-profile-name`},{type:`value`,value:` ${t||`<InstanceProfileName>`}`}];return n&&n!==`/`&&r.push({type:`flag`,value:` --path`},{type:`value`,value:` ${n}`}),[{label:`Create Instance Profile`,parts:r}]}export{y as component};
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{p as o}from"./ec22.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{a as h}from"./ec23.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=n(),v=o(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=c(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=s(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)(f,{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)(u,{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)(p,{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)(m,{children:[P,(0,_.jsx)(a,{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)(i,{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)(d,{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{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{p as o}from"./ec22.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,t as m}from"./field.js";import{a as h}from"./ec23.js";var g=t(),_=e();function v(){let e=(0,g.c)(36),t=n(),v=o(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:l(h),defaultValues:{name:``}},e[0]=b):b=e[0];let{control:x,handleSubmit:S,register:C,formState:w}=c(b),{isSubmitting:T}=w,E;e[1]===x?E=e[2]:(E={control:x},e[1]=x,e[2]=E);let D=s(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)(f,{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)(u,{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)(p,{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)(m,{children:[P,(0,_.jsx)(a,{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)(i,{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)(d,{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
+1
-1
@@ -1,4 +1,4 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{h as o,t as s}from"./ec22.js";import{a as c,i as l,t as u}from"./zod.js";import{t as ee}from"./error-banner.js";import{t as te}from"./form-actions.js";import{t as ne}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{s as m}from"./ec23.js";import{t as h}from"./launch-template-data-fields.js";var g=t(),_=e();function v(){let e=(0,g.c)(56),t=n(),v=o(),y;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(y=u(m),e[0]=y):y=e[0];let x;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:y,defaultValues:{launchTemplateName:``,versionDescription:``,imageId:``,instanceType:``,securityGroupIds:[],userData:``}},e[1]=x):x=e[1];let{control:S,handleSubmit:C,register:w,formState:T}=l(x),{errors:E,isSubmitting:D}=T,O;e[2]===S?O=e[3]:(O={control:S},e[2]=S,e[3]=O);let k=c(O),A;e[4]!==v||e[5]!==t?(A=async e=>{let n=(await v.mutateAsync(e)).LaunchTemplate?.LaunchTemplateId;if(!n){t({to:`/ec2/describe-launch-templates`});return}t({to:`/ec2/describe-launch-templates/$id`,params:{id:n}})},e[4]=v,e[5]=t,e[6]=A):A=e[6];let j=A,M,N;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,_.jsx)(r,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),N=(0,_.jsx)(ne,{title:`Create Launch Template`}),e[7]=M,e[8]=N):(M=e[7],N=e[8]);let P;e[9]===v.error?P=e[10]:(P=v.error&&(0,_.jsx)(ee,{error:v.error,msg:`Failed to create launch template`}),e[9]=v.error,e[10]=P);let F;e[11]!==C||e[12]!==j?(F=C(j),e[11]=C,e[12]=j,e[13]=F):F=e[13];let I;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateName`,children:`Name`})}),e[14]=I):I=e[14];let L=!!E.launchTemplateName,R;e[15]===w?R=e[16]:(R=w(`launchTemplateName`),e[15]=w,e[16]=R);let z;e[17]!==L||e[18]!==R?(z=(0,_.jsx)(a,{"aria-invalid":L,id:`launchTemplateName`,placeholder:`my-launch-template`,...R}),e[17]=L,e[18]=R,e[19]=z):z=e[19];let B;e[20]===E.launchTemplateName?B=e[21]:(B=(0,_.jsx)(f,{errors:[E.launchTemplateName]}),e[20]=E.launchTemplateName,e[21]=B);let V;e[22]!==z||e[23]!==B?(V=(0,_.jsxs)(p,{children:[I,z,B]}),e[22]=z,e[23]=B,e[24]=V):V=e[24];let H;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`versionDescription`,children:`Version Description`})}),e[25]=H):H=e[25];let U;e[26]===w?U=e[27]:(U=w(`versionDescription`),e[26]=w,e[27]=U);let W;e[28]===U?W=e[29]:(W=(0,_.jsxs)(p,{children:[H,(0,_.jsx)(a,{id:`versionDescription`,placeholder:`Initial version`,...U})]}),e[28]=U,e[29]=W);let G;e[30]!==S||e[31]!==E||e[32]!==w?(G=(0,_.jsx)(h,{control:S,errors:E,register:w}),e[30]=S,e[31]=E,e[32]=w,e[33]=G):G=e[33];let K=k.launchTemplateName??``,q=k.versionDescription??``,J;e[34]!==K||e[35]!==q||e[36]!==k?(J=b(K,q,s(k)),e[34]=K,e[35]=q,e[36]=k,e[37]=J):J=e[37];let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(i,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/ec2/describe-launch-templates`}),e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==D||e[44]!==X?(Z=(0,_.jsx)(te,{isPending:v.isPending,isSubmitting:D,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Launch Template`}),e[42]=v.isPending,e[43]=D,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==V||e[47]!==W||e[48]!==G||e[49]!==Y||e[50]!==Z||e[51]!==F?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,W,G,Y,Z]}),e[46]=V,e[47]=W,e[48]=G,e[49]=Y,e[50]=Z,e[51]=F,e[52]=Q):Q=e[52];let $;return e[53]!==Q||e[54]!==P?($=(0,_.jsxs)(_.Fragment,{children:[M,N,P,Q]}),e[53]=Q,e[54]=P,e[55]=$):$=e[55],$}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:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{h as o,t as s}from"./ec22.js";import{a as c,i as l,t as u}from"./zod.js";import{t as ee}from"./error-banner.js";import{t as te}from"./form-actions.js";import{t as ne}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{s as m}from"./ec23.js";import{t as h}from"./launch-template-data-fields.js";var g=t(),_=e();function v(){let e=(0,g.c)(56),t=n(),v=o(),y;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(y=u(m),e[0]=y):y=e[0];let x;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:y,defaultValues:{launchTemplateName:``,versionDescription:``,imageId:``,instanceType:``,securityGroupIds:[],userData:``}},e[1]=x):x=e[1];let{control:S,handleSubmit:C,register:w,formState:T}=l(x),{errors:E,isSubmitting:D}=T,O;e[2]===S?O=e[3]:(O={control:S},e[2]=S,e[3]=O);let k=c(O),A;e[4]!==v||e[5]!==t?(A=async e=>{let n=(await v.mutateAsync(e)).LaunchTemplate?.LaunchTemplateId;if(!n){t({to:`/ec2/describe-launch-templates`});return}t({to:`/ec2/describe-launch-templates/$id`,params:{id:n}})},e[4]=v,e[5]=t,e[6]=A):A=e[6];let j=A,M,N;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,_.jsx)(r,{to:`/ec2/describe-launch-templates`,children:`Back to launch templates`}),N=(0,_.jsx)(ne,{title:`Create Launch Template`}),e[7]=M,e[8]=N):(M=e[7],N=e[8]);let P;e[9]===v.error?P=e[10]:(P=v.error&&(0,_.jsx)(ee,{error:v.error,msg:`Failed to create launch template`}),e[9]=v.error,e[10]=P);let F;e[11]!==C||e[12]!==j?(F=C(j),e[11]=C,e[12]=j,e[13]=F):F=e[13];let I;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`launchTemplateName`,children:`Name`})}),e[14]=I):I=e[14];let L=!!E.launchTemplateName,R;e[15]===w?R=e[16]:(R=w(`launchTemplateName`),e[15]=w,e[16]=R);let z;e[17]!==L||e[18]!==R?(z=(0,_.jsx)(a,{"aria-invalid":L,id:`launchTemplateName`,placeholder:`my-launch-template`,...R}),e[17]=L,e[18]=R,e[19]=z):z=e[19];let B;e[20]===E.launchTemplateName?B=e[21]:(B=(0,_.jsx)(f,{errors:[E.launchTemplateName]}),e[20]=E.launchTemplateName,e[21]=B);let V;e[22]!==z||e[23]!==B?(V=(0,_.jsxs)(p,{children:[I,z,B]}),e[22]=z,e[23]=B,e[24]=V):V=e[24];let H;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`versionDescription`,children:`Version Description`})}),e[25]=H):H=e[25];let U;e[26]===w?U=e[27]:(U=w(`versionDescription`),e[26]=w,e[27]=U);let W;e[28]===U?W=e[29]:(W=(0,_.jsxs)(p,{children:[H,(0,_.jsx)(a,{id:`versionDescription`,placeholder:`Initial version`,...U})]}),e[28]=U,e[29]=W);let G;e[30]!==S||e[31]!==E||e[32]!==w?(G=(0,_.jsx)(h,{control:S,errors:E,register:w}),e[30]=S,e[31]=E,e[32]=w,e[33]=G):G=e[33];let K=k.launchTemplateName??``,q=k.versionDescription??``,J;e[34]!==K||e[35]!==q||e[36]!==k?(J=b(K,q,s(k)),e[34]=K,e[35]=q,e[36]=k,e[37]=J):J=e[37];let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(i,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>{await t({to:`/ec2/describe-launch-templates`})},e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==D||e[44]!==X?(Z=(0,_.jsx)(te,{isPending:v.isPending,isSubmitting:D,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Launch Template`}),e[42]=v.isPending,e[43]=D,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==V||e[47]!==W||e[48]!==G||e[49]!==Y||e[50]!==Z||e[51]!==F?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,W,G,Y,Z]}),e[46]=V,e[47]=W,e[48]=G,e[49]=Y,e[50]=Z,e[51]=F,e[52]=Q):Q=e[52];let $;return e[53]!==Q||e[54]!==P?($=(0,_.jsxs)(_.Fragment,{children:[M,N,P,Q]}),e[53]=Q,e[54]=P,e[55]=$):$=e[55],$}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};
|
||||
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{t as n}from"./useNavigate.js";import{t as ee}from"./back-link.js";import{c as r,i,n as te,s as a,t as ne}from"./select.js";import{t as re}from"./cli-command-panel.js";import{t as o}from"./input.js";import{v as s}from"./ec22.js";import{a as c,i as l,n as u,t as d}from"./zod.js";import{t as f}from"./error-banner.js";import{t as p}from"./form-actions.js";import{t as m}from"./page-heading.js";import{a as h,r as g,t as _}from"./field.js";import{u as v}from"./ec23.js";var y=t(),b=e();function x(){let e=(0,y.c)(54),t=n(),x=s(),S;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:d(v),defaultValues:{groupName:``,strategy:`spread`}},e[0]=S):S=e[0];let{control:C,handleSubmit:w,register:T,formState:E}=l(S),{errors:D,isSubmitting:O}=E,k;e[1]===C?k=e[2]:(k={control:C},e[1]=C,e[2]=k);let A=c(k),j;e[3]!==x||e[4]!==t?(j=async e=>{let n=await x.mutateAsync(e);t({to:`/ec2/describe-placement-groups/$id`,params:{id:n.PlacementGroup?.GroupId??``}})},e[3]=x,e[4]=t,e[5]=j):j=e[5];let M=j,N,P;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,b.jsx)(ee,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,b.jsx)(m,{title:`Create Placement Group`}),e[6]=N,e[7]=P):(N=e[6],P=e[7]);let F;e[8]===x.error?F=e[9]:(F=x.error&&(0,b.jsx)(f,{error:x.error,msg:`Failed to create placement group`}),e[8]=x.error,e[9]=F);let I;e[10]!==w||e[11]!==M?(I=w(M),e[10]=w,e[11]=M,e[12]=I):I=e[12];let L;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[13]=L):L=e[13];let R=!!D.groupName,z;e[14]===T?z=e[15]:(z=T(`groupName`),e[14]=T,e[15]=z);let B;e[16]!==z||e[17]!==R?(B=(0,b.jsx)(o,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),e[16]=z,e[17]=R,e[18]=B):B=e[18];let V;e[19]===D.groupName?V=e[20]:(V=(0,b.jsx)(g,{errors:[D.groupName]}),e[19]=D.groupName,e[20]=V);let H;e[21]!==B||e[22]!==V?(H=(0,b.jsxs)(_,{children:[L,B,V]}),e[21]=B,e[22]=V,e[23]=H):H=e[23];let U;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),e[24]=U):U=e[24];let W;e[25]===D.strategy?W=e[26]:(W=e=>{let{field:t}=e;return(0,b.jsxs)(ne,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,b.jsx)(a,{"aria-invalid":!!D.strategy,className:`w-full`,id:`strategy`,children:(0,b.jsx)(r,{})}),(0,b.jsxs)(te,{children:[(0,b.jsx)(i,{value:`spread`,children:`spread`}),(0,b.jsx)(i,{value:`cluster`,children:`cluster`})]})]})},e[25]=D.strategy,e[26]=W);let G;e[27]!==C||e[28]!==W?(G=(0,b.jsx)(u,{control:C,name:`strategy`,render:W}),e[27]=C,e[28]=W,e[29]=G):G=e[29];let K;e[30]===D.strategy?K=e[31]:(K=(0,b.jsx)(g,{errors:[D.strategy]}),e[30]=D.strategy,e[31]=K);let q;e[32]!==G||e[33]!==K?(q=(0,b.jsxs)(_,{children:[U,G,K]}),e[32]=G,e[33]=K,e[34]=q):q=e[34];let J;e[35]===A?J=e[36]:(J=ie(A),e[35]=A,e[36]=J);let Y;e[37]===J?Y=e[38]:(Y=(0,b.jsx)(re,{commands:J}),e[37]=J,e[38]=Y);let X;e[39]===t?X=e[40]:(X=async()=>await t({to:`/ec2/describe-placement-groups`}),e[39]=t,e[40]=X);let Z;e[41]!==x.isPending||e[42]!==O||e[43]!==X?(Z=(0,b.jsx)(p,{isPending:x.isPending,isSubmitting:O,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),e[41]=x.isPending,e[42]=O,e[43]=X,e[44]=Z):Z=e[44];let Q;e[45]!==H||e[46]!==q||e[47]!==Y||e[48]!==Z||e[49]!==I?(Q=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[45]=H,e[46]=q,e[47]=Y,e[48]=Z,e[49]=I,e[50]=Q):Q=e[50];let $;return e[51]!==Q||e[52]!==F?($=(0,b.jsxs)(b.Fragment,{children:[N,P,F,Q]}),e[51]=Q,e[52]=F,e[53]=$):$=e[53],$}function S(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ie(e){let t=e.groupName??``,n=e.strategy??``;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{t as n}from"./useNavigate.js";import{t as ee}from"./back-link.js";import{c as r,i,n as te,s as a,t as ne}from"./select.js";import{t as re}from"./cli-command-panel.js";import{t as o}from"./input.js";import{v as s}from"./ec22.js";import{a as c,i as l,n as u,t as d}from"./zod.js";import{t as f}from"./error-banner.js";import{t as p}from"./form-actions.js";import{t as m}from"./page-heading.js";import{a as h,r as g,t as _}from"./field.js";import{u as v}from"./ec23.js";var y=t(),b=e();function x(){let e=(0,y.c)(54),t=n(),x=s(),S;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(S={resolver:d(v),defaultValues:{groupName:``,strategy:`spread`}},e[0]=S):S=e[0];let{control:C,handleSubmit:w,register:T,formState:E}=l(S),{errors:D,isSubmitting:O}=E,k;e[1]===C?k=e[2]:(k={control:C},e[1]=C,e[2]=k);let A=c(k),j;e[3]!==x||e[4]!==t?(j=async e=>{let n=await x.mutateAsync(e);t({to:`/ec2/describe-placement-groups/$id`,params:{id:n.PlacementGroup?.GroupId??``}})},e[3]=x,e[4]=t,e[5]=j):j=e[5];let M=j,N,P;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,b.jsx)(ee,{to:`/ec2/describe-placement-groups`,children:`Back to placement groups`}),P=(0,b.jsx)(m,{title:`Create Placement Group`}),e[6]=N,e[7]=P):(N=e[6],P=e[7]);let F;e[8]===x.error?F=e[9]:(F=x.error&&(0,b.jsx)(f,{error:x.error,msg:`Failed to create placement group`}),e[8]=x.error,e[9]=F);let I;e[10]!==w||e[11]!==M?(I=w(M),e[10]=w,e[11]=M,e[12]=I):I=e[12];let L;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[13]=L):L=e[13];let R=!!D.groupName,z;e[14]===T?z=e[15]:(z=T(`groupName`),e[14]=T,e[15]=z);let B;e[16]!==z||e[17]!==R?(B=(0,b.jsx)(o,{"aria-invalid":R,id:`groupName`,placeholder:`my-placement-group`,...z}),e[16]=z,e[17]=R,e[18]=B):B=e[18];let V;e[19]===D.groupName?V=e[20]:(V=(0,b.jsx)(g,{errors:[D.groupName]}),e[19]=D.groupName,e[20]=V);let H;e[21]!==B||e[22]!==V?(H=(0,b.jsxs)(_,{children:[L,B,V]}),e[21]=B,e[22]=V,e[23]=H):H=e[23];let U;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,b.jsx)(h,{children:(0,b.jsx)(`label`,{htmlFor:`strategy`,children:`Strategy`})}),e[24]=U):U=e[24];let W;e[25]===D.strategy?W=e[26]:(W=e=>{let{field:t}=e;return(0,b.jsxs)(ne,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,b.jsx)(a,{"aria-invalid":!!D.strategy,className:`w-full`,id:`strategy`,children:(0,b.jsx)(r,{})}),(0,b.jsxs)(te,{children:[(0,b.jsx)(i,{value:`spread`,children:`spread`}),(0,b.jsx)(i,{value:`cluster`,children:`cluster`})]})]})},e[25]=D.strategy,e[26]=W);let G;e[27]!==C||e[28]!==W?(G=(0,b.jsx)(u,{control:C,name:`strategy`,render:W}),e[27]=C,e[28]=W,e[29]=G):G=e[29];let K;e[30]===D.strategy?K=e[31]:(K=(0,b.jsx)(g,{errors:[D.strategy]}),e[30]=D.strategy,e[31]=K);let q;e[32]!==G||e[33]!==K?(q=(0,b.jsxs)(_,{children:[U,G,K]}),e[32]=G,e[33]=K,e[34]=q):q=e[34];let J;e[35]===A?J=e[36]:(J=ie(A),e[35]=A,e[36]=J);let Y;e[37]===J?Y=e[38]:(Y=(0,b.jsx)(re,{commands:J}),e[37]=J,e[38]=Y);let X;e[39]===t?X=e[40]:(X=async()=>{await t({to:`/ec2/describe-placement-groups`})},e[39]=t,e[40]=X);let Z;e[41]!==x.isPending||e[42]!==O||e[43]!==X?(Z=(0,b.jsx)(p,{isPending:x.isPending,isSubmitting:O,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Placement Group`}),e[41]=x.isPending,e[42]=O,e[43]=X,e[44]=Z):Z=e[44];let Q;e[45]!==H||e[46]!==q||e[47]!==Y||e[48]!==Z||e[49]!==I?(Q=(0,b.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:I,children:[H,q,Y,Z]}),e[45]=H,e[46]=q,e[47]=Y,e[48]=Z,e[49]=I,e[50]=Q):Q=e[50];let $;return e[51]!==Q||e[52]!==F?($=(0,b.jsxs)(b.Fragment,{children:[N,P,F,Q]}),e[51]=Q,e[52]=F,e[53]=$):$=e[53],$}function S(e){return`'${e.replaceAll(`'`,`'"'"'`)}'`}function ie(e){let t=e.groupName??``,n=e.strategy??``;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:` ${t?S(t):`<GroupName>`}`},{type:`flag`,value:` \\
|
||||
--strategy`},{type:`value`,value:` ${n||`spread`}`}]}]}export{x as component};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{l as ee}from"./iam.js";import{a as o,i as s,n as c,t as l}from"./zod.js";import{t as te}from"./error-banner.js";import{t as ne}from"./form-actions.js";import{t as re}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{t as ie}from"./json-editor.js";import{i as ae}from"./iam3.js";var p=t(),m=e(),h=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function g(){let e=(0,p.c)(65),t=n(),g=ee(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:l(ae),defaultValues:{policyDocument:h}},e[0]=v):v=e[0];let{handleSubmit:y,register:b,control:x,formState:oe}=s(v),{errors:S,isSubmitting:C}=oe,w;e[1]===x?w=e[2]:(w={control:x},e[1]=x,e[2]=w);let T=o(w),E;e[3]!==g||e[4]!==t?(E=async e=>{await g.mutateAsync(e),t({to:`/iam/list-policies`})},e[3]=g,e[4]=t,e[5]=E):E=e[5];let D=E,O,k;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,m.jsx)(r,{to:`/iam/list-policies`,children:`Back to policies`}),k=(0,m.jsx)(re,{title:`Create Policy`}),e[6]=O,e[7]=k):(O=e[6],k=e[7]);let A;e[8]===g.error?A=e[9]:(A=g.error&&(0,m.jsx)(te,{error:g.error,msg:`Failed to create policy`}),e[8]=g.error,e[9]=A);let j;e[10]!==y||e[11]!==D?(j=y(D),e[10]=y,e[11]=D,e[12]=j):j=e[12];let M;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,m.jsx)(u,{children:(0,m.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),e[13]=M):M=e[13];let N=!!S.policyName,P;e[14]===b?P=e[15]:(P=b(`policyName`),e[14]=b,e[15]=P);let F;e[16]!==P||e[17]!==N?(F=(0,m.jsx)(a,{"aria-invalid":N,id:`policyName`,placeholder:`my-policy...`,...P}),e[16]=P,e[17]=N,e[18]=F):F=e[18];let I;e[19]===S.policyName?I=e[20]:(I=(0,m.jsx)(d,{errors:[S.policyName]}),e[19]=S.policyName,e[20]=I);let L;e[21]!==F||e[22]!==I?(L=(0,m.jsxs)(f,{children:[M,F,I]}),e[21]=F,e[22]=I,e[23]=L):L=e[23];let R;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,m.jsx)(u,{children:(0,m.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[24]=R):R=e[24];let z;e[25]===b?z=e[26]:(z=b(`description`),e[25]=b,e[26]=z);let B;e[27]===z?B=e[28]:(B=(0,m.jsx)(a,{id:`description`,placeholder:`A brief description of this policy...`,...z}),e[27]=z,e[28]=B);let V;e[29]===S.description?V=e[30]:(V=(0,m.jsx)(d,{errors:[S.description]}),e[29]=S.description,e[30]=V);let H;e[31]!==B||e[32]!==V?(H=(0,m.jsxs)(f,{children:[R,B,V]}),e[31]=B,e[32]=V,e[33]=H):H=e[33];let U;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,m.jsx)(u,{children:(0,m.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),e[34]=U):U=e[34];let W;e[35]===S.policyDocument?W=e[36]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,m.jsx)(ie,{error:!!S.policyDocument,id:`policyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[35]=S.policyDocument,e[36]=W);let G;e[37]!==x||e[38]!==W?(G=(0,m.jsx)(c,{control:x,name:`policyDocument`,render:W}),e[37]=x,e[38]=W,e[39]=G):G=e[39];let K;e[40]===S.policyDocument?K=e[41]:(K=(0,m.jsx)(d,{errors:[S.policyDocument]}),e[40]=S.policyDocument,e[41]=K);let q;e[42]!==G||e[43]!==K?(q=(0,m.jsxs)(f,{children:[U,G,K]}),e[42]=G,e[43]=K,e[44]=q):q=e[44];let J;e[45]===T?J=e[46]:(J=_(T),e[45]=T,e[46]=J);let Y;e[47]===J?Y=e[48]:(Y=(0,m.jsx)(i,{commands:J}),e[47]=J,e[48]=Y);let X;e[49]===t?X=e[50]:(X=async()=>await t({to:`/iam/list-policies`}),e[49]=t,e[50]=X);let Z;e[51]!==g.isPending||e[52]!==C||e[53]!==X?(Z=(0,m.jsx)(ne,{isPending:g.isPending,isSubmitting:C,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),e[51]=g.isPending,e[52]=C,e[53]=X,e[54]=Z):Z=e[54];let Q;e[55]!==L||e[56]!==H||e[57]!==q||e[58]!==Y||e[59]!==Z||e[60]!==j?(Q=(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[55]=L,e[56]=H,e[57]=q,e[58]=Y,e[59]=Z,e[60]=j,e[61]=Q):Q=e[61];let $;return e[62]!==Q||e[63]!==A?($=(0,m.jsxs)(m.Fragment,{children:[O,k,A,Q]}),e[62]=Q,e[63]=A,e[64]=$):$=e[64],$}function _(e){let t=e.policyName??``,n=e.description??``,r=e.policyDocument??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{l as ee}from"./iam.js";import{a as o,i as s,n as c,t as l}from"./zod.js";import{t as te}from"./error-banner.js";import{t as ne}from"./form-actions.js";import{t as re}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{t as ie}from"./json-editor.js";import{i as ae}from"./iam3.js";var p=t(),m=e(),h=JSON.stringify({Version:`2012-10-17`,Statement:[{Effect:`Allow`,Action:`*`,Resource:`*`}]},null,2);function g(){let e=(0,p.c)(65),t=n(),g=ee(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:l(ae),defaultValues:{policyDocument:h}},e[0]=v):v=e[0];let{handleSubmit:y,register:b,control:x,formState:oe}=s(v),{errors:S,isSubmitting:C}=oe,w;e[1]===x?w=e[2]:(w={control:x},e[1]=x,e[2]=w);let T=o(w),E;e[3]!==g||e[4]!==t?(E=async e=>{await g.mutateAsync(e),t({to:`/iam/list-policies`})},e[3]=g,e[4]=t,e[5]=E):E=e[5];let D=E,O,k;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,m.jsx)(r,{to:`/iam/list-policies`,children:`Back to policies`}),k=(0,m.jsx)(re,{title:`Create Policy`}),e[6]=O,e[7]=k):(O=e[6],k=e[7]);let A;e[8]===g.error?A=e[9]:(A=g.error&&(0,m.jsx)(te,{error:g.error,msg:`Failed to create policy`}),e[8]=g.error,e[9]=A);let j;e[10]!==y||e[11]!==D?(j=y(D),e[10]=y,e[11]=D,e[12]=j):j=e[12];let M;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,m.jsx)(u,{children:(0,m.jsx)(`label`,{htmlFor:`policyName`,children:`Policy Name`})}),e[13]=M):M=e[13];let N=!!S.policyName,P;e[14]===b?P=e[15]:(P=b(`policyName`),e[14]=b,e[15]=P);let F;e[16]!==P||e[17]!==N?(F=(0,m.jsx)(a,{"aria-invalid":N,id:`policyName`,placeholder:`my-policy...`,...P}),e[16]=P,e[17]=N,e[18]=F):F=e[18];let I;e[19]===S.policyName?I=e[20]:(I=(0,m.jsx)(d,{errors:[S.policyName]}),e[19]=S.policyName,e[20]=I);let L;e[21]!==F||e[22]!==I?(L=(0,m.jsxs)(f,{children:[M,F,I]}),e[21]=F,e[22]=I,e[23]=L):L=e[23];let R;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,m.jsx)(u,{children:(0,m.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[24]=R):R=e[24];let z;e[25]===b?z=e[26]:(z=b(`description`),e[25]=b,e[26]=z);let B;e[27]===z?B=e[28]:(B=(0,m.jsx)(a,{id:`description`,placeholder:`A brief description of this policy...`,...z}),e[27]=z,e[28]=B);let V;e[29]===S.description?V=e[30]:(V=(0,m.jsx)(d,{errors:[S.description]}),e[29]=S.description,e[30]=V);let H;e[31]!==B||e[32]!==V?(H=(0,m.jsxs)(f,{children:[R,B,V]}),e[31]=B,e[32]=V,e[33]=H):H=e[33];let U;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,m.jsx)(u,{children:(0,m.jsx)(`label`,{htmlFor:`policyDocument`,children:`Policy Document (JSON)`})}),e[34]=U):U=e[34];let W;e[35]===S.policyDocument?W=e[36]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,m.jsx)(ie,{error:!!S.policyDocument,id:`policyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[35]=S.policyDocument,e[36]=W);let G;e[37]!==x||e[38]!==W?(G=(0,m.jsx)(c,{control:x,name:`policyDocument`,render:W}),e[37]=x,e[38]=W,e[39]=G):G=e[39];let K;e[40]===S.policyDocument?K=e[41]:(K=(0,m.jsx)(d,{errors:[S.policyDocument]}),e[40]=S.policyDocument,e[41]=K);let q;e[42]!==G||e[43]!==K?(q=(0,m.jsxs)(f,{children:[U,G,K]}),e[42]=G,e[43]=K,e[44]=q):q=e[44];let J;e[45]===T?J=e[46]:(J=_(T),e[45]=T,e[46]=J);let Y;e[47]===J?Y=e[48]:(Y=(0,m.jsx)(i,{commands:J}),e[47]=J,e[48]=Y);let X;e[49]===t?X=e[50]:(X=async()=>{await t({to:`/iam/list-policies`})},e[49]=t,e[50]=X);let Z;e[51]!==g.isPending||e[52]!==C||e[53]!==X?(Z=(0,m.jsx)(ne,{isPending:g.isPending,isSubmitting:C,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Policy`}),e[51]=g.isPending,e[52]=C,e[53]=X,e[54]=Z):Z=e[54];let Q;e[55]!==L||e[56]!==H||e[57]!==q||e[58]!==Y||e[59]!==Z||e[60]!==j?(Q=(0,m.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[55]=L,e[56]=H,e[57]=q,e[58]=Y,e[59]=Z,e[60]=j,e[61]=Q):Q=e[61];let $;return e[62]!==Q||e[63]!==A?($=(0,m.jsxs)(m.Fragment,{children:[O,k,A,Q]}),e[62]=Q,e[63]=A,e[64]=$):$=e[64],$}function _(e){let t=e.policyName??``,n=e.description??``,r=e.policyDocument??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-policy`},{type:`flag`,value:` \\
|
||||
--policy-name`},{type:`value`,value:` ${t||`<PolicyName>`}`}];return n&&i.push({type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${n}"`}),i.push({type:`flag`,value:` \\
|
||||
--policy-document`},{type:`value`,value:` '${r||`<PolicyDocument>`}'`}),[{label:`Create Policy`,parts:i}]}export{g as component};
|
||||
@@ -1,4 +1,4 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{u as ee}from"./iam.js";import{a as o,i as s,n as c,t as l}from"./zod.js";import{t as te}from"./error-banner.js";import{t as ne}from"./form-actions.js";import{t as re}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{t as ie}from"./json-editor.js";import{a as ae,t as p}from"./iam3.js";var m=t(),h=e();function g(){let e=(0,m.c)(65),t=n(),g=ee(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:l(ae),defaultValues:{assumeRolePolicyDocument:p}},e[0]=v):v=e[0];let{handleSubmit:y,register:b,control:x,formState:oe}=s(v),{errors:S,isSubmitting:C}=oe,w;e[1]===x?w=e[2]:(w={control:x},e[1]=x,e[2]=w);let T=o(w),E;e[3]!==g||e[4]!==t?(E=async e=>{await g.mutateAsync(e),t({to:`/iam/list-roles`})},e[3]=g,e[4]=t,e[5]=E):E=e[5];let D=E,O,k;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,h.jsx)(r,{to:`/iam/list-roles`,children:`Back to roles`}),k=(0,h.jsx)(re,{title:`Create Role`}),e[6]=O,e[7]=k):(O=e[6],k=e[7]);let A;e[8]===g.error?A=e[9]:(A=g.error&&(0,h.jsx)(te,{error:g.error,msg:`Failed to create role`}),e[8]=g.error,e[9]=A);let j;e[10]!==y||e[11]!==D?(j=y(D),e[10]=y,e[11]=D,e[12]=j):j=e[12];let M;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`roleName`,children:`Role Name`})}),e[13]=M):M=e[13];let N=!!S.roleName,P;e[14]===b?P=e[15]:(P=b(`roleName`),e[14]=b,e[15]=P);let F;e[16]!==P||e[17]!==N?(F=(0,h.jsx)(a,{"aria-invalid":N,id:`roleName`,placeholder:`my-role...`,...P}),e[16]=P,e[17]=N,e[18]=F):F=e[18];let I;e[19]===S.roleName?I=e[20]:(I=(0,h.jsx)(d,{errors:[S.roleName]}),e[19]=S.roleName,e[20]=I);let L;e[21]!==F||e[22]!==I?(L=(0,h.jsxs)(f,{children:[M,F,I]}),e[21]=F,e[22]=I,e[23]=L):L=e[23];let R;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[24]=R):R=e[24];let z;e[25]===b?z=e[26]:(z=b(`description`),e[25]=b,e[26]=z);let B;e[27]===z?B=e[28]:(B=(0,h.jsx)(a,{id:`description`,placeholder:`A brief description of this role...`,...z}),e[27]=z,e[28]=B);let V;e[29]===S.description?V=e[30]:(V=(0,h.jsx)(d,{errors:[S.description]}),e[29]=S.description,e[30]=V);let H;e[31]!==B||e[32]!==V?(H=(0,h.jsxs)(f,{children:[R,B,V]}),e[31]=B,e[32]=V,e[33]=H):H=e[33];let U;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`assumeRolePolicyDocument`,children:`Trust Policy (JSON)`})}),e[34]=U):U=e[34];let W;e[35]===S.assumeRolePolicyDocument?W=e[36]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,h.jsx)(ie,{error:!!S.assumeRolePolicyDocument,id:`assumeRolePolicyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[35]=S.assumeRolePolicyDocument,e[36]=W);let G;e[37]!==x||e[38]!==W?(G=(0,h.jsx)(c,{control:x,name:`assumeRolePolicyDocument`,render:W}),e[37]=x,e[38]=W,e[39]=G):G=e[39];let K;e[40]===S.assumeRolePolicyDocument?K=e[41]:(K=(0,h.jsx)(d,{errors:[S.assumeRolePolicyDocument]}),e[40]=S.assumeRolePolicyDocument,e[41]=K);let q;e[42]!==G||e[43]!==K?(q=(0,h.jsxs)(f,{children:[U,G,K]}),e[42]=G,e[43]=K,e[44]=q):q=e[44];let J;e[45]===T?J=e[46]:(J=_(T),e[45]=T,e[46]=J);let Y;e[47]===J?Y=e[48]:(Y=(0,h.jsx)(i,{commands:J}),e[47]=J,e[48]=Y);let X;e[49]===t?X=e[50]:(X=async()=>await t({to:`/iam/list-roles`}),e[49]=t,e[50]=X);let Z;e[51]!==g.isPending||e[52]!==C||e[53]!==X?(Z=(0,h.jsx)(ne,{isPending:g.isPending,isSubmitting:C,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Role`}),e[51]=g.isPending,e[52]=C,e[53]=X,e[54]=Z):Z=e[54];let Q;e[55]!==L||e[56]!==H||e[57]!==q||e[58]!==Y||e[59]!==Z||e[60]!==j?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[55]=L,e[56]=H,e[57]=q,e[58]=Y,e[59]=Z,e[60]=j,e[61]=Q):Q=e[61];let $;return e[62]!==Q||e[63]!==A?($=(0,h.jsxs)(h.Fragment,{children:[O,k,A,Q]}),e[62]=Q,e[63]=A,e[64]=$):$=e[64],$}function _(e){let t=e.roleName??``,n=e.description??``,r=e.assumeRolePolicyDocument??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-role`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{u as ee}from"./iam.js";import{a as o,i as s,n as c,t as l}from"./zod.js";import{t as te}from"./error-banner.js";import{t as ne}from"./form-actions.js";import{t as re}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{t as ie}from"./json-editor.js";import{a as ae,t as p}from"./iam3.js";var m=t(),h=e();function g(){let e=(0,m.c)(65),t=n(),g=ee(),v;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(v={resolver:l(ae),defaultValues:{assumeRolePolicyDocument:p}},e[0]=v):v=e[0];let{handleSubmit:y,register:b,control:x,formState:oe}=s(v),{errors:S,isSubmitting:C}=oe,w;e[1]===x?w=e[2]:(w={control:x},e[1]=x,e[2]=w);let T=o(w),E;e[3]!==g||e[4]!==t?(E=async e=>{await g.mutateAsync(e),t({to:`/iam/list-roles`})},e[3]=g,e[4]=t,e[5]=E):E=e[5];let D=E,O,k;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,h.jsx)(r,{to:`/iam/list-roles`,children:`Back to roles`}),k=(0,h.jsx)(re,{title:`Create Role`}),e[6]=O,e[7]=k):(O=e[6],k=e[7]);let A;e[8]===g.error?A=e[9]:(A=g.error&&(0,h.jsx)(te,{error:g.error,msg:`Failed to create role`}),e[8]=g.error,e[9]=A);let j;e[10]!==y||e[11]!==D?(j=y(D),e[10]=y,e[11]=D,e[12]=j):j=e[12];let M;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`roleName`,children:`Role Name`})}),e[13]=M):M=e[13];let N=!!S.roleName,P;e[14]===b?P=e[15]:(P=b(`roleName`),e[14]=b,e[15]=P);let F;e[16]!==P||e[17]!==N?(F=(0,h.jsx)(a,{"aria-invalid":N,id:`roleName`,placeholder:`my-role...`,...P}),e[16]=P,e[17]=N,e[18]=F):F=e[18];let I;e[19]===S.roleName?I=e[20]:(I=(0,h.jsx)(d,{errors:[S.roleName]}),e[19]=S.roleName,e[20]=I);let L;e[21]!==F||e[22]!==I?(L=(0,h.jsxs)(f,{children:[M,F,I]}),e[21]=F,e[22]=I,e[23]=L):L=e[23];let R;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(R=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[24]=R):R=e[24];let z;e[25]===b?z=e[26]:(z=b(`description`),e[25]=b,e[26]=z);let B;e[27]===z?B=e[28]:(B=(0,h.jsx)(a,{id:`description`,placeholder:`A brief description of this role...`,...z}),e[27]=z,e[28]=B);let V;e[29]===S.description?V=e[30]:(V=(0,h.jsx)(d,{errors:[S.description]}),e[29]=S.description,e[30]=V);let H;e[31]!==B||e[32]!==V?(H=(0,h.jsxs)(f,{children:[R,B,V]}),e[31]=B,e[32]=V,e[33]=H):H=e[33];let U;e[34]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,h.jsx)(u,{children:(0,h.jsx)(`label`,{htmlFor:`assumeRolePolicyDocument`,children:`Trust Policy (JSON)`})}),e[34]=U):U=e[34];let W;e[35]===S.assumeRolePolicyDocument?W=e[36]:(W=e=>{let{field:t}=e,{onBlur:n,onChange:r,ref:i,value:a}=t;return(0,h.jsx)(ie,{error:!!S.assumeRolePolicyDocument,id:`assumeRolePolicyDocument`,onBlur:n,onChange:r,ref:i,rows:15,value:a})},e[35]=S.assumeRolePolicyDocument,e[36]=W);let G;e[37]!==x||e[38]!==W?(G=(0,h.jsx)(c,{control:x,name:`assumeRolePolicyDocument`,render:W}),e[37]=x,e[38]=W,e[39]=G):G=e[39];let K;e[40]===S.assumeRolePolicyDocument?K=e[41]:(K=(0,h.jsx)(d,{errors:[S.assumeRolePolicyDocument]}),e[40]=S.assumeRolePolicyDocument,e[41]=K);let q;e[42]!==G||e[43]!==K?(q=(0,h.jsxs)(f,{children:[U,G,K]}),e[42]=G,e[43]=K,e[44]=q):q=e[44];let J;e[45]===T?J=e[46]:(J=_(T),e[45]=T,e[46]=J);let Y;e[47]===J?Y=e[48]:(Y=(0,h.jsx)(i,{commands:J}),e[47]=J,e[48]=Y);let X;e[49]===t?X=e[50]:(X=async()=>{await t({to:`/iam/list-roles`})},e[49]=t,e[50]=X);let Z;e[51]!==g.isPending||e[52]!==C||e[53]!==X?(Z=(0,h.jsx)(ne,{isPending:g.isPending,isSubmitting:C,onCancel:X,pendingLabel:`Creating...`,submitLabel:`Create Role`}),e[51]=g.isPending,e[52]=C,e[53]=X,e[54]=Z):Z=e[54];let Q;e[55]!==L||e[56]!==H||e[57]!==q||e[58]!==Y||e[59]!==Z||e[60]!==j?(Q=(0,h.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:j,children:[L,H,q,Y,Z]}),e[55]=L,e[56]=H,e[57]=q,e[58]=Y,e[59]=Z,e[60]=j,e[61]=Q):Q=e[61];let $;return e[62]!==Q||e[63]!==A?($=(0,h.jsxs)(h.Fragment,{children:[O,k,A,Q]}),e[62]=Q,e[63]=A,e[64]=$):$=e[64],$}function _(e){let t=e.roleName??``,n=e.description??``,r=e.assumeRolePolicyDocument??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-role`},{type:`flag`,value:` \\
|
||||
--role-name`},{type:`value`,value:` ${t||`<RoleName>`}`}];return n&&i.push({type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${n}"`}),i.push({type:`flag`,value:` \\
|
||||
--assume-role-policy-document`},{type:`value`,value:` '${r||`<TrustPolicy>`}'`}),[{label:`Create Role`,parts:i}]}export{g as component};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{nn as i}from"./cluster-config.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./input.js";import{M as f}from"./ec2.js";import{b as p}from"./ec22.js";import{i as m,n as h,t as g}from"./zod.js";import{t as _}from"./error-banner.js";import{t as v}from"./form-actions.js";import{t as y}from"./page-heading.js";import{a as b,r as x,t as S}from"./field.js";import{f as C}from"./ec23.js";var w=t(),T=e();function E(){let e=(0,w.c)(44),t=r(),{data:i}=n(f),s=p(),E;e[0]===i.Vpcs?E=e[1]:(E=i.Vpcs??[],e[0]=i.Vpcs,e[1]=E);let O=E,k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:g(C),defaultValues:{vpcId:``,name:``}},e[2]=k):k=e[2];let{control:A,handleSubmit:j,register:M,formState:N}=m(k),{errors:P,isSubmitting:F}=N,I;e[3]!==s||e[4]!==t?(I=async e=>{let n=(await s.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]=s,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)(a,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(y,{title:`Create Route Table`}),e[6]=R,e[7]=z):(R=e[6],z=e[7]);let B;e[8]===s.error?B=e[9]:(B=s.error&&(0,T.jsx)(_,{error:s.error,msg:`Failed to create Route Table`}),e[8]=s.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)(b,{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)(S,{children:[H,(0,T.jsx)(d,{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)(b,{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)(u,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,T.jsx)(l,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(o,{placeholder:`Select a VPC`})}),(0,T.jsx)(c,{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)(h,{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)(x,{errors:[P.vpcId]}),e[25]=P.vpcId,e[26]=J);let Y;e[27]!==q||e[28]!==J?(Y=(0,T.jsxs)(S,{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]!==s.isPending||e[33]!==F||e[34]!==X?(Z=(0,T.jsx)(v,{isPending:s.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),e[32]=s.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=i(e.Tags);return(0,T.jsx)(s,{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{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{nn as i}from"./cluster-config.js";import{t as a}from"./back-link.js";import{c as o,i as s,n as c,s as l,t as u}from"./select.js";import{t as d}from"./input.js";import{M as f}from"./ec2.js";import{b as p}from"./ec22.js";import{i as m,n as h,t as g}from"./zod.js";import{t as _}from"./error-banner.js";import{t as v}from"./form-actions.js";import{t as y}from"./page-heading.js";import{a as b,r as x,t as S}from"./field.js";import{f as C}from"./ec23.js";var w=t(),T=e();function E(){let e=(0,w.c)(44),t=r(),{data:i}=n(f),s=p(),E;e[0]===i.Vpcs?E=e[1]:(E=i.Vpcs??[],e[0]=i.Vpcs,e[1]=E);let O=E,k;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(k={resolver:g(C),defaultValues:{vpcId:``,name:``}},e[2]=k):k=e[2];let{control:A,handleSubmit:j,register:M,formState:N}=m(k),{errors:P,isSubmitting:F}=N,I;e[3]!==s||e[4]!==t?(I=async e=>{let n=(await s.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]=s,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)(a,{to:`/ec2/describe-route-tables`,children:`Back to Route Tables`}),z=(0,T.jsx)(y,{title:`Create Route Table`}),e[6]=R,e[7]=z):(R=e[6],z=e[7]);let B;e[8]===s.error?B=e[9]:(B=s.error&&(0,T.jsx)(_,{error:s.error,msg:`Failed to create Route Table`}),e[8]=s.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)(b,{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)(S,{children:[H,(0,T.jsx)(d,{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)(b,{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)(u,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,T.jsx)(l,{"aria-invalid":!!P.vpcId,className:`w-full`,id:`vpcId`,children:(0,T.jsx)(o,{placeholder:`Select a VPC`})}),(0,T.jsx)(c,{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)(h,{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)(x,{errors:[P.vpcId]}),e[25]=P.vpcId,e[26]=J);let Y;e[27]!==q||e[28]!==J?(Y=(0,T.jsxs)(S,{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]!==s.isPending||e[33]!==F||e[34]!==X?(Z=(0,T.jsx)(v,{isPending:s.isPending,isSubmitting:F,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Route Table`}),e[32]=s.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=i(e.Tags);return(0,T.jsx)(s,{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{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{nn as i}from"./cluster-config.js";import{t as ee}from"./back-link.js";import{c as a,i as o,n as te,s as ne,t as re}from"./select.js";import{t as ie}from"./cli-command-panel.js";import{t as s}from"./input.js";import{M as ae}from"./ec2.js";import{x as oe}from"./ec22.js";import{a as c,i as se,n as ce,t as le}from"./zod.js";import{t as ue}from"./error-banner.js";import{t as de}from"./form-actions.js";import{t as fe}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{p as pe}from"./ec23.js";var me=t(),f=e();function p(){let e=(0,me.c)(71),t=r(),{data:i}=n(ae),o=oe(),p;e[0]===i.Vpcs?p=e[1]:(p=i.Vpcs??[],e[0]=i.Vpcs,e[1]=p);let m=p,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=le(pe),e[2]=h):h=e[2];let g=m[0]?.VpcId??``,_;e[3]===g?_=e[4]:(_={resolver:h,defaultValues:{groupName:``,description:``,vpcId:g}},e[3]=g,e[4]=_);let{control:v,handleSubmit:y,register:b,formState:_e}=se(_),{errors:x,isSubmitting:S}=_e,C;e[5]===v?C=e[6]:(C={control:v},e[5]=v,e[6]=C);let w=c(C),T;e[7]!==o||e[8]!==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[7]=o,e[8]=t,e[9]=T):T=e[9];let E=T,D,O;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,f.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,f.jsx)(fe,{title:`Create Security Group`}),e[10]=D,e[11]=O):(D=e[10],O=e[11]);let k;e[12]===o.error?k=e[13]:(k=o.error&&(0,f.jsx)(ue,{error:o.error,msg:`Failed to create security group`}),e[12]=o.error,e[13]=k);let A;e[14]!==y||e[15]!==E?(A=y(E),e[14]=y,e[15]=E,e[16]=A):A=e[16];let j;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[17]=j):j=e[17];let M=!!x.groupName,N;e[18]===b?N=e[19]:(N=b(`groupName`),e[18]=b,e[19]=N);let P;e[20]!==M||e[21]!==N?(P=(0,f.jsx)(s,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),e[20]=M,e[21]=N,e[22]=P):P=e[22];let F;e[23]===x.groupName?F=e[24]:(F=(0,f.jsx)(u,{errors:[x.groupName]}),e[23]=x.groupName,e[24]=F);let I;e[25]!==P||e[26]!==F?(I=(0,f.jsxs)(d,{children:[j,P,F]}),e[25]=P,e[26]=F,e[27]=I):I=e[27];let L;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),e[28]=L):L=e[28];let R=!!x.description,z;e[29]===b?z=e[30]:(z=b(`description`),e[29]=b,e[30]=z);let B;e[31]!==R||e[32]!==z?(B=(0,f.jsx)(s,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),e[31]=R,e[32]=z,e[33]=B):B=e[33];let V;e[34]===x.description?V=e[35]:(V=(0,f.jsx)(u,{errors:[x.description]}),e[34]=x.description,e[35]=V);let H;e[36]!==B||e[37]!==V?(H=(0,f.jsxs)(d,{children:[L,B,V]}),e[36]=B,e[37]=V,e[38]=H):H=e[38];let U;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[39]=U):U=e[39];let W;e[40]!==x.vpcId||e[41]!==m?(W=e=>{let{field:t}=e;return(0,f.jsxs)(re,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,f.jsx)(ne,{"aria-invalid":!!x.vpcId,className:`w-full`,id:`vpcId`,children:(0,f.jsx)(a,{})}),(0,f.jsx)(te,{children:m.map(he)})]})},e[40]=x.vpcId,e[41]=m,e[42]=W):W=e[42];let G;e[43]!==v||e[44]!==W?(G=(0,f.jsx)(ce,{control:v,name:`vpcId`,render:W}),e[43]=v,e[44]=W,e[45]=G):G=e[45];let K;e[46]===x.vpcId?K=e[47]:(K=(0,f.jsx)(u,{errors:[x.vpcId]}),e[46]=x.vpcId,e[47]=K);let q;e[48]!==G||e[49]!==K?(q=(0,f.jsxs)(d,{children:[U,G,K]}),e[48]=G,e[49]=K,e[50]=q):q=e[50];let J;e[51]===w?J=e[52]:(J=ge(w),e[51]=w,e[52]=J);let Y;e[53]===J?Y=e[54]:(Y=(0,f.jsx)(ie,{commands:J}),e[53]=J,e[54]=Y);let X;e[55]===t?X=e[56]:(X=async()=>await t({to:`/ec2/describe-security-groups`}),e[55]=t,e[56]=X);let Z;e[57]!==o.isPending||e[58]!==S||e[59]!==X?(Z=(0,f.jsx)(de,{isPending:o.isPending,isSubmitting:S,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),e[57]=o.isPending,e[58]=S,e[59]=X,e[60]=Z):Z=e[60];let Q;e[61]!==A||e[62]!==I||e[63]!==H||e[64]!==q||e[65]!==Y||e[66]!==Z?(Q=(0,f.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),e[61]=A,e[62]=I,e[63]=H,e[64]=q,e[65]=Y,e[66]=Z,e[67]=Q):Q=e[67];let $;return e[68]!==Q||e[69]!==k?($=(0,f.jsxs)(f.Fragment,{children:[D,O,k,Q]}),e[68]=Q,e[69]=k,e[70]=$):$=e[70],$}function he(e){let t=i(e.Tags);return(0,f.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ge(e){let t=e.groupName??``,n=e.description??``,r=e.vpcId??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{nn as i}from"./cluster-config.js";import{t as ee}from"./back-link.js";import{c as a,i as o,n as te,s as ne,t as re}from"./select.js";import{t as ie}from"./cli-command-panel.js";import{t as s}from"./input.js";import{M as ae}from"./ec2.js";import{x as oe}from"./ec22.js";import{a as c,i as se,n as ce,t as le}from"./zod.js";import{t as ue}from"./error-banner.js";import{t as de}from"./form-actions.js";import{t as fe}from"./page-heading.js";import{a as l,r as u,t as d}from"./field.js";import{p as pe}from"./ec23.js";var me=t(),f=e();function p(){let e=(0,me.c)(71),t=r(),{data:i}=n(ae),o=oe(),p;e[0]===i.Vpcs?p=e[1]:(p=i.Vpcs??[],e[0]=i.Vpcs,e[1]=p);let m=p,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=le(pe),e[2]=h):h=e[2];let g=m[0]?.VpcId??``,_;e[3]===g?_=e[4]:(_={resolver:h,defaultValues:{groupName:``,description:``,vpcId:g}},e[3]=g,e[4]=_);let{control:v,handleSubmit:y,register:b,formState:_e}=se(_),{errors:x,isSubmitting:S}=_e,C;e[5]===v?C=e[6]:(C={control:v},e[5]=v,e[6]=C);let w=c(C),T;e[7]!==o||e[8]!==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[7]=o,e[8]=t,e[9]=T):T=e[9];let E=T,D,O;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,f.jsx)(ee,{to:`/ec2/describe-security-groups`,children:`Back to Security Groups`}),O=(0,f.jsx)(fe,{title:`Create Security Group`}),e[10]=D,e[11]=O):(D=e[10],O=e[11]);let k;e[12]===o.error?k=e[13]:(k=o.error&&(0,f.jsx)(ue,{error:o.error,msg:`Failed to create security group`}),e[12]=o.error,e[13]=k);let A;e[14]!==y||e[15]!==E?(A=y(E),e[14]=y,e[15]=E,e[16]=A):A=e[16];let j;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`groupName`,children:`Group Name`})}),e[17]=j):j=e[17];let M=!!x.groupName,N;e[18]===b?N=e[19]:(N=b(`groupName`),e[18]=b,e[19]=N);let P;e[20]!==M||e[21]!==N?(P=(0,f.jsx)(s,{"aria-invalid":M,id:`groupName`,placeholder:`my-security-group`,...N}),e[20]=M,e[21]=N,e[22]=P):P=e[22];let F;e[23]===x.groupName?F=e[24]:(F=(0,f.jsx)(u,{errors:[x.groupName]}),e[23]=x.groupName,e[24]=F);let I;e[25]!==P||e[26]!==F?(I=(0,f.jsxs)(d,{children:[j,P,F]}),e[25]=P,e[26]=F,e[27]=I):I=e[27];let L;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`description`,children:`Description`})}),e[28]=L):L=e[28];let R=!!x.description,z;e[29]===b?z=e[30]:(z=b(`description`),e[29]=b,e[30]=z);let B;e[31]!==R||e[32]!==z?(B=(0,f.jsx)(s,{"aria-invalid":R,id:`description`,placeholder:`My security group description`,...z}),e[31]=R,e[32]=z,e[33]=B):B=e[33];let V;e[34]===x.description?V=e[35]:(V=(0,f.jsx)(u,{errors:[x.description]}),e[34]=x.description,e[35]=V);let H;e[36]!==B||e[37]!==V?(H=(0,f.jsxs)(d,{children:[L,B,V]}),e[36]=B,e[37]=V,e[38]=H):H=e[38];let U;e[39]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,f.jsx)(l,{children:(0,f.jsx)(`label`,{htmlFor:`vpcId`,children:`VPC`})}),e[39]=U):U=e[39];let W;e[40]!==x.vpcId||e[41]!==m?(W=e=>{let{field:t}=e;return(0,f.jsxs)(re,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,f.jsx)(ne,{"aria-invalid":!!x.vpcId,className:`w-full`,id:`vpcId`,children:(0,f.jsx)(a,{})}),(0,f.jsx)(te,{children:m.map(he)})]})},e[40]=x.vpcId,e[41]=m,e[42]=W):W=e[42];let G;e[43]!==v||e[44]!==W?(G=(0,f.jsx)(ce,{control:v,name:`vpcId`,render:W}),e[43]=v,e[44]=W,e[45]=G):G=e[45];let K;e[46]===x.vpcId?K=e[47]:(K=(0,f.jsx)(u,{errors:[x.vpcId]}),e[46]=x.vpcId,e[47]=K);let q;e[48]!==G||e[49]!==K?(q=(0,f.jsxs)(d,{children:[U,G,K]}),e[48]=G,e[49]=K,e[50]=q):q=e[50];let J;e[51]===w?J=e[52]:(J=ge(w),e[51]=w,e[52]=J);let Y;e[53]===J?Y=e[54]:(Y=(0,f.jsx)(ie,{commands:J}),e[53]=J,e[54]=Y);let X;e[55]===t?X=e[56]:(X=async()=>{await t({to:`/ec2/describe-security-groups`})},e[55]=t,e[56]=X);let Z;e[57]!==o.isPending||e[58]!==S||e[59]!==X?(Z=(0,f.jsx)(de,{isPending:o.isPending,isSubmitting:S,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Security Group`}),e[57]=o.isPending,e[58]=S,e[59]=X,e[60]=Z):Z=e[60];let Q;e[61]!==A||e[62]!==I||e[63]!==H||e[64]!==q||e[65]!==Y||e[66]!==Z?(Q=(0,f.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:A,children:[I,H,q,Y,Z]}),e[61]=A,e[62]=I,e[63]=H,e[64]=q,e[65]=Y,e[66]=Z,e[67]=Q):Q=e[67];let $;return e[68]!==Q||e[69]!==k?($=(0,f.jsxs)(f.Fragment,{children:[D,O,k,Q]}),e[68]=Q,e[69]=k,e[70]=$):$=e[70],$}function he(e){let t=i(e.Tags);return(0,f.jsx)(o,{value:e.VpcId??``,children:t?`${e.VpcId} (${t})`:`${e.VpcId} (${e.CidrBlock})`},e.VpcId)}function ge(e){let t=e.groupName??``,n=e.description??``,r=e.vpcId??``,i=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-security-group`},{type:`flag`,value:` \\
|
||||
--group-name`},{type:`value`,value:` ${t||`<GroupName>`}`},{type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${n||`<Description>`}"`}];return r&&i.push({type:`flag`,value:` \\
|
||||
--vpc-id`},{type:`value`,value:` ${r}`}),[{label:`Create Security Group`,parts:i}]}export{p 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{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{t as u}from"./cli-command-panel.js";import{A as ee}from"./ec2.js";import{S as te}from"./ec22.js";import{t as ne}from"./create-snapshot.js";import{a as re,i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./error-banner.js";import{t as ce}from"./form-actions.js";import{t as le}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{m}from"./ec23.js";import{t as ue}from"./textarea.js";var h=t(),g=e();function _(){let e=(0,h.c)(53),t=r(),{data:o}=n(ee),_=te(),b;e[0]===o.Volumes?b=e[1]:(b=o.Volumes??[],e[0]=o.Volumes,e[1]=b);let x=b,{volumeId:S}=ne.useSearch(),C=S??x[0]?.VolumeId??``,w;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=oe(m),e[2]=w):w=e[2];let T;e[3]===C?T=e[4]:(T={resolver:w,defaultValues:{volumeId:C,description:``}},e[3]=C,e[4]=T);let{control:E,handleSubmit:D,register:O,formState:k}=ie(T),{errors:A,isSubmitting:j}=k,M;e[5]===E?M=e[6]:(M={control:E},e[5]=E,e[6]=M);let N=re(M),P;e[7]!==_||e[8]!==t?(P=async e=>{await _.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[7]=_,e[8]=t,e[9]=P):P=e[9];let F=P,I,L;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(i,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,g.jsx)(le,{title:`Create Snapshot`}),e[10]=I,e[11]=L):(I=e[10],L=e[11]);let R;e[12]===_.error?R=e[13]:(R=_.error&&(0,g.jsx)(se,{error:_.error,msg:`Failed to create snapshot`}),e[12]=_.error,e[13]=R);let z;e[14]!==D||e[15]!==F?(z=D(F),e[14]=D,e[15]=F,e[16]=z):z=e[16];let B;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[17]=B):B=e[17];let V;e[18]!==A.volumeId||e[19]!==x?(V=e=>{let{field:t}=e;return(0,g.jsxs)(l,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,g.jsx)(c,{"aria-invalid":!!A.volumeId,className:`w-full`,id:`volumeId`,children:(0,g.jsx)(a,{})}),(0,g.jsx)(s,{children:x.map(v)})]})},e[18]=A.volumeId,e[19]=x,e[20]=V):V=e[20];let H;e[21]!==E||e[22]!==V?(H=(0,g.jsx)(ae,{control:E,name:`volumeId`,render:V}),e[21]=E,e[22]=V,e[23]=H):H=e[23];let U;e[24]===A.volumeId?U=e[25]:(U=(0,g.jsx)(f,{errors:[A.volumeId]}),e[24]=A.volumeId,e[25]=U);let W;e[26]!==H||e[27]!==U?(W=(0,g.jsxs)(p,{children:[B,H,U]}),e[26]=H,e[27]=U,e[28]=W):W=e[28];let G;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[29]=G):G=e[29];let K;e[30]===O?K=e[31]:(K=O(`description`),e[30]=O,e[31]=K);let q;e[32]===K?q=e[33]:(q=(0,g.jsxs)(p,{children:[G,(0,g.jsx)(ue,{id:`description`,placeholder:`Snapshot description`,...K})]}),e[32]=K,e[33]=q);let J;e[34]===N?J=e[35]:(J=y(N),e[34]=N,e[35]=J);let Y;e[36]===J?Y=e[37]:(Y=(0,g.jsx)(u,{commands:J}),e[36]=J,e[37]=Y);let X;e[38]===t?X=e[39]:(X=async()=>await t({to:`/ec2/describe-snapshots`}),e[38]=t,e[39]=X);let Z;e[40]!==_.isPending||e[41]!==j||e[42]!==X?(Z=(0,g.jsx)(ce,{isPending:_.isPending,isSubmitting:j,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),e[40]=_.isPending,e[41]=j,e[42]=X,e[43]=Z):Z=e[43];let Q;e[44]!==W||e[45]!==q||e[46]!==Y||e[47]!==Z||e[48]!==z?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),e[44]=W,e[45]=q,e[46]=Y,e[47]=Z,e[48]=z,e[49]=Q):Q=e[49];let $;return e[50]!==Q||e[51]!==R?($=(0,g.jsxs)(g.Fragment,{children:[I,L,R,Q]}),e[50]=Q,e[51]=R,e[52]=$):$=e[52],$}function v(e){return(0,g.jsxs)(o,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function y(e){let t=e.volumeId??``,n=e.description??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{c as a,i as o,n as s,s as c,t as l}from"./select.js";import{t as u}from"./cli-command-panel.js";import{A as ee}from"./ec2.js";import{S as te}from"./ec22.js";import{t as ne}from"./create-snapshot.js";import{a as re,i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./error-banner.js";import{t as ce}from"./form-actions.js";import{t as le}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{m}from"./ec23.js";import{t as ue}from"./textarea.js";var h=t(),g=e();function _(){let e=(0,h.c)(53),t=r(),{data:o}=n(ee),_=te(),b;e[0]===o.Volumes?b=e[1]:(b=o.Volumes??[],e[0]=o.Volumes,e[1]=b);let x=b,{volumeId:S}=ne.useSearch(),C=S??x[0]?.VolumeId??``,w;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(w=oe(m),e[2]=w):w=e[2];let T;e[3]===C?T=e[4]:(T={resolver:w,defaultValues:{volumeId:C,description:``}},e[3]=C,e[4]=T);let{control:E,handleSubmit:D,register:O,formState:k}=ie(T),{errors:A,isSubmitting:j}=k,M;e[5]===E?M=e[6]:(M={control:E},e[5]=E,e[6]=M);let N=re(M),P;e[7]!==_||e[8]!==t?(P=async e=>{await _.mutateAsync(e),t({to:`/ec2/describe-snapshots`})},e[7]=_,e[8]=t,e[9]=P):P=e[9];let F=P,I,L;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,g.jsx)(i,{to:`/ec2/describe-snapshots`,children:`Back to snapshots`}),L=(0,g.jsx)(le,{title:`Create Snapshot`}),e[10]=I,e[11]=L):(I=e[10],L=e[11]);let R;e[12]===_.error?R=e[13]:(R=_.error&&(0,g.jsx)(se,{error:_.error,msg:`Failed to create snapshot`}),e[12]=_.error,e[13]=R);let z;e[14]!==D||e[15]!==F?(z=D(F),e[14]=D,e[15]=F,e[16]=z):z=e[16];let B;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(B=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`volumeId`,children:`Volume`})}),e[17]=B):B=e[17];let V;e[18]!==A.volumeId||e[19]!==x?(V=e=>{let{field:t}=e;return(0,g.jsxs)(l,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,g.jsx)(c,{"aria-invalid":!!A.volumeId,className:`w-full`,id:`volumeId`,children:(0,g.jsx)(a,{})}),(0,g.jsx)(s,{children:x.map(v)})]})},e[18]=A.volumeId,e[19]=x,e[20]=V):V=e[20];let H;e[21]!==E||e[22]!==V?(H=(0,g.jsx)(ae,{control:E,name:`volumeId`,render:V}),e[21]=E,e[22]=V,e[23]=H):H=e[23];let U;e[24]===A.volumeId?U=e[25]:(U=(0,g.jsx)(f,{errors:[A.volumeId]}),e[24]=A.volumeId,e[25]=U);let W;e[26]!==H||e[27]!==U?(W=(0,g.jsxs)(p,{children:[B,H,U]}),e[26]=H,e[27]=U,e[28]=W):W=e[28];let G;e[29]===Symbol.for(`react.memo_cache_sentinel`)?(G=(0,g.jsx)(d,{children:(0,g.jsx)(`label`,{htmlFor:`description`,children:`Description (optional)`})}),e[29]=G):G=e[29];let K;e[30]===O?K=e[31]:(K=O(`description`),e[30]=O,e[31]=K);let q;e[32]===K?q=e[33]:(q=(0,g.jsxs)(p,{children:[G,(0,g.jsx)(ue,{id:`description`,placeholder:`Snapshot description`,...K})]}),e[32]=K,e[33]=q);let J;e[34]===N?J=e[35]:(J=y(N),e[34]=N,e[35]=J);let Y;e[36]===J?Y=e[37]:(Y=(0,g.jsx)(u,{commands:J}),e[36]=J,e[37]=Y);let X;e[38]===t?X=e[39]:(X=async()=>{await t({to:`/ec2/describe-snapshots`})},e[38]=t,e[39]=X);let Z;e[40]!==_.isPending||e[41]!==j||e[42]!==X?(Z=(0,g.jsx)(ce,{isPending:_.isPending,isSubmitting:j,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Snapshot`}),e[40]=_.isPending,e[41]=j,e[42]=X,e[43]=Z):Z=e[43];let Q;e[44]!==W||e[45]!==q||e[46]!==Y||e[47]!==Z||e[48]!==z?(Q=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:z,children:[W,q,Y,Z]}),e[44]=W,e[45]=q,e[46]=Y,e[47]=Z,e[48]=z,e[49]=Q):Q=e[49];let $;return e[50]!==Q||e[51]!==R?($=(0,g.jsxs)(g.Fragment,{children:[I,L,R,Q]}),e[50]=Q,e[51]=R,e[52]=$):$=e[52],$}function v(e){return(0,g.jsxs)(o,{value:e.VolumeId??``,children:[e.VolumeId,` (`,e.Size,` GiB)`]},e.VolumeId)}function y(e){let t=e.volumeId??``,n=e.description??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-snapshot`},{type:`flag`,value:` \\
|
||||
--volume-id`},{type:`value`,value:` ${t||`<VolumeId>`}`}];return n&&r.push({type:`flag`,value:` \\
|
||||
--description`},{type:`value`,value:` "${n}"`}),[{label:`Create Snapshot`,parts:r}]}export{_ as component};
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{t as a}from"./cli-command-panel.js";import{M as o}from"./ec2.js";import{i as s}from"./elbv2.js";import{i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{t as p}from"./target-group-form.js";import{a as m}from"./elbv23.js";var h=t(),g=e();function _(){let e=(0,h.c)(38),t=r(),{data:_}=n(o),y=s(),b;e[0]===_.Vpcs?b=e[1]:(b=_.Vpcs??[],e[0]=_.Vpcs,e[1]=b);let x=b,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=l(m),e[2]=S):S=e[2];let C=x[0]?.VpcId??``,w,T;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(w={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},T=[],e[3]=w,e[4]=T):(w=e[3],T=e[4]);let E;e[5]===C?E=e[6]:(E={resolver:S,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:C,healthCheck:w,tags:T}},e[5]=C,e[6]=E);let D=c(E),{handleSubmit:O,watch:k,formState:A}=D,{isSubmitting:j}=A,M;e[7]!==y||e[8]!==t?(M=async e=>{try{let n=(await y.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;t(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}},e[7]=y,e[8]=t,e[9]=M):M=e[9];let N=M,P,F;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,g.jsx)(i,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),F=(0,g.jsx)(f,{title:`Create Target Group`}),e[10]=P,e[11]=F):(P=e[10],F=e[11]);let I;e[12]===y.error?I=e[13]:(I=y.error&&(0,g.jsx)(u,{error:y.error,msg:`Failed to create target group`}),e[12]=y.error,e[13]=I);let L;e[14]!==O||e[15]!==N?(L=O(N),e[14]=O,e[15]=N,e[16]=L):L=e[16];let R;e[17]!==D||e[18]!==x?(R=(0,g.jsx)(p,{form:D,vpcs:x}),e[17]=D,e[18]=x,e[19]=R):R=e[19];let z;e[20]===k?z=e[21]:(z=v(k),e[20]=k,e[21]=z);let B;e[22]===z?B=e[23]:(B=(0,g.jsx)(a,{commands:z}),e[22]=z,e[23]=B);let V;e[24]===t?V=e[25]:(V=async()=>await t({to:`/ec2/describe-target-groups`}),e[24]=t,e[25]=V);let H;e[26]!==y.isPending||e[27]!==j||e[28]!==V?(H=(0,g.jsx)(d,{isPending:y.isPending,isSubmitting:j,onCancel:V,pendingLabel:`Creating…`,submitLabel:`Create Target Group`}),e[26]=y.isPending,e[27]=j,e[28]=V,e[29]=H):H=e[29];let U;e[30]!==L||e[31]!==R||e[32]!==B||e[33]!==H?(U=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[R,B,H]}),e[30]=L,e[31]=R,e[32]=B,e[33]=H,e[34]=U):U=e[34];let W;return e[35]!==I||e[36]!==U?(W=(0,g.jsxs)(g.Fragment,{children:[P,F,I,U]}),e[35]=I,e[36]=U,e[37]=W):W=e[37],W}function v(e){let t=e(`name`),n=e(`protocol`)||`HTTP`,r=e(`port`),i=e(`vpcId`),a=e(`healthCheck.protocol`)||`HTTP`,o=e(`healthCheck.path`)||`/`,s=e(`healthCheck.port`)||`traffic-port`,c=e(`healthCheck.intervalSeconds`),l=e(`healthCheck.timeoutSeconds`),u=e(`healthCheck.healthyThresholdCount`),d=e(`healthCheck.unhealthyThresholdCount`),f=e(`healthCheck.matcher`)||`200`,p=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{t as a}from"./cli-command-panel.js";import{M as o}from"./ec2.js";import{i as s}from"./elbv2.js";import{i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{t as p}from"./target-group-form.js";import{a as m}from"./elbv23.js";var h=t(),g=e();function _(){let e=(0,h.c)(38),t=r(),{data:_}=n(o),y=s(),b;e[0]===_.Vpcs?b=e[1]:(b=_.Vpcs??[],e[0]=_.Vpcs,e[1]=b);let x=b,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=l(m),e[2]=S):S=e[2];let C=x[0]?.VpcId??``,w,T;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(w={protocol:`HTTP`,path:`/`,port:`traffic-port`,intervalSeconds:30,timeoutSeconds:5,healthyThresholdCount:5,unhealthyThresholdCount:2,matcher:`200`},T=[],e[3]=w,e[4]=T):(w=e[3],T=e[4]);let E;e[5]===C?E=e[6]:(E={resolver:S,defaultValues:{name:``,protocol:`HTTP`,port:80,vpcId:C,healthCheck:w,tags:T}},e[5]=C,e[6]=E);let D=c(E),{handleSubmit:O,watch:k,formState:A}=D,{isSubmitting:j}=A,M;e[7]!==y||e[8]!==t?(M=async e=>{try{let n=(await y.mutateAsync(e)).TargetGroups?.[0]?.TargetGroupArn;t(n?{to:`/ec2/describe-target-groups/$id`,params:{id:encodeURIComponent(n)}}:{to:`/ec2/describe-target-groups`})}catch{}},e[7]=y,e[8]=t,e[9]=M):M=e[9];let N=M,P,F;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,g.jsx)(i,{to:`/ec2/describe-target-groups`,children:`Back to target groups`}),F=(0,g.jsx)(f,{title:`Create Target Group`}),e[10]=P,e[11]=F):(P=e[10],F=e[11]);let I;e[12]===y.error?I=e[13]:(I=y.error&&(0,g.jsx)(u,{error:y.error,msg:`Failed to create target group`}),e[12]=y.error,e[13]=I);let L;e[14]!==O||e[15]!==N?(L=O(N),e[14]=O,e[15]=N,e[16]=L):L=e[16];let R;e[17]!==D||e[18]!==x?(R=(0,g.jsx)(p,{form:D,vpcs:x}),e[17]=D,e[18]=x,e[19]=R):R=e[19];let z;e[20]===k?z=e[21]:(z=v(k),e[20]=k,e[21]=z);let B;e[22]===z?B=e[23]:(B=(0,g.jsx)(a,{commands:z}),e[22]=z,e[23]=B);let V;e[24]===t?V=e[25]:(V=async()=>{await t({to:`/ec2/describe-target-groups`})},e[24]=t,e[25]=V);let H;e[26]!==y.isPending||e[27]!==j||e[28]!==V?(H=(0,g.jsx)(d,{isPending:y.isPending,isSubmitting:j,onCancel:V,pendingLabel:`Creating…`,submitLabel:`Create Target Group`}),e[26]=y.isPending,e[27]=j,e[28]=V,e[29]=H):H=e[29];let U;e[30]!==L||e[31]!==R||e[32]!==B||e[33]!==H?(U=(0,g.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:L,children:[R,B,H]}),e[30]=L,e[31]=R,e[32]=B,e[33]=H,e[34]=U):U=e[34];let W;return e[35]!==I||e[36]!==U?(W=(0,g.jsxs)(g.Fragment,{children:[P,F,I,U]}),e[35]=I,e[36]=U,e[37]=W):W=e[37],W}function v(e){let t=e(`name`),n=e(`protocol`)||`HTTP`,r=e(`port`),i=e(`vpcId`),a=e(`healthCheck.protocol`)||`HTTP`,o=e(`healthCheck.path`)||`/`,s=e(`healthCheck.port`)||`traffic-port`,c=e(`healthCheck.intervalSeconds`),l=e(`healthCheck.timeoutSeconds`),u=e(`healthCheck.healthyThresholdCount`),d=e(`healthCheck.unhealthyThresholdCount`),f=e(`healthCheck.matcher`)||`200`,p=[{type:`bin`,value:`AWS_PROFILE=spinifex aws elbv2 create-target-group`},{type:`flag`,value:` \\
|
||||
--name`},{type:`value`,value:` ${t||`<Name>`}`},{type:`flag`,value:` \\
|
||||
--protocol`},{type:`value`,value:` ${n}`},{type:`flag`,value:` \\
|
||||
--port`},{type:`value`,value:` ${r??80}`},{type:`flag`,value:` \\
|
||||
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{d as o}from"./iam.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{o as g}from"./iam3.js";var _=t(),v=e();function y(){let e=(0,_.c)(53),t=n(),y=o(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:l(g)},e[0]=x):x=e[0];let{handleSubmit:S,register:C,control:w,formState:T}=c(x),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=s(O),A;e[3]!==y||e[4]!==t?(A=async e=>{await y.mutateAsync(e),t({to:`/iam/list-users`})},e[3]=y,e[4]=t,e[5]=A):A=e[5];let j=A,M,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,v.jsx)(r,{to:`/iam/list-users`,children:`Back to users`}),N=(0,v.jsx)(f,{title:`Create User`}),e[6]=M,e[7]=N):(M=e[6],N=e[7]);let P;e[8]===y.error?P=e[9]:(P=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create user`}),e[8]=y.error,e[9]=P);let F;e[10]!==S||e[11]!==j?(F=S(j),e[10]=S,e[11]=j,e[12]=F):F=e[12];let I;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),e[13]=I):I=e[13];let L=!!E.userName,R;e[14]===C?R=e[15]:(R=C(`userName`),e[14]=C,e[15]=R);let z;e[16]!==R||e[17]!==L?(z=(0,v.jsx)(a,{"aria-invalid":L,id:`userName`,placeholder:`my-user...`,...R}),e[16]=R,e[17]=L,e[18]=z):z=e[18];let B;e[19]===E.userName?B=e[20]:(B=(0,v.jsx)(m,{errors:[E.userName]}),e[19]=E.userName,e[20]=B);let V;e[21]!==z||e[22]!==B?(V=(0,v.jsxs)(h,{children:[I,z,B]}),e[21]=z,e[22]=B,e[23]=V):V=e[23];let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[24]=H):H=e[24];let U;e[25]===C?U=e[26]:(U=C(`path`),e[25]=C,e[26]=U);let W;e[27]===U?W=e[28]:(W=(0,v.jsx)(a,{id:`path`,placeholder:`/`,...U}),e[27]=U,e[28]=W);let G;e[29]===E.path?G=e[30]:(G=(0,v.jsx)(m,{errors:[E.path]}),e[29]=E.path,e[30]=G);let K;e[31]!==W||e[32]!==G?(K=(0,v.jsxs)(h,{children:[H,W,G]}),e[31]=W,e[32]=G,e[33]=K):K=e[33];let q;e[34]===k?q=e[35]:(q=b(k),e[34]=k,e[35]=q);let J;e[36]===q?J=e[37]:(J=(0,v.jsx)(i,{commands:q}),e[36]=q,e[37]=J);let Y;e[38]===t?Y=e[39]:(Y=async()=>await t({to:`/iam/list-users`}),e[38]=t,e[39]=Y);let X;e[40]!==y.isPending||e[41]!==D||e[42]!==Y?(X=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:D,onCancel:Y,pendingLabel:`Creating...`,submitLabel:`Create User`}),e[40]=y.isPending,e[41]=D,e[42]=Y,e[43]=X):X=e[43];let Z;e[44]!==V||e[45]!==K||e[46]!==J||e[47]!==X||e[48]!==F?(Z=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,K,J,X]}),e[44]=V,e[45]=K,e[46]=J,e[47]=X,e[48]=F,e[49]=Z):Z=e[49];let Q;return e[50]!==Z||e[51]!==P?(Q=(0,v.jsxs)(v.Fragment,{children:[M,N,P,Z]}),e[50]=Z,e[51]=P,e[52]=Q):Q=e[52],Q}function b(e){let t=e.userName??``,n=e.path??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${t||`<UserName>`}`}];return n&&n!==`/`&&r.push({type:`flag`,value:` --path`},{type:`value`,value:` ${n}`}),[{label:`Create User`,parts:r}]}export{y as component};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{d as o}from"./iam.js";import{a as s,i as c,t as l}from"./zod.js";import{t as u}from"./error-banner.js";import{t as d}from"./form-actions.js";import{t as f}from"./page-heading.js";import{a as p,r as m,t as h}from"./field.js";import{o as g}from"./iam3.js";var _=t(),v=e();function y(){let e=(0,_.c)(53),t=n(),y=o(),x;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(x={resolver:l(g)},e[0]=x):x=e[0];let{handleSubmit:S,register:C,control:w,formState:T}=c(x),{errors:E,isSubmitting:D}=T,O;e[1]===w?O=e[2]:(O={control:w},e[1]=w,e[2]=O);let k=s(O),A;e[3]!==y||e[4]!==t?(A=async e=>{await y.mutateAsync(e),t({to:`/iam/list-users`})},e[3]=y,e[4]=t,e[5]=A):A=e[5];let j=A,M,N;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,v.jsx)(r,{to:`/iam/list-users`,children:`Back to users`}),N=(0,v.jsx)(f,{title:`Create User`}),e[6]=M,e[7]=N):(M=e[6],N=e[7]);let P;e[8]===y.error?P=e[9]:(P=y.error&&(0,v.jsx)(u,{error:y.error,msg:`Failed to create user`}),e[8]=y.error,e[9]=P);let F;e[10]!==S||e[11]!==j?(F=S(j),e[10]=S,e[11]=j,e[12]=F):F=e[12];let I;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`userName`,children:`User Name`})}),e[13]=I):I=e[13];let L=!!E.userName,R;e[14]===C?R=e[15]:(R=C(`userName`),e[14]=C,e[15]=R);let z;e[16]!==R||e[17]!==L?(z=(0,v.jsx)(a,{"aria-invalid":L,id:`userName`,placeholder:`my-user...`,...R}),e[16]=R,e[17]=L,e[18]=z):z=e[18];let B;e[19]===E.userName?B=e[20]:(B=(0,v.jsx)(m,{errors:[E.userName]}),e[19]=E.userName,e[20]=B);let V;e[21]!==z||e[22]!==B?(V=(0,v.jsxs)(h,{children:[I,z,B]}),e[21]=z,e[22]=B,e[23]=V):V=e[23];let H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,v.jsx)(p,{children:(0,v.jsx)(`label`,{htmlFor:`path`,children:`Path (optional)`})}),e[24]=H):H=e[24];let U;e[25]===C?U=e[26]:(U=C(`path`),e[25]=C,e[26]=U);let W;e[27]===U?W=e[28]:(W=(0,v.jsx)(a,{id:`path`,placeholder:`/`,...U}),e[27]=U,e[28]=W);let G;e[29]===E.path?G=e[30]:(G=(0,v.jsx)(m,{errors:[E.path]}),e[29]=E.path,e[30]=G);let K;e[31]!==W||e[32]!==G?(K=(0,v.jsxs)(h,{children:[H,W,G]}),e[31]=W,e[32]=G,e[33]=K):K=e[33];let q;e[34]===k?q=e[35]:(q=b(k),e[34]=k,e[35]=q);let J;e[36]===q?J=e[37]:(J=(0,v.jsx)(i,{commands:q}),e[36]=q,e[37]=J);let Y;e[38]===t?Y=e[39]:(Y=async()=>{await t({to:`/iam/list-users`})},e[38]=t,e[39]=Y);let X;e[40]!==y.isPending||e[41]!==D||e[42]!==Y?(X=(0,v.jsx)(d,{isPending:y.isPending,isSubmitting:D,onCancel:Y,pendingLabel:`Creating...`,submitLabel:`Create User`}),e[40]=y.isPending,e[41]=D,e[42]=Y,e[43]=X):X=e[43];let Z;e[44]!==V||e[45]!==K||e[46]!==J||e[47]!==X||e[48]!==F?(Z=(0,v.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:F,children:[V,K,J,X]}),e[44]=V,e[45]=K,e[46]=J,e[47]=X,e[48]=F,e[49]=Z):Z=e[49];let Q;return e[50]!==Z||e[51]!==P?(Q=(0,v.jsxs)(v.Fragment,{children:[M,N,P,Z]}),e[50]=Z,e[51]=P,e[52]=Q):Q=e[52],Q}function b(e){let t=e.userName??``,n=e.path??``,r=[{type:`bin`,value:`AWS_PROFILE=spinifex aws iam create-user`},{type:`flag`,value:` --user-name`},{type:`value`,value:` ${t||`<UserName>`}`}];return n&&n!==`/`&&r.push({type:`flag`,value:` --path`},{type:`value`,value:` ${n}`}),[{label:`Create User`,parts:r}]}export{y as component};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{c as ee,i as a,n as o,s,t as c}from"./select.js";import{t as l}from"./cli-command-panel.js";import{t as te}from"./input.js";import{r as ne}from"./ec2.js";import{w as re}from"./ec22.js";import{i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./error-banner.js";import{t as ce}from"./form-actions.js";import{t as le}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{g as p}from"./ec23.js";var m=t(),h=e();function g(){let e=(0,m.c)(57),t=r(),{data:a}=n(ne),g=re(),y;e[0]===a.AvailabilityZones?y=e[1]:(y=a.AvailabilityZones??[],e[0]=a.AvailabilityZones,e[1]=y);let b=y,x=b[0]?.ZoneName??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=oe(p),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}=ie(C),{errors:k,isSubmitting:A}=O,j;e[5]!==g||e[6]!==t?(j=async e=>{await g.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=g,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,h.jsx)(i,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,h.jsx)(le,{title:`Create Volume`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===g.error?F=e[11]:(F=g.error&&(0,h.jsx)(se,{error:g.error,msg:`Failed to create volume`}),e[10]=g.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,h.jsx)(u,{children:(0,h.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,h.jsx)(te,{"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,h.jsx)(d,{errors:[k.size]}),e[21]=k.size,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,h.jsxs)(f,{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,h.jsx)(u,{children:(0,h.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,h.jsxs)(c,{onValueChange:e=>t.onChange(e),value:t.value??``,children:[(0,h.jsx)(s,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,h.jsx)(ee,{})}),(0,h.jsx)(o,{children:b.map(_)})]})},e[27]=b,e[28]=k.availabilityZone,e[29]=W):W=e[29];let G;e[30]!==w||e[31]!==W?(G=(0,h.jsx)(ae,{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,h.jsx)(d,{errors:[k.availabilityZone]}),e[33]=k.availabilityZone,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,h.jsxs)(f,{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=v(D),e[38]=D,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,h.jsx)(l,{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]!==g.isPending||e[45]!==A||e[46]!==X?(Z=(0,h.jsx)(ce,{isPending:g.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),e[44]=g.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,h.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,h.jsxs)(h.Fragment,{children:[N,P,F,Q]}),e[54]=Q,e[55]=F,e[56]=$):$=e[56],$}function _(e){return(0,h.jsx)(a,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function v(e){let t=e(`size`),n=e(`availabilityZone`);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{t as n}from"./useSuspenseQuery.js";import{t as r}from"./useNavigate.js";import{t as i}from"./back-link.js";import{c as ee,i as a,n as o,s,t as c}from"./select.js";import{t as l}from"./cli-command-panel.js";import{t as te}from"./input.js";import{r as ne}from"./ec2.js";import{w as re}from"./ec22.js";import{i as ie,n as ae,t as oe}from"./zod.js";import{t as se}from"./error-banner.js";import{t as ce}from"./form-actions.js";import{t as le}from"./page-heading.js";import{a as u,r as d,t as f}from"./field.js";import{g as p}from"./ec23.js";var m=t(),h=e();function g(){let e=(0,m.c)(57),t=r(),{data:a}=n(ne),g=re(),y;e[0]===a.AvailabilityZones?y=e[1]:(y=a.AvailabilityZones??[],e[0]=a.AvailabilityZones,e[1]=y);let b=y,x=b[0]?.ZoneName??``,S;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(S=oe(p),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}=ie(C),{errors:k,isSubmitting:A}=O,j;e[5]!==g||e[6]!==t?(j=async e=>{await g.mutateAsync(e),t({to:`/ec2/describe-volumes`})},e[5]=g,e[6]=t,e[7]=j):j=e[7];let M=j,N,P;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,h.jsx)(i,{to:`/ec2/describe-volumes`,children:`Back to volumes`}),P=(0,h.jsx)(le,{title:`Create Volume`}),e[8]=N,e[9]=P):(N=e[8],P=e[9]);let F;e[10]===g.error?F=e[11]:(F=g.error&&(0,h.jsx)(se,{error:g.error,msg:`Failed to create volume`}),e[10]=g.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,h.jsx)(u,{children:(0,h.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,h.jsx)(te,{"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,h.jsx)(d,{errors:[k.size]}),e[21]=k.size,e[22]=V);let H;e[23]!==B||e[24]!==V?(H=(0,h.jsxs)(f,{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,h.jsx)(u,{children:(0,h.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,h.jsxs)(c,{onValueChange:e=>{t.onChange(e)},value:t.value??``,children:[(0,h.jsx)(s,{"aria-invalid":!!k.availabilityZone,className:`w-full`,id:`availabilityZone`,children:(0,h.jsx)(ee,{})}),(0,h.jsx)(o,{children:b.map(_)})]})},e[27]=b,e[28]=k.availabilityZone,e[29]=W):W=e[29];let G;e[30]!==w||e[31]!==W?(G=(0,h.jsx)(ae,{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,h.jsx)(d,{errors:[k.availabilityZone]}),e[33]=k.availabilityZone,e[34]=K);let q;e[35]!==G||e[36]!==K?(q=(0,h.jsxs)(f,{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=v(D),e[38]=D,e[39]=J);let Y;e[40]===J?Y=e[41]:(Y=(0,h.jsx)(l,{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]!==g.isPending||e[45]!==A||e[46]!==X?(Z=(0,h.jsx)(ce,{isPending:g.isPending,isSubmitting:A,onCancel:X,pendingLabel:`Creating…`,submitLabel:`Create Volume`}),e[44]=g.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,h.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,h.jsxs)(h.Fragment,{children:[N,P,F,Q]}),e[54]=Q,e[55]=F,e[56]=$):$=e[56],$}function _(e){return(0,h.jsx)(a,{value:e.ZoneName??``,children:e.ZoneName},e.ZoneName)}function v(e){let t=e(`size`),n=e(`availabilityZone`);return[{label:`Create Volume`,parts:[{type:`bin`,value:`AWS_PROFILE=spinifex aws ec2 create-volume`},{type:`flag`,value:` \\
|
||||
--size`},{type:`value`,value:` ${t||1}`},{type:`flag`,value:` \\
|
||||
--availability-zone`},{type:`value`,value:` ${n||`<AvailabilityZone>`}`}]}]}export{g as component};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./link.js";import{t as a}from"./button.js";import{t as o}from"./input.js";import{w as s,y as c}from"./rds.js";import{a as l}from"./rds2.js";import{a as u,n as d,t as f}from"./field.js";import{a as p,i as m,l as h,n as g,o as _,r as v,s as y,t as b}from"./alert-dialog.js";var x=r(),S=e(n(),1),C=t();function w(e,t=new Date){return s(e,`final`,t)}function T(e){let t=(0,x.c)(46),{open:n,onOpenChange:r,dbInstanceIdentifier:s,deletionProtection:T,onDeleted:E,onModify:D}=e,O=l(),[k,A]=(0,S.useState)(!1),j;t[0]===s?j=t[1]:(j=()=>w(s),t[0]=s,t[1]=j);let[M,N]=(0,S.useState)(j),[P,F]=(0,S.useState)(``),I;t[2]!==s||t[3]!==O||t[4]!==r?(I=function(e){e||(A(!1),N(w(s)),F(``),O.reset()),r(e)},t[2]=s,t[3]=O,t[4]=r,t[5]=I):I=t[5];let L=I,R;t[6]!==k||t[7]!==M?(R=k?void 0:c.safeParse(M).error?.issues[0]?.message,t[6]=k,t[7]=M,t[8]=R):R=t[8];let z=R,B=!(k&&P!==s)&&!z,V;t[9]!==s||t[10]!==O||t[11]!==L||t[12]!==E||t[13]!==k||t[14]!==M?(V=async function(){try{await O.mutateAsync({dbInstanceIdentifier:s,skipFinalSnapshot:k,finalSnapshotIdentifier:M}),L(!1),E?.()}catch{}},t[9]=s,t[10]=O,t[11]=L,t[12]=E,t[13]=k,t[14]=M,t[15]=V):V=t[15];let H=V,U;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,C.jsx)(h,{children:`Delete DB Instance`}),t[16]=U):U=t[16];let W=T?`"${s}" has deletion protection enabled and cannot be deleted while it is on.`:`This tears down "${s}". It cannot be undone.`,G;t[17]===W?G=t[18]:(G=(0,C.jsxs)(y,{children:[U,(0,C.jsx)(p,{children:W})]}),t[17]=W,t[18]=G);let K;t[19]!==s||t[20]!==T||t[21]!==D||t[22]!==k||t[23]!==M||t[24]!==z||t[25]!==P?(K=T?(0,C.jsxs)(`div`,{className:`space-y-3`,children:[(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Turn deletion protection off first, then delete the instance.`}),D?(0,C.jsx)(a,{onClick:D,size:`sm`,variant:`outline`,children:`Modify Instance`}):(0,C.jsxs)(i,{className:`text-sm text-primary hover:underline`,params:{id:s},to:`/rds/describe-db-instances/$id`,children:[`Open `,s,` to modify it`]})]}):(0,C.jsxs)(`div`,{className:`space-y-4`,children:[(0,C.jsxs)(`label`,{className:`flex items-start gap-2 text-sm`,children:[(0,C.jsx)(`input`,{checked:!k,onChange:e=>A(!e.target.checked),type:`checkbox`}),(0,C.jsxs)(`span`,{children:[`Take a final snapshot before deleting`,(0,C.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:`A final snapshot retains the underlying data volume until that snapshot is itself deleted.`})]})]}),k?(0,C.jsxs)(f,{children:[(0,C.jsx)(u,{children:(0,C.jsxs)(`label`,{htmlFor:`confirmIdentifier`,children:[`Type `,s,` to confirm`]})}),(0,C.jsx)(o,{id:`confirmIdentifier`,onChange:e=>F(e.target.value),placeholder:s,value:P}),(0,C.jsx)(d,{children:`Deleting without a final snapshot destroys the data volume. There is no way back.`})]}):(0,C.jsxs)(f,{children:[(0,C.jsx)(u,{children:(0,C.jsx)(`label`,{htmlFor:`finalSnapshotIdentifier`,children:`Final snapshot name`})}),(0,C.jsx)(o,{"aria-invalid":!!z,id:`finalSnapshotIdentifier`,onChange:e=>N(e.target.value),value:M}),z&&(0,C.jsx)(`p`,{className:`text-xs text-destructive`,children:z})]})]}),t[19]=s,t[20]=T,t[21]=D,t[22]=k,t[23]=M,t[24]=z,t[25]=P,t[26]=K):K=t[26];let q;t[27]===O.error?q=t[28]:(q=O.error&&(0,C.jsx)(`p`,{className:`text-sm text-destructive`,children:O.error.message}),t[27]=O.error,t[28]=q);let J;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,C.jsx)(v,{children:`Cancel`}),t[29]=J):J=t[29];let Y;t[30]!==B||t[31]!==O.isPending||t[32]!==T||t[33]!==H?(Y=!T&&(0,C.jsx)(g,{disabled:O.isPending||!B,onClick:e=>{e.preventDefault(),H()},children:O.isPending?`Deleting…`:`Delete`}),t[30]=B,t[31]=O.isPending,t[32]=T,t[33]=H,t[34]=Y):Y=t[34];let X;t[35]===Y?X=t[36]:(X=(0,C.jsxs)(_,{children:[J,Y]}),t[35]=Y,t[36]=X);let Z;t[37]!==X||t[38]!==G||t[39]!==K||t[40]!==q?(Z=(0,C.jsxs)(m,{children:[G,K,q,X]}),t[37]=X,t[38]=G,t[39]=K,t[40]=q,t[41]=Z):Z=t[41];let Q;return t[42]!==L||t[43]!==n||t[44]!==Z?(Q=(0,C.jsx)(b,{onOpenChange:L,open:n,children:Z}),t[42]=L,t[43]=n,t[44]=Z,t[45]=Q):Q=t[45],Q}export{T as t};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./link.js";import{t as a}from"./button.js";import{t as o}from"./input.js";import{w as s,y as c}from"./rds.js";import{a as l}from"./rds2.js";import{a as u,n as d,t as f}from"./field.js";import{a as p,i as m,l as h,n as g,o as _,r as v,s as y,t as b}from"./alert-dialog.js";var x=r(),S=e(n(),1),C=t();function w(e,t=new Date){return s(e,`final`,t)}function T(e){let t=(0,x.c)(46),{open:n,onOpenChange:r,dbInstanceIdentifier:s,deletionProtection:T,onDeleted:E,onModify:D}=e,O=l(),[k,A]=(0,S.useState)(!1),j;t[0]===s?j=t[1]:(j=()=>w(s),t[0]=s,t[1]=j);let[M,N]=(0,S.useState)(j),[P,F]=(0,S.useState)(``),I;t[2]!==s||t[3]!==O||t[4]!==r?(I=function(e){e||(A(!1),N(w(s)),F(``),O.reset()),r(e)},t[2]=s,t[3]=O,t[4]=r,t[5]=I):I=t[5];let L=I,R;t[6]!==k||t[7]!==M?(R=k?void 0:c.safeParse(M).error?.issues[0]?.message,t[6]=k,t[7]=M,t[8]=R):R=t[8];let z=R,B=!(k&&P!==s)&&!z,V;t[9]!==s||t[10]!==O||t[11]!==L||t[12]!==E||t[13]!==k||t[14]!==M?(V=async function(){try{await O.mutateAsync({dbInstanceIdentifier:s,skipFinalSnapshot:k,finalSnapshotIdentifier:M}),L(!1),E?.()}catch{}},t[9]=s,t[10]=O,t[11]=L,t[12]=E,t[13]=k,t[14]=M,t[15]=V):V=t[15];let H=V,U;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,C.jsx)(h,{children:`Delete DB Instance`}),t[16]=U):U=t[16];let W=T?`"${s}" has deletion protection enabled and cannot be deleted while it is on.`:`This tears down "${s}". It cannot be undone.`,G;t[17]===W?G=t[18]:(G=(0,C.jsxs)(y,{children:[U,(0,C.jsx)(p,{children:W})]}),t[17]=W,t[18]=G);let K;t[19]!==s||t[20]!==T||t[21]!==D||t[22]!==k||t[23]!==M||t[24]!==z||t[25]!==P?(K=T?(0,C.jsxs)(`div`,{className:`space-y-3`,children:[(0,C.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Turn deletion protection off first, then delete the instance.`}),D?(0,C.jsx)(a,{onClick:D,size:`sm`,variant:`outline`,children:`Modify Instance`}):(0,C.jsxs)(i,{className:`text-sm text-primary hover:underline`,params:{id:s},to:`/rds/describe-db-instances/$id`,children:[`Open `,s,` to modify it`]})]}):(0,C.jsxs)(`div`,{className:`space-y-4`,children:[(0,C.jsxs)(`label`,{className:`flex items-start gap-2 text-sm`,children:[(0,C.jsx)(`input`,{checked:!k,onChange:e=>{A(!e.target.checked)},type:`checkbox`}),(0,C.jsxs)(`span`,{children:[`Take a final snapshot before deleting`,(0,C.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:`A final snapshot retains the underlying data volume until that snapshot is itself deleted.`})]})]}),k?(0,C.jsxs)(f,{children:[(0,C.jsx)(u,{children:(0,C.jsxs)(`label`,{htmlFor:`confirmIdentifier`,children:[`Type `,s,` to confirm`]})}),(0,C.jsx)(o,{id:`confirmIdentifier`,onChange:e=>{F(e.target.value)},placeholder:s,value:P}),(0,C.jsx)(d,{children:`Deleting without a final snapshot destroys the data volume. There is no way back.`})]}):(0,C.jsxs)(f,{children:[(0,C.jsx)(u,{children:(0,C.jsx)(`label`,{htmlFor:`finalSnapshotIdentifier`,children:`Final snapshot name`})}),(0,C.jsx)(o,{"aria-invalid":!!z,id:`finalSnapshotIdentifier`,onChange:e=>{N(e.target.value)},value:M}),z&&(0,C.jsx)(`p`,{className:`text-xs text-destructive`,children:z})]})]}),t[19]=s,t[20]=T,t[21]=D,t[22]=k,t[23]=M,t[24]=z,t[25]=P,t[26]=K):K=t[26];let q;t[27]===O.error?q=t[28]:(q=O.error&&(0,C.jsx)(`p`,{className:`text-sm text-destructive`,children:O.error.message}),t[27]=O.error,t[28]=q);let J;t[29]===Symbol.for(`react.memo_cache_sentinel`)?(J=(0,C.jsx)(v,{children:`Cancel`}),t[29]=J):J=t[29];let Y;t[30]!==B||t[31]!==O.isPending||t[32]!==T||t[33]!==H?(Y=!T&&(0,C.jsx)(g,{disabled:O.isPending||!B,onClick:e=>{e.preventDefault(),H()},children:O.isPending?`Deleting…`:`Delete`}),t[30]=B,t[31]=O.isPending,t[32]=T,t[33]=H,t[34]=Y):Y=t[34];let X;t[35]===Y?X=t[36]:(X=(0,C.jsxs)(_,{children:[J,Y]}),t[35]=Y,t[36]=X);let Z;t[37]!==X||t[38]!==G||t[39]!==K||t[40]!==q?(Z=(0,C.jsxs)(m,{children:[G,K,q,X]}),t[37]=X,t[38]=G,t[39]=K,t[40]=q,t[41]=Z):Z=t[41];let Q;return t[42]!==L||t[43]!==n||t[44]!==Z?(Q=(0,C.jsx)(b,{onOpenChange:L,open:n,children:Z}),t[42]=L,t[43]=n,t[44]=Z,t[45]=Q):Q=t[45],Q}export{T as t};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{t as s}from"./button.js";import{c,m as l,p as u,u as d}from"./rds.js";import{d as f,m as p,p as m}from"./rds2.js";import{r as h}from"./rds3.js";import{t as g}from"./error-banner.js";import{t as _}from"./page-heading.js";import{t as v}from"./state-badge.js";import{t as y}from"./delete-db-instance-dialog.js";var b=r(),x=e(n(),1),S=t();function C(e){return[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}function w(){let e=(0,b.c)(19),t=o(),{data:n}=i(h),r=m(),w=p(),E=f(),[D,O]=(0,x.useState)(null),k;e[0]===n.DBInstances?k=e[1]:(k=n.DBInstances??[],e[0]=n.DBInstances,e[1]=k);let A=k,j=r.error??w.error??E.error,M;e[2]===t?M=e[3]:(M=(0,S.jsx)(_,{actions:(0,S.jsx)(s,{onClick:async()=>await t({to:`/rds/create-db-instance`}),children:`Create Database`}),title:`Databases`}),e[2]=t,e[3]=M);let N;e[4]===j?N=e[5]:(N=j&&(0,S.jsx)(g,{error:j,msg:`Failed to change the DB instance state.`}),e[4]=j,e[5]=N);let P;e[6]!==A||e[7]!==t||e[8]!==E||e[9]!==r||e[10]!==w?(P=A.length>0?(0,S.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,S.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Class`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Endpoint`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,S.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,S.jsx)(`tbody`,{children:A.map(e=>{let n=e.DBInstanceIdentifier;if(!n)return null;let i=e.DBInstanceStatus;return(0,S.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/rds/describe-db-instances/$id`,params:{id:n}}),children:[(0,S.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,S.jsx)(a,{className:`text-primary hover:underline`,onClick:T,params:{id:n},to:`/rds/describe-db-instances/$id`,children:n})}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:C(e)}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:e.DBInstanceClass}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:(0,S.jsx)(v,{state:i})}),(0,S.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.Endpoint?.Address??`—`}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,S.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,S.jsx)(s,{disabled:!u(i)||r.isPending,onClick:e=>{e.stopPropagation(),r.mutate(n)},size:`sm`,variant:`outline`,children:`Start`}),(0,S.jsx)(s,{disabled:!l(i)||w.isPending,onClick:e=>{e.stopPropagation(),w.mutate(n)},size:`sm`,variant:`outline`,children:`Stop`}),(0,S.jsx)(s,{disabled:!d(i)||E.isPending,onClick:e=>{e.stopPropagation(),E.mutate(n)},size:`sm`,variant:`outline`,children:`Reboot`}),(0,S.jsx)(s,{disabled:!c(i),onClick:t=>{t.stopPropagation(),O({identifier:n,deletionProtection:e.DeletionProtection??!1})},size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,S.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB instances found.`}),e[6]=A,e[7]=t,e[8]=E,e[9]=r,e[10]=w,e[11]=P):P=e[11];let F;e[12]===D?F=e[13]:(F=D&&(0,S.jsx)(y,{dbInstanceIdentifier:D.identifier,deletionProtection:D.deletionProtection,onOpenChange:e=>!e&&O(null),open:!0}),e[12]=D,e[13]=F);let I;return e[14]!==M||e[15]!==N||e[16]!==P||e[17]!==F?(I=(0,S.jsxs)(S.Fragment,{children:[M,N,P,F]}),e[14]=M,e[15]=N,e[16]=P,e[17]=F,e[18]=I):I=e[18],I}function T(e){return e.stopPropagation()}var E=w;export{E as component};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{t as s}from"./button.js";import{c,m as l,p as u,u as d}from"./rds.js";import{d as f,m as p,p as m}from"./rds2.js";import{r as h}from"./rds3.js";import{t as g}from"./error-banner.js";import{t as _}from"./page-heading.js";import{t as v}from"./state-badge.js";import{t as y}from"./delete-db-instance-dialog.js";var b=r(),x=e(n(),1),S=t();function C(e){return[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}function w(){let e=(0,b.c)(19),t=o(),{data:n}=i(h),r=m(),w=p(),E=f(),[D,O]=(0,x.useState)(null),k;e[0]===n.DBInstances?k=e[1]:(k=n.DBInstances??[],e[0]=n.DBInstances,e[1]=k);let A=k,j=r.error??w.error??E.error,M;e[2]===t?M=e[3]:(M=(0,S.jsx)(_,{actions:(0,S.jsx)(s,{onClick:async()=>{await t({to:`/rds/create-db-instance`})},children:`Create Database`}),title:`Databases`}),e[2]=t,e[3]=M);let N;e[4]===j?N=e[5]:(N=j&&(0,S.jsx)(g,{error:j,msg:`Failed to change the DB instance state.`}),e[4]=j,e[5]=N);let P;e[6]!==A||e[7]!==t||e[8]!==E||e[9]!==r||e[10]!==w?(P=A.length>0?(0,S.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,S.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Class`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Endpoint`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,S.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,S.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,S.jsx)(`tbody`,{children:A.map(e=>{let n=e.DBInstanceIdentifier;if(!n)return null;let i=e.DBInstanceStatus;return(0,S.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/rds/describe-db-instances/$id`,params:{id:n}})},children:[(0,S.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,S.jsx)(a,{className:`text-primary hover:underline`,onClick:T,params:{id:n},to:`/rds/describe-db-instances/$id`,children:n})}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:C(e)}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:e.DBInstanceClass}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:(0,S.jsx)(v,{state:i})}),(0,S.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.Endpoint?.Address??`—`}),(0,S.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,S.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,S.jsx)(s,{disabled:!u(i)||r.isPending,onClick:e=>{e.stopPropagation(),r.mutate(n)},size:`sm`,variant:`outline`,children:`Start`}),(0,S.jsx)(s,{disabled:!l(i)||w.isPending,onClick:e=>{e.stopPropagation(),w.mutate(n)},size:`sm`,variant:`outline`,children:`Stop`}),(0,S.jsx)(s,{disabled:!d(i)||E.isPending,onClick:e=>{e.stopPropagation(),E.mutate(n)},size:`sm`,variant:`outline`,children:`Reboot`}),(0,S.jsx)(s,{disabled:!c(i),onClick:t=>{t.stopPropagation(),O({identifier:n,deletionProtection:e.DeletionProtection??!1})},size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,S.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB instances found.`}),e[6]=A,e[7]=t,e[8]=E,e[9]=r,e[10]=w,e[11]=P):P=e[11];let F;e[12]===D?F=e[13]:(F=D&&(0,S.jsx)(y,{dbInstanceIdentifier:D.identifier,deletionProtection:D.deletionProtection,onOpenChange:e=>{e||O(null)},open:!0}),e[12]=D,e[13]=F);let I;return e[14]!==M||e[15]!==N||e[16]!==P||e[17]!==F?(I=(0,S.jsxs)(S.Fragment,{children:[M,N,P,F]}),e[14]=M,e[15]=N,e[16]=P,e[17]=F,e[18]=I):I=e[18],I}function T(e){e.stopPropagation()}var E=w;export{E as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{t as s}from"./button.js";import{b as c}from"./rds.js";import{d as l}from"./rds3.js";import{t as u}from"./page-heading.js";import{t as d}from"./delete-db-parameter-group-dialog.js";var f=r(),p=e(n(),1),m=t();function h(){let e=(0,f.c)(14),t=o(),{data:n}=i(l),[r,h]=(0,p.useState)(null),_;e[0]===n.DBParameterGroups?_=e[1]:(_=n.DBParameterGroups??[],e[0]=n.DBParameterGroups,e[1]=_);let v=_,y;e[2]===t?y=e[3]:(y=(0,m.jsx)(u,{actions:(0,m.jsx)(s,{onClick:async()=>await t({to:`/rds/create-db-parameter-group`}),children:`Create Parameter Group`}),title:`DB Parameter Groups`}),e[2]=t,e[3]=y);let b;e[4]!==v||e[5]!==t?(b=v.length>0?(0,m.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,m.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Family`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Description`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,m.jsx)(`tbody`,{children:v.map(e=>{let n=e.DBParameterGroupName;if(!n)return null;let r=c(n);return(0,m.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/rds/describe-db-parameter-groups/$name`,params:{name:n}}),children:[(0,m.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(a,{className:`text-primary hover:underline`,onClick:g,params:{name:n},to:`/rds/describe-db-parameter-groups/$name`,children:n})}),(0,m.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DBParameterGroupFamily}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:r?`Default`:`Customer`}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:e.Description}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,m.jsx)(s,{disabled:r,onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n)})})]})}):(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB parameter groups found.`}),e[4]=v,e[5]=t,e[6]=b):b=e[6];let x;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,m.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`A default group is owned by the service. It is readable and attachable but cannot be modified, deleted or tagged — create your own group to change a value.`}),e[7]=x):x=e[7];let S;e[8]===r?S=e[9]:(S=r&&(0,m.jsx)(d,{dbParameterGroupName:r,onOpenChange:e=>!e&&h(null),open:!0}),e[8]=r,e[9]=S);let C;return e[10]!==y||e[11]!==b||e[12]!==S?(C=(0,m.jsxs)(m.Fragment,{children:[y,b,x,S]}),e[10]=y,e[11]=b,e[12]=S,e[13]=C):C=e[13],C}function g(e){return e.stopPropagation()}var _=h;export{_ as component};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{t as s}from"./button.js";import{b as c}from"./rds.js";import{d as l}from"./rds3.js";import{t as u}from"./page-heading.js";import{t as d}from"./delete-db-parameter-group-dialog.js";var f=r(),p=e(n(),1),m=t();function h(){let e=(0,f.c)(14),t=o(),{data:n}=i(l),[r,h]=(0,p.useState)(null),_;e[0]===n.DBParameterGroups?_=e[1]:(_=n.DBParameterGroups??[],e[0]=n.DBParameterGroups,e[1]=_);let v=_,y;e[2]===t?y=e[3]:(y=(0,m.jsx)(u,{actions:(0,m.jsx)(s,{onClick:async()=>{await t({to:`/rds/create-db-parameter-group`})},children:`Create Parameter Group`}),title:`DB Parameter Groups`}),e[2]=t,e[3]=y);let b;e[4]!==v||e[5]!==t?(b=v.length>0?(0,m.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,m.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Family`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Description`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,m.jsx)(`tbody`,{children:v.map(e=>{let n=e.DBParameterGroupName;if(!n)return null;let r=c(n);return(0,m.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/rds/describe-db-parameter-groups/$name`,params:{name:n}})},children:[(0,m.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(a,{className:`text-primary hover:underline`,onClick:g,params:{name:n},to:`/rds/describe-db-parameter-groups/$name`,children:n})}),(0,m.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DBParameterGroupFamily}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:r?`Default`:`Customer`}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:e.Description}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,m.jsx)(s,{disabled:r,onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n)})})]})}):(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB parameter groups found.`}),e[4]=v,e[5]=t,e[6]=b):b=e[6];let x;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,m.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`A default group is owned by the service. It is readable and attachable but cannot be modified, deleted or tagged — create your own group to change a value.`}),e[7]=x):x=e[7];let S;e[8]===r?S=e[9]:(S=r&&(0,m.jsx)(d,{dbParameterGroupName:r,onOpenChange:e=>{e||h(null)},open:!0}),e[8]=r,e[9]=S);let C;return e[10]!==y||e[11]!==b||e[12]!==S?(C=(0,m.jsxs)(m.Fragment,{children:[y,b,x,S]}),e[10]=y,e[11]=b,e[12]=S,e[13]=C):C=e[13],C}function g(e){e.stopPropagation()}var _=h;export{_ as component};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{$t as s}from"./cluster-config.js";import{t as c}from"./button.js";import{a as l,d as u,l as d,o as f}from"./rds.js";import{a as p}from"./rds3.js";import{t as m}from"./page-heading.js";import{t as h}from"./state-badge.js";import{t as g}from"./create-db-snapshot-dialog.js";import{t as _}from"./delete-db-snapshot-dialog.js";var v=r(),y=e(n(),1),b=t(),x=[{value:``,label:`All types`},{value:f,label:`Manual`},{value:l,label:`Automated`}];function S(){let e=(0,v.c)(26),t=o(),{data:n}=i(p),[r,l]=(0,y.useState)(``),[f,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)(null),T;e[0]===n.DBSnapshots?T=e[1]:(T=n.DBSnapshots??[],e[0]=n.DBSnapshots,e[1]=T);let E,D,O;if(e[2]!==t||e[3]!==T||e[4]!==r){let n;e[8]===r?n=e[9]:(n=e=>r===``||e.SnapshotType===r,e[8]=r,e[9]=n);let i=T.filter(n);e[10]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,b.jsx)(m,{actions:(0,b.jsx)(c,{onClick:()=>S(!0),children:`Take Snapshot`}),title:`Snapshots`}),e[10]=E):E=e[10];let o;e[11]===r?o=e[12]:(o=x.map(e=>(0,b.jsx)(c,{onClick:()=>l(e.value),size:`sm`,variant:r===e.value?`default`:`outline`,children:e.label},e.value)),e[11]=r,e[12]=o),e[13]===o?D=e[14]:(D=(0,b.jsx)(`div`,{className:`mb-4 flex items-center gap-2`,children:o}),e[13]=o,e[14]=D),O=i.length>0?(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DB instance`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,b.jsx)(`tbody`,{children:i.map(e=>{let n=e.DBSnapshotIdentifier;if(!n)return null;let r=e.DBInstanceIdentifier??``;return(0,b.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,b.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:n},to:`/rds/describe-db-snapshots/$id`,children:n})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:r===``?`—`:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:r},to:`/rds/describe-db-instances/$id`,children:r})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:(0,b.jsx)(h,{state:e.Status})}),(0,b.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:s(e.SnapshotCreateTime)}),(0,b.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,b.jsx)(c,{disabled:!u(e.Status),onClick:async()=>await t({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:n}}),size:`sm`,variant:`outline`,children:`Restore`}),(0,b.jsx)(c,{disabled:!d(e.Status,e.SnapshotType),onClick:()=>w(n),size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB snapshots found.`}),e[2]=t,e[3]=T,e[4]=r,e[5]=E,e[6]=D,e[7]=O}else E=e[5],D=e[6],O=e[7];let k;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,b.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`Automated backups live in the reserved rds: namespace and cannot be deleted by hand — the instance's backup retention is what removes them.`}),e[15]=k):k=e[15];let A;e[16]===f?A=e[17]:(A=f&&(0,b.jsx)(g,{onOpenChange:S,open:!0}),e[16]=f,e[17]=A);let j;e[18]===C?j=e[19]:(j=C&&(0,b.jsx)(_,{dbSnapshotIdentifier:C,onOpenChange:e=>!e&&w(null),open:!0}),e[18]=C,e[19]=j);let M;return e[20]!==E||e[21]!==D||e[22]!==O||e[23]!==A||e[24]!==j?(M=(0,b.jsxs)(b.Fragment,{children:[E,D,O,k,A,j]}),e[20]=E,e[21]=D,e[22]=O,e[23]=A,e[24]=j,e[25]=M):M=e[25],M}var C=S;export{C as component};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{$t as s}from"./cluster-config.js";import{t as c}from"./button.js";import{a as l,d as u,l as d,o as f}from"./rds.js";import{a as p}from"./rds3.js";import{t as m}from"./page-heading.js";import{t as h}from"./state-badge.js";import{t as g}from"./create-db-snapshot-dialog.js";import{t as _}from"./delete-db-snapshot-dialog.js";var v=r(),y=e(n(),1),b=t(),x=[{value:``,label:`All types`},{value:f,label:`Manual`},{value:l,label:`Automated`}];function S(){let e=(0,v.c)(26),t=o(),{data:n}=i(p),[r,l]=(0,y.useState)(``),[f,S]=(0,y.useState)(!1),[C,w]=(0,y.useState)(null),T;e[0]===n.DBSnapshots?T=e[1]:(T=n.DBSnapshots??[],e[0]=n.DBSnapshots,e[1]=T);let E,D,O;if(e[2]!==t||e[3]!==T||e[4]!==r){let n;e[8]===r?n=e[9]:(n=e=>r===``||e.SnapshotType===r,e[8]=r,e[9]=n);let i=T.filter(n);e[10]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,b.jsx)(m,{actions:(0,b.jsx)(c,{onClick:()=>{S(!0)},children:`Take Snapshot`}),title:`Snapshots`}),e[10]=E):E=e[10];let o;e[11]===r?o=e[12]:(o=x.map(e=>(0,b.jsx)(c,{onClick:()=>{l(e.value)},size:`sm`,variant:r===e.value?`default`:`outline`,children:e.label},e.value)),e[11]=r,e[12]=o),e[13]===o?D=e[14]:(D=(0,b.jsx)(`div`,{className:`mb-4 flex items-center gap-2`,children:o}),e[13]=o,e[14]=D),O=i.length>0?(0,b.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,b.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,b.jsx)(`thead`,{children:(0,b.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Identifier`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`DB instance`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Type`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Engine`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Storage`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Created`}),(0,b.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,b.jsx)(`tbody`,{children:i.map(e=>{let n=e.DBSnapshotIdentifier;if(!n)return null;let r=e.DBInstanceIdentifier??``;return(0,b.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,b.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:n},to:`/rds/describe-db-snapshots/$id`,children:n})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:r===``?`—`:(0,b.jsx)(a,{className:`text-primary hover:underline`,params:{id:r},to:`/rds/describe-db-instances/$id`,children:r})}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.SnapshotType}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:[e.Engine,e.EngineVersion].filter(Boolean).join(` `)}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:e.AllocatedStorage?`${e.AllocatedStorage} GiB`:`—`}),(0,b.jsx)(`td`,{className:`px-4 py-2`,children:(0,b.jsx)(h,{state:e.Status})}),(0,b.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:s(e.SnapshotCreateTime)}),(0,b.jsxs)(`td`,{className:`space-x-2 px-4 py-2 text-right`,children:[(0,b.jsx)(c,{disabled:!u(e.Status),onClick:async()=>{await t({to:`/rds/restore-db-instance-from-db-snapshot/$id`,params:{id:n}})},size:`sm`,variant:`outline`,children:`Restore`}),(0,b.jsx)(c,{disabled:!d(e.Status,e.SnapshotType),onClick:()=>{w(n)},size:`sm`,variant:`destructive`,children:`Delete`})]})]},n)})})]})}):(0,b.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB snapshots found.`}),e[2]=t,e[3]=T,e[4]=r,e[5]=E,e[6]=D,e[7]=O}else E=e[5],D=e[6],O=e[7];let k;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,b.jsx)(`p`,{className:`mt-4 text-xs text-muted-foreground`,children:`Automated backups live in the reserved rds: namespace and cannot be deleted by hand — the instance's backup retention is what removes them.`}),e[15]=k):k=e[15];let A;e[16]===f?A=e[17]:(A=f&&(0,b.jsx)(g,{onOpenChange:S,open:!0}),e[16]=f,e[17]=A);let j;e[18]===C?j=e[19]:(j=C&&(0,b.jsx)(_,{dbSnapshotIdentifier:C,onOpenChange:e=>{e||w(null)},open:!0}),e[18]=C,e[19]=j);let M;return e[20]!==E||e[21]!==D||e[22]!==O||e[23]!==A||e[24]!==j?(M=(0,b.jsxs)(b.Fragment,{children:[E,D,O,k,A,j]}),e[20]=E,e[21]=D,e[22]=O,e[23]=A,e[24]=j,e[25]=M):M=e[25],M}var C=S;export{C as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{t as s}from"./button.js";import{h as c}from"./rds3.js";import{t as l}from"./page-heading.js";import{t as u}from"./state-badge.js";import{t as d}from"./delete-db-subnet-group-dialog.js";var f=r(),p=e(n(),1),m=t();function h(){let e=(0,f.c)(13),t=o(),{data:n}=i(c),[r,h]=(0,p.useState)(null),_;e[0]===n.DBSubnetGroups?_=e[1]:(_=n.DBSubnetGroups??[],e[0]=n.DBSubnetGroups,e[1]=_);let v=_,y;e[2]===t?y=e[3]:(y=(0,m.jsx)(l,{actions:(0,m.jsx)(s,{onClick:async()=>await t({to:`/rds/create-db-subnet-group`}),children:`Create Subnet Group`}),title:`DB Subnet Groups`}),e[2]=t,e[3]=y);let b;e[4]!==v||e[5]!==t?(b=v.length>0?(0,m.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,m.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Subnets`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Description`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,m.jsx)(`tbody`,{children:v.map(e=>{let n=e.DBSubnetGroupName;return n?(0,m.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>await t({to:`/rds/describe-db-subnet-groups/$name`,params:{name:n}}),children:[(0,m.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(a,{className:`text-primary hover:underline`,onClick:g,params:{name:n},to:`/rds/describe-db-subnet-groups/$name`,children:n})}),(0,m.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??`—`}),(0,m.jsx)(`td`,{className:`px-4 py-2`,children:e.Subnets?.length??0}),(0,m.jsx)(`td`,{className:`px-4 py-2`,children:(0,m.jsx)(u,{state:e.SubnetGroupStatus})}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:e.DBSubnetGroupDescription}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,m.jsx)(s,{onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n):null})})]})}):(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB subnet groups found. Without one, a database is placed in the account's default VPC subnet.`}),e[4]=v,e[5]=t,e[6]=b):b=e[6];let x;e[7]===r?x=e[8]:(x=r&&(0,m.jsx)(d,{dbSubnetGroupName:r,onOpenChange:e=>!e&&h(null),open:!0}),e[7]=r,e[8]=x);let S;return e[9]!==y||e[10]!==b||e[11]!==x?(S=(0,m.jsxs)(m.Fragment,{children:[y,b,x]}),e[9]=y,e[10]=b,e[11]=x,e[12]=S):S=e[12],S}function g(e){return e.stopPropagation()}var _=h;export{_ as component};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./useNavigate.js";import{t as s}from"./button.js";import{h as c}from"./rds3.js";import{t as l}from"./page-heading.js";import{t as u}from"./state-badge.js";import{t as d}from"./delete-db-subnet-group-dialog.js";var f=r(),p=e(n(),1),m=t();function h(){let e=(0,f.c)(13),t=o(),{data:n}=i(c),[r,h]=(0,p.useState)(null),_;e[0]===n.DBSubnetGroups?_=e[1]:(_=n.DBSubnetGroups??[],e[0]=n.DBSubnetGroups,e[1]=_);let v=_,y;e[2]===t?y=e[3]:(y=(0,m.jsx)(l,{actions:(0,m.jsx)(s,{onClick:async()=>{await t({to:`/rds/create-db-subnet-group`})},children:`Create Subnet Group`}),title:`DB Subnet Groups`}),e[2]=t,e[3]=y);let b;e[4]!==v||e[5]!==t?(b=v.length>0?(0,m.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,m.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,m.jsx)(`thead`,{children:(0,m.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Name`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`VPC`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Subnets`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Status`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Description`}),(0,m.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,m.jsx)(`tbody`,{children:v.map(e=>{let n=e.DBSubnetGroupName;return n?(0,m.jsxs)(`tr`,{className:`cursor-pointer border-b transition-colors last:border-0 hover:bg-accent`,onClick:async()=>{await t({to:`/rds/describe-db-subnet-groups/$name`,params:{name:n}})},children:[(0,m.jsx)(`td`,{className:`px-4 py-2 font-medium`,children:(0,m.jsx)(a,{className:`text-primary hover:underline`,onClick:g,params:{name:n},to:`/rds/describe-db-subnet-groups/$name`,children:n})}),(0,m.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??`—`}),(0,m.jsx)(`td`,{className:`px-4 py-2`,children:e.Subnets?.length??0}),(0,m.jsx)(`td`,{className:`px-4 py-2`,children:(0,m.jsx)(u,{state:e.SubnetGroupStatus})}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-muted-foreground`,children:e.DBSubnetGroupDescription}),(0,m.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,m.jsx)(s,{onClick:e=>{e.stopPropagation(),h(n)},size:`sm`,variant:`destructive`,children:`Delete`})})]},n):null})})]})}):(0,m.jsx)(`p`,{className:`text-muted-foreground`,children:`No DB subnet groups found. Without one, a database is placed in the account's default VPC subnet.`}),e[4]=v,e[5]=t,e[6]=b):b=e[6];let x;e[7]===r?x=e[8]:(x=r&&(0,m.jsx)(d,{dbSubnetGroupName:r,onOpenChange:e=>{e||h(null)},open:!0}),e[7]=r,e[8]=x);let S;return e[9]!==y||e[10]!==b||e[11]!==x?(S=(0,m.jsxs)(m.Fragment,{children:[y,b,x]}),e[9]=y,e[10]=b,e[11]=x,e[12]=S):S=e[12],S}function g(e){e.stopPropagation()}var _=h;export{_ as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./useNavigate.js";import{$t as a}from"./cluster-config.js";import{t as o}from"./button.js";import{a as s}from"./elbv22.js";import{t as c}from"./page-heading.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(10),t=i(),{data:f}=n(s),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)(c,{actions:(0,d.jsx)(o,{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 n=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(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-load-balancers/$id`,children:e.LoadBalancerName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:a(e.CreatedTime)})]},n)})})]})}):(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"./useSuspenseQuery.js";import{t as r}from"./link.js";import{t as i}from"./useNavigate.js";import{$t as a}from"./cluster-config.js";import{t as o}from"./button.js";import{a as s}from"./elbv22.js";import{t as c}from"./page-heading.js";import{t as l}from"./state-badge.js";var u=t(),d=e();function f(){let e=(0,u.c)(10),t=i(),{data:f}=n(s),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)(c,{actions:(0,d.jsx)(o,{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 n=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(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-load-balancers/$id`,children:e.LoadBalancerName??n})}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.DNSName??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:(0,d.jsx)(l,{state:e.State?.Code})}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Type??``}),(0,d.jsx)(`td`,{className:`px-4 py-2`,children:e.Scheme??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:e.VpcId??``}),(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:a(e.CreatedTime)})]},n)})})]})}):(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){e.stopPropagation()}var m=f;export{m 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"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{t as o}from"./button.js";import{d as s,u as c}from"./elbv22.js";import{t as l}from"./page-heading.js";var u=t(),d=e();function f(){let e=(0,u.c)(6),t=a(),{data:n}=r(c),s;e[0]===n.TargetGroups?s=e[1]:(s=n.TargetGroups??[],e[0]=n.TargetGroups,e[1]=s);let f=s,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(i,{to:`/ec2/create-target-group`,children:(0,d.jsx)(o,{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)(i,{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)(14),{arn:r}=e,i;t[0]===r?i=t[1]:(i=s(r),t[0]=r,t[1]=i);let{data:a,isLoading:o}=n(i);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 c;t[3]===a?.TargetHealthDescriptions?c=t[4]:(c=a?.TargetHealthDescriptions??[],t[3]=a?.TargetHealthDescriptions,t[4]=c);let l=c,f;if(t[5]!==l){let e={};for(let t of l){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}f=Object.entries(e).map(h).join(`, `)||`—`,t[5]=l,t[6]=f}else f=t[6];let p=f,m;t[7]===l.length?m=t[8]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:l.length}),t[7]=l.length,t[8]=m);let g;t[9]===p?g=t[10]:(g=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:p}),t[9]=p,t[10]=g);let _;return t[11]!==m||t[12]!==g?(_=(0,d.jsxs)(d.Fragment,{children:[m,g]}),t[11]=m,t[12]=g,t[13]=_):_=t[13],_}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"./useQuery.js";import{t as r}from"./useSuspenseQuery.js";import{t as i}from"./link.js";import{t as a}from"./useNavigate.js";import{t as o}from"./button.js";import{d as s,u as c}from"./elbv22.js";import{t as l}from"./page-heading.js";var u=t(),d=e();function f(){let e=(0,u.c)(6),t=a(),{data:n}=r(c),s;e[0]===n.TargetGroups?s=e[1]:(s=n.TargetGroups??[],e[0]=n.TargetGroups,e[1]=s);let f=s,h;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,d.jsx)(l,{actions:(0,d.jsx)(i,{to:`/ec2/create-target-group`,children:(0,d.jsx)(o,{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)(i,{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){e.stopPropagation()}function m(e){let t=(0,u.c)(14),{arn:r}=e,i;t[0]===r?i=t[1]:(i=s(r),t[0]=r,t[1]=i);let{data:a,isLoading:o}=n(i);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 c;t[3]===a?.TargetHealthDescriptions?c=t[4]:(c=a?.TargetHealthDescriptions??[],t[3]=a?.TargetHealthDescriptions,t[4]=c);let l=c,f;if(t[5]!==l){let e={};for(let t of l){let n=t.TargetHealth?.State??`unknown`;e[n]=(e[n]??0)+1}f=Object.entries(e).map(h).join(`, `)||`—`,t[5]=l,t[6]=f}else f=t[6];let p=f,m;t[7]===l.length?m=t[8]:(m=(0,d.jsx)(`td`,{className:`px-4 py-2`,children:l.length}),t[7]=l.length,t[8]=m);let g;t[9]===p?g=t[10]:(g=(0,d.jsx)(`td`,{className:`px-4 py-2 text-xs`,children:p}),t[9]=p,t[10]=g);let _;return t[11]!==m||t[12]!==g?(_=(0,d.jsxs)(d.Fragment,{children:[m,g]}),t[11]=m,t[12]=g,t[13]=_):_=t[13],_}function h(e){let[t,n]=e;return`${n} ${t}`}var g=f;export{g as component};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{tn as n}from"./cluster-config.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./select.js";var d=t(),f=e();function p(e){return(e.GpuInfo?.Gpus?.length??0)>0}function m(e){let t=new Map;for(let n of e){let e=n.InstanceType;!e||t.has(e)||t.set(e,{name:e,gpu:n.GpuInfo?.Gpus?.[0]})}return[...t.values()].toSorted((e,t)=>e.name.localeCompare(t.name))}function h(e){let t=(0,d.c)(6),{entry:r,availability:i}=e,a=r.gpu?.MemoryInfo?.SizeInMiB,o;t[0]===a?o=t[1]:(o=a!==void 0&&` — ${n(a)} GPU`,t[0]=a,t[1]=o);let s=i!==void 0&&` (${i} available)`,c;return t[2]!==r.name||t[3]!==o||t[4]!==s?(c=(0,f.jsxs)(f.Fragment,{children:[r.name,o,s]}),t[2]=r.name,t[3]=o,t[4]=s,t[5]=c):c=t[5],c}function g(e){let t=(0,d.c)(33),{instanceTypes:n,value:p,onValueChange:g,availabilityByType:y,disabled:b,id:x,className:S,"aria-invalid":C}=e,w,T;if(t[0]!==n){let e=m(n);w=e.filter(v),T=e.filter(_),t[0]=n,t[1]=w,t[2]=T}else w=t[1],T=t[2];let E;t[3]!==w||t[4]!==T?(E={standardEntries:w,gpuEntries:T},t[3]=w,t[4]=T,t[5]=E):E=t[5];let{standardEntries:D,gpuEntries:O}=E,k=D.length>0&&O.length>0,A;t[6]===g?A=t[7]:(A=e=>g(e??``),t[6]=g,t[7]=A);let j;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,f.jsx)(i,{}),t[8]=j):j=t[8];let M;t[9]!==C||t[10]!==S||t[11]!==x?(M=(0,f.jsx)(l,{"aria-invalid":C,className:S,id:x,children:j}),t[9]=C,t[10]=S,t[11]=x,t[12]=M):M=t[12];let N;t[13]!==y||t[14]!==k||t[15]!==D?(N=D.length>0&&(0,f.jsxs)(c,{children:[k&&(0,f.jsx)(r,{children:`Standard`}),D.map(e=>(0,f.jsx)(a,{value:e.name,children:(0,f.jsx)(h,{availability:y?.[e.name],entry:e})},e.name))]}),t[13]=y,t[14]=k,t[15]=D,t[16]=N):N=t[16];let P;t[17]===k?P=t[18]:(P=k&&(0,f.jsx)(s,{}),t[17]=k,t[18]=P);let F;t[19]!==y||t[20]!==O||t[21]!==k?(F=O.length>0&&(0,f.jsxs)(c,{children:[k&&(0,f.jsx)(r,{children:`GPU-Accelerated`}),O.map(e=>(0,f.jsx)(a,{value:e.name,children:(0,f.jsx)(h,{availability:y?.[e.name],entry:e})},e.name))]}),t[19]=y,t[20]=O,t[21]=k,t[22]=F):F=t[22];let I;t[23]!==N||t[24]!==P||t[25]!==F?(I=(0,f.jsxs)(o,{children:[N,P,F]}),t[23]=N,t[24]=P,t[25]=F,t[26]=I):I=t[26];let L;return t[27]!==b||t[28]!==I||t[29]!==A||t[30]!==M||t[31]!==p?(L=(0,f.jsxs)(u,{disabled:b,onValueChange:A,value:p,children:[M,I]}),t[27]=b,t[28]=I,t[29]=A,t[30]=M,t[31]=p,t[32]=L):L=t[32],L}function _(e){return e.gpu}function v(e){return!e.gpu}export{p as n,g as t};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{tn as n}from"./cluster-config.js";import{a as r,c as i,i as a,n as o,o as s,r as c,s as l,t as u}from"./select.js";var d=t(),f=e();function p(e){return(e.GpuInfo?.Gpus?.length??0)>0}function m(e){let t=new Map;for(let n of e){let e=n.InstanceType;!e||t.has(e)||t.set(e,{name:e,gpu:n.GpuInfo?.Gpus?.[0]})}return[...t.values()].toSorted((e,t)=>e.name.localeCompare(t.name))}function h(e){let t=(0,d.c)(6),{entry:r,availability:i}=e,a=r.gpu?.MemoryInfo?.SizeInMiB,o;t[0]===a?o=t[1]:(o=a!==void 0&&` — ${n(a)} GPU`,t[0]=a,t[1]=o);let s=i!==void 0&&` (${i} available)`,c;return t[2]!==r.name||t[3]!==o||t[4]!==s?(c=(0,f.jsxs)(f.Fragment,{children:[r.name,o,s]}),t[2]=r.name,t[3]=o,t[4]=s,t[5]=c):c=t[5],c}function g(e){let t=(0,d.c)(33),{instanceTypes:n,value:p,onValueChange:g,availabilityByType:y,disabled:b,id:x,className:S,"aria-invalid":C}=e,w,T;if(t[0]!==n){let e=m(n);w=e.filter(v),T=e.filter(_),t[0]=n,t[1]=w,t[2]=T}else w=t[1],T=t[2];let E;t[3]!==w||t[4]!==T?(E={standardEntries:w,gpuEntries:T},t[3]=w,t[4]=T,t[5]=E):E=t[5];let{standardEntries:D,gpuEntries:O}=E,k=D.length>0&&O.length>0,A;t[6]===g?A=t[7]:(A=e=>{g(e??``)},t[6]=g,t[7]=A);let j;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,f.jsx)(i,{}),t[8]=j):j=t[8];let M;t[9]!==C||t[10]!==S||t[11]!==x?(M=(0,f.jsx)(l,{"aria-invalid":C,className:S,id:x,children:j}),t[9]=C,t[10]=S,t[11]=x,t[12]=M):M=t[12];let N;t[13]!==y||t[14]!==k||t[15]!==D?(N=D.length>0&&(0,f.jsxs)(c,{children:[k&&(0,f.jsx)(r,{children:`Standard`}),D.map(e=>(0,f.jsx)(a,{value:e.name,children:(0,f.jsx)(h,{availability:y?.[e.name],entry:e})},e.name))]}),t[13]=y,t[14]=k,t[15]=D,t[16]=N):N=t[16];let P;t[17]===k?P=t[18]:(P=k&&(0,f.jsx)(s,{}),t[17]=k,t[18]=P);let F;t[19]!==y||t[20]!==O||t[21]!==k?(F=O.length>0&&(0,f.jsxs)(c,{children:[k&&(0,f.jsx)(r,{children:`GPU-Accelerated`}),O.map(e=>(0,f.jsx)(a,{value:e.name,children:(0,f.jsx)(h,{availability:y?.[e.name],entry:e})},e.name))]}),t[19]=y,t[20]=O,t[21]=k,t[22]=F):F=t[22];let I;t[23]!==N||t[24]!==P||t[25]!==F?(I=(0,f.jsxs)(o,{children:[N,P,F]}),t[23]=N,t[24]=P,t[25]=F,t[26]=I):I=t[26];let L;return t[27]!==b||t[28]!==I||t[29]!==A||t[30]!==M||t[31]!==p?(L=(0,f.jsxs)(u,{disabled:b,onValueChange:A,value:p,children:[M,I]}),t[27]=b,t[28]=I,t[29]=A,t[30]=M,t[31]=p,t[32]=L):L=t[32],L}function _(e){return e.gpu}function v(e){return!e.gpu}export{p as n,g as t};
|
||||
@@ -1,3 +1,3 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{q as ee}from"./ec22.js";import{a as o,i as s,t as c}from"./zod.js";import{t as l}from"./error-banner.js";import{t as te}from"./form-actions.js";import{t as u}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{v as m}from"./ec23.js";import{t as h}from"./textarea.js";var g=t(),_=e();function v(){let e=(0,g.c)(55),t=n(),v=ee(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:c(m)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=s(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=o(D),k;e[3]!==v||e[4]!==t?(k=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[3]=v,e[4]=t,e[5]=k):k=e[5];let A=k,j,M;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,_.jsx)(r,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,_.jsx)(u,{title:`Import Key Pair`}),e[6]=j,e[7]=M):(j=e[6],M=e[7]);let N;e[8]===v.error?N=e[9]:(N=v.error&&(0,_.jsx)(l,{error:v.error,msg:`Failed to import key pair`}),e[8]=v.error,e[9]=N);let P;e[10]!==x||e[11]!==A?(P=x(A),e[10]=x,e[11]=A,e[12]=P):P=e[12];let F;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[13]=F):F=e[13];let I=!!T.keyName,L;e[14]===S?L=e[15]:(L=S(`keyName`),e[14]=S,e[15]=L);let R;e[16]!==L||e[17]!==I?(R=(0,_.jsx)(a,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),e[16]=L,e[17]=I,e[18]=R):R=e[18];let z;e[19]===T.keyName?z=e[20]:(z=(0,_.jsx)(f,{errors:[T.keyName]}),e[19]=T.keyName,e[20]=z);let B;e[21]!==R||e[22]!==z?(B=(0,_.jsxs)(p,{children:[F,R,z]}),e[21]=R,e[22]=z,e[23]=B):B=e[23];let V,H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),e[24]=V,e[25]=H):(V=e[24],H=e[25]);let U=!!T.publicKeyMaterial,W;e[26]===S?W=e[27]:(W=S(`publicKeyMaterial`),e[26]=S,e[27]=W);let G;e[28]!==U||e[29]!==W?(G=(0,_.jsx)(h,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),e[28]=U,e[29]=W,e[30]=G):G=e[30];let K;e[31]===T.publicKeyMaterial?K=e[32]:(K=(0,_.jsx)(f,{errors:[T.publicKeyMaterial]}),e[31]=T.publicKeyMaterial,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,_.jsxs)(p,{children:[V,H,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===O?J=e[37]:(J=y(O),e[36]=O,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(i,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>await t({to:`/ec2/describe-key-pairs`}),e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==E||e[44]!==X?(Z=(0,_.jsx)(te,{isPending:v.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[42]=v.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==B||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==P?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),e[46]=B,e[47]=q,e[48]=Y,e[49]=Z,e[50]=P,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==N?($=(0,_.jsxs)(_.Fragment,{children:[j,M,N,Q]}),e[52]=Q,e[53]=N,e[54]=$):$=e[54],$}function y(e){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{t as n}from"./useNavigate.js";import{t as r}from"./back-link.js";import{t as i}from"./cli-command-panel.js";import{t as a}from"./input.js";import{q as ee}from"./ec22.js";import{a as o,i as s,t as c}from"./zod.js";import{t as l}from"./error-banner.js";import{t as te}from"./form-actions.js";import{t as u}from"./page-heading.js";import{a as d,r as f,t as p}from"./field.js";import{v as m}from"./ec23.js";import{t as h}from"./textarea.js";var g=t(),_=e();function v(){let e=(0,g.c)(55),t=n(),v=ee(),b;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(b={resolver:c(m)},e[0]=b):b=e[0];let{handleSubmit:x,register:S,control:C,formState:w}=s(b),{errors:T,isSubmitting:E}=w,D;e[1]===C?D=e[2]:(D={control:C},e[1]=C,e[2]=D);let O=o(D),k;e[3]!==v||e[4]!==t?(k=async e=>{await v.mutateAsync(e),t({to:`/ec2/describe-key-pairs`})},e[3]=v,e[4]=t,e[5]=k):k=e[5];let A=k,j,M;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,_.jsx)(r,{to:`/ec2/describe-key-pairs`,children:`Back to key pairs`}),M=(0,_.jsx)(u,{title:`Import Key Pair`}),e[6]=j,e[7]=M):(j=e[6],M=e[7]);let N;e[8]===v.error?N=e[9]:(N=v.error&&(0,_.jsx)(l,{error:v.error,msg:`Failed to import key pair`}),e[8]=v.error,e[9]=N);let P;e[10]!==x||e[11]!==A?(P=x(A),e[10]=x,e[11]=A,e[12]=P):P=e[12];let F;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`keyName`,children:`Key Pair Name`})}),e[13]=F):F=e[13];let I=!!T.keyName,L;e[14]===S?L=e[15]:(L=S(`keyName`),e[14]=S,e[15]=L);let R;e[16]!==L||e[17]!==I?(R=(0,_.jsx)(a,{"aria-invalid":I,id:`keyName`,placeholder:`my-key-pair…`,...L}),e[16]=L,e[17]=I,e[18]=R):R=e[18];let z;e[19]===T.keyName?z=e[20]:(z=(0,_.jsx)(f,{errors:[T.keyName]}),e[19]=T.keyName,e[20]=z);let B;e[21]!==R||e[22]!==z?(B=(0,_.jsxs)(p,{children:[F,R,z]}),e[21]=R,e[22]=z,e[23]=B):B=e[23];let V,H;e[24]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,_.jsx)(d,{children:(0,_.jsx)(`label`,{htmlFor:`publicKeyMaterial`,children:`Public Key`})}),H=(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground`,id:`publicKey-description`,children:`Paste your OpenSSH public key (e.g. the contents of id_rsa.pub)`}),e[24]=V,e[25]=H):(V=e[24],H=e[25]);let U=!!T.publicKeyMaterial,W;e[26]===S?W=e[27]:(W=S(`publicKeyMaterial`),e[26]=S,e[27]=W);let G;e[28]!==U||e[29]!==W?(G=(0,_.jsx)(h,{"aria-invalid":U,id:`publicKeyMaterial`,placeholder:`ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC…`,rows:8,...W}),e[28]=U,e[29]=W,e[30]=G):G=e[30];let K;e[31]===T.publicKeyMaterial?K=e[32]:(K=(0,_.jsx)(f,{errors:[T.publicKeyMaterial]}),e[31]=T.publicKeyMaterial,e[32]=K);let q;e[33]!==G||e[34]!==K?(q=(0,_.jsxs)(p,{children:[V,H,G,K]}),e[33]=G,e[34]=K,e[35]=q):q=e[35];let J;e[36]===O?J=e[37]:(J=y(O),e[36]=O,e[37]=J);let Y;e[38]===J?Y=e[39]:(Y=(0,_.jsx)(i,{commands:J}),e[38]=J,e[39]=Y);let X;e[40]===t?X=e[41]:(X=async()=>{await t({to:`/ec2/describe-key-pairs`})},e[40]=t,e[41]=X);let Z;e[42]!==v.isPending||e[43]!==E||e[44]!==X?(Z=(0,_.jsx)(te,{isPending:v.isPending,isSubmitting:E,onCancel:X,pendingLabel:`Importing…`,submitLabel:`Import Key Pair`}),e[42]=v.isPending,e[43]=E,e[44]=X,e[45]=Z):Z=e[45];let Q;e[46]!==B||e[47]!==q||e[48]!==Y||e[49]!==Z||e[50]!==P?(Q=(0,_.jsxs)(`form`,{className:`max-w-4xl space-y-6`,onSubmit:P,children:[B,q,Y,Z]}),e[46]=B,e[47]=q,e[48]=Y,e[49]=Z,e[50]=P,e[51]=Q):Q=e[51];let $;return e[52]!==Q||e[53]!==N?($=(0,_.jsxs)(_.Fragment,{children:[j,M,N,Q]}),e[52]=Q,e[53]=N,e[54]=$):$=e[54],$}function y(e){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:` ${(e.keyName??``)||`<KeyName>`}`},{type:`flag`,value:` \\
|
||||
--public-key-material`},{type:`value`,value:` fileb://path/to/key.pub`}]}]}export{v 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,t}from"./compiler-runtime.js";import{Xt as n}from"./cluster-config.js";import{n as r}from"./json.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{Xt as n}from"./cluster-config.js";import{n as r}from"./json.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
-2
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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"./useQuery.js";import{h as r}from"./rds2.js";import{g as i}from"./rds3.js";import{t as a}from"./tags-editor.js";var o=t(),s=e();function c(e){let t=(0,o.c)(14),{arn:c}=e,d;t[0]===c?d=t[1]:(d=i(c),t[0]=c,t[1]=d);let{data:f}=n(d),p=r(),m;t[2]===f?.TagList?m=t[3]:(m=f?.TagList??[],t[2]=f?.TagList,t[3]=m);let h=m,g;t[4]!==c||t[5]!==h||t[6]!==p?(g=e=>p.mutate({resourceName:c,tags:e,initialKeys:h.map(u).filter(l)}),t[4]=c,t[5]=h,t[6]=p,t[7]=g):g=t[7];let _;return t[8]!==g||t[9]!==h||t[10]!==p.error||t[11]!==p.isPending||t[12]!==p.isSuccess?(_=(0,s.jsx)(a,{error:p.error,isPending:p.isPending,isSuccess:p.isSuccess,onSubmit:g,tags:h}),t[8]=g,t[9]=h,t[10]=p.error,t[11]=p.isPending,t[12]=p.isSuccess,t[13]=_):_=t[13],_}function l(e){return e.length>0}function u(e){return e.Key??``}export{c as t};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./useQuery.js";import{h as r}from"./rds2.js";import{g as i}from"./rds3.js";import{t as a}from"./tags-editor.js";var o=t(),s=e();function c(e){let t=(0,o.c)(14),{arn:c}=e,d;t[0]===c?d=t[1]:(d=i(c),t[0]=c,t[1]=d);let{data:f}=n(d),p=r(),m;t[2]===f?.TagList?m=t[3]:(m=f?.TagList??[],t[2]=f?.TagList,t[3]=m);let h=m,g;t[4]!==c||t[5]!==h||t[6]!==p?(g=e=>{p.mutate({resourceName:c,tags:e,initialKeys:h.map(u).filter(l)})},t[4]=c,t[5]=h,t[6]=p,t[7]=g):g=t[7];let _;return t[8]!==g||t[9]!==h||t[10]!==p.error||t[11]!==p.isPending||t[12]!==p.isSuccess?(_=(0,s.jsx)(a,{error:p.error,isPending:p.isPending,isSuccess:p.isSuccess,onSubmit:g,tags:h}),t[8]=g,t[9]=h,t[10]=p.error,t[11]=p.isPending,t[12]=p.isSuccess,t[13]=_):_=t[13],_}function l(e){return e.length>0}function u(e){return e.Key??``}export{c as t};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
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
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{in as n}from"./cluster-config.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{n as c}from"./zod.js";import{a as l,n as u,r as d,t as f}from"./field.js";import{t as p}from"./picker-notice.js";var m=t(),h=e();function g(e){let t=(0,m.c)(13),{control:n,name:i,id:g,label:v,placeholder:y,options:b,notice:x,description:S,warning:C,onValueChange:w}=e,T;t[0]!==S||t[1]!==g||t[2]!==v||t[3]!==x||t[4]!==w||t[5]!==b||t[6]!==y||t[7]!==C?(T=e=>{let{field:t,fieldState:n}=e,i=typeof t.value==`string`?t.value:``;return(0,h.jsxs)(f,{children:[(0,h.jsx)(l,{children:(0,h.jsx)(`label`,{htmlFor:g,children:v})}),x?(0,h.jsx)(p,{notice:x}):(0,h.jsxs)(s,{onValueChange:e=>(w??t.onChange)(e??``),value:i,children:[(0,h.jsx)(o,{"aria-invalid":!!n.error,className:`w-full`,id:g,children:(0,h.jsx)(r,{placeholder:y})}),(0,h.jsx)(a,{children:b.map(_)})]}),S&&(0,h.jsx)(u,{children:S}),C&&(0,h.jsx)(`p`,{className:`text-xs text-tactical-amber`,children:C}),(0,h.jsx)(d,{errors:[n.error]})]})},t[0]=S,t[1]=g,t[2]=v,t[3]=x,t[4]=w,t[5]=b,t[6]=y,t[7]=C,t[8]=T):T=t[8];let E;return t[9]!==n||t[10]!==i||t[11]!==T?(E=(0,h.jsx)(c,{control:n,name:i,render:T}),t[9]=n,t[10]=i,t[11]=T,t[12]=E):E=t[12],E}function _(e){return(0,h.jsx)(i,{value:e.value,children:e.label},e.value)}function v(e){let t=(0,m.c)(3),{control:n,name:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,h.jsx)(c,{control:n,name:r,render:y}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function y(e){let{field:t,fieldState:n}=e;return(0,h.jsxs)(f,{children:[(0,h.jsx)(l,{children:`Deletion protection`}),(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Enable deletion protection`,checked:t.value,onChange:e=>t.onChange(e.target.checked),type:`checkbox`}),(0,h.jsx)(`span`,{children:`Refuse DeleteDBInstance while this is on`})]}),(0,h.jsx)(d,{errors:[n.error]})]})}function b(e,t,n){let r=new Set(t.filter(e=>e.Engine===n).map(e=>e.DBParameterGroupFamily));return e.filter(e=>r.has(e.DBParameterGroupFamily))}function x(e,t){return t?e.filter(e=>e.VpcId===t):[]}function S(e,t,n){let r=new Set(x(e,t).map(e=>e.GroupId));return n.filter(e=>r.has(e))}function C(e,t){return x(e,t).find(e=>e.GroupName==="default")?.GroupId}function w(e){let t=(0,m.c)(16),{emptyText:r,groups:i,onChange:a,selected:o}=e;if(i.length===0){let e;return t[0]===r?e=t[1]:(e=(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r}),t[0]=r,t[1]=e),e}let s;t[2]===o?s=t[3]:(s=new Set(o),t[2]=o,t[3]=s);let c=s,l;t[4]!==a||t[5]!==o?(l=e=>a(o.includes(e)?o.filter(t=>t!==e):[...o,e]),t[4]=a,t[5]=o,t[6]=l):l=t[6];let u=l,d;if(t[7]!==i||t[8]!==c||t[9]!==u){let e;t[11]!==c||t[12]!==u?(e=e=>(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Security group ${n(e)}`,checked:c.has(e.GroupId??``),onChange:()=>u(e.GroupId??``),type:`checkbox`}),(0,h.jsx)(`span`,{className:`font-mono`,children:n(e)})]},e.GroupId),t[11]=c,t[12]=u,t[13]=e):e=t[13],d=i.map(e),t[7]=i,t[8]=c,t[9]=u,t[10]=d}else d=t[10];let f;return t[14]===d?f=t[15]:(f=(0,h.jsx)(`div`,{className:`space-y-1`,children:d}),t[14]=d,t[15]=f),f}export{v as a,x as i,C as n,g as o,S as r,b as s,w as t};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{in as n}from"./cluster-config.js";import{c as r,i,n as a,s as o,t as s}from"./select.js";import{n as c}from"./zod.js";import{a as l,n as u,r as d,t as f}from"./field.js";import{t as p}from"./picker-notice.js";var m=t(),h=e();function g(e){let t=(0,m.c)(13),{control:n,name:i,id:g,label:v,placeholder:y,options:b,notice:x,description:S,warning:C,onValueChange:w}=e,T;t[0]!==S||t[1]!==g||t[2]!==v||t[3]!==x||t[4]!==w||t[5]!==b||t[6]!==y||t[7]!==C?(T=e=>{let{field:t,fieldState:n}=e,i=typeof t.value==`string`?t.value:``;return(0,h.jsxs)(f,{children:[(0,h.jsx)(l,{children:(0,h.jsx)(`label`,{htmlFor:g,children:v})}),x?(0,h.jsx)(p,{notice:x}):(0,h.jsxs)(s,{onValueChange:e=>{(w??t.onChange)(e??``)},value:i,children:[(0,h.jsx)(o,{"aria-invalid":!!n.error,className:`w-full`,id:g,children:(0,h.jsx)(r,{placeholder:y})}),(0,h.jsx)(a,{children:b.map(_)})]}),S&&(0,h.jsx)(u,{children:S}),C&&(0,h.jsx)(`p`,{className:`text-xs text-tactical-amber`,children:C}),(0,h.jsx)(d,{errors:[n.error]})]})},t[0]=S,t[1]=g,t[2]=v,t[3]=x,t[4]=w,t[5]=b,t[6]=y,t[7]=C,t[8]=T):T=t[8];let E;return t[9]!==n||t[10]!==i||t[11]!==T?(E=(0,h.jsx)(c,{control:n,name:i,render:T}),t[9]=n,t[10]=i,t[11]=T,t[12]=E):E=t[12],E}function _(e){return(0,h.jsx)(i,{value:e.value,children:e.label},e.value)}function v(e){let t=(0,m.c)(3),{control:n,name:r}=e,i;return t[0]!==n||t[1]!==r?(i=(0,h.jsx)(c,{control:n,name:r,render:y}),t[0]=n,t[1]=r,t[2]=i):i=t[2],i}function y(e){let{field:t,fieldState:n}=e;return(0,h.jsxs)(f,{children:[(0,h.jsx)(l,{children:`Deletion protection`}),(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Enable deletion protection`,checked:t.value,onChange:e=>{t.onChange(e.target.checked)},type:`checkbox`}),(0,h.jsx)(`span`,{children:`Refuse DeleteDBInstance while this is on`})]}),(0,h.jsx)(d,{errors:[n.error]})]})}function b(e,t,n){let r=new Set(t.filter(e=>e.Engine===n).map(e=>e.DBParameterGroupFamily));return e.filter(e=>r.has(e.DBParameterGroupFamily))}function x(e,t){return t?e.filter(e=>e.VpcId===t):[]}function S(e,t,n){let r=new Set(x(e,t).map(e=>e.GroupId));return n.filter(e=>r.has(e))}function C(e,t){return x(e,t).find(e=>e.GroupName==="default")?.GroupId}function w(e){let t=(0,m.c)(16),{emptyText:r,groups:i,onChange:a,selected:o}=e;if(i.length===0){let e;return t[0]===r?e=t[1]:(e=(0,h.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r}),t[0]=r,t[1]=e),e}let s;t[2]===o?s=t[3]:(s=new Set(o),t[2]=o,t[3]=s);let c=s,l;t[4]!==a||t[5]!==o?(l=e=>{a(o.includes(e)?o.filter(t=>t!==e):[...o,e])},t[4]=a,t[5]=o,t[6]=l):l=t[6];let u=l,d;if(t[7]!==i||t[8]!==c||t[9]!==u){let e;t[11]!==c||t[12]!==u?(e=e=>(0,h.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,h.jsx)(`input`,{"aria-label":`Security group ${n(e)}`,checked:c.has(e.GroupId??``),onChange:()=>{u(e.GroupId??``)},type:`checkbox`}),(0,h.jsx)(`span`,{className:`font-mono`,children:n(e)})]},e.GroupId),t[11]=c,t[12]=u,t[13]=e):e=t[13],d=i.map(e),t[7]=i,t[8]=c,t[9]=u,t[10]=d}else d=t[10];let f;return t[14]===d?f=t[15]:(f=(0,h.jsx)(`div`,{className:`space-y-1`,children:d}),t[14]=d,t[15]=f),f}export{v as a,x as i,C as n,g as o,S as r,b as s,w as t};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as ee}from"./plus.js";import{t as te}from"./trash-2.js";import{t as i}from"./button.js";import{t as a}from"./input.js";var ne=r(),o=e(n(),1),s=t();function re(e){return e.map((e,t)=>({id:t,key:e.Key??``,value:e.Value??``}))}function c(e){return e.map(e=>({key:e.key.trim(),value:e.value})).filter(e=>e.key.length>0)}function l(e){let t=(0,ne.c)(66),{tags:n,onSubmit:r,isPending:l,error:d,isSuccess:f}=e,p;t[0]===n?p=t[1]:(p=re(n),t[0]=n,t[1]=p);let m=p,[h,g]=(0,o.useState)(m),[_,oe]=(0,o.useState)(m.length),v;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=(e,t)=>{g(n=>n.map(n=>n.id===e?{...n,...t}:n))},t[2]=v):v=t[2];let y=v,b;t[3]===_?b=t[4]:(b=()=>{g(e=>[...e,{id:_,key:``,value:``}]),oe(ae)},t[3]=_,t[4]=b);let x=b,S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{g(t=>t.filter(t=>t.id!==e))},t[5]=S):S=t[5];let C=S,w;t[6]===m?w=t[7]:(w=()=>{g(m)},t[6]=m,t[7]=w);let T=w,E;t[8]===h?E=t[9]:(E=h.some(u),t[8]=h,t[9]=E);let D=E,O,k,A,j;if(t[10]!==D||t[11]!==h){A=c(h);let e=A.map(ie);O=new Set(e).size!==e.length,k=D||O,j=JSON.stringify(A),t[10]=D,t[11]=h,t[12]=O,t[13]=k,t[14]=A,t[15]=j}else O=t[12],k=t[13],A=t[14],j=t[15];let M;t[16]===m?M=t[17]:(M=JSON.stringify(c(m)),t[16]=m,t[17]=M);let N=j!==M,P;t[18]!==N||t[19]!==k||t[20]!==A||t[21]!==r?(P=e=>{e.preventDefault(),!(k||!N)&&r(A)},t[18]=N,t[19]=k,t[20]=A,t[21]=r,t[22]=P):P=t[22];let F;t[23]===d?F=t[24]:(F=d&&(0,s.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:d.message||`Failed to save tags`}),t[23]=d,t[24]=F);let I;t[25]!==N||t[26]!==f?(I=f&&!N&&(0,s.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Tags saved.`}),t[25]=N,t[26]=f,t[27]=I):I=t[27];let L;t[28]===h.length?L=t[29]:(L=h.length===0&&(0,s.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No tags.`}),t[28]=h.length,t[29]=L);let R;if(t[30]!==h){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>(0,s.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,s.jsx)(a,{"aria-label":`Tag key`,onChange:t=>y(e.id,{key:t.target.value}),placeholder:`Key`,value:e.key}),(0,s.jsx)(a,{"aria-label":`Tag value`,onChange:t=>y(e.id,{value:t.target.value}),placeholder:`Value`,value:e.value}),(0,s.jsx)(i,{"aria-label":`Remove tag`,onClick:()=>C(e.id),size:`icon`,type:`button`,variant:`ghost`,children:(0,s.jsx)(te,{className:`size-4`})})]},e.id),t[32]=e):e=t[32],R=h.map(e),t[30]=h,t[31]=R}else R=t[31];let z;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,s.jsx)(ee,{className:`size-4`}),t[33]=z):z=t[33];let B;t[34]===x?B=t[35]:(B=(0,s.jsx)(`div`,{children:(0,s.jsxs)(i,{onClick:x,size:`sm`,type:`button`,variant:`secondary`,children:[z,` Add tag`]})}),t[34]=x,t[35]=B);let V;t[36]===D?V=t[37]:(V=D&&(0,s.jsx)(`p`,{className:`text-xs text-destructive`,children:`Every tag with a value needs a key.`}),t[36]=D,t[37]=V);let H;t[38]===O?H=t[39]:(H=O&&(0,s.jsx)(`p`,{className:`text-xs text-destructive`,children:`Tag keys must be unique.`}),t[38]=O,t[39]=H);let U;t[40]!==L||t[41]!==R||t[42]!==B||t[43]!==V||t[44]!==H?(U=(0,s.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[L,R,B,V,H]}),t[40]=L,t[41]=R,t[42]=B,t[43]=V,t[44]=H,t[45]=U):U=t[45];let W=N?`Unsaved changes`:`No changes`,G;t[46]===W?G=t[47]:(G=(0,s.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:W}),t[46]=W,t[47]=G);let K=l||!N,q;t[48]!==T||t[49]!==K?(q=(0,s.jsx)(i,{disabled:K,onClick:T,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[48]=T,t[49]=K,t[50]=q):q=t[50];let J=l||k||!N,Y=l?`Saving…`:`Save changes`,X;t[51]!==J||t[52]!==Y?(X=(0,s.jsx)(i,{disabled:J,size:`sm`,type:`submit`,children:Y}),t[51]=J,t[52]=Y,t[53]=X):X=t[53];let Z;t[54]!==G||t[55]!==q||t[56]!==X?(Z=(0,s.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[G,q,X]}),t[54]=G,t[55]=q,t[56]=X,t[57]=Z):Z=t[57];let Q;t[58]!==U||t[59]!==Z?(Q=(0,s.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[U,Z]}),t[58]=U,t[59]=Z,t[60]=Q):Q=t[60];let $;return t[61]!==F||t[62]!==I||t[63]!==Q||t[64]!==P?($=(0,s.jsxs)(`form`,{onSubmit:P,children:[F,I,Q]}),t[61]=F,t[62]=I,t[63]=Q,t[64]=P,t[65]=$):$=t[65],$}function ie(e){return e.key}function u(e){return e.key.trim().length===0&&e.value.length>0}function ae(e){return e+1}export{l as t};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as ee}from"./plus.js";import{t as te}from"./trash-2.js";import{t as i}from"./button.js";import{t as a}from"./input.js";var ne=r(),o=e(n(),1),s=t();function re(e){return e.map((e,t)=>({id:t,key:e.Key??``,value:e.Value??``}))}function c(e){return e.map(e=>({key:e.key.trim(),value:e.value})).filter(e=>e.key.length>0)}function l(e){let t=(0,ne.c)(66),{tags:n,onSubmit:r,isPending:l,error:d,isSuccess:f}=e,p;t[0]===n?p=t[1]:(p=re(n),t[0]=n,t[1]=p);let m=p,[h,g]=(0,o.useState)(m),[_,oe]=(0,o.useState)(m.length),v;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(v=(e,t)=>{g(n=>n.map(n=>n.id===e?{...n,...t}:n))},t[2]=v):v=t[2];let y=v,b;t[3]===_?b=t[4]:(b=()=>{g(e=>[...e,{id:_,key:``,value:``}]),oe(ae)},t[3]=_,t[4]=b);let x=b,S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=e=>{g(t=>t.filter(t=>t.id!==e))},t[5]=S):S=t[5];let C=S,w;t[6]===m?w=t[7]:(w=()=>{g(m)},t[6]=m,t[7]=w);let T=w,E;t[8]===h?E=t[9]:(E=h.some(u),t[8]=h,t[9]=E);let D=E,O,k,A,j;if(t[10]!==D||t[11]!==h){A=c(h);let e=A.map(ie);O=new Set(e).size!==e.length,k=D||O,j=JSON.stringify(A),t[10]=D,t[11]=h,t[12]=O,t[13]=k,t[14]=A,t[15]=j}else O=t[12],k=t[13],A=t[14],j=t[15];let M;t[16]===m?M=t[17]:(M=JSON.stringify(c(m)),t[16]=m,t[17]=M);let N=j!==M,P;t[18]!==N||t[19]!==k||t[20]!==A||t[21]!==r?(P=e=>{e.preventDefault(),!(k||!N)&&r(A)},t[18]=N,t[19]=k,t[20]=A,t[21]=r,t[22]=P):P=t[22];let F;t[23]===d?F=t[24]:(F=d&&(0,s.jsx)(`div`,{className:`mb-4 rounded-md border border-destructive bg-destructive/10 p-3 text-sm text-destructive`,role:`alert`,children:d.message||`Failed to save tags`}),t[23]=d,t[24]=F);let I;t[25]!==N||t[26]!==f?(I=f&&!N&&(0,s.jsx)(`div`,{className:`mb-4 rounded-md border border-emerald-500 bg-emerald-500/10 p-3 text-sm text-emerald-700 dark:text-emerald-400`,role:`status`,children:`Tags saved.`}),t[25]=N,t[26]=f,t[27]=I):I=t[27];let L;t[28]===h.length?L=t[29]:(L=h.length===0&&(0,s.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No tags.`}),t[28]=h.length,t[29]=L);let R;if(t[30]!==h){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=e=>(0,s.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,s.jsx)(a,{"aria-label":`Tag key`,onChange:t=>{y(e.id,{key:t.target.value})},placeholder:`Key`,value:e.key}),(0,s.jsx)(a,{"aria-label":`Tag value`,onChange:t=>{y(e.id,{value:t.target.value})},placeholder:`Value`,value:e.value}),(0,s.jsx)(i,{"aria-label":`Remove tag`,onClick:()=>{C(e.id)},size:`icon`,type:`button`,variant:`ghost`,children:(0,s.jsx)(te,{className:`size-4`})})]},e.id),t[32]=e):e=t[32],R=h.map(e),t[30]=h,t[31]=R}else R=t[31];let z;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,s.jsx)(ee,{className:`size-4`}),t[33]=z):z=t[33];let B;t[34]===x?B=t[35]:(B=(0,s.jsx)(`div`,{children:(0,s.jsxs)(i,{onClick:x,size:`sm`,type:`button`,variant:`secondary`,children:[z,` Add tag`]})}),t[34]=x,t[35]=B);let V;t[36]===D?V=t[37]:(V=D&&(0,s.jsx)(`p`,{className:`text-xs text-destructive`,children:`Every tag with a value needs a key.`}),t[36]=D,t[37]=V);let H;t[38]===O?H=t[39]:(H=O&&(0,s.jsx)(`p`,{className:`text-xs text-destructive`,children:`Tag keys must be unique.`}),t[38]=O,t[39]=H);let U;t[40]!==L||t[41]!==R||t[42]!==B||t[43]!==V||t[44]!==H?(U=(0,s.jsxs)(`div`,{className:`flex flex-col gap-2 p-4`,children:[L,R,B,V,H]}),t[40]=L,t[41]=R,t[42]=B,t[43]=V,t[44]=H,t[45]=U):U=t[45];let W=N?`Unsaved changes`:`No changes`,G;t[46]===W?G=t[47]:(G=(0,s.jsx)(`span`,{className:`mr-auto text-xs text-muted-foreground`,children:W}),t[46]=W,t[47]=G);let K=l||!N,q;t[48]!==T||t[49]!==K?(q=(0,s.jsx)(i,{disabled:K,onClick:T,size:`sm`,type:`button`,variant:`secondary`,children:`Reset`}),t[48]=T,t[49]=K,t[50]=q):q=t[50];let J=l||k||!N,Y=l?`Saving…`:`Save changes`,X;t[51]!==J||t[52]!==Y?(X=(0,s.jsx)(i,{disabled:J,size:`sm`,type:`submit`,children:Y}),t[51]=J,t[52]=Y,t[53]=X):X=t[53];let Z;t[54]!==G||t[55]!==q||t[56]!==X?(Z=(0,s.jsxs)(`div`,{className:`flex items-center justify-end gap-2 border-t p-4`,children:[G,q,X]}),t[54]=G,t[55]=q,t[56]=X,t[57]=Z):Z=t[57];let Q;t[58]!==U||t[59]!==Z?(Q=(0,s.jsxs)(`div`,{className:`rounded-lg border bg-card`,children:[U,Z]}),t[58]=U,t[59]=Z,t[60]=Q):Q=t[60];let $;return t[61]!==F||t[62]!==I||t[63]!==Q||t[64]!==P?($=(0,s.jsxs)(`form`,{onSubmit:P,children:[F,I,Q]}),t[61]=F,t[62]=I,t[63]=Q,t[64]=P,t[65]=$):$=t[65],$}function ie(e){return e.key}function u(e){return e.key.trim().length===0&&e.value.length>0}function ae(e){return e+1}export{l as t};
|
||||
@@ -1 +1 @@
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./plus.js";import{t as r}from"./trash-2.js";import{t as i}from"./button.js";import{t as a}from"./input.js";import{n as o,r as s}from"./zod.js";import{a as c,r as l,t as u}from"./field.js";var d=t(),f=e();function p(e){let t=(0,d.c)(21),{control:a,name:l}=e,p;t[0]!==a||t[1]!==l?(p={control:a,name:l},t[0]=a,t[1]=l,t[2]=p):p=t[2];let{fields:g,append:_,remove:v}=s(p),y;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,f.jsx)(c,{children:`Tags`}),t[3]=y):y=t[3];let b;if(t[4]!==a||t[5]!==g||t[6]!==l||t[7]!==v){let e;t[9]!==a||t[10]!==l||t[11]!==v?(e=(e,t)=>(0,f.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,f.jsx)(o,{control:a,name:`${l}.${t}.key`,render:h}),(0,f.jsx)(o,{control:a,name:`${l}.${t}.value`,render:m}),(0,f.jsx)(i,{"aria-label":`Remove tag ${t+1}`,onClick:()=>v(t),size:`icon`,type:`button`,variant:`ghost`,children:(0,f.jsx)(r,{className:`size-3.5`})})]},e.id),t[9]=a,t[10]=l,t[11]=v,t[12]=e):e=t[12],b=g.map(e),t[4]=a,t[5]=g,t[6]=l,t[7]=v,t[8]=b}else b=t[8];let x;t[13]===_?x=t[14]:(x=()=>_({key:``,value:``}),t[13]=_,t[14]=x);let S;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,f.jsx)(n,{className:`size-3.5`}),t[15]=S):S=t[15];let C;t[16]===x?C=t[17]:(C=(0,f.jsxs)(i,{onClick:x,size:`sm`,type:`button`,variant:`outline`,children:[S,`Add Tag`]}),t[16]=x,t[17]=C);let w;return t[18]!==b||t[19]!==C?(w=(0,f.jsxs)(u,{children:[y,(0,f.jsxs)(`div`,{className:`space-y-2`,children:[b,C]})]}),t[18]=b,t[19]=C,t[20]=w):w=t[20],w}function m(e){let{field:t,fieldState:n}=e;return(0,f.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,f.jsx)(a,{"aria-invalid":!!n.error,placeholder:`Value`,...t}),(0,f.jsx)(l,{errors:[n.error]})]})}function h(e){let{field:t,fieldState:n}=e;return(0,f.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,f.jsx)(a,{"aria-invalid":!!n.error,placeholder:`Key`,...t}),(0,f.jsx)(l,{errors:[n.error]})]})}export{p as t};
|
||||
import{n as e,t}from"./compiler-runtime.js";import{t as n}from"./plus.js";import{t as r}from"./trash-2.js";import{t as i}from"./button.js";import{t as a}from"./input.js";import{n as o,r as s}from"./zod.js";import{a as c,r as l,t as u}from"./field.js";var d=t(),f=e();function p(e){let t=(0,d.c)(21),{control:a,name:l}=e,p;t[0]!==a||t[1]!==l?(p={control:a,name:l},t[0]=a,t[1]=l,t[2]=p):p=t[2];let{fields:g,append:_,remove:v}=s(p),y;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,f.jsx)(c,{children:`Tags`}),t[3]=y):y=t[3];let b;if(t[4]!==a||t[5]!==g||t[6]!==l||t[7]!==v){let e;t[9]!==a||t[10]!==l||t[11]!==v?(e=(e,t)=>(0,f.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,f.jsx)(o,{control:a,name:`${l}.${t}.key`,render:h}),(0,f.jsx)(o,{control:a,name:`${l}.${t}.value`,render:m}),(0,f.jsx)(i,{"aria-label":`Remove tag ${t+1}`,onClick:()=>{v(t)},size:`icon`,type:`button`,variant:`ghost`,children:(0,f.jsx)(r,{className:`size-3.5`})})]},e.id),t[9]=a,t[10]=l,t[11]=v,t[12]=e):e=t[12],b=g.map(e),t[4]=a,t[5]=g,t[6]=l,t[7]=v,t[8]=b}else b=t[8];let x;t[13]===_?x=t[14]:(x=()=>{_({key:``,value:``})},t[13]=_,t[14]=x);let S;t[15]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,f.jsx)(n,{className:`size-3.5`}),t[15]=S):S=t[15];let C;t[16]===x?C=t[17]:(C=(0,f.jsxs)(i,{onClick:x,size:`sm`,type:`button`,variant:`outline`,children:[S,`Add Tag`]}),t[16]=x,t[17]=C);let w;return t[18]!==b||t[19]!==C?(w=(0,f.jsxs)(u,{children:[y,(0,f.jsxs)(`div`,{className:`space-y-2`,children:[b,C]})]}),t[18]=b,t[19]=C,t[20]=w):w=t[20],w}function m(e){let{field:t,fieldState:n}=e;return(0,f.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,f.jsx)(a,{"aria-invalid":!!n.error,placeholder:`Value`,...t}),(0,f.jsx)(l,{errors:[n.error]})]})}function h(e){let{field:t,fieldState:n}=e;return(0,f.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,f.jsx)(a,{"aria-invalid":!!n.error,placeholder:`Key`,...t}),(0,f.jsx)(l,{errors:[n.error]})]})}export{p as t};
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./button.js";import{o as s}from"./ecs.js";import{a as c}from"./ecs2.js";import{t as l}from"./error-banner.js";import{t as u}from"./page-heading.js";import{t as d}from"./delete-confirmation-dialog.js";import{t as f}from"./ecs-section-nav.js";var p=r(),m=e(n(),1),h=t();function g(e){return e.split(`/`).at(-1)??e}function _(e){let t=(0,p.c)(24),{clusterName:n}=e,{data:r}=i(s),u=c(),[f,_]=(0,m.useState)(null),v;t[0]!==u||t[1]!==f?(v=function(){f&&u.mutate(f,{onSuccess:()=>_(null)})},t[0]=u,t[1]=f,t[2]=v):v=t[2];let y=v,b=n??``,x;t[3]===b?x=t[4]:(x={cluster:b},t[3]=b,t[4]=x);let S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(o,{size:`sm`,children:`Register task definition`}),t[5]=S):S=t[5];let C;t[6]===x?C=t[7]:(C=(0,h.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,h.jsx)(a,{search:x,to:`/ecs/register-task-definition`,children:S})}),t[6]=x,t[7]=C);let w;t[8]!==u.error||t[9]!==u.isError?(w=u.isError&&(0,h.jsx)(l,{error:u.error instanceof Error?u.error:void 0,msg:`Failed to deregister task definition.`}),t[8]=u.error,t[9]=u.isError,t[10]=w):w=t[10];let T;t[11]===r?T=t[12]:(T=r.length===0?(0,h.jsx)(`p`,{className:`text-muted-foreground`,children:`No task definitions found.`}):(0,h.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,h.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Family : Revision`}),(0,h.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,h.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,h.jsx)(`tbody`,{children:r.map(e=>{let t=g(e);return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,h.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,h.jsx)(o,{onClick:()=>_(t),size:`sm`,variant:`destructive`,children:`Deregister`})})]},e)})})]})}),t[11]=r,t[12]=T);let E=`This marks task definition "${f}" INACTIVE. Existing tasks keep running; no new tasks can use it.`,D;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>!e&&_(null),t[13]=D):D=t[13];let O=f!==null,k;t[14]!==u.isPending||t[15]!==y||t[16]!==O||t[17]!==E?(k=(0,h.jsx)(d,{confirmLabel:`Deregister`,description:E,isPending:u.isPending,onConfirm:y,onOpenChange:D,open:O,pendingLabel:`Deregistering…`,title:`Deregister task definition`}),t[14]=u.isPending,t[15]=y,t[16]=O,t[17]=E,t[18]=k):k=t[18];let A;return t[19]!==k||t[20]!==C||t[21]!==w||t[22]!==T?(A=(0,h.jsxs)(h.Fragment,{children:[C,w,T,k]}),t[19]=k,t[20]=C,t[21]=w,t[22]=T,t[23]=A):A=t[23],A}function v(){let e=(0,p.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u,{title:`Task definitions`}),(0,h.jsx)(f,{}),(0,h.jsx)(_,{})]}),e[0]=t):t=e[0],t}var y=v;export{y as component};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./useSuspenseQuery.js";import{t as a}from"./link.js";import{t as o}from"./button.js";import{o as s}from"./ecs.js";import{a as c}from"./ecs2.js";import{t as l}from"./error-banner.js";import{t as u}from"./page-heading.js";import{t as d}from"./delete-confirmation-dialog.js";import{t as f}from"./ecs-section-nav.js";var p=r(),m=e(n(),1),h=t();function g(e){return e.split(`/`).at(-1)??e}function _(e){let t=(0,p.c)(24),{clusterName:n}=e,{data:r}=i(s),u=c(),[f,_]=(0,m.useState)(null),v;t[0]!==u||t[1]!==f?(v=function(){f&&u.mutate(f,{onSuccess:()=>{_(null)}})},t[0]=u,t[1]=f,t[2]=v):v=t[2];let y=v,b=n??``,x;t[3]===b?x=t[4]:(x={cluster:b},t[3]=b,t[4]=x);let S;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,h.jsx)(o,{size:`sm`,children:`Register task definition`}),t[5]=S):S=t[5];let C;t[6]===x?C=t[7]:(C=(0,h.jsx)(`div`,{className:`mb-4 flex justify-end`,children:(0,h.jsx)(a,{search:x,to:`/ecs/register-task-definition`,children:S})}),t[6]=x,t[7]=C);let w;t[8]!==u.error||t[9]!==u.isError?(w=u.isError&&(0,h.jsx)(l,{error:u.error instanceof Error?u.error:void 0,msg:`Failed to deregister task definition.`}),t[8]=u.error,t[9]=u.isError,t[10]=w):w=t[10];let T;t[11]===r?T=t[12]:(T=r.length===0?(0,h.jsx)(`p`,{className:`text-muted-foreground`,children:`No task definitions found.`}):(0,h.jsx)(`div`,{className:`overflow-x-auto rounded-lg border bg-card`,children:(0,h.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,h.jsx)(`thead`,{children:(0,h.jsxs)(`tr`,{className:`border-b text-left text-muted-foreground`,children:[(0,h.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:`Family : Revision`}),(0,h.jsx)(`th`,{className:`px-4 py-2 font-medium`,children:(0,h.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,h.jsx)(`tbody`,{children:r.map(e=>{let t=g(e);return(0,h.jsxs)(`tr`,{className:`border-b last:border-0`,children:[(0,h.jsx)(`td`,{className:`px-4 py-2 font-mono text-xs`,children:t}),(0,h.jsx)(`td`,{className:`px-4 py-2 text-right`,children:(0,h.jsx)(o,{onClick:()=>{_(t)},size:`sm`,variant:`destructive`,children:`Deregister`})})]},e)})})]})}),t[11]=r,t[12]=T);let E=`This marks task definition "${f}" INACTIVE. Existing tasks keep running; no new tasks can use it.`,D;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(D=e=>{e||_(null)},t[13]=D):D=t[13];let O=f!==null,k;t[14]!==u.isPending||t[15]!==y||t[16]!==O||t[17]!==E?(k=(0,h.jsx)(d,{confirmLabel:`Deregister`,description:E,isPending:u.isPending,onConfirm:y,onOpenChange:D,open:O,pendingLabel:`Deregistering…`,title:`Deregister task definition`}),t[14]=u.isPending,t[15]=y,t[16]=O,t[17]=E,t[18]=k):k=t[18];let A;return t[19]!==k||t[20]!==C||t[21]!==w||t[22]!==T?(A=(0,h.jsxs)(h.Fragment,{children:[C,w,T,k]}),t[19]=k,t[20]=C,t[21]=w,t[22]=T,t[23]=A):A=t[23],A}function v(){let e=(0,p.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(u,{title:`Task definitions`}),(0,h.jsx)(f,{}),(0,h.jsx)(_,{})]}),e[0]=t):t=e[0],t}var y=v;export{y as component};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./link.js";import{$t as a,en as o}from"./cluster-config.js";import{t as s}from"./createLucideIcon.js";import{t as c}from"./download.js";import{t as l}from"./trash-2.js";import{t as u}from"./button.js";import{N as d,P as f,S as p,g as m,u as h}from"./awsClient.js";import{n as g}from"./s3.js";import{t as _}from"./error-banner.js";import{t as v}from"./delete-confirmation-dialog.js";var y=s(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),b=s(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),x=s(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),S=class extends f(p,d,`GetObject`,m){},C=r(),w=t();function T(e){let t=(0,C.c)(9),{folderName:n,fullPrefix:r,bucketName:a}=e,o;t[0]!==a||t[1]!==r?(o={bucket:a,_splat:r},t[0]=a,t[1]=r,t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,w.jsx)(b,{className:`size-5 text-muted-foreground`}),t[3]=s):s=t[3];let c;t[4]===n?c=t[5]:(c=(0,w.jsx)(`span`,{className:`font-medium`,children:n}),t[4]=n,t[5]=c);let l;return t[6]!==o||t[7]!==c?(l=(0,w.jsxs)(i,{className:`flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,params:o,to:`/s3/ls/$bucket/$`,children:[s,c]}),t[6]=o,t[7]=c,t[8]=l):l=t[8],l}var E=e(n(),1);function D({object:e,bucketName:t,displayName:n,fullKey:r}){let[i,s]=(0,E.useState)(!1),[u,d]=(0,E.useState)(null),f=g();async function p(){d(null);try{let e=new S({Bucket:t,Key:r}),i=await h().send(e);if(i.Body){let e=await i.Body.transformToByteArray(),t=URL.createObjectURL(new Blob([e])),r=document.createElement(`a`);r.href=t,r.download=n,document.body.append(r),r.click(),r.remove(),URL.revokeObjectURL(t)}}catch(e){d(Error(`Failed to download object`,{cause:e}))}}async function m(){try{await f.mutateAsync({bucket:t,key:r})}finally{s(!1)}}return(0,w.jsxs)(`div`,{children:[f.error&&(0,w.jsx)(_,{error:f.error,msg:`Failed to delete object`}),u&&(0,w.jsx)(_,{error:u,msg:`Failed to download object`}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border bg-card p-4`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,w.jsx)(y,{className:`size-5 text-muted-foreground`}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`h3`,{className:`font-medium`,children:n}),e.LastModified&&(0,w.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Last Modified: `,a(e.LastModified)]})]})]}),(0,w.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,w.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:o(e.Size??0)}),(0,w.jsx)(`button`,{"aria-label":`Download ${n}`,className:`rounded-md p-2 transition-colors hover:bg-accent`,onClick:p,type:`button`,children:(0,w.jsx)(c,{className:`size-4`})}),(0,w.jsx)(`button`,{"aria-label":`Delete ${n}`,className:`rounded-md p-2 text-destructive transition-colors hover:bg-accent`,onClick:()=>s(!0),type:`button`,children:(0,w.jsx)(l,{className:`size-4`})})]}),(0,w.jsx)(v,{description:(0,w.jsxs)(w.Fragment,{children:[`Are you sure you want to delete `,(0,w.jsx)(`strong`,{children:n}),`? This action cannot be undone.`]}),isPending:f.isPending,onConfirm:m,onOpenChange:s,open:i,title:`Delete Object`})]})]},e.Key)}function O({bucket:e,prefix:t=``,isPending:n,onUpload:r}){let i=(0,E.useRef)(null);async function a(n){let{files:a}=n.target;if(!(!a||a.length===0))try{await Promise.all([...a].map(async n=>await r({bucket:e,key:`${t}${n.name}`,file:n})))}finally{i.current&&(i.current.value=``)}}return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`input`,{accept:`*/*`,"aria-label":`Choose files to upload`,className:`hidden`,multiple:!0,onChange:a,ref:i,type:`file`}),(0,w.jsxs)(u,{disabled:n,onClick:()=>i.current?.click(),size:`sm`,children:[(0,w.jsx)(x,{className:`mr-2 size-4`}),n?`Uploading…`:`Upload Files`]})]})}export{D as n,T as r,O as t};
|
||||
import{a as e,n as t,r as n,t as r}from"./compiler-runtime.js";import{t as i}from"./link.js";import{$t as a,en as o}from"./cluster-config.js";import{t as s}from"./createLucideIcon.js";import{t as c}from"./download.js";import{t as l}from"./trash-2.js";import{t as u}from"./button.js";import{N as d,P as f,S as p,g as m,u as h}from"./awsClient.js";import{n as g}from"./s3.js";import{t as _}from"./error-banner.js";import{t as v}from"./delete-confirmation-dialog.js";var y=s(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),b=s(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),x=s(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),S=class extends f(p,d,`GetObject`,m){},C=r(),w=t();function T(e){let t=(0,C.c)(9),{folderName:n,fullPrefix:r,bucketName:a}=e,o;t[0]!==a||t[1]!==r?(o={bucket:a,_splat:r},t[0]=a,t[1]=r,t[2]=o):o=t[2];let s;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,w.jsx)(b,{className:`size-5 text-muted-foreground`}),t[3]=s):s=t[3];let c;t[4]===n?c=t[5]:(c=(0,w.jsx)(`span`,{className:`font-medium`,children:n}),t[4]=n,t[5]=c);let l;return t[6]!==o||t[7]!==c?(l=(0,w.jsxs)(i,{className:`flex items-center gap-3 rounded-lg border bg-card p-4 transition-colors hover:bg-accent`,params:o,to:`/s3/ls/$bucket/$`,children:[s,c]}),t[6]=o,t[7]=c,t[8]=l):l=t[8],l}var E=e(n(),1);function D({object:e,bucketName:t,displayName:n,fullKey:r}){let[i,s]=(0,E.useState)(!1),[u,d]=(0,E.useState)(null),f=g();async function p(){d(null);try{let e=new S({Bucket:t,Key:r}),i=await h().send(e);if(i.Body){let e=await i.Body.transformToByteArray(),t=URL.createObjectURL(new Blob([e])),r=document.createElement(`a`);r.href=t,r.download=n,document.body.append(r),r.click(),r.remove(),URL.revokeObjectURL(t)}}catch(e){d(Error(`Failed to download object`,{cause:e}))}}async function m(){try{await f.mutateAsync({bucket:t,key:r})}finally{s(!1)}}return(0,w.jsxs)(`div`,{children:[f.error&&(0,w.jsx)(_,{error:f.error,msg:`Failed to delete object`}),u&&(0,w.jsx)(_,{error:u,msg:`Failed to download object`}),(0,w.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border bg-card p-4`,children:[(0,w.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,w.jsx)(y,{className:`size-5 text-muted-foreground`}),(0,w.jsxs)(`div`,{children:[(0,w.jsx)(`h3`,{className:`font-medium`,children:n}),e.LastModified&&(0,w.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Last Modified: `,a(e.LastModified)]})]})]}),(0,w.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,w.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:o(e.Size??0)}),(0,w.jsx)(`button`,{"aria-label":`Download ${n}`,className:`rounded-md p-2 transition-colors hover:bg-accent`,onClick:p,type:`button`,children:(0,w.jsx)(c,{className:`size-4`})}),(0,w.jsx)(`button`,{"aria-label":`Delete ${n}`,className:`rounded-md p-2 text-destructive transition-colors hover:bg-accent`,onClick:()=>{s(!0)},type:`button`,children:(0,w.jsx)(l,{className:`size-4`})})]}),(0,w.jsx)(v,{description:(0,w.jsxs)(w.Fragment,{children:[`Are you sure you want to delete `,(0,w.jsx)(`strong`,{children:n}),`? This action cannot be undone.`]}),isPending:f.isPending,onConfirm:m,onOpenChange:s,open:i,title:`Delete Object`})]})]},e.Key)}function O({bucket:e,prefix:t=``,isPending:n,onUpload:r}){let i=(0,E.useRef)(null);async function a(n){let{files:a}=n.target;if(!(!a||a.length===0))try{await Promise.all([...a].map(async n=>await r({bucket:e,key:`${t}${n.name}`,file:n})))}finally{i.current&&(i.current.value=``)}}return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(`input`,{accept:`*/*`,"aria-label":`Choose files to upload`,className:`hidden`,multiple:!0,onChange:a,ref:i,type:`file`}),(0,w.jsxs)(u,{disabled:n,onClick:()=>i.current?.click(),size:`sm`,children:[(0,w.jsx)(x,{className:`mr-2 size-4`}),n?`Uploading…`:`Upload Files`]})]})}export{D as n,T as r,O as t};
|
||||
@@ -1 +1 @@
|
||||
import{a as e,r as t,t as n}from"./compiler-runtime.js";var r=n(),i=e(t(),1),a=2e3;function o(){let e=(0,r.c)(5),[t,n]=(0,i.useState)(!1),o=(0,i.useRef)(null),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>()=>{o.current&&clearTimeout(o.current)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=async e=>{await navigator.clipboard.writeText(e),n(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>n(!1),a)},e[2]=l):l=e[2];let u=l,d;return e[3]===t?d=e[4]:(d={copied:t,copy:u},e[3]=t,e[4]=d),d}export{o as t};
|
||||
import{a as e,r as t,t as n}from"./compiler-runtime.js";var r=n(),i=e(t(),1),a=2e3;function o(){let e=(0,r.c)(5),[t,n]=(0,i.useState)(!1),o=(0,i.useRef)(null),s,c;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(s=()=>()=>{o.current&&clearTimeout(o.current)},c=[],e[0]=s,e[1]=c):(s=e[0],c=e[1]),(0,i.useEffect)(s,c);let l;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(l=async e=>{await navigator.clipboard.writeText(e),n(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{n(!1)},a)},e[2]=l):l=e[2];let u=l,d;return e[3]===t?d=e[4]:(d={copied:t,copy:u},e[3]=t,e[4]=d),d}export{o as t};
|
||||
@@ -53,7 +53,6 @@ export default defineConfig({
|
||||
"error",
|
||||
"react-you-might-not-need-an-effect/no-pass-data-to-parent": "error",
|
||||
"react-you-might-not-need-an-effect/no-pass-live-state-to-parent": "error",
|
||||
"typescript/no-confusing-void-expression": "off",
|
||||
"typescript/no-floating-promises": [
|
||||
"error",
|
||||
{
|
||||
|
||||
@@ -162,7 +162,9 @@ export function AdminDashboardPanel() {
|
||||
<button
|
||||
type="button"
|
||||
className="flex items-center gap-2 text-sm font-medium"
|
||||
onClick={() => setNodesExpanded(!nodesExpanded)}
|
||||
onClick={() => {
|
||||
setNodesExpanded(!nodesExpanded)
|
||||
}}
|
||||
>
|
||||
{nodesExpanded ? (
|
||||
<ChevronDown className="size-3.5" />
|
||||
|
||||
@@ -79,7 +79,9 @@ export function CliCommandPanel({ commands }: CliCommandPanelProps) {
|
||||
<div className="rounded-md border border-border">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setExpanded((prev) => !prev)}
|
||||
onClick={() => {
|
||||
setExpanded((prev) => !prev)
|
||||
}}
|
||||
className="flex w-full items-center gap-2 px-3 py-2 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground"
|
||||
aria-expanded={expanded}
|
||||
>
|
||||
@@ -102,7 +104,9 @@ export function CliCommandPanel({ commands }: CliCommandPanelProps) {
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="xs"
|
||||
onClick={async () => await copy(partsToText(commands))}
|
||||
onClick={async () => {
|
||||
await copy(partsToText(commands))
|
||||
}}
|
||||
>
|
||||
{copied ? (
|
||||
<Check className="size-2.5" />
|
||||
|
||||
@@ -165,9 +165,9 @@ export function AttributesEditor({
|
||||
aria-label={spec.label}
|
||||
checked={value === "true"}
|
||||
id={id}
|
||||
onChange={(e) =>
|
||||
onChange={(e) => {
|
||||
setValue(spec.key, e.target.checked ? "true" : "false")
|
||||
}
|
||||
}}
|
||||
type="checkbox"
|
||||
/>
|
||||
)}
|
||||
@@ -176,21 +176,27 @@ export function AttributesEditor({
|
||||
aria-invalid={!!fieldError}
|
||||
id={id}
|
||||
inputMode="numeric"
|
||||
onChange={(e) => setValue(spec.key, e.target.value)}
|
||||
onChange={(e) => {
|
||||
setValue(spec.key, e.target.value)
|
||||
}}
|
||||
value={value}
|
||||
/>
|
||||
)}
|
||||
{spec.type === "text" && (
|
||||
<Input
|
||||
id={id}
|
||||
onChange={(e) => setValue(spec.key, e.target.value)}
|
||||
onChange={(e) => {
|
||||
setValue(spec.key, e.target.value)
|
||||
}}
|
||||
placeholder={spec.placeholder}
|
||||
value={value}
|
||||
/>
|
||||
)}
|
||||
{spec.type === "select" && (
|
||||
<Select
|
||||
onValueChange={(v) => setValue(spec.key, v ?? "")}
|
||||
onValueChange={(v) => {
|
||||
setValue(spec.key, v ?? "")
|
||||
}}
|
||||
value={value}
|
||||
>
|
||||
<SelectTrigger className="w-full" id={id}>
|
||||
|
||||
+9
-3
@@ -98,7 +98,9 @@ export function CertificateImportDialog({
|
||||
<Textarea
|
||||
className="font-mono text-xs"
|
||||
id="cert-body"
|
||||
onChange={(e) => setCertificate(e.target.value)}
|
||||
onChange={(e) => {
|
||||
setCertificate(e.target.value)
|
||||
}}
|
||||
placeholder="-----BEGIN CERTIFICATE-----"
|
||||
rows={5}
|
||||
value={certificate}
|
||||
@@ -112,7 +114,9 @@ export function CertificateImportDialog({
|
||||
<Textarea
|
||||
className="font-mono text-xs"
|
||||
id="cert-key"
|
||||
onChange={(e) => setPrivateKey(e.target.value)}
|
||||
onChange={(e) => {
|
||||
setPrivateKey(e.target.value)
|
||||
}}
|
||||
placeholder="-----BEGIN PRIVATE KEY-----"
|
||||
rows={5}
|
||||
value={privateKey}
|
||||
@@ -126,7 +130,9 @@ export function CertificateImportDialog({
|
||||
<Textarea
|
||||
className="font-mono text-xs"
|
||||
id="cert-chain"
|
||||
onChange={(e) => setCertificateChain(e.target.value)}
|
||||
onChange={(e) => {
|
||||
setCertificateChain(e.target.value)
|
||||
}}
|
||||
placeholder="-----BEGIN CERTIFICATE-----"
|
||||
rows={4}
|
||||
value={certificateChain}
|
||||
|
||||
@@ -124,7 +124,9 @@ describe("ListenerForm", () => {
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
onClick={() => form.setValue("protocol", "HTTPS")}
|
||||
onClick={() => {
|
||||
form.setValue("protocol", "HTTPS")
|
||||
}}
|
||||
type="button"
|
||||
>
|
||||
go-https
|
||||
|
||||
@@ -184,7 +184,9 @@ export function ListenerForm({
|
||||
)}
|
||||
<Button
|
||||
className="ml-auto"
|
||||
onClick={() => setImportOpen(true)}
|
||||
onClick={() => {
|
||||
setImportOpen(true)
|
||||
}}
|
||||
size="sm"
|
||||
type="button"
|
||||
variant="ghost"
|
||||
@@ -224,9 +226,9 @@ export function ListenerForm({
|
||||
)}
|
||||
|
||||
<CertificateImportDialog
|
||||
onImported={(arn) =>
|
||||
onImported={(arn) => {
|
||||
setValue("certificateArn", arn, { shouldValidate: true })
|
||||
}
|
||||
}}
|
||||
onOpenChange={setImportOpen}
|
||||
open={importOpen}
|
||||
/>
|
||||
|
||||
@@ -134,7 +134,12 @@ export function ListenerRulesTab({
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{rules.length} rule{rules.length === 1 ? "" : "s"} (including default)
|
||||
</p>
|
||||
<Button onClick={() => setAddOpen(true)} size="sm">
|
||||
<Button
|
||||
onClick={() => {
|
||||
setAddOpen(true)
|
||||
}}
|
||||
size="sm"
|
||||
>
|
||||
Add rule
|
||||
</Button>
|
||||
</div>
|
||||
@@ -173,7 +178,9 @@ export function ListenerRulesTab({
|
||||
<div className="flex justify-end gap-1">
|
||||
<Button
|
||||
aria-label={`Edit rule ${rule.Priority}`}
|
||||
onClick={() => setEditTarget(rule)}
|
||||
onClick={() => {
|
||||
setEditTarget(rule)
|
||||
}}
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
>
|
||||
@@ -181,7 +188,9 @@ export function ListenerRulesTab({
|
||||
</Button>
|
||||
<Button
|
||||
aria-label={`Delete rule ${rule.Priority}`}
|
||||
onClick={() => setDeleteTarget(rule)}
|
||||
onClick={() => {
|
||||
setDeleteTarget(rule)
|
||||
}}
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
>
|
||||
@@ -212,7 +221,11 @@ export function ListenerRulesTab({
|
||||
initialRule={editTarget}
|
||||
isPending={modifyMutation.isPending}
|
||||
mode="edit"
|
||||
onOpenChange={(open) => !open && setEditTarget(undefined)}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) {
|
||||
setEditTarget(undefined)
|
||||
}
|
||||
}}
|
||||
onSubmit={handleEdit}
|
||||
open={editTarget !== undefined}
|
||||
targetGroups={targetGroups}
|
||||
@@ -226,7 +239,11 @@ export function ListenerRulesTab({
|
||||
}
|
||||
isPending={deleteMutation.isPending}
|
||||
onConfirm={handleDelete}
|
||||
onOpenChange={(open) => !open && setDeleteTarget(undefined)}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) {
|
||||
setDeleteTarget(undefined)
|
||||
}
|
||||
}}
|
||||
open={deleteTarget !== undefined}
|
||||
title="Delete rule"
|
||||
/>
|
||||
@@ -422,7 +439,9 @@ function RuleDialog({
|
||||
<FieldTitle>Conditions</FieldTitle>
|
||||
<Button
|
||||
disabled={fields.length >= 5}
|
||||
onClick={() => append({ field: "path-pattern", rawValues: "" })}
|
||||
onClick={() => {
|
||||
append({ field: "path-pattern", rawValues: "" })
|
||||
}}
|
||||
size="sm"
|
||||
type="button"
|
||||
variant="outline"
|
||||
@@ -435,7 +454,13 @@ function RuleDialog({
|
||||
form={form}
|
||||
index={idx}
|
||||
key={field.id}
|
||||
onRemove={fields.length > 1 ? () => remove(idx) : undefined}
|
||||
onRemove={
|
||||
fields.length > 1
|
||||
? () => {
|
||||
remove(idx)
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -151,9 +151,9 @@ describe("ListenersTab", () => {
|
||||
expect(screen.getByText(/delete listener http:80/i)).toBeInTheDocument()
|
||||
const before = mockSend.mock.calls.length
|
||||
await user.click(screen.getByRole("button", { name: "Delete" }))
|
||||
await waitFor(() =>
|
||||
expect(mockSend.mock.calls.length).toBeGreaterThan(before),
|
||||
)
|
||||
await waitFor(() => {
|
||||
expect(mockSend.mock.calls.length).toBeGreaterThan(before)
|
||||
})
|
||||
const call = mockSend.mock.calls[before]?.[0]
|
||||
expect(call.input).toStrictEqual({ ListenerArn: "arn:listener/1" })
|
||||
})
|
||||
@@ -243,9 +243,9 @@ describe("ListenersTab", () => {
|
||||
await user.type(portInput, "8080")
|
||||
const before = mockSend.mock.calls.length
|
||||
await user.click(screen.getByRole("button", { name: /save changes/i }))
|
||||
await waitFor(() =>
|
||||
expect(mockSend.mock.calls.length).toBeGreaterThan(before),
|
||||
)
|
||||
await waitFor(() => {
|
||||
expect(mockSend.mock.calls.length).toBeGreaterThan(before)
|
||||
})
|
||||
const call = mockSend.mock.calls[before]?.[0]
|
||||
expect(call.input).toStrictEqual({
|
||||
ListenerArn: "arn:listener/1",
|
||||
@@ -286,9 +286,9 @@ describe("ListenersTab", () => {
|
||||
await user.click(await screen.findByText(/tg-a/))
|
||||
const before = mockSend.mock.calls.length
|
||||
await user.click(screen.getByRole("button", { name: /^add listener$/i }))
|
||||
await waitFor(() =>
|
||||
expect(mockSend.mock.calls.length).toBeGreaterThan(before),
|
||||
)
|
||||
await waitFor(() => {
|
||||
expect(mockSend.mock.calls.length).toBeGreaterThan(before)
|
||||
})
|
||||
const call = mockSend.mock.calls[before]?.[0]
|
||||
expect(call.input).toStrictEqual({
|
||||
LoadBalancerArn: LB_ARN,
|
||||
@@ -360,9 +360,9 @@ describe("ListenersTab", () => {
|
||||
|
||||
const before = mockSend.mock.calls.length
|
||||
await user.click(screen.getByRole("button", { name: /save changes/i }))
|
||||
await waitFor(() =>
|
||||
expect(mockSend.mock.calls.length).toBeGreaterThan(before),
|
||||
)
|
||||
await waitFor(() => {
|
||||
expect(mockSend.mock.calls.length).toBeGreaterThan(before)
|
||||
})
|
||||
const call = mockSend.mock.calls[before]?.[0]
|
||||
expect(call.input).toStrictEqual({
|
||||
ListenerArn: "arn:listener/1",
|
||||
|
||||
@@ -209,7 +209,12 @@ export function ListenersTab({
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{listeners.length} listener{listeners.length === 1 ? "" : "s"}
|
||||
</p>
|
||||
<Button onClick={() => setAddOpen(true)} size="sm">
|
||||
<Button
|
||||
onClick={() => {
|
||||
setAddOpen(true)
|
||||
}}
|
||||
size="sm"
|
||||
>
|
||||
Add listener
|
||||
</Button>
|
||||
</div>
|
||||
@@ -251,9 +256,9 @@ export function ListenersTab({
|
||||
<div className="flex justify-end gap-1">
|
||||
<Button
|
||||
aria-label={`${rulesOpen ? "Hide" : "Show"} rules for listener ${listener.Protocol}:${listener.Port}`}
|
||||
onClick={() =>
|
||||
onClick={() => {
|
||||
setRulesOpenArn(rulesOpen ? undefined : arn)
|
||||
}
|
||||
}}
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
>
|
||||
@@ -261,7 +266,9 @@ export function ListenersTab({
|
||||
</Button>
|
||||
<Button
|
||||
aria-label={`Edit listener ${listener.Protocol}:${listener.Port}`}
|
||||
onClick={() => setEditTarget(listener)}
|
||||
onClick={() => {
|
||||
setEditTarget(listener)
|
||||
}}
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
>
|
||||
@@ -269,7 +276,9 @@ export function ListenersTab({
|
||||
</Button>
|
||||
<Button
|
||||
aria-label={`Delete listener ${listener.Protocol}:${listener.Port}`}
|
||||
onClick={() => setDeleteTarget(listener)}
|
||||
onClick={() => {
|
||||
setDeleteTarget(listener)
|
||||
}}
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
>
|
||||
@@ -315,7 +324,11 @@ export function ListenersTab({
|
||||
certificates={certificates}
|
||||
isPending={modifyMutation.isPending}
|
||||
listener={editTarget}
|
||||
onOpenChange={(open) => !open && setEditTarget(undefined)}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) {
|
||||
setEditTarget(undefined)
|
||||
}
|
||||
}}
|
||||
onSubmit={handleEdit}
|
||||
protocols={protocols}
|
||||
sslPolicies={sslPolicies}
|
||||
@@ -330,7 +343,11 @@ export function ListenersTab({
|
||||
}
|
||||
isPending={deleteMutation.isPending}
|
||||
onConfirm={handleDelete}
|
||||
onOpenChange={(open) => !open && setDeleteTarget(undefined)}
|
||||
onOpenChange={(open) => {
|
||||
if (!open) {
|
||||
setDeleteTarget(undefined)
|
||||
}
|
||||
}}
|
||||
open={deleteTarget !== undefined}
|
||||
title="Delete listener"
|
||||
/>
|
||||
|
||||
+6
-2
@@ -140,7 +140,9 @@ export function RegisterTargetsDialog({
|
||||
aria-label={`Register target ${id}`}
|
||||
checked={checked}
|
||||
id={`register-target-${id}`}
|
||||
onChange={() => toggle(id)}
|
||||
onChange={() => {
|
||||
toggle(id)
|
||||
}}
|
||||
type="checkbox"
|
||||
/>
|
||||
<label
|
||||
@@ -159,7 +161,9 @@ export function RegisterTargetsDialog({
|
||||
<Input
|
||||
aria-label={`Port override for ${id}`}
|
||||
className="w-24"
|
||||
onChange={(e) => setPort(id, e.target.value)}
|
||||
onChange={(e) => {
|
||||
setPort(id, e.target.value)
|
||||
}}
|
||||
placeholder={String(defaultPort)}
|
||||
value={selection?.port ?? ""}
|
||||
/>
|
||||
|
||||
+6
-2
@@ -38,7 +38,9 @@ export function SecurityGroupsEditor({
|
||||
prev.includes(id) ? prev.filter((x) => x !== id) : [...prev, id],
|
||||
)
|
||||
}
|
||||
const handleReset = () => setSelected(initial)
|
||||
const handleReset = () => {
|
||||
setSelected(initial)
|
||||
}
|
||||
|
||||
const dirty = !sameSet(selected, initial)
|
||||
// AWS requires at least one security group on an ALB.
|
||||
@@ -86,7 +88,9 @@ export function SecurityGroupsEditor({
|
||||
<input
|
||||
aria-label={`Security group ${sg.GroupId} (${sg.GroupName})`}
|
||||
checked={selectedIds.has(sg.GroupId ?? "")}
|
||||
onChange={() => toggle(sg.GroupId ?? "")}
|
||||
onChange={() => {
|
||||
toggle(sg.GroupId ?? "")
|
||||
}}
|
||||
type="checkbox"
|
||||
/>
|
||||
<span className="font-mono">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user