"use strict";(self.webpackChunkmlflow_oidc_auth_front=self.webpackChunkmlflow_oidc_auth_front||[]).push([[953],{2953:(Z,m,n)=>{n.r(m),n.d(m,{HomePageModule:()=>w});var i=n(6895),r=n(9197),u=n(3732);const g=[{title:"Experiment Name",key:"name"},{title:"Permission",key:"permission"}],d=[{title:"Model name",key:"name"},{title:"Permissions",key:"permission"}];var e=n(4650),p=n(5938),f=n(1299),h=n(5419),C=n(6709),v=n(4859),c=n(3848);function M(t,a){if(1&t&&e._UZ(0,"ml-table",9),2&t){const o=e.oxw();e.Q6J("columnConfig",o.experimentsColumnConfig)("data",o.experimentsDataSource)}}function P(t,a){if(1&t&&e._UZ(0,"ml-table",9),2&t){const o=e.oxw();e.Q6J("columnConfig",o.modelsColumnConfig)("data",o.modelsDataSource)}}function y(t,a){1&t&&(e.TgZ(0,"div",10)(1,"span"),e._uU(2,"You have no experiments"),e.qZA()())}function b(t,a){1&t&&(e.TgZ(0,"div",10)(1,"span"),e._uU(2,"You have no models"),e.qZA()())}const x=[{path:"",component:(()=>{class t{constructor(o,s,l){this.dialog=o,this.authService=s,this.userDataService=l,this.currentUserInfo=null,this.experimentsColumnConfig=g,this.modelsColumnConfig=d,this.experimentsDataSource=[],this.modelsDataSource=[]}ngOnInit(){if(this.currentUserInfo=this.authService.getUserInfo(),this.currentUserInfo){const{experiment_permissions:o,registered_model_permissions:s}=this.currentUserInfo;this.modelsDataSource=s,this.experimentsDataSource=o}}showAccessKeyModal(){this.userDataService.getAccessKey().subscribe(({token:o})=>{this.dialog.open(u.eN,{data:{token:o}})})}redirectToMLFlow(){window.location.href="/"}}return t.\u0275fac=function(o){return new(o||t)(e.Y36(p.uw),e.Y36(f.e8),e.Y36(h.M))},t.\u0275cmp=e.Xpm({type:t,selectors:[["ml-home-page"]],decls:19,vars:4,consts:[[1,"controls-container","pb-3"],["mat-flat-button","","aria-label","login","color","primary",1,"me-2",3,"click"],["mat-flat-button","","aria-label","login","color","primary",3,"click"],["label","Experiments"],[1,"my-3"],[3,"columnConfig","data",4,"ngIf","ngIfElse"],["label","Models"],["noExperimentData",""],["noModelData",""],[3,"columnConfig","data"],[1,"d-flex","w-100","justify-content-center","py-5"]],template:function(o,s){if(1&o&&(e.TgZ(0,"div",0)(1,"button",1),e.NdJ("click",function(){return s.redirectToMLFlow()}),e.TgZ(2,"span"),e._uU(3,"Login to MLFlow"),e.qZA()(),e.TgZ(4,"button",2),e.NdJ("click",function(){return s.showAccessKeyModal()}),e.TgZ(5,"span"),e._uU(6,"Create access key"),e.qZA()()(),e.TgZ(7,"div")(8,"mat-tab-group")(9,"mat-tab",3)(10,"div",4),e.YNc(11,M,1,2,"ml-table",5),e.qZA()(),e.TgZ(12,"mat-tab",6)(13,"div",4),e.YNc(14,P,1,2,"ml-table",5),e.qZA()()()(),e.YNc(15,y,3,0,"ng-template",null,7,e.W1O),e.YNc(17,b,3,0,"ng-template",null,8,e.W1O)),2&o){const l=e.MAs(16),S=e.MAs(18);e.xp6(11),e.Q6J("ngIf",s.experimentsDataSource.length)("ngIfElse",l),e.xp6(3),e.Q6J("ngIf",s.modelsDataSource.length)("ngIfElse",S)}},dependencies:[i.O5,C.a,v.lW,c.SP,c.uX],styles:[".mat-column-experiment_id[_ngcontent-%COMP%], .mat-column-name[_ngcontent-%COMP%]{white-space:unset!important;width:50%!important;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;-webkit-hyphens:auto;hyphens:auto}"]}),t})()}];let H=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[r.Bz.forChild(x),r.Bz]}),t})();var T=n(2965);let w=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=e.oAB({type:t}),t.\u0275inj=e.cJS({imports:[i.ez,T.m,H]}),t})()}}]);