1"use strict";(self.webpackChunkharbor_portal=self.webpackChunkharbor_portal||[]).push([[7029],{6820:(x,Z,a)=>{a.d(Z,{b:()=>c});var s=a(529),d=a(2529),t=a(9300),p=a(4004),y=a(4650),I=a(5060);class c extends d.b{constructor(n,r){super(n,r)}listAllRepositoriesResponse(n){let r=this.newParams(),l=new s.WM;null!=n.sort&&(r=r.set("sort",n.sort.toString())),null!=n.q&&(r=r.set("q",n.q.toString())),null!=n.pageSize&&(r=r.set("page_size",n.pageSize.toString())),null!=n.page&&(r=r.set("page",n.page.toString())),null!=n.XRequestId&&(l=l.set("X-Request-Id",n.XRequestId.toString()));let f=new s.aW("GET",this.rootUrl+"/repositories",null,{headers:l,params:r,responseType:"json"});return this.http.request(f).pipe((0,t.h)(m=>m instanceof s.Zn),(0,p.U)(m=>m))}listAllRepositories(n){return this.listAllRepositoriesResponse(n).pipe((0,p.U)(r=>r.body))}listRepositoriesResponse(n){let r=this.newParams(),l=new s.WM;null!=n.sort&&(r=r.set("sort",n.sort.toString())),null!=n.q&&(r=r.set("q",n.q.toString())),null!=n.pageSize&&(r=r.set("page_size",n.pageSize.toString())),null!=n.page&&(r=r.set("page",n.page.toString())),null!=n.XRequestId&&(l=l.set("X-Request-Id",n.XRequestId.toString()));let f=new s.aW("GET",this.rootUrl+`/projects/${n.projectName}/repositories`,null,{headers:l,params:r,responseType:"json"});return this.http.request(f).pipe((0,t.h)(m=>m instanceof s.Zn),(0,p.U)(m=>m))}listRepositories(n){return this.listRepositoriesResponse(n).pipe((0,p.U)(r=>r.body))}getRepositoryResponse(n){let r=this.newParams(),l=new s.WM;null!=n.XRequestId&&(l=l.set("X-Request-Id",n.XRequestId.toString()));let f=new s.aW("GET",this.rootUrl+`/projects/${n.projectName}/repositories/${n.repositoryName}`,null,{headers:l,params:r,responseType:"json"});return this.http.request(f).pipe((0,t.h)(m=>m instanceof s.Zn),(0,p.U)(m=>m))}getRepository(n){return this.getRepositoryResponse(n).pipe((0,p.U)(r=>r.body))}updateRepositoryResponse(n){let r=this.newParams(),l=new s.WM,_=null;_=n.repository,null!=n.XRequestId&&(l=l.set("X-Request-Id",n.XRequestId.toString()));let f=new s.aW("PUT",this.rootUrl+`/projects/${n.projectName}/repositories/${n.repositoryName}`,_,{headers:l,params:r,responseType:"json"});return this.http.request(f).pipe((0,t.h)(m=>m instanceof s.Zn),(0,p.U)(m=>m))}updateRepository(n){return this.updateRepositoryResponse(n).pipe((0,p.U)(r=>r.body))}deleteRepositoryResponse(n){let r=this.newParams(),l=new s.WM;null!=n.XRequestId&&(l=l.set("X-Request-Id",n.XRequestId.toString()));let f=new s.aW("DELETE",this.rootUrl+`/projects/${n.projectName}/repositories/${n.repositoryName}`,null,{headers:l,params:r,responseType:"json"});return this.http.request(f).pipe((0,t.h)(m=>m instanceof s.Zn),(0,p.U)(m=>m))}deleteRepository(n){return this.deleteRepositoryResponse(n).pipe((0,p.U)(r=>r.body))}}c.listAllRepositoriesPath="/repositories",c.listRepositoriesPath="/projects/{project_name}/repositories",c.getRepositoryPath="/projects/{project_name}/repositories/{repository_name}",c.updateRepositoryPath="/projects/{project_name}/repositories/{repository_name}",c.deleteRepositoryPath="/projects/{project_name}/repositories/{repository_name}",c.\u0275fac=function(n){return new(n||c)(y.LFG(I.p),y.LFG(s.eN))},c.\u0275prov=y.Yz7({token:c,factory:c.\u0275fac,providedIn:"root"})},7029:(x,Z,a)=>{a.r(Z),a.d(Z,{SummaryModule:()=>h});var s=a(268),d=a(7344),t=a(4650),p=a(2443),y=a(8025),I=a(858),c=a(6820),T=a(8402),n=a(6895),r=a(9383),l=a(3046);function _(i,o){1&i&&(t.TgZ(0,"div",7),t._UZ(1,"span",8),t.qZA())}function f(i,o){if(1&i&&(t.TgZ(0,"div",10)(1,"h4",11),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"ul",12)(5,"li",13),t._uU(6),t.qZA()()()),2&i){const e=t.oxw(3);t.xp6(2),t.hij(" ",t.lcZ(3,3,"PROJECT.PROXY_CACHE_ENDPOINT")," "),t.xp6(4),t.AsE(" ",null==e.summaryInformation||null==e.summaryInformation.registry?null:e.summaryInformation.registry.name,"-",null==e.summaryInformation||null==e.summaryInformation.registry?null:e.summaryInformation.registry.url," ")}}function m(i,o){if(1&i&&(t.TgZ(0,"div",10)(1,"h4",11),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"ul",12)(5,"li"),t._uU(6),t.qZA()()()),2&i){const e=t.oxw(3);t.xp6(2),t.hij(" ",t.lcZ(3,2,"SUMMARY.PROJECT_HELM_CHART")," "),t.xp6(4),t.hij(" ",null!=e.summaryInformation&&e.summaryInformation.chart_count?null==e.summaryInformation?null:e.summaryInformation.chart_count:0," ")}}function M(i,o){if(1&i&&(t.TgZ(0,"div",10)(1,"h4",11),t._uU(2),t.ALo(3,"translate"),t.qZA(),t.TgZ(4,"ul",12)(5,"li"),t._uU(6),t.ALo(7,"translate"),t.qZA(),t.TgZ(8,"li"),t._uU(9),t.ALo(10,"translate"),t.qZA(),t.TgZ(11,"li"),t._uU(12),t.ALo(13,"translate"),t.qZA(),t.TgZ(14,"li"),t._uU(15),t.ALo(16,"translate"),t.qZA(),t.TgZ(17,"li"),t._uU(18),t.ALo(19,"translate"),t.qZA()()()),2&i){const e=t.oxw(3);t.xp6(2),t.hij(" ",t.lcZ(3,11,"SUMMARY.PROJECT_MEMBER")," "),t.xp6(4),t.AsE(" ",null!=e.summaryInformation&&e.summaryInformation.project_admin_count?null==e.summaryInformation?null:e.summaryInformation.project_admin_count:0," ",t.lcZ(7,13,"SUMMARY.ADMIN")," "),t.xp6(3),t.AsE(" ",null!=e.summaryInformation&&e.summaryInformation.maintainer_
1count?null==e.summaryInformation?null:e.summaryInformation.maintainer_count:0," ",t.lcZ(10,15,"SUMMARY.MAINTAINER")," "),t.xp6(3),t.AsE(" ",null!=e.summaryInformation&&e.summaryInformation.developer_count?null==e.summaryInformation?null:e.summaryInformation.developer_count:0," ",t.lcZ(13,17,"SUMMARY.DEVELOPER")," "),t.xp6(3),t.AsE(" ",null!=e.summaryInformation&&e.summaryInformation.guest_count?null==e.summaryInformation?null:e.summaryInformation.guest_count:0," ",t.lcZ(16,19,"SUMMARY.GUEST")," "),t.xp6(3),t.AsE(" ",null!=e.summaryInformation&&e.summaryInformation.limited_guest_count?null==e.summaryInformation?null:e.summaryInformation.limited_guest_count:0," ",t.lcZ(19,21,"SUMMARY.LIMITED_GUEST")," ")}}function U(i,o){if(1&i&&(t.TgZ(0,"div"),t.YNc(1,f,7,5,"div",9),t.TgZ(2,"div",10)(3,"h4",11),t._uU(4),t.ALo(5,"translate"),t.qZA(),t.TgZ(6,"ul",12)(7,"li"),t._uU(8),t.qZA()()(),t.YNc(9,m,7,4,"div",9),t.YNc(10,M,20,23,"div",9),t.qZA()),2&i){const e=t.oxw(2);t.xp6(1),t.Q6J("ngIf",null==e.summaryInformation?null:e.summaryInformation.registry),t.xp6(3),t.hij(" ",t.lcZ(5,5,"SUMMARY.PROJECT_REPOSITORY")," "),t.xp6(4),t.hij(" ",null!=e.summaryInformation&&e.summaryInformation.repo_count?null==e.summaryInformation?null:e.summaryInformation.repo_count:0," "),t.xp6(1),t.Q6J("ngIf",e.withHelmChart),t.xp6(1),t.Q6J("ngIf",e.showProjectMemberInfo)}}function C(i,o){if(1&i&&(t.ynx(0),t.YNc(1,U,11,7,"div",6),t.BQk()),2&i){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf",e.summaryInformation)}}function E(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"div",19)(1,"div",26)(2,"a",27),t.NdJ("click",function(){const R=t.CHM(e).$implicit,A=t.oxw(3);return t.KtG(A.goIntoRepo(R))}),t._uU(3),t.qZA()(),t.TgZ(4,"div",28),t._uU(5),t.qZA(),t.TgZ(6,"div",28),t._uU(7),t.qZA(),t.TgZ(8,"div",26),t._uU(9),t.ALo(10,"harborDatetime"),t.qZA()()}if(2&i){const e=o.$implicit;t.xp6(3),t.Oqu(e.name),t.xp6(2),t.hij(" ",e.artifact_count?e.artifact_count:0," "),t.xp6(2),t.hij(" ",e.pull_count?e.pull_count:0," "),t.xp6(2),t.hij(" ",t.xi3(10,4,e.update_time,"short")," ")}}function j(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"div",16)(1,"div",17)(2,"div"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"div",18),t._uU(6),t.qZA(),t.TgZ(7,"div",19)(8,"div",20),t._uU(9),t.ALo(10,"translate"),t.qZA(),t.TgZ(11,"div",21),t._uU(12),t.ALo(13,"translate"),t.qZA(),t.TgZ(14,"div",21),t._uU(15),t.ALo(16,"translate"),t.qZA(),t.TgZ(17,"div",20),t._uU(18),t.ALo(19,"translate"),t.qZA()()(),t.TgZ(20,"div",22),t.YNc(21,E,11,7,"div",23),t.qZA(),t.TgZ(22,"div",24)(23,"button",25),t.NdJ("click",function(){t.CHM(e);const g=t.oxw(2);return t.KtG(g.goToRepos())}),t._uU(24),t.ALo(25,"translate"),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,8,"PROJECT_DETAIL.REPOSITORIES")),t.xp6(3),t.hij(" ",null!=e.summaryInformation&&e.summaryInformation.repo_count?null==e.summaryInformation?null:e.summaryInformation.repo_count:0," "),t.xp6(3),t.hij(" ",t.lcZ(10,10,"REPOSITORY.NAME")," "),t.xp6(3),t.hij(" ",t.lcZ(13,12,"REPOSITORY.ARTIFACTS_COUNT")," "),t.xp6(3),t.hij(" ",t.lcZ(16,14,"REPOSITORY.PULL_COUNT")," "),t.xp6(3),t.hij(" ",t.lcZ(19,16,"REPOSITORY.LAST_MODIFIED")," "),t.xp6(3),t.Q6J("ngForOf",e.repos),t.xp6(3),t.hij(" ",t.lcZ(25,18,"SUMMARY.SEE_ALL")," ")}}function P(i,o){if(1&i){const e=t.EpF();t.TgZ(0,"div",16)(1,"div",29)(2,"div"),t._uU(3),t.ALo(4,"translate"),t.qZA(),t.TgZ(5,"div",18),t._uU(6),t.qZA()(),t.TgZ(7,"div",22)(8,"div",19)(9,"div",20),t._uU(10),t.ALo(11,"translate"),t.qZA(),t.TgZ(12,"div",30),t._uU(13),t.qZA()(),t.TgZ(14,"div",19)(15,"div",20),t._uU(16),t.ALo(17,"translate"),t.qZA(),t.TgZ(18,"div",30),t._uU(19),t.qZA()(),t.TgZ(20,"div",19)(21,"div",20),t._uU(22),t.ALo(23,"translate"),t.qZA(),t.TgZ(24,"div",30),t._uU(25),t.qZA()(),t.TgZ(26,"div",19)(27,"div",20),t._uU(28),t.ALo(29,"translate"),t.qZA(),t.TgZ(30,"div",30),t._uU(31),t.qZA()(),t.TgZ(32,"div",19)(33,"div",20),t._uU(34),t.ALo(35,"translate"),t.qZA(),t.TgZ(36,"div",30),t._uU(37),t.qZA()()(),t.TgZ(38,"div",24)(39,"button",25),t.NdJ("click",function(){t.CHM(e);const g=t.oxw(2);return t.KtG(g.goToMembers())}),t._uU(40),t.ALo(41,"translate"),t.qZA()()()}if(2&i){const e=t.oxw(2);t.xp6(3),t.Oqu(t.lcZ(4,13,"PROJECT_DETAIL.USERS")),t.xp6(3),t.Oqu(e.getTotalMembers()),t.xp6(4),t.hij(" ",t.lcZ(11,15,"SUMMARY.ADMIN")," "),t.xp6(3),t.hij(" ",null!=e.summaryInformation&&e.summaryInformation.project_admin_count?null==e.summaryInformation?null:e.summaryInformation.project_admin_count:0," "),t.xp6(3),t.hij(" ",t.lcZ(17,17,"SUMMARY.MAINTAINER")," "),t.xp6(3),t.hij(" ",null!=e.summaryInformation&&e.summaryInformation.maintainer_count?null==e.summaryInformation?null:e.summaryInformation.maintainer_count:0," "),t.xp6(3),t.hij(" ",t.lcZ(23,19,"SUMMARY.DEVELOPER")," "),t.xp6(3),t.hij(" ",null!=e.summaryInformation&&e.summaryInformation.developer_count?null==e.summaryInformation?null:e.summaryInformation.developer_count:0," "),t.xp6(3),t.hij(" ",t.lcZ(29,21,"SUMMARY.GUEST")," "),t.xp6(3),t.hij(" ",null!=e.summaryInformation&&e.summaryInformation.guest_count?null==e.summaryInformation?null:e.summaryInformation.guest_count:0," "),t.xp6(3),t.hij(" ",t.lcZ(35,23,"SUMMARY.LIMITED_GUEST")," "),t.xp6(3),t.hij(" ",null!=e.summaryInformation&&e.summaryInformation.limited_guest_count?null==e.summaryInformation?null:e.summaryInformation.limited_guest_count:0," "),t.xp6(3),t.hij(" ",t.lcZ(41,25,"SUMMARY.SEE_ALL")," ")}}function O(i,o){if(1&i&&(t.ynx(0),t.TgZ(1,"div",14),t.YNc(2,j,26,20,"div",15),t.YNc(3,P,42,27,"div",15),t.qZA(),t.BQk()),2&i){const e=t.oxw();
1t.xp6(2),t.Q6J("ngIf",e.hasReadRepoPermission),t.xp6(1),t.Q6J("ngIf",e.showProjectMemberInfo)}}const S=function(i){return{"is-highlight":i}};class v{constructor(o,e,u,g,R,A,L){this.projectService=o,this.userPermissionService=e,this.errorHandler=u,this.appConfigService=g,this.route=R,this.repoService=A,this.router=L,this.showProjectMemberInfo=!1,this.hasReadRepoPermission=!1,this.isCardView=!0,this.cardHover=!1,this.listHover=!1,this.repos=[],localStorage&&(localStorage.getItem(d.Z6)||localStorage.setItem(d.Z6,d.rz),this.isCardView=localStorage.getItem(d.Z6)===d.sN)}ngOnInit(){this.projectId=this.route.parent.parent.snapshot.params.id;const o=this.route.snapshot.parent.parent.data;o&&(this.projectName=o.projectResolver.name),this.userPermissionService.hasProjectPermissions(this.projectId,[{resource:s._W.MEMBER.KEY,action:s._W.MEMBER.VALUE.LIST},{resource:s._W.REPOSITORY.KEY,action:s._W.REPOSITORY.VALUE.LIST}]).subscribe(u=>{this.showProjectMemberInfo=u[0],this.hasReadRepoPermission=u[1]}),this.projectService.getProjectSummary(this.projectId).subscribe(u=>{this.summaryInformation=u},u=>{this.errorHandler.error(u)}),this.isCardView&&this.getDataForCardView()}showCard(o){this.isCardView!==o&&(this.isCardView=o,localStorage&&(this.isCardView?localStorage.setItem(d.Z6,d.sN):localStorage.setItem(d.Z6,d.rz)),this.isCardView&&this.getDataForCardView())}mouseEnter(o){"card"===o?this.cardHover=!0:this.listHover=!0}mouseLeave(o){"card"===o?this.cardHover=!1:this.listHover=!1}isHovering(o){return"card"===o?this.cardHover:this.listHover}getDataForCardView(){this.getTop4Repos()}getTop4Repos(){this.hasReadRepoPermission&&this.repoService.listRepositories({projectName:this.projectName,page:1,pageSize:4}).subscribe(o=>{this.repos=o})}goIntoRepo(o){const e=["harbor","projects",o.project_id,"repositories",o.name.substr(this.projectName.length+1)];this.router.navigate(e)}goToRepos(){this.router.navigate(["harbor","projects",this.projectId,"repositories"])}goToMembers(){this.router.navigate(["harbor","projects",this.projectId,"members"])}getTotalMembers(){return this.summaryInformation?+(this.summaryInformation.project_admin_count?this.summaryInformation.project_admin_count:0)+ +(this.summaryInformation.maintainer_count?this.summaryInformation.maintainer_count:0)+ +(this.summaryInformation.developer_count?this.summaryInformation.developer_count:0)+ +(this.summaryInformation.guest_count?this.summaryInformation.guest_count:0)+ +(this.summaryInformation.limited_guest_count?this.summaryInformation.limited_guest_count:0):0}}v.\u0275fac=function(o){return new(o||v)(t.Y36(s.Y4),t.Y36(s.Hx),t.Y36(p.q),t.Y36(y._),t.Y36(I.gz),t.Y36(c.b),t.Y36(I.F0))},v.\u0275cmp=t.Xpm({type:v,selectors:[["summary"]],decls:8,vars:9,consts:[[1,"clr-row","card-row","mt-1"],[1,"card-btn","mr-5px",3,"click","mouseenter","mouseleave"],["size","24","shape","view-cards",3,"ngClass"],[1,"list-btn",3,"click","mouseenter","mouseleave"],["size","24","shape","view-list",3,"ngClass"],["class","clr-row mt-2 center",4,"ngIf"],[4,"ngIf"],[1,"clr-row","mt-2","center"],[1,"spinner","spinner-md"],["class","pt-05 flex",4,"ngIf"],[1,"pt-05","flex"],[1,"mt-0","title-width"],[1,"list-unstyled"],["id","endpoint"],[1,"container"],["class","card clickable",4,"ngIf"],[1,"card","clickable"],[1,"card-header"],[1,"clr-row","number"],[1,"clr-row"],[1,"clr-col-4","column"],[1,"clr-col-2","column"],[1,"card-block"],["class","clr-row",4,"ngFor","ngForOf"],[1,"card-footer"],[1,"btn","btn-link",3,"click"],[1,"clr-col-4","ellipsis"],["href","javascript:void(0)",3,"click"],[1,"clr-col-2"],[1,"card-header","no-underline"],[1,"clr-col-8"]],template:function(o,e){1&o&&(t.TgZ(0,"div",0)(1,"span",1),t.NdJ("click",function(){return e.showCard(!0)})("mouseenter",function(){return e.mouseEnter("card")})("mouseleave",function(){return e.mouseLeave("card")}),t._UZ(2,"clr-icon",2),t.qZA(),t.TgZ(3,"span",3),t.NdJ("click",function(){return e.showCard(!1)})("mouseenter",function(){return e.mouseEnter("list")})("mouseleave",function(){return e.mouseLeave("list")}),t._UZ(4,"clr-icon",4),t.qZA()(),t.YNc(5,_,2,0,"div",5),t.YNc(6,C,2,1,"ng-container",6),t.YNc(7,O,4,2,"ng-container",6)),2&o&&(t.xp6(2),t.Q6J("ngClass",t.VKq(5,S,e.isCardView||e.isHovering("card"))),t.xp6(2),t.Q6J("ngClass",t.VKq(7,S,!e.isCardView||e.isHovering("list"))),t.xp6(1),t.Q6J("ngIf",!e.summaryInformation),t.xp6(1),t.Q6J("ngIf",!e.isCardView),t.xp6(1),t.Q6J("ngIf",e.isCardView&&e.summaryInformation))},dependencies:[T.qvL,n.mk,n.sg,n.O5,r.X$,l.Z],styles:[".title-width[_ngcontent-%COMP%]{width:12rem}.pt-05[_ngcontent-%COMP%]{padding-top:1rem}.flex[_ngcontent-%COMP%]{display:flex}.card-row[_ngcontent-%COMP%]{justify-content:flex-end;padding-right:2rem}
1.mr-5px[_ngcontent-%COMP%]{margin-right:5px}.container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.card[_ngcontent-%COMP%]{width:24rem;margin-right:1rem;flex-grow:0;flex-shrink:0}.number[_ngcontent-%COMP%]{align-items:center;justify-content:center;font-size:3rem;color:#266aac;height:4rem}.column[_ngcontent-%COMP%]{font-size:10px;font-weight:bolder;text-transform:uppercase}.card-header[_ngcontent-%COMP%]{padding-bottom:0}.ellipsis[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.card-block[_ngcontent-%COMP%]{min-height:6rem}.size-24[_ngcontent-%COMP%]{width:20px;height:20px}.chart-name[_ngcontent-%COMP%]{display:flex;align-items:center}.no-underline[_ngcontent-%COMP%]{border-bottom-style:none}.center[_ngcontent-%COMP%]{justify-content:center;align-items:center}"]});var q=a(6292);const w=[{path:"",component:v}];class h{}h.\u0275fac=function(o){return new(o||h)},h.\u0275mod=t.oAB({type:h}),h.\u0275inj=t.cJS({imports:[I.Bz.forChild(w),q.m]})}}]);
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.