File: /www/server/panel/BTPanel/static/js/redis-create-log-legacy.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 n,r,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",u=a.toStringTag||"@@toStringTag";function i(t,a,o,u){var i=a&&a.prototype instanceof l?a:l,s=Object.create(i.prototype);return e(s,"_invoke",function(t,e,a){var o,u,i,l=0,s=a||[],f=!1,d={p:0,n:0,v:n,a:p,f:p.bind(n,4),d:function(t,e){return o=t,u=0,i=n,d.n=e,c}};function p(t,e){for(u=t,i=e,r=0;!f&&l&&!a&&r<s.length;r++){var a,o=s[r],p=d.p,m=o[2];t>3?(a=m===e)&&(i=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=n):o[0]<=p&&((a=t<2&&p<o[1])?(u=0,d.v=e,d.n=o[1]):p<m&&(a=t<3||o[0]>e||e>m)&&(o[4]=t,o[5]=e,d.n=m,u=0))}if(a||t>1)return c;throw f=!0,e}return function(a,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&p(s,m),u=s,i=m;(r=u<2?n:i)||!f;){o||(u?u<3?(u>1&&(d.n=-1),p(u,i)):d.n=i:d.v=i);try{if(l=2,o){if(u||(a="next"),r=o[a]){if(!(r=r.call(o,i)))throw TypeError("iterator result is not an object");if(!r.done)return r;i=r.value,u<2&&(u=0)}else 1===u&&(r=o.return)&&r.call(o),u<2&&(i=TypeError("The iterator does not provide a '"+a+"' method"),u=1);o=n}else if((r=(f=d.n<0)?i:t.call(e,d))!==c)break}catch(r){o=n,u=1,i=r}finally{l=1}}return{value:r,done:f}}}(t,o,u),!0),s}var c={};function l(){}function s(){}function f(){}r=Object.getPrototypeOf;var d=[][o]?r(r([][o]())):(e(r={},o,function(){return this}),r),p=f.prototype=l.prototype=Object.create(d);function m(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,e(t,u,"GeneratorFunction")),t.prototype=Object.create(p),t}return s.prototype=f,e(p,"constructor",f),e(f,"constructor",s),s.displayName="GeneratorFunction",e(f,u,"GeneratorFunction"),e(p),e(p,u,"Generator"),e(p,o,function(){return this}),e(p,"toString",function(){return"[object Generator]"}),(t=function(){return{w:i,m:m}})()}function e(t,n,r,a){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}e=function(t,n,r,a){function u(n,r){e(t,n,function(t){return this._invoke(n,r,t)})}n?o?o(t,n,{value:r,enumerable:!a,configurable:!a,writable:!a}):t[n]=r:(u("next",0),u("throw",1),u("return",2))},e(t,n,r,a)}function n(t,e,n,r,a,o,u){try{var i=t[o](u),c=i.value}catch(t){return void n(t)}i.done?e(c):Promise.resolve(c).then(r,a)}System.register(["./index-legacy206.js?v=1777008528","./utils-lib-legacy.js?v=1777008528","./base-lib-legacy.js?v=1777008528","./index-legacy75.js?v=1777008528","./index-legacy3.js?v=1777008528","./index-legacy119.js?v=1777008528","./__commonjsHelpers__-legacy.js?v=1777008528","./index-legacy116.js?v=1777008528","./index-legacy118.js?v=1777008528","./useController-legacy13.js?v=1777008528","./site-legacy.js?v=1777008528","./useStore-legacy2.js?v=1777008528"],function(e,r){"use strict";var a,o,u,i,c,l,s,f,d,p,m,v,g,y,b,_,x,h,j,w;return{setters:[function(t){a=t._},function(t){o=t.fo,u=t.M,i=t.cZ},function(t){c=t.c,l=t.r,s=t.o,f=t.a8,d=t.j,p=t.k,m=t.e,v=t.v,g=t.F,y=t.B,b=t.p,_=t.C,x=t.bE,h=t.bF,j=t.q},function(t){w=t.u},null,null,null,null,null,null,null,null],execute:function(){var r={class:"p-[2rem] master-redis-create-log"},k=c({__name:"redis-create-log",props:{compData:{default:function(){return{task_id:""}}}},setup:function(e){var i=w().isRedisRefreshList,c=e,k=l(""),O=["配置主Redis节点","配置从Redis节点","验证复制状态","主从配置完成"],S=l(O.map(function(t){return{name:t,status:"wait"}})),T=function(t){S.value=O.map(function(e,n){var r=t[n];return{name:e,status:(null==r?void 0:r.status)||"wait",start_time:null==r?void 0:r.start_time,completed_time:null==r?void 0:r.completed_time,updated_time:null==r?void 0:r.updated_time}})},G=l(0),P=null,F={wait:function(){return m("span",{class:"svgtofont-el-more-filled text-disabled mr-2px !text-large"},null)},completed:function(){return m("span",{class:"svgtofont-el-circle-check text-primary mr-2px !text-large"},null)},failed:function(){return m("span",{class:"svgtofont-el-circle-close text-dangerDark mr-2px !text-large"},null)},running:function(){return m("span",{class:"svgtofont-el-loading animate-spin text-supplement mr-2px !text-large"},null)}},D={wait:"",completed:"完成",failed:"失败",running:"进行中"},E=function(){var e,r=(e=t().m(function e(){var n,r,a,l,s,f;return t().w(function(t){for(;;)switch(t.n){case 0:if(c.compData.task_id){t.n=1;break}return t.a(2);case 1:return t.n=2,o({task_id:c.compData.task_id});case 2:if(n=t.v,r=n.data,console.log(r,"getCreationStatus res"),r.status){t.n=3;break}return u.error(r.msg),t.a(2);case 3:if(a=r.data,k.value=a.logs||"",T(a.steps||[]),l=S.value.findIndex(function(t){return"running"===t.status}),s=S.value.map(function(t){return t.status}).lastIndexOf("completed"),G.value=-1!==l?l:-1!==s?s:0,f=S.value.some(function(t){return"failed"===t.status}),"completed"!==a.status&&"failed"!==a.status&&!f){t.n=4;break}return P&&(clearTimeout(P),i.value=!0,P=null),t.a(2);case 4:P=setTimeout(E,2e3);case 5:return t.a(2)}},e)}),function(){var t=this,r=arguments;return new Promise(function(a,o){var u=e.apply(t,r);function i(t){n(u,a,o,i,c,"next",t)}function c(t){n(u,a,o,i,c,"throw",t)}i(void 0)})});return function(){return r.apply(this,arguments)}}();return s(function(){E()}),f(function(){k.value="",P&&(clearTimeout(P),P=null)}),function(t,e){var n=a;return d(),p("div",r,[m(b(h),{direction:"vertical",space:"4rem",active:b(G)},{default:v(function(){return[(d(!0),p(g,null,y(b(S),function(t,e){var n;return d(),_(b(x),{key:e,title:t.name,icon:F[t.status]?F[t.status]():F.wait(),description:null!==(n=D[t.status])&&void 0!==n?n:"",status:"completed"===t.status?"success":"running"===t.status?"process":"failed"===t.status?"error":"wait"},null,8,["title","icon","description","status"])}),128))]}),_:1},8,["active"]),e[0]||(e[0]=j("h3",{class:"text-base mb-[1rem] mt-[1rem] color-[#666]"},"实时日志",-1)),m(n,{content:b(k),isHtml:!0,autoScroll:!0,style:{height:"14rem"}},null,8,["content"])])}}});e("default",i(k,[["__scopeId","data-v-8388a2bd"]]))}}})}();