1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4276],{51489:(e,l,n)=>{"use strict";n.d(l,{A:()=>r});var i=n(37876),t=n(67524),o=n(89099);let r=e=>{let{handleClick:l,isSubmitting:n}=e,r=(0,o.useRouter)();return(0,i.jsx)(t.$,{onClick:()=>{l?l():r.query.nextUrl?r.push(r.query.nextUrl):r.back()},variant:"ghost",disabled:n,size:{base:"xs",md:"md"},children:"Cancel"})}},65393:(e,l,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/deployments",function(){return n(90788)}])},90788:(e,l,n)=>{"use strict";n.r(l),n.d(l,{default:()=>J});var i=n(37876),t=n(81805),o=n(14232),r=n(84307),a=n(13368),s=n(52914),c=n(74359),d=n(96686),u=n(28331),p=n(97691),v=n(332),m=n(16701),g=n(62001),h=n(62427),j=n(32355),x=n(67524),y=n(51489),b=n(5068);let w=e=>{var l,n;let{deploy:t,open:o,onCancel:s,onSuccess:c,onError:d}=e,p=u.X,v=e=>{var l;p.create({title:"Deploy for release ".concat(null==t||null==(l=t.release)?void 0:l.name," was create. "),description:(0,i.jsxs)("p",{children:["Its take some seconds to applies the changes. ",(0,i.jsx)("br",{})]}),type:"success",duration:9e3,meta:{closable:!0}}),c&&c(e.data)},w=e=>{d&&d(e),console.log(e)},_=async()=>{let e={release:t.release.id,project_env:t.project_env.id};await b.A.post("deployment/",e).then(v).catch(w)};return(0,i.jsxs)(m.Dz,{open:o,onOpenChange:s,placement:"center",size:"xl",children:[(0,i.jsx)(m.Xi,{}),(0,i.jsx)(m.f5,{children:(0,i.jsxs)(m.Cf,{alignContent:"center",bg:"bg-surface",children:[(0,i.jsxs)(m.c7,{children:[" ","Rollback to deploy ",null==t||null==(l=t.release)?void 0:l.name]}),(0,i.jsxs)(m.R4,{children:[(0,i.jsx)(g.D,{as:"h5",size:"sm",children:"Do you want to install it on cluster?"}),(0,i.jsx)("br",{}),(0,i.jsx)(a.E,{fontSize:"md",children:"Changes description:"}),(0,i.jsx)(a.E,{fontSize:"xs",style:{whiteSpace:"pre"},children:null==t||null==(n=t.release)?void 0:n.description}),(0,i.jsx)(h.w,{}),(0,i.jsx)("br",{}),(0,i.jsx)(r.s,{direction:"row-reverse",children:(0,i.jsxs)(j.e,{children:[(0,i.jsx)(y.A,{handleClick:()=>s()}),(0,i.jsx)(x.$,{type:"button",onClick:_,children:"Install"})]})})]})]})})]})};var _=n(75656),A=n(79829),C=n(55584),k=n(26796),f=n(14475),S=n(18717),z=n(41554),E=n(21425);let I=e=>{var l;let{deployment:n}=e,{open:t,onOpen:o,onClose:r}=(0,S.j)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(z.A,{onClick:o,tooltipContent:"There are pending changes that require this deployment to be applied. Click here to continue"}),(0,i.jsx)(E.A,{open:t,onClose:r,initialValues:{project_env:null==(l=n.project_env)?void 0:l.id}})]})};var D=n(41836),T=n(38180),K=n(37628),N=n(36711),O=n(44367),R=n(97056),X=n(30952),F=n(55267),P=n(89099),U=n(31033),q=n(32487),B=n(89026),L=n(43872);let V=[{key:"environment",label:"Environment",multi:!0},{key:"project",apiurl:"project-env",label:"Project",multi:!0},{key:"state",label:"State",multi:!1,values:[{value:"initial",label:"Initial"},{value:"error",label:"Error"},{value:"creating",label:"Creating"},{value:"deleting",label:"Deleting"},{value:"updating",label:"Updating"},{value:"created",label:"Created"},{value:"pending_approval",label:"Pending Approval"}]},{key:"build",isInvisible:!0,showAppliedBadge:!0}],$=()=>{var e,l,n,t,m,g,h;let[j,x]=(0,o.useState)(null),[y,S]=(0,o.useState)(null),{user:z}=(0,K.A)(),{accountData:E}=(0,N.A)(),$=(0,P.useRouter)(),W=(0,U.T)("deployment"),G=u.X,{openDetail:H}=(0,O.R)();(0,R.A)();let{data:J}=(0,_.Ay)("content-type/",q.Ay,{revalidateOnFocus:!1}),M=(0,B.wt)(J),Q=(null==z||null==(e=z.access)?void 0:e.support_tickets)&&(null==z||null==(n=z.access)||null==(l=n.autodiagnostic)?void 0:l.deployment),Y=e=>{var l,n,i,t;let o=null!=(t=null==e||null==(i=e.project_env)||null==(n=i.environment)||null==(l=n.domain)?void 0:l.account)?t:null==E?void 0:E.id;H("deployment",e.id,{accountId:o})},Z=[{accessorKey:"release_name",header:"Deploy Name",enableSorting:!1,cell:e=>{var l,n,t,o,s,c,d,u,p,m,g;let{row:h}=e;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(r.s,{direction:"row",alignItems:"center",children:[(0,i.jsx)(F.A,{command:null==(n=h.original)||null==(l=n.release)?void 0:l.name,onNameClick:h.original._deleted?void 0:()=>Y(h.original)}),"pending_approval"===h.original.state?(0,i.jsx)(I,{deployment:h.original}):(0,i.jsx)(v.A,{value:h.original.state,error:null==(t=h.original)?void 0:t.errors,isDeleted:h.original._deleted,onClick:()=>S(h.original)}),Q&&M&&!h.original._deleted&&(0,i.jsx)(L.A,{resourceId:h.original.id,resourceName:(null==(o=h.original.release)?void 0:o.name)||String(h.original.id),resourceType:"deployment",contentTypeId:M,disabled:(null==z?void 0:z.role)==="viewer",disabledTooltip:"Viewers cannot create autodiagnostic tickets"})]}
1),(0,i.jsxs)(r.s,{direction:"column",alignItems:"flex-start",gap:1,mt:1,children:[(0,i.jsxs)(a.E,{fontSize:"xs",color:"gray",children:[(0,i.jsx)("b",{children:"Commit:"})," ",(0,i.jsx)(X.a,{commit:null==(c=h.original)||null==(s=c.build)?void 0:s.commit,commit_message:null==(u=h.original)||null==(d=u.build)?void 0:d.commit_message,commit_url:null==(m=h.original)||null==(p=m.build)?void 0:p.commit_url})]}),(0,i.jsxs)(r.s,{direction:"row",alignItems:"center",gap:1,children:[(0,i.jsx)(a.E,{fontSize:"xs",color:"gray",fontWeight:"bold",children:"Build Tag:"}),(0,i.jsx)(a.E,{fontSize:"xs",color:"gray",children:h.original.build.tag}),(0,i.jsx)(k.A,{tag:null==(g=h.original)?void 0:g.build.tag,variant:"ghost",size:"2xs"})]})]})]})},width:"60%"},{accessorKey:"environment",header:"Environment",enableSorting:!1,cell:e=>{var l;let{row:n}=e;return(0,i.jsx)(T.A,{name:null==(l=n.original.project_env.environment)?void 0:l.name})},width:"10%"},{accessorKey:"project",header:"Project",enableSorting:!1,cell:e=>{var l;let{row:n}=e;return(0,i.jsx)(a.E,{children:null==(l=n.original.project_env)?void 0:l.project_name})},width:"10%"},{accessorKey:"created_at",header:"Created",cell:e=>{let{row:l}=e;return(0,i.jsx)(D.k,{date:l.original.created_at})},width:"10%"},{id:"actions",header:"Actions",cell:e=>{var l,n,t,o,r,a;let{row:u}=e;return(0,i.jsxs)(s.z,{justifyContent:"flex-end",children:[(null==(l=u.original)?void 0:l.state)==="initial"&&(null==z?void 0:z.role)!=="viewer"&&(0,i.jsx)(d.m,{content:"Cancel Deploy",placement:"top",showArrow:!0,children:(0,i.jsx)(c.K,{fontSize:"20px",variant:"ghost",onClick:()=>{b.A.delete("deployment/".concat(u.original.id,"/")).then(()=>{G.create({title:"Deploy Cancelled",description:"The deploy was cancelled successfully.",type:"warning",duration:5e3,meta:{closable:!0}})}).catch(()=>{G.create({title:"Error",description:"There was a problem cancelling the deploy.",type:"error",duration:5e3,meta:{closable:!0}})}).finally(()=>{var e,l;return(0,A.j)("deployment/".concat(null==(l=window)||null==(e=l.location)?void 0:e.search))})},children:(0,i.jsx)(f.uv,{})})}),W&&(0,i.jsx)(d.m,{content:"Activity Log",placement:"top",showArrow:!0,children:(0,i.jsx)(c.K,{fontSize:"20px",variant:"ghost",onClick:()=>{var e;return $.push(W+((null==(e=u.original)?void 0:e.id)?"&object_id=".concat(encodeURIComponent(u.original.id)):""))},disabled:(null==z?void 0:z.role)==="viewer"||(null==(n=u.original)?void 0:n._deleted)===!0,"aria-label":"Activity Log",children:(0,i.jsx)(f.np,{})})}),(null==z||null==(o=z.access)||null==(t=o.autodiagnostic)?void 0:t.deployment)&&(0,i.jsx)(d.m,{content:"Autodiagnostics",placement:"top",showArrow:!0,children:(0,i.jsx)(c.K,{fontSize:"20px",variant:"ghost",onClick:()=>$.push("/autodiagnostics?id_resource=".concat(encodeURIComponent(u.original.id))),disabled:(null==z?void 0:z.role)==="viewer"||(null==(r=u.original)?void 0:r._deleted),"aria-label":"Autodiagnostics",children:(0,i.jsx)(f.U7,{})})}),(0,i.jsx)(d.m,{content:"Options",placement:"top",showArrow:!0,children:(0,i.jsx)(c.K,{fontSize:"20px",variant:"ghost",onClick:()=>Y(u.original),disabled:(null==(a=u.original)?void 0:a._deleted)===!0,children:(0,i.jsx)(f.kp,{})})})]})},enableSorting:!1,width:"10%"}];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p.A,{nameObject:"Deployments",columns:Z,tableFilters:V,apiurl:"deployment"}),j&&(0,i.jsx)(w,{deploy:j,open:!0,onCancel:()=>{x(null)},onSuccess:()=>{var e,l,n;(0,A.j)("deployment/?".concat(null!=(n=null==(l=window)||null==(e=l.location)?void 0:e.search)?n:"")),x(null)}}),y&&(0,i.jsx)(C.A,{id:null==y?void 0:y.id,data:y,apiurl:"deployment",open:!0,onClose:()=>S(null),customAccount:null!=(h=null==y||null==(g=y.project_env)||null==(m=g.environment)||null==(t=m.domain)?void 0:t.account)?h:null==E?void 0:E.id})]})};var W=n(32296),G=n(21891);let H=()=>(0,i.jsx)($,{});H.requireAuth=!0,H.getLayout=e=>(0,i.jsx)(t.A,{icon:G.X.deployments.icon,description:G.X.deployments.description,title:"Deployments",createButton:(0,i.jsx)(i.Fragment,{}),helpPath:W.O.deployment,children:e});let J=H}},e=>{e.O(0,[7687,1733,6855,1805,7691,752,688,636,6593,8792],()=>e(e.s=65393)),_N_E=e.O()}]); 2//# sourceMappingURL=deployments-c44f871cb5f084b4.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.