"use strict";(self.webpackChunkhopsworks_front=self.webpackChunkhopsworks_front||[]).push([[8363],{68363:function(e,t,r){r.r(t),r.d(t,{default:function(){return w}});var a,n=r(1413),o=r(45987),u=r(15861),i=r(87757),s=r.n(i),c=r(72791),f=r(95048),d=r(16871),p=r(11942),l=r(55748),v=(r(76237),r(80184));r(17345),r(66109),r(86336);!function(e){e.job="job",e.start="start",e.fgStats="fgStats",e.newProject="newProject",e.experiments="experiments",e.featuregroup="featuregroup"}(a||(a={}));var m=r(56595),g=r(62618),b=r(38184),h=r(59728),I=r(25969),x=r(754),k=r(1281),G=r(50616),T=["features","enabled","histograms","correlations","exactUniqueness","timeTravelFormat","validationType","expectationSuite"],j=function(){(0,g.Z)(h.Z.createFeatureGroup);var e=(0,d.UO)(),t=e.id,r=e.fsId,i=(0,l.Mx)().data,j=(i=void 0===i?{}:i).id,w=(0,f.I0)(),S=(0,d.s0)(),Z=(0,b.T)(),y=Z.currentData,U=Z.isFetching,A=(0,f.v9)((function(e){return e.featureGroups}));(0,c.useEffect)((function(){0===(null===A||void 0===A?void 0:A.length)&&w.featureGroups.fetch({projectId:+t,featureStoreId:+r,needMore:!1})}),[r,t]),(0,c.useEffect)((function(){return w.schematisedTags.fetch(),function(){w.featureGroupView.clear()}}),[w,t,y,r]);var C=(0,c.useMemo)((function(){return A.map((function(e){return e.name}))}),[A]),F=(0,c.useCallback)(function(){var e=(0,u.Z)(s().mark((function e(u,i){var c,f,d,l,v,m,g,b,h,Z;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=u.features,f=u.enabled,d=u.histograms,l=u.correlations,v=u.exactUniqueness,m=u.timeTravelFormat,g=u.validationType,u.expectationSuite,b=(0,o.Z)(u,T),e.next=3,w.featureGroups.create({projectId:+t,featureStoreId:+r,data:p.gxm(p.OH4("type",G.kV.STREAM),p.zGw(p.anz("timeTravelFormat"),(function(e){return p.yGi("primaryKeys",p.zGw(p.hXT(p.vgT("primary")),p.UID(p.vgT("name")))(e.features),e)})),(0,n.Z)((0,n.Z)({},b),{},{features:(0,I.Iz)(c),timeTravelFormat:m[0].toUpperCase(),descStatsEnabled:!!(0,I.LX)(c).length,validationType:g[0].toUpperCase(),eventTime:(0,I.u7)(c),jobs:[],statisticsConfig:{columns:(0,I.LX)(c),correlations:l,enabled:f,histograms:d,exactUniqueness:v}}))});case 3:if(!(h=e.sent)){e.next=18;break}if(!(i&&i.length>1)){e.next=11;break}return Z={items:i},e.next=9,w.validationAlert.createBulk({projectId:+t,featureStoreId:+r,featureGroupId:h,validationAlert:Z});case 9:e.next=14;break;case 11:if(!i||1!==i.length){e.next=14;break}return e.next=14,w.validationAlert.create({projectId:+t,featureStoreId:+r,featureGroupId:h,validationAlert:i[0]});case 14:w.featureGroups.fetch({projectId:+t,featureStoreId:+r}),w.onboarding.checkSection({userId:j,id:a.featuregroup}),w.onboarding.setOpenOnboarding({userId:j,open:!0}),S((0,x.Z)(k.Z.featureGroup.overview,k.Z.project.value,{fgId:h,fsId:r,id:t}));case 18:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}(),[w.featureGroups,w.onboarding,w.validationAlert,r,S,t,j]),z=(0,f.v9)((function(e){return e.loading.effects.featureGroups.fetch})),E=(0,f.v9)((function(e){return e.loading.effects.featureGroups.create}));return(0,v.jsx)(m.Z,{featureGroupsNames:C,isLoading:U||z,isDisabled:E,submitHandler:F})},w=(0,c.memo)(j)},86336:function(e,t,r){e.exports=r.p+"static/media/basket_tuto_1.67b43ebc41b5734fa424.png"}}]);
//# sourceMappingURL=8363.2e0f78a2.chunk.js.map