diff --git a/index.html b/index.html index c73a0eb..f426b8e 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -DECODE_Cloud_UserFrontend
\ No newline at end of file +DECODE_Cloud_UserFrontend
\ No newline at end of file diff --git a/js/app.448e07d3.js b/js/app.448e07d3.js deleted file mode 100644 index 859fdde..0000000 --- a/js/app.448e07d3.js +++ /dev/null @@ -1,2 +0,0 @@ -(function(){var e={2343:function(e,t,a){"use strict";a(560);var o=a(9242),s=a(1076),n=a(3396);const r={id:"app"},i={class:"main container"};function l(e,t,a,o,s,l){const d=(0,n.up)("NavBar"),c=(0,n.up)("router-view");return(0,n.wg)(),(0,n.iD)("div",r,[(0,n.Wm)(d),(0,n._)("div",i,[(0,n.Wm)(c)])])}var d=a(65),c=a(2483);const u=e=>((0,n.dD)("data-v-b2c6df24"),e=e(),(0,n.Cn)(),e),p={class:"navbar navbar-expand-md navbar-dark bg-dark"},m={class:"container"},b=u((()=>(0,n._)("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarCollapse","aria-controls":"navbarCollapse","aria-expanded":"false","aria-label":"Toggle navigation"},[(0,n._)("span",{class:"navbar-toggler-icon"})],-1))),h={class:"collapse navbar-collapse",id:"navbarCollapse"},f={key:0,class:"navbar-nav me-auto mb-2 mb-md-0"},g={class:"nav-item"},w={class:"nav-item"},_={class:"nav-item"},y={class:"nav-item"},v={class:"nav-item"},k={key:1,class:"navbar-nav me-auto mb-2 mb-md-0"},j={class:"nav-item"},C={class:"nav-item"},U={class:"nav-item"};function D(e,t,a,o,s,r){const i=(0,n.up)("router-link");return(0,n.wg)(),(0,n.iD)("header",null,[(0,n._)("nav",p,[(0,n._)("div",m,[(0,n.Wm)(i,{class:"navbar-brand",to:"/"},{default:(0,n.w5)((()=>[(0,n.Uk)("DECODE OpenCloud")])),_:1}),b,(0,n._)("div",h,[e.isLoggedIn?((0,n.wg)(),(0,n.iD)("ul",f,[(0,n._)("li",g,[(0,n.Wm)(i,{class:"nav-link",to:"/"},{default:(0,n.w5)((()=>[(0,n.Uk)("Home")])),_:1})]),(0,n._)("li",w,[(0,n.Wm)(i,{class:"nav-link",to:"/files"},{default:(0,n.w5)((()=>[(0,n.Uk)("Files")])),_:1})]),(0,n._)("li",_,[(0,n.Wm)(i,{class:"nav-link",to:"/jobs"},{default:(0,n.w5)((()=>[(0,n.Uk)("Jobs")])),_:1})]),(0,n._)("li",y,[(0,n.Wm)(i,{class:"nav-link",to:"/profile"},{default:(0,n.w5)((()=>[(0,n.Uk)("Profile")])),_:1})]),(0,n._)("li",v,[(0,n._)("a",{class:"nav-link",onClick:t[0]||(t[0]=(...t)=>e.logout&&e.logout(...t))},"Log Out")])])):((0,n.wg)(),(0,n.iD)("ul",k,[(0,n._)("li",j,[(0,n.Wm)(i,{class:"nav-link",to:"/"},{default:(0,n.w5)((()=>[(0,n.Uk)("Home")])),_:1})]),(0,n._)("li",C,[(0,n.Wm)(i,{class:"nav-link",to:"/register"},{default:(0,n.w5)((()=>[(0,n.Uk)("Register")])),_:1})]),(0,n._)("li",U,[(0,n.Wm)(i,{class:"nav-link",to:"/login"},{default:(0,n.w5)((()=>[(0,n.Uk)("Log In")])),_:1})])]))])])])])}var F=(0,n.aZ)({name:"NavBar",computed:{isLoggedIn:function(){return this.$store.getters.isAuthenticated}},methods:{async logout(){await this.$store.dispatch("logOut"),this.$router.push("/login")}}}),V=a(89);const M=(0,V.Z)(F,[["render",D],["__scopeId","data-v-b2c6df24"]]);var P=M,E={setup(){const e=(0,d.oR)(),t=(0,c.tv)();(0,n.bv)((()=>{e.dispatch("viewMe").then((()=>{e.state.user&&t.push("/home")}))}))},components:{NavBar:P}};const S=(0,V.Z)(E,[["render",l]]);var Z=S,I=a(7429),J=a(4517);const x={key:0,id:"logout"},O={id:"logout"},q={id:"logout"},A={key:1},z=(0,n._)("span",null," or ",-1);function $(e,t,a,o,s,r){const i=(0,n.up)("router-link");return(0,n.wg)(),(0,n.iD)("section",null,[e.isLoggedIn?((0,n.wg)(),(0,n.iD)("div",x,[(0,n._)("p",O,[(0,n.Uk)("Click "),(0,n.Wm)(i,{to:"/files"},{default:(0,n.w5)((()=>[(0,n.Uk)("here")])),_:1}),(0,n.Uk)(" to view your files.")]),(0,n._)("p",q,[(0,n.Uk)("Click "),(0,n.Wm)(i,{to:"/jobs"},{default:(0,n.w5)((()=>[(0,n.Uk)("here")])),_:1}),(0,n.Uk)(" to view your jobs.")])])):((0,n.wg)(),(0,n.iD)("p",A,[(0,n._)("span",null,[(0,n.Wm)(i,{to:"/register"},{default:(0,n.w5)((()=>[(0,n.Uk)("Register")])),_:1})]),z,(0,n._)("span",null,[(0,n.Wm)(i,{to:"/login"},{default:(0,n.w5)((()=>[(0,n.Uk)("Log In")])),_:1})])]))])}var N=(0,n.aZ)({name:"HomeView",computed:{isLoggedIn:function(){return this.$store.getters.isAuthenticated}}});const T=(0,V.Z)(N,[["render",$]]);var W=T,R=a(7139);const H={class:"mb-3"},L=(0,n._)("label",{for:"username",class:"form-label"},"Email address:",-1),B={class:"mb-3"},Y=(0,n._)("label",{for:"password",class:"form-label"},"Password:",-1),K={class:"mb-3"},G=(0,n._)("label",{for:"repeat_password",class:"form-label"},"Repeat password:",-1),Q={class:"mb-3"},X=(0,n._)("label",{for:"request_details",class:"form-label"},"Request details:",-1),ee=(0,n._)("button",{type:"submit",class:"btn btn-primary"},"Send verification code",-1),te={key:0,class:"error"};function ae(e,t,a,s,r,i){return(0,n.wg)(),(0,n.iD)("section",null,[(0,n._)("form",{onSubmit:t[4]||(t[4]=(0,o.iM)(((...t)=>e.submit&&e.submit(...t)),["prevent"]))},[(0,n._)("div",H,[L,(0,n.wy)((0,n._)("input",{type:"text",name:"username","onUpdate:modelValue":t[0]||(t[0]=t=>e.form.username=t),class:"form-control"},null,512),[[o.nr,e.form.username]])]),(0,n._)("div",B,[Y,(0,n.wy)((0,n._)("input",{type:"password",name:"password","onUpdate:modelValue":t[1]||(t[1]=t=>e.form.password=t),class:"form-control"},null,512),[[o.nr,e.form.password]])]),(0,n._)("div",K,[G,(0,n.wy)((0,n._)("input",{type:"password",name:"repeat_password","onUpdate:modelValue":t[2]||(t[2]=t=>e.form.repeat_password=t),class:"form-control"},null,512),[[o.nr,e.form.repeat_password]])]),(0,n._)("div",Q,[X,(0,n.wy)((0,n._)("textarea",{name:"request_details","onUpdate:modelValue":t[3]||(t[3]=t=>e.form.request_details=t),class:"form-control",maxlength:"2000"},null,512),[[o.nr,e.form.request_details]])]),ee,e.errorMessage?((0,n.wg)(),(0,n.iD)("div",te,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],32)])}var oe=(0,n.aZ)({name:"Register",data(){return{form:{username:"",password:"",repeat_password:"",request_details:""},errorMessage:""}},methods:{...(0,d.nv)(["register"]),async submit(){if(this.form.password===this.form.repeat_password)try{await this.register({username:this.form.username,password:this.form.password,request_details:this.form.request_details}),this.$router.push("/confirm-email/"+this.form.username)}catch(e){console.log(e),this.errorMessage=e}else this.errorMessage="Passwords do not match"}}});const se=(0,V.Z)(oe,[["render",ae]]);var ne=se;const re={class:"mb-3"},ie=(0,n._)("label",{for:"verificationCode",class:"form-label"},"Verification code:",-1),le=(0,n._)("button",{type:"submit",class:"btn btn-primary"},"Verify email",-1),de={key:0,class:"error"};function ce(e,t,a,s,r,i){return(0,n.wg)(),(0,n.iD)("section",null,[(0,n._)("form",{onSubmit:t[2]||(t[2]=(0,o.iM)(((...t)=>e.submit&&e.submit(...t)),["prevent"]))},[(0,n._)("div",re,[ie,(0,n.wy)((0,n._)("input",{type:"text",name:"verificationCode","onUpdate:modelValue":t[0]||(t[0]=t=>e.form.verificationCode=t),class:"form-control"},null,512),[[o.nr,e.form.verificationCode]]),(0,n._)("a",{href:"#",onClick:t[1]||(t[1]=(0,o.iM)(((...t)=>e.resendVerificationCode&&e.resendVerificationCode(...t)),["prevent"])),class:"btn btn-link"},"Re-send verification code")]),le,e.errorMessage?((0,n.wg)(),(0,n.iD)("div",de,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],32)])}var ue=(0,n.aZ)({name:"ConfirmEmail",data(){return{form:{verificationCode:""},username:"",errorMessage:""}},created(){this.username=this.$route.params.username},methods:{...(0,d.nv)(["verify","sendVerificationCode"]),async submit(){try{await this.verify({username:this.username,code:this.form.verificationCode}),this.$router.push("/user-not-confirmed")}catch(e){console.log(e),this.errorMessage=e}},async resendVerificationCode(){try{await this.sendVerificationCode(this.username)}catch(e){console.log(e),this.errorMessage=e}}}});const pe=(0,V.Z)(ue,[["render",ce]]);var me=pe;function be(e,t,a,o,s,r){return(0,n.wg)(),(0,n.iD)("section",null," Your account has still not been accepted by an administrator. ")}var he=(0,n.aZ)({name:"UserNotConfirmed"});const fe=(0,V.Z)(he,[["render",be]]);var ge=fe;const we={class:"mb-3"},_e=(0,n._)("label",{for:"username",class:"form-label"},"Email address:",-1),ye={class:"mb-3"},ve=(0,n._)("label",{for:"password",class:"form-label"},"Password:",-1),ke=(0,n._)("button",{type:"submit",class:"btn btn-primary"},"Submit",-1),je={key:0,class:"error"};function Ce(e,t,a,s,r,i){const l=(0,n.up)("router-link");return(0,n.wg)(),(0,n.iD)("section",null,[(0,n._)("form",{onSubmit:t[2]||(t[2]=(0,o.iM)(((...t)=>e.submit&&e.submit(...t)),["prevent"]))},[(0,n._)("div",we,[_e,(0,n.wy)((0,n._)("input",{type:"text",name:"username","onUpdate:modelValue":t[0]||(t[0]=t=>e.form.username=t),class:"form-control"},null,512),[[o.nr,e.form.username]])]),(0,n._)("div",ye,[ve,(0,n.wy)((0,n._)("input",{type:"password",name:"password","onUpdate:modelValue":t[1]||(t[1]=t=>e.form.password=t),class:"form-control"},null,512),[[o.nr,e.form.password]])]),(0,n._)("div",null,[(0,n.Wm)(l,{to:"/forgot-password",class:"btn btn-link"},{default:(0,n.w5)((()=>[(0,n.Uk)("Forgot password?")])),_:1})]),ke,e.errorMessage?((0,n.wg)(),(0,n.iD)("div",je,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],32)])}var Ue=(0,n.aZ)({name:"Login",data(){return{form:{username:"",password:""},errorMessage:""}},methods:{...(0,d.nv)(["logIn"]),async submit(){try{await this.logIn({username:this.form.username,password:this.form.password}),this.$router.push("/")}catch(e){"UserNotConfirmedException"===e.code?this.$router.push("/confirm-email/"+this.form.username):(console.log(e),this.errorMessage=e)}}}});const De=(0,V.Z)(Ue,[["render",Ce]]);var Fe=De;const Ve={key:0,class:"mb-3"},Me=(0,n._)("label",{for:"username",class:"form-label"},"Email address:",-1),Pe=["disabled"],Ee={key:1,class:"mb-3"},Se=(0,n._)("label",{for:"code",class:"form-label"},"Verification code:",-1),Ze={key:2,class:"mb-3"},Ie=(0,n._)("label",{for:"password",class:"form-label"},"New password:",-1),Je={key:3,class:"mb-3"},xe=(0,n._)("label",{for:"repeat_password",class:"form-label"},"Repeat new password:",-1),Oe={key:4,type:"submit",class:"btn btn-primary"},qe={key:5,class:"error"};function Ae(e,t,a,s,r,i){return(0,n.wg)(),(0,n.iD)("section",null,[(0,n._)("form",{onSubmit:t[5]||(t[5]=(0,o.iM)(((...t)=>e.submit&&e.submit(...t)),["prevent"]))},[e.isVerificationCodeSent?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",Ve,[Me,(0,n.wy)((0,n._)("input",{type:"text",name:"username","onUpdate:modelValue":t[0]||(t[0]=t=>e.form.username=t),class:"form-control"},null,512),[[o.nr,e.form.username]]),(0,n._)("button",{type:"button",onClick:t[1]||(t[1]=(...t)=>e.sendVerificationCode&&e.sendVerificationCode(...t)),class:"btn btn-primary",disabled:e.isVerificationCodeSent},"Send verification code",8,Pe)])),e.isVerificationCodeSent?((0,n.wg)(),(0,n.iD)("div",Ee,[Se,(0,n.wy)((0,n._)("input",{type:"text",name:"code","onUpdate:modelValue":t[2]||(t[2]=t=>e.form.code=t),class:"form-control"},null,512),[[o.nr,e.form.code]])])):(0,n.kq)("",!0),e.isVerificationCodeSent?((0,n.wg)(),(0,n.iD)("div",Ze,[Ie,(0,n.wy)((0,n._)("input",{type:"password",name:"password","onUpdate:modelValue":t[3]||(t[3]=t=>e.form.password=t),class:"form-control"},null,512),[[o.nr,e.form.password]])])):(0,n.kq)("",!0),e.isVerificationCodeSent?((0,n.wg)(),(0,n.iD)("div",Je,[xe,(0,n.wy)((0,n._)("input",{type:"password",name:"repeat_password","onUpdate:modelValue":t[4]||(t[4]=t=>e.form.repeat_password=t),class:"form-control"},null,512),[[o.nr,e.form.repeat_password]])])):(0,n.kq)("",!0),e.isVerificationCodeSent?((0,n.wg)(),(0,n.iD)("button",Oe,"Save")):(0,n.kq)("",!0),e.errorMessage?((0,n.wg)(),(0,n.iD)("div",qe,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],32)])}var ze=(0,n.aZ)({name:"ForgotPassword",data(){return{form:{username:"",code:"",password:"",repeat_password:""},errorMessage:"",isVerificationCodeSent:!1}},methods:{...(0,d.nv)(["forgotPassword","resetPassword","logIn"]),async submit(){if(this.form.password===this.form.repeat_password)try{console.log(this.form.username,this.form.code,this.form.password),await this.resetPassword({username:this.form.username,code:this.form.code,password:this.form.password}),await this.logIn({username:this.form.username,password:this.form.password}),this.$router.push("/")}catch(e){console.log(e),this.errorMessage=e}else this.errorMessage="Passwords do not match"},async sendVerificationCode(){try{await this.forgotPassword(this.form.username),this.isVerificationCodeSent=!0}catch(e){console.log(e),this.errorMessage=e}}}});const $e=(0,V.Z)(ze,[["render",Ae]]);var Ne=$e;const Te=(0,n._)("h1",null,"Files",-1),We=["disabled"],Re={key:0},He=(0,n._)("thead",null,[(0,n._)("tr",null,[(0,n._)("th",null,"Type"),(0,n._)("th",null,"Name"),(0,n._)("th",null,"Size")])],-1),Le=["onDblclick"],Be=["value","onChange"],Ye=["onClick"],Ke=["onClick"],Ge={key:0,class:"error-message"};function Qe(e,t,a,s,r,i){return(0,n.wg)(),(0,n.iD)(n.HY,null,[Te,(0,n._)("div",null,[(0,n._)("header",null,[(0,n._)("button",{onClick:t[0]||(t[0]=(...t)=>e.goUp&&e.goUp(...t)),disabled:""===e.path},"Back",8,We),(0,n.wy)((0,n._)("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=t=>e.path=t),placeholder:"Path"},null,512),[[o.nr,e.path]]),(0,n._)("button",{class:"btn-flat",onClick:t[2]||(t[2]=(...t)=>e.createFolder&&e.createFolder(...t))},"Create Folder"),(0,n._)("button",{onClick:t[3]||(t[3]=(...t)=>e.uploadSingleFile&&e.uploadSingleFile(...t))},"Upload File"),(0,n._)("button",{onClick:t[4]||(t[4]=(...t)=>e.uploadDirectory&&e.uploadDirectory(...t))},"Upload Directory"),e.uploadingFile?((0,n.wg)(),(0,n.iD)("p",Re,"Uploading: "+(0,R.zw)(e.uploadingFile),1)):(0,n.kq)("",!0),(0,n._)("input",{type:"file",id:"fileInput",onChange:t[5]||(t[5]=(...t)=>e.handleUpload&&e.handleUpload(...t)),style:{display:"none"}},null,32),(0,n._)("input",{type:"file",id:"directoryInput",webkitdirectory:"",multiple:"",onChange:t[6]||(t[6]=(...t)=>e.handleUpload&&e.handleUpload(...t)),style:{display:"none"}},null,32)]),(0,n._)("main",null,[(0,n._)("table",null,[He,(0,n._)("tbody",null,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.files,((t,a)=>((0,n.wg)(),(0,n.iD)("tr",{key:a,onDblclick:o=>e.openAction(a,t)},[(0,n._)("td",null,(0,R.zw)(t.type),1),(0,n._)("td",null,[(0,n._)("input",{type:"text",value:t.path.replace(this.path,""),onChange:a=>e.renameItem(t.path,a.target.value)},null,40,Be)]),(0,n._)("td",null,(0,R.zw)("directory"===t.type?"-":t.size),1),(0,n._)("td",null,[(0,n._)("button",{onClick:a=>e.deleteItem(t.path)},"Delete",8,Ye)]),(0,n._)("td",null,[(0,n._)("button",{onClick:a=>e.downloadItem(t)},"Download",8,Ke)])],40,Le)))),128))])])])]),e.errorMessage?((0,n.wg)(),(0,n.iD)("p",Ge,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],64)}a(8858),a(1318),a(3228);var Xe=a(4730),et=a.n(Xe),tt={async getFiles(e){return e=e||"/",await s.Z.get(`/files/${e}?show_dirs=True&recursive=False`)},async createFolder(e){return await s.Z.post(`/files/${e}/`)},async uploadFile(e,t){let a=await s.Z.post(`/files/${e}url`),o=new FormData;"key"in a.data["data"]&&o.append("key",a.data["data"]["key"]);for(let s in a.data["data"])"key"!==s&&o.append(s,a.data["data"][s]);for(let s of t.entries())o.append(s[0],s[1]);return await s.Z.post(a.data.url,o,{headers:a.data.headers||{}})},async deleteItem(e){return await s.Z.delete(`/files/${e}`)},async renameItem(e,t){return await s.Z.put(`/files/${e}`,{path:t})},async downloadFile(e){let t=await s.Z.get(`/files/${e}/url`);return await s.Z.get(t.data.url,{headers:t.data.headers||{}})},async downloadItem(e){const t=e.path;if("directory"===e.type){let a=new(et()),o=await s.Z.get(`/files/${t}`,{params:{show_dirs:!1,recursive:!0}});for(let t of o.data){let o=await this.downloadFile(t.path);a.file(t.path.replace(e.path,""),o.data)}let n=await a.generateAsync({type:"blob"});const r=window.URL.createObjectURL(n),i=document.createElement("a");i.href=r;let l=t.split("/");i.setAttribute("download",l[l.length-2]+".zip"),document.body.appendChild(i),i.click()}else{let e=await this.downloadFile(t);const a=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=a,o.setAttribute("download",t.split("/").pop()),document.body.appendChild(o),o.click()}}},at=(0,n.aZ)({name:"FilesView",data(){return{path:"",files:[],uploadingFile:null,errorMessage:""}},methods:{openAction:function(e,t){"directory"===t.type&&(this.path=t.path,this.fetchFiles())},fetchFiles(){tt.getFiles(this.path).then((e=>{this.files=e.data})).catch((e=>{this.errorMessage="Error fetching files: "+e.message}))},goUp(){let e=this.path.trimEnd("/").split("/").filter(Boolean);e.pop(),this.path=e.join("/"),""!=this.path&&(this.path=this.path+"/"),this.fetchFiles()},createFolder(){tt.createFolder(this.path+"new").then((()=>{this.fetchFiles()})).catch((e=>{this.errorMessage="Error creating folder: "+e.message}))},uploadSingleFile(){document.getElementById("fileInput").click()},uploadDirectory(){document.getElementById("directoryInput").click()},handleUpload(e){const t=e.target.files;for(let a=0;a{this.fetchFiles(),this.uploadingFile=null})).catch((e=>{this.uploadingFile=null,this.errorMessage="Error uploading: "+e.message}))},downloadItem(e){tt.downloadItem(e).catch((e=>{this.errorMessage="Error downloading: "+e.message}))},deleteItem(e){tt.deleteItem(e).then((()=>{this.fetchFiles()})).catch((e=>{this.errorMessage="Error deleting: "+e.message}))},renameItem(e,t){let a=this.path.trimEnd("/")+"/"+t;tt.renameItem(e,a).then((()=>{this.fetchFiles()})).catch((e=>{this.errorMessage="Error renaming: "+e.message}))}},mounted(){this.fetchFiles()}});const ot=(0,V.Z)(at,[["render",Qe]]);var st=ot;const nt=(0,n._)("h1",null,"Your Profile",-1),rt=(0,n._)("hr",null,null,-1),it=(0,n._)("br",null,null,-1),lt=(0,n._)("strong",null,"Email address:",-1),dt=(0,n._)("strong",null,"Groups:",-1);function ct(e,t,a,o,s,r){return(0,n.wg)(),(0,n.iD)("section",null,[nt,rt,it,(0,n._)("div",null,[(0,n._)("p",null,[lt,(0,n.Uk)(),(0,n._)("span",null,(0,R.zw)(e.user.email),1)]),(0,n._)("p",null,[dt,(0,n.Uk)(),(0,n._)("span",null,(0,R.zw)(e.user.groups),1)])])])}var ut=(0,n.aZ)({name:"Profile",created:function(){return this.$store.dispatch("viewMe")},computed:{...(0,d.Se)({user:"stateUser"})},methods:{}});const pt=(0,V.Z)(ut,[["render",ct]]);var mt=pt;const bt={class:"job-list-section"},ht=(0,n._)("h1",null,"Jobs",-1),ft=(0,n._)("thead",null,[(0,n._)("tr",null,[(0,n._)("th",null,"Job Name"),(0,n._)("th",null,"Status"),(0,n._)("th",null,"Creation Time"),(0,n._)("th",null,"Application"),(0,n._)("th",null,"Actions")])],-1),gt=["onClick"],wt=["onClick"],_t=["disabled"],yt=["disabled"],vt={key:0,class:"job-details-section"},kt=(0,n._)("h2",null,"Job Details",-1);function jt(e,t,a,o,s,r){const i=(0,n.up)("job-details-tree");return(0,n.wg)(),(0,n.iD)("div",null,[(0,n._)("div",bt,[ht,(0,n._)("button",{onClick:t[0]||(t[0]=(...e)=>r.goToJobCreationForm&&r.goToJobCreationForm(...e)),style:{"margin-bottom":"10px"}},"+New Job"),(0,n._)("table",null,[ft,(0,n._)("tbody",null,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(s.jobs,(e=>((0,n.wg)(),(0,n.iD)("tr",{key:e.id},[(0,n._)("td",null,(0,R.zw)(e.job_name),1),(0,n._)("td",null,(0,R.zw)(e.status),1),(0,n._)("td",null,(0,R.zw)(e.date_created),1),(0,n._)("td",null,(0,R.zw)(e.application.application)+" > "+(0,R.zw)(e.application.version)+" > "+(0,R.zw)(e.application.entrypoint),1),(0,n._)("td",null,[(0,n._)("button",{onClick:t=>r.getJobDetails(e.id)},"Details",8,gt),(0,n._)("button",{onClick:t=>r.deleteJob(e.id)},"Delete",8,wt)])])))),128))])]),(0,n._)("button",{onClick:t[1]||(t[1]=e=>r.changePage(s.currentPage-1)),disabled:s.currentPage<=1},"Previous",8,_t),(0,n._)("button",{onClick:t[2]||(t[2]=e=>r.changePage(s.currentPage+1)),disabled:!s.canGoToNextPage},"Next",8,yt)]),s.selectedJob?((0,n.wg)(),(0,n.iD)("div",vt,[kt,(0,n.Wm)(i,{data:s.selectedJob},null,8,["data"])])):(0,n.kq)("",!0)])}var Ct={async createJob(e){return await s.Z.post("/jobs",e)},async getJobs(e,t){return await s.Z.get(`/jobs?offset=${e}&limit=${t}`)},async getJobDetails(e){return await s.Z.get(`/jobs/${e}`)},async deleteJob(e){return await s.Z.delete(`/jobs/${e}`)},async getApplications(){return await s.Z.get("/jobs/applications")}};const Ut={key:0,class:"tree-node"},Dt=["onClick"],Ft={class:"toggle-icon"},Vt={key:1,class:"tree-item-row"},Mt={class:"tree-item-value"},Pt={key:2,class:"tree-item-content"};function Et(e,t,a,o,s,r){const i=(0,n.up)("job-details-tree",!0);return r.isObject(a.data)?((0,n.wg)(),(0,n.iD)("div",Ut,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.data,((e,t)=>((0,n.wg)(),(0,n.iD)("div",{key:t,class:"tree-item"},[r.isObject(e)?((0,n.wg)(),(0,n.iD)("div",{key:0,onClick:e=>r.toggle(t),class:"tree-item-label"},[(0,n._)("span",Ft,(0,R.zw)(r.isExpanded(t)?"-":"+"),1),(0,n._)("strong",null,(0,R.zw)(t)+":",1)],8,Dt)):((0,n.wg)(),(0,n.iD)("div",Vt,[(0,n._)("strong",null,(0,R.zw)(t)+":",1),(0,n._)("div",Mt,(0,R.zw)(e),1)])),r.isObject(e)&&r.isExpanded(t)?((0,n.wg)(),(0,n.iD)("div",Pt,[(0,n.Wm)(i,{data:e},null,8,["data"])])):(0,n.kq)("",!0)])))),128))])):(0,n.kq)("",!0)}var St={name:"JobDetailsTree",props:{data:[Object,Array,String,Number,Boolean]},data(){return{expandedNodes:{}}},methods:{isObject(e){return e&&"object"===typeof e},toggle(e){this.expandedNodes[e]=!this.expandedNodes[e]},isExpanded(e){return!!this.expandedNodes[e]}}};const Zt=(0,V.Z)(St,[["render",Et]]);var It=Zt,Jt={data(){return{jobs:[],selectedJob:null,currentPage:1,limit:20,canGoToNextPage:!0}},methods:{goToJobCreationForm(){this.$router.push("/jobs/new")},async fetchJobs(){try{const e=(this.currentPage-1)*this.limit,t=await Ct.getJobs(e,this.limit);this.jobs=t.data,this.canGoToNextPage=this.jobs.length===this.limit}catch(e){console.error(e)}},async getJobDetails(e){try{const t=await Ct.getJobDetails(e);this.selectedJob=t.data}catch(t){console.error(t)}},async deleteJob(e){try{await Ct.deleteJob(e),this.fetchJobs()}catch(t){console.error(t)}},changePage(e){e<1||(this.currentPage=e,this.fetchJobs())}},components:{JobDetailsTree:It},mounted(){this.fetchJobs()}};const xt=(0,V.Z)(Jt,[["render",jt]]);var Ot=xt;const qt=e=>((0,n.dD)("data-v-7d969c12"),e=e(),(0,n.Cn)(),e),At={class:"form-group"},zt=qt((()=>(0,n._)("h2",null,"Submit New Job",-1))),$t=qt((()=>(0,n._)("label",{class:"form-label",for:"jobName"},"Job Name",-1))),Nt=qt((()=>(0,n._)("label",{class:"form-label"},"Application",-1))),Tt={class:"sub-group"},Wt=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Application",-1))),Rt=["value"],Ht=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Version",-1))),Lt=["value"],Bt=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Entrypoint",-1))),Yt=["value"],Kt={class:"form-group"},Gt=qt((()=>(0,n._)("label",{class:"form-label"},"Input",-1))),Qt={class:"sub-group"},Xt=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Configuration",-1))),ea=["value"],ta={class:"sub-group",style:{display:"flex","align-items":"center"}},aa=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Data",-1))),oa={class:"sub-group",style:{display:"flex","align-items":"center"}},sa=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Artifacts",-1))),na={class:"sub-group",style:{display:"flex","align-items":"center"}},ra=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Environment Variables",-1))),ia={class:"form-subsublabel"},la=["placeholder","onUpdate:modelValue"],da={class:"form-group"},ca=qt((()=>(0,n._)("label",{class:"form-label"},"Runtime",-1))),ua={class:"sub-group"},pa=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Hardware Specs",-1))),ma={class:"sub-group"},ba=qt((()=>(0,n._)("label",{class:"form-sublabel",for:"environment"},"Environment",-1))),ha=qt((()=>(0,n._)("option",{disabled:"",value:""},"Select environment",-1))),fa=qt((()=>(0,n._)("option",{value:"cloud"},"cloud",-1))),ga=qt((()=>(0,n._)("option",{value:"local"},"local",-1))),wa=qt((()=>(0,n._)("option",{value:"null"},"any",-1))),_a=[ha,fa,ga,wa],ya={class:"sub-group"},va=qt((()=>(0,n._)("label",{class:"form-sublabel",for:"priority"},"Priority",-1))),ka=qt((()=>(0,n._)("button",{type:"submit"},"Submit Job",-1))),ja=["innerHTML"];function Ca(e,t,a,s,r,i){const l=(0,n.up)("b-form-select");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n._)("form",{onSubmit:t[16]||(t[16]=(0,o.iM)(((...e)=>i.submitJob&&i.submitJob(...e)),["prevent"]))},[(0,n._)("div",At,[zt,(0,n._)("div",null,[$t,(0,n.wy)((0,n._)("input",{type:"text",id:"jobName","onUpdate:modelValue":t[0]||(t[0]=e=>r.job.job_name=e)},null,512),[[o.nr,r.job.job_name]])]),(0,n._)("div",null,[Nt,(0,n._)("div",Tt,[Wt,(0,n.wy)((0,n._)("select",{"onUpdate:modelValue":t[1]||(t[1]=e=>r.job.application.application=e),onChange:t[2]||(t[2]=(...e)=>i.fetchVersions&&i.fetchVersions(...e))},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.applications,((e,t)=>((0,n.wg)(),(0,n.iD)("option",{key:t,value:t},(0,R.zw)(t),9,Rt)))),128))],544),[[o.bM,r.job.application.application]]),Ht,(0,n.wy)((0,n._)("select",{"onUpdate:modelValue":t[3]||(t[3]=e=>r.job.application.version=e),onChange:t[4]||(t[4]=(...e)=>i.fetchEntrypoints&&i.fetchEntrypoints(...e))},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.versions,((e,t)=>((0,n.wg)(),(0,n.iD)("option",{key:t,value:t},(0,R.zw)(t),9,Lt)))),128))],544),[[o.bM,r.job.application.version]]),Bt,(0,n.wy)((0,n._)("select",{"onUpdate:modelValue":t[5]||(t[5]=e=>r.job.application.entrypoint=e)},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.entrypoints,((e,t)=>((0,n.wg)(),(0,n.iD)("option",{key:t,value:t},(0,R.zw)(t),9,Yt)))),128))],512),[[o.bM,r.job.application.entrypoint]])])])]),(0,n._)("div",Kt,[Gt,(0,n._)("div",Qt,[Xt,(0,n.wy)((0,n._)("select",{"onUpdate:modelValue":t[6]||(t[6]=e=>r.job.attributes.files_down.config_id=e)},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.configFiles,((e,t)=>((0,n.wg)(),(0,n.iD)("option",{key:t,value:e},(0,R.zw)(e),9,ea)))),128))],512),[[o.bM,r.job.attributes.files_down.config_id]])]),(0,n._)("div",ta,[aa,(0,n.Wm)(l,{modelValue:r.job.attributes.files_down.data_ids,"onUpdate:modelValue":t[7]||(t[7]=e=>r.job.attributes.files_down.data_ids=e),options:r.dataFiles,multiple:"",style:{width:"200px"}},null,8,["modelValue","options"])]),(0,n._)("div",oa,[sa,(0,n.Wm)(l,{modelValue:r.job.attributes.files_down.artifact_ids,"onUpdate:modelValue":t[8]||(t[8]=e=>r.job.attributes.files_down.artifact_ids=e),options:r.artifactFiles,multiple:"",style:{width:"200px"}},null,8,["modelValue","options"])]),(0,n._)("div",na,[ra,((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.environs,((e,t)=>((0,n.wg)(),(0,n.iD)("div",{key:t},[(0,n._)("label",ia,(0,R.zw)(e),1),(0,n.wy)((0,n._)("input",{type:"text",placeholder:e,"onUpdate:modelValue":t=>r.job.attributes.env_vars[e]=t},null,8,la),[[o.nr,r.job.attributes.env_vars[e]]])])))),128))])]),(0,n._)("div",da,[ca,(0,n._)("div",ua,[pa,(0,n.wy)((0,n._)("input",{type:"number",placeholder:"CPU Cores","onUpdate:modelValue":t[9]||(t[9]=e=>r.job.hardware.cpu_cores=e)},null,512),[[o.nr,r.job.hardware.cpu_cores,void 0,{number:!0}]]),(0,n.wy)((0,n._)("input",{type:"number",placeholder:"Memory","onUpdate:modelValue":t[10]||(t[10]=e=>r.job.hardware.memory=e)},null,512),[[o.nr,r.job.hardware.memory,void 0,{number:!0}]]),(0,n.wy)((0,n._)("input",{type:"text",placeholder:"GPU Model","onUpdate:modelValue":t[11]||(t[11]=e=>r.job.hardware.gpu_model=e)},null,512),[[o.nr,r.job.hardware.gpu_model]]),(0,n.wy)((0,n._)("input",{type:"text",placeholder:"GPU Architecture","onUpdate:modelValue":t[12]||(t[12]=e=>r.job.hardware.gpu_archi=e)},null,512),[[o.nr,r.job.hardware.gpu_archi]]),(0,n.wy)((0,n._)("input",{type:"number",placeholder:"GPU Memory","onUpdate:modelValue":t[13]||(t[13]=e=>r.job.hardware.gpu_mem=e)},null,512),[[o.nr,r.job.hardware.gpu_mem,void 0,{number:!0}]])]),(0,n._)("div",ma,[ba,(0,n.wy)((0,n._)("select",{id:"environment","onUpdate:modelValue":t[14]||(t[14]=e=>r.job.environment=e)},_a,512),[[o.bM,r.job.environment]])]),(0,n._)("div",ya,[va,(0,n.wy)((0,n._)("input",{type:"number",id:"priority","onUpdate:modelValue":t[15]||(t[15]=e=>r.job.priority=e)},null,512),[[o.nr,r.job.priority,void 0,{number:!0}]])])]),ka],32),r.errorMessage?((0,n.wg)(),(0,n.iD)("div",{key:0,innerHTML:r.errorMessage,class:"error-message"},null,8,ja)):(0,n.kq)("",!0)],64)}var Ua=a(2026),Da={data(){return{job:{job_name:null,environment:null,priority:null,application:{application:null,version:null,entrypoint:null},attributes:{files_down:{config_id:null,data_ids:[],artifact_ids:[]},env_vars:{}},hardware:{cpu_cores:null,memory:null,gpu_model:null,gpu_archi:null,gpu_mem:null}},applications:{},versions:{},entrypoints:{},environs:{},configFiles:[],dataFiles:[],artifactFiles:[],errorMessage:null}},components:{BFormSelect:Ua.KB},methods:{async fetchApplications(){const e=await Ct.getApplications();this.applications=e.data},fetchVersions(){""!=this.job.application.application&&(this.versions=this.applications[this.job.application.application])},fetchEntrypoints(){""!=this.job.application.version&&(this.entrypoints=this.versions[this.job.application.version])},fetchEnvirons(){""!=this.job.application.entrypoint&&(this.environs=this.entrypoints[this.job.application.entrypoint]["app"]["env"])},async fetchInputFiles(){const e=await tt.getFiles("config/");this.configFiles=e.data.map((e=>e.path.replace("config/","")));const t=await tt.getFiles("data/");this.dataFiles=t.data.map((e=>e.path.replace("data/","")));const a=await tt.getFiles("artifact/");this.artifactFiles=a.data.map((e=>e.path.replace("artifact/","")))},submitJob(){Ct.createJob(this.job).then((()=>{this.$router.push("/jobs")})).catch((e=>{422===e.response.status?this.errorMessage="Error(s) in job definition:"+e.response.data.detail.map((e=>{const t=e.loc.filter((e=>"body"!==e)).join(".");return`
- ${t}: ${e.msg}`})).join(""):this.errorMessage=e.response.data.detail}))}},watch:{"job.application.application":function(e,t){e!==t&&this.fetchVersions()},"job.application.version":function(e,t){e!==t&&this.fetchEntrypoints()},"job.application.entrypoint":function(e,t){e!==t&&this.fetchEnvirons()}},created(){this.fetchApplications(),this.fetchInputFiles()}};const Fa=(0,V.Z)(Da,[["render",Ca],["__scopeId","data-v-7d969c12"]]);var Va=Fa;const Ma={user:null},Pa={isAuthenticated:e=>!!e.user,stateUser:e=>e.user},Ea={async logIn({dispatch:e},t){await J.g.signIn({username:t.username,password:t.password}),e("viewMe")},async viewMe({commit:e}){try{let{data:t}=await s.Z.get("user");await e("setUser",t)}catch(t){t.response&&403==t.response.status?Oa.push("/user-not-confirmed"):Promise.reject(t)}},async logOut({commit:e}){await J.g.signOut(),await e("logout",null)},async forgotPassword(e,t){await J.g.forgotPassword(t)},async forgotPasswordSubmit(e,t){console.log(t.username,t.code,t.password);const a=await J.g.forgotPasswordSubmit(t.username,t.code,t.password);console.log(a)},async register(e,t){await J.g.signUp({username:t.username,password:t.password,attributes:{email:t.username,"custom:request_details":t.request_details}})},async sendConfirmationCode(e,t){await J.g.confirmSignUp(t)},async verify(e,t){await J.g.confirmSignUp(t.username,t.code)}},Sa={setUser(e,t){e.user=t},logout(e,t){e.user=t}};var Za={state:Ma,getters:Pa,actions:Ea,mutations:Sa},Ia=(0,d.MT)({modules:{users:Za}});const Ja=[{path:"/",name:"Home",component:W},{path:"/register",name:"Register",component:ne},{path:"/confirm-email/:username",name:"ConfirmEmail",component:me},{path:"/user-not-confirmed",name:"UserNotConfirmed",component:ge},{path:"/login",name:"Login",component:Fe},{path:"/forgot-password",name:"ForgotPassword",component:Ne},{path:"/files",name:"Files",component:st,meta:{requiresAuth:!0}},{path:"/profile",name:"Profile",component:mt,meta:{requiresAuth:!0}},{path:"/jobs",name:"Jobs",component:Ot,meta:{requiresAuth:!0}},{path:"/jobs/new",name:"JobCreation",component:Va,meta:{requiresAuth:!0}}],xa=(0,c.p7)({history:(0,c.PO)("/DECODE_Cloud_UserFrontend/"),routes:Ja});xa.beforeEach(((e,t,a)=>{if(e.matched.some((e=>e.meta.requiresAuth))){if(Ia.getters.isAuthenticated)return void a();a("/login")}else a()}));var Oa=xa;const qa={NODE_ENV:"production",BASE_URL:"/DECODE_Cloud_UserFrontend/"}.API_URL||"https://dev.decodeapi.arthur-jaques.de";async function Aa(){try{let e=await s.Z.get("/access_info"),t=e.data.cognito;I.d.configure({Auth:{userPoolId:t.user_pool_id,userPoolWebClientId:t.client_id,region:t.region,authenticationFlowType:"USER_PASSWORD_AUTH"}}),s.Z.interceptors.request.use((async e=>{try{const t=await J.g.currentSession(),a=t.getIdToken().getJwtToken();e.headers.Authorization=`Bearer ${a}`}catch(t){return await Ia.dispatch("logOut"),Oa.push("/login"),Promise.reject(t)}return e}),(async e=>e.response&&401===e.response.status?(await Ia.dispatch("logOut"),Oa.push("/login"),Promise.reject(e)):Promise.reject(e)));const a=(0,o.ri)(Z);a.use(Oa),a.use(Ia),a.mount("#app")}catch(e){console.error("Error during app initialization:",e)}}s.Z.defaults.baseURL=qa,Aa()},6249:function(){}},t={};function a(o){var s=t[o];if(void 0!==s)return s.exports;var n=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=e,function(){var e=[];a.O=function(t,o,s,n){if(!o){var r=1/0;for(c=0;c=n)&&Object.keys(a.O).every((function(e){return a.O[e](o[l])}))?o.splice(l--,1):(i=!1,n0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[o,s,n]}}(),function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};a.O.j=function(t){return 0===e[t]};var t=function(t,o){var s,n,r=o[0],i=o[1],l=o[2],d=0;if(r.some((function(t){return 0!==e[t]}))){for(s in i)a.o(i,s)&&(a.m[s]=i[s]);if(l)var c=l(a)}for(t&&t(o);d\n
\n \n
\n \n
\n
\n\n\n\n\n\n","\n\n\n\n\n","import { render } from \"./NavBar.vue?vue&type=template&id=b2c6df24&scoped=true\"\nimport script from \"./NavBar.vue?vue&type=script&lang=js\"\nexport * from \"./NavBar.vue?vue&type=script&lang=js\"\n\nimport \"./NavBar.vue?vue&type=style&index=0&id=b2c6df24&scoped=true&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b2c6df24\"]])\n\nexport default __exports__","import { render } from \"./App.vue?vue&type=template&id=a754d0ac\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\n\nimport \"./App.vue?vue&type=style&index=0&id=a754d0ac&lang=css\"\n\nimport exportComponent from \"../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n","import { render } from \"./HomeView.vue?vue&type=template&id=46270b3f\"\nimport script from \"./HomeView.vue?vue&type=script&lang=js\"\nexport * from \"./HomeView.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n","import { render } from \"./RegisterView.vue?vue&type=template&id=024d7dbb\"\nimport script from \"./RegisterView.vue?vue&type=script&lang=js\"\nexport * from \"./RegisterView.vue?vue&type=script&lang=js\"\n\nimport \"./RegisterView.vue?vue&type=style&index=0&id=024d7dbb&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n \n \n \n \n ","import { render } from \"./ConfirmEmailView.vue?vue&type=template&id=0e8c721e\"\nimport script from \"./ConfirmEmailView.vue?vue&type=script&lang=js\"\nexport * from \"./ConfirmEmailView.vue?vue&type=script&lang=js\"\n\nimport \"./ConfirmEmailView.vue?vue&type=style&index=0&id=0e8c721e&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n \n \n ","import { render } from \"./UserNotConfirmedView.vue?vue&type=template&id=caa9a2f2\"\nimport script from \"./UserNotConfirmedView.vue?vue&type=script&lang=js\"\nexport * from \"./UserNotConfirmedView.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n","import { render } from \"./LoginView.vue?vue&type=template&id=18f91e1a\"\nimport script from \"./LoginView.vue?vue&type=script&lang=js\"\nexport * from \"./LoginView.vue?vue&type=script&lang=js\"\n\nimport \"./LoginView.vue?vue&type=style&index=0&id=18f91e1a&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n","import { render } from \"./ForgotPasswordView.vue?vue&type=template&id=24195c02\"\nimport script from \"./ForgotPasswordView.vue?vue&type=script&lang=js\"\nexport * from \"./ForgotPasswordView.vue?vue&type=script&lang=js\"\n\nimport \"./ForgotPasswordView.vue?vue&type=style&index=0&id=24195c02&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n\n","import axios from 'axios';\nimport JSZip from 'jszip';\n\nexport default {\n async getFiles(path) {\n path = path || '/';\n return await axios.get(`/files/${path}?show_dirs=True&recursive=False`);\n },\n async createFolder(path) {\n return await axios.post(`/files/${path}/`);\n },\n async uploadFile(path, formData) {\n let resp = await axios.post(`/files/${path}url`)\n let data = new FormData();\n if ('key' in resp.data['data']) {\n data.append('key', resp.data['data']['key']);\n }\n for (let key in resp.data['data']) {\n if (key !== 'key') {\n data.append(key, resp.data['data'][key]);\n }\n }\n for (let pair of formData.entries()) {\n data.append(pair[0], pair[1]);\n }\n return await axios.post(resp.data.url, data, {headers: resp.data.headers || {}});\n },\n async deleteItem(path) {\n return await axios.delete(`/files/${path}`);\n },\n async renameItem(path, newPath) {\n return await axios.put(`/files/${path}`, {\"path\": newPath});\n },\n async downloadFile(path) {\n let resp = await axios.get(`/files/${path}/url`);\n return await axios.get(resp.data.url, {headers: resp.data.headers || {}});\n },\n async downloadItem(item) {\n const path = item.path;\n if (item.type === 'directory') {\n let zip = new JSZip();\n let files = await axios.get(`/files/${path}`, {params: {show_dirs: false, recursive: true}});\n for (let file of files.data) {\n let fileData = await this.downloadFile(file.path);\n zip.file(file.path.replace(item.path, ''), fileData.data);\n }\n let content = await zip.generateAsync({type:\"blob\"});\n const url = window.URL.createObjectURL(content);\n const link = document.createElement('a');\n link.href = url;\n let path_parts = path.split('/');\n link.setAttribute('download', path_parts[path_parts.length - 2] + '.zip');\n document.body.appendChild(link);\n link.click();\n }\n else {\n let resp = await this.downloadFile(path);\n const url = window.URL.createObjectURL(new Blob([resp.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', path.split('/').pop());\n document.body.appendChild(link);\n link.click();\n }\n },\n};\n","import { render } from \"./FilesView.vue?vue&type=template&id=decb10f6\"\nimport script from \"./FilesView.vue?vue&type=script&lang=js\"\nexport * from \"./FilesView.vue?vue&type=script&lang=js\"\n\nimport \"./FilesView.vue?vue&type=style&index=0&id=decb10f6&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n","import { render } from \"./ProfileView.vue?vue&type=template&id=68bbaec0\"\nimport script from \"./ProfileView.vue?vue&type=script&lang=js\"\nexport * from \"./ProfileView.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n \n\n\n\n","import axios from 'axios';\n\nexport default {\n async createJob(jobData) {\n return await axios.post(`/jobs`, jobData);\n },\n async getJobs(offset, limit) {\n return await axios.get(`/jobs?offset=${offset}&limit=${limit}`);\n },\n async getJobDetails(jobId) {\n return await axios.get(`/jobs/${jobId}`);\n },\n async deleteJob(jobId) {\n return await axios.delete(`/jobs/${jobId}`);\n },\n async getApplications() {\n return await axios.get(`/jobs/applications`);\n }\n};\n","\n\n\n\n\n","import { render } from \"./JobDetailsTree.vue?vue&type=template&id=1f680da8\"\nimport script from \"./JobDetailsTree.vue?vue&type=script&lang=js\"\nexport * from \"./JobDetailsTree.vue?vue&type=script&lang=js\"\n\nimport \"./JobDetailsTree.vue?vue&type=style&index=0&id=1f680da8&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { render } from \"./JobsView.vue?vue&type=template&id=35d1035b\"\nimport script from \"./JobsView.vue?vue&type=script&lang=js\"\nexport * from \"./JobsView.vue?vue&type=script&lang=js\"\n\nimport \"./JobsView.vue?vue&type=style&index=0&id=35d1035b&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n","import { render } from \"./JobCreationView.vue?vue&type=template&id=7d969c12&scoped=true\"\nimport script from \"./JobCreationView.vue?vue&type=script&lang=js\"\nexport * from \"./JobCreationView.vue?vue&type=script&lang=js\"\n\nimport \"./JobCreationView.vue?vue&type=style&index=0&id=7d969c12&scoped=true&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-7d969c12\"]])\n\nexport default __exports__","import axios from 'axios';\nimport router from '@/router';\nimport { Auth } from '@aws-amplify/auth';\n\nconst state = {\n user: null,\n};\n\nconst getters = {\n isAuthenticated: state => !!state.user,\n stateUser: state => state.user,\n};\n\nconst actions = {\n async logIn({dispatch}, user) {\n await Auth.signIn({\n username: user.username,\n password: user.password,\n })\n dispatch('viewMe');\n },\n async viewMe({commit}) {\n try {\n let {data} = await axios.get('user');\n await commit('setUser', data);\n } catch (error) {\n if (error.response && error.response.status == 403) {\n router.push('/user-not-confirmed');\n } else {\n Promise.reject(error);\n }\n }\n },\n async logOut({commit}) {\n await Auth.signOut();\n await commit('logout', null);\n },\n async forgotPassword(_, username) {\n await Auth.forgotPassword(username);\n },\n async forgotPasswordSubmit(_, user) {\n console.log(user.username, user.code, user.password);\n const ret = await Auth.forgotPasswordSubmit(user.username, user.code, user.password);\n console.log(ret);\n },\n async register(_, user) {\n await Auth.signUp({\n username: user.username,\n password: user.password,\n attributes: {\n email: user.username,\n 'custom:request_details': user.request_details,\n },\n });\n },\n async sendConfirmationCode(_, username) {\n await Auth.confirmSignUp(username);\n },\n async verify(_, user) {\n await Auth.confirmSignUp(user.username, user.code);\n },\n};\n\nconst mutations = {\n setUser(state, username) {\n state.user = username;\n },\n logout(state, user){\n state.user = user;\n },\n};\n\nexport default {\n state,\n getters,\n actions,\n mutations\n};\n","import { createStore } from \"vuex\";\n\nimport users from './modules/users';\n\nexport default createStore({\n modules: {\n users,\n }\n});\n","import { createRouter, createWebHistory } from 'vue-router'\nimport HomeView from '@/views/HomeView.vue';\nimport RegisterView from '@/views/RegisterView.vue';\nimport ConfirmEmailView from '@/views/ConfirmEmailView.vue';\nimport UserNotConfirmedView from '@/views/UserNotConfirmedView.vue';\nimport LoginView from '@/views/LoginView.vue';\nimport ForgotPasswordView from '@/views/ForgotPasswordView.vue';\nimport FilesView from '@/views/FilesView.vue';\nimport ProfileView from '@/views/ProfileView.vue';\nimport JobsView from '@/views/JobsView.vue';\nimport JobCreationView from '@/views/JobCreationView.vue';\nimport store from '@/store';\n\n\nconst routes = [\n {\n path: '/',\n name: \"Home\",\n component: HomeView,\n },\n {\n path: '/register',\n name: 'Register',\n component: RegisterView,\n },\n {\n path: '/confirm-email/:username',\n name: 'ConfirmEmail',\n component: ConfirmEmailView,\n },\n {\n path: '/user-not-confirmed',\n name: 'UserNotConfirmed',\n component: UserNotConfirmedView,\n },\n {\n path: '/login',\n name: 'Login',\n component: LoginView,\n },\n {\n path: '/forgot-password',\n name: 'ForgotPassword',\n component: ForgotPasswordView,\n },\n {\n path: '/files',\n name: 'Files',\n component: FilesView,\n meta: { requiresAuth: true },\n },\n {\n path: '/profile',\n name: 'Profile',\n component: ProfileView,\n meta: { requiresAuth: true },\n },\n {\n path: '/jobs',\n name: 'Jobs',\n component: JobsView,\n meta: { requiresAuth: true },\n }\n ,\n {\n path: '/jobs/new',\n name: 'JobCreation',\n component: JobCreationView,\n meta: { requiresAuth: true },\n }\n]\n\nconst router = createRouter({\n history: createWebHistory(process.env.BASE_URL),\n routes\n})\n\nrouter.beforeEach((to, _, next) => {\n if (to.matched.some(record => record.meta.requiresAuth)) {\n if (store.getters.isAuthenticated) {\n next();\n return;\n }\n next('/login');\n } else {\n next();\n }\n});\n\nexport default router\n","import 'bootstrap/dist/css/bootstrap.css';\nimport { createApp } from \"vue\";\nimport axios from 'axios';\n\nimport App from './App.vue';\nimport { Amplify, Auth } from 'aws-amplify';\nimport router from './router';\nimport store from './store';\n\nconst API_URL = process.env.API_URL || 'https://dev.decodeapi.arthur-jaques.de';\naxios.defaults.baseURL = API_URL;\n\nasync function initializeApp() {\n try {\n let response = await axios.get('/access_info');\n let cognitoConfig = response.data.cognito;\n Amplify.configure({\n Auth: {\n userPoolId: cognitoConfig.user_pool_id,\n userPoolWebClientId: cognitoConfig.client_id,\n region: cognitoConfig.region,\n authenticationFlowType: 'USER_PASSWORD_AUTH'\n }\n });\n axios.interceptors.request.use(async (config) => {\n try {\n const session = await Auth.currentSession();\n const token = session.getIdToken().getJwtToken();\n config.headers.Authorization = `Bearer ${token}`;\n } catch (error) {\n await store.dispatch('logOut');\n router.push('/login');\n return Promise.reject(error);\n }\n return config;\n }, async (error) => {\n if (error.response && error.response.status === 401) {\n await store.dispatch('logOut');\n router.push('/login');\n return Promise.reject(error);\n }\n return Promise.reject(error);\n });\n\n const app = createApp(App);\n app.use(router);\n app.use(store);\n app.mount(\"#app\");\n } catch (error) {\n console.error(\"Error during app initialization:\", error);\n }\n}\n\ninitializeApp();\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkDECODE_Cloud_UserFrontend\"] = self[\"webpackChunkDECODE_Cloud_UserFrontend\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(2343); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["id","class","_createElementBlock","_hoisted_1","_createVNode","_component_NavBar","_createElementVNode","_hoisted_2","_component_router_view","type","_component_router_link","to","_hoisted_3","_hoisted_4","_ctx","isLoggedIn","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","onClick","_cache","args","logout","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","defineComponent","name","computed","this","$store","getters","isAuthenticated","methods","dispatch","$router","push","__exports__","setup","store","useStore","router","useRouter","onMounted","then","state","user","components","NavBar","render","for","onSubmit","_withModifiers","submit","form","username","$event","password","repeat_password","request_details","maxlength","errorMessage","_toDisplayString","data","mapActions","register","error","console","log","verificationCode","href","resendVerificationCode","created","$route","params","verify","sendVerificationCode","logIn","code","isVerificationCodeSent","disabled","resetPassword","forgotPassword","goUp","path","placeholder","createFolder","uploadSingleFile","uploadDirectory","uploadingFile","onChange","handleUpload","style","webkitdirectory","multiple","_Fragment","_renderList","files","item","key","onDblclick","openAction","value","replace","ev","renameItem","target","size","deleteItem","downloadItem","getFiles","axios","get","post","uploadFile","formData","resp","FormData","append","pair","entries","url","headers","delete","newPath","put","downloadFile","zip","JSZip","show_dirs","recursive","file","fileData","content","generateAsync","window","URL","createObjectURL","link","document","createElement","path_parts","split","setAttribute","length","body","appendChild","click","Blob","pop","fetchFiles","fileService","response","catch","message","pathParts","trimEnd","filter","Boolean","join","getElementById","event","i","relativePath","webkitRelativePath","pathArray","folderPath","newName","mounted","email","groups","mapGetters","$options","goToJobCreationForm","$data","jobs","job","job_name","status","date_created","application","version","entrypoint","getJobDetails","deleteJob","changePage","currentPage","canGoToNextPage","selectedJob","_component_job_details_tree","createJob","jobData","getJobs","offset","limit","jobId","getApplications","isObject","$props","toggle","isExpanded","props","Object","Array","String","Number","expandedNodes","fetchJobs","jobService","page","JobDetailsTree","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","submitJob","fetchVersions","applications","fetchEntrypoints","versions","entrypoints","_hoisted_15","attributes","files_down","config_id","configFiles","index","_hoisted_16","_hoisted_17","_hoisted_18","_component_b_form_select","data_ids","options","dataFiles","_hoisted_19","_hoisted_20","artifact_ids","artifactFiles","_hoisted_21","_hoisted_22","environs","_hoisted_23","env_vars","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","hardware","cpu_cores","memory","gpu_model","gpu_archi","gpu_mem","_hoisted_29","_hoisted_30","environment","_hoisted_36","_hoisted_37","priority","_hoisted_38","innerHTML","BFormSelect","fetchApplications","fetchEnvirons","fetchInputFiles","response_cfg","map","response_data","response_art","detail","err","loc","part","msg","watch","newVal","oldVal","stateUser","actions","Auth","signIn","viewMe","commit","Promise","reject","logOut","signOut","_","forgotPasswordSubmit","ret","signUp","sendConfirmationCode","confirmSignUp","mutations","setUser","createStore","modules","users","routes","component","HomeView","RegisterView","ConfirmEmailView","UserNotConfirmedView","LoginView","ForgotPasswordView","FilesView","meta","requiresAuth","ProfileView","JobsView","JobCreationView","createRouter","history","createWebHistory","process","beforeEach","next","matched","some","record","API_URL","async","initializeApp","cognitoConfig","cognito","Amplify","configure","userPoolId","user_pool_id","userPoolWebClientId","client_id","region","authenticationFlowType","interceptors","request","use","session","currentSession","token","getIdToken","getJwtToken","config","Authorization","app","createApp","App","mount","defaults","baseURL","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","loaded","__webpack_modules__","call","m","deferred","O","result","chunkIds","fn","notFulfilled","Infinity","fulfilled","j","keys","every","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","forEach","bind","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file diff --git a/js/app.92be9a99.js b/js/app.92be9a99.js new file mode 100644 index 0000000..9e8b6d9 --- /dev/null +++ b/js/app.92be9a99.js @@ -0,0 +1,2 @@ +(function(){var e={1051:function(e,t,a){"use strict";a(560);var o=a(9242),s=a(1076),n=a(3396);const r={id:"app"},i={class:"main container"};function l(e,t,a,o,s,l){const d=(0,n.up)("NavBar"),c=(0,n.up)("router-view");return(0,n.wg)(),(0,n.iD)("div",r,[(0,n.Wm)(d),(0,n._)("div",i,[(0,n.Wm)(c)])])}var d=a(65),c=a(2483);const u=e=>((0,n.dD)("data-v-b2c6df24"),e=e(),(0,n.Cn)(),e),p={class:"navbar navbar-expand-md navbar-dark bg-dark"},m={class:"container"},b=u((()=>(0,n._)("button",{class:"navbar-toggler",type:"button","data-bs-toggle":"collapse","data-bs-target":"#navbarCollapse","aria-controls":"navbarCollapse","aria-expanded":"false","aria-label":"Toggle navigation"},[(0,n._)("span",{class:"navbar-toggler-icon"})],-1))),h={class:"collapse navbar-collapse",id:"navbarCollapse"},f={key:0,class:"navbar-nav me-auto mb-2 mb-md-0"},g={class:"nav-item"},w={class:"nav-item"},_={class:"nav-item"},y={class:"nav-item"},v={class:"nav-item"},k={key:1,class:"navbar-nav me-auto mb-2 mb-md-0"},j={class:"nav-item"},C={class:"nav-item"},U={class:"nav-item"};function D(e,t,a,o,s,r){const i=(0,n.up)("router-link");return(0,n.wg)(),(0,n.iD)("header",null,[(0,n._)("nav",p,[(0,n._)("div",m,[(0,n.Wm)(i,{class:"navbar-brand",to:"/"},{default:(0,n.w5)((()=>[(0,n.Uk)("DECODE OpenCloud")])),_:1}),b,(0,n._)("div",h,[e.isLoggedIn?((0,n.wg)(),(0,n.iD)("ul",f,[(0,n._)("li",g,[(0,n.Wm)(i,{class:"nav-link",to:"/"},{default:(0,n.w5)((()=>[(0,n.Uk)("Home")])),_:1})]),(0,n._)("li",w,[(0,n.Wm)(i,{class:"nav-link",to:"/files"},{default:(0,n.w5)((()=>[(0,n.Uk)("Files")])),_:1})]),(0,n._)("li",_,[(0,n.Wm)(i,{class:"nav-link",to:"/jobs"},{default:(0,n.w5)((()=>[(0,n.Uk)("Jobs")])),_:1})]),(0,n._)("li",y,[(0,n.Wm)(i,{class:"nav-link",to:"/profile"},{default:(0,n.w5)((()=>[(0,n.Uk)("Profile")])),_:1})]),(0,n._)("li",v,[(0,n._)("a",{class:"nav-link",onClick:t[0]||(t[0]=(...t)=>e.logout&&e.logout(...t))},"Log Out")])])):((0,n.wg)(),(0,n.iD)("ul",k,[(0,n._)("li",j,[(0,n.Wm)(i,{class:"nav-link",to:"/"},{default:(0,n.w5)((()=>[(0,n.Uk)("Home")])),_:1})]),(0,n._)("li",C,[(0,n.Wm)(i,{class:"nav-link",to:"/register"},{default:(0,n.w5)((()=>[(0,n.Uk)("Register")])),_:1})]),(0,n._)("li",U,[(0,n.Wm)(i,{class:"nav-link",to:"/login"},{default:(0,n.w5)((()=>[(0,n.Uk)("Log In")])),_:1})])]))])])])])}var F=(0,n.aZ)({name:"NavBar",computed:{isLoggedIn:function(){return this.$store.getters.isAuthenticated}},methods:{async logout(){await this.$store.dispatch("logOut"),this.$router.push("/login")}}}),V=a(89);const M=(0,V.Z)(F,[["render",D],["__scopeId","data-v-b2c6df24"]]);var P=M,E={setup(){const e=(0,d.oR)(),t=(0,c.tv)();(0,n.bv)((()=>{e.dispatch("viewMe").then((()=>{e.state.user&&t.push("/home")}))}))},components:{NavBar:P}};const S=(0,V.Z)(E,[["render",l]]);var Z=S,I=a(7429),J=a(4517);const x={key:0,id:"logout"},O={id:"logout"},q={id:"logout"},A={key:1},z=(0,n._)("span",null," or ",-1);function $(e,t,a,o,s,r){const i=(0,n.up)("router-link");return(0,n.wg)(),(0,n.iD)("section",null,[e.isLoggedIn?((0,n.wg)(),(0,n.iD)("div",x,[(0,n._)("p",O,[(0,n.Uk)("Click "),(0,n.Wm)(i,{to:"/files"},{default:(0,n.w5)((()=>[(0,n.Uk)("here")])),_:1}),(0,n.Uk)(" to view your files.")]),(0,n._)("p",q,[(0,n.Uk)("Click "),(0,n.Wm)(i,{to:"/jobs"},{default:(0,n.w5)((()=>[(0,n.Uk)("here")])),_:1}),(0,n.Uk)(" to view your jobs.")])])):((0,n.wg)(),(0,n.iD)("p",A,[(0,n._)("span",null,[(0,n.Wm)(i,{to:"/register"},{default:(0,n.w5)((()=>[(0,n.Uk)("Register")])),_:1})]),z,(0,n._)("span",null,[(0,n.Wm)(i,{to:"/login"},{default:(0,n.w5)((()=>[(0,n.Uk)("Log In")])),_:1})])]))])}var N=(0,n.aZ)({name:"HomeView",computed:{isLoggedIn:function(){return this.$store.getters.isAuthenticated}}});const T=(0,V.Z)(N,[["render",$]]);var W=T,R=a(7139);const H={class:"mb-3"},L=(0,n._)("label",{for:"username",class:"form-label"},"Email address:",-1),B={class:"mb-3"},Y=(0,n._)("label",{for:"password",class:"form-label"},"Password:",-1),K={class:"mb-3"},G=(0,n._)("label",{for:"repeat_password",class:"form-label"},"Repeat password:",-1),Q={class:"mb-3"},X=(0,n._)("label",{for:"request_details",class:"form-label"},"Request details:",-1),ee=(0,n._)("button",{type:"submit",class:"btn btn-primary"},"Send verification code",-1),te={key:0,class:"error"};function ae(e,t,a,s,r,i){return(0,n.wg)(),(0,n.iD)("section",null,[(0,n._)("form",{onSubmit:t[4]||(t[4]=(0,o.iM)(((...t)=>e.submit&&e.submit(...t)),["prevent"]))},[(0,n._)("div",H,[L,(0,n.wy)((0,n._)("input",{type:"text",name:"username","onUpdate:modelValue":t[0]||(t[0]=t=>e.form.username=t),class:"form-control"},null,512),[[o.nr,e.form.username]])]),(0,n._)("div",B,[Y,(0,n.wy)((0,n._)("input",{type:"password",name:"password","onUpdate:modelValue":t[1]||(t[1]=t=>e.form.password=t),class:"form-control"},null,512),[[o.nr,e.form.password]])]),(0,n._)("div",K,[G,(0,n.wy)((0,n._)("input",{type:"password",name:"repeat_password","onUpdate:modelValue":t[2]||(t[2]=t=>e.form.repeat_password=t),class:"form-control"},null,512),[[o.nr,e.form.repeat_password]])]),(0,n._)("div",Q,[X,(0,n.wy)((0,n._)("textarea",{name:"request_details","onUpdate:modelValue":t[3]||(t[3]=t=>e.form.request_details=t),class:"form-control",maxlength:"2000"},null,512),[[o.nr,e.form.request_details]])]),ee,e.errorMessage?((0,n.wg)(),(0,n.iD)("div",te,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],32)])}var oe=(0,n.aZ)({name:"Register",data(){return{form:{username:"",password:"",repeat_password:"",request_details:""},errorMessage:""}},methods:{...(0,d.nv)(["register"]),async submit(){if(this.form.password===this.form.repeat_password)try{await this.register({username:this.form.username,password:this.form.password,request_details:this.form.request_details}),this.$router.push("/confirm-email/"+this.form.username)}catch(e){console.log(e),this.errorMessage=e}else this.errorMessage="Passwords do not match"}}});const se=(0,V.Z)(oe,[["render",ae]]);var ne=se;const re={class:"mb-3"},ie=(0,n._)("label",{for:"verificationCode",class:"form-label"},"Verification code:",-1),le=(0,n._)("button",{type:"submit",class:"btn btn-primary"},"Verify email",-1),de={key:0,class:"error"};function ce(e,t,a,s,r,i){return(0,n.wg)(),(0,n.iD)("section",null,[(0,n._)("form",{onSubmit:t[2]||(t[2]=(0,o.iM)(((...t)=>e.submit&&e.submit(...t)),["prevent"]))},[(0,n._)("div",re,[ie,(0,n.wy)((0,n._)("input",{type:"text",name:"verificationCode","onUpdate:modelValue":t[0]||(t[0]=t=>e.form.verificationCode=t),class:"form-control"},null,512),[[o.nr,e.form.verificationCode]]),(0,n._)("a",{href:"#",onClick:t[1]||(t[1]=(0,o.iM)(((...t)=>e.resendVerificationCode&&e.resendVerificationCode(...t)),["prevent"])),class:"btn btn-link"},"Re-send verification code")]),le,e.errorMessage?((0,n.wg)(),(0,n.iD)("div",de,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],32)])}var ue=(0,n.aZ)({name:"ConfirmEmail",data(){return{form:{verificationCode:""},username:"",errorMessage:""}},created(){this.username=this.$route.params.username},methods:{...(0,d.nv)(["verify","sendVerificationCode"]),async submit(){try{await this.verify({username:this.username,code:this.form.verificationCode}),this.$router.push("/user-not-confirmed")}catch(e){console.log(e),this.errorMessage=e}},async resendVerificationCode(){try{await this.sendVerificationCode(this.username)}catch(e){console.log(e),this.errorMessage=e}}}});const pe=(0,V.Z)(ue,[["render",ce]]);var me=pe;function be(e,t,a,o,s,r){return(0,n.wg)(),(0,n.iD)("section",null," Your account has still not been accepted by an administrator. ")}var he=(0,n.aZ)({name:"UserNotConfirmed"});const fe=(0,V.Z)(he,[["render",be]]);var ge=fe;const we={class:"mb-3"},_e=(0,n._)("label",{for:"username",class:"form-label"},"Email address:",-1),ye={class:"mb-3"},ve=(0,n._)("label",{for:"password",class:"form-label"},"Password:",-1),ke=(0,n._)("button",{type:"submit",class:"btn btn-primary"},"Submit",-1),je={key:0,class:"error"};function Ce(e,t,a,s,r,i){const l=(0,n.up)("router-link");return(0,n.wg)(),(0,n.iD)("section",null,[(0,n._)("form",{onSubmit:t[2]||(t[2]=(0,o.iM)(((...t)=>e.submit&&e.submit(...t)),["prevent"]))},[(0,n._)("div",we,[_e,(0,n.wy)((0,n._)("input",{type:"text",name:"username","onUpdate:modelValue":t[0]||(t[0]=t=>e.form.username=t),class:"form-control"},null,512),[[o.nr,e.form.username]])]),(0,n._)("div",ye,[ve,(0,n.wy)((0,n._)("input",{type:"password",name:"password","onUpdate:modelValue":t[1]||(t[1]=t=>e.form.password=t),class:"form-control"},null,512),[[o.nr,e.form.password]])]),(0,n._)("div",null,[(0,n.Wm)(l,{to:"/forgot-password",class:"btn btn-link"},{default:(0,n.w5)((()=>[(0,n.Uk)("Forgot password?")])),_:1})]),ke,e.errorMessage?((0,n.wg)(),(0,n.iD)("div",je,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],32)])}var Ue=(0,n.aZ)({name:"Login",data(){return{form:{username:"",password:""},errorMessage:""}},methods:{...(0,d.nv)(["logIn"]),async submit(){try{await this.logIn({username:this.form.username,password:this.form.password}),this.$router.push("/")}catch(e){"UserNotConfirmedException"===e.code?this.$router.push("/confirm-email/"+this.form.username):(console.log(e),this.errorMessage=e)}}}});const De=(0,V.Z)(Ue,[["render",Ce]]);var Fe=De;const Ve={key:0,class:"mb-3"},Me=(0,n._)("label",{for:"username",class:"form-label"},"Email address:",-1),Pe=["disabled"],Ee={key:1,class:"mb-3"},Se=(0,n._)("label",{for:"code",class:"form-label"},"Verification code:",-1),Ze={key:2,class:"mb-3"},Ie=(0,n._)("label",{for:"password",class:"form-label"},"New password:",-1),Je={key:3,class:"mb-3"},xe=(0,n._)("label",{for:"repeat_password",class:"form-label"},"Repeat new password:",-1),Oe={key:4,type:"submit",class:"btn btn-primary"},qe={key:5,class:"error"};function Ae(e,t,a,s,r,i){return(0,n.wg)(),(0,n.iD)("section",null,[(0,n._)("form",{onSubmit:t[5]||(t[5]=(0,o.iM)(((...t)=>e.submit&&e.submit(...t)),["prevent"]))},[e.isVerificationCodeSent?(0,n.kq)("",!0):((0,n.wg)(),(0,n.iD)("div",Ve,[Me,(0,n.wy)((0,n._)("input",{type:"text",name:"username","onUpdate:modelValue":t[0]||(t[0]=t=>e.form.username=t),class:"form-control"},null,512),[[o.nr,e.form.username]]),(0,n._)("button",{type:"button",onClick:t[1]||(t[1]=(...t)=>e.sendVerificationCode&&e.sendVerificationCode(...t)),class:"btn btn-primary",disabled:e.isVerificationCodeSent},"Send verification code",8,Pe)])),e.isVerificationCodeSent?((0,n.wg)(),(0,n.iD)("div",Ee,[Se,(0,n.wy)((0,n._)("input",{type:"text",name:"code","onUpdate:modelValue":t[2]||(t[2]=t=>e.form.code=t),class:"form-control"},null,512),[[o.nr,e.form.code]])])):(0,n.kq)("",!0),e.isVerificationCodeSent?((0,n.wg)(),(0,n.iD)("div",Ze,[Ie,(0,n.wy)((0,n._)("input",{type:"password",name:"password","onUpdate:modelValue":t[3]||(t[3]=t=>e.form.password=t),class:"form-control"},null,512),[[o.nr,e.form.password]])])):(0,n.kq)("",!0),e.isVerificationCodeSent?((0,n.wg)(),(0,n.iD)("div",Je,[xe,(0,n.wy)((0,n._)("input",{type:"password",name:"repeat_password","onUpdate:modelValue":t[4]||(t[4]=t=>e.form.repeat_password=t),class:"form-control"},null,512),[[o.nr,e.form.repeat_password]])])):(0,n.kq)("",!0),e.isVerificationCodeSent?((0,n.wg)(),(0,n.iD)("button",Oe,"Save")):(0,n.kq)("",!0),e.errorMessage?((0,n.wg)(),(0,n.iD)("div",qe,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],32)])}var ze=(0,n.aZ)({name:"ForgotPassword",data(){return{form:{username:"",code:"",password:"",repeat_password:""},errorMessage:"",isVerificationCodeSent:!1}},methods:{...(0,d.nv)(["forgotPassword","resetPassword","logIn"]),async submit(){if(this.form.password===this.form.repeat_password)try{console.log("view",this.form.username,this.form.code,this.form.password),await this.resetPassword({username:this.form.username,code:this.form.code,password:this.form.password}),await this.logIn({username:this.form.username,password:this.form.password}),this.$router.push("/")}catch(e){console.log(e),this.errorMessage=e}else this.errorMessage="Passwords do not match"},async sendVerificationCode(){try{await this.forgotPassword(this.form.username),this.isVerificationCodeSent=!0}catch(e){console.log(e),this.errorMessage=e}}}});const $e=(0,V.Z)(ze,[["render",Ae]]);var Ne=$e;const Te=(0,n._)("h1",null,"Files",-1),We=["disabled"],Re={key:0},He=(0,n._)("thead",null,[(0,n._)("tr",null,[(0,n._)("th",null,"Type"),(0,n._)("th",null,"Name"),(0,n._)("th",null,"Size")])],-1),Le=["onDblclick"],Be=["value","onChange"],Ye=["onClick"],Ke=["onClick"],Ge={key:0,class:"error-message"};function Qe(e,t,a,s,r,i){return(0,n.wg)(),(0,n.iD)(n.HY,null,[Te,(0,n._)("div",null,[(0,n._)("header",null,[(0,n._)("button",{onClick:t[0]||(t[0]=(...t)=>e.goUp&&e.goUp(...t)),disabled:""===e.path},"Back",8,We),(0,n.wy)((0,n._)("input",{type:"text","onUpdate:modelValue":t[1]||(t[1]=t=>e.path=t),placeholder:"Path"},null,512),[[o.nr,e.path]]),(0,n._)("button",{class:"btn-flat",onClick:t[2]||(t[2]=(...t)=>e.createFolder&&e.createFolder(...t))},"Create Folder"),(0,n._)("button",{onClick:t[3]||(t[3]=(...t)=>e.uploadSingleFile&&e.uploadSingleFile(...t))},"Upload File"),(0,n._)("button",{onClick:t[4]||(t[4]=(...t)=>e.uploadDirectory&&e.uploadDirectory(...t))},"Upload Directory"),e.uploadingFile?((0,n.wg)(),(0,n.iD)("p",Re,"Uploading: "+(0,R.zw)(e.uploadingFile),1)):(0,n.kq)("",!0),(0,n._)("input",{type:"file",id:"fileInput",onChange:t[5]||(t[5]=(...t)=>e.handleUpload&&e.handleUpload(...t)),style:{display:"none"}},null,32),(0,n._)("input",{type:"file",id:"directoryInput",webkitdirectory:"",multiple:"",onChange:t[6]||(t[6]=(...t)=>e.handleUpload&&e.handleUpload(...t)),style:{display:"none"}},null,32)]),(0,n._)("main",null,[(0,n._)("table",null,[He,(0,n._)("tbody",null,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(e.files,((t,a)=>((0,n.wg)(),(0,n.iD)("tr",{key:a,onDblclick:o=>e.openAction(a,t)},[(0,n._)("td",null,(0,R.zw)(t.type),1),(0,n._)("td",null,[(0,n._)("input",{type:"text",value:t.path.replace(this.path,""),onChange:a=>e.renameItem(t.path,a.target.value)},null,40,Be)]),(0,n._)("td",null,(0,R.zw)("directory"===t.type?"-":t.size),1),(0,n._)("td",null,[(0,n._)("button",{onClick:a=>e.deleteItem(t.path)},"Delete",8,Ye)]),(0,n._)("td",null,[(0,n._)("button",{onClick:a=>e.downloadItem(t)},"Download",8,Ke)])],40,Le)))),128))])])])]),e.errorMessage?((0,n.wg)(),(0,n.iD)("p",Ge,(0,R.zw)(e.errorMessage),1)):(0,n.kq)("",!0)],64)}a(8858),a(1318),a(3228);var Xe=a(4730),et=a.n(Xe),tt={async getFiles(e){return e=e||"/",await s.Z.get(`/files/${e}?show_dirs=True&recursive=False`)},async createFolder(e){return await s.Z.post(`/files/${e}/`)},async uploadFile(e,t){let a=await s.Z.post(`/files/${e}url`),o=new FormData;"key"in a.data["data"]&&o.append("key",a.data["data"]["key"]);for(let s in a.data["data"])"key"!==s&&o.append(s,a.data["data"][s]);for(let s of t.entries())o.append(s[0],s[1]);return await s.Z.post(a.data.url,o,{headers:a.data.headers||{}})},async deleteItem(e){return await s.Z.delete(`/files/${e}`)},async renameItem(e,t){return await s.Z.put(`/files/${e}`,{path:t})},async downloadFile(e){let t=await s.Z.get(`/files/${e}/url`);return await s.Z.get(t.data.url,{headers:t.data.headers||{}})},async downloadItem(e){const t=e.path;if("directory"===e.type){let a=new(et()),o=await s.Z.get(`/files/${t}`,{params:{show_dirs:!1,recursive:!0}});for(let t of o.data){let o=await this.downloadFile(t.path);a.file(t.path.replace(e.path,""),o.data)}let n=await a.generateAsync({type:"blob"});const r=window.URL.createObjectURL(n),i=document.createElement("a");i.href=r;let l=t.split("/");i.setAttribute("download",l[l.length-2]+".zip"),document.body.appendChild(i),i.click()}else{let e=await this.downloadFile(t);const a=window.URL.createObjectURL(new Blob([e.data])),o=document.createElement("a");o.href=a,o.setAttribute("download",t.split("/").pop()),document.body.appendChild(o),o.click()}}},at=(0,n.aZ)({name:"FilesView",data(){return{path:"",files:[],uploadingFile:null,errorMessage:""}},methods:{openAction:function(e,t){"directory"===t.type&&(this.path=t.path,this.fetchFiles())},fetchFiles(){tt.getFiles(this.path).then((e=>{this.files=e.data})).catch((e=>{this.errorMessage="Error fetching files: "+e.message}))},goUp(){let e=this.path.trimEnd("/").split("/").filter(Boolean);e.pop(),this.path=e.join("/"),""!=this.path&&(this.path=this.path+"/"),this.fetchFiles()},createFolder(){tt.createFolder(this.path+"new").then((()=>{this.fetchFiles()})).catch((e=>{this.errorMessage="Error creating folder: "+e.message}))},uploadSingleFile(){document.getElementById("fileInput").click()},uploadDirectory(){document.getElementById("directoryInput").click()},handleUpload(e){const t=e.target.files;for(let a=0;a{this.fetchFiles(),this.uploadingFile=null})).catch((e=>{this.uploadingFile=null,this.errorMessage="Error uploading: "+e.message}))},downloadItem(e){tt.downloadItem(e).catch((e=>{this.errorMessage="Error downloading: "+e.message}))},deleteItem(e){tt.deleteItem(e).then((()=>{this.fetchFiles()})).catch((e=>{this.errorMessage="Error deleting: "+e.message}))},renameItem(e,t){let a=this.path.trimEnd("/")+"/"+t;tt.renameItem(e,a).then((()=>{this.fetchFiles()})).catch((e=>{this.errorMessage="Error renaming: "+e.message}))}},mounted(){this.fetchFiles()}});const ot=(0,V.Z)(at,[["render",Qe]]);var st=ot;const nt=(0,n._)("h1",null,"Your Profile",-1),rt=(0,n._)("hr",null,null,-1),it=(0,n._)("br",null,null,-1),lt=(0,n._)("strong",null,"Email address:",-1),dt=(0,n._)("strong",null,"Groups:",-1);function ct(e,t,a,o,s,r){return(0,n.wg)(),(0,n.iD)("section",null,[nt,rt,it,(0,n._)("div",null,[(0,n._)("p",null,[lt,(0,n.Uk)(),(0,n._)("span",null,(0,R.zw)(e.user.email),1)]),(0,n._)("p",null,[dt,(0,n.Uk)(),(0,n._)("span",null,(0,R.zw)(e.user.groups),1)])])])}var ut=(0,n.aZ)({name:"Profile",created:function(){return this.$store.dispatch("viewMe")},computed:{...(0,d.Se)({user:"stateUser"})},methods:{}});const pt=(0,V.Z)(ut,[["render",ct]]);var mt=pt;const bt={class:"job-list-section"},ht=(0,n._)("h1",null,"Jobs",-1),ft=(0,n._)("thead",null,[(0,n._)("tr",null,[(0,n._)("th",null,"Job Name"),(0,n._)("th",null,"Status"),(0,n._)("th",null,"Creation Time"),(0,n._)("th",null,"Application"),(0,n._)("th",null,"Actions")])],-1),gt=["onClick"],wt=["onClick"],_t=["disabled"],yt=["disabled"],vt={key:0,class:"job-details-section"},kt=(0,n._)("h2",null,"Job Details",-1);function jt(e,t,a,o,s,r){const i=(0,n.up)("job-details-tree");return(0,n.wg)(),(0,n.iD)("div",null,[(0,n._)("div",bt,[ht,(0,n._)("button",{onClick:t[0]||(t[0]=(...e)=>r.goToJobCreationForm&&r.goToJobCreationForm(...e)),style:{"margin-bottom":"10px"}},"+New Job"),(0,n._)("table",null,[ft,(0,n._)("tbody",null,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(s.jobs,(e=>((0,n.wg)(),(0,n.iD)("tr",{key:e.id},[(0,n._)("td",null,(0,R.zw)(e.job_name),1),(0,n._)("td",null,(0,R.zw)(e.status),1),(0,n._)("td",null,(0,R.zw)(e.date_created),1),(0,n._)("td",null,(0,R.zw)(e.application.application)+" > "+(0,R.zw)(e.application.version)+" > "+(0,R.zw)(e.application.entrypoint),1),(0,n._)("td",null,[(0,n._)("button",{onClick:t=>r.getJobDetails(e.id)},"Details",8,gt),(0,n._)("button",{onClick:t=>r.deleteJob(e.id)},"Delete",8,wt)])])))),128))])]),(0,n._)("button",{onClick:t[1]||(t[1]=e=>r.changePage(s.currentPage-1)),disabled:s.currentPage<=1},"Previous",8,_t),(0,n._)("button",{onClick:t[2]||(t[2]=e=>r.changePage(s.currentPage+1)),disabled:!s.canGoToNextPage},"Next",8,yt)]),s.selectedJob?((0,n.wg)(),(0,n.iD)("div",vt,[kt,(0,n.Wm)(i,{data:s.selectedJob},null,8,["data"])])):(0,n.kq)("",!0)])}var Ct={async createJob(e){return await s.Z.post("/jobs",e)},async getJobs(e,t){return await s.Z.get(`/jobs?offset=${e}&limit=${t}`)},async getJobDetails(e){return await s.Z.get(`/jobs/${e}`)},async deleteJob(e){return await s.Z.delete(`/jobs/${e}`)},async getApplications(){return await s.Z.get("/jobs/applications")}};const Ut={key:0,class:"tree-node"},Dt=["onClick"],Ft={class:"toggle-icon"},Vt={key:1,class:"tree-item-row"},Mt={class:"tree-item-value"},Pt={key:2,class:"tree-item-content"};function Et(e,t,a,o,s,r){const i=(0,n.up)("job-details-tree",!0);return r.isObject(a.data)?((0,n.wg)(),(0,n.iD)("div",Ut,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.data,((e,t)=>((0,n.wg)(),(0,n.iD)("div",{key:t,class:"tree-item"},[r.isObject(e)?((0,n.wg)(),(0,n.iD)("div",{key:0,onClick:e=>r.toggle(t),class:"tree-item-label"},[(0,n._)("span",Ft,(0,R.zw)(r.isExpanded(t)?"-":"+"),1),(0,n._)("strong",null,(0,R.zw)(t)+":",1)],8,Dt)):((0,n.wg)(),(0,n.iD)("div",Vt,[(0,n._)("strong",null,(0,R.zw)(t)+":",1),(0,n._)("div",Mt,(0,R.zw)(e),1)])),r.isObject(e)&&r.isExpanded(t)?((0,n.wg)(),(0,n.iD)("div",Pt,[(0,n.Wm)(i,{data:e},null,8,["data"])])):(0,n.kq)("",!0)])))),128))])):(0,n.kq)("",!0)}var St={name:"JobDetailsTree",props:{data:[Object,Array,String,Number,Boolean]},data(){return{expandedNodes:{}}},methods:{isObject(e){return e&&"object"===typeof e},toggle(e){this.expandedNodes[e]=!this.expandedNodes[e]},isExpanded(e){return!!this.expandedNodes[e]}}};const Zt=(0,V.Z)(St,[["render",Et]]);var It=Zt,Jt={data(){return{jobs:[],selectedJob:null,currentPage:1,limit:20,canGoToNextPage:!0}},methods:{goToJobCreationForm(){this.$router.push("/jobs/new")},async fetchJobs(){try{const e=(this.currentPage-1)*this.limit,t=await Ct.getJobs(e,this.limit);this.jobs=t.data,this.canGoToNextPage=this.jobs.length===this.limit}catch(e){console.error(e)}},async getJobDetails(e){try{const t=await Ct.getJobDetails(e);this.selectedJob=t.data}catch(t){console.error(t)}},async deleteJob(e){try{await Ct.deleteJob(e),this.fetchJobs()}catch(t){console.error(t)}},changePage(e){e<1||(this.currentPage=e,this.fetchJobs())}},components:{JobDetailsTree:It},mounted(){this.fetchJobs()}};const xt=(0,V.Z)(Jt,[["render",jt]]);var Ot=xt;const qt=e=>((0,n.dD)("data-v-7d969c12"),e=e(),(0,n.Cn)(),e),At={class:"form-group"},zt=qt((()=>(0,n._)("h2",null,"Submit New Job",-1))),$t=qt((()=>(0,n._)("label",{class:"form-label",for:"jobName"},"Job Name",-1))),Nt=qt((()=>(0,n._)("label",{class:"form-label"},"Application",-1))),Tt={class:"sub-group"},Wt=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Application",-1))),Rt=["value"],Ht=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Version",-1))),Lt=["value"],Bt=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Entrypoint",-1))),Yt=["value"],Kt={class:"form-group"},Gt=qt((()=>(0,n._)("label",{class:"form-label"},"Input",-1))),Qt={class:"sub-group"},Xt=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Configuration",-1))),ea=["value"],ta={class:"sub-group",style:{display:"flex","align-items":"center"}},aa=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Data",-1))),oa={class:"sub-group",style:{display:"flex","align-items":"center"}},sa=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Artifacts",-1))),na={class:"sub-group",style:{display:"flex","align-items":"center"}},ra=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Environment Variables",-1))),ia={class:"form-subsublabel"},la=["placeholder","onUpdate:modelValue"],da={class:"form-group"},ca=qt((()=>(0,n._)("label",{class:"form-label"},"Runtime",-1))),ua={class:"sub-group"},pa=qt((()=>(0,n._)("label",{class:"form-sublabel"},"Hardware Specs",-1))),ma={class:"sub-group"},ba=qt((()=>(0,n._)("label",{class:"form-sublabel",for:"environment"},"Environment",-1))),ha=qt((()=>(0,n._)("option",{disabled:"",value:""},"Select environment",-1))),fa=qt((()=>(0,n._)("option",{value:"cloud"},"cloud",-1))),ga=qt((()=>(0,n._)("option",{value:"local"},"local",-1))),wa=qt((()=>(0,n._)("option",{value:"null"},"any",-1))),_a=[ha,fa,ga,wa],ya={class:"sub-group"},va=qt((()=>(0,n._)("label",{class:"form-sublabel",for:"priority"},"Priority",-1))),ka=qt((()=>(0,n._)("button",{type:"submit"},"Submit Job",-1))),ja=["innerHTML"];function Ca(e,t,a,s,r,i){const l=(0,n.up)("b-form-select");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n._)("form",{onSubmit:t[16]||(t[16]=(0,o.iM)(((...e)=>i.submitJob&&i.submitJob(...e)),["prevent"]))},[(0,n._)("div",At,[zt,(0,n._)("div",null,[$t,(0,n.wy)((0,n._)("input",{type:"text",id:"jobName","onUpdate:modelValue":t[0]||(t[0]=e=>r.job.job_name=e)},null,512),[[o.nr,r.job.job_name]])]),(0,n._)("div",null,[Nt,(0,n._)("div",Tt,[Wt,(0,n.wy)((0,n._)("select",{"onUpdate:modelValue":t[1]||(t[1]=e=>r.job.application.application=e),onChange:t[2]||(t[2]=(...e)=>i.fetchVersions&&i.fetchVersions(...e))},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.applications,((e,t)=>((0,n.wg)(),(0,n.iD)("option",{key:t,value:t},(0,R.zw)(t),9,Rt)))),128))],544),[[o.bM,r.job.application.application]]),Ht,(0,n.wy)((0,n._)("select",{"onUpdate:modelValue":t[3]||(t[3]=e=>r.job.application.version=e),onChange:t[4]||(t[4]=(...e)=>i.fetchEntrypoints&&i.fetchEntrypoints(...e))},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.versions,((e,t)=>((0,n.wg)(),(0,n.iD)("option",{key:t,value:t},(0,R.zw)(t),9,Lt)))),128))],544),[[o.bM,r.job.application.version]]),Bt,(0,n.wy)((0,n._)("select",{"onUpdate:modelValue":t[5]||(t[5]=e=>r.job.application.entrypoint=e)},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.entrypoints,((e,t)=>((0,n.wg)(),(0,n.iD)("option",{key:t,value:t},(0,R.zw)(t),9,Yt)))),128))],512),[[o.bM,r.job.application.entrypoint]])])])]),(0,n._)("div",Kt,[Gt,(0,n._)("div",Qt,[Xt,(0,n.wy)((0,n._)("select",{"onUpdate:modelValue":t[6]||(t[6]=e=>r.job.attributes.files_down.config_id=e)},[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.configFiles,((e,t)=>((0,n.wg)(),(0,n.iD)("option",{key:t,value:e},(0,R.zw)(e),9,ea)))),128))],512),[[o.bM,r.job.attributes.files_down.config_id]])]),(0,n._)("div",ta,[aa,(0,n.Wm)(l,{modelValue:r.job.attributes.files_down.data_ids,"onUpdate:modelValue":t[7]||(t[7]=e=>r.job.attributes.files_down.data_ids=e),options:r.dataFiles,multiple:"",style:{width:"200px"}},null,8,["modelValue","options"])]),(0,n._)("div",oa,[sa,(0,n.Wm)(l,{modelValue:r.job.attributes.files_down.artifact_ids,"onUpdate:modelValue":t[8]||(t[8]=e=>r.job.attributes.files_down.artifact_ids=e),options:r.artifactFiles,multiple:"",style:{width:"200px"}},null,8,["modelValue","options"])]),(0,n._)("div",na,[ra,((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(r.environs,((e,t)=>((0,n.wg)(),(0,n.iD)("div",{key:t},[(0,n._)("label",ia,(0,R.zw)(e),1),(0,n.wy)((0,n._)("input",{type:"text",placeholder:e,"onUpdate:modelValue":t=>r.job.attributes.env_vars[e]=t},null,8,la),[[o.nr,r.job.attributes.env_vars[e]]])])))),128))])]),(0,n._)("div",da,[ca,(0,n._)("div",ua,[pa,(0,n.wy)((0,n._)("input",{type:"number",placeholder:"CPU Cores","onUpdate:modelValue":t[9]||(t[9]=e=>r.job.hardware.cpu_cores=e)},null,512),[[o.nr,r.job.hardware.cpu_cores,void 0,{number:!0}]]),(0,n.wy)((0,n._)("input",{type:"number",placeholder:"Memory","onUpdate:modelValue":t[10]||(t[10]=e=>r.job.hardware.memory=e)},null,512),[[o.nr,r.job.hardware.memory,void 0,{number:!0}]]),(0,n.wy)((0,n._)("input",{type:"text",placeholder:"GPU Model","onUpdate:modelValue":t[11]||(t[11]=e=>r.job.hardware.gpu_model=e)},null,512),[[o.nr,r.job.hardware.gpu_model]]),(0,n.wy)((0,n._)("input",{type:"text",placeholder:"GPU Architecture","onUpdate:modelValue":t[12]||(t[12]=e=>r.job.hardware.gpu_archi=e)},null,512),[[o.nr,r.job.hardware.gpu_archi]]),(0,n.wy)((0,n._)("input",{type:"number",placeholder:"GPU Memory","onUpdate:modelValue":t[13]||(t[13]=e=>r.job.hardware.gpu_mem=e)},null,512),[[o.nr,r.job.hardware.gpu_mem,void 0,{number:!0}]])]),(0,n._)("div",ma,[ba,(0,n.wy)((0,n._)("select",{id:"environment","onUpdate:modelValue":t[14]||(t[14]=e=>r.job.environment=e)},_a,512),[[o.bM,r.job.environment]])]),(0,n._)("div",ya,[va,(0,n.wy)((0,n._)("input",{type:"number",id:"priority","onUpdate:modelValue":t[15]||(t[15]=e=>r.job.priority=e)},null,512),[[o.nr,r.job.priority,void 0,{number:!0}]])])]),ka],32),r.errorMessage?((0,n.wg)(),(0,n.iD)("div",{key:0,innerHTML:r.errorMessage,class:"error-message"},null,8,ja)):(0,n.kq)("",!0)],64)}var Ua=a(2026),Da={data(){return{job:{job_name:null,environment:null,priority:null,application:{application:null,version:null,entrypoint:null},attributes:{files_down:{config_id:null,data_ids:[],artifact_ids:[]},env_vars:{}},hardware:{cpu_cores:null,memory:null,gpu_model:null,gpu_archi:null,gpu_mem:null}},applications:{},versions:{},entrypoints:{},environs:{},configFiles:[],dataFiles:[],artifactFiles:[],errorMessage:null}},components:{BFormSelect:Ua.KB},methods:{async fetchApplications(){const e=await Ct.getApplications();this.applications=e.data},fetchVersions(){""!=this.job.application.application&&(this.versions=this.applications[this.job.application.application])},fetchEntrypoints(){""!=this.job.application.version&&(this.entrypoints=this.versions[this.job.application.version])},fetchEnvirons(){""!=this.job.application.entrypoint&&(this.environs=this.entrypoints[this.job.application.entrypoint]["app"]["env"])},async fetchInputFiles(){const e=await tt.getFiles("config/");this.configFiles=e.data.map((e=>e.path.replace("config/","")));const t=await tt.getFiles("data/");this.dataFiles=t.data.map((e=>e.path.replace("data/","")));const a=await tt.getFiles("artifact/");this.artifactFiles=a.data.map((e=>e.path.replace("artifact/","")))},submitJob(){Ct.createJob(this.job).then((()=>{this.$router.push("/jobs")})).catch((e=>{422===e.response.status?this.errorMessage="Error(s) in job definition:"+e.response.data.detail.map((e=>{const t=e.loc.filter((e=>"body"!==e)).join(".");return`
- ${t}: ${e.msg}`})).join(""):this.errorMessage=e.response.data.detail}))}},watch:{"job.application.application":function(e,t){e!==t&&this.fetchVersions()},"job.application.version":function(e,t){e!==t&&this.fetchEntrypoints()},"job.application.entrypoint":function(e,t){e!==t&&this.fetchEnvirons()}},created(){this.fetchApplications(),this.fetchInputFiles()}};const Fa=(0,V.Z)(Da,[["render",Ca],["__scopeId","data-v-7d969c12"]]);var Va=Fa;const Ma={user:null},Pa={isAuthenticated:e=>!!e.user,stateUser:e=>e.user},Ea={async logIn({dispatch:e},t){await J.g.signIn({username:t.username,password:t.password}),e("viewMe")},async viewMe({commit:e}){try{let{data:t}=await s.Z.get("user");await e("setUser",t)}catch(t){t.response&&403==t.response.status?Oa.push("/user-not-confirmed"):Promise.reject(t)}},async logOut({commit:e}){await J.g.signOut(),await e("logout",null)},async forgotPassword(e,t){await J.g.forgotPassword(t)},async resetPassword(e,t){await J.g.forgotPasswordSubmit(t.username,t.code,t.password)},async register(e,t){await J.g.signUp({username:t.username,password:t.password,attributes:{email:t.username,"custom:request_details":t.request_details}})},async sendConfirmationCode(e,t){await J.g.confirmSignUp(t)},async verify(e,t){await J.g.confirmSignUp(t.username,t.code)}},Sa={setUser(e,t){e.user=t},logout(e,t){e.user=t}};var Za={state:Ma,getters:Pa,actions:Ea,mutations:Sa},Ia=(0,d.MT)({modules:{users:Za}});const Ja=[{path:"/",name:"Home",component:W},{path:"/register",name:"Register",component:ne},{path:"/confirm-email/:username",name:"ConfirmEmail",component:me},{path:"/user-not-confirmed",name:"UserNotConfirmed",component:ge},{path:"/login",name:"Login",component:Fe},{path:"/forgot-password",name:"ForgotPassword",component:Ne},{path:"/files",name:"Files",component:st,meta:{requiresAuth:!0}},{path:"/profile",name:"Profile",component:mt,meta:{requiresAuth:!0}},{path:"/jobs",name:"Jobs",component:Ot,meta:{requiresAuth:!0}},{path:"/jobs/new",name:"JobCreation",component:Va,meta:{requiresAuth:!0}}],xa=(0,c.p7)({history:(0,c.PO)("/DECODE_Cloud_UserFrontend/"),routes:Ja});xa.beforeEach(((e,t,a)=>{if(e.matched.some((e=>e.meta.requiresAuth))){if(Ia.getters.isAuthenticated)return void a();a("/login")}else a()}));var Oa=xa;const qa={NODE_ENV:"production",BASE_URL:"/DECODE_Cloud_UserFrontend/"}.API_URL||"https://dev.decodeapi.arthur-jaques.de";async function Aa(){try{let e=await s.Z.get("/access_info"),t=e.data.cognito;I.d.configure({Auth:{userPoolId:t.user_pool_id,userPoolWebClientId:t.client_id,region:t.region,authenticationFlowType:"USER_PASSWORD_AUTH"}}),s.Z.interceptors.request.use((async e=>{try{const t=await J.g.currentSession(),a=t.getIdToken().getJwtToken();e.headers.Authorization=`Bearer ${a}`}catch(t){return await Ia.dispatch("logOut"),Oa.push("/login"),Promise.reject(t)}return e}),(async e=>e.response&&401===e.response.status?(await Ia.dispatch("logOut"),Oa.push("/login"),Promise.reject(e)):Promise.reject(e)));const a=(0,o.ri)(Z);a.use(Oa),a.use(Ia),a.mount("#app")}catch(e){console.error("Error during app initialization:",e)}}s.Z.defaults.baseURL=qa,Aa()},6249:function(){}},t={};function a(o){var s=t[o];if(void 0!==s)return s.exports;var n=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(n.exports,n,n.exports,a),n.loaded=!0,n.exports}a.m=e,function(){var e=[];a.O=function(t,o,s,n){if(!o){var r=1/0;for(c=0;c=n)&&Object.keys(a.O).every((function(e){return a.O[e](o[l])}))?o.splice(l--,1):(i=!1,n0&&e[c-1][2]>n;c--)e[c]=e[c-1];e[c]=[o,s,n]}}(),function(){a.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return a.d(t,{a:t}),t}}(),function(){a.d=function(e,t){for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){a.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){a.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={143:0};a.O.j=function(t){return 0===e[t]};var t=function(t,o){var s,n,r=o[0],i=o[1],l=o[2],d=0;if(r.some((function(t){return 0!==e[t]}))){for(s in i)a.o(i,s)&&(a.m[s]=i[s]);if(l)var c=l(a)}for(t&&t(o);d\n
\n \n
\n \n
\n
\n\n\n\n\n\n","\n\n\n\n\n","import { render } from \"./NavBar.vue?vue&type=template&id=b2c6df24&scoped=true\"\nimport script from \"./NavBar.vue?vue&type=script&lang=js\"\nexport * from \"./NavBar.vue?vue&type=script&lang=js\"\n\nimport \"./NavBar.vue?vue&type=style&index=0&id=b2c6df24&scoped=true&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-b2c6df24\"]])\n\nexport default __exports__","import { render } from \"./App.vue?vue&type=template&id=a754d0ac\"\nimport script from \"./App.vue?vue&type=script&lang=js\"\nexport * from \"./App.vue?vue&type=script&lang=js\"\n\nimport \"./App.vue?vue&type=style&index=0&id=a754d0ac&lang=css\"\n\nimport exportComponent from \"../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n","import { render } from \"./HomeView.vue?vue&type=template&id=46270b3f\"\nimport script from \"./HomeView.vue?vue&type=script&lang=js\"\nexport * from \"./HomeView.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n","import { render } from \"./RegisterView.vue?vue&type=template&id=024d7dbb\"\nimport script from \"./RegisterView.vue?vue&type=script&lang=js\"\nexport * from \"./RegisterView.vue?vue&type=script&lang=js\"\n\nimport \"./RegisterView.vue?vue&type=style&index=0&id=024d7dbb&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n \n \n \n \n ","import { render } from \"./ConfirmEmailView.vue?vue&type=template&id=0e8c721e\"\nimport script from \"./ConfirmEmailView.vue?vue&type=script&lang=js\"\nexport * from \"./ConfirmEmailView.vue?vue&type=script&lang=js\"\n\nimport \"./ConfirmEmailView.vue?vue&type=style&index=0&id=0e8c721e&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n \n \n ","import { render } from \"./UserNotConfirmedView.vue?vue&type=template&id=caa9a2f2\"\nimport script from \"./UserNotConfirmedView.vue?vue&type=script&lang=js\"\nexport * from \"./UserNotConfirmedView.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n","import { render } from \"./LoginView.vue?vue&type=template&id=18f91e1a\"\nimport script from \"./LoginView.vue?vue&type=script&lang=js\"\nexport * from \"./LoginView.vue?vue&type=script&lang=js\"\n\nimport \"./LoginView.vue?vue&type=style&index=0&id=18f91e1a&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n","import { render } from \"./ForgotPasswordView.vue?vue&type=template&id=ba7d8a9a\"\nimport script from \"./ForgotPasswordView.vue?vue&type=script&lang=js\"\nexport * from \"./ForgotPasswordView.vue?vue&type=script&lang=js\"\n\nimport \"./ForgotPasswordView.vue?vue&type=style&index=0&id=ba7d8a9a&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n\n","import axios from 'axios';\nimport JSZip from 'jszip';\n\nexport default {\n async getFiles(path) {\n path = path || '/';\n return await axios.get(`/files/${path}?show_dirs=True&recursive=False`);\n },\n async createFolder(path) {\n return await axios.post(`/files/${path}/`);\n },\n async uploadFile(path, formData) {\n let resp = await axios.post(`/files/${path}url`)\n let data = new FormData();\n if ('key' in resp.data['data']) {\n data.append('key', resp.data['data']['key']);\n }\n for (let key in resp.data['data']) {\n if (key !== 'key') {\n data.append(key, resp.data['data'][key]);\n }\n }\n for (let pair of formData.entries()) {\n data.append(pair[0], pair[1]);\n }\n return await axios.post(resp.data.url, data, {headers: resp.data.headers || {}});\n },\n async deleteItem(path) {\n return await axios.delete(`/files/${path}`);\n },\n async renameItem(path, newPath) {\n return await axios.put(`/files/${path}`, {\"path\": newPath});\n },\n async downloadFile(path) {\n let resp = await axios.get(`/files/${path}/url`);\n return await axios.get(resp.data.url, {headers: resp.data.headers || {}});\n },\n async downloadItem(item) {\n const path = item.path;\n if (item.type === 'directory') {\n let zip = new JSZip();\n let files = await axios.get(`/files/${path}`, {params: {show_dirs: false, recursive: true}});\n for (let file of files.data) {\n let fileData = await this.downloadFile(file.path);\n zip.file(file.path.replace(item.path, ''), fileData.data);\n }\n let content = await zip.generateAsync({type:\"blob\"});\n const url = window.URL.createObjectURL(content);\n const link = document.createElement('a');\n link.href = url;\n let path_parts = path.split('/');\n link.setAttribute('download', path_parts[path_parts.length - 2] + '.zip');\n document.body.appendChild(link);\n link.click();\n }\n else {\n let resp = await this.downloadFile(path);\n const url = window.URL.createObjectURL(new Blob([resp.data]));\n const link = document.createElement('a');\n link.href = url;\n link.setAttribute('download', path.split('/').pop());\n document.body.appendChild(link);\n link.click();\n }\n },\n};\n","import { render } from \"./FilesView.vue?vue&type=template&id=decb10f6\"\nimport script from \"./FilesView.vue?vue&type=script&lang=js\"\nexport * from \"./FilesView.vue?vue&type=script&lang=js\"\n\nimport \"./FilesView.vue?vue&type=style&index=0&id=decb10f6&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n","import { render } from \"./ProfileView.vue?vue&type=template&id=68bbaec0\"\nimport script from \"./ProfileView.vue?vue&type=script&lang=js\"\nexport * from \"./ProfileView.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n \n\n\n\n","import axios from 'axios';\n\nexport default {\n async createJob(jobData) {\n return await axios.post(`/jobs`, jobData);\n },\n async getJobs(offset, limit) {\n return await axios.get(`/jobs?offset=${offset}&limit=${limit}`);\n },\n async getJobDetails(jobId) {\n return await axios.get(`/jobs/${jobId}`);\n },\n async deleteJob(jobId) {\n return await axios.delete(`/jobs/${jobId}`);\n },\n async getApplications() {\n return await axios.get(`/jobs/applications`);\n }\n};\n","\n\n\n\n\n","import { render } from \"./JobDetailsTree.vue?vue&type=template&id=1f680da8\"\nimport script from \"./JobDetailsTree.vue?vue&type=script&lang=js\"\nexport * from \"./JobDetailsTree.vue?vue&type=script&lang=js\"\n\nimport \"./JobDetailsTree.vue?vue&type=style&index=0&id=1f680da8&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { render } from \"./JobsView.vue?vue&type=template&id=35d1035b\"\nimport script from \"./JobsView.vue?vue&type=script&lang=js\"\nexport * from \"./JobsView.vue?vue&type=script&lang=js\"\n\nimport \"./JobsView.vue?vue&type=style&index=0&id=35d1035b&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\n\n\n\n\n","import { render } from \"./JobCreationView.vue?vue&type=template&id=7d969c12&scoped=true\"\nimport script from \"./JobCreationView.vue?vue&type=script&lang=js\"\nexport * from \"./JobCreationView.vue?vue&type=script&lang=js\"\n\nimport \"./JobCreationView.vue?vue&type=style&index=0&id=7d969c12&scoped=true&lang=css\"\n\nimport exportComponent from \"../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-7d969c12\"]])\n\nexport default __exports__","import axios from 'axios';\nimport router from '@/router';\nimport { Auth } from '@aws-amplify/auth';\n\nconst state = {\n user: null,\n};\n\nconst getters = {\n isAuthenticated: state => !!state.user,\n stateUser: state => state.user,\n};\n\nconst actions = {\n async logIn({dispatch}, user) {\n await Auth.signIn({\n username: user.username,\n password: user.password,\n })\n dispatch('viewMe');\n },\n async viewMe({commit}) {\n try {\n let {data} = await axios.get('user');\n await commit('setUser', data);\n } catch (error) {\n if (error.response && error.response.status == 403) {\n router.push('/user-not-confirmed');\n } else {\n Promise.reject(error);\n }\n }\n },\n async logOut({commit}) {\n await Auth.signOut();\n await commit('logout', null);\n },\n async forgotPassword(_, username) {\n await Auth.forgotPassword(username);\n },\n async resetPassword(_, user) {\n await Auth.forgotPasswordSubmit(user.username, user.code, user.password);\n },\n async register(_, user) {\n await Auth.signUp({\n username: user.username,\n password: user.password,\n attributes: {\n email: user.username,\n 'custom:request_details': user.request_details,\n },\n });\n },\n async sendConfirmationCode(_, username) {\n await Auth.confirmSignUp(username);\n },\n async verify(_, user) {\n await Auth.confirmSignUp(user.username, user.code);\n },\n};\n\nconst mutations = {\n setUser(state, username) {\n state.user = username;\n },\n logout(state, user){\n state.user = user;\n },\n};\n\nexport default {\n state,\n getters,\n actions,\n mutations\n};\n","import { createStore } from \"vuex\";\n\nimport users from './modules/users';\n\nexport default createStore({\n modules: {\n users,\n }\n});\n","import { createRouter, createWebHistory } from 'vue-router'\nimport HomeView from '@/views/HomeView.vue';\nimport RegisterView from '@/views/RegisterView.vue';\nimport ConfirmEmailView from '@/views/ConfirmEmailView.vue';\nimport UserNotConfirmedView from '@/views/UserNotConfirmedView.vue';\nimport LoginView from '@/views/LoginView.vue';\nimport ForgotPasswordView from '@/views/ForgotPasswordView.vue';\nimport FilesView from '@/views/FilesView.vue';\nimport ProfileView from '@/views/ProfileView.vue';\nimport JobsView from '@/views/JobsView.vue';\nimport JobCreationView from '@/views/JobCreationView.vue';\nimport store from '@/store';\n\n\nconst routes = [\n {\n path: '/',\n name: \"Home\",\n component: HomeView,\n },\n {\n path: '/register',\n name: 'Register',\n component: RegisterView,\n },\n {\n path: '/confirm-email/:username',\n name: 'ConfirmEmail',\n component: ConfirmEmailView,\n },\n {\n path: '/user-not-confirmed',\n name: 'UserNotConfirmed',\n component: UserNotConfirmedView,\n },\n {\n path: '/login',\n name: 'Login',\n component: LoginView,\n },\n {\n path: '/forgot-password',\n name: 'ForgotPassword',\n component: ForgotPasswordView,\n },\n {\n path: '/files',\n name: 'Files',\n component: FilesView,\n meta: { requiresAuth: true },\n },\n {\n path: '/profile',\n name: 'Profile',\n component: ProfileView,\n meta: { requiresAuth: true },\n },\n {\n path: '/jobs',\n name: 'Jobs',\n component: JobsView,\n meta: { requiresAuth: true },\n }\n ,\n {\n path: '/jobs/new',\n name: 'JobCreation',\n component: JobCreationView,\n meta: { requiresAuth: true },\n }\n]\n\nconst router = createRouter({\n history: createWebHistory(process.env.BASE_URL),\n routes\n})\n\nrouter.beforeEach((to, _, next) => {\n if (to.matched.some(record => record.meta.requiresAuth)) {\n if (store.getters.isAuthenticated) {\n next();\n return;\n }\n next('/login');\n } else {\n next();\n }\n});\n\nexport default router\n","import 'bootstrap/dist/css/bootstrap.css';\nimport { createApp } from \"vue\";\nimport axios from 'axios';\n\nimport App from './App.vue';\nimport { Amplify, Auth } from 'aws-amplify';\nimport router from './router';\nimport store from './store';\n\nconst API_URL = process.env.API_URL || 'https://dev.decodeapi.arthur-jaques.de';\naxios.defaults.baseURL = API_URL;\n\nasync function initializeApp() {\n try {\n let response = await axios.get('/access_info');\n let cognitoConfig = response.data.cognito;\n Amplify.configure({\n Auth: {\n userPoolId: cognitoConfig.user_pool_id,\n userPoolWebClientId: cognitoConfig.client_id,\n region: cognitoConfig.region,\n authenticationFlowType: 'USER_PASSWORD_AUTH'\n }\n });\n axios.interceptors.request.use(async (config) => {\n try {\n const session = await Auth.currentSession();\n const token = session.getIdToken().getJwtToken();\n config.headers.Authorization = `Bearer ${token}`;\n } catch (error) {\n await store.dispatch('logOut');\n router.push('/login');\n return Promise.reject(error);\n }\n return config;\n }, async (error) => {\n if (error.response && error.response.status === 401) {\n await store.dispatch('logOut');\n router.push('/login');\n return Promise.reject(error);\n }\n return Promise.reject(error);\n });\n\n const app = createApp(App);\n app.use(router);\n app.use(store);\n app.mount(\"#app\");\n } catch (error) {\n console.error(\"Error during app initialization:\", error);\n }\n}\n\ninitializeApp();\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t143: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkDECODE_Cloud_UserFrontend\"] = self[\"webpackChunkDECODE_Cloud_UserFrontend\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [998], function() { return __webpack_require__(1051); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["id","class","_createElementBlock","_hoisted_1","_createVNode","_component_NavBar","_createElementVNode","_hoisted_2","_component_router_view","type","_component_router_link","to","_hoisted_3","_hoisted_4","_ctx","isLoggedIn","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","onClick","_cache","args","logout","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","defineComponent","name","computed","this","$store","getters","isAuthenticated","methods","dispatch","$router","push","__exports__","setup","store","useStore","router","useRouter","onMounted","then","state","user","components","NavBar","render","for","onSubmit","_withModifiers","submit","form","username","$event","password","repeat_password","request_details","maxlength","errorMessage","_toDisplayString","data","mapActions","register","error","console","log","verificationCode","href","resendVerificationCode","created","$route","params","verify","sendVerificationCode","logIn","code","isVerificationCodeSent","disabled","resetPassword","forgotPassword","goUp","path","placeholder","createFolder","uploadSingleFile","uploadDirectory","uploadingFile","onChange","handleUpload","style","webkitdirectory","multiple","_Fragment","_renderList","files","item","key","onDblclick","openAction","value","replace","ev","renameItem","target","size","deleteItem","downloadItem","getFiles","axios","get","post","uploadFile","formData","resp","FormData","append","pair","entries","url","headers","delete","newPath","put","downloadFile","zip","JSZip","show_dirs","recursive","file","fileData","content","generateAsync","window","URL","createObjectURL","link","document","createElement","path_parts","split","setAttribute","length","body","appendChild","click","Blob","pop","fetchFiles","fileService","response","catch","message","pathParts","trimEnd","filter","Boolean","join","getElementById","event","i","relativePath","webkitRelativePath","pathArray","folderPath","newName","mounted","email","groups","mapGetters","$options","goToJobCreationForm","$data","jobs","job","job_name","status","date_created","application","version","entrypoint","getJobDetails","deleteJob","changePage","currentPage","canGoToNextPage","selectedJob","_component_job_details_tree","createJob","jobData","getJobs","offset","limit","jobId","getApplications","isObject","$props","toggle","isExpanded","props","Object","Array","String","Number","expandedNodes","fetchJobs","jobService","page","JobDetailsTree","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","submitJob","fetchVersions","applications","fetchEntrypoints","versions","entrypoints","_hoisted_15","attributes","files_down","config_id","configFiles","index","_hoisted_16","_hoisted_17","_hoisted_18","_component_b_form_select","data_ids","options","dataFiles","_hoisted_19","_hoisted_20","artifact_ids","artifactFiles","_hoisted_21","_hoisted_22","environs","_hoisted_23","env_vars","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","hardware","cpu_cores","memory","gpu_model","gpu_archi","gpu_mem","_hoisted_29","_hoisted_30","environment","_hoisted_36","_hoisted_37","priority","_hoisted_38","innerHTML","BFormSelect","fetchApplications","fetchEnvirons","fetchInputFiles","response_cfg","map","response_data","response_art","detail","err","loc","part","msg","watch","newVal","oldVal","stateUser","actions","Auth","signIn","viewMe","commit","Promise","reject","logOut","signOut","_","forgotPasswordSubmit","signUp","sendConfirmationCode","confirmSignUp","mutations","setUser","createStore","modules","users","routes","component","HomeView","RegisterView","ConfirmEmailView","UserNotConfirmedView","LoginView","ForgotPasswordView","FilesView","meta","requiresAuth","ProfileView","JobsView","JobCreationView","createRouter","history","createWebHistory","process","beforeEach","next","matched","some","record","API_URL","async","initializeApp","cognitoConfig","cognito","Amplify","configure","userPoolId","user_pool_id","userPoolWebClientId","client_id","region","authenticationFlowType","interceptors","request","use","session","currentSession","token","getIdToken","getJwtToken","config","Authorization","app","createApp","App","mount","defaults","baseURL","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","loaded","__webpack_modules__","call","m","deferred","O","result","chunkIds","fn","notFulfilled","Infinity","fulfilled","j","keys","every","splice","r","n","getter","__esModule","d","a","definition","o","defineProperty","enumerable","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","nmd","paths","children","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","forEach","bind","__webpack_exports__"],"sourceRoot":""} \ No newline at end of file