Files
yakpanel-core/YakPanel/static/vite/js/index-legacy-CdgGBrp1.js
2026-04-07 02:04:22 +05:30

2 lines
6.9 KiB
JavaScript

System.register(["./index.vue_vue_type_script_setup_true_lang-legacy-BWPgT9-g.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./index-legacy-IyGqcGvi.js?v=1773287522785","./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BQ2Kqzbl.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./index-legacy-hh1mlQOF.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-B9P08_gB.js?v=1773287522785","./index-legacy-BFkuWVH1.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-CvnE2rtV.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./check-legacy-DG4HeWug.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BSBh0Le2.js?v=1773287522785","./index-legacy-DGWsVoxN.js?v=1773287522785","./index-legacy-DEYz4m3y.js?v=1773287522785"],(function(e,a){"use strict";var t,l,p,i,n,c,u,s,d,o,r,_,k,f,y,b,g,m,x,v,h,j,D,w,B,A,L,C,$,z,U,S,R,P,E,F,I,O,T,Z,q,J,M,V,G,H,K;return{setters:[e=>{t=e._},e=>{l=e._},e=>{p=e.c,i=e.w,n=e.aJ,c=e.C,u=e.h,s=e.aq,d=e.i,o=e.n,r=e.p},e=>{_=e.u},e=>{k=e.u},e=>{f=e.u,y=e.r,b=e.d,g=e.b,m=e.c},e=>{x=e._},e=>{v=e._},e=>{h=e.B,j=e.ar,D=e.a1,w=e.al},e=>{B=e.k,A=e.an,L=e.R,C=e.c,$=e.$,z=e.a8,U=e.a9,S=e.a0,R=e.j,P=e.aa,E=e._,F=e.S,I=e.ao,O=e.t,T=e.r,Z=e.e,q=e.Z,J=e.l,M=e.v,V=e.n,G=e.am,H=e.F,K=e.u},null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){var a=document.createElement("style");a.textContent=".n-button[data-v-a259b350]{--n-height: 24px}\n/*$vite$:1*/",document.head.appendChild(a);const N={class:"ml-8px"},Q=p(B({__name:"index",props:I({accept:{}},{fileList:{default:()=>[]},fileListModifiers:{}}),emits:["update:fileList"],setup(e){const a=A(e,"fileList"),{t:t}=L(),l=C((()=>a.value&&a.value.length>0?a.value[0].name:t("Component.Upload.index_2"))),p=e=>{a.value=[e[e.length-1]]};return(e,t)=>{const i=h,n=j;return $(),z(n,{"file-list":a.value,"onUpdate:fileList":[t[0]||(t[0]=e=>a.value=e),p],action:"",accept:e.accept,multiple:!1,"default-upload":!1,"show-file-list":!1},{default:U((()=>[S(i,{size:"small"},{default:U((()=>[R(P(e.$t("Component.Upload.index_1")),1)])),_:1}),E("span",N,P(F(l)),1)])),_:1},8,["file-list","accept"])}}}),[["__scopeId","data-v-a259b350"]]),W={class:"p-24px"},X=B({__name:"upload",props:{app:{}},emits:["refresh"],setup(e,{expose:a,emit:t}){const l=t,p=O(e,"app"),{t:i}=L(),n=T(null),c=T(null),u=Z({fileList:[],restore_backup:!1,backup:!1}),s={fileList:{validator:()=>(console.log(u.fileList),0!==u.fileList.length||new Error(i("Docker.App.Backup.index_19")))}},d=()=>{V((()=>{c.value?.restoreValidation()}))};return a({onConfirm:async()=>{await(n.value?.validate());const e=(()=>{const e=new FormData,{fileList:a}=u;return e.append("id",p.value.id),e.append("restore_backup",u.restore_backup.toString()),e.append("backup",(!!u.restore_backup&&u.backup).toString()),a.length>0&&(a[0].file&&(e.append("blob",a[0].file),e.append("f_size",a[0].file.size.toString())),e.append("f_path","/www/dk_project/backup/apps"),e.append("f_name",a[0].name),e.append("f_start","0")),e})();await f(e),l("refresh")}}),(e,a)=>{const t=Q,l=D,p=w,i=v,o=x;return $(),q("div",W,[S(i,{ref_key:"formRef",ref:n,"label-align":"left","label-width":"auto",model:F(u),rules:s},{default:U((()=>[S(l,{ref_key:"fileItemRef",ref:c,label:e.$t("Docker.App.Backup.index_3"),path:"fileList"},{default:U((()=>[S(t,{"file-list":F(u).fileList,"onUpdate:fileList":[a[0]||(a[0]=e=>F(u).fileList=e),d],accept:".zip,.gz,.tar"},null,8,["file-list"])])),_:1},8,["label"]),S(l,{label:" ","show-feedback":!1},{default:U((()=>[S(p,{checked:F(u).restore_backup,"onUpdate:checked":a[1]||(a[1]=e=>F(u).restore_backup=e)},{default:U((()=>[R(P(e.$t("Docker.App.Backup.index_16")),1)])),_:1},8,["checked"])])),_:1}),J(S(l,{class:"mt-8px",label:" ","show-feedback":!1},{default:U((()=>[S(p,{checked:F(u).backup,"onUpdate:checked":a[2]||(a[2]=e=>F(u).backup=e)},{default:U((()=>[R(P(e.$t("Docker.App.Backup.index_17")),1)])),_:1},8,["checked"])])),_:1},512),[[M,F(u).restore_backup]])])),_:1},8,["model"]),S(o,{class:"mt-20px"},{default:U((()=>[E("li",null,P(e.$t("Docker.App.Backup.index_18")),1)])),_:1})])}}}),Y={class:"p-20px"};e("default",B({__name:"index",props:{app:{}},emits:["close"],setup(e,{emit:a}){const p=a,f=O(e,"app"),{t:x}=L(),v=G(),j=async()=>{await m({id:f.value.id}),Z()},D=()=>{r({title:x("Docker.App.Backup.index_3"),width:500,footer:!0,data:{app:f.value,onRefresh:()=>{Z()}},component:X})},{table:B,columns:A,setLoading:C}=k([{key:"file_name",title:x("Docker.App.Backup.index_4"),width:160,ellipsis:{tooltip:!0}},{key:"backup_type",title:x("Docker.App.Backup.index_5"),width:90,render:e=>"local"!==e.backup_type?e.backup_type:x("Docker.App.Backup.index_6")},{key:"backup_time",title:x("Docker.App.Backup.index_7"),width:140,render:e=>i(e.backup_time)},{key:"backup_path",title:x("Docker.App.Backup.index_8"),ellipsis:{tooltip:!0},render:e=>S("a",{class:"bt-link",href:"javascript:;",onClick:()=>{n("Path",e.backup_path),v.push("/files"),p("close")}},[e.backup_path])},{key:"backup_type",title:x("Docker.App.Backup.index_9"),width:90,render:e=>c(e.size)},_({width:200,options:e=>[{label:x("Docker.App.Backup.index_10"),onClick:()=>{z(e)}},{label:x("Public.Btn.Download"),onClick:()=>{E(e)}},{label:x("Public.Btn.Del"),onClick:()=>{I(e)}}]})]),z=async e=>{const a=T(!1);u({title:x("Docker.App.Backup.index_11",[e.file_name]),content:()=>{let e;return S(H,null,[S("div",{class:"mb-12px"},[x("Docker.App.Backup.index_14")]),S(w,{checked:a.value,"onUpdate:checked":e=>a.value=e},(t=e=x("Docker.App.Backup.index_15"),"function"==typeof t||"[object Object]"===Object.prototype.toString.call(t)&&!K(t)?e:{default:()=>[e]}))]);var t},onConfirm:async()=>{await y({id:f.value.id,file_name:e.file_name,backup:a.value}),Z()}})},E=e=>{s(`${e.backup_path}/${e.file_name}`)},I=e=>{u({title:x("Docker.App.Backup.index_12",[e.file_name]),content:x("Docker.App.Backup.index_13"),onConfirm:async()=>{await b({id:f.value.id,file_name:e.file_name}),Z()}})},Z=async()=>{try{C(!0);const{message:e}=await g({id:f.value.id});d(e)&&(B.data=o(e.data)?e.data:[])}finally{C(!1)}};return Z(),(e,a)=>{const p=h,i=l,n=t;return $(),q("div",Y,[S(n,null,{toolsLeft:U((()=>[S(p,{type:"primary",onClick:j},{default:U((()=>[R(P(e.$t("Docker.App.Backup.index_1")),1)])),_:1}),S(p,{onClick:D},{default:U((()=>[R(P(e.$t("Docker.App.Backup.index_2")),1)])),_:1})])),table:U((()=>[S(i,{"max-height":500,"loading-num":4,loading:F(B).loading,data:F(B).data,columns:F(A)},null,8,["loading","data","columns"])])),_:1})])}}}))}}}));