PageSourceSearch

https://cdn2.listingmirror.com/bundles/HanesCreateOrUpdateFtpUploaderPage-CUJI6tv-.js

js listingmirror.com collected 2026-10-02 07:34:37 UTC 6,366 bytes, 2 lines download raw bytes

1import{_ as e,d as t,s as o}from"./app-fAHSEZ2w.js";import{P as s}from"./PageHeader-CfyTvTl9.js";import{e as a,Q as n,O as r,h as i,a5 as l,a6 as c,aG as d,Z as p,W as g,N as m,c as u,a0 as f}from"./vendor-core-DfJAFCx-.js";import"./vendor-datetime-BX_xbLmf.js";import"./vendor-charts-JUQqvQZG.js";const h={name:"HanesCreateOrUpdateFtpUploaderPage",components:{PageHeader:s},props:{isCreate:{type:Boolean,required:!0},ftpIntegrationPk:{type:Number,default:-1}},data:function(){return{username:"",password:"",server:"",port:22,selectedFtpSyncProtocolName:"",ftpSyncProtocolNames:[],ftpSyncProtocolNamesAndValues:{},selectedIntegrationConfigPk:-1,amazonConfigs:[],isLoadingPage:!0,testSelectedIntegration:""}},created:function(){Promise.all([this.getSyncProtocols(),this.getAmazonConfigs()]).then(()=>{this.isCreate?this.isLoadingPage=!1:this.getExistingFtpIntegration().then(()=>{this.isLoadingPage=!1})})},methods:{getExistingFtpIntegration(){return t("/hanes-ftp-upload/integration/"+this.ftpIntegrationPk+"/",{method:"GET"}).then(e=>{this.username=e.username,this.password=e.password,this.server=e.server,this.port=e.port;for(const[t,o]of Object.entries(this.ftpSyncProtocolNamesAndValues))if(o===e.sync_protocol){this.selectedFtpSyncProtocolName=t;break}this.testSelectedIntegration=e.source_integration;for(let t=0;t<this.amazonConfigs.length;t++)if(parseInt(Object.keys(this.amazonConfigs[t])[0])===parseInt(e.source_integration)){this.selectedIntegrationConfigPk=e.source_integration;break}})},getSyncProtocols(){return t("/hanes-ftp-upload/sync-protocols/",{method:"GET"}).then(e=>{const t={},o=[];for(let s=0;s<e.length;s++){const a=e[s][0],n=e[s][1];t[n]=a,o.push(n)}this.isCreate&&(this.selectedFtpSyncProtocolName=o[0]),this.ftpSyncProtocolNames=o,this.ftpSyncProtocolNamesAndValues=t})},saveFtpIntegration(){const e=this.selectedFtpSyncProtocolName,s=this.ftpSyncProtocolNamesAndValues[e];let a="";return this.isCreate||(a=this.ftpIntegrationPk+"/"),t("/hanes-ftp-upload/create-or-update-ftp-integration/"+a,{method:"POST",data:{username:this.username,password:this.password,server:this.server,port:this.port,sync_protocol:s,source_integration_id:this.selectedIntegrationConfigPk}}).then(()=>{this.isCreate?o("FTP integration created!"):o("FTP integration saved!"),window.location.href="/app/listings/hanes/ftp-upload"})},getAmazonConfigs(){return t("/hanes-ftp-upload/amazon-configs/",{method:"GET"}).then(e=>{const t=[];for(let o=0;o<e.length;o++){const s={};s[e[o].integration_config_id]=e[o].store_name,t.push(s)}this.amazonConfigs=t,this.amazonConfigs.length>0&&this.isCreate&&(this.selectedIntegrationConfigPk=Object.keys(t[0])[0])})}}},P={key:0,class:"row"},v={key:1},y={class:"row"},k={class:"col-xs-12 col-sm-6 col-sm-push-3"},C={class:"row"},I={class:"col-xs-12 col-sm-6 col-sm-push-3"},b={class:"form-group"},S={class:"form-group"},w={class:"form-group required"},F={class:"form-group"},N={class:"form-group required"},U={class:"form-group required"},j=["value"],T={class:"row"},_={class:"col-xs-12 col-sm-6 col-sm-push-3"},x={key:2};const z=e(h,[["render",function(e,t,o,s,h,z){const O=m("PageHeader");return u(),a("div",null,[e.isLoadingPage?(u(),a("div",P,[...t[8]||(t[8]=[n("div",{class:"col-xs-12 text-center padding-top-30"},[n("h1",null,"Loading...."),r(),n("i",{class:"fas fa-sync fa-spin fa-7x"})],-1)])])):e.isLoadingPage||-1===e.selectedIntegrationConfigPk?(u(),a("div",x,[...t[30]||(t[30]=[n("h1",{class:"text-danger"},"You must have at least 1 Amazon integration to use this feature!",-1)])])):(u(),a("div",v,[n("div",y,[n("div",k,[i(O,{title:o.isCreate?"Add New FTP Upload Integration":"Edit FTP Upload Integration",subtitle:"Please enter your username, password, server, port, and select an integration to connect to your FTP Integration."},null,8,["title"]),t[9]||(t[9]=r()),t[10]||(t[10]=n("br",null,null,-1))])]),t[28]||(t[28]=r()),n("div",C,[n("div",I,[n("div",b,[t[11]||(t[11]=n("label",{for:"username"},"Username",-1)),t[12]||(t[12]=r()),l(n("input",{placeholder:"Username",class:"form-control",id:"username",name:"username","onUpdate:modelValue":t[0]||(t[0]=t=>e.username=t)},null,512),[[c,e.username]])]),t[23]||(t[23]=r()),n("div",S,[t[13]||(t[13]=n("label",{for:"password"},"Password",-1)),t[14]||(t[14]=r()),l(n("input",{placeholder:"Password",type:"password",class:"form-control",id:"password",name:"password","onUpdate:modelValue":t[1]||(t[1]=t=>e.password=t)},null,512),[[c,e.password]])]),t[24]||(t[24]=r()),n("div",w,[t[15]||(t[15]=n("label",{for:"server"}
1,"Server",-1)),t[16]||(t[16]=r()),l(n("input",{placeholder:"Server",class:"form-control",id:"server",name:"server","onUpdate:modelValue":t[2]||(t[2]=t=>e.server=t)},null,512),[[c,e.server]])]),t[25]||(t[25]=r()),n("div",F,[t[17]||(t[17]=n("label",{for:"port"},"Port",-1)),t[18]||(t[18]=r()),l(n("input",{placeholder:"Port",class:"form-control",id:"port",name:"port","onUpdate:modelValue":t[3]||(t[3]=t=>e.port=t)},null,512),[[c,e.port]])]),t[26]||(t[26]=r()),n("div",N,[t[19]||(t[19]=n("label",{for:"sync-protocol"},"Sync protocol",-1)),t[20]||(t[20]=r()),l(n("select",{name:"sync-protocol",class:"form-control",id:"sync-protocol","onUpdate:modelValue":t[4]||(t[4]=t=>e.selectedFtpSyncProtocolName=t)},[(u(!0),a(p,null,g(e.ftpSyncProtocolNames,e=>(u(),a("option",{key:e},f(e),1))),128))],512),[[d,e.selectedFtpSyncProtocolName]])]),t[27]||(t[27]=r()),n("div",U,[t[21]||(t[21]=n("label",{for:"integration"},"Integration",-1)),t[22]||(t[22]=r()),l(n("select",{name:"integration",class:"form-control",id:"integration","onUpdate:modelValue":t[5]||(t[5]=t=>e.selectedIntegrationConfigPk=t)},[(u(!0),a(p,null,g(e.amazonConfigs,e=>(u(),a("option",{key:Object.keys(e)[0],value:Object.keys(e)[0]},f(e[Object.keys(e)[0]])+" ("+f(Object.keys(e)[0])+")\n              ",9,j))),128))],512),[[d,e.selectedIntegrationConfigPk]])])])]),t[29]||(t[29]=r()),n("div",T,[n("div",_,[o.isCreate?(u(),a("button",{key:0,onClick:t[6]||(t[6]=(...e)=>z.saveFtpIntegration&&z.saveFtpIntegration(...e)),class:"btn btn-primary"},"Create FTP Upload Integration")):(u(),a("button",{key:1,onClick:t[7]||(t[7]=(...e)=>z.saveFtpIntegration&&z.saveFtpIntegration(...e)),class:"btn btn-primary"},"Save FTP Upload Integration"))])])]))])}]]);export{z as default};
2//# sourceMappingURL=https://storage.cloud.google.com/listing-mirror-sourcemaps/HanesCreateOrUpdateFtpUploaderPage-CUJI6tv-.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.