File: /www/server/panel/BTPanel/static/js/index-legacy359.js
!function(){function t(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,r,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function c(t,o,i,a){var c=o&&o.prototype instanceof l?o:l,s=Object.create(c.prototype);return n(s,"_invoke",function(t,n,o){var i,a,c,l=0,s=o||[],f=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return i=t,a=0,c=e,d.n=n,u}};function p(t,n){for(a=t,c=n,r=0;!f&&l&&!o&&r<s.length;r++){var o,i=s[r],p=d.p,v=i[2];t>3?(o=v===n)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=t<2&&p<i[1])?(a=0,d.v=n,d.n=i[1]):p<v&&(o=t<3||i[0]>n||n>v)&&(i[4]=t,i[5]=n,d.n=v,a=0))}if(o||t>1)return u;throw f=!0,n}return function(o,s,v){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,v),a=s,c=v;(r=a<2?e:c)||!f;){i||(a?a<3?(a>1&&(d.n=-1),p(a,c)):d.n=c:d.v=c);try{if(l=2,i){if(a||(o="next"),r=i[o]){if(!(r=r.call(i,c)))throw TypeError("iterator result is not an object");if(!r.done)return r;c=r.value,a<2&&(a=0)}else 1===a&&(r=i.return)&&r.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((r=(f=d.n<0)?c:t.call(n,d))!==u)break}catch(r){i=e,a=1,c=r}finally{l=1}}return{value:r,done:f}}}(t,i,a),!0),s}var u={};function l(){}function s(){}function f(){}r=Object.getPrototypeOf;var d=[][i]?r(r([][i]())):(n(r={},i,function(){return this}),r),p=f.prototype=l.prototype=Object.create(d);function v(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,n(t,a,"GeneratorFunction")),t.prototype=Object.create(p),t}return s.prototype=f,n(p,"constructor",f),n(f,"constructor",s),s.displayName="GeneratorFunction",n(f,a,"GeneratorFunction"),n(p),n(p,a,"Generator"),n(p,i,function(){return this}),n(p,"toString",function(){return"[object Generator]"}),(t=function(){return{w:c,m:v}})()}function n(t,e,r,o){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}n=function(t,e,r,o){function a(e,r){n(t,e,function(t){return this._invoke(e,r,t)})}e?i?i(t,e,{value:r,enumerable:!o,configurable:!o,writable:!o}):t[e]=r:(a("next",0),a("throw",1),a("return",2))},n(t,e,r,o)}function e(t,n,e,r,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void e(t)}c.done?n(u):Promise.resolve(u).then(r,o)}function r(t){return function(){var n=this,r=arguments;return new Promise(function(o,i){var a=t.apply(n,r);function c(t){e(a,o,i,c,u,"next",t)}function u(t){e(a,o,i,c,u,"throw",t)}c(void 0)})}}System.register(["./utils-lib-legacy.js?v=1777008528","./index-legacy206.js?v=1777008528","./index-legacy118.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./site-legacy.js?v=1777008528","./index-legacy3.js?v=1777008528","./useStore-legacy2.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528","./index-legacy119.js?v=1777008528","./index-legacy116.js?v=1777008528"],function(n,e){"use strict";var o,i,a,c,u,l,s,f,d,p,v,m,h,g,y,b,_,w,x,j,k,O,T,S,P;return{setters:[function(t){o=t.da,i=t.o,a=t.R,c=t.w,u=t.k,l=t.K},function(t){s=t._},function(t){f=t._},function(t){d=t.c,p=t.r,v=t.e,m=t.D,h=t.x,g=t.aW,y=t.j,b=t.k,_=t.v,w=t.p,x=t.q,j=t.Q,k=t.F},function(t){O=t.getRecordsList,T=t.rollback},function(t){S=t.g},function(t){P=t.u},null,null,null],execute:function(){var e={class:"p-20px"};n("default",d({__name:"index",setup:function(n,d){var G,B=d.expose,F=P().siteInfo,q=p(!1),C=p(!1),E=p({}),R=function(){var n=r(t().m(function n(e,r){return t().w(function(t){for(;;)switch(t.n){case 0:if(!e.active){t.n=1;break}return t.a(2);case 1:return t.n=2,c({width:"51rem",title:"回滚确认",content:function(){return v("div",null,[h("您将把部署回滚到较早的提交状态,"),v("span",{class:"text-warning"},[h("请先备份站点文件以避免数据丢失!")])])}});case 2:u({loading:"正在回滚记录,请稍后...",request:T({branch:e.branch,git_manager_id:F.value.git_manager.id,commit:e.commit_hash}),message:!0,success:function(){K()}});case 3:return t.a(2)}},n)}));return function(t,e){return n.apply(this,arguments)}}(),V=o({request:(G=r(t().m(function n(e){var r;return t().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,O({git_manager_id:F.value.git_manager.id,p:e.p,limit:e.limit});case 1:return r=t.v,t.a(2,{data:r.data.data,total:i(r.data.page)})}},n)})),function(t){return G.apply(this,arguments)}),columns:[{label:"提交",prop:"commit",render:function(t,n){return v(g,{effect:"dark",content:t.commit_hash,placement:"top"},{default:function(){return[v("div",{class:"flex items-center gap-10px"},[v("div",{class:"flex flex-col"},[v("div",{class:"text-default"},[t.commit_hash.slice(0,7)]),v("div",{class:"text-tertiary"},[t.commit_author])]),t.active?v(m,{type:"success"},{default:function(){return[h("激活")]}}):null])]}})}},{label:"分支",prop:"branch",showOverflowTooltip:!0,width:80},{label:"提交信息",prop:"commit_message",showOverflowTooltip:!0,render:function(t){return v("div",{class:"bt-link truncate",onClick:function(){E.value=t,C.value=!0}},[t.commit_message])}},{label:"状态",prop:"status",width:60,render:function(t){return v("span",{onClick:function(){E.value=t,C.value=!0},class:t.status?"bt-link":"bt-danger"},[t.status?"成功":"失败"])}},{label:"部署类型",prop:"deploy_mode",width:64,render:function(t){return 1===t.deploy_mode?"自动部署":"手动部署"}},{label:"部署时间",prop:"deployment_time",width:150,render:function(t){return v("div",null,[v("div",{class:"text-default"},[a(t.deploy_time)]),v("div",{class:"text-tertiary"},[h("耗时:"),t.duration,h("s")])])}},S([{render:function(t,n){return v("span",{class:t.active?"cursor-not-allowed":"bt-link",onClick:function(){return R(t)}},[h("回滚")])}}])]}),D=V.BtTable,H=(V.BtSearch,V.BtRefresh),I=V.BtPage,K=(V.param,V.refresh);return B({init:K}),function(t,n){var r,o=f,i=s,a=l;return y(),b(k,null,[v(o,null,{"header-right":_(function(){return[v(w(H))]}),content:_(function(){return[v(w(D),{"max-height":460})]}),"footer-right":_(function(){return[v(w(I))]}),_:1}),v(a,{title:"日志[".concat(null===(r=w(E))||void 0===r||null===(r=r.commit_hash)||void 0===r?void 0:r.slice(0,7),"]"),modelValue:w(C),"onUpdate:modelValue":n[0]||(n[0]=function(t){return j(C)?C.value=t:null}),area:[53]},{default:_(function(){var t;return[x("div",e,[v(i,{loading:w(q),class:"!h-[38rem]",content:null===(t=w(E))||void 0===t?void 0:t.log_content},null,8,["loading","content"])])]}),_:1},8,["title","modelValue"])],64)}}}))}}})}();