"use strict";(self.webpackChunkhopsworks_front=self.webpackChunkhopsworks_front||[]).push([[9310],{33471:function(n,e,t){var r=t(72791),i=t(95048),o=t(29522);e.Z=function(n){var e=(0,i.I0)(),t=(0,i.v9)(o.vi),u=t.data,a=t.isLoading;return(0,r.useEffect)((function(){a||u||e.jupyter.fetchSettings({projectId:n})}),[e.jupyter,a,n,u]),{data:u,isLoading:a}}},79310:function(n,e,t){t.r(e);var r=t(1413),i=t(15861),o=t(29439),u=t(87757),a=t.n(u),c=t(72791),f=t(76237),s=t(11942),d=t(95048),p=t(16871),g=t(201),v=t(8028),y=t(33471),j=t(81497),l=t(29522),h=t(49146),Z=t(1281),C=t(68704),b=t(80184);e.default=function(){var n=(0,d.I0)(),e=(0,p.UO)().id,t=(0,g.Z)(),u=(0,c.useState)(!1),k=(0,o.Z)(u,2),S=k[0],R=k[1],A=(0,y.Z)(+e).data,m=(0,d.v9)(l.RA),w=m.data,L=m.isLoading,x=(0,v.o7)(),E=x.data;x.isLoading;(0,c.useEffect)((function(){return n.jupyter.fetchRunningServer({projectId:+e}),function(){n.jupyter.clear()}}),[n.jupyter,e]);var P=function(){var o=(0,i.Z)(a().mark((function i(o){var u,c,f,d;return a().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return R(!0),u=o.type===h.cb.SPARK,c=o.type===h.cb.PYTHON,f=o.resourceConfig,d=(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},A),c&&{dockerConfig:(0,r.Z)((0,r.Z)({},A.dockerConfig),{},{resourceConfig:(0,r.Z)((0,r.Z)({},A.dockerConfig.resourceConfig),f)})}),u&&{jobConfig:s.CEd(["experimentType"],(0,r.Z)((0,r.Z)({},A.jobConfig),o))}),{},{pythonKernel:c}),i.next=7,n.jupyter.update({projectId:+e,settings:d});case 7:t(Z.Z.jupyter.overview),R(!1);case 9:case"end":return i.stop()}}),i)})));return function(n){return o.apply(this,arguments)}}(),D=(0,c.useMemo)((function(){return A?{initialData:[A.jobConfig,(0,r.Z)((0,r.Z)({},A.dockerConfig),{},{type:h.cb.PYTHON})],selectedConfig:A.pythonKernel&&E?h.cb.PYTHON:h.cb.SPARK}:{initialData:[]}}),[E,A]),I=D.initialData,H=D.selectedConfig;return!A||L?(0,b.jsx)(j.Z,{}):(0,b.jsx)(C.Z,{isDisabled:!!w,initialData:I,submitHandler:P,canSave:!w,onlyAdvancedConfig:!0,selectedConfig:H,isSubmiting:S,checkedAdvancedConfig:!0,noPythonFiles:!0,isJupyter:!0,children:function(n){var e=n.advanceConfig;return(0,b.jsx)(f.oA,{width:"100%",title:"Jupyter server configuration",children:e})}})}},29522:function(n,e,t){t.d(e,{Es:function(){return r},GR:function(){return i},RA:function(){return o},gy:function(){return u},vi:function(){return a}});var r=function(n){var e=n.loading;return e.effects.jupyter.fetchEnvironmentReadyness||e.effects.jupyter.fetchRunningServer||e.effects.jupyter.fetchSettings},i=function(n){var e=n.jupyter,t=n.loading;return{data:e.environment,isLoading:t.effects.jupyter.fetchEnvironmentReadyness}},o=function(n){var e=n.jupyter,t=n.loading;return{data:e.runningServer,isLoading:t.effects.jupyter.fetchRunningServer}},u=function(n){var e=n.jupyter,t=n.loading;return{data:e.runningApplications,isLoading:t.effects.jupyter.fetchRunningApplications}},a=function(n){var e=n.jupyter,t=n.loading;return{data:e.settings,isLoading:t.effects.jupyter.fetchSettings||t.effects.jupyter.update}}}}]);
//# sourceMappingURL=9310.1461b349.chunk.js.map