import{_ as s}from"./index104.js?v=1763625242172";import{c as e,o as a,_ as t}from"./page_layout.js?v=1763625242172";import{c as r,g as o}from"./index17.js?v=1763625242172";import{a as n}from"./public.js?v=1763625242172";import{k as i,P as p,e as l,o as _,b as c,R as m,S as u,an as g,X as d,a3 as f,U as x,j,V as h,a2 as v}from"./vue.js?v=1763625242172";import{dk as w,bH as k,d9 as y}from"./naive.js?v=1763625242172";import"./common.js?v=1763625242172";import"./__commonjsHelpers__.js?v=1763625242172";import"./index.js?v=1763625242172";import"./index.vue_vue_type_script_setup_true_lang.js?v=1763625242172";import"./backup-info.js?v=1763625242172";import"./utils.js?v=1763625242172";import"./soft.js?v=1763625242172";import"./site.js?v=1763625242172";const b={class:"p-16px"},C={class:"h-250px"},I=i({__name:"index",props:{onRefresh:{}},emits:["close"],setup(i,{emit:I}){const{t:R}=p(),z=I,H=i,M=l({task_msg:"",exec_log:"",progress:0}),q=()=>{n({title:R("Config.Backup.index_14"),content:R("Config.Migrate.index_24"),onConfirm:async()=>{B&&clearInterval(B),await r(),z("close")}})};let B=null;const D=async()=>{const{message:s}=await o();e(s)&&(M.task_msg=s.migrate_msg,M.exec_log=s.migrate_log,M.progress=s.migrate_progress,2!==s.run_status&&3!==s.run_status||(B&&clearInterval(B),2===s.run_status?H.onRefresh("success",{panel_addr:s.panel_addr,panel_user:s.panel_user,panel_password:s.panel_password,start_time:s.start_time,last_update:s.last_update}):H.onRefresh("error",{errData:s.err_info,start_time:s.start_time,last_update_time:s.last_update,server_ip:s.server_ip,ssh_port:s.ssh_port,ssh_user:s.ssh_user,password:s.password}),z("close")))};return _((()=>{D(),B=window.setInterval((()=>{D()}),2e3)})),c((()=>{B&&clearInterval(B)})),(e,r)=>{const o=a,n=w,i=k,p=t,l=y,_=s;return m(),u("div",b,[g("",!0),d(n,{type:"warning"},{default:f((()=>[r[1]||(r[1]=x("span",{class:"color-warning"},"Migration is in progress, please do not close the page, if you have any questions please contact us in time ",-1)),d(o,{href:"mailto:support@aapanel.com",target:"_blank"},{default:f((()=>r[0]||(r[0]=[j("support@aapanel.com")]))),_:1,__:[0]})])),_:1,__:[1]}),d(l,{class:"flex-nowrap! items-center my-10px",size:5},{default:f((()=>[d(i,{height:24,percentage:h(M).progress,"indicator-placement":"inside",processing:h(M).progress<100,status:"success"},null,8,["percentage","processing"]),h(M).progress<100?(m(),v(p,{key:0,name:"base-error",class:"text-error hover:text-#777777",size:20,onClick:q})):g("",!0)])),_:1}),x("div",C,[d(_,{log:h(M).exec_log},null,8,["log"])])])}}});export{I as default};
