File: /www/server/panel/BTPanel/static/js/container-backups-dialog-legacy.js
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var n,r={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",l=c.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(n){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),c=new G(r||[]);return a(i,"_invoke",{value:S(t,n,c)}),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var y="suspendedStart",d="suspendedYield",v="executing",m="completed",g={};function w(){}function b(){}function x(){}var _={};f(_,u,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(T([])));L&&L!==o&&i.call(L,u)&&(_=L);var E=x.prototype=w.prototype=Object.create(_);function j(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(e,n){function r(o,a,c,u){var s=h(e[o],e,a);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==t(f)&&i.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):n.resolve(f).then((function(t){l.value=t,c(l)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(i,i):i()}})}function S(t,e,r){var o=y;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:n,done:!0}}for(r.method=i,r.arg=a;;){var c=r.delegate;if(c){var u=C(c,r);if(u){if(u===g)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===y)throw o=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=v;var s=h(t,e,r);if("normal"===s.type){if(o=r.done?m:d,s.arg===g)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o=m,r.method="throw",r.arg=s.arg)}}}function C(t,e){var r=e.method,o=t.iterator[r];if(o===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=n,C(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function G(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[u];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=x,a(E,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,l,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,l,"GeneratorFunction")),t.prototype=Object.create(E),t},r.awrap=function(t){return{__await:t}},j(O.prototype),f(O.prototype,s,(function(){return this})),r.AsyncIterator=O,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new O(p(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},j(E),f(E,l,"Generator"),f(E,u,(function(){return this})),f(E,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},r.values=T,G.prototype={constructor:G,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(P),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return c.type="throw",c.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],c=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),s=i.call(a,"finallyLoc");if(u&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),P(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;P(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:T(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}},r}function n(t,e,n,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void n(t)}c.done?e(u):Promise.resolve(u).then(r,o)}function r(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function c(t){n(a,o,i,c,u,"next",t)}function u(t){n(a,o,i,c,u,"throw",t)}c(void 0)}))}}System.register(["./utils-lib-legacy.js?v=1777008528","./index-legacy103.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./useStore-legacy4.js?v=1777008528","./useMethods-legacy.js?v=1777008528","./column-legacy.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528","./index-legacy104.js?v=1777008528"],(function(t,n){"use strict";var o,i,a,c,u,s,l,f,p,h,y,d,v,m,g,w,b,x,_,k,L,E,j,O,S,C,N,P;return{setters:[function(t){o=t.I,i=t.t,a=t.k,c=t.X,u=t.Q,s=t.o,l=t.b},function(t){f=t._},function(t){p=t.c,h=t.r,y=t.h,d=t.o,v=t.B,m=t.k,g=t.l,w=t.e,b=t.x,x=t.y,_=t.C,k=t.p,L=t.A},function(t){E=t.be,j=t.bf,O=t.bg},function(t){S=t.p},function(t){C=t.h,N=t.u,P=t.g},null,null],execute:function(){var n={class:"p-[1.6rem]"};t("default",p({__name:"container-backups-dialog",props:{compData:{default:function(){return{}}}},setup:function(t){var p,G=l(),T=t,F=h(),I=h(T.compData.row),q=y({loading:!1,list:[]}),A=[{label:"删除",value:"delete",event:(p=r(e().mark((function t(n,o,i,a){var c,u,s;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=a.label,u=a.value,s=function(){var t=r(e().mark((function t(n,r){var o,i,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=n.container_id,i=n.container_name,a=n.name,t.t0=u,t.next="delete"===t.t0?4:7;break;case 4:return t.next=6,O({data:JSON.stringify({container_id:o,container_name:i,name:a})});case 6:return t.abrupt("return",t.sent);case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),t.next=4,n({title:"批量".concat(c,"容器备份"),content:"批量".concat(c,"已选的容器备份,删除后备份文件将无法恢复,是否继续操作!"),column:[{label:"文件名",prop:"name"},C()],onConfirm:function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o(s);case 2:return Y(),t.abrupt("return",!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 4:case"end":return t.stop()}}),t)}))),function(t,e,n,r){return p.apply(this,arguments)})}],W=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o({request:E({container_id:I.value.id}),message:!0,success:function(){var t=r(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.status){t.next=5;break}return t.next=3,Y();case 3:return t.next=5,S(!0);case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),z=function(){var t=r(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,s({icon:"warning-filled",title:"删除备份文件",width:"45rem",content:"删除[".concat(n.name,"]备份文件后,该备份文件将永久消失,是否继续操作?")});case 3:o({loading:"正在删除...",request:O({container_id:n.container_id,container_name:n.container_name,name:n.name}),success:function(){var t=r(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!n.status){t.next=5;break}return t.next=4,Y();case 4:G.success("删除成功");case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),error:function(t){G.request(t)}}),t.next=9;break;case 6:t.prev=6,t.t0=t.catch(0),console.log(t.t0);case 9:case"end":return t.stop()}}),t,null,[[0,6]])})));return function(e){return t.apply(this,arguments)}}(),D=function(){var t=r(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.open("/download?filename="+encodeURIComponent(n.filename));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),Y=function(){var t=r(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:q.loading=!0,o({request:j({container_id:I.value.id}),data:Array,success:function(t){q.list=t,q.loading=!1}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),B=[N(),{label:"文件名",prop:"name",minWidth:140},{label:"存储位置",prop:"filename",minWidth:180,isCustom:!0},{label:"文件大小",prop:"size",minWidth:86,isCustom:!0,render:function(t){return i(t.size)}},{label:"备份时间",prop:"addtime",minWidth:120,isCustom:!0},P([{onClick:D,title:"下载"},{onClick:z,title:"删除"}])];return d((function(){Y()})),function(t,e){var r=L,o=a,i=c,s=f,l=u,p=v("bt-loading");return m(),g("div",n,[w(s,null,{"header-left":b((function(){return[w(r,{type:"primary",onClick:W},{default:b((function(){return e[0]||(e[0]=[x("容器备份")])})),_:1})]})),content:b((function(){return[_(w(o,{ref_key:"backupTable",ref:F,column:k(B),"max-height":"220",data:k(q).list,description:"备份列表为空"},null,8,["column","data"]),[[p,k(q).loading],[p,"正在加载镜像列表,请稍后...","title"]])]})),"footer-left":b((function(){return[w(i,{"table-ref":k(F),options:A},null,8,["table-ref"])]})),_:1}),w(l,{class:"mt-[2rem] ml-[1rem]",options:[{content:"备份任务创建成功后后台进行,可以关闭黑色窗口,备份完成可能需要1分钟以上!"}]})])}}}))}}}))}();