← Back
Editing: index-legacy27.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(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function n(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?e(Object(o),!0).forEach((function(e){r(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):e(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}function r(e,n,r){return(n=function(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function o(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return n};var e,n={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.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(e){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),u=new B(r||[]);return a(i,"_invoke",{value:S(t,n,u)}),i}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=p;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function b(){}function w(){}function x(){}var k={};f(k,c,(function(){return this}));var j=Object.getPrototypeOf,_=j&&j(j(N([])));_&&_!==r&&i.call(_,c)&&(k=_);var O=x.prototype=b.prototype=Object.create(k);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(e,n){function r(o,a,u,c){var l=h(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):n.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.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,n,r){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(r.method=i,r.arg=a;;){var u=r.delegate;if(u){var c=P(u,r);if(c){if(c===g)continue;return c}}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=d;var l=h(t,n,r);if("normal"===l.type){if(o=r.done?m:v,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=m,r.method="throw",r.arg=l.arg)}}}function P(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,P(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var i=h(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,g;var a=i.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,g):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,g)}function C(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 D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function B(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function N(n){if(n||""===n){var r=n[c];if(r)return r.call(n);if("function"==typeof n.next)return n;if(!isNaN(n.length)){var o=-1,a=function t(){for(;++o<n.length;)if(i.call(n,o))return t.value=n[o],t.done=!1,t;return t.value=e,t.done=!0,t};return a.next=a}}throw new TypeError(t(n)+" is not iterable")}return w.prototype=x,a(O,"constructor",{value:x,configurable:!0}),a(x,"constructor",{value:w,configurable:!0}),w.displayName=f(x,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(O),t},n.awrap=function(t){return{__await:t}},L(E.prototype),f(E.prototype,l,(function(){return this})),n.AsyncIterator=E,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new E(p(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(O),f(O,s,"Generator"),f(O,c,(function(){return this})),f(O,"toString",(function(){return"[object Generator]"})),n.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}},n.values=N,B.prototype={constructor:B,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(D),!t)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},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 n=this;function r(r,o){return u.type="throw",u.arg=t,n.next=r,o&&(n.method="next",n.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!l)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),D(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;D(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:N(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),g}},n}function i(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function a(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var a=t.apply(e,n);function u(t){i(a,r,o,u,c,"next",t)}function c(t){i(a,r,o,u,c,"throw",t)}u(void 0)}))}}System.register(["./index-legacy103.js?v=VERSION_NUMBER","./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy141.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./index.vue_vue_type_style_index_0_scoped_b3c4124c_lang-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./useController-legacy4.js?v=VERSION_NUMBER","./useMethods-legacy.js?v=VERSION_NUMBER","./index-legacy131.js?v=VERSION_NUMBER","./index-legacy130.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy124.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./useController-legacy5.js?v=VERSION_NUMBER","./site-legacy.js?v=VERSION_NUMBER","./useStore-legacy4.js?v=VERSION_NUMBER","./useController-legacy6.js?v=VERSION_NUMBER","./useMethod-legacy5.js?v=VERSION_NUMBER"],(function(t,e){"use strict";var r,i,u,c,l,s,f,p,h,y,v,d,m,g,b,w,x,k,j,_,O,L,E,S,P,C,D,B,N,T,I,G,F,q,A,R,H,M,W,Y,J,K,V,z,Q,U,X,Z,$,tt,et,nt,rt,ot,it,at;return{setters:[function(t){r=t._},function(t){i=t.u,u=t.aq,c=t.aL,l=t.c,s=t.b,f=t.ay,p=t.aM,h=t.a6,y=t.a7,v=t.a8,d=t.e},function(t){m=t.u},function(t){g=t.c,b=t.r,w=t.k,x=t.p,k=t.aD,j=t.x,_=t.q,O=t.M,L=t.A,E=t.v,S=t.y,P=t.e,C=t.B,D=t.C,B=t.s,N=t.aB,T=t.an,I=t.ap,G=t.ao,F=t.a4,q=t.i},function(t){A=t.k},null,function(t){R=t.a,H=t.o,M=t.g,W=t.u},function(t){Y=t.D,J=t.u,K=t.a,V=t.b,z=t.c,Q=t.g,U=t.d,X=t.o,Z=t.e,$=t.f,tt=t.s,et=t.h,nt=t.i,rt=t.j},function(t){ot=t.N},function(t){it=t.B},function(t){at=t._},null,null,null,null,null,null,null,null],execute:function(){var e={key:0,class:"flex items-center"},ut={key:1,class:"flex items-center"},ct=g({__name:"index",emits:["init"],setup:function(t,n){var r=n.expose,f=n.emit,p=s(),h=f,y=i().plugin,v=b(y.value.webserver),d=b(!1),m=b(!1),g=w({title:"",name:"",status:!0,version:"",admin:!1,s_version:"",setup:!1}),B=function(){var t=a(o().mark((function t(e){var n,r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u({sName:e.name});case 2:if(n=t.sent,"-1"!==(r=n.data).task){t.next=6;break}return t.abrupt("return",p.error("当前插件正在安装,不可重复安装"));case 6:A({name:null==r?void 0:r.name,type:"i",pluginInfo:r}),T();case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),N=!1,T=function(){var t=a(o().mark((function t(){var e,n,r,i=arguments;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=i.length>0&&void 0!==i[0]&&i[0],t.prev=1,!N){t.next=4;break}return t.abrupt("return");case 4:return t.next=6,c({name:"web"});case 6:n=t.sent,(r=n.data).status||e||setTimeout((function(){T()}),3e3),r.status&&!e&&h("init"),d.value=!r.status,Object.assign(g,r),"nginx"!==r.name&&(d.value=!0,m.value=r.status),t.next=18;break;case 15:t.prev=15,t.t0=t.catch(1),e||setTimeout((function(){T()}),3e3);case 18:case"end":return t.stop()}}),t,null,[[1,15]])})));return function(){return t.apply(this,arguments)}}();return x((function(){T(!0)})),k((function(){N=!0})),r({checkInstallStatus:T,pluginInfo:g,maskLayer:d,webServerType:v}),function(t,n){var r=l,o=at;return j(d)?(_(),O(o,{key:0,width:"38rem"},{content:L((function(){return[j(m)?(_(),E("div",ut,n[3]||(n[3]=[S("span",null,"Docker项目只支持nginx环境",-1)]))):(_(),E("div",e,[n[2]||(n[2]=S("span",null,"未安装运行环境,",-1)),P(r,{onClick:n[0]||(n[0]=function(t){return B({name:"nginx"})}),class:"!font-bold !text-[1.4rem]"},{default:L((function(){return n[1]||(n[1]=[C("安装Nginx")])})),_:1})]))]})),_:1})):D("",!0)}}}),lt={class:""},st={class:"flex items-center ml-1rem"};var ft=g({__name:"index",setup:function(t){var e=i().mainHeight,o=Y(),a=o.getDockerSiteList,u=o.setDockerSiteStatus,c=o.setDockerSiteRemark,s=o.delDockerSite,d=o.resetData,g=f().refs.isRefreshSiteList,b=B(Y()),w=b.pluginInfo,k=b.classList,O=b.statusFilterKey,D=p({options:[{type:"button",label:"创建",active:!0,onClick:function(){return $()}},{type:"button",label:"运行环境",onClick:function(){return tt()}},{type:"button",label:"常用设置",onClick:function(){return et()}},{type:"custom",render:function(){return P(it,{style:"margin-left:1.2rem;",isRequest:!1,pluginInfo:w.value},null)}}]}).BtOperation,A=v([nt({callback:function(){},classList:k}),{label:"删除项目",value:"delete",event:rt}]),at=m({key:"classify",name:"Docker分类",options:function(){return[{label:"全部分类",value:"all"}]},event:U,ignore:["0","-2"],field:"name"}),ut=h({request:function(t){return a(n(n({p:t.p||1,row:t.limit||20,query:t.search||""},t.classify&&"all"!==t.classify?{classify:t.classify}:{}),"all"!==O.value?{type:O.value}:{}))},columns:[R(),J({onClick:X,openPlugin:Z}),{label:"类型",prop:"type",minWidth:90,renderHeader:function(){var t=[{title:"全部",key:"all"},{title:"JAVA",key:"java"},{title:"Go",key:"go"},{title:"PHP",key:"php"},{title:"Python",key:"python"},{title:"反向代理",key:"proxy"},{title:"Docker应用",key:"app"}];return N("div",{class:"flex items-center flex-nowrap"},["",N(T,{onCommand:function(t){O.value=t,gt()}},{default:function(){return N("span",{class:"text-[1.2rem] flex items-center"},[[P("span",{class:"status-header-text leading-[1.5] whitespace-nowrap"},[C("类型"),"all"===O.value?"":"(".concat(t.find((function(t){return t.key===O.value})).title,")")])],N("i",{class:"svgtofont-el-arrow-down "})])},dropdown:function(){var e,n;return P(G,null,"function"==typeof(n=e=t.map((function(t){return P(I,{command:t.key},{default:function(){return[t.title]}})})))||"[object Object]"===Object.prototype.toString.call(n)&&!q(n)?e:{default:function(){return[e]}})}})])}},K({prop:"status",onClick:function(t){var e="1"===t.status?0:1;u({status:e,id:t.id,site_name:t.name,edate:t.edate})},onFilterEvent:function(t){O.value=t,gt()}}),{label:"根目录",prop:"path",minWidth:200,isCustom:!0,render:function(t){return P("div",null,[P("span",{class:"w-full whitespace-pre-line inline-block bt-link leading-[16px]",onClick:function(){return H(t,"path")},title:"点击打开目录"},[t.path])])}},V(),M({request:function(t,e){c({remark:e,id:t.id,site_name:t.name})},prop:"remark",width:200}),z({onClick:function(t){return X(t,"ssl")}}),W([{onClick:function(t){Z(t,"monitor-setting")},title:"统计"},{onClick:function(t){Z(t,"bt_waf")},title:"WAF"},{title:"设置",onClick:X},{title:"删除",onClick:function(t){s(t)}}])],extension:[at,A,y(g)]}),ft=ut.BtTable,pt=ut.BtPage,ht=ut.BtRefresh,yt=ut.BtSearch,vt=ut.BtColumn,dt=ut.BtBatch,mt=ut.BtTableCategory,gt=ut.refresh;return x((function(){Q()})),F((function(){d()})),function(t,n){var o=l,i=r;return _(),E("div",lt,[P(ct,{ref:"envRef",onInit:j(gt)},null,8,["onInit"]),P(i,null,{"header-left":L((function(){return[P(j(D)),S("div",st,[S("div",{class:"flex items-center",onClick:n[0]||(n[0]=function(){return j(ot)&&j(ot).apply(void 0,arguments)})},n[1]||(n[1]=[S("i",{class:"svgtofont-desired text-[1.6rem]"},null,-1),S("span",{class:"bt-link"},"需求反馈",-1)])),P(o,{href:"https://www.bt.cn/bbs/thread-140664-1-1.html",class:"ml-10px"},{default:L((function(){return n[2]||(n[2]=[C(">>使用帮助")])})),_:1})])]})),"header-right":L((function(){return[P(j(mt),{class:"!w-[160px] mr-[10px]"}),P(j(yt),{class:"mr-[10px] !w-[26rem]",placeholder:"请输入项目名称或备注"}),P(j(ht),{class:"mr-[10px]"}),P(j(vt))]})),content:L((function(){return[P(j(ft),{"max-height":j(e)},null,8,["max-height"])]})),"footer-left":L((function(){return[P(j(dt))]})),"footer-right":L((function(){return[P(j(pt))]})),_:1})])}}});t("default",d(ft,[["__scopeId","data-v-645f426d"]]))}}}))}();
Save File
Cancel