From bb95aa5669642f0dcac638614d4ddd98eaafb654 Mon Sep 17 00:00:00 2001 From: ruanshudong Date: Tue, 26 Sep 2023 10:15:04 +0800 Subject: [PATCH] fix config page loading bug --- client/dist/adminPass.html | 2 +- client/dist/auth.html | 2 +- client/dist/error.html | 2 +- client/dist/k8s.html | 2 +- client/dist/login.html | 2 +- client/dist/logview.html | 2 +- client/dist/pass.html | 2 +- ...Pass.13a391f0.js => adminPass.294ea628.js} | 0 .../js/{auth.88f2a15b.js => auth.e25b4b39.js} | 0 ...n.815b29ae.js => chunk-common.3c7eb853.js} | 0 ....680e959e.js => chunk-vendors.1bddc595.js} | 4 +-- .../{error.548e59de.js => error.4fba0b14.js} | 0 client/dist/static/js/index.1b46a0b8.js | 1 - client/dist/static/js/index.c1f7556b.js | 1 + .../js/{k8s.595e6bfd.js => k8s.b48d7c32.js} | 0 ...ogView.1d39f06e.js => logView.adb5ec99.js} | 0 .../{login.82c6be9e.js => login.79bb9d88.js} | 0 .../js/{pass.f670966e.js => pass.609f366f.js} | 0 client/dist/tars.html | 2 +- client/package-lock.json | 28 ++++++++++++++----- client/src/pages/server/config.vue | 5 +++- config/tars-dev.conf | 2 +- 22 files changed, 37 insertions(+), 20 deletions(-) rename client/dist/static/js/{adminPass.13a391f0.js => adminPass.294ea628.js} (100%) rename client/dist/static/js/{auth.88f2a15b.js => auth.e25b4b39.js} (100%) rename client/dist/static/js/{chunk-common.815b29ae.js => chunk-common.3c7eb853.js} (100%) rename client/dist/static/js/{chunk-vendors.680e959e.js => chunk-vendors.1bddc595.js} (99%) rename client/dist/static/js/{error.548e59de.js => error.4fba0b14.js} (100%) delete mode 100644 client/dist/static/js/index.1b46a0b8.js create mode 100644 client/dist/static/js/index.c1f7556b.js rename client/dist/static/js/{k8s.595e6bfd.js => k8s.b48d7c32.js} (100%) rename client/dist/static/js/{logView.1d39f06e.js => logView.adb5ec99.js} (100%) rename client/dist/static/js/{login.82c6be9e.js => login.79bb9d88.js} (100%) rename client/dist/static/js/{pass.f670966e.js => pass.609f366f.js} (100%) diff --git a/client/dist/adminPass.html b/client/dist/adminPass.html index 588ed256..2aefd544 100644 --- a/client/dist/adminPass.html +++ b/client/dist/adminPass.html @@ -1 +1 @@ -Set Admin Pass
\ No newline at end of file +Set Admin Pass
\ No newline at end of file diff --git a/client/dist/auth.html b/client/dist/auth.html index fd82f954..e7b581e2 100644 --- a/client/dist/auth.html +++ b/client/dist/auth.html @@ -1 +1 @@ -User Center
\ No newline at end of file +User Center
\ No newline at end of file diff --git a/client/dist/error.html b/client/dist/error.html index e1b6e6ab..7ba08f33 100644 --- a/client/dist/error.html +++ b/client/dist/error.html @@ -1 +1 @@ -Error
\ No newline at end of file +Error
\ No newline at end of file diff --git a/client/dist/k8s.html b/client/dist/k8s.html index 476755df..e6f136ee 100644 --- a/client/dist/k8s.html +++ b/client/dist/k8s.html @@ -1 +1 @@ -TarsK8s
\ No newline at end of file +TarsK8s
\ No newline at end of file diff --git a/client/dist/login.html b/client/dist/login.html index f8bdc420..3b11e4bc 100644 --- a/client/dist/login.html +++ b/client/dist/login.html @@ -1 +1 @@ -Sign in
\ No newline at end of file +Sign in
\ No newline at end of file diff --git a/client/dist/logview.html b/client/dist/logview.html index cad3956a..24139f79 100644 --- a/client/dist/logview.html +++ b/client/dist/logview.html @@ -1 +1 @@ -logView
\ No newline at end of file +logView
\ No newline at end of file diff --git a/client/dist/pass.html b/client/dist/pass.html index 7cd398bc..f4f5b66d 100644 --- a/client/dist/pass.html +++ b/client/dist/pass.html @@ -1 +1 @@ -Modify Pass
\ No newline at end of file +Modify Pass
\ No newline at end of file diff --git a/client/dist/static/js/adminPass.13a391f0.js b/client/dist/static/js/adminPass.294ea628.js similarity index 100% rename from client/dist/static/js/adminPass.13a391f0.js rename to client/dist/static/js/adminPass.294ea628.js diff --git a/client/dist/static/js/auth.88f2a15b.js b/client/dist/static/js/auth.e25b4b39.js similarity index 100% rename from client/dist/static/js/auth.88f2a15b.js rename to client/dist/static/js/auth.e25b4b39.js diff --git a/client/dist/static/js/chunk-common.815b29ae.js b/client/dist/static/js/chunk-common.3c7eb853.js similarity index 100% rename from client/dist/static/js/chunk-common.815b29ae.js rename to client/dist/static/js/chunk-common.3c7eb853.js diff --git a/client/dist/static/js/chunk-vendors.680e959e.js b/client/dist/static/js/chunk-vendors.1bddc595.js similarity index 99% rename from client/dist/static/js/chunk-vendors.680e959e.js rename to client/dist/static/js/chunk-vendors.1bddc595.js index 0379ea7e..3c8fe797 100644 --- a/client/dist/static/js/chunk-vendors.680e959e.js +++ b/client/dist/static/js/chunk-vendors.1bddc595.js @@ -172,7 +172,7 @@ OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //! moment.js locale configuration var t=e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});return t}))},4245:function(e,t,n){var i=n("1290");function r(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}e.exports=r},42454:function(e,t,n){var i=n("f909"),r=n("2ec1"),a=r((function(e,t,n){i(e,t,n)}));e.exports=a},4272:function(e,t){function n(e){const t=["base-uri","child-src","connect-src","default-src","font-src","form-action","frame-ancestors","frame-src","img-src","manifest-src","media-src","object-src","plugin-types","report-uri","sandbox","script-src","style-src","trusted-types","unsafe-hashes","worker-src"];return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_-]*",keyword:t},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}e.exports=n},4284:function(e,t){function n(e,t){var n=-1,i=null==e?0:e.length;while(++n=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},_keepShow:function(){var e=this._tooltipModel,t=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY})}))}},manuallyShowTip:function(e,t,n,i){if(i.from!==this.uid&&!a.node){var r=C(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var s=x;s.position=[i.x,i.y],s.update(),s.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:s},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:i.dataByCoordSys,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(e,t,n,i))return;var l=d(i,t),c=l.point[0],u=l.point[1];null!=c&&null!=u&&this._tryShow({offsetX:c,offsetY:u,position:i.position,target:l.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},manuallyHideTip:function(e,t,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,i.from!==this.uid&&this._hide(C(i,n))},_manuallyAxisShowTip:function(e,t,n,i){var r=i.seriesIndex,a=i.dataIndex,o=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=a&&null!=o){var s=t.getSeriesByIndex(r);if(s){var l=s.getData();e=E([l.getItemModel(a),s,(s.coordinateSystem||{}).model,e]);if("axis"===e.get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:a,position:i.position}),!0}}},_tryShow:function(e,t){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;r&&r.length?this._showAxisTooltip(r,e):n&&null!=n.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(e,n,t)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(e,n,t)):(this._lastDataByCoordSys=null,this._hide(t))}},_showOrMove:function(e,t){var n=e.get("showDelay");t=r.bind(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},_showAxisTooltip:function(e,t){var n=this._ecModel,i=this._tooltipModel,a=[t.offsetX,t.offsetY],o=[],s=[],c=E([t.tooltipOption,i]),u=this._renderMode,d=this._newLine,h={};b(e,(function(e){b(e.dataByAxis,(function(e){var t=n.getComponent(e.axisDim+"Axis",e.axisIndex),i=e.value,a=[];if(t&&null!=i){var c=_.getValueLabel(i,t.axis,n,e.seriesDataIndices,e.valueLabelOpt);r.each(e.seriesDataIndices,(function(o){var l=n.getSeriesByIndex(o.seriesIndex),d=o.dataIndexInside,f=l&&l.getDataParams(d);if(f.axisDim=e.axisDim,f.axisIndex=e.axisIndex,f.axisType=e.axisType,f.axisId=e.axisId,f.axisValue=m.getAxisRawValue(t.axis,i),f.axisValueLabel=c,f){s.push(f);var p,_=l.formatTooltip(d,!0,null,u);if(r.isObject(_)){p=_.html;var g=_.markers;r.merge(h,g)}else p=_;a.push(p)}}));var f=c;"html"!==u?o.push(a.join(d)):o.push((f?l.encodeHTML(f)+d:"")+a.join(d))}}))}),this),o.reverse(),o=o.join(this._newLine+this._newLine);var f=t.position;this._showOrMove(c,(function(){this._updateContentNotChangedOnAxis(e)?this._updatePosition(c,f,a[0],a[1],this._tooltipContent,s):this._showTooltipContent(c,o,s,Math.random(),a[0],a[1],f,void 0,h)}))},_showSeriesItemTooltip:function(e,t,n){var i=this._ecModel,a=t.seriesIndex,o=i.getSeriesByIndex(a),s=t.dataModel||o,l=t.dataIndex,c=t.dataType,u=s.getData(c),d=E([u.getItemModel(l),s,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),h=d.get("trigger");if(null==h||"item"===h){var f,p,m=s.getDataParams(l,c),_=s.formatTooltip(l,!1,c,this._renderMode);r.isObject(_)?(f=_.html,p=_.markers):(f=_,p=null);var g="item_"+s.name+"_"+l;this._showOrMove(d,(function(){this._showTooltipContent(d,f,m,g,e.offsetX,e.offsetY,e.position,e.target,p)})),n({type:"showTip",dataIndexInside:l,dataIndex:u.getRawIndex(l),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(e,t,n){var i=t.tooltip;if("string"===typeof i){var r=i;i={content:r,formatter:r}}var a=new f(i,this._tooltipModel,this._ecModel),o=a.get("content"),s=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},s,e.offsetX,e.offsetY,e.position,t)})),n({type:"showTip",from:this.uid})},_showTooltipContent:function(e,t,n,i,r,a,o,s,c){if(this._ticket="",e.get("showContent")&&e.get("show")){var u=this._tooltipContent,d=e.get("formatter");o=o||e.get("position");var h=t;if(d&&"string"===typeof d)h=l.formatTpl(d,n,!0);else if("function"===typeof d){var f=y((function(t,i){t===this._ticket&&(u.setContent(i,c,e),this._updatePosition(e,o,r,a,u,n,s))}),this);this._ticket=i,h=d(n,i,f)}u.setContent(h,c,e),u.show(e),this._updatePosition(e,o,r,a,u,n,s)}},_updatePosition:function(e,t,n,i,a,o,s){var l=this._api.getWidth(),c=this._api.getHeight();t=t||e.get("position");var u=a.getSize(),d=e.get("align"),f=e.get("verticalAlign"),p=s&&s.getBoundingRect().clone();if(s&&p.applyTransform(s.transform),"function"===typeof t&&(t=t([n,i],o,a.el,p,{viewSize:[l,c],contentSize:u.slice()})),r.isArray(t))n=S(t[0],l),i=S(t[1],c);else if(r.isObject(t)){t.width=u[0],t.height=u[1];var m=h.getLayoutRect(t,{width:l,height:c});n=m.x,i=m.y,d=null,f=null}else if("string"===typeof t&&s){var _=O(t,p,u);n=_[0],i=_[1]}else{_=T(n,i,a,l,c,d?null:20,f?null:20);n=_[0],i=_[1]}if(d&&(n-=k(d)?u[0]/2:"right"===d?u[0]:0),f&&(i-=k(f)?u[1]/2:"bottom"===f?u[1]:0),e.get("confine")){_=M(n,i,a,l,c);n=_[0],i=_[1]}a.moveTo(n,i)},_updateContentNotChangedOnAxis:function(e){var t=this._lastDataByCoordSys,n=!!t&&t.length===e.length;return n&&b(t,(function(t,i){var r=t.dataByAxis||{},a=e[i]||{},o=a.dataByAxis||[];n&=r.length===o.length,n&&b(r,(function(e,t){var i=o[t]||{},r=e.seriesDataIndices||[],a=i.seriesDataIndices||[];n&=e.value===i.value&&e.axisType===i.axisType&&e.axisId===i.axisId&&r.length===a.length,n&&b(r,(function(e,t){var i=a[t];n&=e.seriesIndex===i.seriesIndex&&e.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=e,!!n},_hide:function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},dispose:function(e,t){a.node||(this._tooltipContent.dispose(),p.unregister("itemTooltip",t))}});function E(e){var t=e.pop();while(e.length){var n=e.pop();n&&(f.isInstance(n)&&(n=n.get("tooltip",!0)),"string"===typeof n&&(n={formatter:n}),t=new f(n,t,t.ecModel))}return t}function C(e,t){return e.dispatchAction||r.bind(t.dispatchAction,t)}function T(e,t,n,i,r,a,o){var s=n.getOuterSize(),l=s.width,c=s.height;return null!=a&&(e+l+a>i?e-=l+a:e+=a),null!=o&&(t+c+o>r?t-=c+o:t+=o),[e,t]}function M(e,t,n,i,r){var a=n.getOuterSize(),o=a.width,s=a.height;return e=Math.min(e+o,i)-o,t=Math.min(t+s,r)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function O(e,t,n){var i=n[0],r=n[1],a=5,o=0,s=0,l=t.width,c=t.height;switch(e){case"inside":o=t.x+l/2-i/2,s=t.y+c/2-r/2;break;case"top":o=t.x+l/2-i/2,s=t.y-r-a;break;case"bottom":o=t.x+l/2-i/2,s=t.y+c+a;break;case"left":o=t.x-i-a,s=t.y+c/2-r/2;break;case"right":o=t.x+l+a,s=t.y+c/2-r/2}return[o,s]}function k(e){return"center"===e||"middle"===e}e.exports=w},4319:function(e,t,n){var i=n("6d8b"),r=n("22d1"),a=n("e0d3"),o=a.makeInner,s=n("625e"),l=s.enableClassExtend,c=s.enableClassCheck,u=n("3901"),d=n("9bdb"),h=n("fe21"),f=n("551f"),p=i.mixin,m=o();function _(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}function g(e,t,n){for(var i=0;i=10)e/=10;return r(e)}return e/=1e3,r(e)}var a=e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:i,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},4411:function(e,t,n){for(var i=n("3eba"),r=n("55ac"),a=function(){},o=["treemapZoomToNode","treemapRender","treemapMove"],s=0;s0}e.exports=n},"44ad":function(e,t,n){var i=n("e330"),r=n("d039"),a=n("c6b6"),o=Object,s=i("".split);e.exports=r((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?s(e,""):o(e)}:o},"44b5":function(e,t){function n(e){const t=["from","maintainer","expose","env","arg","user","onbuild","stopsignal"];return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:t,contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"\n \n '}else n||(this.hoverTimer=setTimeout(this.clearHoverZone,this.panel.config.hoverThreshold))},clearHoverZone:function(){var e=this.$refs.hoverZone;e&&(e.innerHTML="")},renderEmptyText:function(e){return e("div",{class:"el-cascader-menu__empty-text"},[this.t("el.cascader.noData")])},renderNodeList:function(e){var t=this.menuId,n=this.panel.isHoverMenu,i={on:{}};n&&(i.on.expand=this.handleExpand);var r=this.nodes.map((function(n,r){var a=n.hasChildren;return e("cascader-node",l()([{key:n.uid,attrs:{node:n,"node-id":t+"-"+r,"aria-haspopup":a,"aria-owns":a?t:null}},i]))}));return[].concat(r,[n?e("svg",{ref:"hoverZone",class:"el-cascader-menu__hover-zone"}):null])}},render:function(e){var t=this.isEmpty,n=this.menuId,i={nativeOn:{}};return this.panel.isHoverMenu&&(i.nativeOn.mousemove=this.handleMouseMove),e("el-scrollbar",l()([{attrs:{tag:"ul",role:"menu",id:n,"wrap-class":"el-cascader-menu__wrap","view-class":{"el-cascader-menu__list":!0,"is-empty":t}},class:"el-cascader-menu"},i]),[t?this.renderEmptyText(e):this.renderNodeList(e)])}},M=T,O=Object(y["a"])(M,S,x,!1,null,null,null);O.options.__file="packages/cascader-panel/src/cascader-menu.vue";var k=O.exports,D=n(21),L=function(){function e(e,t){for(var n=0;n1?t-1:0),i=1;i1?i-1:0),a=1;a0},e.prototype.syncCheckState=function(e){var t=this.getValueByOption(),n=this.isSameNode(e,t);this.doCheck(n)},e.prototype.doCheck=function(e){this.checked!==e&&(this.config.checkStrictly?this.checked=e:(this.broadcast("check",e),this.setCheckState(e),this.emit("check")))},L(e,[{key:"isDisabled",get:function(){var e=this.data,t=this.parent,n=this.config,i=n.disabled,r=n.checkStrictly;return e[i]||!r&&t&&t.isDisabled}},{key:"isLeaf",get:function(){var e=this.data,t=this.loaded,n=this.hasChildren,i=this.children,r=this.config,a=r.lazy,o=r.leaf;if(a){var s=Object(D["isDef"])(e[o])?e[o]:!!t&&!i.length;return this.hasChildren=!s,s}return!n}}]),e}(),I=R;function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var F=function e(t,n){return t.reduce((function(t,i){return i.isLeaf?t.push(i):(!n&&t.push(i),t=t.concat(e(i.children,n))),t}),[])},B=function(){function e(t,n){P(this,e),this.config=n,this.initNodes(t)}return e.prototype.initNodes=function(e){var t=this;e=Object(m["coerceTruthyValueToArray"])(e),this.nodes=e.map((function(e){return new I(e,t.config)})),this.flattedNodes=this.getFlattedNodes(!1,!1),this.leafNodes=this.getFlattedNodes(!0,!1)},e.prototype.appendNode=function(e,t){var n=new I(e,this.config,t),i=t?t.children:this.nodes;i.push(n)},e.prototype.appendNodes=function(e,t){var n=this;e=Object(m["coerceTruthyValueToArray"])(e),e.forEach((function(e){return n.appendNode(e,t)}))},e.prototype.getNodes=function(){return this.nodes},e.prototype.getFlattedNodes=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e?this.leafNodes:this.flattedNodes;return t?n:F(this.nodes,e)},e.prototype.getNodeByValue=function(e){var t=this.getFlattedNodes(!1,!this.config.lazy).filter((function(t){return Object(m["valueEquals"])(t.path,e)||t.value===e}));return t&&t.length?t[0]:null},e}(),Y=B,H=n(9),j=n.n(H),U=n(40),z=n.n(U),V=n(31),$=n.n(V),G=Object.assign||function(e){for(var t=1;t0){var l=n.store.getNodeByValue(a);l.data[s]||n.lazyLoad(l,(function(){n.handleExpand(l)})),n.loadCount===n.checkedValue.length&&n.$parent.computePresentText()}}t&&t(i)};i.lazyLoad(e,r)},calculateMultiCheckedValue:function(){this.checkedValue=this.getCheckedNodes(this.leafOnly).map((function(e){return e.getValueByOption()}))},scrollIntoView:function(){if(!this.$isServer){var e=this.$refs.menu||[];e.forEach((function(e){var t=e.$el;if(t){var n=t.querySelector(".el-scrollbar__wrap"),i=t.querySelector(".el-cascader-node.is-active")||t.querySelector(".el-cascader-node.in-active-path");$()(n,i)}}))}},getNodeByValue:function(e){return this.store.getNodeByValue(e)},getFlattedNodes:function(e){var t=!this.config.lazy;return this.store.getFlattedNodes(e,t)},getCheckedNodes:function(e){var t=this.checkedValue,n=this.multiple;if(n){var i=this.getFlattedNodes(e);return i.filter((function(e){return e.checked}))}return this.isEmptyValue(t)?[]:[this.getNodeByValue(t)]},clearCheckedNodes:function(){var e=this.config,t=this.leafOnly,n=e.multiple,i=e.emitPath;n?(this.getCheckedNodes(t).filter((function(e){return!e.isDisabled})).forEach((function(e){return e.doCheck(!1)})),this.calculateMultiCheckedValue()):this.checkedValue=i?[]:null}}},te=ee,ne=Object(y["a"])(te,i,r,!1,null,null,null);ne.options.__file="packages/cascader-panel/src/cascader-panel.vue";var ie=ne.exports;ie.install=function(e){e.component(ie.name,ie)};t["default"]=ie},9:function(e,t){e.exports=n("7f4d")}})},4738:function(e,t,n){var i=n("da84"),r=n("d256"),a=n("1626"),o=n("94ca"),s=n("8925"),l=n("b622"),c=n("6069"),u=n("6c59"),d=n("c430"),h=n("2d00"),f=r&&r.prototype,p=l("species"),m=!1,_=a(i.PromiseRejectionEvent),g=o("Promise",(function(){var e=s(r),t=e!==String(r);if(!t&&66===h)return!0;if(d&&(!f["catch"]||!f["finally"]))return!0;if(!h||h<51||!/native code/.test(e)){var n=new r((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))},a=n.constructor={};if(a[p]=i,m=n.then((function(){}))instanceof i,!m)return!0}return!t&&(c||u)&&!_}));e.exports={CONSTRUCTOR:g,REJECTION_EVENT:_,SUBCLASSING:m}},4784:function(e,t,n){var i=n("3eba"),r=n("f706"),a=n("c8ef"),o=n("1687"),s=n("87c3"),l=i.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new r(a)},render:function(e,t,n){var i=e.getData(),r=this._symbolDraw;r.updateData(i),this.group.add(r.group)},updateTransform:function(e,t,n){var i=e.getData();this.group.dirty();var r=s().reset(e);r.progress&&r.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=o.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}});e.exports=l},4796:function(e,t){var n=Math.ceil,i=Math.max;function r(e,t,r,a){var o=-1,s=i(n((t-e)/(r||1)),0),l=Array(s);while(s--)l[a?s:++o]=e,e+=r;return l}e.exports=r},"47d0":function(e,t,n){!function(t,n){e.exports=n()}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FitAddon=void 0;var i=function(){function e(){}return e.prototype.activate=function(e){this._terminal=e},e.prototype.dispose=function(){},e.prototype.fit=function(){var e=this.proposeDimensions();if(e&&this._terminal){var t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}},e.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var e=this._terminal._core,t=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(t.getPropertyValue("height")),i=Math.max(0,parseInt(t.getPropertyValue("width"))),r=window.getComputedStyle(this._terminal.element),a=n-(parseInt(r.getPropertyValue("padding-top"))+parseInt(r.getPropertyValue("padding-bottom"))),o=i-(parseInt(r.getPropertyValue("padding-right"))+parseInt(r.getPropertyValue("padding-left")))-e.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(o/e._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(a/e._renderService.dimensions.actualCellHeight))}}},e}();t.FitAddon=i}])}))},"47f5":function(e,t,n){var i=n("2b03"),r=n("d9a8"),a=n("099a");function o(e,t,n){return t===t?a(e,t,n):i(e,r,n)}e.exports=o},"480e":function(e,t,n){var i=n("4e08"),r=(i.__DEV__,n("3eba")),a=n("2306"),o=n("cd84"),s=n("6d8b");function l(e,t,n){var i=e[1]-e[0];t=s.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}}));var r=t.length,a=0;return function(e){for(var i=a;i=0;i--){o=t[i].interval;if(o[0]<=e&&e<=o[1]){a=i;break}}return i>=0&&i=t[0]&&e<=t[1]}}function u(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var d=r.extendChartView({type:"heatmap",render:function(e,t,n){var i;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(i=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=e.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):u(r)&&this._renderOnGeo(r,e,i,n)},incrementalPrepareRender:function(e,t,n){this.group.removeAll()},incrementalRender:function(e,t,n,i){var r=t.coordinateSystem;r&&this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,n,i,r){var o,l,c=e.coordinateSystem;if("cartesian2d"===c.type){var u=c.getAxis("x"),d=c.getAxis("y");o=u.getBandWidth(),l=d.getBandWidth()}for(var h=this.group,f=e.getData(),p="itemStyle",m="emphasis.itemStyle",_="label",g="emphasis.label",v=e.getModel(p).getItemStyle(["color"]),y=e.getModel(m).getItemStyle(),b=e.getModel(_),S=e.getModel(g),x=c.type,w="cartesian2d"===x?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],E=n;E=0?i+=m:i-=m:b>=0?i-=m:i+=m}return i}function p(e,t){var n=[],a=i.quadraticSubdivide,s=[[],[],[]],l=[[],[]],c=[];t/=2,e.eachEdge((function(e,i){var u=e.getLayout(),d=e.getVisual("fromSymbol"),h=e.getVisual("toSymbol");u.__original||(u.__original=[r.clone(u[0]),r.clone(u[1])],u[2]&&u.__original.push(r.clone(u[2])));var p=u.__original;if(null!=u[2]){if(r.copy(s[0],p[0]),r.copy(s[1],p[2]),r.copy(s[2],p[1]),d&&"none"!==d){var m=o(e.node1),_=f(s,p[0],m*t);a(s[0][0],s[1][0],s[2][0],_,n),s[0][0]=n[3],s[1][0]=n[4],a(s[0][1],s[1][1],s[2][1],_,n),s[0][1]=n[3],s[1][1]=n[4]}if(h&&"none"!==h){m=o(e.node2),_=f(s,p[1],m*t);a(s[0][0],s[1][0],s[2][0],_,n),s[1][0]=n[1],s[2][0]=n[2],a(s[0][1],s[1][1],s[2][1],_,n),s[1][1]=n[1],s[2][1]=n[2]}r.copy(u[0],s[0]),r.copy(u[1],s[2]),r.copy(u[2],s[1])}else{if(r.copy(l[0],p[0]),r.copy(l[1],p[1]),r.sub(c,l[1],l[0]),r.normalize(c,c),d&&"none"!==d){m=o(e.node1);r.scaleAndAdd(l[0],l[0],c,m*t)}if(h&&"none"!==h){m=o(e.node2);r.scaleAndAdd(l[1],l[1],c,-m*t)}r.copy(u[0],l[0]),r.copy(u[1],l[1])}}))}e.exports=p},4840:function(e,t,n){var i=n("825a"),r=n("5087"),a=n("b622"),o=a("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||void 0==(n=i(a)[o])?t:r(n)}},"485a":function(e,t,n){var i=n("c65b"),r=n("1626"),a=n("861d"),o=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&r(n=e.toString)&&!a(s=i(n,e)))return s;if(r(n=e.valueOf)&&!a(s=i(n,e)))return s;if("string"!==t&&r(n=e.toString)&&!a(s=i(n,e)))return s;throw o("Can't convert object to primitive value")}},"485c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict"; +function t(e,t,n,i){var r={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?r[n][0]:r[n][1]}function n(e){var t=e.substr(0,e.indexOf(" "));return r(t)?"a "+e:"an "+e}function i(e){var t=e.substr(0,e.indexOf(" "));return r(t)?"viru "+e:"virun "+e}function r(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,n=e/10;return r(0===t?n:t)}if(e<1e4){while(e>=10)e/=10;return r(e)}return e/=1e3,r(e)}var a=e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:i,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},4411:function(e,t,n){for(var i=n("3eba"),r=n("55ac"),a=function(){},o=["treemapZoomToNode","treemapRender","treemapMove"],s=0;s0}e.exports=n},"44ad":function(e,t,n){var i=n("e330"),r=n("d039"),a=n("c6b6"),o=Object,s=i("".split);e.exports=r((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"==a(e)?s(e,""):o(e)}:o},"44b5":function(e,t){function n(e){const t=["from","maintainer","expose","env","arg","user","onbuild","stopsignal"];return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:t,contains:[e.HASH_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"\n \n '}else n||(this.hoverTimer=setTimeout(this.clearHoverZone,this.panel.config.hoverThreshold))},clearHoverZone:function(){var e=this.$refs.hoverZone;e&&(e.innerHTML="")},renderEmptyText:function(e){return e("div",{class:"el-cascader-menu__empty-text"},[this.t("el.cascader.noData")])},renderNodeList:function(e){var t=this.menuId,n=this.panel.isHoverMenu,i={on:{}};n&&(i.on.expand=this.handleExpand);var r=this.nodes.map((function(n,r){var a=n.hasChildren;return e("cascader-node",l()([{key:n.uid,attrs:{node:n,"node-id":t+"-"+r,"aria-haspopup":a,"aria-owns":a?t:null}},i]))}));return[].concat(r,[n?e("svg",{ref:"hoverZone",class:"el-cascader-menu__hover-zone"}):null])}},render:function(e){var t=this.isEmpty,n=this.menuId,i={nativeOn:{}};return this.panel.isHoverMenu&&(i.nativeOn.mousemove=this.handleMouseMove),e("el-scrollbar",l()([{attrs:{tag:"ul",role:"menu",id:n,"wrap-class":"el-cascader-menu__wrap","view-class":{"el-cascader-menu__list":!0,"is-empty":t}},class:"el-cascader-menu"},i]),[t?this.renderEmptyText(e):this.renderNodeList(e)])}},M=T,O=Object(y["a"])(M,S,x,!1,null,null,null);O.options.__file="packages/cascader-panel/src/cascader-menu.vue";var k=O.exports,D=n(21),L=function(){function e(e,t){for(var n=0;n1?t-1:0),i=1;i1?i-1:0),a=1;a0},e.prototype.syncCheckState=function(e){var t=this.getValueByOption(),n=this.isSameNode(e,t);this.doCheck(n)},e.prototype.doCheck=function(e){this.checked!==e&&(this.config.checkStrictly?this.checked=e:(this.broadcast("check",e),this.setCheckState(e),this.emit("check")))},L(e,[{key:"isDisabled",get:function(){var e=this.data,t=this.parent,n=this.config,i=n.disabled,r=n.checkStrictly;return e[i]||!r&&t&&t.isDisabled}},{key:"isLeaf",get:function(){var e=this.data,t=this.loaded,n=this.hasChildren,i=this.children,r=this.config,a=r.lazy,o=r.leaf;if(a){var s=Object(D["isDef"])(e[o])?e[o]:!!t&&!i.length;return this.hasChildren=!s,s}return!n}}]),e}(),I=R;function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var F=function e(t,n){return t.reduce((function(t,i){return i.isLeaf?t.push(i):(!n&&t.push(i),t=t.concat(e(i.children,n))),t}),[])},B=function(){function e(t,n){P(this,e),this.config=n,this.initNodes(t)}return e.prototype.initNodes=function(e){var t=this;e=Object(m["coerceTruthyValueToArray"])(e),this.nodes=e.map((function(e){return new I(e,t.config)})),this.flattedNodes=this.getFlattedNodes(!1,!1),this.leafNodes=this.getFlattedNodes(!0,!1)},e.prototype.appendNode=function(e,t){var n=new I(e,this.config,t),i=t?t.children:this.nodes;i.push(n)},e.prototype.appendNodes=function(e,t){var n=this;e=Object(m["coerceTruthyValueToArray"])(e),e.forEach((function(e){return n.appendNode(e,t)}))},e.prototype.getNodes=function(){return this.nodes},e.prototype.getFlattedNodes=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e?this.leafNodes:this.flattedNodes;return t?n:F(this.nodes,e)},e.prototype.getNodeByValue=function(e){var t=this.getFlattedNodes(!1,!this.config.lazy).filter((function(t){return Object(m["valueEquals"])(t.path,e)||t.value===e}));return t&&t.length?t[0]:null},e}(),Y=B,H=n(9),j=n.n(H),U=n(40),z=n.n(U),V=n(31),$=n.n(V),G=Object.assign||function(e){for(var t=1;t0){var l=n.store.getNodeByValue(a);l.data[s]||n.lazyLoad(l,(function(){n.handleExpand(l)})),n.loadCount===n.checkedValue.length&&n.$parent.computePresentText()}}t&&t(i)};i.lazyLoad(e,r)},calculateMultiCheckedValue:function(){this.checkedValue=this.getCheckedNodes(this.leafOnly).map((function(e){return e.getValueByOption()}))},scrollIntoView:function(){if(!this.$isServer){var e=this.$refs.menu||[];e.forEach((function(e){var t=e.$el;if(t){var n=t.querySelector(".el-scrollbar__wrap"),i=t.querySelector(".el-cascader-node.is-active")||t.querySelector(".el-cascader-node.in-active-path");$()(n,i)}}))}},getNodeByValue:function(e){return this.store.getNodeByValue(e)},getFlattedNodes:function(e){var t=!this.config.lazy;return this.store.getFlattedNodes(e,t)},getCheckedNodes:function(e){var t=this.checkedValue,n=this.multiple;if(n){var i=this.getFlattedNodes(e);return i.filter((function(e){return e.checked}))}return this.isEmptyValue(t)?[]:[this.getNodeByValue(t)]},clearCheckedNodes:function(){var e=this.config,t=this.leafOnly,n=e.multiple,i=e.emitPath;n?(this.getCheckedNodes(t).filter((function(e){return!e.isDisabled})).forEach((function(e){return e.doCheck(!1)})),this.calculateMultiCheckedValue()):this.checkedValue=i?[]:null}}},te=ee,ne=Object(y["a"])(te,i,r,!1,null,null,null);ne.options.__file="packages/cascader-panel/src/cascader-panel.vue";var ie=ne.exports;ie.install=function(e){e.component(ie.name,ie)};t["default"]=ie},9:function(e,t){e.exports=n("7f4d")}})},4738:function(e,t,n){var i=n("da84"),r=n("d256"),a=n("1626"),o=n("94ca"),s=n("8925"),l=n("b622"),c=n("6069"),u=n("6c59"),d=n("c430"),h=n("2d00"),f=r&&r.prototype,p=l("species"),m=!1,_=a(i.PromiseRejectionEvent),g=o("Promise",(function(){var e=s(r),t=e!==String(r);if(!t&&66===h)return!0;if(d&&(!f["catch"]||!f["finally"]))return!0;if(!h||h<51||!/native code/.test(e)){var n=new r((function(e){e(1)})),i=function(e){e((function(){}),(function(){}))},a=n.constructor={};if(a[p]=i,m=n.then((function(){}))instanceof i,!m)return!0}return!t&&(c||u)&&!_}));e.exports={CONSTRUCTOR:g,REJECTION_EVENT:_,SUBCLASSING:m}},4784:function(e,t,n){var i=n("3eba"),r=n("f706"),a=n("c8ef"),o=n("1687"),s=n("87c3"),l=i.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new r(a)},render:function(e,t,n){var i=e.getData(),r=this._symbolDraw;r.updateData(i),this.group.add(r.group)},updateTransform:function(e,t,n){var i=e.getData();this.group.dirty();var r=s().reset(e);r.progress&&r.progress({start:0,end:i.count()},i),this._symbolDraw.updateLayout(i)},_updateGroupTransform:function(e){var t=e.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=o.clone(t.getRoamTransform()),this.group.decomposeTransform())},remove:function(e,t){this._symbolDraw&&this._symbolDraw.remove(t)},dispose:function(){}});e.exports=l},4796:function(e,t){var n=Math.ceil,i=Math.max;function r(e,t,r,a){var o=-1,s=i(n((t-e)/(r||1)),0),l=Array(s);while(s--)l[a?s:++o]=e,e+=r;return l}e.exports=r},"47d0":function(e,t,n){!function(t,n){e.exports=n()}(window,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FitAddon=void 0;var i=function(){function e(){}return e.prototype.activate=function(e){this._terminal=e},e.prototype.dispose=function(){},e.prototype.fit=function(){var e=this.proposeDimensions();if(e&&this._terminal){var t=this._terminal._core;this._terminal.rows===e.rows&&this._terminal.cols===e.cols||(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}},e.prototype.proposeDimensions=function(){if(this._terminal&&this._terminal.element&&this._terminal.element.parentElement){var e=this._terminal._core,t=window.getComputedStyle(this._terminal.element.parentElement),n=parseInt(t.getPropertyValue("height")),i=Math.max(0,parseInt(t.getPropertyValue("width"))),r=window.getComputedStyle(this._terminal.element),a=n-(parseInt(r.getPropertyValue("padding-top"))+parseInt(r.getPropertyValue("padding-bottom"))),o=i-(parseInt(r.getPropertyValue("padding-right"))+parseInt(r.getPropertyValue("padding-left")))-e.viewport.scrollBarWidth;return{cols:Math.max(2,Math.floor(o/e._renderService.dimensions.actualCellWidth)),rows:Math.max(1,Math.floor(a/e._renderService.dimensions.actualCellHeight))}}},e}();t.FitAddon=i}])}))},"47f5":function(e,t,n){var i=n("2b03"),r=n("d9a8"),a=n("099a");function o(e,t,n){return t===t?a(e,t,n):i(e,r,n)}e.exports=o},"480e":function(e,t,n){var i=n("4e08"),r=(i.__DEV__,n("3eba")),a=n("2306"),o=n("cd84"),s=n("6d8b");function l(e,t,n){var i=e[1]-e[0];t=s.map(t,(function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}}));var r=t.length,a=0;return function(e){for(var i=a;i=0;i--){o=t[i].interval;if(o[0]<=e&&e<=o[1]){a=i;break}}return i>=0&&i=t[0]&&e<=t[1]}}function u(e){var t=e.dimensions;return"lng"===t[0]&&"lat"===t[1]}var d=r.extendChartView({type:"heatmap",render:function(e,t,n){var i;t.eachComponent("visualMap",(function(t){t.eachTargetSeries((function(n){n===e&&(i=t)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=e.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(e,n,0,e.getData().count()):u(r)&&this._renderOnGeo(r,e,i,n)},incrementalPrepareRender:function(e,t,n){this.group.removeAll()},incrementalRender:function(e,t,n,i){var r=t.coordinateSystem;r&&this._renderOnCartesianAndCalendar(t,i,e.start,e.end,!0)},_renderOnCartesianAndCalendar:function(e,t,n,i,r){var o,l,c=e.coordinateSystem;if("cartesian2d"===c.type){var u=c.getAxis("x"),d=c.getAxis("y");o=u.getBandWidth(),l=d.getBandWidth()}for(var h=this.group,f=e.getData(),p="itemStyle",m="emphasis.itemStyle",_="label",g="emphasis.label",v=e.getModel(p).getItemStyle(["color"]),y=e.getModel(m).getItemStyle(),b=e.getModel(_),S=e.getModel(g),x=c.type,w="cartesian2d"===x?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],E=n;E=0?i+=m:i-=m:b>=0?i-=m:i+=m}return i}function p(e,t){var n=[],a=i.quadraticSubdivide,s=[[],[],[]],l=[[],[]],c=[];t/=2,e.eachEdge((function(e,i){var u=e.getLayout(),d=e.getVisual("fromSymbol"),h=e.getVisual("toSymbol");u.__original||(u.__original=[r.clone(u[0]),r.clone(u[1])],u[2]&&u.__original.push(r.clone(u[2])));var p=u.__original;if(null!=u[2]){if(r.copy(s[0],p[0]),r.copy(s[1],p[2]),r.copy(s[2],p[1]),d&&"none"!==d){var m=o(e.node1),_=f(s,p[0],m*t);a(s[0][0],s[1][0],s[2][0],_,n),s[0][0]=n[3],s[1][0]=n[4],a(s[0][1],s[1][1],s[2][1],_,n),s[0][1]=n[3],s[1][1]=n[4]}if(h&&"none"!==h){m=o(e.node2),_=f(s,p[1],m*t);a(s[0][0],s[1][0],s[2][0],_,n),s[1][0]=n[1],s[2][0]=n[2],a(s[0][1],s[1][1],s[2][1],_,n),s[1][1]=n[1],s[2][1]=n[2]}r.copy(u[0],s[0]),r.copy(u[1],s[2]),r.copy(u[2],s[1])}else{if(r.copy(l[0],p[0]),r.copy(l[1],p[1]),r.sub(c,l[1],l[0]),r.normalize(c,c),d&&"none"!==d){m=o(e.node1);r.scaleAndAdd(l[0],l[0],c,m*t)}if(h&&"none"!==h){m=o(e.node2);r.scaleAndAdd(l[1],l[1],c,-m*t)}r.copy(u[0],l[0]),r.copy(u[1],l[1])}}))}e.exports=p},4840:function(e,t,n){var i=n("825a"),r=n("5087"),a=n("b622"),o=a("species");e.exports=function(e,t){var n,a=i(e).constructor;return void 0===a||void 0==(n=i(a)[o])?t:r(n)}},"485a":function(e,t,n){var i=n("c65b"),r=n("1626"),a=n("861d"),o=TypeError;e.exports=function(e,t){var n,s;if("string"===t&&r(n=e.toString)&&!a(s=i(n,e)))return s;if(r(n=e.valueOf)&&!a(s=i(n,e)))return s;if("string"!==t&&r(n=e.toString)&&!a(s=i(n,e)))return s;throw o("Can't convert object to primitive value")}},"485c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict"; //! moment.js locale configuration var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},n=e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10,i=e%100-n,r=e>=100?100:null;return e+(t[n]||t[i]||t[r])},week:{dow:1,doy:7}});return n}))},"485f":function(e,t){function n(e){const t=e.regex,n={className:"params",begin:"\\(",end:"\\)"},i={variants:[e.COMMENT("!","$",{relevance:0}),e.COMMENT("^C[ ]","$",{relevance:0}),e.COMMENT("^C$","$",{relevance:0})]},r=/(_[a-z_\d]+)?/,a=/([de][+-]?\d+)?/,o={className:"number",variants:[{begin:t.concat(/\b\d+/,/\.(\d*)/,a,r)},{begin:t.concat(/\b\d+/,a,r)},{begin:t.concat(/\.\d+/,a,r)}],relevance:0},s={className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,n]},l={className:"string",relevance:0,variants:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},c=["kind","do","concurrent","local","shared","while","private","call","intrinsic","where","elsewhere","type","endtype","endmodule","endselect","endinterface","end","enddo","endif","if","forall","endforall","only","contains","default","return","stop","then","block","endblock","endassociate","public","subroutine|10","function","program",".and.",".or.",".not.",".le.",".eq.",".ge.",".gt.",".lt.","goto","save","else","use","module","select","case","access","blank","direct","exist","file","fmt","form","formatted","iostat","name","named","nextrec","number","opened","rec","recl","sequential","status","unformatted","unit","continue","format","pause","cycle","exit","c_null_char","c_alert","c_backspace","c_form_feed","flush","wait","decimal","round","iomsg","synchronous","nopass","non_overridable","pass","protected","volatile","abstract","extends","import","non_intrinsic","value","deferred","generic","final","enumerator","class","associate","bind","enum","c_int","c_short","c_long","c_long_long","c_signed_char","c_size_t","c_int8_t","c_int16_t","c_int32_t","c_int64_t","c_int_least8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_fast8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_intmax_t","C_intptr_t","c_float","c_double","c_long_double","c_float_complex","c_double_complex","c_long_double_complex","c_bool","c_char","c_null_ptr","c_null_funptr","c_new_line","c_carriage_return","c_horizontal_tab","c_vertical_tab","iso_c_binding","c_loc","c_funloc","c_associated","c_f_pointer","c_ptr","c_funptr","iso_fortran_env","character_storage_size","error_unit","file_storage_size","input_unit","iostat_end","iostat_eor","numeric_storage_size","output_unit","c_f_procpointer","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","newunit","contiguous","recursive","pad","position","action","delim","readwrite","eor","advance","nml","interface","procedure","namelist","include","sequence","elemental","pure","impure","integer","real","character","complex","logical","codimension","dimension","allocatable|10","parameter","external","implicit|10","none","double","precision","assign","intent","optional","pointer","target","in","out","common","equivalence","data"],u=[".False.",".True."],d=["alog","alog10","amax0","amax1","amin0","amin1","amod","cabs","ccos","cexp","clog","csin","csqrt","dabs","dacos","dasin","datan","datan2","dcos","dcosh","ddim","dexp","dint","dlog","dlog10","dmax1","dmin1","dmod","dnint","dsign","dsin","dsinh","dsqrt","dtan","dtanh","float","iabs","idim","idint","idnint","ifix","isign","max0","max1","min0","min1","sngl","algama","cdabs","cdcos","cdexp","cdlog","cdsin","cdsqrt","cqabs","cqcos","cqexp","cqlog","cqsin","cqsqrt","dcmplx","dconjg","derf","derfc","dfloat","dgamma","dimag","dlgama","iqint","qabs","qacos","qasin","qatan","qatan2","qcmplx","qconjg","qcos","qcosh","qdim","qerf","qerfc","qexp","qgamma","qimag","qlgama","qlog","qlog10","qmax1","qmin1","qmod","qnint","qsign","qsin","qsinh","qsqrt","qtan","qtanh","abs","acos","aimag","aint","anint","asin","atan","atan2","char","cmplx","conjg","cos","cosh","exp","ichar","index","int","log","log10","max","min","nint","sign","sin","sinh","sqrt","tan","tanh","print","write","dim","lge","lgt","lle","llt","mod","nullify","allocate","deallocate","adjustl","adjustr","all","allocated","any","associated","bit_size","btest","ceiling","count","cshift","date_and_time","digits","dot_product","eoshift","epsilon","exponent","floor","fraction","huge","iand","ibclr","ibits","ibset","ieor","ior","ishft","ishftc","lbound","len_trim","matmul","maxexponent","maxloc","maxval","merge","minexponent","minloc","minval","modulo","mvbits","nearest","pack","present","product","radix","random_number","random_seed","range","repeat","reshape","rrspacing","scale","scan","selected_int_kind","selected_real_kind","set_exponent","shape","size","spacing","spread","sum","system_clock","tiny","transpose","trim","ubound","unpack","verify","achar","iachar","transfer","dble","entry","dprod","cpu_time","command_argument_count","get_command","get_command_argument","get_environment_variable","is_iostat_end","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","is_iostat_eor","move_alloc","new_line","selected_char_kind","same_type_as","extends_type_of","acosh","asinh","atanh","bessel_j0","bessel_j1","bessel_jn","bessel_y0","bessel_y1","bessel_yn","erf","erfc","erfc_scaled","gamma","log_gamma","hypot","norm2","atomic_define","atomic_ref","execute_command_line","leadz","trailz","storage_size","merge_bits","bge","bgt","ble","blt","dshiftl","dshiftr","findloc","iall","iany","iparity","image_index","lcobound","ucobound","maskl","maskr","num_images","parity","popcnt","poppar","shifta","shiftl","shiftr","this_image","sync","change","team","co_broadcast","co_max","co_min","co_sum","co_reduce"];return{name:"Fortran",case_insensitive:!0,aliases:["f90","f95"],keywords:{keyword:c,literal:u,built_in:d},illegal:/\/\*/,contains:[l,s,{begin:/^C\s*=(?!=)/,relevance:0},i,o]}}e.exports=n},4897:function(e,t,n){"use strict";t.__esModule=!0,t.i18n=t.use=t.t=void 0;var i=n("f0d9"),r=d(i),a=n("a026"),o=d(a),s=n("3c4e"),l=d(s),c=n("9d7e"),u=d(c);function d(e){return e&&e.__esModule?e:{default:e}}var h=(0,u.default)(o.default),f=r.default,p=!1,m=function(){var e=Object.getPrototypeOf(this||o.default).$t;if("function"===typeof e&&o.default.locale)return p||(p=!0,o.default.locale(o.default.config.lang,(0,l.default)(f,o.default.locale(o.default.config.lang)||{},{clone:!0}))),e.apply(this,arguments)},_=t.t=function(e,t){var n=m.apply(this,arguments);if(null!==n&&void 0!==n)return n;for(var i=e.split("."),r=f,a=0,o=i.length;at[0]&&(t=t.slice().reverse());var i=e.coordToPoint([t[0],n]),r=e.coordToPoint([t[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function u(e){var t=e.getRadiusAxis();return t.inverse?0:1}function d(e){var t=e[0],n=e[e.length-1];t&&n&&Math.abs(Math.abs(t.coord-n.coord)-360)<1e-4&&e.pop()}var h=o.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var n=e.axis,r=n.polar,a=r.getRadiusAxis().getExtent(),o=n.getTicksCoords(),s=n.getMinorTicksCoords(),c=i.map(n.getViewLabels(),(function(e){e=i.clone(e);return e.coord=n.dataToCoord(e.tickValue),e}));d(c),d(o),i.each(l,(function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,r,o,s,a,c)}),this)}},_axisLine:function(e,t,n,i,a){var o,s=e.getModel("axisLine.lineStyle"),l=u(t),c=l?0:1;o=0===a[c]?new r.Circle({shape:{cx:t.cx,cy:t.cy,r:a[l]},style:s.getLineStyle(),z2:1,silent:!0}):new r.Ring({shape:{cx:t.cx,cy:t.cy,r:a[l],r0:a[c]},style:s.getLineStyle(),z2:1,silent:!0}),o.style.fill=null,this.group.add(o)},_axisTick:function(e,t,n,a,o){var s=e.getModel("axisTick"),l=(s.get("inside")?-1:1)*s.get("length"),d=o[u(t)],h=i.map(n,(function(e){return new r.Line({shape:c(t,[d,d+l],e.coord)})}));this.group.add(r.mergePath(h,{style:i.defaults(s.getModel("lineStyle").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})}))},_minorTick:function(e,t,n,a,o){if(a.length){for(var s=e.getModel("axisTick"),l=e.getModel("minorTick"),d=(s.get("inside")?-1:1)*l.get("length"),h=o[u(t)],f=[],p=0;pg?"left":"right",b=Math.abs(_[1]-v)/m<.3?"middle":_[1]>v?"top":"bottom";d&&d[c]&&d[c].textStyle&&(o=new a(d[c].textStyle,h,h.ecModel));var S=new r.Text({silent:s.isLabelSilent(e)});this.group.add(S),r.setTextStyle(S.style,o,{x:_[0],y:_[1],textFill:o.getTextColor()||e.get("axisLine.lineStyle.color"),text:n.formattedLabel,textAlign:y,textVerticalAlign:b}),p&&(S.eventData=s.makeAxisEventDataBase(e),S.eventData.targetType="axisLabel",S.eventData.value=n.rawLabel)}),this)},_splitLine:function(e,t,n,a,o){var s=e.getModel("splitLine"),l=s.getModel("lineStyle"),u=l.get("color"),d=0;u=u instanceof Array?u:[u];for(var h=[],f=0;f0?i:n)(t)}},b469:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict"; //! moment.js locale configuration -function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}var n=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},b4b0:function(e,t,n){var i=n("8d74"),r=n("1a8c"),a=n("ffd6"),o=NaN,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;function d(e){if("number"==typeof e)return e;if(a(e))return o;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=l.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):s.test(e)?o:+e}e.exports=d},b4c0:function(e,t,n){var i=n("cb5a");function r(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}e.exports=r},b4f8:function(e,t,n){var i=n("23e7"),r=n("d066"),a=n("1a2d"),o=n("577e"),s=n("5692"),l=n("3d87"),c=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=o(e);if(a(c,t))return c[t];var n=r("Symbol")(t);return c[t]=n,u[n]=t,n}})},b50d:function(e,t,n){"use strict";var i=n("c532"),r=n("467f"),a=n("7aac"),o=n("30b5"),s=n("83b9"),l=n("c345"),c=n("3934"),u=n("cafa"),d=n("7917"),h=n("fb60"),f=n("b68a");e.exports=function(e){return new Promise((function(t,n){var p,m=e.data,_=e.headers,g=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}i.isFormData(m)&&i.isStandardBrowserEnv()&&delete _["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";_.Authorization="Basic "+btoa(b+":"+S)}var x=s(e.baseURL,e.url);function w(){if(y){var i="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,a=g&&"text"!==g&&"json"!==g?y.response:y.responseText,o={data:a,status:y.status,statusText:y.statusText,headers:i,config:e,request:y};r((function(e){t(e),v()}),(function(e){n(e),v()}),o),y=null}}if(y.open(e.method.toUpperCase(),o(x,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(w)},y.onabort=function(){y&&(n(new d("Request aborted",d.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,i.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,y)),y=null},i.isStandardBrowserEnv()){var E=(e.withCredentials||c(x))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;E&&(_[e.xsrfHeaderName]=E)}"setRequestHeader"in y&&i.forEach(_,(function(e,t){"undefined"===typeof m&&"content-type"===t.toLowerCase()?delete _[t]:y.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),g&&"json"!==g&&(y.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){y&&(n(!e||e&&e.type?new h:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),m||(m=null);var C=f(x);C&&-1===["http","https","file"].indexOf(C)?n(new d("Unsupported protocol "+C+":",d.ERR_BAD_REQUEST,e)):y.send(m)}))}},b50e:function(e,t,n){"use strict";var i=n("6f9c"),r=n("17d5").Graph;function a(e,t,n,r){var a;do{a=i.uniqueId(r)}while(e.hasNode(a));return n.dummy=t,e.setNode(a,n),a}function o(e){var t=(new r).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})})),t}function s(e){var t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t}function l(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)}function c(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)}function u(e,t){var n,i,r=e.x,a=e.y,o=t.x-r,s=t.y-a,l=e.width/2,c=e.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),n=c*o/s,i=c):(o<0&&(l=-l),n=l,i=l*s/o),{x:r+n,y:a+i}}function d(e){var t=i.map(i.range(m(e)+1),(function(){return[]}));return i.forEach(e.nodes(),(function(n){var r=e.node(n),a=r.rank;i.isUndefined(a)||(t[a][r.order]=n)})),t}function h(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank})));i.forEach(e.nodes(),(function(n){var r=e.node(n);i.has(r,"rank")&&(r.rank-=t)}))}function f(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];i.forEach(e.nodes(),(function(i){var r=e.node(i).rank-t;n[r]||(n[r]=[]),n[r].push(i)}));var r=0,a=e.graph().nodeRankFactor;i.forEach(n,(function(t,n){i.isUndefined(t)&&n%a!==0?--r:r&&i.forEach(t,(function(t){e.node(t).rank+=r}))}))}function p(e,t,n,i){var r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=i),a(e,"border",r,t)}function m(e){return i.max(i.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!i.isUndefined(n))return n})))}function _(e,t){var n={lhs:[],rhs:[]};return i.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n}function g(e,t){var n=i.now();try{return t()}finally{console.log(e+" time: "+(i.now()-n)+"ms")}}function v(e,t){return t()}e.exports={addDummyNode:a,simplify:o,asNonCompoundGraph:s,successorWeights:l,predecessorWeights:c,intersectRect:u,buildLayerMatrix:d,normalizeRanks:h,removeEmptyRanks:f,addBorderNode:p,maxRank:m,partition:_,time:g,notime:v}},b528:function(e,t){function n(e){const t=e.regex,n=/^[a-zA-Z][a-zA-Z0-9-]*/,i=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],r=e.COMMENT(/;/,/$/),a={scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},o={scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},s={scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},l={scope:"symbol",match:/%[si](?=".*")/},c={scope:"attribute",match:t.concat(n,/(?=\s*=)/)},u={scope:"operator",match:/=\/?/};return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:i,contains:[u,c,r,a,o,s,l,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}e.exports=n},b53d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict"; +function t(e,t,n,i){var r={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?r[n][0]:r[n][1]}var n=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},b4b0:function(e,t,n){var i=n("8d74"),r=n("1a8c"),a=n("ffd6"),o=NaN,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;function d(e){if("number"==typeof e)return e;if(a(e))return o;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=i(e);var n=l.test(e);return n||c.test(e)?u(e.slice(2),n?2:8):s.test(e)?o:+e}e.exports=d},b4c0:function(e,t,n){var i=n("cb5a");function r(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}e.exports=r},b4f8:function(e,t,n){var i=n("23e7"),r=n("d066"),a=n("1a2d"),o=n("577e"),s=n("5692"),l=n("3d87"),c=s("string-to-symbol-registry"),u=s("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=o(e);if(a(c,t))return c[t];var n=r("Symbol")(t);return c[t]=n,u[n]=t,n}})},b50d:function(e,t,n){"use strict";var i=n("c532"),r=n("467fa"),a=n("7aac"),o=n("30b5"),s=n("83b9"),l=n("c345"),c=n("3934"),u=n("cafa"),d=n("7917"),h=n("fb60"),f=n("b68a");e.exports=function(e){return new Promise((function(t,n){var p,m=e.data,_=e.headers,g=e.responseType;function v(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}i.isFormData(m)&&i.isStandardBrowserEnv()&&delete _["Content-Type"];var y=new XMLHttpRequest;if(e.auth){var b=e.auth.username||"",S=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";_.Authorization="Basic "+btoa(b+":"+S)}var x=s(e.baseURL,e.url);function w(){if(y){var i="getAllResponseHeaders"in y?l(y.getAllResponseHeaders()):null,a=g&&"text"!==g&&"json"!==g?y.response:y.responseText,o={data:a,status:y.status,statusText:y.statusText,headers:i,config:e,request:y};r((function(e){t(e),v()}),(function(e){n(e),v()}),o),y=null}}if(y.open(e.method.toUpperCase(),o(x,e.params,e.paramsSerializer),!0),y.timeout=e.timeout,"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(w)},y.onabort=function(){y&&(n(new d("Request aborted",d.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new d("Network Error",d.ERR_NETWORK,e,y,y)),y=null},y.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",i=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new d(t,i.clarifyTimeoutError?d.ETIMEDOUT:d.ECONNABORTED,e,y)),y=null},i.isStandardBrowserEnv()){var E=(e.withCredentials||c(x))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;E&&(_[e.xsrfHeaderName]=E)}"setRequestHeader"in y&&i.forEach(_,(function(e,t){"undefined"===typeof m&&"content-type"===t.toLowerCase()?delete _[t]:y.setRequestHeader(t,e)})),i.isUndefined(e.withCredentials)||(y.withCredentials=!!e.withCredentials),g&&"json"!==g&&(y.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&y.addEventListener("progress",e.onDownloadProgress),"function"===typeof e.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){y&&(n(!e||e&&e.type?new h:e),y.abort(),y=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),m||(m=null);var C=f(x);C&&-1===["http","https","file"].indexOf(C)?n(new d("Unsupported protocol "+C+":",d.ERR_BAD_REQUEST,e)):y.send(m)}))}},b50e:function(e,t,n){"use strict";var i=n("6f9c"),r=n("17d5").Graph;function a(e,t,n,r){var a;do{a=i.uniqueId(r)}while(e.hasNode(a));return n.dummy=t,e.setNode(a,n),a}function o(e){var t=(new r).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){var i=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:i.weight+r.weight,minlen:Math.max(i.minlen,r.minlen)})})),t}function s(e){var t=new r({multigraph:e.isMultigraph()}).setGraph(e.graph());return i.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),i.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t}function l(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)}function c(e){var t=i.map(e.nodes(),(function(t){var n={};return i.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return i.zipObject(e.nodes(),t)}function u(e,t){var n,i,r=e.x,a=e.y,o=t.x-r,s=t.y-a,l=e.width/2,c=e.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*l>Math.abs(o)*c?(s<0&&(c=-c),n=c*o/s,i=c):(o<0&&(l=-l),n=l,i=l*s/o),{x:r+n,y:a+i}}function d(e){var t=i.map(i.range(m(e)+1),(function(){return[]}));return i.forEach(e.nodes(),(function(n){var r=e.node(n),a=r.rank;i.isUndefined(a)||(t[a][r.order]=n)})),t}function h(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank})));i.forEach(e.nodes(),(function(n){var r=e.node(n);i.has(r,"rank")&&(r.rank-=t)}))}function f(e){var t=i.min(i.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];i.forEach(e.nodes(),(function(i){var r=e.node(i).rank-t;n[r]||(n[r]=[]),n[r].push(i)}));var r=0,a=e.graph().nodeRankFactor;i.forEach(n,(function(t,n){i.isUndefined(t)&&n%a!==0?--r:r&&i.forEach(t,(function(t){e.node(t).rank+=r}))}))}function p(e,t,n,i){var r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=i),a(e,"border",r,t)}function m(e){return i.max(i.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!i.isUndefined(n))return n})))}function _(e,t){var n={lhs:[],rhs:[]};return i.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n}function g(e,t){var n=i.now();try{return t()}finally{console.log(e+" time: "+(i.now()-n)+"ms")}}function v(e,t){return t()}e.exports={addDummyNode:a,simplify:o,asNonCompoundGraph:s,successorWeights:l,predecessorWeights:c,intersectRect:u,buildLayerMatrix:d,normalizeRanks:h,removeEmptyRanks:f,addBorderNode:p,maxRank:m,partition:_,time:g,notime:v}},b528:function(e,t){function n(e){const t=e.regex,n=/^[a-zA-Z][a-zA-Z0-9-]*/,i=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],r=e.COMMENT(/;/,/$/),a={scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},o={scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},s={scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},l={scope:"symbol",match:/%[si](?=".*")/},c={scope:"attribute",match:t.concat(n,/(?=\s*=)/)},u={scope:"operator",match:/=\/?/};return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:i,contains:[u,c,r,a,o,s,l,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}e.exports=n},b53d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict"; //! moment.js locale configuration var t=e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return t}))},b540:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict"; //! moment.js locale configuration diff --git a/client/dist/static/js/error.548e59de.js b/client/dist/static/js/error.4fba0b14.js similarity index 100% rename from client/dist/static/js/error.548e59de.js rename to client/dist/static/js/error.4fba0b14.js diff --git a/client/dist/static/js/index.1b46a0b8.js b/client/dist/static/js/index.1b46a0b8.js deleted file mode 100644 index f0824826..00000000 --- a/client/dist/static/js/index.1b46a0b8.js +++ /dev/null @@ -1 +0,0 @@ -(function(e){function t(t){for(var o,r,l=t[0],n=t[1],c=t[2],m=0,u=[];m0&&(t.configModal.model.base_image_id=t.baseImageList[0].id)})).catch((function(e){o.hide(),t.closeConfigModal(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}));case 6:case"end":return a.stop()}}),a)})))()},configServer:function(e){for(var t in this.configModal.show=!0,this.getTemplateList(),this.getGroupList(),this.getServerConfig(e),this.batchEditConf.itemEnable=Object(F["a"])({},oe),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[t]=!0},batchConfigServer:function(){var e=this.serverList.filter((function(e){return!0===e.isChecked})).map((function(e,t){return e.id}));if(1!=e.length)for(var t in this.configModal.show=!0,this.batchEditConf.show=!1,this.getTemplateList(),this.getGroupList(),this.configModal.model=Object(F["a"])({},oe),this.configModal.model.id=e,this.batchEditConf.itemEnable=Object(F["a"])({},oe),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[t]=!1;else this.configServer(e[0])},saveConfig:function(e){var t=this;if(this.$refs.configForm.validate()){if(!e)for(var a in this.batchEditConf.itemEnable.id=!0,this.configModal.model.enable_group&&(this.batchEditConf.itemEnable.ip_group_name=!0),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[a]||delete this.configModal.model[a];this.configModal.model.run_type_bool?this.configModal.model.run_type="":this.configModal.model.run_type="container";var o=e?"/server/api/update_server":"/server/api/batch_update_server",s=this.$Loading.show();this.$ajax.postJSON(o,Object(F["a"])({isBak:this.configModal.model.bak_flag},this.configModal.model)).then((function(e){s.hide(),t.getServerList(),t.closeConfigModal(),t.$tip.success(t.$t("serverList.restart.success"))})).catch((function(e){s.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.message||e.err_msg))}))}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1,this.batchEditConf.show=!0,this.configModal.model=null},checkTaskStatus:function(e,t){var a=this;return new Promise((function(o,s){a.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(t){1===t.status||0===t.status?setTimeout((function(){o(a.checkTaskStatus(e))}),3e3):2===t.status?o("taskid: ".concat(t.task_no)):s(new Error("taskid: ".concat(t.task_no)))})).catch((function(i){t?s(new Error(i.err_msg||i.message||a.$t("common.networkErr"))):setTimeout((function(){o(a.checkTaskStatus(e,!0))}),3e3)}))}))},updateFlowStatus:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.postJSON("/server/api/update_flowstatus",{server_id:e,status:t,node_list:[a]}).then((function(e){s.hide(),o.getServerList(),o.$t("common.success")})).catch((function(e){s.hide(),o.getServerList(),o.$tip.error({title:"update flow status fail.",message:e.err_msg||e.message||o.$t("common.networkErr")})}))},addTask:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!0,items:[{server_id:e,command:t}]}).then((function(e){return o.checkTaskStatus(e).then((function(e){s.hide(),o.getServerList(),o.$tip.success({title:a.success,message:e})})).catch((function(e){throw e}))})).catch((function(e){s.hide(),o.getServerList(),o.$tip.error({title:a.error,message:e.err_msg||e.message||o.$t("common.networkErr")})}))},restartServer:function(e){this.addTask(e,"restart",{success:this.$t("serverList.restart.success"),error:this.$t("serverList.restart.failed")})},stopServer:function(e){var t=this;this.$confirm(this.$t("serverList.stopService.msg.stopService"),this.$t("common.alert")).then((function(){t.addTask(e,"stop",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")})}))},undeployServer:function(e){var t=this;"active"===e.present_state?this.$tip.error("".concat(this.$t("serverList.tips.undeploy"))):this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then((function(){t.addTask(e.id,"undeploy_tars",{success:t.$t("serverList.undeploy.success"),error:t.$t("serverList.undeploy.failed")})}))},undeployServers:function(e){var t=this,a=e.filter((function(e){return"active"===e.present_state}));a.length>0?this.$tip.error("".concat(this.$t("serverList.tips.undeploy"))):this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then((function(){e.forEach((function(e){t.addTask(e.id,"undeploy_tars",{success:t.$t("serverList.undeploy.success"),error:t.$t("serverList.undeploy.failed")})}))}))},manageServant:function(e){var t=this;this.servantModal.show=!0;var a=this.$loading.show();this.$ajax.getJSON("/server/api/adapter_conf_list",{id:e.id}).then((function(o){a.hide(),t.servantModal.model=o,t.servantModal.currentServer=e})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},closeServantModal:function(){this.servantModal.show=!1,this.servantModal.model=null,this.servantModal.currentServer=null},configServant:function(e){if(this.servantDetailModal.model={application:this.servantModal.currentServer.application,server_name:this.servantModal.currentServer.server_name,obj_name:"",node_name:"",endpoint:"",servant:"",thread_num:"",max_connections:"200000",queuecap:"10000",queuetimeout:"60000",allow_ip:"",protocol:"not_tars",handlegroup:""},this.servantDetailModal.isNew=!0,e){var t=this.servantModal.model.find((function(t){return t.id===e}));t.obj_name=t.servant.split(".")[2],this.servantDetailModal.model=Object.assign({},this.servantDetailModal.model,t),this.servantDetailModal.isNew=!1}this.servantDetailModal.show=!0},closeServantDetailModal:function(){this.$refs.servantDetailForm&&this.$refs.servantDetailForm.resetValid(),this.servantDetailModal.show=!1,this.servantDetailModal.model=null},checkServantEndpoint:function(e){var t=e.split(/\s-/),a=/^tcp|udp|ssl$/i,o=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/i,s=/^h\s[^\s]+/i,i=/^t\s([1-9]|[1-9]\d+)$/i,r=/^p\s\d{2,5}$/i,l=!0;if(a.test(t[0])){for(var n=0,c=1;c65535||n++,r=null}}l=3===n}else l=!1;return l},saveServantDetail:function(){var e=this;if(this.$refs.servantDetailForm.validate()){var t=this.$Loading.show();if(this.servantDetailModal.isNew){var a=this.servantDetailModal.model;a.servant=[a.application,a.server_name,a.obj_name].join("."),this.$ajax.postJSON("/server/api/add_adapter_conf",a).then((function(a){t.hide(),e.servantModal.model.unshift(a),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else this.servantDetailModal.model.servant=this.servantDetailModal.model.application+"."+this.servantDetailModal.model.server_name+"."+this.servantDetailModal.model.obj_name,this.$ajax.postJSON("/server/api/update_adapter_conf",this.servantDetailModal.model).then((function(a){t.hide(),e.servantModal.model=e.servantModal.model.map((function(e){return e.id===a.id?a:e})),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},deleteServant:function(e){var t=this;this.$confirm(this.$t("serverList.servant.a"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_adapter_conf",{id:e}).then((function(o){a.hide(),t.servantModal.model=t.servantModal.model.filter((function(t){return t.id!==e})),t.$tip.success(t.$t("common.success"))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}))},showMoreCmd:function(e){var t=this;this.moreCmdModal.model={selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){t.$refs.moreCmdForm&&t.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.moreCmdModal.currentServer=e,this.isBatchShowCmd=!1,this.$ajax.getJSON("/server/api/config_file_list",{level:5,application:e.application,server_name:e.server_name}).then((function(e){t.moreCmdModal.model&&(t.moreCmdModal.model.configs=e)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},batchShowMoreCmd:function(){var e=this,t=this.serverList.filter((function(e){return!0===e.isChecked}));this.moreCmdModal.model={selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){e.$refs.moreCmdForm&&e.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.isBatchShowCmd=!0,1===t.length&&(this.isBatchShowCmd=!1,this.moreCmdModal.currentServer=t[0],this.$ajax.getJSON("/server/api/config_file_list",{level:5,application:t[0].application,server_name:t[0].server_name}).then((function(t){e.moreCmdModal.model&&(e.moreCmdModal.model.configs=t)})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))})))},sendCommand:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:t}).then((function(e){s.hide();var t=e[0].err_msg.replace(/\n/g,"
");if(0!==e[0].ret_code)throw new Error("".concat(e[0].application,".").concat(e[0].server_name,"_").concat(e[0].node_name,":
").concat(t));o.commandHTML=t,o.dialogCommandVisible=!0})).catch((function(e){s.hide();var t={title:o.$t("common.error"),message:e.err_msg||e.message};a&&(t.duration=0),o.$tip.error(t)}))},invokeMoreCmd:function(){var e=this;if(this.isBatchShowCmd){var t=this.serverList.filter((function(e){return!0===e.isChecked})),a=this.moreCmdModal.model;"undeploy_tars"===a.selected?this.undeployServers(t):"setloglevel"===a.selected?t.forEach((function(t){e.sendCommand(t.id,"tars.setloglevel ".concat(a.setloglevel))})):"command"===a.selected&&this.$refs.moreCmdForm.validate()?t.forEach((function(t){e.sendCommand(t.id,a.command,!0)})):"connection"===a.selected&&t.forEach((function(t){e.sendCommand(t.id,"tars.connection",!0)}))}else{var o=this.moreCmdModal.model,s=this.moreCmdModal.currentServer;"undeploy_tars"===o.selected?this.undeployServer(s):"setloglevel"===o.selected?this.sendCommand(s.id,"tars.setloglevel ".concat(o.setloglevel)):"loadconfig"===o.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(s.id,"tars.loadconfig ".concat(o.loadconfig)):"command"===o.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(s.id,o.command,!0):"connection"===o.selected&&this.sendCommand(s.id,"tars.connection",!0)}this.closeMoreCmdModal()},closeMoreCmdModal:function(){this.$refs.moreCmdForm&&this.$refs.moreCmdForm.resetValid(),this.moreCmdModal.unwatch&&this.moreCmdModal.unwatch(),this.moreCmdModal.show=!1,this.moreCmdModal.model=null,this.isBatchShowCmd=!1},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},onCopy:function(e){this.$tip.success(this.$t("common.success"))},onError:function(e){this.$tip.error(this.$t("serverList.servant.copyErr"))},showTemplateView:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/view_server_merge",{application:e.application,serverName:e.server_name,nodeName:e.node_name}).then((function(e){a.hide(),t.templateMoadal.model={template:"\n".concat(e.template)},t.templateMoadal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},closeTemplateMoadal:function(){this.templateMoadal.show=!1,this.templateMoadal.model=null},showStatusModal:function(e){this.getServerStatusDatil(e.id)},batchshowStatusModal:function(){var e=this.checkedServers.map((function(e){return e.id}));this.getServerStatusDatil(e)},getServerStatusDatil:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:"tars.viewstatus"}).then((function(e){a.hide(),e.forEach((function(e){e.service_id="".concat(e.application,".").concat(e.server_name,"_").concat(e.node_name),0==e.ret_code?e.err_msg="".concat(t.$t("serverList.tips.success"),"\n")+e.err_msg:e.err_msg="".concat(t.$t("serverList.tips.error"),"\n")+e.err_msg})),t.serverStatusModal.model={statusList:e},t.serverStatusModal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},serverStatusStyle:function(e){return-1==e?"color: red":"color : #9096A3 "},closeStatusModal:function(){this.serverStatusModal.model=null,this.serverStatusModal.show=!1},goMarket:function(e){var t;t=e.source["tars.io/CloudProduct"]?"/static/market/index.html#/market/product/".concat(e.source["tars.io/CloudInstall"].group,"/").concat(e.source["tars.io/CloudInstall"].name,"/").concat(e.source["tars.io/CloudInstall"].version):"/static/market/index.html#/market/service/".concat(e.source["tars.io/CloudInstall"].group,"/").concat(e.source["tars.io/CloudInstall"].name,"/").concat(e.source["tars.io/CloudInstall"].version),window.open(t)}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getServerList(),this.getServerNotifyList(1)},beforeRouteEnter:function(e,t,a){a(a((function(e){e.getServerNotifyList(1)})))},beforeRouteUpdate:function(e,t,a){a(a((function(e){e.getServerNotifyList(1)})))},linkDownload:function(e){window.open(e,"_blank")}},ie=se,re=(a("ec60"),Object(x["a"])(ie,z,P,!1,null,null,null)),le=re.exports,ne=a("67ac"),ce=(a("2532"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_server_publish"},[t("div",{staticClass:"table_head"},[t("h4",[e._v(" "+e._s(this.$t("serverList.title.serverList"))+" "),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.getServerList()}}})])]),t("div",[e.serverList&&e.serverList.length>0?t("let-table",{ref:"table",attrs:{data:e.serverList,"empty-msg":e.$t("common.noService")}},[t("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(a){return[t("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(a){return[t("let-checkbox",{attrs:{value:a.row.id},model:{value:a.row.isChecked,callback:function(t){e.$set(a.row,"isChecked",t)},expression:"scope.row.isChecked"}})]}}],null,!1,1693185143)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(a){return[a.row.enable_set?t("p",{staticStyle:{"max-width":"200px"}},[e._v(" "+e._s(e.$t("common.set.setName"))+":"+e._s(a.row.set_name)),t("br"),e._v(" "+e._s(e.$t("common.set.setArea"))+":"+e._s(a.row.set_area)),t("br"),e._v(" "+e._s(e.$t("common.set.setGroup"))+":"+e._s(a.row.set_group)+" ")]):t("span",[e._v(e._s(e.$t("common.disable")))])]}}],null,!1,1083854891)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return["Inactive"===a.row.setting_state?t("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(a.row.setting_state))]):t("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(a.row.setting_state))])]}}],null,!1,1039889159)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return["0"!=a.row.query_ret_code?t("span",{staticStyle:{color:"#FF0000"}},[e._v("Inactive")]):"Active"===a.row.present_state_in_node?t("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(a.row.present_state_in_node))]):t("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(a.row.present_state_in_node))])]}}],null,!1,350457171)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(a.row.patch_time)))])]}}],null,!1,3144837894)}),t("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.totalPage,page:e.page},on:{change:e.changePage},slot:"pagination"}),t("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.uploadPublishModal}},[e._v(e._s(e.$t("pub.dlg.upload")))]),e._v("    "),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){return e.openPublishModal(!1)}}},[e._v(e._s(e.$t("pub.btn.pub")))]),e._v("    "),e.serverList&&e.serverList.length>0?t("let-button",{attrs:{size:"small"},on:{click:e.gotoHistory}},[e._v(e._s(e.$t("pub.btn.history")))]):e._e(),e._v("    "),t("let-button",{attrs:{size:"small"},on:{click:e.gotoPackage}},[e._v(e._s(e.$t("managePackage.title")))])],1)],1):e._e(),t("let-modal",{attrs:{title:e.$t("index.rightView.tab.patch"),width:"880px",footShow:!1},on:{close:e.closePublishModal,"on-confirm":e.savePublishServer},model:{value:e.publishModal.show,callback:function(t){e.$set(e.publishModal,"show",t)},expression:"publishModal.show"}},[e.publishModal.model?t("let-form",{ref:"publishForm",attrs:{itemWidth:"100%"}},[t("let-form-item",{attrs:{label:e.$t("serverList.servant.appService")}},[e._v(" "+e._s(e.publishModal.model.application)+"·"+e._s(e.publishModal.model.server_name)+" ")]),t("let-form-item",{attrs:{label:e.$t("pub.dlg.ip")}},e._l(e.publishModal.model.serverList,(function(a){return t("div",{key:a.id},[e._v(" "+e._s(a.node_name)+" ")])})),0),t("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[t("let-input",{model:{value:e.publishModal.model.update_text,callback:function(t){e.$set(e.publishModal.model,"update_text",t)},expression:"publishModal.model.update_text"}})],1),e.patchRadioData.length>1?t("let-form-item",{attrs:{label:e.$t("pub.dlg.patchType")}},[t("let-radio-group",{attrs:{type:"button",size:"small",data:e.patchRadioData},on:{change:e.patchChange},model:{value:e.patchType,callback:function(t){e.patchType=t},expression:"patchType"}})],1):e._e(),e.publishModal.model.show?t("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[t("div",[t("let-select",{staticStyle:{width:"87%"},attrs:{size:"small",required:"","required-tip":e.$t("pub.dlg.ab")},model:{value:e.publishModal.model.patch_id,callback:function(t){e.$set(e.publishModal.model,"patch_id",t)},expression:"publishModal.model.patch_id"}},e._l(e.publishModal.model.patchList,(function(a,o){return t("let-option",{key:a.id,attrs:{value:a.id,title:a.id+"|PubTime:"+a.publish_time+"|UploadTime:"+a.upload_time+"|"+a.upload_user+"|"+a.comment}},[t("div",[0==o?t("span",{domProps:{innerHTML:e._s(e.imgNew)}}):t("span",{domProps:{innerHTML:e._s(e.imgSpace)}},[e._v(" ")]),e.includes(e.nowVersion,a.id)?t("span",{domProps:{innerHTML:e._s(e.imgCur)}}):t("span",{domProps:{innerHTML:e._s(e.imgSpace)}}),e._v(" "+e._s(a.id)+"| "+e._s("PubTime:"+a.publish_time)+" | "+e._s("UploadTime:"+a.upload_time)+" |"+e._s(a.upload_user)+"| "+e._s(a.comment)+" ")])])})),1),e._v("     "),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.showUploadModal}},[e._v(e._s(e.$t("pub.dlg.upload")))])],1)]):e._e(),t("let-form-item",[t("div",{staticClass:"elegant-switch"},[t("let-switch",{attrs:{size:"mini"},on:{change:e.changeElegantStatus},model:{value:e.elegantChecked,callback:function(t){e.elegantChecked=t},expression:"elegantChecked"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v(e._s(e.$t("pub.dlg.elegantPublish")))]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v(e._s(e.$t("pub.dlg.commomPublish")))])]),e._v("     "),e.elegantChecked?t("div",{staticClass:"elegant-num"},[t("span",{staticClass:"elegant-label"},[e._v(e._s(e.$t("pub.dlg.elegantEachNum")))]),t("let-input-number",{staticClass:"elegant-box",attrs:{max:20,min:1,step:1,size:"small"},model:{value:e.eachNum,callback:function(t){e.eachNum=t},expression:"eachNum"}})],1):e._e()],1)]),e._v("    "),t("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.savePublishServer}},[e._v(e._s(e.$t("common.patch")))]),e._v("       "),t("let-button",{attrs:{size:"small"},on:{click:e.gotoPackage}},[e._v(e._s(e.$t("managePackage.title")))])],1):e._e()],1),t("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?t("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage.apply(null,arguments)}}},[t("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[t("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.choose"))+" ")]),e.uploadModal.model.file?t("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),t("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[t("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),t("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),t("PublishStatus",{ref:"publishStatus"})],1),t("let-modal",{attrs:{width:"1000px",footShow:!1,title:e.$t("managePackage.title")},model:{value:e.showPackage,callback:function(t){e.showPackage=t},expression:"showPackage"}},[t("let-table",{ref:"packageTable",attrs:{data:e.packageList,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c1"),prop:"id"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c2"),prop:"server"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c7"),prop:"upload_user"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c3"),prop:"upload_time"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c4"),prop:"comment"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c5"),prop:"publish_time"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c6")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",[t("a",{staticClass:"let-table__operation",attrs:{target:"_blank",href:"/pages/server/api/download_package?id=".concat(a.row.id,"&name=").concat(a.row.tgz)}},[e._v(e._s(e.$t("operate.download")))])]),t("let-table-operation",{on:{click:function(t){return e.deletePackage(a.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])}),t("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.packageTotalPage,page:e.packagePage},on:{change:e.changePackagePage},slot:"pagination"}),t("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showPackage=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1)],1),t("let-modal",{attrs:{width:"1200px",footShow:!1,title:e.$t("pub.btn.history")},model:{value:e.showHistory,callback:function(t){e.showHistory=t},expression:"showHistory"}},[t("let-form",{nativeOn:{submit:function(t){return t.preventDefault(),e.getHistoryList.apply(null,arguments)}}},[t("let-form-item",{attrs:{itemWidth:"100%",label:e.$t("pub.date")}},[t("let-date-range-picker",{attrs:{start:e.startTime,end:e.endTime},on:{"update:start":function(t){e.startTime=t},"update:end":function(t){e.endTime=t}}}),t("let-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),t("let-table",{ref:"historyTable",attrs:{data:e.totalHistoryList,title:e.$t("historyList.title"),"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("historyList.table.th.c1"),prop:"create_time"}}),t("let-table-column",{attrs:{title:e.$t("serverList.servant.taskID"),prop:"task_no"}}),t("let-table-column",{attrs:{title:e.$t("historyList.table.th.c2")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(a.row.serial?e.$t("common.yes"):e.$t("common.no")))])]}}])}),t("let-table-column",{attrs:{title:e.$t("historyList.table.th.c3"),prop:"userName"}}),t("let-table-column",{attrs:{title:e.$t("serverList.dlg.title.taskStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(e.statusMap[a.row.status]||"-"))])]}}])}),t("let-table-column",{attrs:{title:e.$t("historyList.table.th.c4")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.viewTask(a.row.task_no)}}},[e._v(e._s(e.$t("operate.view")))]),t("let-table-operation",{on:{click:function(t){return e.deleteTask(a.row.task_no)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])}),t("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.historyTotalPage,page:e.historyPage},on:{change:e.changeHistoryPage},slot:"pagination"}),t("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showHistory=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1)],1),t("let-modal",{attrs:{title:e.$t("historyList.table.th.c4"),width:"1200px",footShow:!1},on:{"on-cancel":function(t){e.taskModal.show=!1}},model:{value:e.taskModal.show,callback:function(t){e.$set(e.taskModal,"show",t)},expression:"taskModal.show"}},[e.taskModal.model?t("let-table",{attrs:{data:e.taskModal.model.items}},[t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c1"),prop:"item_no"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c5"),prop:"command"}}),t("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),t("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}}),t("let-table-column",{attrs:{title:e.$t("common.status"),prop:"status_info"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c7"),prop:"execute_info"}})],1):e._e()],1)],1)}),de=[],me=(a("843c"),function(){var e=this,t=e._self._c;return t("div",[t("let-modal",{attrs:{title:e.$t("serverList.table.th.result"),width:"70%",footShow:!1},on:{"on-cancel":e.onClose,close:e.onClose},model:{value:e.finishModal.show,callback:function(t){e.$set(e.finishModal,"show",t)},expression:"finishModal.show"}},[e.finishModal.model?t("let-table",{attrs:{title:e.$t("serverList.servant.taskID")+e.finishModal.model.task_no,data:e.finishModal.model.items}},[t("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"200px"}}),t("let-table-column",{attrs:{title:e.$t("common.status"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-tag",{attrs:{theme:3==a.row.status?"success":4==a.row.status?"danger":"",checked:""}},[e._v(" "+e._s(e.statusConfig[a.row.status]+(2!=a.row.status&&3!=a.row.status&&4!=a.row.status?a.row.desc:""))+" ")])]}}],null,!1,1412257332)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.result"),prop:"execute_info"}})],1):e._e()],1)],1)}),ue=[],pe={name:"PublishStatus",data:function(){return{closeCallback:null,timerId:null,finishModal:{show:!1,model:{task_no:"",items:[]}},statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.preparing"),2:this.$t("serverList.restart.running"),3:this.$t("serverList.restart.success"),4:this.$t("serverList.restart.failed"),5:this.$t("serverList.restart.cancel"),6:this.$t("serverList.restart.pauseFlow")},statusMap:{0:"EM_T_NOT_START",1:"EM_T_PREPARE",2:"EM_T_RUNNING",3:"EM_T_SUCCESS",4:"EM_T_FAILED",5:"EM_T_CANCEL",6:"EM_T_PARIAL"},endStatus:[3,4]}},methods:{onClose:function(){this.closeCallback&&this.closeCallback(),clearTimeout(this.timerId)},savePublishServer:function(e,t,a,o){var s=this;a=a||"",o=o||e.model.patch_id.toString(),this.closeCallback=t;var i=[],r=e.elegant||!1;e.model.serverList.forEach((function(t){i.push({server_id:t.id.toString(),command:e.command||"patch_tars",parameters:{patch_id:o,bak_flag:t.bak_flag||!1,update_text:e.model.update_text||"",group_name:a,run_type:t.run_type||""}})}));var l=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!r,elegant:r,eachnum:e.eachnum||1,items:i}).then((function(e){l.hide(),s.finishModal.model.task_no=e,s.finishModal.show=!0,s.getTaskRepeat(e)})).catch((function(e){l.hide(),s.$tip.error("".concat(s.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getTaskRepeat:function(e){var t=this;this.timerId&&clearTimeout(this.timerId);var a=function a(){t.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(e){var o=!0;e.items.forEach((function(e){t.endStatus.includes(e.status)||(o=!1),e.percent?e.desc="("+e.percent+"%)":e.desc="..."})),o?clearTimeout(t.timerId):t.timerId=setTimeout(a,2e3),t.finishModal.model.items=e.items})).catch((function(e){clearTimeout(t.timerId),t.timerId=null,t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))};a()}}},he=pe,fe=Object(x["a"])(he,me,ue,!1,null,null,null),_e=fe.exports,ve={name:"ServerPublish",components:{PublishStatus:_e},data:function(){return{imgNew:'',imgCur:'',imgSpace:'',nowVersion:[],activeKey:"",treeData:[],totalServerList:[],serverList:[],isCheckedAll:!0,totalPage:0,pageSize:20,page:1,showPackage:!1,packageList:[],packageTotalPage:0,packagePage:1,packagePageSize:20,publishModal:{show:!1,model:null,elegant:!1,eachnum:1},statusMap:{0:"EM_T_NOT_START",1:"EM_T_PREPARE",2:"EM_T_RUNNING",3:"EM_T_SUCCESS",4:"EM_T_FAILED",5:"EM_T_CANCEL",6:"EM_T_PARIAL"},showHistory:!1,startTime:"",endTime:"",totalHistoryList:[],historyList:[],historyTotalPage:0,historyPage:1,historyPageSize:20,taskModal:{show:!1,modal:!0},uploadModal:{show:!1,model:null},patchType:"patch",patchRadioData:[{value:"patch",text:this.$t("pub.dlg.upload")}],pkgUpload:{show:!1,model:null},elegantChecked:!1,eachNum:0}},props:["treeid"],methods:{getServerList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.treeid}).then((function(a){t.hide();var o=a||[];o.forEach((function(t){t.isChecked=e.isCheckedAll,t.present_state_in_node="",t.query_ret_code=0,t.setting_state=t.setting_state.charAt(0).toUpperCase()+t.setting_state.slice(1)})),e.totalServerList=o,e.totalPage=Math.ceil(e.totalServerList.length/e.pageSize),e.page=1,e.updateServerList(),e.updateServerState()})).catch((function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.table.msg.fail")).then((function(){e.getServerList()}))}))},updateServerState:function(){var e=this;if(0!=this.serverList.length){var t=this.serverList.map((function(e){return{application:e.application,server_name:e.server_name,node_name:e.node_name}}));this.$ajax.postJSON("/server/api/server_state",{queryState:t}).then((function(t){e.serverList.forEach((function(e){var a=t.filter((function(t){return t.application==e.application&&t.server_name==e.server_name&t.node_name==e.node_name}));e.present_state_in_node=a[0].present_state_in_node,e.query_ret_code=a[0].query_ret_code}))}))}},changePage:function(e){this.page=e},changeElegantStatus:function(e){this.checked=e,e&&(this.eachNum=1)},uploadPublishModal:function(){this.openPublishModal(!0)},openPublishModal:function(e){var t=this,a=this.serverList.filter((function(e){return e.isChecked}));if(a.length<=0)this.$tip.warning(this.$t("pub.dlg.a"));else{var o=a[0];this.publishModal.model={application:o.application,server_name:o.server_name,serverList:a,patchList:[],patch_id:"",update_text:"",show:!0},this.getNewVersionList(o).then((function(e){0!=e.length&&e.forEach((function(e){t.nowVersion.push(e.patch_version)}))})),this.getPatchList(o.application,o.server_name,1,50).then((function(a){t.publishModal.model.patchList=a.rows,t.publishModal.show=!0,e&&t.showUploadModal()}))}},getPatchList:function(e,t,a,o){var s=this;return this.$ajax.getJSON("/server/api/server_patch_list",{application:e,module_name:t,curr_page:a,page_size:o}).catch((function(e){s.$tip.error("".concat(s.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getNewVersionList:function(e){var t=this;return this.$ajax.getJSON("/server/api/server_now_version",{application:e.application,serverName:e.server_name,enableSet:e.enable_set,setName:e.set_name,setArea:e.set_area,setGroup:e.set_group,nodeName:e.node_name}).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},closePublishModal:function(){this.publishModal.show=!1,this.nowVersion=[],this.publishModal.modal=null,this.patchType="patch",this.$refs.publishForm.resetValid()},savePublishServer:function(e,t){this.$refs.publishForm.validate()&&(this.publishModal.elegant=this.elegantChecked,this.publishModal.eachnum=this.eachNum,this.publishModal.command=t?"grace_patch_tars":"patch_tars",this.$refs.publishStatus.savePublishServer(this.publishModal,this.closePublishModal))},closeFinishModal:function(){this.$refs.finishForm.resetValid()},updateServerList:function(){var e=(this.page-1)*this.pageSize,t=this.page*this.pageSize;this.serverList=this.totalServerList.slice(e,t)},gotoPackage:function(){this.showPackage=!0,this.getPackageList(1)},getPackageList:function(e){var t=this;if("number"!=typeof e&&(e=1),!(this.serverList.length<=0)){var a=this.$Loading.show(),o=this.serverList[0];this.getPatchList(o.application,o.server_name,e,this.packagePageSize).then((function(o){a.hide(),t.packageList=o.rows,t.packagePage=e,t.packageTotalPage=Math.ceil(o.count/t.packagePageSize)})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))})),this.getPatchList(o.application,o.server_name,1,50).then((function(e){t.publishModal.model.patchList=e.rows}))}},changePackagePage:function(e){this.getPackageList(e)},downloadPackage:function(e){var t="/pages/server/api/download_package?id=".concat(e.id,"&name=").concat(e.tgz);window.open(t,!0)},deletePackage:function(e){var t=this;this.$confirm(this.$t("releasePackage.confirmDeleteTip"),this.$t("common.alert")).then((function(){t.$ajax.postJSON("/server/api/delete_patch_package",{id:e}).then((function(e){t.getPackageList(t.packagePage)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},gotoHistory:function(){this.showHistory=!0,this.getHistoryList(1)},getHistoryList:function(e){var t=this;"number"!=typeof e&&(e=1);var a=this.$Loading.show(),o={application:this.serverList[0].application||"",server_name:this.serverList[0].server_name||"",from:this.startTime,to:this.endTime,page_size:this.historyPageSize,curr_page:e};this.historyPage=e,this.$ajax.getJSON("/server/api/task_list",o).then((function(e){a.hide(),t.totalHistoryList=e.rows||[],t.historyTotalPage=Math.ceil(e.count/t.historyPageSize)})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},viewTask:function(e){var t=this;this.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(e){t.taskModal.model=e,t.taskModal.show=!0}))},deleteTask:function(e){var t=this;this.$confirm(this.$t("historyList.delete")).then((function(){t.$ajax.getJSON("/server/api/del_task",{task_no:e}).then((function(e){t.getHistoryList(t.page)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},changeHistoryPage:function(e){this.getHistoryList(e)},showUploadModal:function(){this.serverList.length<=0&&this.$tip.warning(this.$t("pub.dlg.a")),this.uploadModal.model={application:this.serverList[0].application||"",server_name:this.serverList[0].server_name||"",file:null,comment:""},this.uploadModal.show=!0},closeUploadModal:function(){this.uploadModal.show=!1,this.uploadModal.model=null,this.$refs.uploadForm.resetValid()},uploadFile:function(e){var t=this.treeid,a=(t&&t.split(".")[0]&&t.split(".")[0].slice(1),t.split(".")),o=t&&a[a.length-1]&&a[a.length-1].slice(1),s=e.name&&e.name.split(".")&&e.name.split(".")[0];if(-1==s.indexOf(o))return this.$tip.error("".concat(this.$t("releasePackage.uploadPackageTips")));this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this;if(this.$refs.uploadForm.validate()){var t=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("module_name",this.uploadModal.model.server_name),a.append("suse",this.uploadModal.model.file),a.append("comment",this.uploadModal.model.comment),a.append("task_id",(new Date).getTime()),this.$ajax.postForm("/server/api/upload_patch_package",a).then((function(){e.getPatchList(e.uploadModal.model.application,e.uploadModal.model.server_name,1,50).then((function(a){t.hide(),e.publishModal.model.patchList=a.rows,e.closeUploadModal()}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},patchChange:function(){"patch"==this.patchType?this.publishModal.model.show=!0:this.publishModal.model.show=!1},includes:function(e,t){return!!e.includes(String(t))},formatString:function(e,t){return null!=e&&e.length0)return i="parsererror"==o.documentElement.nodeName?o.documentElement.childNodes[0].nodeValue:o.getElementsByTagName("parsererror")[0].innerHTML,void alert("config format error:"+i)}catch(r){return void alert("config format error:"+r.toString())}"config"===e&&(this.configModal.model.config=this.configContent,this.updateConfigFile())},closeConfigDiffModal:function(){this.configDiffModal.show=!1},nodeConfigDiff:function(){this.$refs.nodeConfigForm.validate()&&(this.configDiffModal.type="nodeConfig",this.configDiffModal.show=!0,this.configDiffModal.isNew=!1,this.configDiffModal.model={oldData:this.nodeConfigModal.model.config,newData:this.nodeConfigContent})}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getConfigList(this.serverData)}},Le=Se,xe=(a("babe"),Object(x["a"])(Le,we,ye,!1,null,null,null)),Ce=xe.exports,Ne=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_server_history"},[e.serverListShow?t("div",{staticClass:"table_wrap"},[t("div",{staticClass:"table_head"},[t("h4",[e._v(e._s(this.$t("serverList.title.serverList")))])]),t("let-table",{ref:"serverListLoading",staticClass:"dcache",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata"),stripe:""}},[t("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"application"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[a.row.application]+"&server_name="+[a.row.server_name]+"&node_name="+[a.row.node_name],title:e.$t("serverList.link.remoteLog"),target:"_blank"}},[e._v(" "+e._s(a.row.server_name)+" ")])]}}],null,!1,2262472970)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[a.row.is_node_ok?t("span",[t("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[a.row.application]+"&server_name="+[a.row.server_name]+"&node_name="+[a.row.node_name],title:e.$t("serverList.link.nodeLog"),target:"_blank"}},[e._v(" "+e._s(a.row.node_name)+" ")])]):t("span",{staticStyle:{color:"#FF0000"}},[e._v(" "+e._s(a.row.node_name)+e._s(e.$t("serverList.link.invalidNode"))+" ")])]}}],null,!1,2244706928)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return["Inactive"===a.row.setting_state?t("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(a.row.setting_state))]):t("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(a.row.setting_state))])]}}],null,!1,4280848039)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return["0"!=a.row.query_ret_code?t("span",{staticStyle:{color:"#FF0000"}},[e._v("Inactive")]):"Active"===a.row.present_state_in_node?t("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(a.row.present_state_in_node))]):t("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(a.row.present_state_in_node))])]}}],null,!1,2058566643)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(a.row.patch_time)))])]}}],null,!1,3144837894)}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.historyLink(a.row.id)}}},[e._v(e._s(e.$t("operate.goto")))])]}}],null,!1,1230847586)})],1),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.goback}},[e._v(e._s(e.$t("operate.goback")))]),t("let-pagination",{attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}})],1):t("div",{staticClass:"history_search"},[t("label",{staticClass:"history_search_box"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.historySearchKey,expression:"historySearchKey"}],staticClass:"history_search_key",attrs:{type:"text",placeholder:e.$t("home.searchKey")},domProps:{value:e.historySearchKey},on:{blur:e.historySearch,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.historySearch.apply(null,arguments)},input:function(t){t.target.composing||(e.historySearchKey=t.target.value)}}})]),t("div",{staticClass:"history_list_wrap"},[t("div",{staticClass:"history_list_title"},[e._v(e._s(e.$t("home.visited"))+":")]),t("ul",{staticClass:"history_list"},e._l(e.historySearchList,(function(a){return t("li",{key:a,staticClass:"history_item"},[t("a",{staticClass:"history_link",attrs:{href:"javascript:;"},on:{click:function(t){return e.historySearchLink(a)}}},[e._v(e._s(a))])])})),0)])])])},Ee=[],De={name:"ServerHistory",data:function(){return{historySearchKey:"",historySearchList:[],serverList:[],serverListShow:!1,pageNum:1,pageSize:16,total:1}},mounted:function(){this.updateHistorySearchKey()},methods:{gotoPage:function(e){this.historySearch(e)},historySearch:function(e){var t=this;e&&"number"==typeof e||(e=this.pageNum||1);var a=this.historySearchKey;a&&(this.updateHistorySearchKey(),this.$ajax.getJSON("/server/api/server_search",{searchkey:a,page_size:this.pageSize,curr_page:e}).then((function(a){t.pageNum=e,t.total=Math.ceil(a.count/t.pageSize),a.rows.forEach((function(e){e.present_state_in_node="",e.is_node_ok=!0,e.query_ret_code=0,e.setting_state=e.setting_state.charAt(0).toUpperCase()+e.setting_state.slice(1)})),t.serverList=a.rows,t.updateServerState(),t.serverListShow=!0})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))})))},updateServerState:function(){var e=this;if(0!=this.serverList.length){var t=this.serverList.map((function(e){return{application:e.application,server_name:e.server_name,node_name:e.node_name}}));this.$ajax.postJSON("/server/api/server_state",{queryState:t}).then((function(t){e.serverList.forEach((function(e){var a=t.filter((function(t){return t.application==e.application&&t.server_name==e.server_name&t.node_name==e.node_name}));e.present_state_in_node=a[0].present_state_in_node,e.is_node_ok=a[0].is_node_ok,e.query_ret_code=a[0].query_ret_code}))}))}},historySearchLink:function(e){this.historySearchKey=e,this.historySearch()},historyLink:function(e){var t=this;this.$nextTick((function(){t.$parent.selectTree(e),t.$parent.getTreeData()}))},goback:function(){this.serverListShow=!1,this.historySearchKey=""},updateHistorySearchKey:function(){var e=this.historySearchKey,t=this.getLocalStorage("tars_history_key")||[];if(e){if(t&&t.length>0){var a=-1;t.forEach((function(t,o){t===e&&(a=o)})),-1!==a&&t.splice(a,1),t.unshift(e)}else t=[e];this.historySearchList=t.slice(0,20),this.setLocalStorage("tars_history_key",JSON.stringify(t))}else this.historySearchList=t},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}}},Ie=De,Te=(a("10a2"),Object(x["a"])(Ie,Ne,Ee,!1,null,null,null)),Oe=Te.exports,qe=a("c9e9"),je=a("4527"),Re=a("3430"),ze=a("f298"),Pe={name:"Server",components:{callChain:ne["a"],manage:le,publish:$e,config:Ce,"server-monitor":qe["a"],"property-monitor":je["a"],"user-manage":Re["a"],serverHistory:Oe,plugins:ze["a"]},data:function(){return{treeErrMsg:"load failed",treeData:null,treeSearchKey:"",treeid:"home",isIconPlay:!1,plugins:[],serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},homeTab:"home",BTabs:[]}},computed:{base:function(){return"/server/".concat(this.treeid)}},watch:{treeid:function(){this.serverData=this.getServerData(),this.$store.commit({type:"increment",name:this.serverData})},$route:function(e,t){"/server"===e.path&&this.getTreeData()}},directives:{vscroll:{componentUpdated:function(e){var t=e||"",a=e.children||[],o="";for(var s in a){var i=a[s],r=i.attributes["class"];if(r&&r.value.indexOf("active")>-1){o=i;break}}if(o.offsetLeftt.scrollLeft+t.offsetWidth){var n=o.offsetLeft+o.offsetWidth-t.offsetWidth;t.scrollTo(n,0)}}}},methods:{getNewServerName:function(e){var t=e&&e.split(".");if(!t)return e;if(1==t.length){var a=e&&e.split(".")[0].substring(1);return"".concat(a)}if(t.length>1){var o=e&&e.split(".")[0].substring(1),s=e&&e.split(".")[e.split(".").length-1].substring(1);return"".concat(o,".").concat(s)}},getName:function(e){var t="";return e.lastIndexOf("/")>-1&&(t=e.substring(e.lastIndexOf("/")+1,e.length)),t},getPlugins:function(){var e=this;this.$ajax.getJSON("/plugin/api/list",{k8s:!1,type:2}).then((function(t){e.plugins=t,e.plugins.forEach((function(t){"en"==e.$cookie.get("locale")&&(t.f_name=t.f_name_en)}))})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},iconLoading:function(){var e=this;e.isIconPlay||(e.isIconPlay=!0,setTimeout((function(){e.isIconPlay=!1}),1e3))},treeSearch:function(e){this.iconLoading(),this.getTreeData(this.treeSearchKey,e)},selectTree:function(e){this.selectBTabs(e),this.checkCurrBTabs()},handleData:function(e,t){var a=this;e&&e.length&&e.forEach((function(e){e.label=e.name,e.nodeKey=e.id,a.treeSearchKey&&(e.expand=!0),e.children&&e.children.length&&a.handleData(e.children)}))},getTreeData:function(e,t){var a=this;this.treeData=null,this.$nextTick((function(){var o=a.$loading.show();a.$ajax.getJSON("/server/api/tree",{searchKey:e||"",type:t}).then((function(e){o.hide(),a.treeData=e,a.handleData(a.treeData,!0)})).catch((function(e){o.hide(),a.treeErrMsg=e.err_msg||e.message||"load failed",a.treeData=!1}))}))},getServerData:function(){var e={level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""};if(!this.treeid)return{};if("home"==this.treeid)return e;var t=this.treeid.split(".");return t.forEach((function(t){var a=+t.substr(0,1),o=t.substr(1);switch(a){case 1:e.application=o;break;case 2:e.set_name=o;break;case 3:e.set_area=o;break;case 4:e.set_group=o;break;case 5:e.server_name=o;break;default:break}e.level=a})),e},checkTreeid:function(){this.treeid=this.getLocalStorage("_treeid_")||""},clickTab:function(e){var t=this,a=this.treeid,o=this.BTabs;o&&o.forEach((function(o){o.id===a&&(o.path=e.name,o.pluginPath=e.name.substr(t.base.length),o.pluginPath=o.pluginPath.substr(0,o.pluginPath.length-"/plugins".length))})),this.setLocalStorage("_tabs_",JSON.stringify(o))},isTrueTreeLevel:function(){var e=this.$route.path.split("/"),t=e[e.length-1],a=!1;5===this.serverData.level||"publish"!==t&&"server-monitor"!==t&&"property-monitor"!==t&&"user-manage"!==t&&"interface-debuger"!==t||(a=!0),5!==this.serverData.level&&4!==this.serverData.level&&1!==this.serverData.level&&"config"===t&&(a=!0),a&&this.$router.replace("manage")},checkBTabs:function(){var e=this.BTabs,t=this.getLocalStorage("_tabs_");t&&t.length>0&&t.forEach((function(t){e.push({id:t.id,path:t.path})}))},checkCurrBTabs:function(){var e=this;this.$nextTick((function(){var t=e.$refs.btabs||"",a=t.children||[],o="";if(a.forEach((function(e){var t=e.getAttribute("class");t.indexOf("active")>-1&&(o=e)})),o.offsetLeftt.scrollLeft+t.offsetWidth){var i=o.offsetLeft+o.offsetWidth-t.offsetWidth;t.scrollTo(i,0)}}))},selectBTabs:function(e){var t=this.BTabs,a=!1;t.forEach((function(t){t.id===e&&(a=!0,t.path="/server/".concat(e,"/manage"))})),a||this.BTabs.push({id:e,path:"/server/".concat(e,"/manage")}),this.treeid=e,this.setLocalStorage("_treeid_",JSON.stringify(e)),this.setLocalStorage("_tabs_",JSON.stringify(t))},clickBTabs:function(e,t){t==this.homeTab&&(Oe.data.serverListShow=!1),this.treeid=t,this.setLocalStorage("_treeid_",JSON.stringify(t))},closeBTabs:function(e){var t=this.BTabs,a=0;t.forEach((function(t,o){t.id===e&&(a=o)})),t.splice(a,1),this.setLocalStorage("_tabs_",JSON.stringify(t)),t.length>0?this.treeid=t[t.length-1].id:this.treeid="home",this.setLocalStorage("_treeid_",JSON.stringify(this.treeid)),this.getTreeData()},closeAllBTabs:function(){this.BTabs=[],this.treeid="home",this.setLocalStorage("_tabs_",JSON.stringify(this.BTabs)),this.setLocalStorage("_treeid_",JSON.stringify(this.treeid)),this.getTreeData()},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}},created:function(){this.serverData=this.getServerData(),this.isTrueTreeLevel()},mounted:function(){this.checkTreeid(),this.checkBTabs(),this.getTreeData(),this.getPlugins();var e=this.BTabs;e.forEach((function(e){e.path="/server/".concat(e.id,"/manage")})),this.treeid||(this.treeid="home")}},Fe=Pe,Ae=(a("ebdf"),Object(x["a"])(Fe,j,R,!1,null,null,null)),Je=Ae.exports,Ve=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation"},[t("el-tabs",{attrs:{value:e.$route.path},on:{"tab-click":e.onTabClick}},[t("el-tab-pane",{attrs:{label:e.$t("deployService.title.deploy"),name:"/operation/deploy"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.expand"),name:"/operation/expand"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.template"),name:"/operation/templates"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.nodes"),name:"/operation/nodes"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.check"),name:"/operation/check"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.application"),name:"/operation/application"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.business"),name:"/operation/business"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.businessRelation"),name:"/operation/businessRelation"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.idcManage"),name:"/operation/idc"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.image"),name:"/operation/image"}}),e._l(e.plugins,(function(e){return t("el-tab-pane",{key:e.f_id,attrs:{name:"/operation/plugins"+e.f_path,label:e.f_name}})}))],2),t("router-view",{staticClass:"page_operation_children",attrs:{path:e.name}})],1)},We=[],He=a("03c6"),Ue="/operation/deploy",Be={name:"Operation",components:{plugins:He["a"]},data:function(){return{name:"",plugins:[]}},beforeRouteEnter:function(e,t,a){-1!=e.path.indexOf("/operation")&&e.path!=Ue?a(Ue):a()},beforeRouteLeave:function(e,t,a){Ue=t.path,a()},mounted:function(){this.getPlugins()},methods:{onTabClick:function(e){this.name=e.name,this.$router.replace(e.name)},getPlugins:function(){var e=this;this.$ajax.getJSON("/plugin/api/list",{k8s:!0,type:3}).then((function(t){e.plugins=t,e.plugins.forEach((function(t){"en"==e.$cookie.get("locale")&&(t.f_name=t.f_name_en)}))})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))}}},Ye=Be,Ke=(a("9d9a"),Object(x["a"])(Ye,Ve,We,!1,null,null,null)),Ge=Ke.exports,Ze=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_deploy"},[t("let-form",{directives:[{name:"show",rawName:"v-show",value:e.deployShow,expression:"deployShow"}],ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save.apply(null,arguments)}}},[t("let-form-item",{attrs:{label:e.$t("deployService.form.app"),required:""}},[t("let-select",{attrs:{id:"inputApplication",size:"small",filterable:"",notFoundText:e.$t("deployService.form.appAdd")},model:{value:e.model.application,callback:function(t){e.$set(e.model,"application",t)},expression:"model.application"}},e._l(e.applicationList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.serviceFormatTips"),required:"","required-tip":e.$t("deployService.form.serviceTips"),pattern:"^[a-zA-Z]([a-zA-Z0-9]+)?$","pattern-tip":e.$t("deployService.form.serviceFormatTips")},model:{value:e.model.server_name,callback:function(t){e.$set(e.model,"server_name",t)},expression:"model.server_name"}})],1),t("let-form-item",{attrs:{label:e.$t("deployService.form.serviceType"),required:""}},[t("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.serviceTypeTips")},model:{value:e.model.server_type,callback:function(t){e.$set(e.model,"server_type",t)},expression:"model.server_type"}},e._l(e.types,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[t("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:e.model.template_name,callback:function(t){e.$set(e.model,"template_name",t)},expression:"model.template_name"}},e._l(e.templates,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item",{attrs:{label:"SET"}},[t("SetInputer",{attrs:{enabled:e.model.enable_set,name:e.model.set_name,area:e.model.set_area,group:e.model.set_group},on:{"update:enabled":function(t){return e.$set(e.model,"enable_set",t)},"update:name":function(t){return e.$set(e.model,"set_name",t)},"update:area":function(t){return e.$set(e.model,"set_area",t)},"update:group":function(t){return e.$set(e.model,"set_group",t)}}})],1),t("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],attrs:{label:e.$t("user.op")}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("user.tips.sep")},model:{value:e.model.operator,callback:function(t){e.$set(e.model,"operator",t)},expression:"model.operator"}})],1),t("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],attrs:{label:e.$t("user.dev")}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("user.tips.sep")},model:{value:e.model.developer,callback:function(t){e.$set(e.model,"developer",t)},expression:"model.developer"}})],1),e.baseImageList.length>0?t("let-form-item",{attrs:{label:e.$t("deployService.form.run_type")}},[t("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("pub.dlg.tgzRun")},{value:!1,text:e.$t("pub.dlg.containerRun")}]},on:{change:e.changeRunType},model:{value:e.runType,callback:function(t){e.runType=t},expression:"runType"}})],1):e._e(),"container"==e.model.run_type?t("let-form-item",{attrs:{label:e.$t("deployService.form.baseImageId")}},[t("let-select",{attrs:{size:"small"},model:{value:e.model.base_image_id,callback:function(t){e.$set(e.model,"base_image_id",t)},expression:"model.base_image_id"}},e._l(e.baseImageList,(function(a){return t("let-option",{key:a.id,attrs:{value:a.id}},[e._v(e._s(a.image+"("+a.remark+")"))])})),1)],1):e._e(),t("let-table",{attrs:{data:e.model.adapters}},[t("let-table-column",{attrs:{title:"OBJ"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:a.row.obj_name,callback:function(t){e.$set(a.row,"obj_name",t)},expression:"props.row.obj_name"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.form.node_name"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-select",{attrs:{size:"small",required:"",filterable:""},on:{change:function(t){return e.nodeNameChange(a.row)}},model:{value:a.row.node_name,callback:function(t){e.$set(a.row,"node_name",t)},expression:"props.row.node_name"}},e._l(e.nodeList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",placeholder:"IP",required:"","required-tip":e.$t("deployService.table.tips.ip")},model:{value:a.row.bind_ip,callback:function(t){e.$set(a.row,"bind_ip",t)},expression:"props.row.bind_ip"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0,max:65535,placeholder:"0-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.port,callback:function(t){e.$set(a.row,"port",t)},expression:"props.row.port"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-radio",{attrs:{label:"tcp"},model:{value:a.row.port_type,callback:function(t){e.$set(a.row,"port_type",t)},expression:"props.row.port_type"}},[e._v("TCP")]),t("let-radio",{attrs:{label:"udp"},model:{value:a.row.port_type,callback:function(t){e.$set(a.row,"port_type",t)},expression:"props.row.port_type"}},[e._v("UDP")])]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-radio",{attrs:{label:"tars"},model:{value:a.row.protocol,callback:function(t){e.$set(a.row,"protocol",t)},expression:"props.row.protocol"}},[e._v("TARS")]),t("let-radio",{attrs:{label:"not_tars"},model:{value:a.row.protocol,callback:function(t){e.$set(a.row,"protocol",t)},expression:"props.row.protocol"}},[e._v(e._s(e.$t("serverList.servant.notTARS")))])]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"60px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.thread_num,callback:function(t){e.$set(a.row,"thread_num",t)},expression:"props.row.thread_num"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("serverList.servant.connections"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.max_connections,callback:function(t){e.$set(a.row,"max_connections",t)},expression:"props.row.max_connections"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.queuecap,callback:function(t){e.$set(a.row,"queuecap",t)},expression:"props.row.queuecap"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0},model:{value:a.row.queuetimeout,callback:function(t){e.$set(a.row,"queuetimeout",t)},expression:"props.row.queuetimeout"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.addAdapter(a.row)}}},[e._v(e._s(e.$t("operate.add")))]),a.$index?t("let-table-operation",{staticClass:"danger",on:{click:function(t){return e.model.adapters.splice(a.$index,1)}}},[e._v(e._s(e.$t("operate.delete"))+" ")]):e._e()]}}])})],1),t("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){return e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+" ")]),e._v("       "),t("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1),t("let-modal",{staticClass:"more-cmd",staticStyle:{"text-align":"center"},attrs:{width:"700px",footShow:!1},on:{close:e.closeResultModal,"on-cancel":e.closeResultModal},model:{value:e.resultModal.show,callback:function(t){e.$set(e.resultModal,"show",t)},expression:"resultModal.show"}},[t("p",{staticClass:"result-text"},[e._v(" "+e._s(e.$t("deployService.form.ret.success"))+e._s(e.$t("resource.installRstMsg"))+" ")]),t("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[t("let-table-column",{attrs:{title:"ip",prop:"ip"}}),t("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("p",{domProps:{textContent:e._s(a.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),t("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.deployModal.show,expression:"deployModal.show"}],staticStyle:{width:"400px",margin:"0 auto","margin-top":"100px"}},[e.deployModal.nodeList.length>0?t("let-form",{ref:"deployForm",attrs:{itemWidth:"400px"}},[t("let-form-item",{attrs:{label:e.$t("nodes.node_name")}},[t("let-select",{model:{value:e.deployModal.node_name,callback:function(t){e.$set(e.deployModal,"node_name",t)},expression:"deployModal.node_name"}},e._l(e.deployModal.nodeList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[t("let-select",{attrs:{required:"","required-tip":e.$t("pub.dlg.ab")},model:{value:e.deployModal.model.patch_id,callback:function(t){e.$set(e.deployModal.model,"patch_id",t)},expression:"deployModal.model.patch_id"}},e._l(e.deployModal.model.patchList,(function(a){return t("let-option",{key:a.id,attrs:{value:a.id}},[e._v(" "+e._s(a.id)+" | "+e._s(a.posttime)+" | "+e._s(a.comment)+" ")])})),1)],1)],1):e._e(),e.deployModal.nodeList.length>0?t("div",{staticStyle:{width:"100%","text-align":"center"}},[t("el-alert",{attrs:{"show-icon":"",title:e.$t("deployLog.info"),type:"warning",closable:!1}}),t("let-button",{staticStyle:{margin:"20px auto"},attrs:{type:"submit",theme:"primary"},on:{click:e.doDeployLog}},[e._v(" "+e._s(e.$t("deployLog.install"))+" ")])],1):t("div",{staticStyle:{width:"100%","text-align":"center"}},[t("el-alert",{attrs:{"show-icon":"",title:e.$t("deployLog.add_node"),description:e.$t("deployLog.description"),type:"warning",closable:!1}})],1)],1),t("PublishStatus",{ref:"publishStatus"})],1)},Qe=[],Xe=(a("498a"),a("4d63"),a("c607"),a("2c3e"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"set_inputer"},[t("div",{staticClass:"set_inputer_item"},[t("let-input",{ref:"name",attrs:{size:"small",value:e.name,placeholder:e.$t("common.set.setName"),disabled:!e.enabled,required:e.enabled,"required-tip":e.$t("deployService.form.setNameFormatTips"),pattern:e.enabled?"^[a-z]+$":null,"pattern-tip":e.$t("deployService.form.setNameFormatTips")},on:{input:e.updaters.name}})],1),t("div",{staticClass:"set_inputer_item"},[t("let-input",{ref:"area",attrs:{size:"small",value:e.area,placeholder:e.$t("common.set.setArea"),disabled:!e.enabled,required:e.enabled,"required-tip":e.$t("deployService.form.setAreaTips"),pattern:e.enabled?"^[a-z]+$":null,"pattern-tip":e.$t("deployService.form.setAreaFormatTips")},on:{input:e.updaters.area}})],1),t("div",{staticClass:"set_inputer_item"},[t("let-input",{ref:"group",attrs:{size:"small",value:e.group,placeholder:e.$t("common.set.setGroup"),disabled:!e.enabled,required:e.enabled,"required-tip":e.$t("deployService.form.setGroupTips"),pattern:e.enabled?"^(\\d+|\\*)$":null,"pattern-tip":e.$t("deployService.form.setGroupFormatTips")},on:{input:e.updaters.group}})],1),t("let-checkbox",{staticClass:"set_inputer_switch",attrs:{value:e.enabled},on:{input:e.updaters.enabled,change:e.onEnabledChange}},[e._v(e._s(e.$t("serverList.table.th.enableSet"))+" ")])],1)}),et=[],tt={props:{enabled:Boolean,name:String,area:String,group:[Number,String]},created:function(){this.updaters={name:this.updater("name"),area:this.updater("area"),group:this.updater("group"),enabled:this.updater("enabled")}},methods:{updater:function(e){var t=this;return function(a){return t.$emit("update:".concat(e),a)}},onEnabledChange:function(){var e=this;this.$nextTick((function(){e.enabled||(e.updaters.name(""),e.$refs.name.resetValid(),e.updaters.area(""),e.$refs.area.resetValid(),e.updaters.group(""),e.$refs.group.resetValid())}))}}},at=tt,ot=(a("40ce"),Object(x["a"])(at,Xe,et,!1,null,null,null)),st=ot.exports,it=["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars","tars_go"],rt=function(){return{application:"",server_name:"",server_type:it[0],template_name:"",node_name:"",enable_set:!1,set_name:"",set_area:"",set_group:"",operator:"",developer:"",run_type:"",base_image_id:0,adapters:[{obj_name:"",bind_ip:"",port:"",port_type:"tcp",protocol:"tars",thread_num:5,max_connections:1e5,queuecap:5e4,queuetimeout:2e4}]}},lt={name:"OperationDeploy",components:{SetInputer:st,PublishStatus:_e},data:function(){return{types:it,applicationList:[],nodeList:[],all_templates:[],baseImageList:[],templates:[],runType:!0,model:rt(),enableLogin:!1,deployShow:!1,deployModal:{show:!1,node_name:"",nodeList:[],model:{patch_id:"",patchList:[],serverList:[]}},resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}}}},watch:{runType:function(){this.model.run_type=this.runType?"":"container"}},mounted:function(){var e=this;this.$ajax.getJSON("/server/api/isEnableLogin").then((function(t){e.enableLogin=t.enableLogin||!1})).catch((function(e){})),this.$ajax.getJSON("/server/api/application_list").then((function(t){e.applicationList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/node_list").then((function(t){e.nodeList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/template_name_list").then((function(t){e.templates=t,e.all_templates=t,e.model.template_name=t[0]})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/base_image_list").then((function(t){e.baseImageList=t,e.baseImageList.length>0&&(e.model.base_image_id=e.baseImageList[0].id)})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$watch("props.row.node_name",(function(t,a){t!==a&&e.model.adapters.forEach((function(e){e.bind_ip=t}))})),this.checkDeployLog()},methods:{changeRunType:function(){this.model.run_type=this.runType?"":"container"},nodeNameChange:function(e){e.bind_ip=e.node_name},addAdapter:function(e){this.model.adapters.push(Object.assign({},e))},deploy:function(){for(var e=this,t=[],a=0;a0,expression:"previewItems.length > 0"}],ref:"expandForm",staticClass:"mt40",attrs:{inline:""},nativeOn:{submit:function(t){return t.preventDefault(),e.expand.apply(null,arguments)}}},[t("let-table",{ref:"table",attrs:{data:e.previewItems,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(a){return[t("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(a){return[a.row.status==e.$t("serviceExpand.form.noExpand")?t("let-checkbox",{model:{value:a.row.isChecked,callback:function(t){e.$set(a.row,"isChecked",t)},expression:"scope.row.isChecked"}}):e._e()]}}])}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),t("let-table-column",{attrs:{title:"Set",prop:"set"}}),t("let-table-column",{attrs:{title:e.$t("serverList.servant.objName"),prop:"obj_name"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-input",{model:{value:a.row.bind_ip,callback:function(t){e.$set(a.row,"bind_ip",t)},expression:"scope.row.bind_ip"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.port")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-input",{attrs:{type:"number",min:0,max:65535,placeholder:"0-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.port,callback:function(t){e.$set(a.row,"port",t)},expression:"scope.row.port"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"}})],1),t("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){return e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+" ")]),e._v("    "),t("let-button",{attrs:{type:"sumbit",theme:"primary"}},[e._v(e._s(e.$t("deployService.title.expand")))])],1),t("let-modal",{staticClass:"more-cmd",attrs:{width:"700px",footShow:!1},on:{close:e.closeResultModal,"on-cancel":e.closeResultModal},model:{value:e.resultModal.show,callback:function(t){e.$set(e.resultModal,"show",t)},expression:"resultModal.show"}},[t("p",{staticClass:"result-text"},[e._v(e._s(e.$t("serviceExpand.form.errTips.success"))+e._s(e.$t("resource.installRstMsg")))]),t("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[t("let-table-column",{attrs:{title:"ip",prop:"ip"}}),t("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("p",{domProps:{textContent:e._s(a.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),t("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1)],1)},ut=[],pt="((\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])",ht=function(){return{application:"",server_name:"",set:"",node_name:"",expand_nodes:[],enable_set:!1,set_name:"",set_area:"",set_group:"",copy_node_config:!1}},ft={name:"OperationExpand",components:{SetInputer:st},data:function(){return{model:ht(),applications:[],serverNames:[],sets:[],nodeNames:[],expandIpStr:"",previewItems:[],ipReg:"^".concat(pt,"$"),isCheckedAll:!1,resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}}}},mounted:function(){var e=this;this.getCascadeSelectServer({level:1},this.$t("common.error")).then((function(t){e.applications=t}))},methods:{changeSelect:function(e){var t=this;switch(e){case"application":this.model.server_name="",this.serverNames=[],this.model.application&&this.getCascadeSelectServer({level:2,application:this.model.application},this.$t("common.error")).then((function(e){t.serverNames=e}));break;case"server_name":this.model.set="",this.sets=[],this.model.server_name&&this.getCascadeSelectServer({level:3,application:this.model.application,server_name:this.model.server_name},this.$t("common.error")).then((function(e){t.sets=e}));break;case"set":if(this.model.node_name="",this.model.nodeName=[],this.model.set){var a=-1===parseInt(this.model.set,10)?"":this.model.set;this.getCascadeSelectServer({level:4,application:this.model.application,server_name:this.model.server_name,set:a},this.$t("common.error")).then((function(e){t.nodeNames=e}))}break;default:break}},getCascadeSelectServer:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("common.error");return this.$ajax.getJSON("/server/api/cascade_select_server",e).then((function(e){return e})).catch((function(e){t.$tip.error("".concat(a,": ").concat(e.message||e.err_msg))}))},indexOf:function(e,t){for(var a=0;a0){var a=[];t.forEach((function(e){a.push({bind_ip:e.bind_ip,node_name:e.node_name,obj_name:e.obj_name,port:e.port,set:e.set})}));var o={application:this.model.application,server_name:this.model.server_name,set:-1===parseInt(this.model.set,10)?"":this.model.set,node_name:this.model.node_name,copy_node_config:this.model.copy_node_config,expand_preview_servers:a},s=this.$Loading.show();this.$ajax.postJSON("/server/api/expand_server",o).then((function(t){s.hide(),t.tars_node_rst&&t.tars_node_rst.length?e.showResultModal(t.tars_node_rst):e.$tip.success(e.$t("serviceExpand.form.errTips.success"))})).catch((function(t){s.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}else this.$tip.error(this.$t("serviceExpand.form.errTips.noneNodes"))}},showResultModal:function(e){this.resultModal.resultList=e,this.resultModal.show=!0},closeResultModal:function(){this.resultModal.show=!1,this.resultModal.resultList=[]}},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.previewItems.forEach((function(t){t.isChecked=e}))}}},_t=ft,vt=(a("77b8"),Object(x["a"])(_t,mt,ut,!1,null,null,null)),gt=vt.exports,bt=(a("841c"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_templates"},[t("el-form",{staticStyle:{display:"inline"},attrs:{inline:"",itemWidth:"200px"}},[t("el-form-item",{attrs:{label:e.$t("deployService.form.template")}},[t("el-input",{attrs:{size:"small"},model:{value:e.query.template_name,callback:function(t){e.$set(e.query,"template_name",t)},expression:"query.template_name"}})],1),t("el-form-item",{attrs:{label:e.$t("template.search.parentTemplate")}},[t("el-input",{attrs:{size:"small"},model:{value:e.query.parents_name,callback:function(t){e.$set(e.query,"parents_name",t)},expression:"query.parents_name"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))])],1),t("span",{staticStyle:{float:"right"}},[t("i",{staticClass:"el-icon-refresh-right",staticStyle:{margin:"10px"},on:{click:function(t){return e.fetchData()}}}),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("template.btn.addTempate")))])],1)],1),t("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("template.search.parentTemplate"),prop:"parents_name",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.mergeItem(a.row)}}},[e._v(e._s(e.$t("operate.merge")))]),t("let-table-operation",{on:{click:function(t){return e.viewItem(a.row)}}},[e._v(e._s(e.$t("operate.view")))]),t("let-table-operation",{on:{click:function(t){return e.editItem(a.row)}}},[e._v(e._s(e.$t("operate.update")))]),t("let-table-operation",{on:{click:function(t){return e.removeItem(a.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),t("let-modal",{attrs:{title:e.$t("template.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?t("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),t("div",{attrs:{slot:"foot"},slot:"foot"})]),t("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("template.add.title"):this.$t("template.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?t("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[t("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("template.add.templateFormatTips"),required:"","required-tip":e.$t("template.add.templateNameTips"),pattern:"^[a-zA-Z-]([.a-zA-Z0-9-]+)?$","pattern-tip":e.$t("template.add.templateFormatTips")},model:{value:e.detailModal.model.template_name,callback:function(t){e.$set(e.detailModal.model,"template_name",t)},expression:"detailModal.model.template_name"}})],1),t("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate"),required:""}},[t("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.detailModal.model.parents_name,callback:function(t){e.$set(e.detailModal.model,"parents_name",t)},expression:"detailModal.model.parents_name"}},[t("let-option",{attrs:{value:""}},[e._v(e._s(e.$t("pub.dlg.defaultValue")))]),e._l(e.items,(function(a){return t("let-option",{key:a.id,attrs:{value:a.template_name}},[e._v(e._s(a.template_name))])}))],2)],1),t("let-form-item",{attrs:{label:e.$t("template.form.content"),required:""}},[t("let-input",{attrs:{type:"textarea",rows:10,size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.detailModal.model.profile,callback:function(t){e.$set(e.detailModal.model,"profile",t)},expression:"detailModal.model.profile"}})],1)],1):e._e()],1)],1)}),$t=[],wt={name:"OperationTemplates",data:function(){return{query:{template_name:"",parents_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_profile_template",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},mergeItem:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_merge_profile_template",{template_name:e.template_name}).then((function(o){a.hide(),e.profile=o.template,t.viewModal.model=e,t.viewModal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.id?"/server/api/update_profile_template":"/server/api/add_profile_template",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("template.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_profile_template",{id:e.id}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}}},yt=wt,Mt=(a("21c0"),Object(x["a"])(yt,bt,$t,!1,null,null,null)),kt=Mt.exports,St=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_templates"},[t("el-form",{attrs:{inline:"",itemWidth:"200px"}},[t("el-form-item",{attrs:{label:e.$t("nodes.node_name")+":"}},[t("el-input",{attrs:{size:"small"},model:{value:e.query.node_name,callback:function(t){e.$set(e.query,"node_name",t)},expression:"query.node_name"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"submit",theme:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))]),t("i",{staticClass:"el-icon-refresh-right",staticStyle:{margin:"10px"},on:{click:function(t){return e.getNodeList()}}})],1),t("div",{staticStyle:{float:"right"}},[e.strict?e._e():t("span",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.manualAddItem}},[e._v(e._s(e.$t("nodes.btn.manualAddNode"))+" ")]),e._v("     "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.autoAddItem}},[e._v(e._s(e.$t("nodes.btn.autoAddNode"))+" ")]),e._v("     "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.autoUpdateItem}},[e._v(e._s(e.$t("nodes.btn.autoUpdateNode"))+" ")])],1)])],1),t("let-modal",{attrs:{title:e.$t("nodes.btn.manualAddNode"),footShow:!1,width:"800px"},model:{value:e.showManualAddItem,callback:function(t){e.showManualAddItem=t},expression:"showManualAddItem"}},[t("div",[t("br"),t("br"),t("let-tag",[e._v(e._s(e.$t("nodes.manualAddNode.OS1.title")))]),t("p",[e._v("1 "+e._s(e.$t("nodes.manualAddNode.OS1.step1")))]),t("p",[e._v("2 "+e._s(e.$t("nodes.manualAddNode.OS1.step2")))]),t("p",[e._v("3 "+e._s(e.$t("nodes.manualAddNode.OS1.step3")))]),t("p",[e._v("4 "+e._s(e.$t("nodes.manualAddNode.OS1.step4")))]),t("p",[e._v("5 "+e._s(e.$t("nodes.manualAddNode.OS1.step5")))]),t("br"),t("let-tag",[e._v(e._s(e.$t("nodes.manualAddNode.OS2.title")))]),t("p",[e._v("1 "+e._s(e.$t("nodes.manualAddNode.OS2.step1")))]),t("p",[e._v("2 "+e._s(e.$t("nodes.manualAddNode.OS2.step2")))]),t("p",[e._v("3 "+e._s(e.$t("nodes.manualAddNode.OS2.step3")))]),t("p",[e._v("4 "+e._s(e.$t("nodes.manualAddNode.OS2.step4")))]),t("p",[e._v("5 "+e._s(e.$t("nodes.manualAddNode.OS2.step5")))]),t("p",[e._v("6 "+e._s(e.$t("nodes.manualAddNode.OS2.step6")))]),t("br"),t("let-tag",{attrs:{theme:"success",checked:""}},[e._v(e._s(e.$t("nodes.manualAddNode.info1")))]),t("br"),t("br"),t("let-tag",{attrs:{theme:"success",checked:""}},[e._v(e._s(e.$t("nodes.manualAddNode.info2")))])],1)]),t("let-table",{ref:"nodeListLoading",attrs:{data:e.nodeList,stripe:"","empty-msg":e.$t("common.nodata"),"row-class-name":e.tableRowClassName}},[t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.node_name"),prop:"node_name"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.long_connection")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:""===a.row.node_obj?"active":"inactive"},[e._v(e._s(""===a.row.node_obj?"yes":"no"))])]}}])}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.present_state"),width:"100px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:"active"===a.row.present_state?"active":"inactive"},[e._v(e._s(a.row.present_state))])]}}])}),t("let-table-column",{attrs:{title:e.$t("common.time"),prop:"last_reg_time"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.last_heartbeat"),prop:"last_heartbeat"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.label"),prop:"label",width:"20%"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.version"),prop:"tars_version"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.load_avg5"),prop:"load_avg5"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.check")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.editNode(a.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.edit")))]),e._v("    "),t("let-table-operation",{on:{click:function(t){return e.checkNode(a.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.check")))]),e._v("    "),t("let-table-operation",{on:{click:function(t){return e.deleteNode(a.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.delete")))])]}}])})],1),t("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),t("let-modal",{attrs:{title:this.$t("connectNodeList.title"),width:"1200px",footShow:!1,showClose:!1},model:{value:e.connectModal.show,callback:function(t){e.$set(e.connectModal,"show",t)},expression:"connectModal.show"}},[t("let-table",{ref:"connectNodeListLoading",staticStyle:{"margin-top":"20px"},attrs:{data:e.connectNodeList,stripe:"","empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{type:"expand",width:"40px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"install_step"},[t("let-steps",{attrs:{current:a.row.step||0}},[t("let-step",{attrs:{title:e.$t("connectNodeList.step1")}}),t("let-step",{attrs:{title:e.$t("connectNodeList.step2")}}),t("let-step",{attrs:{title:e.$t("connectNodeList.step3")}}),t("let-step",{attrs:{title:e.$t("connectNodeList.step4")}}),t("let-step",{attrs:{title:e.$t("connectNodeList.step5")}})],1),"fail"==a.row.installState&&1==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: please check file /usr/local/app/web/files/tarsnode.tgz ")]):e._e(),"fail"==a.row.installState&&2==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: please ensure the ssh service is enabled, and the ip/port/user/password config is right ")]):e._e(),"fail"==a.row.installState&&3==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: please install curl on the node ")]):e._e(),"fail"==a.row.installState&&4==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: please ensure the registry is available ")]):e._e(),"fail"==a.row.installState&&5==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: some unknown error, please check log ")]):e._e(),t("pre",{staticClass:"stdout"},[e._v(e._s(a.row.stdout))])],1)]}}])}),t("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.node_name"),prop:"ip"}}),t("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.connect"),prop:"connectInfo"}}),t("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.exists"),prop:"existsInfo"}}),t("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.install")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:{success_txt:"success"==a.row.installState,fail_txt:"fail"==a.row.installState}},[e._v(e._s(a.row.installInfo))])]}}])})],1),t("let-button",{attrs:{theme:"primary",disabled:e.executeConnect},on:{click:e.connectNode}},[e._v(e._s(e.btnConnectText))]),e._v("    "),t("let-button",{attrs:{theme:"primary",disabled:e.executeInstall},on:{click:e.installNode}},[e._v(e._s(e.btnInstallText))]),e._v("    "),t("let-button",{staticStyle:{float:"right"},attrs:{theme:"primary"},on:{click:e.closeConnectModal}},[e._v(e._s(e.$t("connectNodeList.btnClose")))])],1),t("let-modal",{attrs:{title:this.$t("nodes.add.title"),width:"500px"},on:{"on-confirm":e.showConnectNode,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[t("let-form",{ref:"detailForm",attrs:{itemWidth:"450px"}},[t("let-form-item",{attrs:{label:e.$t("nodes.node_name"),required:""}},[e.detailModal.add?t("let-input",{attrs:{type:"textarea",rows:3,placeholder:e.$t("nodes.nodeNameTips"),required:"","required-tip":e.$t("nodes.nodeNameTips")},model:{value:e.detailModal.model.node_name,callback:function(t){e.$set(e.detailModal.model,"node_name",t)},expression:"detailModal.model.node_name"}}):t("let-select",{attrs:{size:"small",required:"",multiple:""},model:{value:e.detailModal.model.update_node_name,callback:function(t){e.$set(e.detailModal.model,"update_node_name",t)},expression:"detailModal.model.update_node_name"}},e._l(e.nodeList,(function(a){return t("let-option",{key:a.node_name,attrs:{value:a.node_name}},[e._v(" "+e._s(a.node_name+"("+a.tars_version+")")+" ")])})),1)],1),t("let-form-item",{attrs:{label:e.$t("nodes.user"),required:""}},[t("let-input",{attrs:{size:"small"},model:{value:e.detailModal.model.user,callback:function(t){e.$set(e.detailModal.model,"user",t)},expression:"detailModal.model.user"}})],1),t("let-form-item",{attrs:{label:e.$t("nodes.port"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("nodes.portTips"),required:"","required-tip":e.$t("nodes.portTips"),pattern:"^[^\\s]+$","pattern-tip":e.$t("nodes.portTips")},model:{value:e.detailModal.model.port,callback:function(t){e.$set(e.detailModal.model,"port",t)},expression:"detailModal.model.port"}})],1),t("let-form-item",{attrs:{label:e.$t("nodes.password")}},[t("let-input",{attrs:{size:"small"},model:{value:e.detailModal.model.password,callback:function(t){e.$set(e.detailModal.model,"password",t)},expression:"detailModal.model.password"}})],1),t("let-form-item",{attrs:{label:e.$t("nodes.runuser"),required:""}},[t("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("nodes.runuserTips"),pattern:"^[^\\s]+$","pattern-tip":e.$t("nodes.runuserTips")},model:{value:e.detailModal.model.runuser,callback:function(t){e.$set(e.detailModal.model,"runuser",t)},expression:"detailModal.model.runuser"}})],1)],1)],1),t("let-modal",{attrs:{title:this.$t("nodes.label.title"),width:"500px"},on:{"on-confirm":e.onAddLabel},model:{value:e.labelModel.show,callback:function(t){e.$set(e.labelModel,"show",t)},expression:"labelModel.show"}},[t("let-form",{ref:"labelForm",attrs:{itemWidth:"450px"}},[t("let-table",{staticStyle:{"margin-top":"20px"},attrs:{data:e.labelModel.labelList,stripe:"","empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("nodes.label.name"),prop:"name"}}),t("let-table-column",{attrs:{title:e.$t("nodes.label.value"),prop:"value"}}),t("let-table-column",{attrs:{title:e.$t("nodes.label.operator")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.deleteLabel(e.labelModel.node_name,a.row.name)}}},[e._v(e._s(e.$t("nodes.label.delete")))])]}}])})],1),t("let-form-item",{attrs:{label:e.$t("nodes.label.name"),required:"",itemWidth:"150"}},[t("let-input",{attrs:{size:"small",required:"",width:"150px",pattern:"^[a-zA-Z0-9]([a-zA-Z0-9]+)?$"},model:{value:e.labelModel.model.name,callback:function(t){e.$set(e.labelModel.model,"name",t)},expression:"labelModel.model.name"}})],1),t("let-form-item",{attrs:{label:e.$t("nodes.label.value"),required:"",itemWidth:"150"}},[t("let-input",{attrs:{size:"small",required:"",width:"150px",pattern:"^[a-zA-Z0-9]([a-zA-Z0-9]+)?$"},model:{value:e.labelModel.model.value,callback:function(t){e.$set(e.labelModel.model,"value",t)},expression:"labelModel.model.value"}})],1)],1)],1)],1)},Lt=[],xt=a("c1df"),Ct=a.n(xt),Nt={name:"OperationNodes",data:function(){return{query:{node_name:""},nodeList:[],pageNum:1,pageSize:20,total:1,strict:!1,executeInstall:!1,executeConnect:!1,btnConnectText:"",btnInstallText:"",isCheckedAll:!1,connectNodeList:[],connectModal:{show:!1},showManualAddItem:!1,detailModal:{show:!1,add:!0,model:{node_name:"",update_node_name:[],user:"root",password:"",port:"22",runuser:"tars"}},labelModel:{show:!1,node_name:"",labelList:[],model:{name:"",value:""}}}},mounted:function(){this.getNodeList(1),this.isStrict()},methods:{isStrict:function(){var e=this;this.$ajax.getJSON("/server/api/is_strict").then((function(t){e.strict=t.strict})).catch((function(e){}))},updateLabel:function(e,t){for(var a=0;a0&&(a[0].installInfo=e.msg,a[0].installState=e.installState,a[0].step=e.step,a[0].stdout=e.stdout),e.rst||t.$tip.error(e.ip+":"+e.msg)})),t.getNodeList(1),t.btnInstallText=t.$t("connectNodeList.btnInstalled"),t.executeInstall=!1})).catch((function(e){t.btnInstallText=t.$t("connectNodeList.btnInstalled"),t.executeInstall=!1,t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}}}},Et=Nt,Dt=(a("d687"),Object(x["a"])(Et,St,Lt,!1,null,"ae1ec656",null)),It=Dt.exports,Tt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_templates",staticStyle:{"text-align":"center"}},[t("let-form",{attrs:{inline:"",itemWidth:"200px"}},[t("div",{staticStyle:{float:"right"}},[t("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.checkFramework}},[e._v(e._s(e.$t("nodes.btn.check")))]),e._v("     "),t("let-button",{attrs:{size:"small",theme:"info"},on:{click:e.openShowProblem}},[e._v(e._s(e.$t("nodes.btn.question")))])],1)]),t("br"),t("let-table",{ref:"checkLoading",attrs:{data:e.servers,stripe:"","row-class-name":e.tableRowClassName,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("checkTable.table.th.server_name"),prop:"serverName",width:"15%"}}),t("let-table-column",{attrs:{title:e.$t("checkTable.table.th.node_name"),prop:"nodeName",width:"15%"}}),t("let-table-column",{attrs:{title:e.$t("checkTable.table.th.obj_name"),prop:"objName",width:"55%"}}),t("let-table-column",{attrs:{title:e.$t("checkTable.table.th.status"),width:"15%"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticClass:"status"},[e._v(e._s(a.row.status))])]}}])})],1),t("let-modal",{attrs:{title:e.$t("checkTable.problemDialog.title"),width:"600px"},model:{value:e.showProblem,callback:function(t){e.showProblem=t},expression:"showProblem"}},[t("div",[t("br"),t("p",[e._v(e._s(e.$t("checkTable.problemDialog.info")))]),t("br"),t("p",[e._v(e._s(e.$t("checkTable.problemDialog.restartFramework")))]),t("p",[e._v(e._s(e.$t("checkTable.problemDialog.stopFramework")))]),t("p",[e._v(e._s(e.$t("checkTable.problemDialog.restartServer")))])])])],1)},Ot=[],qt={name:"OperationCheck",data:function(){return{showProblem:!1,servers:[]}},mounted:function(){},methods:{openShowProblem:function(){this.showProblem=!0},tableRowClassName:function(e){var t=e.row;e.rowIndex;return 1===t.check?"":2===t.check?"checking-row":0===t.check?"success-row":-1===t.check?"warning-row":""},checkFramework:function(){var e=this,t=this.$refs.checkLoading.$loading.show();this.$ajax.getJSON("/server/api/get_framework_list").then((function(a){t.hide();for(var o=0;o0?t("el-select",{attrs:{size:"small",filterable:""},model:{value:e.query.f_business_name,callback:function(t){e.$set(e.query,"f_business_name",t)},expression:"query.f_business_name"}},e._l(e.business,(function(a){return t("el-option",{key:a.f_id,attrs:{value:a.f_name}},[e._v(e._s(a.f_name))])})),1):t("el-input",{attrs:{size:"small"},model:{value:e.query.f_business_name,callback:function(t){e.$set(e.query,"f_business_name",t)},expression:"query.f_business_name"}})],1),t("el-form-item",{attrs:{label:e.$t("application.form.application")}},[e.application&&e.application.length>0?t("el-select",{attrs:{size:"small",filterable:""},model:{value:e.query.f_application_name,callback:function(t){e.$set(e.query,"f_application_name",t)},expression:"query.f_application_name"}},e._l(e.application,(function(a){return t("el-option",{key:a.f_id,attrs:{value:a.f_name}},[e._v(e._s(a.f_name))])})),1):t("el-input",{attrs:{size:"small"},model:{value:e.query.f_application_name,callback:function(t){e.$set(e.query,"f_application_name",t)},expression:"query.f_application_name"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))])],1),t("div",{staticStyle:{float:"right"}},[t("i",{staticClass:"el-icon-refresh-right",staticStyle:{margin:"10px"},on:{click:function(t){return e.fetchData()}}}),t("el-button",{staticStyle:{float:"right"},attrs:{size:"small",type:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("businessRelation.btn.add")))])],1)],1),t("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("business.form.business"),prop:"f_business_name"}}),t("let-table-column",{attrs:{title:e.$t("application.form.application"),prop:"f_application_name"}}),t("let-table-column",{attrs:{title:e.$t("businessRelation.form.person"),prop:"f_create_person"}}),t("let-table-column",{attrs:{title:e.$t("businessRelation.form.time"),prop:"f_create_time"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.removeItem(a.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),t("let-modal",{attrs:{title:e.$t("businessRelation.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?t("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),t("div",{attrs:{slot:"foot"},slot:"foot"})]),t("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("businessRelation.add.title"):this.$t("businessRelation.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?t("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[t("let-form-item",{attrs:{label:e.$t("application.form.application"),required:""}},[t("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.detailModal.model.f_application_name,callback:function(t){e.$set(e.detailModal.model,"f_application_name",t)},expression:"detailModal.model.f_application_name"}},e._l(e.application,(function(a){return t("let-option",{key:a.f_id,attrs:{value:a.f_name}},[e._v(e._s(a.f_name))])})),1)],1),t("let-form-item",{attrs:{label:e.$t("business.form.business"),required:""}},[t("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.detailModal.model.f_business_name,callback:function(t){e.$set(e.detailModal.model,"f_business_name",t)},expression:"detailModal.model.f_business_name"}},e._l(e.business,(function(a){return t("let-option",{key:a.f_id,attrs:{value:a.f_name}},[e._v(e._s(a.f_name))])})),1)],1)],1):e._e()],1)],1)},Qt=[],Xt={name:"OperationApplication",data:function(){return{query:{f_business_name:"",f_application_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1},business:[],application:[]}},mounted:function(){this.fetchData(),this.getBusinessData(),this.getApplicationData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_business_relation",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.f_id?"/server/api/update_business_relation":"/server/api/add_business_relation",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("businessRelation.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_business_relation",{f_id:e.f_id}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},getBusinessData:function(){var e=this;return this.$ajax.getJSON("/server/api/query_business").then((function(t){e.business=t}))},getApplicationData:function(){var e=this;return this.$ajax.getJSON("/server/api/query_application").then((function(t){e.application=t}))}}},ea=Xt,ta=(a("a302"),Object(x["a"])(ea,Zt,Qt,!1,null,null,null)),aa=ta.exports,oa=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_templates"},[t("el-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search.apply(null,arguments)}}},[t("el-form-item",{attrs:{label:e.$t("idc.grid.groupName")}},[t("el-input",{attrs:{size:"small"},model:{value:e.query.group_name,callback:function(t){e.$set(e.query,"group_name",t)},expression:"query.group_name"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))])],1),t("div",{staticStyle:{float:"right"}},[t("i",{staticClass:"el-icon-refresh-right",staticStyle:{margin:"10px"},on:{click:function(t){return e.fetchData()}}}),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.addGroup}},[e._v(e._s(e.$t("idc.btn.add")))])],1)],1),t("let-table",{ref:"table",staticClass:"hideFir",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{staticStyle:{display:"none"},attrs:{prop:"group_id"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.groupName"),prop:"group_name"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.groupNameCN"),prop:"group_name_cn"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.ipOrder"),prop:"ip_order"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.allowIpRule"),prop:"allow_ip_rule"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.dennyIpRule"),prop:"denny_ip_rule"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.lastuser"),prop:"lastuser"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.modifyTime"),prop:"modify_time"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.editItem(a.row)}}},[e._v(e._s(e.$t("operate.update")))]),t("let-table-operation",{on:{click:function(t){return e.removeItem(a.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),t("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("idc.btn.add"):this.$t("idc.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?t("let-form",{ref:"detailForm",staticClass:"two-columns",attrs:{itemWidth:"300px",columns:"2"}},[e.detailModal.isNew?e._e():t("let-form-item",{attrs:{label:e.$t("idc.grid.groupName"),required:""}},[e._v(" "+e._s(e.detailModal.model.group_name)+" ")]),e.detailModal.isNew?t("let-form-item",{attrs:{label:e.$t("idc.grid.groupName"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("idc.valid.groupName"),required:"","required-tip":e.$t("idc.valid.groupName"),pattern:"^[a-zA-Z-]([.a-zA-Z0-9-]+)?$","pattern-tip":e.$t("idc.valid.groupName")},model:{value:e.detailModal.model.group_name,callback:function(t){e.$set(e.detailModal.model,"group_name",t)},expression:"detailModal.model.group_name"}})],1):e._e(),t("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{label:e.$t("idc.grid.groupNameCN"),required:""}},[t("let-input",{attrs:{size:"small",required:"",placeholder:e.$t("idc.update.placeholder")},model:{value:e.detailModal.model.group_name_cn,callback:function(t){e.$set(e.detailModal.model,"group_name_cn",t)},expression:"detailModal.model.group_name_cn"}})],1),t("let-form-item",{attrs:{label:e.$t("idc.grid.ipOrder"),required:""}},[t("let-select",{attrs:{size:"small",placeholder:e.$t("idc.update.allowType"),required:""},model:{value:e.detailModal.model.ip_order,callback:function(t){e.$set(e.detailModal.model,"ip_order",t)},expression:"detailModal.model.ip_order"}},e._l(e.ipOrders,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item"),t("let-form-item",{attrs:{label:e.$t("idc.grid.allowIpRule")}},[t("let-select",{attrs:{required:"",multiple:""},model:{value:e.detailModal.model.allowList,callback:function(t){e.$set(e.detailModal.model,"allowList",t)},expression:"detailModal.model.allowList"}},e._l(e.allowList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{label:e.$t("idc.grid.dennyIpRule")}},[t("let-select",{attrs:{required:"",multiple:""},model:{value:e.detailModal.model.dennyList,callback:function(t){e.$set(e.detailModal.model,"dennyList",t)},expression:"detailModal.model.dennyList"}},e._l(e.dennyList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item",{attrs:{itemWidth:"242px"}},[t("let-input",{attrs:{placeholder:e.$t("idc.update.addIp"),size:"small"},model:{value:e.addIp.addAllow,callback:function(t){e.$set(e.addIp,"addAllow",t)},expression:"addIp.addAllow"}})],1),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addAllowIp}},[e._v(e._s(e.$t("operate.add")))]),t("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{itemWidth:"242px"}},[t("let-input",{attrs:{placeholder:e.$t("idc.update.addIp"),size:"small"},model:{value:e.addIp.addDenny,callback:function(t){e.$set(e.addIp,"addDenny",t)},expression:"addIp.addDenny"}})],1),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addDennyIp}},[e._v(e._s(e.$t("operate.add")))])],1):e._e()],1)],1)},sa=[],ia={name:"OperationIDCManage",data:function(){return{showManualAddItem:!1,items:[],query:{group_name:""},detailModal:{show:!1,model:null,isNew:!1},ipOrders:["denny_allow","allow_denny"],allowList:[],dennyList:[],addIp:{addAllow:"",addDenny:""}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_idc",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},getIpList:function(e){var t=[];return""!=e.trim()&&e.split("|").forEach((function(e){t.push(e.trim())})),t},addGroup:function(){this.allowList=[],this.dennyList=[],this.detailModal.model={group_name:"",group_name_cn:"",ip_order:"denny_allow",allow_ip_rule:"",denny_ip_rule:"",allowList:[],dennyList:[]},this.detailModal.show=!0,this.detailModal.isNew=!0},editItem:function(e){var t=this,a=this.getIpList(e.allow_ip_rule),o=this.getIpList(e.denny_ip_rule);this.detailModal.model={allowList:[],dennyList:[]},this.detailModal.model=Object.assign({},this.detailModal.model,e),this.allowList=a,this.dennyList=o,a.forEach((function(e){t.detailModal.model.allowList.push(e)})),o.forEach((function(e){t.detailModal.model.dennyList.push(e)})),this.detailModal.show=!0,this.detailModal.isNew=!1},removeItem:function(e){var t=this;this.$confirm(this.$t("idc.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_idc",e).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=this.detailModal.isNew?"/server/api/add_idc":"/server/api/update_idc",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null,this.detailModal.isNew=!1},addAllowIp:function(){if(this.validIp(this.addIp.addAllow)){if(this.allowList.includes(this.addIp.addAllow)&&this.detailModal.model.allowList.includes(this.addIp.addAllow))return void this.$tip.error("".concat(this.$t("idc.update.exists")));this.allowList.includes(this.addIp.addAllow)&&!this.detailModal.model.allowList.includes(this.addIp.addAllow)?(this.detailModal.model.allowList.push(this.addIp.addAllow),this.addIp.addAllow=""):(this.allowList.push(this.addIp.addAllow),this.detailModal.model.allowList.push(this.addIp.addAllow),this.addIp.addAllow="")}else this.$tip.error("".concat(this.$t("idc.update.errorIp")))},addDennyIp:function(){if(this.validIp(this.addIp.addDenny)){if(this.dennyList.includes(this.addIp.addDenny)&&this.detailModal.model.dennyList.includes(this.addIp.addDenny))return void this.$tip.error("".concat(this.$t("idc.update.exists")));this.dennyList.includes(this.addIp.addDenny)&&!this.detailModal.model.dennyList.includes(this.addIp.addDenny)?(this.detailModal.model.dennyList.push(this.addIp.addDenny),this.addIp.addDenny=""):(this.dennyList.push(this.addIp.addDenny),this.detailModal.model.dennyList.push(this.addIp.addDenny),this.addIp.addDenny="")}else this.$tip.error("".concat(this.$t("idc.update.errorIp")))},validIp:function(e){var t=new RegExp("^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.((1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)|\\*)$");return t.test(e)}}},ra=ia,la=(a("d751"),Object(x["a"])(ra,oa,sa,!1,null,null,null)),na=la.exports,ca=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_approval"},[t("el-card",{staticStyle:{"margin-top":"10px",padding:"15px"}},[t("div",[t("span",[e._v(e._s(e.$t("deployService.title.baseRegistry"))+" "),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.fetchRegistryData()}}})]),t("span",{staticStyle:{float:"right","margin-bottom":"10px"}},[t("el-button",{attrs:{type:"success",size:"small"},on:{click:e.showDockerLogin}},[e._v(e._s(e.$t("imageService.btn.docker"))+" ")]),e._v("    "),t("el-button",{staticStyle:{float:"right","margin-bottom":"10px"},attrs:{type:"primary",size:"small"},on:{click:e.addRegistryItem}},[e._v(e._s(e.$t("imageService.btn.add"))+" ")])],1)]),t("let-table",{ref:"tableRegistry",attrs:{data:e.baseRegistryLists,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("imageService.form.Registry"),prop:"registry",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.UserName"),prop:"username",width:"15%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.Mark"),prop:"remark",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.UpdateTime"),prop:"update_time"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.CreateTime"),prop:"create_time"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.editRegistryItem(a.row)}}},[e._v(e._s(e.$t("operate.update"))+" ")]),t("let-table-operation",{on:{click:function(t){return e.removeRegistryItem(a.row)}}},[e._v(e._s(e.$t("operate.delete"))+" ")])]}}])})],1)],1),t("br"),t("el-card",{staticStyle:{"margin-top":"10px",padding:"15px"}},[t("div",[t("span",[e._v(e._s(e.$t("deployService.title.baseImage"))+" "),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.fetchImageData()}}})]),t("el-button",{staticStyle:{float:"right","margin-bottom":"10px"},attrs:{type:"primary",size:"small"},on:{click:e.addImageItem}},[e._v(e._s(e.$t("imageService.btn.add"))+" ")])],1),t("let-table",{ref:"table",attrs:{data:e.baseLists,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("imageService.form.Image"),prop:"image",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.Registry"),prop:"registry",width:"10%"}}),t("let-table-column",{attrs:{title:"sha256",prop:"sha",width:"30%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.Mark"),prop:"remark",width:"10%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.Result"),prop:"result",width:"15%"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.editImageItem(a.row)}}},[e._v(e._s(e.$t("operate.update"))+" ")]),t("let-table-operation",{on:{click:function(t){return e.removeImageItem(a.row)}}},[e._v(e._s(e.$t("operate.delete"))+" ")]),t("let-table-operation",{on:{click:function(t){return e.pullImageItem(a.row)}}},[e._v(e._s(e.$t("operate.pull"))+" ")])]}}])})],1)],1),t("let-modal",{attrs:{title:e.baseRegistryModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),footShow:!1},model:{value:e.baseRegistryModal.show,callback:function(t){e.$set(e.baseRegistryModal,"show",t)},expression:"baseRegistryModal.show"}},[t("let-form",{ref:"detailRegistryForm",attrs:{rules:e.registryRules}},[t("let-form-item",{attrs:{label:e.$t("imageService.form.Registry")}},[t("let-input",{attrs:{size:"small",placeholder:"docker.io"},model:{value:e.baseRegistryModal.model.registry,callback:function(t){e.$set(e.baseRegistryModal.model,"registry",t)},expression:"baseRegistryModal.model.registry"}})],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.UserName")}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.UserName")},model:{value:e.baseRegistryModal.model.username,callback:function(t){e.$set(e.baseRegistryModal.model,"username",t)},expression:"baseRegistryModal.model.username"}})],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.Password")}},[t("let-input",{attrs:{size:"small",type:"password",placeholder:e.$t("imageService.form.Password")},model:{value:e.baseRegistryModal.model.password,callback:function(t){e.$set(e.baseRegistryModal.model,"password",t)},expression:"baseRegistryModal.model.password"}})],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.Mark"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.Mark")},model:{value:e.baseRegistryModal.model.remark,callback:function(t){e.$set(e.baseRegistryModal.model,"remark",t)},expression:"baseRegistryModal.model.remark"}})],1),t("el-button",{attrs:{type:"success",size:"small"},on:{click:e.saveRegistryItem}},[e._v(e._s(e.$t("common.submit"))+" ")]),e._v("    "),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){e.baseRegistryModal.show=!1}}},[e._v(e._s(e.$t("common.cancel"))+" ")]),e._v("    "),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.checkDockerRegistry}},[e._v(e._s(e.$t("imageService.btn.checkRegistry"))+" ")])],1)],1),t("let-modal",{attrs:{title:e.baseModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit")},on:{"on-confirm":e.saveImageItem},model:{value:e.baseModal.show,callback:function(t){e.$set(e.baseModal,"show",t)},expression:"baseModal.show"}},[t("let-form",{ref:"detailForm",attrs:{rules:e.rules,inline:""}},[t("let-form-item",{attrs:{label:e.$t("imageService.form.Registry"),required:""}},[t("let-select",{attrs:{size:"small"},model:{value:e.baseModal.model.registryId,callback:function(t){e.$set(e.baseModal.model,"registryId",t)},expression:"baseModal.model.registryId"}},e._l(e.baseRegistryLists,(function(a){return t("let-option",{key:a.id,attrs:{value:a.id}},[e._v(e._s(a.registry+"("+a.remark+")"))])})),1)],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.Image"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.Image")},model:{value:e.baseModal.model.image,callback:function(t){e.$set(e.baseModal.model,"image",t)},expression:"baseModal.model.image"}})],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.Mark"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.Mark")},model:{value:e.baseModal.model.remark,callback:function(t){e.$set(e.baseModal.model,"remark",t)},expression:"baseModal.model.remark"}})],1)],1)],1),t("let-modal",{attrs:{title:e.$t("imageService.btn.docker"),footShow:!1,width:"80%"},model:{value:e.nodeListModal.show,callback:function(t){e.$set(e.nodeListModal,"show",t)},expression:"nodeListModal.show"}},[t("el-table",{ref:"nodeListLoading",staticStyle:{margin:"10px"},attrs:{data:e.nodeListModal.nodeList,stripe:"","row-class-name":e.tableRowClassName,"empty-text":e.$t("common.nodata")},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{type:"selection",width:"80"}}),t("el-table-column",{attrs:{label:e.$t("nodeList.table.th.node_name"),prop:"node_name",width:"150"}}),t("el-table-column",{attrs:{label:e.$t("nodeList.table.th.present_state"),width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:"active"===a.row.present_state?"active":"inactive"},[e._v(e._s(a.row.present_state))])]}}])}),t("el-table-column",{attrs:{label:e.$t("nodeList.table.th.version"),prop:"tars_version",width:"200"}}),t("el-table-column",{attrs:{label:e.$t("nodeList.table.th.result")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{domProps:{innerHTML:e._s(a.row.result)}})]}}])})],1),t("div",[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.forceDockerLogin}},[e._v(e._s(e.$t("imageService.btn.docker"))+" ")]),t("let-pagination",{staticStyle:{display:"inline",float:"right"},attrs:{page:e.nodeListModal.pageNum,total:e.nodeListModal.total},on:{change:e.gotoPage}})],1)],1)],1)},da=[],ma=(a("3ca3"),a("ddb0"),a("c740"),a("2ca0"),{name:"OperationImage",data:function(){return{baseRegistryLists:[],baseRegistryModal:{show:!1,model:{},isNew:!1},baseLists:[],nodeListModal:{show:!1,nodeList:[],pageNum:1,pageSize:20,total:1,multipleSelection:[]},baseModal:{show:!1,model:{},isNew:!1},registryRules:{remark:[{required:!0,message:"".concat(this.$t("imageService.node.markTip")),trigger:"blur"}]},rules:{image:[{required:!0,message:"".concat(this.$t("imageService.node.imageAddressTip")),trigger:"blur"}],remark:[{required:!0,message:"".concat(this.$t("imageService.node.markTip")),trigger:"blur"}]}}},mounted:function(){this.fetchRegistryData()},methods:{showDockerLogin:function(){this.nodeListModal.show=!0,this.getNodeList()},forceDockerLogin:function(){var e=this;return Object(J["a"])(Object(A["a"])().mark((function t(){var a,o;return Object(A["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(0!=e.nodeListModal.multipleSelection.length){t.next=3;break}return e.$Notice({message:e.$t("imageService.form.Choose"),type:"warning"}),t.abrupt("return");case 3:a=Object(A["a"])().mark((function t(a){var o,s,i;return Object(A["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return o=e.nodeListModal.multipleSelection[a].node_name,s=e.nodeListModal.nodeList.findIndex((function(e){return e.node_name==o})),e.nodeListModal.nodeList[s].result="docker login...",e.$set(e.nodeListModal.nodeList,s,e.nodeListModal.nodeList[s]),t.prev=4,t.next=7,e.$ajax.postJSON("/server/api/force_docker_login",{nodeName:o});case 7:i=t.sent,i.forEach((function(t){var a="";a=-1!=t.indexOf("Succeeded")?"color: green":"color: red",e.nodeListModal.nodeList[s].result+='
'+t+"
"})),e.$set(e.nodeListModal.nodeList,s,e.nodeListModal.nodeList[s]),t.next=17;break;case 12:t.prev=12,t.t0=t["catch"](4),e.nodeListModal.nodeList[s].result+='
'+"".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg)+"
",e.$set(e.nodeListModal.nodeList,s,e.nodeListModal.nodeList[s]),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 17:case"end":return t.stop()}}),t,null,[[4,12]])})),o=0;case 5:if(!(o"})}))},babe:function(e,t,a){"use strict";a("72a9")},c8a3:function(e,t,a){},cf77:function(e,t,a){},d1bb:function(e,t,a){},d687:function(e,t,a){"use strict";a("9d68")},d751:function(e,t,a){"use strict";a("6dd0")},e3d0:function(e,t,a){"use strict";a("cf77")},eb07:function(e,t,a){"use strict";a("a7420")},ebcc:function(e,t,a){},ebdf:function(e,t,a){"use strict";a("c8a3")},ec60:function(e,t,a){"use strict";a("0b04")},ecd7:function(e,t,a){"use strict";a("606f")}}); diff --git a/client/dist/static/js/index.c1f7556b.js b/client/dist/static/js/index.c1f7556b.js new file mode 100644 index 00000000..98f71083 --- /dev/null +++ b/client/dist/static/js/index.c1f7556b.js @@ -0,0 +1 @@ +(function(e){function t(t){for(var o,r,l=t[0],n=t[1],c=t[2],m=0,u=[];m0&&(t.configModal.model.base_image_id=t.baseImageList[0].id)})).catch((function(e){o.hide(),t.closeConfigModal(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}));case 6:case"end":return a.stop()}}),a)})))()},configServer:function(e){for(var t in this.configModal.show=!0,this.getTemplateList(),this.getGroupList(),this.getServerConfig(e),this.batchEditConf.itemEnable=Object(P["a"])({},oe),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[t]=!0},batchConfigServer:function(){var e=this.serverList.filter((function(e){return!0===e.isChecked})).map((function(e,t){return e.id}));if(1!=e.length)for(var t in this.configModal.show=!0,this.batchEditConf.show=!1,this.getTemplateList(),this.getGroupList(),this.configModal.model=Object(P["a"])({},oe),this.configModal.model.id=e,this.batchEditConf.itemEnable=Object(P["a"])({},oe),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[t]=!1;else this.configServer(e[0])},saveConfig:function(e){var t=this;if(this.$refs.configForm.validate()){if(!e)for(var a in this.batchEditConf.itemEnable.id=!0,this.configModal.model.enable_group&&(this.batchEditConf.itemEnable.ip_group_name=!0),this.batchEditConf.itemEnable)this.batchEditConf.itemEnable[a]||delete this.configModal.model[a];this.configModal.model.run_type_bool?this.configModal.model.run_type="":this.configModal.model.run_type="container";var o=e?"/server/api/update_server":"/server/api/batch_update_server",s=this.$Loading.show();this.$ajax.postJSON(o,Object(P["a"])({isBak:this.configModal.model.bak_flag},this.configModal.model)).then((function(e){s.hide(),t.getServerList(),t.closeConfigModal(),t.$tip.success(t.$t("serverList.restart.success"))})).catch((function(e){s.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.message||e.err_msg))}))}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1,this.batchEditConf.show=!0,this.configModal.model=null},checkTaskStatus:function(e,t){var a=this;return new Promise((function(o,s){a.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(t){1===t.status||0===t.status?setTimeout((function(){o(a.checkTaskStatus(e))}),3e3):2===t.status?o("taskid: ".concat(t.task_no)):s(new Error("taskid: ".concat(t.task_no)))})).catch((function(i){t?s(new Error(i.err_msg||i.message||a.$t("common.networkErr"))):setTimeout((function(){o(a.checkTaskStatus(e,!0))}),3e3)}))}))},updateFlowStatus:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.postJSON("/server/api/update_flowstatus",{server_id:e,status:t,node_list:[a]}).then((function(e){s.hide(),o.getServerList(),o.$t("common.success")})).catch((function(e){s.hide(),o.getServerList(),o.$tip.error({title:"update flow status fail.",message:e.err_msg||e.message||o.$t("common.networkErr")})}))},addTask:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!0,items:[{server_id:e,command:t}]}).then((function(e){return o.checkTaskStatus(e).then((function(e){s.hide(),o.getServerList(),o.$tip.success({title:a.success,message:e})})).catch((function(e){throw e}))})).catch((function(e){s.hide(),o.getServerList(),o.$tip.error({title:a.error,message:e.err_msg||e.message||o.$t("common.networkErr")})}))},restartServer:function(e){this.addTask(e,"restart",{success:this.$t("serverList.restart.success"),error:this.$t("serverList.restart.failed")})},stopServer:function(e){var t=this;this.$confirm(this.$t("serverList.stopService.msg.stopService"),this.$t("common.alert")).then((function(){t.addTask(e,"stop",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")})}))},undeployServer:function(e){var t=this;"active"===e.present_state?this.$tip.error("".concat(this.$t("serverList.tips.undeploy"))):this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then((function(){t.addTask(e.id,"undeploy_tars",{success:t.$t("serverList.undeploy.success"),error:t.$t("serverList.undeploy.failed")})}))},undeployServers:function(e){var t=this,a=e.filter((function(e){return"active"===e.present_state}));a.length>0?this.$tip.error("".concat(this.$t("serverList.tips.undeploy"))):this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then((function(){e.forEach((function(e){t.addTask(e.id,"undeploy_tars",{success:t.$t("serverList.undeploy.success"),error:t.$t("serverList.undeploy.failed")})}))}))},manageServant:function(e){var t=this;this.servantModal.show=!0;var a=this.$loading.show();this.$ajax.getJSON("/server/api/adapter_conf_list",{id:e.id}).then((function(o){a.hide(),t.servantModal.model=o,t.servantModal.currentServer=e})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))},closeServantModal:function(){this.servantModal.show=!1,this.servantModal.model=null,this.servantModal.currentServer=null},configServant:function(e){if(this.servantDetailModal.model={application:this.servantModal.currentServer.application,server_name:this.servantModal.currentServer.server_name,obj_name:"",node_name:"",endpoint:"",servant:"",thread_num:"",max_connections:"200000",queuecap:"10000",queuetimeout:"60000",allow_ip:"",protocol:"not_tars",handlegroup:""},this.servantDetailModal.isNew=!0,e){var t=this.servantModal.model.find((function(t){return t.id===e}));t.obj_name=t.servant.split(".")[2],this.servantDetailModal.model=Object.assign({},this.servantDetailModal.model,t),this.servantDetailModal.isNew=!1}this.servantDetailModal.show=!0},closeServantDetailModal:function(){this.$refs.servantDetailForm&&this.$refs.servantDetailForm.resetValid(),this.servantDetailModal.show=!1,this.servantDetailModal.model=null},checkServantEndpoint:function(e){var t=e.split(/\s-/),a=/^tcp|udp|ssl$/i,o=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/i,s=/^h\s[^\s]+/i,i=/^t\s([1-9]|[1-9]\d+)$/i,r=/^p\s\d{2,5}$/i,l=!0;if(a.test(t[0])){for(var n=0,c=1;c65535||n++,r=null}}l=3===n}else l=!1;return l},saveServantDetail:function(){var e=this;if(this.$refs.servantDetailForm.validate()){var t=this.$Loading.show();if(this.servantDetailModal.isNew){var a=this.servantDetailModal.model;a.servant=[a.application,a.server_name,a.obj_name].join("."),this.$ajax.postJSON("/server/api/add_adapter_conf",a).then((function(a){t.hide(),e.servantModal.model.unshift(a),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}else this.servantDetailModal.model.servant=this.servantDetailModal.model.application+"."+this.servantDetailModal.model.server_name+"."+this.servantDetailModal.model.obj_name,this.$ajax.postJSON("/server/api/update_adapter_conf",this.servantDetailModal.model).then((function(a){t.hide(),e.servantModal.model=e.servantModal.model.map((function(e){return e.id===a.id?a:e})),e.$tip.success(e.$t("common.success")),e.closeServantDetailModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},deleteServant:function(e){var t=this;this.$confirm(this.$t("serverList.servant.a"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_adapter_conf",{id:e}).then((function(o){a.hide(),t.servantModal.model=t.servantModal.model.filter((function(t){return t.id!==e})),t.$tip.success(t.$t("common.success"))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))}))},showMoreCmd:function(e){var t=this;this.moreCmdModal.model={selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){t.$refs.moreCmdForm&&t.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.moreCmdModal.currentServer=e,this.isBatchShowCmd=!1,this.$ajax.getJSON("/server/api/config_file_list",{level:5,application:e.application,server_name:e.server_name}).then((function(e){t.moreCmdModal.model&&(t.moreCmdModal.model.configs=e)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},batchShowMoreCmd:function(){var e=this,t=this.serverList.filter((function(e){return!0===e.isChecked}));this.moreCmdModal.model={selected:"setloglevel",setloglevel:"NONE",loadconfig:"",command:"",configs:null},this.moreCmdModal.unwatch=this.$watch("moreCmdModal.model.selected",(function(){e.$refs.moreCmdForm&&e.$refs.moreCmdForm.resetValid()})),this.moreCmdModal.show=!0,this.isBatchShowCmd=!0,1===t.length&&(this.isBatchShowCmd=!1,this.moreCmdModal.currentServer=t[0],this.$ajax.getJSON("/server/api/config_file_list",{level:5,application:t[0].application,server_name:t[0].server_name}).then((function(t){e.moreCmdModal.model&&(e.moreCmdModal.model.configs=t)})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))})))},sendCommand:function(e,t,a){var o=this,s=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:t}).then((function(e){s.hide();var t=e[0].err_msg.replace(/\n/g,"
");if(0!==e[0].ret_code)throw new Error("".concat(e[0].application,".").concat(e[0].server_name,"_").concat(e[0].node_name,":
").concat(t));o.commandHTML=t,o.dialogCommandVisible=!0})).catch((function(e){s.hide();var t={title:o.$t("common.error"),message:e.err_msg||e.message};a&&(t.duration=0),o.$tip.error(t)}))},invokeMoreCmd:function(){var e=this;if(this.isBatchShowCmd){var t=this.serverList.filter((function(e){return!0===e.isChecked})),a=this.moreCmdModal.model;"undeploy_tars"===a.selected?this.undeployServers(t):"setloglevel"===a.selected?t.forEach((function(t){e.sendCommand(t.id,"tars.setloglevel ".concat(a.setloglevel))})):"command"===a.selected&&this.$refs.moreCmdForm.validate()?t.forEach((function(t){e.sendCommand(t.id,a.command,!0)})):"connection"===a.selected&&t.forEach((function(t){e.sendCommand(t.id,"tars.connection",!0)}))}else{var o=this.moreCmdModal.model,s=this.moreCmdModal.currentServer;"undeploy_tars"===o.selected?this.undeployServer(s):"setloglevel"===o.selected?this.sendCommand(s.id,"tars.setloglevel ".concat(o.setloglevel)):"loadconfig"===o.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(s.id,"tars.loadconfig ".concat(o.loadconfig)):"command"===o.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(s.id,o.command,!0):"connection"===o.selected&&this.sendCommand(s.id,"tars.connection",!0)}this.closeMoreCmdModal()},closeMoreCmdModal:function(){this.$refs.moreCmdForm&&this.$refs.moreCmdForm.resetValid(),this.moreCmdModal.unwatch&&this.moreCmdModal.unwatch(),this.moreCmdModal.show=!1,this.moreCmdModal.model=null,this.isBatchShowCmd=!1},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},onCopy:function(e){this.$tip.success(this.$t("common.success"))},onError:function(e){this.$tip.error(this.$t("serverList.servant.copyErr"))},showTemplateView:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/view_server_merge",{application:e.application,serverName:e.server_name,nodeName:e.node_name}).then((function(e){a.hide(),t.templateMoadal.model={template:"\n".concat(e.template)},t.templateMoadal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},closeTemplateMoadal:function(){this.templateMoadal.show=!1,this.templateMoadal.model=null},showStatusModal:function(e){this.getServerStatusDatil(e.id)},batchshowStatusModal:function(){var e=this.checkedServers.map((function(e){return e.id}));this.getServerStatusDatil(e)},getServerStatusDatil:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:"tars.viewstatus"}).then((function(e){a.hide(),e.forEach((function(e){e.service_id="".concat(e.application,".").concat(e.server_name,"_").concat(e.node_name),0==e.ret_code?e.err_msg="".concat(t.$t("serverList.tips.success"),"\n")+e.err_msg:e.err_msg="".concat(t.$t("serverList.tips.error"),"\n")+e.err_msg})),t.serverStatusModal.model={statusList:e},t.serverStatusModal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))}))},serverStatusStyle:function(e){return-1==e?"color: red":"color : #9096A3 "},closeStatusModal:function(){this.serverStatusModal.model=null,this.serverStatusModal.show=!1},goMarket:function(e){var t;t=e.source["tars.io/CloudProduct"]?"/static/market/index.html#/market/product/".concat(e.source["tars.io/CloudInstall"].group,"/").concat(e.source["tars.io/CloudInstall"].name,"/").concat(e.source["tars.io/CloudInstall"].version):"/static/market/index.html#/market/service/".concat(e.source["tars.io/CloudInstall"].group,"/").concat(e.source["tars.io/CloudInstall"].name,"/").concat(e.source["tars.io/CloudInstall"].version),window.open(t)}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getServerList(),this.getServerNotifyList(1)},beforeRouteEnter:function(e,t,a){a(a((function(e){e.getServerNotifyList(1)})))},beforeRouteUpdate:function(e,t,a){a(a((function(e){e.getServerNotifyList(1)})))},linkDownload:function(e){window.open(e,"_blank")}},ie=se,re=(a("3578"),Object(x["a"])(ie,z,F,!1,null,null,null)),le=re.exports,ne=a("67ac"),ce=(a("2532"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_server_publish"},[t("div",{staticClass:"table_head"},[t("h4",[e._v(" "+e._s(this.$t("serverList.title.serverList"))+" "),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.getServerList()}}})])]),t("div",[e.serverList&&e.serverList.length>0?t("let-table",{ref:"table",attrs:{data:e.serverList,"empty-msg":e.$t("common.noService")}},[t("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(a){return[t("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(a){return[t("let-checkbox",{attrs:{value:a.row.id},model:{value:a.row.isChecked,callback:function(t){e.$set(a.row,"isChecked",t)},expression:"scope.row.isChecked"}})]}}],null,!1,1693185143)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(a){return[a.row.enable_set?t("p",{staticStyle:{"max-width":"200px"}},[e._v(" "+e._s(e.$t("common.set.setName"))+":"+e._s(a.row.set_name)),t("br"),e._v(" "+e._s(e.$t("common.set.setArea"))+":"+e._s(a.row.set_area)),t("br"),e._v(" "+e._s(e.$t("common.set.setGroup"))+":"+e._s(a.row.set_group)+" ")]):t("span",[e._v(e._s(e.$t("common.disable")))])]}}],null,!1,1083854891)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return["Inactive"===a.row.setting_state?t("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(a.row.setting_state))]):t("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(a.row.setting_state))])]}}],null,!1,1039889159)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return["0"!=a.row.query_ret_code?t("span",{staticStyle:{color:"#FF0000"}},[e._v("Inactive")]):"Active"===a.row.present_state_in_node?t("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(a.row.present_state_in_node))]):t("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(a.row.present_state_in_node))])]}}],null,!1,350457171)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(a.row.patch_time)))])]}}],null,!1,3144837894)}),t("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.totalPage,page:e.page},on:{change:e.changePage},slot:"pagination"}),t("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.uploadPublishModal}},[e._v(e._s(e.$t("pub.dlg.upload")))]),e._v("    "),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){return e.openPublishModal(!1)}}},[e._v(e._s(e.$t("pub.btn.pub")))]),e._v("    "),e.serverList&&e.serverList.length>0?t("let-button",{attrs:{size:"small"},on:{click:e.gotoHistory}},[e._v(e._s(e.$t("pub.btn.history")))]):e._e(),e._v("    "),t("let-button",{attrs:{size:"small"},on:{click:e.gotoPackage}},[e._v(e._s(e.$t("managePackage.title")))])],1)],1):e._e(),t("let-modal",{attrs:{title:e.$t("index.rightView.tab.patch"),width:"880px",footShow:!1},on:{close:e.closePublishModal,"on-confirm":e.savePublishServer},model:{value:e.publishModal.show,callback:function(t){e.$set(e.publishModal,"show",t)},expression:"publishModal.show"}},[e.publishModal.model?t("let-form",{ref:"publishForm",attrs:{itemWidth:"100%"}},[t("let-form-item",{attrs:{label:e.$t("serverList.servant.appService")}},[e._v(" "+e._s(e.publishModal.model.application)+"·"+e._s(e.publishModal.model.server_name)+" ")]),t("let-form-item",{attrs:{label:e.$t("pub.dlg.ip")}},e._l(e.publishModal.model.serverList,(function(a){return t("div",{key:a.id},[e._v(" "+e._s(a.node_name)+" ")])})),0),t("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[t("let-input",{model:{value:e.publishModal.model.update_text,callback:function(t){e.$set(e.publishModal.model,"update_text",t)},expression:"publishModal.model.update_text"}})],1),e.patchRadioData.length>1?t("let-form-item",{attrs:{label:e.$t("pub.dlg.patchType")}},[t("let-radio-group",{attrs:{type:"button",size:"small",data:e.patchRadioData},on:{change:e.patchChange},model:{value:e.patchType,callback:function(t){e.patchType=t},expression:"patchType"}})],1):e._e(),e.publishModal.model.show?t("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[t("div",[t("let-select",{staticStyle:{width:"70%"},attrs:{size:"small",required:"","required-tip":e.$t("pub.dlg.ab")},model:{value:e.publishModal.model.patch_id,callback:function(t){e.$set(e.publishModal.model,"patch_id",t)},expression:"publishModal.model.patch_id"}},e._l(e.publishModal.model.patchList,(function(a,o){return t("let-option",{key:a.id,attrs:{value:a.id,title:a.id+"|PubTime:"+a.publish_time+"|UploadTime:"+a.upload_time+"|"+a.upload_user+"|"+a.comment}},[t("div",[0==o?t("span",{domProps:{innerHTML:e._s(e.imgNew)}}):t("span",{domProps:{innerHTML:e._s(e.imgSpace)}},[e._v(" ")]),e.includes(e.nowVersion,a.id)?t("span",{domProps:{innerHTML:e._s(e.imgCur)}}):t("span",{domProps:{innerHTML:e._s(e.imgSpace)}}),e._v(" "+e._s(a.id)+"| "+e._s("PubTime:"+a.publish_time)+" | "+e._s("UploadTime:"+a.upload_time)+" |"+e._s(a.upload_user)+"| "+e._s(a.comment)+" ")])])})),1),e._v("     "),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.showUploadModal}},[e._v(e._s(e.$t("pub.dlg.upload")))])],1)]):e._e(),t("let-form-item",[t("div",{staticClass:"elegant-switch"},[t("let-switch",{attrs:{size:"mini"},on:{change:e.changeElegantStatus},model:{value:e.elegantChecked,callback:function(t){e.elegantChecked=t},expression:"elegantChecked"}},[t("span",{attrs:{slot:"open"},slot:"open"},[e._v(e._s(e.$t("pub.dlg.elegantPublish")))]),t("span",{attrs:{slot:"close"},slot:"close"},[e._v(e._s(e.$t("pub.dlg.commomPublish")))])]),e._v("     "),e.elegantChecked?t("div",{staticClass:"elegant-num"},[t("span",{staticClass:"elegant-label"},[e._v(e._s(e.$t("pub.dlg.elegantEachNum")))]),t("let-input-number",{staticClass:"elegant-box",attrs:{max:20,min:1,step:1,size:"small"},model:{value:e.eachNum,callback:function(t){e.eachNum=t},expression:"eachNum"}})],1):e._e()],1)]),e._v("    "),t("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.savePublishServer}},[e._v(e._s(e.$t("common.patch")))]),e._v("       "),t("let-button",{attrs:{size:"small"},on:{click:e.gotoPackage}},[e._v(e._s(e.$t("managePackage.title")))])],1):e._e()],1),t("let-modal",{attrs:{title:e.$t("pub.dlg.upload"),width:"880px",footShow:!1},on:{"on-cancel":e.closeUploadModal},model:{value:e.uploadModal.show,callback:function(t){e.$set(e.uploadModal,"show",t)},expression:"uploadModal.show"}},[e.uploadModal.model?t("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage.apply(null,arguments)}}},[t("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[t("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.choose"))+" ")]),e.uploadModal.model.file?t("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),t("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[t("let-input",{attrs:{type:"textarea",rows:3},model:{value:e.uploadModal.model.comment,callback:function(t){e.$set(e.uploadModal.model,"comment",t)},expression:"uploadModal.model.comment"}})],1),t("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),t("PublishStatus",{ref:"publishStatus"})],1),t("let-modal",{attrs:{width:"1000px",footShow:!1,title:e.$t("managePackage.title")},model:{value:e.showPackage,callback:function(t){e.showPackage=t},expression:"showPackage"}},[t("let-table",{ref:"packageTable",attrs:{data:e.packageList,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c1"),prop:"id"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c2"),prop:"server"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c7"),prop:"upload_user"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c3"),prop:"upload_time"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c4"),prop:"comment"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c5"),prop:"publish_time"}}),t("let-table-column",{attrs:{title:e.$t("managePackage.table.th.c6")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",[t("a",{staticClass:"let-table__operation",attrs:{target:"_blank",href:"/pages/server/api/download_package?id=".concat(a.row.id,"&name=").concat(a.row.tgz)}},[e._v(e._s(e.$t("operate.download")))])]),t("let-table-operation",{on:{click:function(t){return e.deletePackage(a.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])}),t("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.packageTotalPage,page:e.packagePage},on:{change:e.changePackagePage},slot:"pagination"}),t("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showPackage=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1)],1),t("let-modal",{attrs:{width:"1200px",footShow:!1,title:e.$t("pub.btn.history")},model:{value:e.showHistory,callback:function(t){e.showHistory=t},expression:"showHistory"}},[t("let-form",{nativeOn:{submit:function(t){return t.preventDefault(),e.getHistoryList.apply(null,arguments)}}},[t("let-form-item",{attrs:{itemWidth:"100%",label:e.$t("pub.date")}},[t("let-date-range-picker",{attrs:{start:e.startTime,end:e.endTime},on:{"update:start":function(t){e.startTime=t},"update:end":function(t){e.endTime=t}}}),t("let-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),t("let-table",{ref:"historyTable",attrs:{data:e.totalHistoryList,title:e.$t("historyList.title"),"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("historyList.table.th.c1"),prop:"create_time"}}),t("let-table-column",{attrs:{title:e.$t("serverList.servant.taskID"),prop:"task_no"}}),t("let-table-column",{attrs:{title:e.$t("historyList.table.th.c2")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(a.row.serial?e.$t("common.yes"):e.$t("common.no")))])]}}])}),t("let-table-column",{attrs:{title:e.$t("historyList.table.th.c3"),prop:"userName"}}),t("let-table-column",{attrs:{title:e.$t("serverList.dlg.title.taskStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",[e._v(e._s(e.statusMap[a.row.status]||"-"))])]}}])}),t("let-table-column",{attrs:{title:e.$t("historyList.table.th.c4")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.viewTask(a.row.task_no)}}},[e._v(e._s(e.$t("operate.view")))]),t("let-table-operation",{on:{click:function(t){return e.deleteTask(a.row.task_no)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])}),t("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.historyTotalPage,page:e.historyPage},on:{change:e.changeHistoryPage},slot:"pagination"}),t("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showHistory=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1)],1),t("let-modal",{attrs:{title:e.$t("historyList.table.th.c4"),width:"1200px",footShow:!1},on:{"on-cancel":function(t){e.taskModal.show=!1}},model:{value:e.taskModal.show,callback:function(t){e.$set(e.taskModal,"show",t)},expression:"taskModal.show"}},[e.taskModal.model?t("let-table",{attrs:{data:e.taskModal.model.items}},[t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c1"),prop:"item_no"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c5"),prop:"command"}}),t("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),t("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}}),t("let-table-column",{attrs:{title:e.$t("common.status"),prop:"status_info"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c7"),prop:"execute_info"}})],1):e._e()],1)],1)}),de=[],me=(a("843c"),function(){var e=this,t=e._self._c;return t("div",[t("let-modal",{attrs:{title:e.$t("serverList.table.th.result"),width:"70%",footShow:!1},on:{"on-cancel":e.onClose,close:e.onClose},model:{value:e.finishModal.show,callback:function(t){e.$set(e.finishModal,"show",t)},expression:"finishModal.show"}},[e.finishModal.model?t("let-table",{attrs:{title:e.$t("serverList.servant.taskID")+e.finishModal.model.task_no,data:e.finishModal.model.items}},[t("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"200px"}}),t("let-table-column",{attrs:{title:e.$t("common.status"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-tag",{attrs:{theme:3==a.row.status?"success":4==a.row.status?"danger":"",checked:""}},[e._v(" "+e._s(e.statusConfig[a.row.status]+(2!=a.row.status&&3!=a.row.status&&4!=a.row.status?a.row.desc:""))+" ")])]}}],null,!1,1412257332)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.result"),prop:"execute_info"}})],1):e._e()],1)],1)}),ue=[],pe={name:"PublishStatus",data:function(){return{closeCallback:null,timerId:null,finishModal:{show:!1,model:{task_no:"",items:[]}},statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.preparing"),2:this.$t("serverList.restart.running"),3:this.$t("serverList.restart.success"),4:this.$t("serverList.restart.failed"),5:this.$t("serverList.restart.cancel"),6:this.$t("serverList.restart.pauseFlow")},statusMap:{0:"EM_T_NOT_START",1:"EM_T_PREPARE",2:"EM_T_RUNNING",3:"EM_T_SUCCESS",4:"EM_T_FAILED",5:"EM_T_CANCEL",6:"EM_T_PARIAL"},endStatus:[3,4]}},methods:{onClose:function(){this.closeCallback&&this.closeCallback(),clearTimeout(this.timerId)},savePublishServer:function(e,t,a,o){var s=this;a=a||"",o=o||e.model.patch_id.toString(),this.closeCallback=t;var i=[],r=e.elegant||!1;e.model.serverList.forEach((function(t){i.push({server_id:t.id.toString(),command:e.command||"patch_tars",parameters:{patch_id:o,bak_flag:t.bak_flag||!1,update_text:e.model.update_text||"",group_name:a,run_type:t.run_type||""}})}));var l=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!r,elegant:r,eachnum:e.eachnum||1,items:i}).then((function(e){l.hide(),s.finishModal.model.task_no=e,s.finishModal.show=!0,s.getTaskRepeat(e)})).catch((function(e){l.hide(),s.$tip.error("".concat(s.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getTaskRepeat:function(e){var t=this;this.timerId&&clearTimeout(this.timerId);var a=function a(){t.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(e){var o=!0;e.items.forEach((function(e){t.endStatus.includes(e.status)||(o=!1),e.percent?e.desc="("+e.percent+"%)":e.desc="..."})),o?clearTimeout(t.timerId):t.timerId=setTimeout(a,2e3),t.finishModal.model.items=e.items})).catch((function(e){clearTimeout(t.timerId),t.timerId=null,t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))};a()}}},he=pe,fe=Object(x["a"])(he,me,ue,!1,null,null,null),_e=fe.exports,ve={name:"ServerPublish",components:{PublishStatus:_e},data:function(){return{imgNew:'',imgCur:'',imgSpace:'',nowVersion:[],activeKey:"",treeData:[],totalServerList:[],serverList:[],isCheckedAll:!0,totalPage:0,pageSize:20,page:1,showPackage:!1,packageList:[],packageTotalPage:0,packagePage:1,packagePageSize:20,publishModal:{show:!1,model:null,elegant:!1,eachnum:1},statusMap:{0:"EM_T_NOT_START",1:"EM_T_PREPARE",2:"EM_T_RUNNING",3:"EM_T_SUCCESS",4:"EM_T_FAILED",5:"EM_T_CANCEL",6:"EM_T_PARIAL"},showHistory:!1,startTime:"",endTime:"",totalHistoryList:[],historyList:[],historyTotalPage:0,historyPage:1,historyPageSize:20,taskModal:{show:!1,modal:!0},uploadModal:{show:!1,model:null},patchType:"patch",patchRadioData:[{value:"patch",text:this.$t("pub.dlg.upload")}],pkgUpload:{show:!1,model:null},elegantChecked:!1,eachNum:0}},props:["treeid"],methods:{getServerList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.treeid}).then((function(a){t.hide();var o=a||[];o.forEach((function(t){t.isChecked=e.isCheckedAll,t.present_state_in_node="",t.query_ret_code=0,t.setting_state=t.setting_state.charAt(0).toUpperCase()+t.setting_state.slice(1)})),e.totalServerList=o,e.totalPage=Math.ceil(e.totalServerList.length/e.pageSize),e.page=1,e.updateServerList(),e.updateServerState()})).catch((function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.table.msg.fail")).then((function(){e.getServerList()}))}))},updateServerState:function(){var e=this;if(0!=this.serverList.length){var t=this.serverList.map((function(e){return{application:e.application,server_name:e.server_name,node_name:e.node_name}}));this.$ajax.postJSON("/server/api/server_state",{queryState:t}).then((function(t){e.serverList.forEach((function(e){var a=t.filter((function(t){return t.application==e.application&&t.server_name==e.server_name&t.node_name==e.node_name}));e.present_state_in_node=a[0].present_state_in_node,e.query_ret_code=a[0].query_ret_code}))}))}},changePage:function(e){this.page=e},changeElegantStatus:function(e){this.checked=e,e&&(this.eachNum=1)},uploadPublishModal:function(){this.openPublishModal(!0)},openPublishModal:function(e){var t=this,a=this.serverList.filter((function(e){return e.isChecked}));if(a.length<=0)this.$tip.warning(this.$t("pub.dlg.a"));else{var o=a[0];this.publishModal.model={application:o.application,server_name:o.server_name,serverList:a,patchList:[],patch_id:"",update_text:"",show:!0},this.getNewVersionList(o).then((function(e){0!=e.length&&e.forEach((function(e){t.nowVersion.push(e.patch_version)}))})),this.getPatchList(o.application,o.server_name,1,50).then((function(a){t.publishModal.model.patchList=a.rows,t.publishModal.show=!0,e&&t.showUploadModal()}))}},getPatchList:function(e,t,a,o){var s=this;return this.$ajax.getJSON("/server/api/server_patch_list",{application:e,module_name:t,curr_page:a,page_size:o}).catch((function(e){s.$tip.error("".concat(s.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getNewVersionList:function(e){var t=this;return this.$ajax.getJSON("/server/api/server_now_version",{application:e.application,serverName:e.server_name,enableSet:e.enable_set,setName:e.set_name,setArea:e.set_area,setGroup:e.set_group,nodeName:e.node_name}).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},closePublishModal:function(){this.publishModal.show=!1,this.nowVersion=[],this.publishModal.modal=null,this.patchType="patch",this.$refs.publishForm.resetValid()},savePublishServer:function(e,t){this.$refs.publishForm.validate()&&(this.publishModal.elegant=this.elegantChecked,this.publishModal.eachnum=this.eachNum,this.publishModal.command=t?"grace_patch_tars":"patch_tars",this.$refs.publishStatus.savePublishServer(this.publishModal,this.closePublishModal))},closeFinishModal:function(){this.$refs.finishForm.resetValid()},updateServerList:function(){var e=(this.page-1)*this.pageSize,t=this.page*this.pageSize;this.serverList=this.totalServerList.slice(e,t)},gotoPackage:function(){this.showPackage=!0,this.getPackageList(1)},getPackageList:function(e){var t=this;if("number"!=typeof e&&(e=1),!(this.serverList.length<=0)){var a=this.$Loading.show(),o=this.serverList[0];this.getPatchList(o.application,o.server_name,e,this.packagePageSize).then((function(o){a.hide(),t.packageList=o.rows,t.packagePage=e,t.packageTotalPage=Math.ceil(o.count/t.packagePageSize)})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))})),this.getPatchList(o.application,o.server_name,1,50).then((function(e){t.publishModal.model.patchList=e.rows}))}},changePackagePage:function(e){this.getPackageList(e)},downloadPackage:function(e){var t="/pages/server/api/download_package?id=".concat(e.id,"&name=").concat(e.tgz);window.open(t,!0)},deletePackage:function(e){var t=this;this.$confirm(this.$t("releasePackage.confirmDeleteTip"),this.$t("common.alert")).then((function(){t.$ajax.postJSON("/server/api/delete_patch_package",{id:e}).then((function(e){t.getPackageList(t.packagePage)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},gotoHistory:function(){this.showHistory=!0,this.getHistoryList(1)},getHistoryList:function(e){var t=this;"number"!=typeof e&&(e=1);var a=this.$Loading.show(),o={application:this.serverList[0].application||"",server_name:this.serverList[0].server_name||"",from:this.startTime,to:this.endTime,page_size:this.historyPageSize,curr_page:e};this.historyPage=e,this.$ajax.getJSON("/server/api/task_list",o).then((function(e){a.hide(),t.totalHistoryList=e.rows||[],t.historyTotalPage=Math.ceil(e.count/t.historyPageSize)})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},viewTask:function(e){var t=this;this.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(e){t.taskModal.model=e,t.taskModal.show=!0}))},deleteTask:function(e){var t=this;this.$confirm(this.$t("historyList.delete")).then((function(){t.$ajax.getJSON("/server/api/del_task",{task_no:e}).then((function(e){t.getHistoryList(t.page)})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},changeHistoryPage:function(e){this.getHistoryList(e)},showUploadModal:function(){this.serverList.length<=0&&this.$tip.warning(this.$t("pub.dlg.a")),this.uploadModal.model={application:this.serverList[0].application||"",server_name:this.serverList[0].server_name||"",file:null,comment:""},this.uploadModal.show=!0},closeUploadModal:function(){this.uploadModal.show=!1,this.uploadModal.model=null,this.$refs.uploadForm.resetValid()},uploadFile:function(e){var t=this.treeid,a=(t&&t.split(".")[0]&&t.split(".")[0].slice(1),t.split(".")),o=t&&a[a.length-1]&&a[a.length-1].slice(1),s=e.name&&e.name.split(".")&&e.name.split(".")[0];if(-1==s.toLowerCase().indexOf(o.toLowerCase()))return this.$tip.error("".concat(this.$t("releasePackage.uploadPackageTips")));this.uploadModal.model.file=e},uploadPatchPackage:function(){var e=this;if(this.$refs.uploadForm.validate()){var t=this.$Loading.show(),a=new FormData;a.append("application",this.uploadModal.model.application),a.append("module_name",this.uploadModal.model.server_name),a.append("suse",this.uploadModal.model.file),a.append("comment",this.uploadModal.model.comment),a.append("task_id",(new Date).getTime()),this.$ajax.postForm("/server/api/upload_patch_package",a).then((function(){e.getPatchList(e.uploadModal.model.application,e.uploadModal.model.server_name,1,50).then((function(a){t.hide(),e.publishModal.model.patchList=a.rows,e.closeUploadModal()}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},patchChange:function(){"patch"==this.patchType?this.publishModal.model.show=!0:this.publishModal.model.show=!1},includes:function(e,t){return!!e.includes(String(t))},formatString:function(e,t){return null!=e&&e.length0)return i="parsererror"==o.documentElement.nodeName?o.documentElement.childNodes[0].nodeValue:o.getElementsByTagName("parsererror")[0].innerHTML,void alert("config format error:"+i)}catch(r){return void alert("config format error:"+r.toString())}"config"===e&&(this.configModal.model.config=this.configContent,this.updateConfigFile())},closeConfigDiffModal:function(){this.configDiffModal.show=!1},nodeConfigDiff:function(){this.$refs.nodeConfigForm.validate()&&(this.configDiffModal.type="nodeConfig",this.configDiffModal.show=!0,this.configDiffModal.isNew=!1,this.configDiffModal.model={oldData:this.nodeConfigModal.model.config,newData:this.nodeConfigContent})}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getConfigList(this.serverData)}},Le=Se,xe=(a("0523"),Object(x["a"])(Le,we,ye,!1,null,null,null)),Ce=xe.exports,Ne=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_server_history"},[e.serverListShow?t("div",{staticClass:"table_wrap"},[t("div",{staticClass:"table_head"},[t("h4",[e._v(e._s(this.$t("serverList.title.serverList")))])]),t("let-table",{ref:"serverListLoading",staticClass:"dcache",attrs:{data:e.serverList,"empty-msg":e.$t("common.nodata"),stripe:""}},[t("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"application"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[a.row.application]+"&server_name="+[a.row.server_name]+"&node_name="+[a.row.node_name],title:e.$t("serverList.link.remoteLog"),target:"_blank"}},[e._v(" "+e._s(a.row.server_name)+" ")])]}}],null,!1,2262472970)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"200px"},scopedSlots:e._u([{key:"default",fn:function(a){return[a.row.is_node_ok?t("span",[t("a",{staticClass:"buttonText",attrs:{href:"/static/logview/logview.html?app="+[a.row.application]+"&server_name="+[a.row.server_name]+"&node_name="+[a.row.node_name],title:e.$t("serverList.link.nodeLog"),target:"_blank"}},[e._v(" "+e._s(a.row.node_name)+" ")])]):t("span",{staticStyle:{color:"#FF0000"}},[e._v(" "+e._s(a.row.node_name)+e._s(e.$t("serverList.link.invalidNode"))+" ")])]}}],null,!1,2244706928)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return["Inactive"===a.row.setting_state?t("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(a.row.setting_state))]):t("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(a.row.setting_state))])]}}],null,!1,4280848039)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(a){return["0"!=a.row.query_ret_code?t("span",{staticStyle:{color:"#FF0000"}},[e._v("Inactive")]):"Active"===a.row.present_state_in_node?t("span",{staticStyle:{color:"#49CC8F"}},[e._v(e._s(a.row.present_state_in_node))]):t("span",{staticStyle:{color:"#FF0000"}},[e._v(e._s(a.row.present_state_in_node))])]}}],null,!1,2058566643)}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),t("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(a.row.patch_time)))])]}}],null,!1,3144837894)}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.historyLink(a.row.id)}}},[e._v(e._s(e.$t("operate.goto")))])]}}],null,!1,1230847586)})],1),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.goback}},[e._v(e._s(e.$t("operate.goback")))]),t("let-pagination",{attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}})],1):t("div",{staticClass:"history_search"},[t("label",{staticClass:"history_search_box"},[t("input",{directives:[{name:"model",rawName:"v-model",value:e.historySearchKey,expression:"historySearchKey"}],staticClass:"history_search_key",attrs:{type:"text",placeholder:e.$t("home.searchKey")},domProps:{value:e.historySearchKey},on:{blur:e.historySearch,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.historySearch.apply(null,arguments)},input:function(t){t.target.composing||(e.historySearchKey=t.target.value)}}})]),t("div",{staticClass:"history_list_wrap"},[t("div",{staticClass:"history_list_title"},[e._v(e._s(e.$t("home.visited"))+":")]),t("ul",{staticClass:"history_list"},e._l(e.historySearchList,(function(a){return t("li",{key:a,staticClass:"history_item"},[t("a",{staticClass:"history_link",attrs:{href:"javascript:;"},on:{click:function(t){return e.historySearchLink(a)}}},[e._v(e._s(a))])])})),0)])])])},Ee=[],De={name:"ServerHistory",data:function(){return{historySearchKey:"",historySearchList:[],serverList:[],serverListShow:!1,pageNum:1,pageSize:16,total:1}},mounted:function(){this.updateHistorySearchKey()},methods:{gotoPage:function(e){this.historySearch(e)},historySearch:function(e){var t=this;e&&"number"==typeof e||(e=this.pageNum||1);var a=this.historySearchKey;a&&(this.updateHistorySearchKey(),this.$ajax.getJSON("/server/api/server_search",{searchkey:a,page_size:this.pageSize,curr_page:e}).then((function(a){t.pageNum=e,t.total=Math.ceil(a.count/t.pageSize),a.rows.forEach((function(e){e.present_state_in_node="",e.is_node_ok=!0,e.query_ret_code=0,e.setting_state=e.setting_state.charAt(0).toUpperCase()+e.setting_state.slice(1)})),t.serverList=a.rows,t.updateServerState(),t.serverListShow=!0})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.err_msg||e.message))})))},updateServerState:function(){var e=this;if(0!=this.serverList.length){var t=this.serverList.map((function(e){return{application:e.application,server_name:e.server_name,node_name:e.node_name}}));this.$ajax.postJSON("/server/api/server_state",{queryState:t}).then((function(t){e.serverList.forEach((function(e){var a=t.filter((function(t){return t.application==e.application&&t.server_name==e.server_name&t.node_name==e.node_name}));e.present_state_in_node=a[0].present_state_in_node,e.is_node_ok=a[0].is_node_ok,e.query_ret_code=a[0].query_ret_code}))}))}},historySearchLink:function(e){this.historySearchKey=e,this.historySearch()},historyLink:function(e){var t=this;this.$nextTick((function(){t.$parent.selectTree(e),t.$parent.getTreeData()}))},goback:function(){this.serverListShow=!1,this.historySearchKey=""},updateHistorySearchKey:function(){var e=this.historySearchKey,t=this.getLocalStorage("tars_history_key")||[];if(e){if(t&&t.length>0){var a=-1;t.forEach((function(t,o){t===e&&(a=o)})),-1!==a&&t.splice(a,1),t.unshift(e)}else t=[e];this.historySearchList=t.slice(0,20),this.setLocalStorage("tars_history_key",JSON.stringify(t))}else this.historySearchList=t},handleNoPublishedTime:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("pub.dlg.unpublished");return"0000:00:00 00:00:00"===e?t:e},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}}},Ie=De,Te=(a("10a2"),Object(x["a"])(Ie,Ne,Ee,!1,null,null,null)),Oe=Te.exports,qe=a("c9e9"),je=a("4527"),Re=a("3430"),ze=a("f298"),Fe={name:"Server",components:{callChain:ne["a"],manage:le,publish:$e,config:Ce,"server-monitor":qe["a"],"property-monitor":je["a"],"user-manage":Re["a"],serverHistory:Oe,plugins:ze["a"]},data:function(){return{treeErrMsg:"load failed",treeData:null,treeSearchKey:"",treeid:"home",isIconPlay:!1,plugins:[],serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},homeTab:"home",BTabs:[]}},computed:{base:function(){return"/server/".concat(this.treeid)}},watch:{treeid:function(){this.serverData=this.getServerData(),this.$store.commit({type:"increment",name:this.serverData})},$route:function(e,t){"/server"===e.path&&this.getTreeData()}},directives:{vscroll:{componentUpdated:function(e){var t=e||"",a=e.children||[],o="";for(var s in a){var i=a[s],r=i.attributes["class"];if(r&&r.value.indexOf("active")>-1){o=i;break}}if(o.offsetLeftt.scrollLeft+t.offsetWidth){var n=o.offsetLeft+o.offsetWidth-t.offsetWidth;t.scrollTo(n,0)}}}},methods:{getNewServerName:function(e){var t=e&&e.split(".");if(!t)return e;if(1==t.length){var a=e&&e.split(".")[0].substring(1);return"".concat(a)}if(t.length>1){var o=e&&e.split(".")[0].substring(1),s=e&&e.split(".")[e.split(".").length-1].substring(1);return"".concat(o,".").concat(s)}},getName:function(e){var t="";return e.lastIndexOf("/")>-1&&(t=e.substring(e.lastIndexOf("/")+1,e.length)),t},getPlugins:function(){var e=this;this.$ajax.getJSON("/plugin/api/list",{k8s:!1,type:2}).then((function(t){e.plugins=t,e.plugins.forEach((function(t){"en"==e.$cookie.get("locale")&&(t.f_name=t.f_name_en)}))})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))},iconLoading:function(){var e=this;e.isIconPlay||(e.isIconPlay=!0,setTimeout((function(){e.isIconPlay=!1}),1e3))},treeSearch:function(e){this.iconLoading(),this.getTreeData(this.treeSearchKey,e)},selectTree:function(e){this.selectBTabs(e),this.checkCurrBTabs()},handleData:function(e,t){var a=this;e&&e.length&&e.forEach((function(e){e.label=e.name,e.nodeKey=e.id,a.treeSearchKey&&(e.expand=!0),e.children&&e.children.length&&a.handleData(e.children)}))},getTreeData:function(e,t){var a=this;this.treeData=null,this.$nextTick((function(){var o=a.$loading.show();a.$ajax.getJSON("/server/api/tree",{searchKey:e||"",type:t}).then((function(e){o.hide(),a.treeData=e,a.handleData(a.treeData,!0)})).catch((function(e){o.hide(),a.treeErrMsg=e.err_msg||e.message||"load failed",a.treeData=!1}))}))},getServerData:function(){var e={level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""};if(!this.treeid)return{};if("home"==this.treeid)return e;var t=this.treeid.split(".");return t.forEach((function(t){var a=+t.substr(0,1),o=t.substr(1);switch(a){case 1:e.application=o;break;case 2:e.set_name=o;break;case 3:e.set_area=o;break;case 4:e.set_group=o;break;case 5:e.server_name=o;break;default:break}e.level=a})),e},checkTreeid:function(){this.treeid=this.getLocalStorage("_treeid_")||""},clickTab:function(e){var t=this,a=this.treeid,o=this.BTabs;o&&o.forEach((function(o){o.id===a&&(o.path=e.name,o.pluginPath=e.name.substr(t.base.length),o.pluginPath=o.pluginPath.substr(0,o.pluginPath.length-"/plugins".length))})),this.setLocalStorage("_tabs_",JSON.stringify(o))},isTrueTreeLevel:function(){var e=this.$route.path.split("/"),t=e[e.length-1],a=!1;5===this.serverData.level||"publish"!==t&&"server-monitor"!==t&&"property-monitor"!==t&&"user-manage"!==t&&"interface-debuger"!==t||(a=!0),5!==this.serverData.level&&4!==this.serverData.level&&1!==this.serverData.level&&"config"===t&&(a=!0),a&&this.$router.replace("manage")},checkBTabs:function(){var e=this.BTabs,t=this.getLocalStorage("_tabs_");t&&t.length>0&&t.forEach((function(t){e.push({id:t.id,path:t.path})}))},checkCurrBTabs:function(){var e=this;this.$nextTick((function(){var t=e.$refs.btabs||"",a=t.children||[],o="";if(a.forEach((function(e){var t=e.getAttribute("class");t.indexOf("active")>-1&&(o=e)})),o.offsetLeftt.scrollLeft+t.offsetWidth){var i=o.offsetLeft+o.offsetWidth-t.offsetWidth;t.scrollTo(i,0)}}))},selectBTabs:function(e){var t=this.BTabs,a=!1;t.forEach((function(t){t.id===e&&(a=!0,t.path="/server/".concat(e,"/manage"))})),a||this.BTabs.push({id:e,path:"/server/".concat(e,"/manage")}),this.treeid=e,this.setLocalStorage("_treeid_",JSON.stringify(e)),this.setLocalStorage("_tabs_",JSON.stringify(t))},clickBTabs:function(e,t){t==this.homeTab&&(Oe.data.serverListShow=!1),this.treeid=t,this.setLocalStorage("_treeid_",JSON.stringify(t))},closeBTabs:function(e){var t=this.BTabs,a=0;t.forEach((function(t,o){t.id===e&&(a=o)})),t.splice(a,1),this.setLocalStorage("_tabs_",JSON.stringify(t)),t.length>0?this.treeid=t[t.length-1].id:this.treeid="home",this.setLocalStorage("_treeid_",JSON.stringify(this.treeid)),this.getTreeData()},closeAllBTabs:function(){this.BTabs=[],this.treeid="home",this.setLocalStorage("_tabs_",JSON.stringify(this.BTabs)),this.setLocalStorage("_treeid_",JSON.stringify(this.treeid)),this.getTreeData()},getLocalStorage:function(e){var t="";return window.localStorage&&(t=JSON.parse(JSON.parse(localStorage.getItem(e)))),t},setLocalStorage:function(e,t){var a="";return window.localStorage&&(a=localStorage.setItem(e,JSON.stringify(t))),a}},created:function(){this.serverData=this.getServerData(),this.isTrueTreeLevel()},mounted:function(){this.checkTreeid(),this.checkBTabs(),this.getTreeData(),this.getPlugins();var e=this.BTabs;e.forEach((function(e){e.path="/server/".concat(e.id,"/manage")})),this.treeid||(this.treeid="home")}},Pe=Fe,Ae=(a("ebdf"),Object(x["a"])(Pe,j,R,!1,null,null,null)),Je=Ae.exports,Ve=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation"},[t("el-tabs",{attrs:{value:e.$route.path},on:{"tab-click":e.onTabClick}},[t("el-tab-pane",{attrs:{label:e.$t("deployService.title.deploy"),name:"/operation/deploy"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.expand"),name:"/operation/expand"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.template"),name:"/operation/templates"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.nodes"),name:"/operation/nodes"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.check"),name:"/operation/check"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.application"),name:"/operation/application"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.business"),name:"/operation/business"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.businessRelation"),name:"/operation/businessRelation"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.idcManage"),name:"/operation/idc"}}),t("el-tab-pane",{attrs:{label:e.$t("deployService.title.image"),name:"/operation/image"}}),e._l(e.plugins,(function(e){return t("el-tab-pane",{key:e.f_id,attrs:{name:"/operation/plugins"+e.f_path,label:e.f_name}})}))],2),t("router-view",{staticClass:"page_operation_children",attrs:{path:e.name}})],1)},We=[],He=a("03c6"),Ue="/operation/deploy",Be={name:"Operation",components:{plugins:He["a"]},data:function(){return{name:"",plugins:[]}},beforeRouteEnter:function(e,t,a){-1!=e.path.indexOf("/operation")&&e.path!=Ue?a(Ue):a()},beforeRouteLeave:function(e,t,a){Ue=t.path,a()},mounted:function(){this.getPlugins()},methods:{onTabClick:function(e){this.name=e.name,this.$router.replace(e.name)},getPlugins:function(){var e=this;this.$ajax.getJSON("/plugin/api/list",{k8s:!0,type:3}).then((function(t){e.plugins=t,e.plugins.forEach((function(t){"en"==e.$cookie.get("locale")&&(t.f_name=t.f_name_en)}))})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.err_msg||t.message))}))}}},Ye=Be,Ke=(a("9d9a"),Object(x["a"])(Ye,Ve,We,!1,null,null,null)),Ge=Ke.exports,Ze=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_deploy"},[t("let-form",{directives:[{name:"show",rawName:"v-show",value:e.deployShow,expression:"deployShow"}],ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save.apply(null,arguments)}}},[t("let-form-item",{attrs:{label:e.$t("deployService.form.app"),required:""}},[t("let-select",{attrs:{id:"inputApplication",size:"small",filterable:"",notFoundText:e.$t("deployService.form.appAdd")},model:{value:e.model.application,callback:function(t){e.$set(e.model,"application",t)},expression:"model.application"}},e._l(e.applicationList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.serviceFormatTips"),required:"","required-tip":e.$t("deployService.form.serviceTips"),pattern:"^[a-zA-Z]([a-zA-Z0-9]+)?$","pattern-tip":e.$t("deployService.form.serviceFormatTips")},model:{value:e.model.server_name,callback:function(t){e.$set(e.model,"server_name",t)},expression:"model.server_name"}})],1),t("let-form-item",{attrs:{label:e.$t("deployService.form.serviceType"),required:""}},[t("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.serviceTypeTips")},model:{value:e.model.server_type,callback:function(t){e.$set(e.model,"server_type",t)},expression:"model.server_type"}},e._l(e.types,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[t("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.form.templateTips")},model:{value:e.model.template_name,callback:function(t){e.$set(e.model,"template_name",t)},expression:"model.template_name"}},e._l(e.templates,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item",{attrs:{label:"SET"}},[t("SetInputer",{attrs:{enabled:e.model.enable_set,name:e.model.set_name,area:e.model.set_area,group:e.model.set_group},on:{"update:enabled":function(t){return e.$set(e.model,"enable_set",t)},"update:name":function(t){return e.$set(e.model,"set_name",t)},"update:area":function(t){return e.$set(e.model,"set_area",t)},"update:group":function(t){return e.$set(e.model,"set_group",t)}}})],1),t("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],attrs:{label:e.$t("user.op")}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("user.tips.sep")},model:{value:e.model.operator,callback:function(t){e.$set(e.model,"operator",t)},expression:"model.operator"}})],1),t("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],attrs:{label:e.$t("user.dev")}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("user.tips.sep")},model:{value:e.model.developer,callback:function(t){e.$set(e.model,"developer",t)},expression:"model.developer"}})],1),e.baseImageList.length>0?t("let-form-item",{attrs:{label:e.$t("deployService.form.run_type")}},[t("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("pub.dlg.tgzRun")},{value:!1,text:e.$t("pub.dlg.containerRun")}]},on:{change:e.changeRunType},model:{value:e.runType,callback:function(t){e.runType=t},expression:"runType"}})],1):e._e(),"container"==e.model.run_type?t("let-form-item",{attrs:{label:e.$t("deployService.form.baseImageId")}},[t("let-select",{attrs:{size:"small"},model:{value:e.model.base_image_id,callback:function(t){e.$set(e.model,"base_image_id",t)},expression:"model.base_image_id"}},e._l(e.baseImageList,(function(a){return t("let-option",{key:a.id,attrs:{value:a.id}},[e._v(e._s(a.image+"("+a.remark+")"))])})),1)],1):e._e(),t("let-table",{attrs:{data:e.model.adapters}},[t("let-table-column",{attrs:{title:"OBJ"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.objTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:a.row.obj_name,callback:function(t){e.$set(a.row,"obj_name",t)},expression:"props.row.obj_name"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.form.node_name"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-select",{attrs:{size:"small",required:"",filterable:""},on:{change:function(t){return e.nodeNameChange(a.row)}},model:{value:a.row.node_name,callback:function(t){e.$set(a.row,"node_name",t)},expression:"props.row.node_name"}},e._l(e.nodeList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",placeholder:"IP",required:"","required-tip":e.$t("deployService.table.tips.ip")},model:{value:a.row.bind_ip,callback:function(t){e.$set(a.row,"bind_ip",t)},expression:"props.row.bind_ip"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0,max:65535,placeholder:"0-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.port,callback:function(t){e.$set(a.row,"port",t)},expression:"props.row.port"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-radio",{attrs:{label:"tcp"},model:{value:a.row.port_type,callback:function(t){e.$set(a.row,"port_type",t)},expression:"props.row.port_type"}},[e._v("TCP")]),t("let-radio",{attrs:{label:"udp"},model:{value:a.row.port_type,callback:function(t){e.$set(a.row,"port_type",t)},expression:"props.row.port_type"}},[e._v("UDP")])]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-radio",{attrs:{label:"tars"},model:{value:a.row.protocol,callback:function(t){e.$set(a.row,"protocol",t)},expression:"props.row.protocol"}},[e._v("TARS")]),t("let-radio",{attrs:{label:"not_tars"},model:{value:a.row.protocol,callback:function(t){e.$set(a.row,"protocol",t)},expression:"props.row.protocol"}},[e._v(e._s(e.$t("serverList.servant.notTARS")))])]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"60px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.thread_num,callback:function(t){e.$set(a.row,"thread_num",t)},expression:"props.row.thread_num"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("serverList.servant.connections"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.max_connections,callback:function(t){e.$set(a.row,"max_connections",t)},expression:"props.row.max_connections"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"90px"},scopedSlots:e._u([{key:"head",fn:function(a){return[t("span",{staticClass:"required"},[e._v(e._s(a.column.title))])]}},{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.queuecap,callback:function(t){e.$set(a.row,"queuecap",t)},expression:"props.row.queuecap"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-input",{attrs:{size:"small",type:"number",min:0},model:{value:a.row.queuetimeout,callback:function(t){e.$set(a.row,"queuetimeout",t)},expression:"props.row.queuetimeout"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.addAdapter(a.row)}}},[e._v(e._s(e.$t("operate.add")))]),a.$index?t("let-table-operation",{staticClass:"danger",on:{click:function(t){return e.model.adapters.splice(a.$index,1)}}},[e._v(e._s(e.$t("operate.delete"))+" ")]):e._e()]}}])})],1),t("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){return e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+" ")]),e._v("       "),t("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1),t("let-modal",{staticClass:"more-cmd",staticStyle:{"text-align":"center"},attrs:{width:"700px",footShow:!1},on:{close:e.closeResultModal,"on-cancel":e.closeResultModal},model:{value:e.resultModal.show,callback:function(t){e.$set(e.resultModal,"show",t)},expression:"resultModal.show"}},[t("p",{staticClass:"result-text"},[e._v(" "+e._s(e.$t("deployService.form.ret.success"))+e._s(e.$t("resource.installRstMsg"))+" ")]),t("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[t("let-table-column",{attrs:{title:"ip",prop:"ip"}}),t("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("p",{domProps:{textContent:e._s(a.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),t("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1),t("div",{directives:[{name:"show",rawName:"v-show",value:e.deployModal.show,expression:"deployModal.show"}],staticStyle:{width:"400px",margin:"0 auto","margin-top":"100px"}},[e.deployModal.nodeList.length>0?t("let-form",{ref:"deployForm",attrs:{itemWidth:"400px"}},[t("let-form-item",{attrs:{label:e.$t("nodes.node_name")}},[t("let-select",{model:{value:e.deployModal.node_name,callback:function(t){e.$set(e.deployModal,"node_name",t)},expression:"deployModal.node_name"}},e._l(e.deployModal.nodeList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(" "+e._s(a)+" ")])})),1)],1),t("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[t("let-select",{attrs:{required:"","required-tip":e.$t("pub.dlg.ab")},model:{value:e.deployModal.model.patch_id,callback:function(t){e.$set(e.deployModal.model,"patch_id",t)},expression:"deployModal.model.patch_id"}},e._l(e.deployModal.model.patchList,(function(a){return t("let-option",{key:a.id,attrs:{value:a.id}},[e._v(" "+e._s(a.id)+" | "+e._s(a.posttime)+" | "+e._s(a.comment)+" ")])})),1)],1)],1):e._e(),e.deployModal.nodeList.length>0?t("div",{staticStyle:{width:"100%","text-align":"center"}},[t("el-alert",{attrs:{"show-icon":"",title:e.$t("deployLog.info"),type:"warning",closable:!1}}),t("let-button",{staticStyle:{margin:"20px auto"},attrs:{type:"submit",theme:"primary"},on:{click:e.doDeployLog}},[e._v(" "+e._s(e.$t("deployLog.install"))+" ")])],1):t("div",{staticStyle:{width:"100%","text-align":"center"}},[t("el-alert",{attrs:{"show-icon":"",title:e.$t("deployLog.add_node"),description:e.$t("deployLog.description"),type:"warning",closable:!1}})],1)],1),t("PublishStatus",{ref:"publishStatus"})],1)},Qe=[],Xe=(a("498a"),a("4d63"),a("c607"),a("2c3e"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"set_inputer"},[t("div",{staticClass:"set_inputer_item"},[t("let-input",{ref:"name",attrs:{size:"small",value:e.name,placeholder:e.$t("common.set.setName"),disabled:!e.enabled,required:e.enabled,"required-tip":e.$t("deployService.form.setNameFormatTips"),pattern:e.enabled?"^[a-z]+$":null,"pattern-tip":e.$t("deployService.form.setNameFormatTips")},on:{input:e.updaters.name}})],1),t("div",{staticClass:"set_inputer_item"},[t("let-input",{ref:"area",attrs:{size:"small",value:e.area,placeholder:e.$t("common.set.setArea"),disabled:!e.enabled,required:e.enabled,"required-tip":e.$t("deployService.form.setAreaTips"),pattern:e.enabled?"^[a-z]+$":null,"pattern-tip":e.$t("deployService.form.setAreaFormatTips")},on:{input:e.updaters.area}})],1),t("div",{staticClass:"set_inputer_item"},[t("let-input",{ref:"group",attrs:{size:"small",value:e.group,placeholder:e.$t("common.set.setGroup"),disabled:!e.enabled,required:e.enabled,"required-tip":e.$t("deployService.form.setGroupTips"),pattern:e.enabled?"^(\\d+|\\*)$":null,"pattern-tip":e.$t("deployService.form.setGroupFormatTips")},on:{input:e.updaters.group}})],1),t("let-checkbox",{staticClass:"set_inputer_switch",attrs:{value:e.enabled},on:{input:e.updaters.enabled,change:e.onEnabledChange}},[e._v(e._s(e.$t("serverList.table.th.enableSet"))+" ")])],1)}),et=[],tt={props:{enabled:Boolean,name:String,area:String,group:[Number,String]},created:function(){this.updaters={name:this.updater("name"),area:this.updater("area"),group:this.updater("group"),enabled:this.updater("enabled")}},methods:{updater:function(e){var t=this;return function(a){return t.$emit("update:".concat(e),a)}},onEnabledChange:function(){var e=this;this.$nextTick((function(){e.enabled||(e.updaters.name(""),e.$refs.name.resetValid(),e.updaters.area(""),e.$refs.area.resetValid(),e.updaters.group(""),e.$refs.group.resetValid())}))}}},at=tt,ot=(a("40ce"),Object(x["a"])(at,Xe,et,!1,null,null,null)),st=ot.exports,it=["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars","tars_go"],rt=function(){return{application:"",server_name:"",server_type:it[0],template_name:"",node_name:"",enable_set:!1,set_name:"",set_area:"",set_group:"",operator:"",developer:"",run_type:"",base_image_id:0,adapters:[{obj_name:"",bind_ip:"",port:"",port_type:"tcp",protocol:"tars",thread_num:5,max_connections:1e5,queuecap:5e4,queuetimeout:2e4}]}},lt={name:"OperationDeploy",components:{SetInputer:st,PublishStatus:_e},data:function(){return{types:it,applicationList:[],nodeList:[],all_templates:[],baseImageList:[],templates:[],runType:!0,model:rt(),enableLogin:!1,deployShow:!1,deployModal:{show:!1,node_name:"",nodeList:[],model:{patch_id:"",patchList:[],serverList:[]}},resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}}}},watch:{runType:function(){this.model.run_type=this.runType?"":"container"}},mounted:function(){var e=this;this.$ajax.getJSON("/server/api/isEnableLogin").then((function(t){e.enableLogin=t.enableLogin||!1})).catch((function(e){})),this.$ajax.getJSON("/server/api/application_list").then((function(t){e.applicationList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/node_list").then((function(t){e.nodeList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/template_name_list").then((function(t){e.templates=t,e.all_templates=t,e.model.template_name=t[0]})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/base_image_list").then((function(t){e.baseImageList=t,e.baseImageList.length>0&&(e.model.base_image_id=e.baseImageList[0].id)})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$watch("props.row.node_name",(function(t,a){t!==a&&e.model.adapters.forEach((function(e){e.bind_ip=t}))})),this.checkDeployLog()},methods:{changeRunType:function(){this.model.run_type=this.runType?"":"container"},nodeNameChange:function(e){e.bind_ip=e.node_name},addAdapter:function(e){this.model.adapters.push(Object.assign({},e))},deploy:function(){for(var e=this,t=[],a=0;a0,expression:"previewItems.length > 0"}],ref:"expandForm",staticClass:"mt40",attrs:{inline:""},nativeOn:{submit:function(t){return t.preventDefault(),e.expand.apply(null,arguments)}}},[t("let-table",{ref:"table",attrs:{data:e.previewItems,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(a){return[t("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(a){return[a.row.status==e.$t("serviceExpand.form.noExpand")?t("let-checkbox",{model:{value:a.row.isChecked,callback:function(t){e.$set(a.row,"isChecked",t)},expression:"scope.row.isChecked"}}):e._e()]}}])}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),t("let-table-column",{attrs:{title:"Set",prop:"set"}}),t("let-table-column",{attrs:{title:e.$t("serverList.servant.objName"),prop:"obj_name"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-input",{model:{value:a.row.bind_ip,callback:function(t){e.$set(a.row,"bind_ip",t)},expression:"scope.row.bind_ip"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.table.th.port")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-input",{attrs:{type:"number",min:0,max:65535,placeholder:"0-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:a.row.port,callback:function(t){e.$set(a.row,"port",t)},expression:"scope.row.port"}})]}}])}),t("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name"}}),t("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"}})],1),t("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){return e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+" ")]),e._v("    "),t("let-button",{attrs:{type:"sumbit",theme:"primary"}},[e._v(e._s(e.$t("deployService.title.expand")))])],1),t("let-modal",{staticClass:"more-cmd",attrs:{width:"700px",footShow:!1},on:{close:e.closeResultModal,"on-cancel":e.closeResultModal},model:{value:e.resultModal.show,callback:function(t){e.$set(e.resultModal,"show",t)},expression:"resultModal.show"}},[t("p",{staticClass:"result-text"},[e._v(e._s(e.$t("serviceExpand.form.errTips.success"))+e._s(e.$t("resource.installRstMsg")))]),t("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[t("let-table-column",{attrs:{title:"ip",prop:"ip"}}),t("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("p",{domProps:{textContent:e._s(a.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),t("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1)],1)},ut=[],pt="((\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])",ht=function(){return{application:"",server_name:"",set:"",node_name:"",expand_nodes:[],enable_set:!1,set_name:"",set_area:"",set_group:"",copy_node_config:!1}},ft={name:"OperationExpand",components:{SetInputer:st},data:function(){return{model:ht(),applications:[],serverNames:[],sets:[],nodeNames:[],expandIpStr:"",previewItems:[],ipReg:"^".concat(pt,"$"),isCheckedAll:!1,resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}}}},mounted:function(){var e=this;this.getCascadeSelectServer({level:1},this.$t("common.error")).then((function(t){e.applications=t}))},methods:{changeSelect:function(e){var t=this;switch(e){case"application":this.model.server_name="",this.serverNames=[],this.model.application&&this.getCascadeSelectServer({level:2,application:this.model.application},this.$t("common.error")).then((function(e){t.serverNames=e}));break;case"server_name":this.model.set="",this.sets=[],this.model.server_name&&this.getCascadeSelectServer({level:3,application:this.model.application,server_name:this.model.server_name},this.$t("common.error")).then((function(e){t.sets=e}));break;case"set":if(this.model.node_name="",this.model.nodeName=[],this.model.set){var a=-1===parseInt(this.model.set,10)?"":this.model.set;this.getCascadeSelectServer({level:4,application:this.model.application,server_name:this.model.server_name,set:a},this.$t("common.error")).then((function(e){t.nodeNames=e}))}break;default:break}},getCascadeSelectServer:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("common.error");return this.$ajax.getJSON("/server/api/cascade_select_server",e).then((function(e){return e})).catch((function(e){t.$tip.error("".concat(a,": ").concat(e.message||e.err_msg))}))},indexOf:function(e,t){for(var a=0;a0){var a=[];t.forEach((function(e){a.push({bind_ip:e.bind_ip,node_name:e.node_name,obj_name:e.obj_name,port:e.port,set:e.set})}));var o={application:this.model.application,server_name:this.model.server_name,set:-1===parseInt(this.model.set,10)?"":this.model.set,node_name:this.model.node_name,copy_node_config:this.model.copy_node_config,expand_preview_servers:a},s=this.$Loading.show();this.$ajax.postJSON("/server/api/expand_server",o).then((function(t){s.hide(),t.tars_node_rst&&t.tars_node_rst.length?e.showResultModal(t.tars_node_rst):e.$tip.success(e.$t("serviceExpand.form.errTips.success"))})).catch((function(t){s.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}else this.$tip.error(this.$t("serviceExpand.form.errTips.noneNodes"))}},showResultModal:function(e){this.resultModal.resultList=e,this.resultModal.show=!0},closeResultModal:function(){this.resultModal.show=!1,this.resultModal.resultList=[]}},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.previewItems.forEach((function(t){t.isChecked=e}))}}},_t=ft,vt=(a("77b8"),Object(x["a"])(_t,mt,ut,!1,null,null,null)),gt=vt.exports,bt=(a("841c"),function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_templates"},[t("el-form",{staticStyle:{display:"inline"},attrs:{inline:"",itemWidth:"200px"}},[t("el-form-item",{attrs:{label:e.$t("deployService.form.template")}},[t("el-input",{attrs:{size:"small"},model:{value:e.query.template_name,callback:function(t){e.$set(e.query,"template_name",t)},expression:"query.template_name"}})],1),t("el-form-item",{attrs:{label:e.$t("template.search.parentTemplate")}},[t("el-input",{attrs:{size:"small"},model:{value:e.query.parents_name,callback:function(t){e.$set(e.query,"parents_name",t)},expression:"query.parents_name"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))])],1),t("span",{staticStyle:{float:"right"}},[t("i",{staticClass:"el-icon-refresh-right",staticStyle:{margin:"10px"},on:{click:function(t){return e.fetchData()}}}),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("template.btn.addTempate")))])],1)],1),t("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("template.search.parentTemplate"),prop:"parents_name",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.mergeItem(a.row)}}},[e._v(e._s(e.$t("operate.merge")))]),t("let-table-operation",{on:{click:function(t){return e.viewItem(a.row)}}},[e._v(e._s(e.$t("operate.view")))]),t("let-table-operation",{on:{click:function(t){return e.editItem(a.row)}}},[e._v(e._s(e.$t("operate.update")))]),t("let-table-operation",{on:{click:function(t){return e.removeItem(a.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),t("let-modal",{attrs:{title:e.$t("template.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?t("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),t("div",{attrs:{slot:"foot"},slot:"foot"})]),t("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("template.add.title"):this.$t("template.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?t("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[t("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("template.add.templateFormatTips"),required:"","required-tip":e.$t("template.add.templateNameTips"),pattern:"^[a-zA-Z-]([.a-zA-Z0-9-]+)?$","pattern-tip":e.$t("template.add.templateFormatTips")},model:{value:e.detailModal.model.template_name,callback:function(t){e.$set(e.detailModal.model,"template_name",t)},expression:"detailModal.model.template_name"}})],1),t("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate"),required:""}},[t("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.detailModal.model.parents_name,callback:function(t){e.$set(e.detailModal.model,"parents_name",t)},expression:"detailModal.model.parents_name"}},[t("let-option",{attrs:{value:""}},[e._v(e._s(e.$t("pub.dlg.defaultValue")))]),e._l(e.items,(function(a){return t("let-option",{key:a.id,attrs:{value:a.template_name}},[e._v(e._s(a.template_name))])}))],2)],1),t("let-form-item",{attrs:{label:e.$t("template.form.content"),required:""}},[t("let-input",{attrs:{type:"textarea",rows:10,size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.detailModal.model.profile,callback:function(t){e.$set(e.detailModal.model,"profile",t)},expression:"detailModal.model.profile"}})],1)],1):e._e()],1)],1)}),$t=[],wt={name:"OperationTemplates",data:function(){return{query:{template_name:"",parents_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_profile_template",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1},mergeItem:function(e){var t=this,a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_merge_profile_template",{template_name:e.template_name}).then((function(o){a.hide(),e.profile=o.template,t.viewModal.model=e,t.viewModal.show=!0})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.id?"/server/api/update_profile_template":"/server/api/add_profile_template",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("template.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_profile_template",{id:e.id}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}}},yt=wt,Mt=(a("21c0"),Object(x["a"])(yt,bt,$t,!1,null,null,null)),kt=Mt.exports,St=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_templates"},[t("el-form",{attrs:{inline:"",itemWidth:"200px"}},[t("el-form-item",{attrs:{label:e.$t("nodes.node_name")+":"}},[t("el-input",{attrs:{size:"small"},model:{value:e.query.node_name,callback:function(t){e.$set(e.query,"node_name",t)},expression:"query.node_name"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"submit",theme:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))]),t("i",{staticClass:"el-icon-refresh-right",staticStyle:{margin:"10px"},on:{click:function(t){return e.getNodeList()}}})],1),t("div",{staticStyle:{float:"right"}},[e.strict?e._e():t("span",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.manualAddItem}},[e._v(e._s(e.$t("nodes.btn.manualAddNode"))+" ")]),e._v("     "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.autoAddItem}},[e._v(e._s(e.$t("nodes.btn.autoAddNode"))+" ")]),e._v("     "),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.autoUpdateItem}},[e._v(e._s(e.$t("nodes.btn.autoUpdateNode"))+" ")])],1)])],1),t("let-modal",{attrs:{title:e.$t("nodes.btn.manualAddNode"),footShow:!1,width:"800px"},model:{value:e.showManualAddItem,callback:function(t){e.showManualAddItem=t},expression:"showManualAddItem"}},[t("div",[t("br"),t("br"),t("let-tag",[e._v(e._s(e.$t("nodes.manualAddNode.OS1.title")))]),t("p",[e._v("1 "+e._s(e.$t("nodes.manualAddNode.OS1.step1")))]),t("p",[e._v("2 "+e._s(e.$t("nodes.manualAddNode.OS1.step2")))]),t("p",[e._v("3 "+e._s(e.$t("nodes.manualAddNode.OS1.step3")))]),t("p",[e._v("4 "+e._s(e.$t("nodes.manualAddNode.OS1.step4")))]),t("p",[e._v("5 "+e._s(e.$t("nodes.manualAddNode.OS1.step5")))]),t("br"),t("let-tag",[e._v(e._s(e.$t("nodes.manualAddNode.OS2.title")))]),t("p",[e._v("1 "+e._s(e.$t("nodes.manualAddNode.OS2.step1")))]),t("p",[e._v("2 "+e._s(e.$t("nodes.manualAddNode.OS2.step2")))]),t("p",[e._v("3 "+e._s(e.$t("nodes.manualAddNode.OS2.step3")))]),t("p",[e._v("4 "+e._s(e.$t("nodes.manualAddNode.OS2.step4")))]),t("p",[e._v("5 "+e._s(e.$t("nodes.manualAddNode.OS2.step5")))]),t("p",[e._v("6 "+e._s(e.$t("nodes.manualAddNode.OS2.step6")))]),t("br"),t("let-tag",{attrs:{theme:"success",checked:""}},[e._v(e._s(e.$t("nodes.manualAddNode.info1")))]),t("br"),t("br"),t("let-tag",{attrs:{theme:"success",checked:""}},[e._v(e._s(e.$t("nodes.manualAddNode.info2")))])],1)]),t("let-table",{ref:"nodeListLoading",attrs:{data:e.nodeList,stripe:"","empty-msg":e.$t("common.nodata"),"row-class-name":e.tableRowClassName}},[t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.node_name"),prop:"node_name"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.long_connection")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:""===a.row.node_obj?"active":"inactive"},[e._v(e._s(""===a.row.node_obj?"yes":"no"))])]}}])}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.present_state"),width:"100px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:"active"===a.row.present_state?"active":"inactive"},[e._v(e._s(a.row.present_state))])]}}])}),t("let-table-column",{attrs:{title:e.$t("common.time"),prop:"last_reg_time"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.last_heartbeat"),prop:"last_heartbeat"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.label"),prop:"label",width:"20%"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.version"),prop:"tars_version"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.load_avg5"),prop:"load_avg5"}}),t("let-table-column",{attrs:{title:e.$t("nodeList.table.th.check")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.editNode(a.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.edit")))]),e._v("    "),t("let-table-operation",{on:{click:function(t){return e.checkNode(a.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.check")))]),e._v("    "),t("let-table-operation",{on:{click:function(t){return e.deleteNode(a.row.node_name)}}},[e._v(e._s(e.$t("nodeList.table.delete")))])]}}])})],1),t("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),t("let-modal",{attrs:{title:this.$t("connectNodeList.title"),width:"1200px",footShow:!1,showClose:!1},model:{value:e.connectModal.show,callback:function(t){e.$set(e.connectModal,"show",t)},expression:"connectModal.show"}},[t("let-table",{ref:"connectNodeListLoading",staticStyle:{"margin-top":"20px"},attrs:{data:e.connectNodeList,stripe:"","empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{type:"expand",width:"40px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("div",{staticClass:"install_step"},[t("let-steps",{attrs:{current:a.row.step||0}},[t("let-step",{attrs:{title:e.$t("connectNodeList.step1")}}),t("let-step",{attrs:{title:e.$t("connectNodeList.step2")}}),t("let-step",{attrs:{title:e.$t("connectNodeList.step3")}}),t("let-step",{attrs:{title:e.$t("connectNodeList.step4")}}),t("let-step",{attrs:{title:e.$t("connectNodeList.step5")}})],1),"fail"==a.row.installState&&1==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: please check file /usr/local/app/web/files/tarsnode.tgz ")]):e._e(),"fail"==a.row.installState&&2==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: please ensure the ssh service is enabled, and the ip/port/user/password config is right ")]):e._e(),"fail"==a.row.installState&&3==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: please install curl on the node ")]):e._e(),"fail"==a.row.installState&&4==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: please ensure the registry is available ")]):e._e(),"fail"==a.row.installState&&5==a.row.step?t("p",{staticClass:"fail_txt"},[e._v(" Error: some unknown error, please check log ")]):e._e(),t("pre",{staticClass:"stdout"},[e._v(e._s(a.row.stdout))])],1)]}}])}),t("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.node_name"),prop:"ip"}}),t("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.connect"),prop:"connectInfo"}}),t("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.exists"),prop:"existsInfo"}}),t("let-table-column",{attrs:{title:e.$t("connectNodeList.table.th.install")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:{success_txt:"success"==a.row.installState,fail_txt:"fail"==a.row.installState}},[e._v(e._s(a.row.installInfo))])]}}])})],1),t("let-button",{attrs:{theme:"primary",disabled:e.executeConnect},on:{click:e.connectNode}},[e._v(e._s(e.btnConnectText))]),e._v("    "),t("let-button",{attrs:{theme:"primary",disabled:e.executeInstall},on:{click:e.installNode}},[e._v(e._s(e.btnInstallText))]),e._v("    "),t("let-button",{staticStyle:{float:"right"},attrs:{theme:"primary"},on:{click:e.closeConnectModal}},[e._v(e._s(e.$t("connectNodeList.btnClose")))])],1),t("let-modal",{attrs:{title:this.$t("nodes.add.title"),width:"500px"},on:{"on-confirm":e.showConnectNode,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[t("let-form",{ref:"detailForm",attrs:{itemWidth:"450px"}},[t("let-form-item",{attrs:{label:e.$t("nodes.node_name"),required:""}},[e.detailModal.add?t("let-input",{attrs:{type:"textarea",rows:3,placeholder:e.$t("nodes.nodeNameTips"),required:"","required-tip":e.$t("nodes.nodeNameTips")},model:{value:e.detailModal.model.node_name,callback:function(t){e.$set(e.detailModal.model,"node_name",t)},expression:"detailModal.model.node_name"}}):t("let-select",{attrs:{size:"small",required:"",multiple:""},model:{value:e.detailModal.model.update_node_name,callback:function(t){e.$set(e.detailModal.model,"update_node_name",t)},expression:"detailModal.model.update_node_name"}},e._l(e.nodeList,(function(a){return t("let-option",{key:a.node_name,attrs:{value:a.node_name}},[e._v(" "+e._s(a.node_name+"("+a.tars_version+")")+" ")])})),1)],1),t("let-form-item",{attrs:{label:e.$t("nodes.user"),required:""}},[t("let-input",{attrs:{size:"small"},model:{value:e.detailModal.model.user,callback:function(t){e.$set(e.detailModal.model,"user",t)},expression:"detailModal.model.user"}})],1),t("let-form-item",{attrs:{label:e.$t("nodes.port"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("nodes.portTips"),required:"","required-tip":e.$t("nodes.portTips"),pattern:"^[^\\s]+$","pattern-tip":e.$t("nodes.portTips")},model:{value:e.detailModal.model.port,callback:function(t){e.$set(e.detailModal.model,"port",t)},expression:"detailModal.model.port"}})],1),t("let-form-item",{attrs:{label:e.$t("nodes.password")}},[t("let-input",{attrs:{size:"small"},model:{value:e.detailModal.model.password,callback:function(t){e.$set(e.detailModal.model,"password",t)},expression:"detailModal.model.password"}})],1),t("let-form-item",{attrs:{label:e.$t("nodes.runuser"),required:""}},[t("let-input",{attrs:{size:"small",required:"","required-tip":e.$t("nodes.runuserTips"),pattern:"^[^\\s]+$","pattern-tip":e.$t("nodes.runuserTips")},model:{value:e.detailModal.model.runuser,callback:function(t){e.$set(e.detailModal.model,"runuser",t)},expression:"detailModal.model.runuser"}})],1)],1)],1),t("let-modal",{attrs:{title:this.$t("nodes.label.title"),width:"500px"},on:{"on-confirm":e.onAddLabel},model:{value:e.labelModel.show,callback:function(t){e.$set(e.labelModel,"show",t)},expression:"labelModel.show"}},[t("let-form",{ref:"labelForm",attrs:{itemWidth:"450px"}},[t("let-table",{staticStyle:{"margin-top":"20px"},attrs:{data:e.labelModel.labelList,stripe:"","empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("nodes.label.name"),prop:"name"}}),t("let-table-column",{attrs:{title:e.$t("nodes.label.value"),prop:"value"}}),t("let-table-column",{attrs:{title:e.$t("nodes.label.operator")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.deleteLabel(e.labelModel.node_name,a.row.name)}}},[e._v(e._s(e.$t("nodes.label.delete")))])]}}])})],1),t("let-form-item",{attrs:{label:e.$t("nodes.label.name"),required:"",itemWidth:"150"}},[t("let-input",{attrs:{size:"small",required:"",width:"150px",pattern:"^[a-zA-Z0-9]([a-zA-Z0-9]+)?$"},model:{value:e.labelModel.model.name,callback:function(t){e.$set(e.labelModel.model,"name",t)},expression:"labelModel.model.name"}})],1),t("let-form-item",{attrs:{label:e.$t("nodes.label.value"),required:"",itemWidth:"150"}},[t("let-input",{attrs:{size:"small",required:"",width:"150px",pattern:"^[a-zA-Z0-9]([a-zA-Z0-9]+)?$"},model:{value:e.labelModel.model.value,callback:function(t){e.$set(e.labelModel.model,"value",t)},expression:"labelModel.model.value"}})],1)],1)],1)],1)},Lt=[],xt=a("c1df"),Ct=a.n(xt),Nt={name:"OperationNodes",data:function(){return{query:{node_name:""},nodeList:[],pageNum:1,pageSize:20,total:1,strict:!1,executeInstall:!1,executeConnect:!1,btnConnectText:"",btnInstallText:"",isCheckedAll:!1,connectNodeList:[],connectModal:{show:!1},showManualAddItem:!1,detailModal:{show:!1,add:!0,model:{node_name:"",update_node_name:[],user:"root",password:"",port:"22",runuser:"tars"}},labelModel:{show:!1,node_name:"",labelList:[],model:{name:"",value:""}}}},mounted:function(){this.getNodeList(1),this.isStrict()},methods:{isStrict:function(){var e=this;this.$ajax.getJSON("/server/api/is_strict").then((function(t){e.strict=t.strict})).catch((function(e){}))},updateLabel:function(e,t){for(var a=0;a0&&(a[0].installInfo=e.msg,a[0].installState=e.installState,a[0].step=e.step,a[0].stdout=e.stdout),e.rst||t.$tip.error(e.ip+":"+e.msg)})),t.getNodeList(1),t.btnInstallText=t.$t("connectNodeList.btnInstalled"),t.executeInstall=!1})).catch((function(e){t.btnInstallText=t.$t("connectNodeList.btnInstalled"),t.executeInstall=!1,t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}}}},Et=Nt,Dt=(a("d687"),Object(x["a"])(Et,St,Lt,!1,null,"ae1ec656",null)),It=Dt.exports,Tt=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_templates",staticStyle:{"text-align":"center"}},[t("let-form",{attrs:{inline:"",itemWidth:"200px"}},[t("div",{staticStyle:{float:"right"}},[t("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.checkFramework}},[e._v(e._s(e.$t("nodes.btn.check")))]),e._v("     "),t("let-button",{attrs:{size:"small",theme:"info"},on:{click:e.openShowProblem}},[e._v(e._s(e.$t("nodes.btn.question")))])],1)]),t("br"),t("let-table",{ref:"checkLoading",attrs:{data:e.servers,stripe:"","row-class-name":e.tableRowClassName,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("checkTable.table.th.server_name"),prop:"serverName",width:"15%"}}),t("let-table-column",{attrs:{title:e.$t("checkTable.table.th.node_name"),prop:"nodeName",width:"15%"}}),t("let-table-column",{attrs:{title:e.$t("checkTable.table.th.obj_name"),prop:"objName",width:"55%"}}),t("let-table-column",{attrs:{title:e.$t("checkTable.table.th.status"),width:"15%"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{staticClass:"status"},[e._v(e._s(a.row.status))])]}}])})],1),t("let-modal",{attrs:{title:e.$t("checkTable.problemDialog.title"),width:"600px"},model:{value:e.showProblem,callback:function(t){e.showProblem=t},expression:"showProblem"}},[t("div",[t("br"),t("p",[e._v(e._s(e.$t("checkTable.problemDialog.info")))]),t("br"),t("p",[e._v(e._s(e.$t("checkTable.problemDialog.restartFramework")))]),t("p",[e._v(e._s(e.$t("checkTable.problemDialog.stopFramework")))]),t("p",[e._v(e._s(e.$t("checkTable.problemDialog.restartServer")))])])])],1)},Ot=[],qt={name:"OperationCheck",data:function(){return{showProblem:!1,servers:[]}},mounted:function(){},methods:{openShowProblem:function(){this.showProblem=!0},tableRowClassName:function(e){var t=e.row;e.rowIndex;return 1===t.check?"":2===t.check?"checking-row":0===t.check?"success-row":-1===t.check?"warning-row":""},checkFramework:function(){var e=this,t=this.$refs.checkLoading.$loading.show();this.$ajax.getJSON("/server/api/get_framework_list").then((function(a){t.hide();for(var o=0;o0?t("el-select",{attrs:{size:"small",filterable:""},model:{value:e.query.f_business_name,callback:function(t){e.$set(e.query,"f_business_name",t)},expression:"query.f_business_name"}},e._l(e.business,(function(a){return t("el-option",{key:a.f_id,attrs:{value:a.f_name}},[e._v(e._s(a.f_name))])})),1):t("el-input",{attrs:{size:"small"},model:{value:e.query.f_business_name,callback:function(t){e.$set(e.query,"f_business_name",t)},expression:"query.f_business_name"}})],1),t("el-form-item",{attrs:{label:e.$t("application.form.application")}},[e.application&&e.application.length>0?t("el-select",{attrs:{size:"small",filterable:""},model:{value:e.query.f_application_name,callback:function(t){e.$set(e.query,"f_application_name",t)},expression:"query.f_application_name"}},e._l(e.application,(function(a){return t("el-option",{key:a.f_id,attrs:{value:a.f_name}},[e._v(e._s(a.f_name))])})),1):t("el-input",{attrs:{size:"small"},model:{value:e.query.f_application_name,callback:function(t){e.$set(e.query,"f_application_name",t)},expression:"query.f_application_name"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))])],1),t("div",{staticStyle:{float:"right"}},[t("i",{staticClass:"el-icon-refresh-right",staticStyle:{margin:"10px"},on:{click:function(t){return e.fetchData()}}}),t("el-button",{staticStyle:{float:"right"},attrs:{size:"small",type:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("businessRelation.btn.add")))])],1)],1),t("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("business.form.business"),prop:"f_business_name"}}),t("let-table-column",{attrs:{title:e.$t("application.form.application"),prop:"f_application_name"}}),t("let-table-column",{attrs:{title:e.$t("businessRelation.form.person"),prop:"f_create_person"}}),t("let-table-column",{attrs:{title:e.$t("businessRelation.form.time"),prop:"f_create_time"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.removeItem(a.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),t("let-modal",{attrs:{title:e.$t("businessRelation.view.title"),width:"800px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},[e.viewModal.model?t("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),t("div",{attrs:{slot:"foot"},slot:"foot"})]),t("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("businessRelation.add.title"):this.$t("businessRelation.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?t("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[t("let-form-item",{attrs:{label:e.$t("application.form.application"),required:""}},[t("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.detailModal.model.f_application_name,callback:function(t){e.$set(e.detailModal.model,"f_application_name",t)},expression:"detailModal.model.f_application_name"}},e._l(e.application,(function(a){return t("let-option",{key:a.f_id,attrs:{value:a.f_name}},[e._v(e._s(a.f_name))])})),1)],1),t("let-form-item",{attrs:{label:e.$t("business.form.business"),required:""}},[t("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("common.notEmpty")},model:{value:e.detailModal.model.f_business_name,callback:function(t){e.$set(e.detailModal.model,"f_business_name",t)},expression:"detailModal.model.f_business_name"}},e._l(e.business,(function(a){return t("let-option",{key:a.f_id,attrs:{value:a.f_name}},[e._v(e._s(a.f_name))])})),1)],1)],1):e._e()],1)],1)},Qt=[],Xt={name:"OperationApplication",data:function(){return{query:{f_business_name:"",f_application_name:""},items:[],viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1},business:[],application:[]}},mounted:function(){this.fetchData(),this.getBusinessData(),this.getApplicationData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_business_relation",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},viewItem:function(e){this.viewModal.model=e,this.viewModal.show=!0},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.f_id?"/server/api/update_business_relation":"/server/api/add_business_relation",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("businessRelation.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_business_relation",{f_id:e.f_id}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},getBusinessData:function(){var e=this;return this.$ajax.getJSON("/server/api/query_business").then((function(t){e.business=t}))},getApplicationData:function(){var e=this;return this.$ajax.getJSON("/server/api/query_application").then((function(t){e.application=t}))}}},ea=Xt,ta=(a("a302"),Object(x["a"])(ea,Zt,Qt,!1,null,null,null)),aa=ta.exports,oa=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_templates"},[t("el-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search.apply(null,arguments)}}},[t("el-form-item",{attrs:{label:e.$t("idc.grid.groupName")}},[t("el-input",{attrs:{size:"small"},model:{value:e.query.group_name,callback:function(t){e.$set(e.query,"group_name",t)},expression:"query.group_name"}})],1),t("el-form-item",[t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.search}},[e._v(e._s(e.$t("operate.search")))])],1),t("div",{staticStyle:{float:"right"}},[t("i",{staticClass:"el-icon-refresh-right",staticStyle:{margin:"10px"},on:{click:function(t){return e.fetchData()}}}),t("el-button",{attrs:{size:"small",type:"primary"},on:{click:e.addGroup}},[e._v(e._s(e.$t("idc.btn.add")))])],1)],1),t("let-table",{ref:"table",staticClass:"hideFir",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{staticStyle:{display:"none"},attrs:{prop:"group_id"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.groupName"),prop:"group_name"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.groupNameCN"),prop:"group_name_cn"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.ipOrder"),prop:"ip_order"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.allowIpRule"),prop:"allow_ip_rule"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.dennyIpRule"),prop:"denny_ip_rule"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.lastuser"),prop:"lastuser"}}),t("let-table-column",{attrs:{title:e.$t("idc.grid.modifyTime"),prop:"modify_time"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.editItem(a.row)}}},[e._v(e._s(e.$t("operate.update")))]),t("let-table-operation",{on:{click:function(t){return e.removeItem(a.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),t("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("idc.btn.add"):this.$t("idc.update.title"),width:"800px"},on:{"on-confirm":e.saveItem,"on-cancel":e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model?t("let-form",{ref:"detailForm",staticClass:"two-columns",attrs:{itemWidth:"300px",columns:"2"}},[e.detailModal.isNew?e._e():t("let-form-item",{attrs:{label:e.$t("idc.grid.groupName"),required:""}},[e._v(" "+e._s(e.detailModal.model.group_name)+" ")]),e.detailModal.isNew?t("let-form-item",{attrs:{label:e.$t("idc.grid.groupName"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("idc.valid.groupName"),required:"","required-tip":e.$t("idc.valid.groupName"),pattern:"^[a-zA-Z-]([.a-zA-Z0-9-]+)?$","pattern-tip":e.$t("idc.valid.groupName")},model:{value:e.detailModal.model.group_name,callback:function(t){e.$set(e.detailModal.model,"group_name",t)},expression:"detailModal.model.group_name"}})],1):e._e(),t("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{label:e.$t("idc.grid.groupNameCN"),required:""}},[t("let-input",{attrs:{size:"small",required:"",placeholder:e.$t("idc.update.placeholder")},model:{value:e.detailModal.model.group_name_cn,callback:function(t){e.$set(e.detailModal.model,"group_name_cn",t)},expression:"detailModal.model.group_name_cn"}})],1),t("let-form-item",{attrs:{label:e.$t("idc.grid.ipOrder"),required:""}},[t("let-select",{attrs:{size:"small",placeholder:e.$t("idc.update.allowType"),required:""},model:{value:e.detailModal.model.ip_order,callback:function(t){e.$set(e.detailModal.model,"ip_order",t)},expression:"detailModal.model.ip_order"}},e._l(e.ipOrders,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item"),t("let-form-item",{attrs:{label:e.$t("idc.grid.allowIpRule")}},[t("let-select",{attrs:{required:"",multiple:""},model:{value:e.detailModal.model.allowList,callback:function(t){e.$set(e.detailModal.model,"allowList",t)},expression:"detailModal.model.allowList"}},e._l(e.allowList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{label:e.$t("idc.grid.dennyIpRule")}},[t("let-select",{attrs:{required:"",multiple:""},model:{value:e.detailModal.model.dennyList,callback:function(t){e.$set(e.detailModal.model,"dennyList",t)},expression:"detailModal.model.dennyList"}},e._l(e.dennyList,(function(a){return t("let-option",{key:a,attrs:{value:a}},[e._v(e._s(a))])})),1)],1),t("let-form-item",{attrs:{itemWidth:"242px"}},[t("let-input",{attrs:{placeholder:e.$t("idc.update.addIp"),size:"small"},model:{value:e.addIp.addAllow,callback:function(t){e.$set(e.addIp,"addAllow",t)},expression:"addIp.addAllow"}})],1),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addAllowIp}},[e._v(e._s(e.$t("operate.add")))]),t("let-form-item",{staticStyle:{"margin-left":"40px"},attrs:{itemWidth:"242px"}},[t("let-input",{attrs:{placeholder:e.$t("idc.update.addIp"),size:"small"},model:{value:e.addIp.addDenny,callback:function(t){e.$set(e.addIp,"addDenny",t)},expression:"addIp.addDenny"}})],1),t("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.addDennyIp}},[e._v(e._s(e.$t("operate.add")))])],1):e._e()],1)],1)},sa=[],ia={name:"OperationIDCManage",data:function(){return{showManualAddItem:!1,items:[],query:{group_name:""},detailModal:{show:!1,model:null,isNew:!1},ipOrders:["denny_allow","allow_denny"],allowList:[],dennyList:[],addIp:{addAllow:"",addDenny:""}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/query_idc",this.query).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},search:function(){this.fetchData()},getIpList:function(e){var t=[];return""!=e.trim()&&e.split("|").forEach((function(e){t.push(e.trim())})),t},addGroup:function(){this.allowList=[],this.dennyList=[],this.detailModal.model={group_name:"",group_name_cn:"",ip_order:"denny_allow",allow_ip_rule:"",denny_ip_rule:"",allowList:[],dennyList:[]},this.detailModal.show=!0,this.detailModal.isNew=!0},editItem:function(e){var t=this,a=this.getIpList(e.allow_ip_rule),o=this.getIpList(e.denny_ip_rule);this.detailModal.model={allowList:[],dennyList:[]},this.detailModal.model=Object.assign({},this.detailModal.model,e),this.allowList=a,this.dennyList=o,a.forEach((function(e){t.detailModal.model.allowList.push(e)})),o.forEach((function(e){t.detailModal.model.dennyList.push(e)})),this.detailModal.show=!0,this.detailModal.isNew=!1},removeItem:function(e){var t=this;this.$confirm(this.$t("idc.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_idc",e).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}))},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=this.detailModal.isNew?"/server/api/add_idc":"/server/api/update_idc",o=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){o.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){o.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null,this.detailModal.isNew=!1},addAllowIp:function(){if(this.validIp(this.addIp.addAllow)){if(this.allowList.includes(this.addIp.addAllow)&&this.detailModal.model.allowList.includes(this.addIp.addAllow))return void this.$tip.error("".concat(this.$t("idc.update.exists")));this.allowList.includes(this.addIp.addAllow)&&!this.detailModal.model.allowList.includes(this.addIp.addAllow)?(this.detailModal.model.allowList.push(this.addIp.addAllow),this.addIp.addAllow=""):(this.allowList.push(this.addIp.addAllow),this.detailModal.model.allowList.push(this.addIp.addAllow),this.addIp.addAllow="")}else this.$tip.error("".concat(this.$t("idc.update.errorIp")))},addDennyIp:function(){if(this.validIp(this.addIp.addDenny)){if(this.dennyList.includes(this.addIp.addDenny)&&this.detailModal.model.dennyList.includes(this.addIp.addDenny))return void this.$tip.error("".concat(this.$t("idc.update.exists")));this.dennyList.includes(this.addIp.addDenny)&&!this.detailModal.model.dennyList.includes(this.addIp.addDenny)?(this.detailModal.model.dennyList.push(this.addIp.addDenny),this.addIp.addDenny=""):(this.dennyList.push(this.addIp.addDenny),this.detailModal.model.dennyList.push(this.addIp.addDenny),this.addIp.addDenny="")}else this.$tip.error("".concat(this.$t("idc.update.errorIp")))},validIp:function(e){var t=new RegExp("^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.((1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)|\\*)$");return t.test(e)}}},ra=ia,la=(a("d751"),Object(x["a"])(ra,oa,sa,!1,null,null,null)),na=la.exports,ca=function(){var e=this,t=e._self._c;return t("div",{staticClass:"page_operation_approval"},[t("el-card",{staticStyle:{"margin-top":"10px",padding:"15px"}},[t("div",[t("span",[e._v(e._s(e.$t("deployService.title.baseRegistry"))+" "),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.fetchRegistryData()}}})]),t("span",{staticStyle:{float:"right","margin-bottom":"10px"}},[t("el-button",{attrs:{type:"success",size:"small"},on:{click:e.showDockerLogin}},[e._v(e._s(e.$t("imageService.btn.docker"))+" ")]),e._v("    "),t("el-button",{staticStyle:{float:"right","margin-bottom":"10px"},attrs:{type:"primary",size:"small"},on:{click:e.addRegistryItem}},[e._v(e._s(e.$t("imageService.btn.add"))+" ")])],1)]),t("let-table",{ref:"tableRegistry",attrs:{data:e.baseRegistryLists,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("imageService.form.Registry"),prop:"registry",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.UserName"),prop:"username",width:"15%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.Mark"),prop:"remark",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.UpdateTime"),prop:"update_time"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.CreateTime"),prop:"create_time"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.editRegistryItem(a.row)}}},[e._v(e._s(e.$t("operate.update"))+" ")]),t("let-table-operation",{on:{click:function(t){return e.removeRegistryItem(a.row)}}},[e._v(e._s(e.$t("operate.delete"))+" ")])]}}])})],1)],1),t("br"),t("el-card",{staticStyle:{"margin-top":"10px",padding:"15px"}},[t("div",[t("span",[e._v(e._s(e.$t("deployService.title.baseImage"))+" "),t("i",{staticClass:"el-icon-refresh-right",on:{click:function(t){return e.fetchImageData()}}})]),t("el-button",{staticStyle:{float:"right","margin-bottom":"10px"},attrs:{type:"primary",size:"small"},on:{click:e.addImageItem}},[e._v(e._s(e.$t("imageService.btn.add"))+" ")])],1),t("let-table",{ref:"table",attrs:{data:e.baseLists,"empty-msg":e.$t("common.nodata")}},[t("let-table-column",{attrs:{title:e.$t("imageService.form.Image"),prop:"image",width:"25%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.Registry"),prop:"registry",width:"10%"}}),t("let-table-column",{attrs:{title:"sha256",prop:"sha",width:"30%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.Mark"),prop:"remark",width:"10%"}}),t("let-table-column",{attrs:{title:e.$t("imageService.form.Result"),prop:"result",width:"15%"}}),t("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("let-table-operation",{on:{click:function(t){return e.editImageItem(a.row)}}},[e._v(e._s(e.$t("operate.update"))+" ")]),t("let-table-operation",{on:{click:function(t){return e.removeImageItem(a.row)}}},[e._v(e._s(e.$t("operate.delete"))+" ")]),t("let-table-operation",{on:{click:function(t){return e.pullImageItem(a.row)}}},[e._v(e._s(e.$t("operate.pull"))+" ")])]}}])})],1)],1),t("let-modal",{attrs:{title:e.baseRegistryModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit"),footShow:!1},model:{value:e.baseRegistryModal.show,callback:function(t){e.$set(e.baseRegistryModal,"show",t)},expression:"baseRegistryModal.show"}},[t("let-form",{ref:"detailRegistryForm",attrs:{rules:e.registryRules}},[t("let-form-item",{attrs:{label:e.$t("imageService.form.Registry")}},[t("let-input",{attrs:{size:"small",placeholder:"docker.io"},model:{value:e.baseRegistryModal.model.registry,callback:function(t){e.$set(e.baseRegistryModal.model,"registry",t)},expression:"baseRegistryModal.model.registry"}})],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.UserName")}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.UserName")},model:{value:e.baseRegistryModal.model.username,callback:function(t){e.$set(e.baseRegistryModal.model,"username",t)},expression:"baseRegistryModal.model.username"}})],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.Password")}},[t("let-input",{attrs:{size:"small",type:"password",placeholder:e.$t("imageService.form.Password")},model:{value:e.baseRegistryModal.model.password,callback:function(t){e.$set(e.baseRegistryModal.model,"password",t)},expression:"baseRegistryModal.model.password"}})],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.Mark"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.Mark")},model:{value:e.baseRegistryModal.model.remark,callback:function(t){e.$set(e.baseRegistryModal.model,"remark",t)},expression:"baseRegistryModal.model.remark"}})],1),t("el-button",{attrs:{type:"success",size:"small"},on:{click:e.saveRegistryItem}},[e._v(e._s(e.$t("common.submit"))+" ")]),e._v("    "),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){e.baseRegistryModal.show=!1}}},[e._v(e._s(e.$t("common.cancel"))+" ")]),e._v("    "),t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.checkDockerRegistry}},[e._v(e._s(e.$t("imageService.btn.checkRegistry"))+" ")])],1)],1),t("let-modal",{attrs:{title:e.baseModal.isNew?this.$t("dialog.title.add"):this.$t("dialog.title.edit")},on:{"on-confirm":e.saveImageItem},model:{value:e.baseModal.show,callback:function(t){e.$set(e.baseModal,"show",t)},expression:"baseModal.show"}},[t("let-form",{ref:"detailForm",attrs:{rules:e.rules,inline:""}},[t("let-form-item",{attrs:{label:e.$t("imageService.form.Registry"),required:""}},[t("let-select",{attrs:{size:"small"},model:{value:e.baseModal.model.registryId,callback:function(t){e.$set(e.baseModal.model,"registryId",t)},expression:"baseModal.model.registryId"}},e._l(e.baseRegistryLists,(function(a){return t("let-option",{key:a.id,attrs:{value:a.id}},[e._v(e._s(a.registry+"("+a.remark+")"))])})),1)],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.Image"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.Image")},model:{value:e.baseModal.model.image,callback:function(t){e.$set(e.baseModal.model,"image",t)},expression:"baseModal.model.image"}})],1),t("let-form-item",{attrs:{label:e.$t("imageService.form.Mark"),required:""}},[t("let-input",{attrs:{size:"small",placeholder:e.$t("imageService.form.Mark")},model:{value:e.baseModal.model.remark,callback:function(t){e.$set(e.baseModal.model,"remark",t)},expression:"baseModal.model.remark"}})],1)],1)],1),t("let-modal",{attrs:{title:e.$t("imageService.btn.docker"),footShow:!1,width:"80%"},model:{value:e.nodeListModal.show,callback:function(t){e.$set(e.nodeListModal,"show",t)},expression:"nodeListModal.show"}},[t("el-table",{ref:"nodeListLoading",staticStyle:{margin:"10px"},attrs:{data:e.nodeListModal.nodeList,stripe:"","row-class-name":e.tableRowClassName,"empty-text":e.$t("common.nodata")},on:{"selection-change":e.handleSelectionChange}},[t("el-table-column",{attrs:{type:"selection",width:"80"}}),t("el-table-column",{attrs:{label:e.$t("nodeList.table.th.node_name"),prop:"node_name",width:"150"}}),t("el-table-column",{attrs:{label:e.$t("nodeList.table.th.present_state"),width:"150"},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{class:"active"===a.row.present_state?"active":"inactive"},[e._v(e._s(a.row.present_state))])]}}])}),t("el-table-column",{attrs:{label:e.$t("nodeList.table.th.version"),prop:"tars_version",width:"200"}}),t("el-table-column",{attrs:{label:e.$t("nodeList.table.th.result")},scopedSlots:e._u([{key:"default",fn:function(a){return[t("span",{domProps:{innerHTML:e._s(a.row.result)}})]}}])})],1),t("div",[t("el-button",{attrs:{type:"primary",size:"small"},on:{click:e.forceDockerLogin}},[e._v(e._s(e.$t("imageService.btn.docker"))+" ")]),t("let-pagination",{staticStyle:{display:"inline",float:"right"},attrs:{page:e.nodeListModal.pageNum,total:e.nodeListModal.total},on:{change:e.gotoPage}})],1)],1)],1)},da=[],ma=(a("3ca3"),a("ddb0"),a("c740"),a("2ca0"),{name:"OperationImage",data:function(){return{baseRegistryLists:[],baseRegistryModal:{show:!1,model:{},isNew:!1},baseLists:[],nodeListModal:{show:!1,nodeList:[],pageNum:1,pageSize:20,total:1,multipleSelection:[]},baseModal:{show:!1,model:{},isNew:!1},registryRules:{remark:[{required:!0,message:"".concat(this.$t("imageService.node.markTip")),trigger:"blur"}]},rules:{image:[{required:!0,message:"".concat(this.$t("imageService.node.imageAddressTip")),trigger:"blur"}],remark:[{required:!0,message:"".concat(this.$t("imageService.node.markTip")),trigger:"blur"}]}}},mounted:function(){this.fetchRegistryData()},methods:{showDockerLogin:function(){this.nodeListModal.show=!0,this.getNodeList()},forceDockerLogin:function(){var e=this;return Object(J["a"])(Object(A["a"])().mark((function t(){var a,o;return Object(A["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(0!=e.nodeListModal.multipleSelection.length){t.next=3;break}return e.$Notice({message:e.$t("imageService.form.Choose"),type:"warning"}),t.abrupt("return");case 3:a=Object(A["a"])().mark((function t(a){var o,s,i;return Object(A["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return o=e.nodeListModal.multipleSelection[a].node_name,s=e.nodeListModal.nodeList.findIndex((function(e){return e.node_name==o})),e.nodeListModal.nodeList[s].result="docker login...",e.$set(e.nodeListModal.nodeList,s,e.nodeListModal.nodeList[s]),t.prev=4,t.next=7,e.$ajax.postJSON("/server/api/force_docker_login",{nodeName:o});case 7:i=t.sent,i.forEach((function(t){var a="";a=-1!=t.indexOf("Succeeded")?"color: green":"color: red",e.nodeListModal.nodeList[s].result+='
'+t+"
"})),e.$set(e.nodeListModal.nodeList,s,e.nodeListModal.nodeList[s]),t.next=17;break;case 12:t.prev=12,t.t0=t["catch"](4),e.nodeListModal.nodeList[s].result+='
'+"".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg)+"
",e.$set(e.nodeListModal.nodeList,s,e.nodeListModal.nodeList[s]),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 17:case"end":return t.stop()}}),t,null,[[4,12]])})),o=0;case 5:if(!(o"})}))},c8a3:function(e,t,a){},cf77:function(e,t,a){},d687:function(e,t,a){"use strict";a("9d68")},d751:function(e,t,a){"use strict";a("6dd0")},da6c:function(e,t,a){},e3d0:function(e,t,a){"use strict";a("cf77")},e4a0:function(e,t,a){},eb07:function(e,t,a){"use strict";a("a7420")},ebcc:function(e,t,a){},ebdf:function(e,t,a){"use strict";a("c8a3")},ecd7:function(e,t,a){"use strict";a("606f")}}); \ No newline at end of file diff --git a/client/dist/static/js/k8s.595e6bfd.js b/client/dist/static/js/k8s.b48d7c32.js similarity index 100% rename from client/dist/static/js/k8s.595e6bfd.js rename to client/dist/static/js/k8s.b48d7c32.js diff --git a/client/dist/static/js/logView.1d39f06e.js b/client/dist/static/js/logView.adb5ec99.js similarity index 100% rename from client/dist/static/js/logView.1d39f06e.js rename to client/dist/static/js/logView.adb5ec99.js diff --git a/client/dist/static/js/login.82c6be9e.js b/client/dist/static/js/login.79bb9d88.js similarity index 100% rename from client/dist/static/js/login.82c6be9e.js rename to client/dist/static/js/login.79bb9d88.js diff --git a/client/dist/static/js/pass.f670966e.js b/client/dist/static/js/pass.609f366f.js similarity index 100% rename from client/dist/static/js/pass.f670966e.js rename to client/dist/static/js/pass.609f366f.js diff --git a/client/dist/tars.html b/client/dist/tars.html index 2d0de8c5..eae13816 100644 --- a/client/dist/tars.html +++ b/client/dist/tars.html @@ -1 +1 @@ -Tars
\ No newline at end of file +Tars
\ No newline at end of file diff --git a/client/package-lock.json b/client/package-lock.json index d58c9f44..6a84771f 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -4307,10 +4307,24 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001375", - "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz", - "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==", - "dev": true + "version": "1.0.30001539", + "resolved": "https://mirrors.cloud.tencent.com/npm/caniuse-lite/-/caniuse-lite-1.0.30001539.tgz", + "integrity": "sha512-hfS5tE8bnNiNvEOEkm8HElUHroYwlqMMENEzELymy77+tJ6m+gA2krtHl5hxJaj71OlpC2cHZbdSMX1/YEqEkA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] }, "node_modules/case-sensitive-paths-webpack-plugin": { "version": "2.4.0", @@ -23702,9 +23716,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001375", - "resolved": "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001375.tgz", - "integrity": "sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==", + "version": "1.0.30001539", + "resolved": "https://mirrors.cloud.tencent.com/npm/caniuse-lite/-/caniuse-lite-1.0.30001539.tgz", + "integrity": "sha512-hfS5tE8bnNiNvEOEkm8HElUHroYwlqMMENEzELymy77+tJ6m+gA2krtHl5hxJaj71OlpC2cHZbdSMX1/YEqEkA==", "dev": true }, "case-sensitive-paths-webpack-plugin": { diff --git a/client/src/pages/server/config.vue b/client/src/pages/server/config.vue index 506366d9..69b190bf 100644 --- a/client/src/pages/server/config.vue +++ b/client/src/pages/server/config.vue @@ -509,7 +509,10 @@ export default { methods: { // 配置列表 getConfigList(query) { - const loading = this.$refs.configListLoading.$loading.show(); + const loading = this.$Loading.show(); + // const loading = this.$refs.configListLoading.$loading.show(); + + console.log(query); this.$ajax .getJSON("/server/api/config_file_list", query) diff --git a/config/tars-dev.conf b/config/tars-dev.conf index 6d526e68..db8463ad 100644 --- a/config/tars-dev.conf +++ b/config/tars-dev.conf @@ -20,7 +20,7 @@ #地址 # locator = tars.tarsregistry.QueryObj@tcp -h 127.0.0.1 -p 17890 - locator = tars.tarsregistry.QueryObj@tcp -h 192.168.3.13 -p 17890 + locator = tars.tarsregistry.QueryObj@tcp -h 192.168.3.6 -p 17890 sync-invoke-timeout = 20000 #最大超时时间(毫秒) max-invoke-timeout = 60000