Commit 543d2b6f authored by clauseliu's avatar clauseliu
Browse files

Merge branch 'TFAE' of http://git.code.oa.com/TarsCloud/web into TFAE

parents 83d67406 8ced2b78
Showing with 28 additions and 6 deletions
+28 -6
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>TARS</title><link href=/static/css/app.4e424.css rel=stylesheet></head><body><div id=app></div><link rel=stylesheet href=/vis/css/vis-network.min.css><script type=text/javascript src=/vis/js/vis-network.min.js></script><script type=text/javascript src=/static/js/manifest.6f04e.js></script><script type=text/javascript src=/static/js/vendor.c722c.js></script><script type=text/javascript src=/static/js/app.bbddc.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>TARS</title><link href=/static/css/app.0cf60.css rel=stylesheet></head><body><div id=app></div><link rel=stylesheet href=/vis/css/vis-network.min.css><script type=text/javascript src=/vis/js/vis-network.min.js></script><script type=text/javascript src=/static/js/manifest.6f04e.js></script><script type=text/javascript src=/static/js/vendor.45113.js></script><script type=text/javascript src=/static/js/app.75b32.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([1],{"+ybO":function(e,t){},"0frl":function(e,t){},"11nj":function(e,t){},"2cJm":function(e,t){},"3K/v":function(e,t){},"6YMh":function(e,t){},"9s/W":function(e,t){},CZtL:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAADkCAMAAACCPk7wAAAB71BMVEUAAACLq/OXr+BOgv+ZsuGasuGas+FHgvibteSgtOSaseFGgPZFgPZFgPZFgPZFgPWasuFGgPZIgPZIgPhGgPaasuFGgPVGgPZGgPWasuGas+FFgPdFgPaZsuGZsuGasuDX4vbE0/Lt8vyZseBFf/VJzI9PaZ5QZ5ZMcLpUX3VMb7ZNba1Oa6ZVXW5ObKpQaJlLc8RLcsFPaqJSZIlRZY1RZpJSYoNUYHpVXGlPaJtUXnJJdtBRZZBKdcxLcb1WW2dVXGtNbrBSY4ZTYX1Jdc5NbrJVXnBKdMlTYoBJd9VRZItJdtJFfvBFf/RIeNpGfe1TYHxHeuFFjeJIed1SY4VJyJVIuKpGkN9Id9dKdMpGlNlKc8ZLcb9OaqRGn8tJypJGfOhGnc5Ho8ZQZpRHe+ZOa6hHsLRIvKVIvqJFi+VKc8dIxphGktxHrblItq1GfOpFiehGoclHq7xIwJ9IxJtFgfJHeuNHpcNNbrRNba9HsrJUX3dFhuxHtK9Iwp1TYX9IuqdPaaBTX3hFg/BMb7hHqb5Hr7dMcLxGl9ZGmdNHp8BGmNVFfvJFhe5Ied9FiOpHm9FGmtFHpsGiuOTc7vFRzpTT3/S8ze2swOi0xurL2fK75tqo4s+J2rl4169i0p98nNxmjNlWgNem4c3j6vmllDHDAAAAIHRSTlMACvcT5WpKNy8b0MSvlvftknJQI9yz0InnpIJg3cS8tkiDxQgAAAvDSURBVHja3JhPTxpRFMXnsxBTa0ErVgcU7dTyr5VOiykLCJCQgBs27giGhdGYsCF85t77PHjf5b3ppptXfplP8MvJuedN9K8kSVImvhCHRKPRuLi4OGAWz8/PpVKp3a5Wq4/fiDiOO53OV+ITcXNzSlwSZ8R4vM98JM7Pz98ZTpjhcFgoFO6OmPxRPp9/eLi+vq7X6/P5B+Ll5T2z/EwMioNi8Zjp96fTZrPZ610RtVqtUqm0Wq3vTLfb/Un8ZtbrW2Y2m00mk9FkNBrd3/9ifhhW6Srdi0JBRB8y5JmB6BJEk+lH9mxUv3mmz5g2nsfwTKJh+unpVXSBuTOq8wyLZtOkWUyz58GgSNiir8g0axbT3VfRUA3RMM2iiY3p1WqVpmkUCgkD0aT5sAHPlug2Es2WY5VoiCYQaDvR4lkizZ450nVibkRbiVaim1MT6N5WorsMNLNoo5o8E7bnIEWX/dWxWBjT7U2iYbqz8UxYnlV1ZCYagSa4Oua+6ih6qqOiTEui19BMbKoD3RFodSTwbERLokmzMQ3PsUFMnxp0R4tnEa08wzQC/WZ6iUDDdH8K0T14VqKlOWAazcGo6kjTwEQj0hJomEaiJdDeRKM6RLTujoI5hnZ1sGhCHcPlVqL7TXQHiTamW45odQyJ4BNdTuB5e3UsStLRiLR0NGnG7DhzV4ckemhXR97u6Ll0tCQ6a3XIMWSs6ljjFhJ2oJHosDo6gWhJNDraOoZVSTRWB0xfMuTZO++MaTvSMI2OlupYqmMI0YQSjXmn9t2tAfPOFo1ruBdUogmdaJl34hnzDjtajQ7GP+8YdLQ+hjI6VKLdeceiK2p2wLN0h5NomXeBdbQkers6EGlV0rqjsxMN0d7qqG+tjmXW6mDRrFlE6+pAoifW6vg/HizujtbH8G87mnF39Ak862OoOxqmiwxKGp4p0jXC6xkdnX0M03QVVEeXk4yX4cLtaC5peGZePZtE74/FM6oD1xAPFivSujsgGi/DY3mwsGq1OvwdPbu1qoMItzrYs+roAyRaNYeIVoEmVEcTkmiIlo5mvPPOfYKbdaeqQzzrfbfpaCboji4z8CzH0LwMIVre4HEs1ZE17wgEGreQ8FWHMZ21oxFoHEPPjkai1/JgCX1HI9JyC90drf/eYd6dqgdL5jH0rzupDnd14GkI0Ui0rg79906vjmBfhmW5hg363hJ94Oxo/fcOpv3zjpEHi2vaOYZ6R+Ov0pW8wdWDRUyv1Y6+V4kO66dSbseJQiG340ShkNtxolDI7ThRKOR2nCgUcjvOH3boHYWBIAaCqI5iGnRjTTS/YC9qDLYxXoVa6BV6WaUlLJCcsEBywgLJCQskJyyQnLBAcsICyQkLJCcskJywQHLCAj4ba7e21zDEeLxd3fcabVO/5md1jQ4f3Zv+aB0vNTp89KF/DgA1Onx015OOGh0+2pqeNKvR4aOnOmaNjh5t6rIaHTx6qGvU6ODRS12rRgeP3uraNfrJ3p3kKAwDURiuhG7opgd6HoWAFDdGQGAH4qDsEBZIiSO/gMvvP8K3AOclkgNDz89DzwlN6Dih+dNxiH+GJqB5vDuKDywGoPkIfhxHJQPQnEmdOPwbgOarLCe+nDUAzc8NnPgBjYEPaMwk11JhPLmWCuNJ+L6nTSqMJ4CeCH2aIHokdDvQ2QOhW4GWzhehW4GWzkdi0GvF9CIVvf8kBb1QTJ9SWW+QEPRYMfUzqSH9nAz0bqaQbu6lTm/JQIOc8zup138i0KVCyrtSt9ckoJeK6RY6e0yiq1RMf36zh3nolWL69Z09jEMvFdMw8549TEOjnPtZg9nDMjTyAO0/e9iFbvcAXT17WIUGOWtXmtUb2IQu1Ql9gA40e8R3n+FG3cDLaKjZI7r7DFHOI/HJf/aI7T7DrTqhD3bhZo/I7jPc5geayx/svGaPyO4z3LN3pj1NBVEAfYi7VK1LjMaYNq8qIFGrKIiKcQVEUErqAm4ssliK7BikUENYCrInCn7yAz/U2zD0to/y+p52JjNv5vyEk5vb09smk/DMRdjZOXuI9Z7hHx3hIexsnD2Ees8wyTMnYWf97CHSe4a0guMMi397CPSeIS3Pp7VskXt2Z9HivGdoCDval9Fsnz2Eec+Q37CzdvYQ5T3DKlqeTcIuq2cPQd4zrDYEB+WfvCmcPQR5z5DvsLNy9hDjPcNkzzyGnYWzhxDvGfIfdimcEvUPNB6dDudyNDq4xBS9oSfB0WXUhDwRRW/w9JO35bOHgKLX0A1vl1Gzs4dwotf1JHi7jJqdPQQTzcN/Rv+Jo7pQ/PJSwqVRJeekLhRej5cSvrwcjR4HDuoisfrbQ0+071CuRov9u3WRWP3poSnad+K4Roe9u3SRWAPPFEUDR/ZpNNijC8U6WKYqGjh8jLiROTc89EUDbg2QOzdYiAYg8yTPDUaiIfMkzw1WoiHz5M4NZqIh86TODXaiIfNkzg2GoiHzJM4NFqIRt7y5wUQ04pI2N1iJxsyTNDeYicbMkzM32InGzJMyNxiKxsyTMTdYisbMkzA3WIpG3PLlhplo+O/rk4JvJQ8rbz64XnznxsUrty5ce/fp8qX7Xwvzy99ebay4+6i66nXtQt1Q65fnz2oyi0Zc0uWGmeh7pZuix0H0UyK6qAhEPy7Mn/YnRNfXDX20LBozT7LcMBUNE11GJhpEtyQmGkSXo+gFW6Ix8+TKDXPRONHFONFJq+M2mWg7qwMzT6rcyLQ6yow7eku0399Y8SY+0fVkdfywKhozT6bcyDjRBSUvUDTuaPwwtD/RmHkS5YaV6hhPVx1+XB12dzTilic3rFRHJVbH9y3R0zDRn7cmutXmRCMuaXIj8+owTHTRtolesLejjZknSW7Yrg7jF5Za2zvamHly5EZG0VgdLTjR2fgwxMyTIjdMPwxL46sjdUfjN8P//jDEzJMhN1gdlcwzT4Lc4EE0ZJ7zc4MP0T6X43ODE9GQeQ7PDV5EQ+Y5Oze4EQ2Z5+jc4Ec0ZJ6Tc4Mj0ZB5Ds4NnkRj5tnCIxJeSmg2UaKVaCXaIxLEixJtQIlWopVoJZoHiBcl2oASrUQr0Uo0DxAvSrQBJVqJVqKVaB4gXpRoA0q0Eq1EK9E8QLw4S/R5wgcgGAyGQqGBgbGxsf7+/o6Ojvb29mj0JdDd3R2JjIyMtLVNTU2Fw+G+vsnJydmVleHh4ebm5t7e90ATsLwcm5ubm5lpaGjo6up6BQQCgc7Ozp6excXF0dH5+YmJwcHBGp8SDZ6BFNFR4jkCnoG46D4ARM8mRPduil5ajsVi4Hm7aDA9iqJr5BYdTDPRUSBpoono8KZnGGkU3QQsxU2nTHQgSbSaaKPogTSrI5IQHTaZ6J1XB+wONdFoOrR9R5OJxtVBTBt2tOXVMaEm+m87drTSQAxEYfgdBS14Z29aKYpUpSBbEYqwVmTtPrHJOpI2szG52Kyx/ecRPoaTOQlv9O1BdIiz22gHbaUjG7058Y2OXR1r7+pYWue27YkOMjoWHeIs0HN9dbjH0GW0fgw7Z73RnHfiHMzoC++8u1HQ1tltNOddakaLdHyj28DVwUZHoRfpd7Ta6Ngd3XB1qGYYuDrE2RUWldG7Hc0wdaMFOn5Hb/syWp13XB0JFdxldCA6dAUPFpaGZuii45cKrqHljk4tLA3N0EnvR4fc0e4t9JqhvqN7o+OMv46CR1yA9gZooIEGuoQRF6C9ARpooE8P+vvLf/HwfD+f2bK9fjI/zsvXdjW1JeTzrTbVY2JKx11VbR4DRQPoROhzDb1d2WJ9Zb6Xa4FugM4EPe02+v3yB/oD6KGgZ2qj96AroDNHBxk90kaT0cNv9MtBRnfQNdEx5HmnoeW8IzoGhdbR0UpGS3RcEx0ZH0MHPWGjcz6G3NEjFZZuo+sa6OzNkAqeLTo47/4kOsjoMaCNMxWcj3+ggf5HIy5AewM00EADXcKIC9DeAA000ECXMOICtDdAAw000CWMuADtDdBAAw10CSMuQHsDNNBAA13CiAvQ3hwt9BeZfObQe9dnUAAAAABJRU5ErkJggg=="},"D6P/":function(e,t){},Ev9G:function(e,t){},IijP:function(e,t){},K5TI:function(e,t){},KPHC:function(e,t){},MeJx:function(e,t){},NHnr:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("7+uW"),r=a("Dd8w"),s=a.n(r),i=a("pFYg"),l=a.n(i),n=a("QpGM"),d=a.n(n),c=(a("XSxf"),a("K/Lq")),m=a.n(c),u=(a("s2Rr"),{name:"Icon",props:{name:{type:String,required:!0}}}),p={render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{staticClass:"icon"},[t("use",{attrs:{"xlink:href":"#"+this.name}})])},staticRenderFns:[]};var h=a("VU/8")(u,p,!1,function(e){a("wi40")},null,null).exports,f={name:"TarsFormItem",props:{label:String}},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("let-form-item",{staticClass:"tars-form-item"},[a("label",{staticClass:"let-form-item__label let-label__position_top clickable",on:{click:function(t){e.$emit("onLabelClick")}}},[e._v(e._s(e.label))]),e._v(" "),e._t("default")],2)},staticRenderFns:[]};var _=a("VU/8")(f,v,!1,function(e){a("VbM7")},null,null).exports,g=a("Z/F5"),b=a.n(g),$=a("aqzs"),w=a.n($);o.default.use(d.a,{locale:{en:w.a,cn:b.a}[m.a.get("locale")||"cn"]||b.a}),o.default.component(h.name,h),o.default.component(_.name,_);var M=o.default.prototype.$Loading;function y(e){this.el=e,this.loading=null}y.prototype.show=function(e,t){"object"===(void 0===e?"undefined":l()(e))&&(t=e,e=null),this.loading&&this.hide();var a=this.el,o=M(s()({fullScreen:!a,target:a&&e?a.querySelector(e):a,boxClass:"loading-inner",background:"rgba(0,0,0,0)",color:"#fff",size:24},t));return o.show(),this.loading=o,this},y.prototype.hide=function(){return this.loading&&(this.loading.hide(),this.loading=null),this},y.show=function(){var e;return y._loading||(y._loading=new y),(e=y._loading).show.apply(e,arguments)},y.hide=function(){return y._loading||(y._loading=new y),y._loading.hide()},M.show=y.show,M.hide=y.hide,Object.defineProperty(o.default.prototype,"$loading",{get:function(){return this._loading||(this._loading=new y(this.$el)),this._loading}}),Object.defineProperty(o.default.prototype,"$tip",{get:function(){return this.$Notice}});a("rplX");var k=a("mvHQ"),x=a.n(k),S=a("//Fk"),L=a.n(S),C=a("Zrlr"),D=a.n(C),F=a("wxAW"),N=a.n(F),q=a("fZjL"),T=a.n(q),R=a("woOf"),j=a.n(R),O=function(e){return"string"==typeof e},z=Array.isArray,E=function(e){return"object"===(void 0===e?"undefined":l()(e))&&null!==e},P=function(e){return"function"==typeof e},I=j.a;function A(e){return String(e).replace(/(?:[\0- "-&\+-\}\x7F-\xA8\xAA-\xAD\xAF-\u2121\u2123-\u23E8\u23F0-\u23F2\u23F4-\u23F7\u23FB-\u24C1\u24C3-\u25B5\u25B7-\u25FF\u27C0-\u2933\u2936-\u2B04\u2B08-\u2B1A\u2B1D-\u2B4F\u2B51-\u2B54\u2B56-\u302F\u3031-\u303C\u303E-\u3296\u3298\u329A-\uD7FF\uE000-\uFFFF]|[\uD800-\uD83B\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD83C[\uDC00-\uDC03\uDC05-\uDCCE\uDCD0-\uDD6F\uDD72-\uDD7D\uDD80-\uDD8D\uDD8F\uDD90\uDE52-\uDEFF]|\uD83D[\uDE50-\uDE7F\uDF00-\uDFFF]|\uD83E[\uDC00-\uDCFF\uDE00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,encodeURIComponent).replace(/ /g,"+").replace(/[!'()~*]/g,function(e){return"%"+e.charCodeAt().toString(16).slice(-2).toUpperCase()})}function J(e){if(!e)return"";var t=[];return T()(e).forEach(function(a){var o=e[a];null!==o&&void 0!==o||(o=""),t.push(A(a)+"="+A(o))}),t.join("&").replace(/%20/g,"+")}function H(e){return J(T()(e).reduce(function(t,a){return function e(t,a,o){return z(o)||E(o)?(T()(o).forEach(function(r){e(t,a+"["+r+"]",o[r])}),t):(t[a]=o,t)}(t,a,e[a])},{}))}var V=function(){function e(t){D()(this,e),this.defaults=t}return N()(e,[{key:"get",value:function(e){return I({},this.defaults,e)}},{key:"set",value:function(e,t){var a=this;if(e){if(O(e)){var o=e.split(".");o.reduce(function(e,a,r){return r===o.length-1&&(e[a]=t),e[a]},this.defaults)}E(e)&&T()(e).forEach(function(t){a.set(t,e[t])}),z(e)&&e.forEach(function(e){return a.set(e,t)})}}},{key:"remove",value:function(e){var t=this;if(e){if(O(e)){var a=e.split(".");a.reduce(function(e,t,o){return o===a.length-1&&delete e[t],e[t]},this.defaults)}z(e)&&e.forEach(function(e){return t.remove(e)})}}}]),e}(),B=function(){function e(t){D()(this,e),this.handler=t}return N()(e,[{key:"set",value:function(e){P(e)&&(this.handler=e)}},{key:"exec",value:function(){P(this.handler)&&this.handler.apply(null,arguments)}}]),e}(),U=new(function(){function e(t){D()(this,e),this.base=t||""}return N()(e,[{key:"set",value:function(e){O(e)&&(this.base=e)}},{key:"get",value:function(e){return this.base+(e||"")}}]),e}()),W=new V({credentials:"same-origin",timeout:1e4}),G=new V({"X-Requested-With":"XMLHttpRequest"}),Z=new V({}),Q=new B,Y=new B(function(){return!0});function X(e,t){var a=J(Z.get(t));return a&&(a=-1===e.indexOf("?")?"?"+a:"&"+a),e+a}function K(e){var t=e.status;if(t>=200&&t<300||304===t)return e;throw Q.exec(t,e),new Error(e.statusText)}function ee(e){return e.json().then(null,function(t){return Q.exec(500,e),L.a.reject(t)})}function te(e){return Y.handler(e)?e:L.a.reject(e)}function ae(e){return L.a.reject(e)}var oe={ServerUrl:U,Options:W,Headers:G,Body:Z,StatusHandler:Q,ResultHandler:Y,get:function(e,t){var a=W.get({headers:G.get()});return fetch(U.get(X(e,t)),a).then(K).then(ee).catch(ae)},getJSON:function(e,t){var a=W.get({headers:G.get()});return fetch(U.get(X(e,t)),a).then(K).then(ee).then(te).catch(ae)},post:function(e,t){var a=W.get({method:"POST",headers:G.get({"Content-Type":"application/x-www-form-urlencoded"}),body:H(Z.get(t))});return fetch(U.get(e),a).then(K).then(ee).then(te).catch(ae)},postForm:function(e,t){var a=W.get({method:"POST",headers:G.get(),body:t}),o=Z.get({});return T()(o).forEach(function(e){t.append(e,o[e])}),fetch(U.get(e),a).then(K).then(ee).then(te).catch(ae)},postJSON:function(e,t){var a=W.get({method:"POST",headers:G.get({Accept:"application/json","Content-Type":"application/json"}),body:x()(Z.get(t))});return fetch(U.get(e),a).then(K).then(ee).then(te).catch(ae)},put:function(e,t){var a=W.get({method:"PUT",headers:G.get({"Content-Type":"application/x-www-form-urlencoded"}),body:H(Z.get(t))});return fetch(U.get(e),a).then(K).then(ee).then(te).catch(ae)},remove:function(e,t){var a=W.get({method:"DELETE",headers:G.get()});return fetch(U.get(X(e,t)),a).then(K).then(ee).then(te).catch(ae)},download:function(e,t){window.open(U.get(X(e,t)))}};oe.ServerUrl.set("/pages"),oe.ResultHandler.set(function(e){return!(!e||200!==e.ret_code||null==e.data)}),["getJSON","postJSON"].forEach(function(e){var t=oe[e];oe["_"+e]=t,oe[e]=function(){for(var e=arguments.length,a=Array(e),o=0;o<e;o++)a[o]=arguments[o];return t.call.apply(t,[null].concat(a)).then(function(e){return e.data})}}),Object.defineProperty(o.default.prototype,"$ajax",{get:function(){return oe}});var re={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("keep-alive",[t("router-view",{staticClass:"main-width"})],1)],1)},staticRenderFns:[]};var se=a("VU/8")({name:"App"},re,!1,function(e){a("OALp")},null,null).exports,ie=a("/ocq"),le={name:"Server",data:function(){return{treeErrMsg:"加载失败",treeData:null,enableAuth:!1,serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""}}},computed:{base:function(){return"/server/"+this.$route.params.treeid}},watch:{"$route.params.treeid":function(e){this.serverData=this.getServerData(),this.isTrueTreeLevel()}},methods:{selectTree:function(e){"/server"===this.$route.path?this.$router.push("/server/"+e+"/manage"):this.$router.push({params:{treeid:e}})},handleData:function(e,t){var a=this;e&&e.length&&e.forEach(function(e){e.label=e.name,e.nodeKey=e.id,t&&(e.iconClass="tree-icon",e.expand=!0),e.children&&e.children.length&&a.handleData(e.children)})},getTreeData:function(){var e=this;this.treeData=null,this.$nextTick(function(){var t=e.$loading.show({target:e.$refs.treeLoading});e.$ajax.getJSON("/server/api/tree").then(function(a){t.hide(),e.treeData=a,e.handleData(e.treeData,!0)}).catch(function(a){t.hide(),e.treeErrMsg=a.err_msg||a.message||"加载失败",e.treeData=!1})})},getServerData:function(){if(!this.$route.params.treeid)return{};var e={level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""};return this.$route.params.treeid.split(".").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}e.level=a}),e},clickTab:function(e){this.$router.push(j()({},this.$route,{path:e}))},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||(a=!0),5!==this.serverData.level&&4!==this.serverData.level&&1!==this.serverData.level&&"config"===t&&(a=!0),a&&this.$router.replace("manage")}},created:function(){this.serverData=this.getServerData(),this.isTrueTreeLevel()},mounted:function(){var e=this;this.getTreeData(),this.$ajax.getJSON("/server/api/is_enable_auth").then(function(t){e.enableAuth=t.enableAuth||!1}).catch(function(e){})}},ne={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"page_server"},[this.$route.params.treeid?o("div",{staticClass:"right-view"},[o("let-tabs",{attrs:{activekey:e.$route.path},on:{click:e.clickTab}},[o("let-tab-pane",{attrs:{tabkey:e.base+"/manage",tab:e.$t("header.tab.tab1")}}),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/publish",tab:e.$t("index.rightView.tab.patch")}}):e._e(),e._v(" "),5===e.serverData.level||4===e.serverData.level||1===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/config",tab:5===e.serverData.level?e.$t("index.rightView.tab.serviceConfig"):4===e.serverData.level?e.$t("index.rightView.tab.setConfig"):1===e.serverData.level?e.$t("index.rightView.tab.appConfig"):""}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/server-monitor",tab:e.$t("index.rightView.tab.statMonitor")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/property-monitor",tab:e.$t("index.rightView.tab.propertyMonitor")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/interface-debuger",tab:e.$t("index.rightView.tab.infDebuger")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/call-chain",tab:e.$t("index.rightView.tab.callChain")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/call-chain-analyze",tab:e.$t("index.rightView.tab.callChainAnalyze")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/task",tab:e.$t("index.rightView.tab.task")}}):e._e(),e._v(" "),5===e.serverData.level&&e.enableAuth?o("let-tab-pane",{attrs:{tabkey:e.base+"/user-manage",tab:e.$t("index.rightView.tab.privileage")}}):e._e()],1),e._v(" "),o("router-view",{key:e.$route.params.treeid,ref:"childView",staticClass:"page_server_child"})],1):o("div",{staticClass:"right-view"},[o("div",{staticClass:"empty"},[o("img",{staticClass:"package",attrs:{src:a("CZtL")}}),e._v(" "),o("p",{staticClass:"title"},[e._v(e._s(e.$t("index.rightView.title")))]),e._v(" "),o("p",{staticClass:"notice",domProps:{innerHTML:e._s(e.$t("index.rightView.tips"))}})])])])},staticRenderFns:[]};var de=a("VU/8")(le,ne,!1,function(e){a("IijP")},null,null).exports,ce={name:"ServerManage",data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},serverList:[],serverNotifyList:[],pageNum:1,pageSize:20,total:1,serverTypes:["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars"],configModal:{show:!1,model:null},servantModal:{show:!1,model:null,currentServer:null},servantDetailModal:{show:!1,isNew:!0,model:null},logLevels:["NONE","DEBUG","INFO","WARN","ERROR"],moreCmdModal:{show:!1,model:null,currentServer:null},failCount:0}},computed:{showOthers:function(){return 5===this.serverData.level},isEndpointValid:function(){return!(!this.servantDetailModal.model||!this.servantDetailModal.model.endpoint)&&this.checkServantEndpoint(this.servantDetailModal.model.endpoint)}},methods:{getServerList:function(){var e=this,t=this.$refs.serverListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.$route.params.treeid}).then(function(a){t.hide(),e.serverList=a}).catch(function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.msg.fail"),e.$t("common.alert")).then(function(){e.getServerList()})})},getServerNotifyList:function(e){var t=this;if(this.showOthers){var a=this.$refs.serverNotifyListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_notify_list",{tree_node_id:this.$route.params.treeid,page_size:this.pageSize,curr_page:e}).then(function(o){a.hide(),t.pageNum=e,t.total=Math.ceil(o.count/t.pageSize),t.serverNotifyList=o.rows}).catch(function(e){a.hide(),t.$tip.error(t.$t("serverList.restart.failed")+": "+(e.err_msg||e.message))})}},gotoPage:function(e){this.getServerNotifyList(e)},getTemplateList:function(){var e=this;this.$ajax.getJSON("/server/api/template_name_list").then(function(t){e.configModal.model?e.configModal.model.templates=t:e.configModal.model={templates:t}}).catch(function(t){e.$tip.error(e.$t("serverList.restart.failed")+": "+(t.err_msg||t.message))})},getServerConfig:function(e){var t=this,a=this.$loading.show({target:this.$refs.configFormLoading});this.$ajax.getJSON("/server/api/server",{id:e}).then(function(e){a.hide(),t.configModal.model?t.configModal.model=j()({},t.configModal.model,e):(e.templates=[],t.configModal.model=e)}).catch(function(e){a.hide(),t.closeConfigModal(),t.$tip.error(t.$t("serverList.restart.failed")+": "+(e.err_msg||e.message))})},configServer:function(e){this.configModal.show=!0,this.getTemplateList(),this.getServerConfig(e)},saveConfig:function(){var e=this;if(this.$refs.configForm.validate()){var t=this.$Loading.show();this.$ajax.postJSON("/server/api/update_server",s()({isBak:this.configModal.model.bak_flag},this.configModal.model)).then(function(a){t.hide(),e.serverList=e.serverList.map(function(e){return e.id===a.id?a:e}),e.closeConfigModal(),e.$tip.success(e.$t("serverList.restart.success"))}).catch(function(a){t.hide(),e.$tip.error(e.$t("serverList.restart.failed")+": "+(a.message||a.err_msg))})}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1,this.configModal.model=null},checkTaskStatus:function(e,t){var a=this;return new L.a(function(o,r){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: "+t.task_no):r(new Error("taskid: "+t.task_no))}).catch(function(s){t?r(new Error(s.err_msg||s.message||a.$t("common.networkErr"))):setTimeout(function(){o(a.checkTaskStatus(e,!0))},3e3)})})},addTask:function(e,t,a){var o=this,r=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){r.hide(),o.getServerList(),o.$tip.success({title:a.success,message:e})}).catch(function(e){throw e})}).catch(function(e){r.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;this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then(function(){t.addTask(e,"undeploy_tars",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")}),t.closeMoreCmdModal()})},manageServant:function(e){var t=this;this.servantModal.show=!0;var a=this.$loading.show({target:this.$refs.servantModalLoading});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(t.$t("serverList.restart.failed")+": "+(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=j()({},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=/^h\s(\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,o=/^t\s([1-9]|[1-9]\d+)$/i,r=/^p\s\d{4,5}$/i,s=!0;if(/^tcp|udp$/i.test(t[0])){for(var i=0,l=1;l<t.length;l++)if(a&&a.test(t[l])&&(i++,this.servantDetailModal.model.node_name=t[l].split(/\s/)[1],a=null),o&&o.test(t[l])&&(i++,o=null),r&&r.test(t[l])){var n=t[l].substring(2);n<0||n>65535||i++,r=null}s=3===i}else s=!1;return s},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(e.$t("common.error")+": "+(a.err_msg||a.message))})}else 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(e.$t("common.error")+": "+(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(e){a.hide(),t.servantModal.model=t.servantModal.model.map(function(t){if(t.id!==e)return t}).filter(function(e){return e}),t.$tip.success(t.$t("common.success"))}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(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.$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(t.$t("common.error")+": "+(e.err_msg||e.message))})},sendCommand:function(e,t,a){var o=this,r=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:t}).then(function(e){r.hide();var t=e[0].err_msg.replace(/\n/g,"<br>");if(0!==e[0].ret_code)throw new Error(t);var s={title:o.$t("common.success"),message:t};a&&(s.duration=0),o.$tip.success(s)}).catch(function(e){r.hide(),o.$tip.error({title:o.$t("common.error"),message:e.err_msg||e.message})})},invokeMoreCmd:function(){var e=this.moreCmdModal.model,t=this.moreCmdModal.currentServer;"undeploy_tars"===e.selected?this.undeployServer(t.id):"setloglevel"===e.selected?this.sendCommand(t.id,t.application+".setloglevel "+e.setloglevel):"loadconfig"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,t.application+".loadconfig "+e.loadconfig):"command"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,e.command):"connection"===e.selected&&this.sendCommand(t.id,t.application+".connection",!0)},closeMoreCmdModal:function(){this.$refs.moreCmdForm&&this.$refs.moreCmdForm.resetValid(),this.moreCmdModal.unwatch&&this.moreCmdModal.unwatch(),this.moreCmdModal.show=!1,this.moreCmdModal.model=null},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}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getServerList(),this.getServerNotifyList(1)}},me={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[e.serverList?a("let-table",{ref:"serverListLoading",attrs:{data:e.serverList,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"140px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.enable_set?a("p",{staticStyle:{"max-width":"200px"}},[e._v("\n "+e._s(e.$t("common.set.setName"))+""+e._s(t.row.set_name)),a("br"),e._v("\n "+e._s(e.$t("common.set.setArea"))+""+e._s(t.row.set_area)),a("br"),e._v("\n "+e._s(e.$t("common.set.setGroup"))+""+e._s(t.row.set_group)+"\n ")]):a("span",[e._v(e._s(e.$t("common.disable")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.setting_state?"status-active":"status-off"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus"),width:"65px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.present_state?"status-active":"activating"===e.row.present_state?"status-activating":"status-off"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id",width:"80px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version",width:"68px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.configServer(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.restartServer(t.row.id)}}},[e._v(e._s(e.$t("operate.restart")))]),e._v(" "),a("let-table-operation",{staticClass:"danger",on:{click:function(a){e.stopServer(t.row.id)}}},[e._v(e._s(e.$t("operate.stop")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.manageServant(t.row)}}},[e._v(e._s(e.$t("operate.servant")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showMoreCmd(t.row)}}},[e._v(e._s(e.$t("operate.more")))])]}}])})],1):e._e(),e._v(" "),e.serverNotifyList&&e.showOthers?a("let-table",{ref:"serverNotifyListLoading",attrs:{data:e.serverNotifyList,title:e.$t("serverList.title.serverStatus"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"notifytime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.serviceID"),prop:"server_id"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.threadID"),prop:"thread_id"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result"),prop:"result"}})],1):e._e(),e._v(" "),a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),e._v(" "),a("let-modal",{attrs:{title:e.$t("serverList.dlg.title.editService"),width:"800px",footShow:!(!e.configModal.model||!e.configModal.model.server_name)},on:{"on-confirm":e.saveConfig,close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model&&e.configModal.model.server_name?a("let-form",{ref:"configForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("common.service")}},[e._v(e._s(e.configModal.model.server_name))]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("common.ip")}},[e._v(e._s(e.configModal.model.node_name))]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.isBackup"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("common.yes")},{value:!1,text:e.$t("common.no")}]},model:{value:e.configModal.model.bak_flag,callback:function(t){e.$set(e.configModal.model,"bak_flag",t)},expression:"configModal.model.bak_flag"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("common.template"),required:""}},[e.configModal.model.templates&&e.configModal.model.templates.length?a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.template_name,callback:function(t){e.$set(e.configModal.model,"template_name",t)},expression:"configModal.model.template_name"}},e._l(e.configModal.model.templates,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})):a("span",[e._v(e._s(e.configModal.model.template_name))])],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.serviceType"),required:""}},[a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.server_type,callback:function(t){e.$set(e.configModal.model,"server_type",t)},expression:"configModal.model.server_type"}},e._l(e.serverTypes,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.enableSet"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("common.enable")},{value:!1,text:e.$t("common.disable")}]},model:{value:e.configModal.model.enable_set,callback:function(t){e.$set(e.configModal.model,"enable_set",t)},expression:"configModal.model.enable_set"}})],1),e._v(" "),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setName"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setName")},model:{value:e.configModal.model.set_name,callback:function(t){e.$set(e.configModal.model,"set_name",t)},expression:"configModal.model.set_name"}})],1):e._e(),e._v(" "),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setArea"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setArea"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setArea")},model:{value:e.configModal.model.set_area,callback:function(t){e.$set(e.configModal.model,"set_area",t)},expression:"configModal.model.set_area"}})],1):e._e(),e._v(" "),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setGroup"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setGroup"),required:"",pattern:"^[0-9\\*]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setGroup")},model:{value:e.configModal.model.set_group,callback:function(t){e.$set(e.configModal.model,"set_group",t)},expression:"configModal.model.set_group"}})],1):e._e(),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.asyncThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.placeholder.thread"),required:"",pattern:"tars_nodejs"===e.configModal.model.server_type?"^[1-9][0-9]*$":"^([3-9]|[1-9][0-9]+)$","pattern-tip":"$t('serverList.dlg.placeholder.thread')"},model:{value:e.configModal.model.async_thread_num,callback:function(t){e.$set(e.configModal.model,"async_thread_num",t)},expression:"configModal.model.async_thread_num"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.defaultPath")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.base_path,callback:function(t){e.$set(e.configModal.model,"base_path",t)},expression:"configModal.model.base_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.exePath")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.exe_path,callback:function(t){e.$set(e.configModal.model,"exe_path",t)},expression:"configModal.model.exe_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.startScript")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.start_script_path,callback:function(t){e.$set(e.configModal.model,"start_script_path",t)},expression:"configModal.model.start_script_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.stopScript")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.stop_script_path,callback:function(t){e.$set(e.configModal.model,"stop_script_path",t)},expression:"configModal.model.stop_script_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.monitorScript"),itemWidth:"724px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.monitor_script_path,callback:function(t){e.$set(e.configModal.model,"monitor_script_path",t)},expression:"configModal.model.monitor_script_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.privateTemplate"),labelWidth:"150px",itemWidth:"724px"}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:4},model:{value:e.configModal.model.profile,callback:function(t){e.$set(e.configModal.model,"profile",t)},expression:"configModal.model.profile"}})],1)],1):a("div",{ref:"configFormLoading",staticClass:"loading-placeholder"})],1),e._v(" "),a("let-modal",{attrs:{title:e.$t("serverList.table.servant.title"),width:"1200px",footShow:!1},on:{close:e.closeServantModal},model:{value:e.servantModal.show,callback:function(t){e.$set(e.servantModal,"show",t)},expression:"servantModal.show"}},[a("let-button",{staticClass:"tbm16",attrs:{size:"small",theme:"primary"},on:{click:function(t){e.configServant()}}},[e._v(e._s(e.$t("operate.add"))+" Servant")]),e._v(" "),e.servantModal.model?a("let-table",{attrs:{data:e.servantModal.model,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("operate.servant"),prop:"servant"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.adress"),prop:"endpoint"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.thread"),prop:"thread_num"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxConnecttions"),prop:"max_connections"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxQueue"),prop:"queuecap"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),prop:"queuetimeout"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.configServant(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{staticClass:"danger",on:{click:function(a){e.deleteServant(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1):a("div",{ref:"servantModalLoading",staticClass:"loading-placeholder"})],1),e._v(" "),a("let-modal",{attrs:{title:e.servantDetailModal.isNew?e.$t("operate.title.add")+" Servant":e.$t("operate.title.update")+" Servant",width:"800px",footShow:!!e.servantDetailModal.model},on:{"on-confirm":e.saveServantDetail,close:e.closeServantDetailModal,"on-cancel":e.closeServantDetailModal},model:{value:e.servantDetailModal.show,callback:function(t){e.$set(e.servantDetailModal,"show",t)},expression:"servantDetailModal.show"}},[e.servantDetailModal.model?a("let-form",{ref:"servantDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService"),itemWidth:"724px"}},[a("span",[e._v(e._s(e.servantDetailModal.model.application)+"·"+e._s(e.servantDetailModal.model.server_name))])]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.objName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.c"),required:"",pattern:"^[A-Za-z]+$","pattern-tip":e.$t("serverList.servant.obj")},model:{value:e.servantDetailModal.model.obj_name,callback:function(t){e.$set(e.servantDetailModal.model,"obj_name",t)},expression:"servantDetailModal.model.obj_name"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.numOfThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.obj"),required:"",pattern:"^[1-9][0-9]*$","pattern-tip":e.$t("serverList.servant.thread")},model:{value:e.servantDetailModal.model.thread_num,callback:function(t){e.$set(e.servantDetailModal.model,"thread_num",t)},expression:"servantDetailModal.model.thread_num"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.servant.adress"),required:"",itemWidth:"724px"}},[a("let-input",{ref:"endpoint",attrs:{size:"small",placeholder:"tcp -h 172.27.205.40 -t 60000 -p 12000",required:"",extraTip:e.isEndpointValid?"":e.$t("serverList.servant.error")},model:{value:e.servantDetailModal.model.endpoint,callback:function(t){e.$set(e.servantDetailModal.model,"endpoint",t)},expression:"servantDetailModal.model.endpoint"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.maxConnecttions"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.max_connections,callback:function(t){e.$set(e.servantDetailModal.model,"max_connections",t)},expression:"servantDetailModal.model.max_connections"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.lengthOfQueue"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuecap,callback:function(t){e.$set(e.servantDetailModal.model,"queuecap",t)},expression:"servantDetailModal.model.queuecap"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.queueTimeout"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuetimeout,callback:function(t){e.$set(e.servantDetailModal.model,"queuetimeout",t)},expression:"servantDetailModal.model.queuetimeout"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.allowIP")}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.allow_ip,callback:function(t){e.$set(e.servantDetailModal.model,"allow_ip",t)},expression:"servantDetailModal.model.allow_ip"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.protocol"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:"tars",text:"TARS"},{value:"not_tars",text:e.$t("serverList.servant.notTARS")}]},model:{value:e.servantDetailModal.model.protocol,callback:function(t){e.$set(e.servantDetailModal.model,"protocol",t)},expression:"servantDetailModal.model.protocol"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.treatmentGroup"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.handlegroup,callback:function(t){e.$set(e.servantDetailModal.model,"handlegroup",t)},expression:"servantDetailModal.model.handlegroup"}})],1)],1):e._e()],1),e._v(" "),a("let-modal",{staticClass:"more-cmd",attrs:{title:e.$t("operate.title.more"),width:"700px"},on:{"on-confirm":e.invokeMoreCmd,close:e.closeMoreCmdModal,"on-cancel":e.closeMoreCmdModal},model:{value:e.moreCmdModal.show,callback:function(t){e.$set(e.moreCmdModal,"show",t)},expression:"moreCmdModal.show"}},[e.moreCmdModal.model?a("let-form",{ref:"moreCmdForm"},[a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"setloglevel"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.logLevel")))]),e._v(" "),a("let-select",{attrs:{size:"small",disabled:"setloglevel"!==e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.setloglevel,callback:function(t){e.$set(e.moreCmdModal.model,"setloglevel",t)},expression:"moreCmdModal.model.setloglevel"}},e._l(e.logLevels,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"loadconfig"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.pushFile")))]),e._v(" "),a("let-select",{attrs:{size:"small",placeholder:e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length?e.$t("pub.dlg.defaultValue"):e.$t("pub.dlg.noConfFile"),disabled:!(e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length)||"loadconfig"!==e.moreCmdModal.model.selected,required:"loadconfig"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.loadconfig,callback:function(t){e.$set(e.moreCmdModal.model,"loadconfig",t)},expression:"moreCmdModal.model.loadconfig"}},e._l(e.moreCmdModal.model.configs,function(t){return a("let-option",{key:t.filename,attrs:{value:t.filename}},[e._v(e._s(t.filename))])}))],1),e._v(" "),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"command"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.sendCommand")))]),e._v(" "),a("let-input",{attrs:{size:"small",disabled:"command"!==e.moreCmdModal.model.selected,required:"command"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.command,callback:function(t){e.$set(e.moreCmdModal.model,"command",t)},expression:"moreCmdModal.model.command"}})],1),e._v(" "),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"connection"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.serviceLink")))])],1),e._v(" "),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{staticClass:"danger",attrs:{label:"undeploy_tars"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("operate.undeploy"))+" "+e._s(e.$t("common.service")))])],1)],1):e._e()],1)],1)},staticRenderFns:[]};var ue=a("VU/8")(ce,me,!1,function(e){a("6YMh")},null,null).exports,pe={name:"ServerPublish",data:function(){return{activeKey:"",treeData:[],totalServerList:[],serverList:[],isCheckedAll:!1,totalPage:0,pageSize:20,page:1,publishModal:{show:!1,model:null},finishModal:{show:!1,model:{task_no:"",items:[]}},statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.running"),2:this.$t("serverList.restart.success"),3:this.$t("serverList.restart.failed"),4:this.$t("serverList.restart.cancel"),5:this.$t("serverList.restart.parial")},statusMap:{0:"EM_T_NOT_START",1:"EM_T_RUNNING",2:"EM_T_SUCCESS",3:"EM_T_FAILED",4:"EM_T_CANCEL",5:"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")}],tagList:[],tagVersion:"",publishUrlConfModal:{show:!1,model:{tag:"",compiler:"",task:""}},compilerModal:{show:!1,model:null},pkgUpload:{show:!1,model:null}}},methods:{getCompileConf:function(){var e=this;this.$ajax.getJSON("/server/api/get_compile_conf").then(function(t){t.enable&&e.patchRadioData.push({value:"compile",text:e.$t("pub.dlg.compileAndPublish")})}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getServerList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.$route.params.treeid}).then(function(a){t.hide();var o=a||[];o.forEach(function(e){e.isChecked=!1}),e.totalServerList=o,e.totalPage=Math.ceil(e.totalServerList.length/e.pageSize),e.page=1,e.updateServerList()}).catch(function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.table.msg.fail")).then(function(){e.getServerList()})})},changePage:function(e){this.page=e},openPublishModal:function(){var e=this,t=this.serverList.filter(function(e){return e.isChecked});if(t.length<=0)this.$tip.warning(this.$t("pub.dlg.a"));else{var a=t[0];this.publishModal.model={application:a.application,server_name:a.server_name,serverList:t,patchList:[],patch_id:"",update_text:"",show:!0},this.getPatchList(a.application,a.server_name,1,50).then(function(t){e.publishModal.model.patchList=t.rows}),this.publishModal.show=!0}},getPatchList:function(e,t,a,o){return this.$ajax.getJSON("/server/api/server_patch_list",{application:e,module_name:t,curr_page:a,page_size:o})},closePublishModal:function(){this.publishModal.show=!1,this.publishModal.modal=null,this.patchType="patch",this.$refs.publishForm.resetValid()},savePublishServer:function(){var e=this;if(this.$refs.publishForm.validate()){var t=[];this.publishModal.model.serverList.forEach(function(a){t.push({server_id:a.id.toString(),command:"patch_tars",parameters:{patch_id:e.publishModal.model.patch_id.toString(),bak_flag:a.bak_flag,update_text:e.publishModal.model.update_text}})});var a=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!0,items:t}).then(function(t){a.hide(),e.closePublishModal(),e.finishModal.model.task_no=t,e.finishModal.show=!0,e.getTaskRepeat(t)}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},closeFinishModal:function(){this.finishModal.show=!1,this.finishModal.modal=null,this.$refs.finishForm.resetValid()},getTaskRepeat:function(e){var t=this,a=void 0;a&&clearTimeout(a);!function o(){t.$ajax.getJSON("/server/api/task",{task_no:e}).then(function(e){e.items.forEach(function(e){2===parseInt(e.status,10)||3===parseInt(e.status,10)?clearTimeout(a):a=setTimeout(o,3e3)}),t.finishModal.model.items=e.items}).catch(function(e){clearTimeout(a),t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}()},updateServerList:function(){var e=(this.page-1)*this.pageSize,t=this.page*this.pageSize;this.serverList=this.totalServerList.slice(e,t)},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(t.$t("common.error")+": "+(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})},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){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(e.$t("common.error")+": "+(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,this.getCodeVersion())},getCodeVersion:function(){var e=this;this.$ajax.get("/server/api/get_tag_list",{application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then(function(t){""==t.data?e.openPubConfModal():e.tagList=t.data}).catch(function(t){e.tagList=[],e.$tip.error(e.$t("common.error")+": "+(err.err_msg||err.message))})},openPubConfModal:function(){var e=this;this.publishUrlConfModal.show=!0,this.$ajax.getJSON("/server/api/get_tag_conf",{application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then(function(t){e.publishUrlConfModal.model.tag=t.path}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.err_msg||t.message))})},saveCompilerUrl:function(){var e=this;if(this.$refs.compilerForm.validate()){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/set_tag_conf",{path:this.publishUrlConfModal.model.tag,application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then(function(a){t.hide(),e.$tip.success(e.$t("common.success")),e.publishUrlConfModal.show=!1,e.getCodeVersion()}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.err_msg||a.message))})}},addCompileTask:function(){var e=this;this.$ajax.getJSON("/server/api/get_compile_conf").then(function(t){var a=t.getVersionList;if(a){var o=e.publishModal.model.serverList.map(function(e){return e.node_name}),r={application:e.publishModal.model.application,server_name:e.publishModal.model.server_name,node:o.join(";"),path:e.tagVersion.split("--")[0],version:e.tagVersion.split("--")[1],comment:e.publishModal.model.update_text||"",compileUrl:a},s=e.$Loading.show();e.$ajax.postJSON("/server/api/do_compile",r).then(function(t){s.hide(),e.compilerModal.show=!0;var a="string"==typeof t?t:t.data;e.getStatus(a)}).catch(function(t){s.hide(),e.$tip.error(e.$t("common.error")+": "+(t.err_msg||t.message))})}else e.openPubConfModal()}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.err_msg||t.message))})},taskStatus:function(e){this.getStatus(e)},getStatus:function(e){var t=this;!function a(){var o=null;o&&clearTimeout(o),t.$ajax.getJSON("/server/api/compiler_task",{taskNo:e}).then(function(r){var s="array"==typeof r?r:r.data;if(s[0].status=t.statusConfig[s[0].state],1==s[0].state&&(o=setTimeout(a,2e3)),t.compilerModal.model?j()(t.compilerModal.model,{progress:s}):t.compilerModal.model={progress:s},2==s[0].state){var i=t.$Loading({text:"回传发布包"});i.show(),t.compilerModal.show=!1,setTimeout(function a(){t.$ajax.getJSON("/server/api/get_server_patch",{task_id:e}).then(function(e){0!==T()(e).length?(i.hide(),t.publishModal.model.patch_id=e.id,t.publishModal.show=!1,t.savePublishServer()):setTimeout(a,2e3)}).catch(function(e){i.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})},2e3)}}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})}()}},mounted:function(){this.getServerList(),this.getCompileConf()},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach(function(t){t.isChecked=e})},page:function(){this.updateServerList()}}},he={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_publish"},[e.showHistory?e._e():a("div",[e.serverList&&e.serverList.length>0?a("let-table",{ref:"table",attrs:{data:e.serverList,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.noService")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.enable_set?e.$t("common.enable"):e.$t("common.disable")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setName"),prop:"set_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setArea"),prop:"set_area"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setGroup"),prop:"set_group"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"==e.row.setting_state?"status-active":"status-off"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"==e.row.present_state?"status-active":"status-off"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}])}),e._v(" "),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.totalPage,page:e.page},on:{change:e.changePage},slot:"pagination"}),e._v(" "),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.openPublishModal}},[e._v(e._s(e.$t("pub.btn.pub")))]),e._v(" "),e.serverList&&e.serverList.length>0?a("let-button",{attrs:{size:"small"},on:{click:e.gotoHistory}},[e._v(e._s(e.$t("pub.btn.history")))]):e._e()],1)],1):e._e(),e._v(" "),a("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?a("let-form",{ref:"publishForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService")}},[e._v("\n "+e._s(e.publishModal.model.application)+"·"+e._s(e.publishModal.model.server_name)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("pub.dlg.ip")}},e._l(e.publishModal.model.serverList,function(t){return a("div",{key:t.id},[e._v(e._s(t.node_name))])})),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("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._v(" "),a("let-form-item",{attrs:{label:e.$t("pub.dlg.patchType")}},[a("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._v(" "),e.publishModal.model.show?a("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[a("let-select",{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(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v("\n "+e._s(t.id)+" | "+e._s(t.posttime)+" | "+e._s(t.comment)+"\n ")])})),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.showUploadModal}},[e._v(e._s(e.$t("pub.dlg.upload")))]),e._v(" "),a("br"),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.savePublishServer}},[e._v(e._s(e.$t("common.patch")))])],1):a("let-form-item",{attrs:{label:e.$t("serverList.table.th.version")}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty"),requred:""},model:{value:e.tagVersion,callback:function(t){e.tagVersion=t},expression:"tagVersion"}},e._l(e.tagList,function(t){return a("let-option",{key:""+t.version,attrs:{value:t.path+"--"+t.version}},[e._v(e._s(t.version))])})),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.addCompileTask}},[e._v(e._s(e.$t("pub.dlg.compileAndPublish")))]),e._v(" "),e._e()],1)],1):e._e()],1),e._v(" "),a("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?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.submit"))+"\n ")]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("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),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{title:e.$t("serverList.table.th.result"),width:"880px",footShow:!1},on:{"on-cancel":e.closeFinishModal},model:{value:e.finishModal.show,callback:function(t){e.$set(e.finishModal,"show",t)},expression:"finishModal.show"}},[e.finishModal.model?a("let-table",{attrs:{title:e.$t("serverList.servant.taskID")+e.finishModal.model.task_no,data:e.finishModal.model.items}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.status")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-tag",{attrs:{theme:2==t.row.status?"success":3==t.row.status?"danger":"",checked:""}},[e._v("\n "+e._s(e.statusConfig[t.row.status]+(2!=t.row.status&&3!=t.row.status?"...":""))+"\n ")])]}}])})],1):e._e()],1)],1),e._v(" "),e.showHistory?a("div",[a("let-form",{attrs:{inline:"",itemWidth:"300px"},nativeOn:{submit:function(t){return t.preventDefault(),e.getHistoryList(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.date")}},[a("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}}})],1),e._v(" "),a("let-form-item",[a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),e._v(" "),e.totalHistoryList&&e.totalHistoryList.length>0?a("let-table",{ref:"historyTable",attrs:{data:e.totalHistoryList,title:e.$t("historyList.title"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.servant.taskID"),prop:"task_no"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c2")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.serial?e.$t("common.yes"):e.$t("common.no")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.dlg.title.taskStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.statusMap[t.row.status]||"-"))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c4")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.viewTask(t.row.task_no)}}},[e._v(e._s(e.$t("operate.view")))])]}}])}),e._v(" "),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.historyTotalPage,page:e.historyPage},on:{change:e.changeHistoryPage},slot:"pagination"}),e._v(" "),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showHistory=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("historyList.table.th.c4"),width:"880px",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?a("let-table",{attrs:{data:e.taskModal.model.items}},[a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c1"),prop:"item_no"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c5"),prop:"command"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.status"),prop:"status_info"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c7"),prop:"execute_info"}})],1):e._e()],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("pub.dlg.conf"),width:"800px",footShow:!0},on:{"on-confirm":e.saveCompilerUrl,"on-cancel":function(t){e.publishUrlConfModal.show=!1}},model:{value:e.publishUrlConfModal.show,callback:function(t){e.$set(e.publishUrlConfModal,"show",t)},expression:"publishUrlConfModal.show"}},[e.publishUrlConfModal.model?a("let-form",{ref:"compilerForm",attrs:{itemWidth:"100%",required:""}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.tag")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("pub.tips.tag"),"required-tip":e.$t("deployService.table.tips.empty"),required:""},model:{value:e.publishUrlConfModal.model.tag,callback:function(t){e.$set(e.publishUrlConfModal.model,"tag",t)},expression:"publishUrlConfModal.model.tag"}})],1)],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{title:e.$t("pub.dlg.compileProgress"),width:"880px",footShow:!1},model:{value:e.compilerModal.show,callback:function(t){e.$set(e.compilerModal,"show",t)},expression:"compilerModal.show"}},[e.compilerModal.model?a("let-table",{attrs:{data:e.compilerModal.model.progress}},[a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return["1"==t.row.state?a("span",{staticClass:"running"},[e._v(e._s(t.row.status))]):"2"==t.row.state?a("span",{staticClass:"success"},[e._v(e._s(t.row.status))]):a("span",{staticClass:"stop"},[e._v(e._s(t.row.status))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}})],1):e._e()],1)],1)},staticRenderFns:[]};var fe=a("VU/8")(pe,he,!1,function(e){a("3K/v")},null,null).exports,ve={render:function(){var e=this.$createElement;return(this._self._c||e)("section",{staticClass:"section"},[this._t("default")],2)},staticRenderFns:[]};var _e=a("VU/8")(null,ve,!1,function(e){a("pGHe")},"data-v-0da03ec9",null).exports,ge={name:"ServerConfig",components:{wrapper:_e},data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},checkedConfigId:"",configList:[],refFileList:null,nodeConfigList:null,nodeCheckList:[],configModal:{show:!1,isNew:!0,model:null},detailModal:{show:!1,title:"",model:null},refFileModal:{show:!1,model:{fileList:[]}},nodeRefFileListModal:{show:!1,model:null},pushResultModal:{show:!1,model:null}}},computed:{showOthers:function(){return 5===this.serverData.level},nodeCheckAll:{get:function(){return!(!this.nodeConfigList||!this.nodeConfigList.length)&&this.nodeCheckList.length===this.nodeConfigList.length},set:function(e){this.nodeCheckList=e?this.nodeConfigList.map(function(e){return e.id}):[]}}},watch:{checkedConfigId:function(){var e=this;this.$nextTick(function(){e.getRefFileList(),e.getNodeConfigList()})}},methods:{getConfigList:function(e){var t=this,a=this.$refs.configListLoading.$loading.show();this.$ajax.getJSON("/server/api/config_file_list",e).then(function(e){a.hide(),t.configList=e,t.refFileList=[],t.nodeConfigList=[],e[0]&&e[0].id&&(t.checkedConfigId=e[0].id)}).catch(function(e){a.hide(),t.$confirm(e.err_msg||e.message||t.$t("common.error"),t.$t("common.retry"),t.$t("common.alert")).then(function(){t.getConfigList()})})},addConfig:function(){this.configModal.model={filename:"",config:""},this.configModal.isNew=!0,this.configModal.show=!0},changeConfig:function(e,t){this.configModal.model=j()({reason:""},e),this.configModal.target=t,this.configModal.isNew=!1,this.configModal.show=!0},updateConfigFile:function(){var e=this;if(this.$refs.configForm.validate()){var t=this.$Loading.show(),a=this.configModal.model;if(this.configModal.isNew){var o=j()({application:this.serverData.application,level:this.serverData.level,server_name:this.serverData.server_name,set_name:this.serverData.set_name,set_area:this.serverData.set_area,set_group:this.serverData.set_group},a);this.$ajax.postJSON("/server/api/add_config_file",o).then(function(a){t.hide(),e.configList.unshift(a),1===e.configList.length&&(e.checkedConfigId=a.id),e.$tip.success(e.$t("common.success")),e.closeConfigModal()}).catch(function(){t.hide(),e.$tip.error(e.$t("common.error"))})}else this.$ajax.postJSON("/server/api/update_config_file",{config:a.config,id:a.id,reason:a.reason}).then(function(a){t.hide(),e[e.configModal.target]=e[e.configModal.target].map(function(e){return e.id===a.id?a:e}),e.checkedConfigId===a.id&&(e.getRefFileList(),e.getNodeConfigList()),e.$tip.success(e.$t("common.success")),e.closeConfigModal()}).catch(function(){t.hide(),e.$tip.error(e.$t("common.error"))})}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1},deleteConfig:function(e){var t=this;this.$confirm(this.$t("cfg.msg.confirmCfg"),this.$t("common.alert")).then(function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_config_file",{id:e}).then(function(e){a.hide(),t.getConfigList(t.serverData),t.getNodeConfigList(),t.$tip.success(t.$t("common.success"))}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})})},getUnusedFileList:function(e){var t=this;this.showOthers&&this.$ajax.getJSON("/server/api/unused_config_file_list",{config_id:e,application:this.serverData.application}).then(function(e){t.refFileModal.model.fileList=e}).catch(function(e){t.refFileModal.model.fileList=[],t.$tip.error({title:t.$t("common.error"),message:e.err_msg||e.message||t.$t("common.networkErr")})})},getRefFileList:function(){var e=this;if(this.showOthers){var t=this.$refs.refFileListLoading.$loading.show();this.$ajax.getJSON("/server/api/config_ref_list",{config_id:this.checkedConfigId}).then(function(a){t.hide(),a.map(function(e){var t=e.id;return(e=j()(e,e.reference)).refrence_id=e.id,e.id=t,e}),e.refFileList=a}).catch(function(a){t.hide(),e.refFileList=[],e.$tip.error({title:e.$t("common.error"),message:a.err_msg||a.message||e.$t("common.networkErr")})})}},openRefFileModal:function(){this.refFileModal.show=!0,this.refFileModal.isNodeRef=!1,this.getUnusedFileList(this.checkedConfigId)},openNodeRefFileModal:function(){this.refFileModal.show=!0,this.refFileModal.isNodeRef=!0,this.getUnusedFileList(this.refFileModal.id)},addRefFile:function(){var e=this;if(this.$refs.refForm.validate()){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/add_config_ref",{config_id:this.refFileModal.isNodeRef?this.refFileModal.id:this.checkedConfigId,reference_id:this.refFileModal.model.filename}).then(function(a){t.hide(),e.refFileModal.show=!1,e.refFileModal.isNodeRef?e.getNodeRefFileList(e.refFileModal.id):e.getRefFileList()})}},closeRefFileModal:function(){this.refFileModal.show=!1},deleteRef:function(e,t,a){var o=this;this.$confirm(this.$t("cfg.msg.confirm"),this.$t("common.alert")).then(function(){var r=o.$Loading.show();o.$ajax.getJSON("/server/api/delete_config_ref",{id:e}).then(function(e){r.hide(),"nodeRef"==t?o.getNodeRefFileList(a):o.getRefFileList(),o.$tip.success(o.$t("common.success"))})})},getNodeConfigList:function(){var e=this;if(this.showOthers){var t=this.$refs.nodeConfigListLoading.$loading.show(),a=j()({config_id:this.checkedConfigId},this.serverData);this.$ajax.getJSON("/server/api/node_config_file_list",a).then(function(a){t.hide(),e.nodeConfigList=a}).catch(function(a){t.hide(),e.nodeConfigList=[],e.$tip.error({title:e.$t("common.error"),message:a.err_msg||a.message||e.$t("common.networkErr")})})}},pushNodeConfig:function(){var e=this;if(this.nodeCheckList.length){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/push_config_file",{config_ids:this.nodeCheckList.join(";")}).then(function(a){t.hide(),e.pushResultModal.model=a,e.pushResultModal.show=!0}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.err_msg||a.message))})}else this.$tip.warning(this.$t("cfg.msg.selectNode"))},closePushResultModal:function(){this.pushResultModal.model=null,this.pushResultModal.show=!1},showDetail:function(e){this.detailModal.title=this.$t("cfg.title.viewConf"),this.detailModal.model={detail:e.config},this.detailModal.show=!0},showMergedDetail:function(e){var t=this;this.detailModal.title=this.$t("cfg.title.viewMerged"),this.detailModal.show=!0;var a=this.$loading.show({target:this.$refs.detailModalLoading});this.$ajax.getJSON("/server/api/merged_node_config",{id:e}).then(function(e){a.hide(),t.detailModal.model={detail:e}}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})},showHistory:function(e){var t=this;this.detailModal.title=this.$t("cfg.title.viewHistory"),this.detailModal.show=!0;var a=this.$loading.show({target:this.$refs.detailModalLoading});this.$ajax.getJSON("/server/api/config_file_history_list",{config_id:e}).then(function(e){a.hide(),t.detailModal.model={table:e.rows,detail:""}}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})},showTableDeatil:function(e){this.detailModal.model.detail=e.content},closeDetailModal:function(){this.detailModal.show=!1,this.detailModal.model=null},getNodeRefFileList:function(e){var t=this;this.$ajax.getJSON("/server/api/config_ref_list",{config_id:e}).then(function(e){e.map(function(e){var t=e.id;return(e=j()(e,e.reference)).refrence_id=e.id,e.id=t,e}),t.nodeRefFileListModal.model={refFileList:e}}).catch(function(e){t.nodeRefFileListModal.model={refFileList:[]},t.$tip.error({title:t.$t("common.error"),message:e.err_msg||e.message||t.$t("common.networkErr")})})},handleRefFiles:function(e){this.nodeRefFileListModal.show=!0,this.nodeRefFileListModal.model=null,this.refFileModal.id=e,this.getNodeRefFileList(e)}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getConfigList(this.serverData)}},be={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_config"},[e.configList?a("wrapper",{ref:"configListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.addConfig}},[e._v(e._s(e.$t("cfg.btn.add")))]),e._v(" "),a("let-table",{attrs:{data:e.configList,title:e.$t("cfg.title.a"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:t.row.id},model:{value:e.checkedConfigId,callback:function(t){e.checkedConfigId=t},expression:"checkedConfigId"}},[e._v(" ")])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.changeConfig(t.row,"configList")}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deleteConfig(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("cfg.title.viewConf")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e(),e._v(" "),e.refFileList&&e.showOthers?a("wrapper",{ref:"refFileListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openRefFileModal}},[e._v(e._s(e.$t("cfg.btn.addRef")))]),e._v(" "),a("let-table",{attrs:{data:e.refFileList,title:e.$t("cfg.title.b"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.deleteRef(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e(),e._v(" "),e.nodeConfigList&&e.showOthers?a("wrapper",{ref:"nodeConfigListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.pushNodeConfig}},[e._v(e._s(e.$t("cfg.btn.pushFile")))]),e._v(" "),e.nodeConfigList.length?a("let-checkbox",{staticClass:"check-all",model:{value:e.nodeCheckAll,callback:function(t){e.nodeCheckAll=t},expression:"nodeCheckAll"}}):e._e(),e._v(" "),a("let-table",{attrs:{data:e.nodeConfigList,title:e.$t("cfg.title.c"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{label:t.row.id},model:{value:e.nodeCheckList,callback:function(t){e.nodeCheckList=t},expression:"nodeCheckList"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"400px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.changeConfig(t.row,"nodeConfigList")}}},[e._v(e._s(e.$t("cfg.table.modCfg")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showMergedDetail(t.row.id)}}},[e._v(e._s(e.$t("cfg.table.viewMerge")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("cfg.table.viewIpContent")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.handleRefFiles(t.row.id)}}},[e._v(e._s(e.$t("cfg.table.mangeRefFile")))])]}}])})],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.configModal.isNew?e.$t("operate.title.add")+" "+e.$t("common.config"):e.$t("operate.title.update")+" "+e.$t("common.config"),width:"700px"},on:{"on-confirm":e.updateConfigFile,close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model?a("let-form",{ref:"configForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("cfg.btn.fileName"),required:""}},[a("let-input",{attrs:{size:"small",disabled:!e.configModal.isNew,required:""},model:{value:e.configModal.model.filename,callback:function(t){e.$set(e.configModal.model,"filename",t)},expression:"configModal.model.filename"}})],1),e._v(" "),e.configModal.isNew?e._e():a("let-form-item",{attrs:{label:e.$t("cfg.btn.reason")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.reason,callback:function(t){e.$set(e.configModal.model,"reason",t)},expression:"configModal.model.reason"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:4,required:""},model:{value:e.configModal.model.config,callback:function(t){e.$set(e.configModal.model,"config",t)},expression:"configModal.model.config"}})],1)],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{title:e.detailModal.title,width:"700px",footShow:!1},on:{close:e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model&&e.detailModal.model.table?a("let-table",{staticClass:"history-table",attrs:{data:e.detailModal.model.table,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.reason"),prop:"reason"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.content"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.showTableDeatil(t.row)}}},[e._v(e._s(e.$t("operate.view")))])]}}])})],1):e._e(),e._v(" "),e.detailModal.model&&!e.detailModal.model.table||e.detailModal.model&&e.detailModal.model.table&&e.detailModal.model.detail?a("pre",[e._v(e._s(e.detailModal.model.detail||e.$t("cfg.msg.empty")))]):e._e(),e._v(" "),a("div",{ref:"detailModalLoading",staticClass:"detail-loading"})],1),e._v(" "),e.refFileModal.model?a("let-modal",{attrs:{title:this.$t("operate.title.add"),width:"700px"},on:{"on-confirm":e.addRefFile,close:e.closeRefFileModal},model:{value:e.refFileModal.show,callback:function(t){e.$set(e.refFileModal,"show",t)},expression:"refFileModal.show"}},[a("let-form",{ref:"refForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("cfg.msg.refFile"),required:""}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:""},model:{value:e.refFileModal.model.filename,callback:function(t){e.$set(e.refFileModal.model,"filename",t)},expression:"refFileModal.model.filename"}},e._l(e.refFileModal.model.fileList,function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.filename))])}))],1)],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("cfg.table.mangeRefFile"),width:"700px",footShow:!1},on:{close:e.closeDetailModal},model:{value:e.nodeRefFileListModal.show,callback:function(t){e.$set(e.nodeRefFileListModal,"show",t)},expression:"nodeRefFileListModal.show"}},[e.nodeRefFileListModal.model?a("wrapper",[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openNodeRefFileModal}},[e._v(e._s(e.$t("cfg.btn.addRef")))]),e._v(" "),a("let-table",{attrs:{data:e.nodeRefFileListModal.model.refFileList,title:e.$t("cfg.title.b"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.deleteRef(t.row.id,"nodeRef",t.row.config_id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.config_id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{width:"700px",footShow:!1},on:{close:e.closePushResultModal},model:{value:e.pushResultModal.show,callback:function(t){e.$set(e.pushResultModal,"show",t)},expression:"pushResultModal.show"}},[e.pushResultModal.model?a("let-table",{attrs:{data:e.pushResultModal.model,title:e.$t("serverList.table.th.result"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{class:0!==t.row.ret_code?"danger":"success"},[e._v(e._s(t.row.server_name))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"result",class:0!==t.row.ret_code?"danger":"success"},[e._v(e._s(t.row.err_msg))])]}}])})],1):e._e()],1)],1)},staticRenderFns:[]};var $e=a("VU/8")(ge,be,!1,function(e){a("+ybO")},null,null).exports,we={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"page_server_server_monitor"},[t("iframe",{attrs:{src:"http://dev.log.cf.com/open-page.html#/mon/curve/module_ip_mapping:4",frameborder:"0",width:"100%",height:"1200px"}})])}]};var Me=a("VU/8")({name:"ServerPropertyMonitor"},we,!1,function(e){a("qojy")},null,null).exports,ye=6e4,ke=60*ye,xe=24*ke;function Se(e){return null==e?new Date:e instanceof Date?e:new Date(e)}function Le(e,t){if(e=Se(e),t=t||"YYYY-MM-DD HH:mm:ss",isNaN(e.getTime()))return t;var a={"M+":e.getMonth()+1,"D+":e.getDate(),"H+":e.getHours(),"h+":e.getHours()%12==0?12:e.getHours()%12,"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};return/(Y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(dd+)/.test(t)&&(t=t.replace(RegExp.$1,"日一二三四五六七".split("")[e.getDay()])),T()(a).forEach(function(e){if(new RegExp("("+e+")").test(t)){var o=RegExp.$1,r=""+a[e];t=t.replace(o,1===o.length?r:("00"+r).substr(r.length))}}),t}var Ce=Array.apply(null,{length:24}).map(function(e,t){return t}).map(function(e){return{val:e,txt:("0"+e).slice(-2)}}),De=[{val:-1,txt:"all"}].concat(Ce),Fe={name:"HoursFilter",props:{title:{type:String,default:""},value:Number},filters:{format:function(e){return("0"+e).slice(-2)}},data:function(){return{hours:De}},methods:{onChange:function(e){this.$emit("input",e)}}},Ne={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"hours-filter"},[a("h4",[e._v(e._s(e.title))]),e._v(" "),a("ul",e._l(e.hours,function(t){return a("li",{key:t.val,class:{active:t.val===e.value},on:{click:function(a){e.onChange(t.val)}}},[e._v(e._s(t.txt))])}))])},staticRenderFns:[]};var qe=a("VU/8")(Fe,Ne,!1,function(e){a("Q1kj")},null,null).exports,Te=(a("miEh"),a("wQkr"),a("MqDE")),Re=a.n(Te);o.default.component(Re.a.name,Re.a);var je=a("Wc9H"),Oe=a.n(je),ze=a("IaZV"),Ee=a.n(ze),Pe=new Oe.a({id:"zoom-in",use:"zoom-in-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" id="zoom-in"><defs><style></style></defs><path d="M426.65984 42.65984q78.00832 0 149.17632 30.49472t122.49088 81.83808 81.83808 122.49088 30.49472 149.17632q0 66.99008-21.83168 128.32768t-62.1568 111.32928l242.33984 241.99168q12.32896 12.32896 12.32896 30.33088 0 18.3296-12.16512 30.49472t-30.49472 12.16512q-18.00192 0-30.33088-12.32896l-241.99168-242.33984q-49.99168 40.32512-111.32928 62.1568t-128.32768 21.83168q-78.00832 0-149.17632-30.49472t-122.49088-81.83808-81.83808-122.49088-30.49472-149.17632 30.49472-149.17632 81.83808-122.49088 122.49088-81.83808 149.17632-30.49472zM426.65984 128q-60.66176 0-115.99872 23.67488t-95.3344 63.67232-63.67232 95.3344-23.67488 115.99872 23.67488 115.99872 63.67232 95.3344 95.3344 63.67232 115.99872 23.67488 115.99872-23.67488 95.3344-63.67232 63.67232-95.3344 23.67488-115.99872-23.67488-115.99872-63.67232-95.3344-95.3344-63.67232-115.99872-23.67488zM426.65984 256q17.67424 0 30.16704 12.4928t12.4928 30.16704l0 85.34016 85.34016 0q17.67424 0 30.16704 12.4928t12.4928 30.16704-12.4928 30.16704-30.16704 12.4928l-85.34016 0 0 85.34016q0 17.67424-12.4928 30.16704t-30.16704 12.4928-30.16704-12.4928-12.4928-30.16704l0-85.34016-85.34016 0q-17.67424 0-30.16704-12.4928t-12.4928-30.16704 12.4928-30.16704 30.16704-12.4928l85.34016 0 0-85.34016q0-17.67424 12.4928-30.16704t30.16704-12.4928z" /></symbol>'}),Ie=(Ee.a.add(Pe),{props:{title:String,timeColumn:String,dataColumns:Array,data:Array},data:function(){return{enlarge:!1}},computed:{chartOptions:function(){var e={},t=[this.timeColumn];return this.dataColumns.forEach(function(a){var o=a.name,r=a.label;e[o]=r,t.push(o)}),{title:{show:!0,text:this.title},grid:{bottom:40,top:50},legend:{top:5},colors:["#f56c77","#6accab"],settings:{labelMap:e,scale:[!0,!1],lineStyle:{width:1}},data:{columns:t,rows:this.data}}},largeChartOptions:function(){var e={},t=[this.timeColumn];return this.dataColumns.forEach(function(a){var o=a.name,r=a.label;e[o]=r,t.push(o)}),{title:{show:!0,text:this.title},grid:{bottom:40,top:50},legend:{top:5},colors:["#f56c77","#6accab"],settings:{labelMap:e,scale:[!0,!1],lineStyle:{width:1}},data:{columns:t,rows:this.data},dataZoom:[{type:"inside",minValueSpan:12,zoomOnMouseWheel:"alt"},{minValueSpan:12}]}}}}),Ae={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"compare-chart"},[a("ve-line",e._b({},"ve-line",e.chartOptions,!1)),e._v(" "),a("a",{staticClass:"compare-chart-zoom-in",attrs:{href:"javascript:"},on:{click:function(t){e.enlarge=!0}}},[a("icon",{attrs:{name:"zoom-in"}})],1),e._v(" "),a("let-modal",{attrs:{width:"80%"},on:{close:function(t){e.enlarge=!1}},model:{value:e.enlarge,callback:function(t){e.enlarge=t},expression:"enlarge"}},[e.enlarge?a("ve-line",e._b({},"ve-line",e.largeChartOptions,!1)):e._e(),e._v(" "),a("div",{attrs:{slot:"foot"},slot:"foot"})],1)],1)},staticRenderFns:[]};var Je={name:"ServerPropertyMonitor",components:{HoursFilter:qe,CompareChart:a("VU/8")(Ie,Ae,!1,function(e){a("MeJx")},null,null).exports},data:function(){var e=this.$route.params.treeid;return{query:{thedate:Le(new Date,"YYYYMMDD"),predate:Le(Date.now()-xe,"YYYYMMDD"),startshowtime:"0000",endshowtime:"2360",master_name:e.split(".").map(function(e){return e.replace(/^\d+/,"")}).join("."),master_ip:"",property_name:"",policy:"",group_by:""},formatter:"YYYYMMDD",allItems:[],hour:-1,page:1}},computed:{filteredItems:function(){var e=this.hour;return e>=0?this.allItems.filter(function(t){return+t.show_time.slice(0,2)===e}):this.allItems},itemsCount:function(){return this.filteredItems.length},pageCount:function(){return Math.ceil(this.filteredItems.length/20)},pagedItems:function(){return this.filteredItems.slice(20*(this.page-1),20*this.page)},chartOptions:function(){return{title:this.$t("monitor.table.total"),timeColumn:"show_time",dataColumns:[{name:"the_value",label:this.$t("monitor.property.property")},{name:"pre_value",label:this.$t("monitor.property.propertyC")}],data:this.allItems}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.chart.$loading.show(),a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/tarsproperty_monitor_data",this.query).then(function(o){t.hide(),a.hide(),e.allItems=o}).catch(function(o){t.hide(),a.hide(),e.$tip.error(e.$t("common.error")+": "+(o.message||o.err_msg))})},groupBy:function(e){this.query.group_by=e,this.fetchData()},search:function(){delete this.query.group_by,this.fetchData()},changePage:function(e){this.page=e}}},He={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_property_monitor"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-group",[a("let-form-item",{attrs:{label:e.$t("monitor.search.a")}},[a("let-date-picker",{attrs:{size:"small",formatter:e.formatter},model:{value:e.query.thedate,callback:function(t){e.$set(e.query,"thedate",t)},expression:"query.thedate"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("monitor.search.b")}},[a("let-date-picker",{attrs:{size:"small",formatter:e.formatter},model:{value:e.query.predate,callback:function(t){e.$set(e.query,"predate",t)},expression:"query.predate"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("monitor.search.start")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.startshowtime,callback:function(t){e.$set(e.query,"startshowtime",t)},expression:"query.startshowtime"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("monitor.search.end")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.endshowtime,callback:function(t){e.$set(e.query,"endshowtime",t)},expression:"query.endshowtime"}})],1)],1),e._v(" "),a("let-form-group",[a("tars-form-item",{attrs:{label:e.$t("monitor.search.master")},on:{onLabelClick:function(t){e.groupBy("master_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.master_name,callback:function(t){e.$set(e.query,"master_name",t)},expression:"query.master_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.search.masterIP")},on:{onLabelClick:function(t){e.groupBy("master_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.master_ip,callback:function(t){e.$set(e.query,"master_ip",t)},expression:"query.master_ip"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.select.property")},on:{onLabelClick:function(t){e.groupBy("property_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.property_name,callback:function(t){e.$set(e.query,"property_name",t)},expression:"query.property_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.select.strategy")},on:{onLabelClick:function(t){e.groupBy("policy")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.policy,callback:function(t){e.$set(e.query,"policy",t)},expression:"query.policy"}})],1),e._v(" "),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1)],1),e._v(" "),a("compare-chart",e._b({ref:"chart",staticClass:"chart"},"compare-chart",e.chartOptions,!1)),e._v(" "),a("hours-filter",{model:{value:e.hour,callback:function(t){e.hour=t},expression:"hour"}}),e._v(" "),a("let-table",{ref:"table",attrs:{data:e.pagedItems,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"show_time",width:"80px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.master"),prop:"master_name",width:""}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.masterIP"),prop:"master_ip",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.select.property"),prop:"property_name",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.select.strategy"),prop:"policy",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.property.property"),prop:"the_value",align:"right",width:"200px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.property.propertyC"),prop:"pre_value",align:"right",width:"230px"}}),e._v(" "),e.pageCount?a("let-pagination",{attrs:{slot:"pagination",total:e.pageCount,page:e.page,sum:e.itemsCount,"show-sums":"",jump:""},on:{change:e.changePage},slot:"pagination"}):e._e()],1)],1)},staticRenderFns:[]};var Ve=a("VU/8")(Je,He,!1,function(e){a("tx3H")},null,null).exports,Be={name:"ServerUserManage",data:function(){return{serverData:j()({},this.$parent.getServerData()),developer:"",operator:"",hasAuth:!1}},mounted:function(){this.checkHasAuth(),this.getAuthList()},methods:{checkHasAuth:function(){var e=this;this.$ajax.getJSON("/server/api/has_auth",{application:this.serverData.application,server_name:this.serverData.server_name,role:"developer"}).then(function(t){e.hasAuth=t.has_auth||!1}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getAuthList:function(){var e=this;this.$ajax.getJSON("/server/api/get_auth_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then(function(t){e.operator=(t.operator||[]).join(";"),e.developer=(t.developer||[]).join(";")}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},save:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/server/api/update_auth",{application:this.serverData.application,server_name:this.serverData.server_name,operator:this.operator,developer:this.developer}).then(function(a){t.hide(),e.$tip.success(""+e.$t("common.error"))}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}}},Ue={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-form",{attrs:{inline:"",itemWidth:"600px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form-item",{attrs:{label:e.$t("user.op")}},[a("let-input",{attrs:{type:"textarea",disabled:!e.hasAuth},model:{value:e.operator,callback:function(t){e.operator=t},expression:"operator"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("user.dev")}},[a("let-input",{attrs:{type:"textarea",disabled:!e.hasAuth},model:{value:e.developer,callback:function(t){e.developer=t},expression:"developer"}})],1),e._v(" "),a("let-form-item",[e.hasAuth?a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))]):e._e()],1)],1)],1)},staticRenderFns:[]};var We=a("VU/8")(Be,Ue,!1,function(e){a("K5TI")},null,null).exports,Ge={name:"InterfaceDebuger",components:{wrapper:_e},data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},tarsFileList:[],uploadModal:{show:!1,model:{}},showDebug:!1,contextData:[],debuger_panel:!1,inParam:"",outParam:"",selectedFileName:"",selectedMethods:[],objName:"",selectedId:""}},methods:{getFileList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/get_file_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then(function(a){t.hide(),e.tarsFileList=a}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})},openTarsUploadFileModal:function(){this.uploadModal.show=!0,this.uploadModal.model={application:this.serverData.application,server_name:this.serverData.server_name,set_name:this.serverData.set_name,file:null}},uploadFile:function(e){this.uploadModal.model.file=e},uploadTarsFile: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("server_name",this.uploadModal.model.server_name),a.append("set_name",this.uploadModal.model.set_name),a.append("suse",this.uploadModal.model.file),this.$ajax.postForm("/server/api/upload_tars_file",a).then(function(){t.hide(),e.getFileList(),e.uploadModal.show=!1,e.uploadModal.model=null}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}},closeUploadModal:function(){this.uploadModal.show=!1},showDebuger:function(e){this.showDebug=!0,this.selectedFileName=e.file_name,this.inParam=null,this.outParam=null,this.selectedId=e.f_id,this.objName=null,this.getContextData(e.f_id)},getContextData:function(e){var t=this;this.$ajax.getJSON("/server/api/get_contexts",{id:e,application:this.serverData.application,server_name:this.serverData.server_name,type:"all"}).then(function(e){t.contextData=e}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})},getParams:function(e){var t=this;if(this.selectedMethods=e,3==e.length){var a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_params",{application:this.serverData.application,server_name:this.serverData.server_name,id:this.selectedId,module_name:e[0],interface_name:e[1],function_name:e[2]}).then(function(e){a.hide();var o={};e.forEach(function(e){e.out||("string"===e.type?o[e.name]="":"array"===e.type?o[e.name]=[]:o[e.name]="")}),t.inParam=x()(o)}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}},doDebug:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/server/api/interface_test",{id:this.selectedId,application:this.serverData.application,server_name:this.serverData.server_name,file_name:this.selectedFileName,module_name:this.selectedMethods[0],interface_name:this.selectedMethods[1],function_name:this.selectedMethods[2],params:this.inParam,objName:this.objName}).then(function(a){t.hide(),e.outParam=a}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getFileList()}},Ze={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_debuger"},[e.showDebug?e._e():a("wrapper",{ref:"tarsFileListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openTarsUploadFileModal}},[e._v(e._s(e.$t("operate.add")))]),e._v(" "),a("let-table",{attrs:{data:e.tarsFileList,title:e.$t("inf.title.listTitle"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"file_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.showDebuger(t.row)}}},[e._v(e._s(e.$t("inf.list.debug")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.changeConfig(t.row,"configList")}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deleteConfig(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1),e._v(" "),e.showDebug?a("div",[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"530px"}},[a("let-form-item",{attrs:{label:e.$t("inf.dlg.selectLabel")}},[a("let-cascader",{attrs:{data:e.contextData,required:"",size:"small"},on:{change:e.getParams}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.objName")}},[a("let-input",{attrs:{required:""},model:{value:e.objName,callback:function(t){e.objName=t},expression:"objName"}})],1),e._v(" "),a("let-form-item",[a("let-button",{attrs:{theme:"primary"},on:{click:e.doDebug}},[e._v(e._s(e.$t("inf.list.debug")))])],1)],1),e._v(" "),a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{span:12,itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:20,placeholder:"请输入方法入参"},model:{value:e.inParam,callback:function(t){e.inParam=t},expression:"inParam"}})],1)],1),e._v(" "),a("let-col",{attrs:{span:12}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area",attrs:{type:"textarea",rows:20,placeholder:"方法出参"},model:{value:e.outParam,callback:function(t){e.outParam=t},expression:"outParam"}})],1)],1)],1)]),e._v(" "),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showDebug=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("inf.title.dlgTitle"),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?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadTarsFile(t)}}},[a("let-form-item",{attrs:{itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue"),require:""},on:{upload:e.uploadFile}},[e._v("\n "+e._s(e.$t("common.submit")))]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},staticRenderFns:[]};var Qe=a("VU/8")(Ge,Ze,!1,function(e){a("0frl")},null,null).exports,Ye={name:"CallChain",components:{wrapper:_e},data:function(){return{traceId:"",start_time:"",end_time:"",traceidList:[],showDuration:null,selectedTraceId:null,traceDetailList:null,colorArr:["#33cc59","#fa5a4b","#ffaa33","#9a41d9","#d99cee","#71d2e7","#e7d271"]}},methods:{getTracesList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/get_trace_list",{id:this.traceId,start_time:this.start_time,end_time:this.end_time}).then(function(a){t.hide(),e.traceidList=a}).catch(function(a){t.hide(),e.$tip.error("系统错误: "+(a.message||a.err_msg))})},showDetail:function(e){var t=this;this.selectedTraceId=e;var a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_trace_detail",{id:e}).then(function(e){t.showDuration=!0,a.hide();var o=0,r=1;e.forEach(function(e){1==e.layer&&(o=e.timestamp,e.marginLeft=0,e.duration>300&&(r=(300/e.duration).toFixed(2))),e.scale=Number(r),e.marginLeft=(e.timestamp-o)*e.scale,e.color=t.colorArr[e.layer-1]}),t.traceDetailList=e}).catch(function(e){a.hide(),t.$tip.error("系统错误: "+(e.message||e.err_msg))})}},mounted:function(){this.getTracesList()}},Xe={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_call_chain"},[e.showDuration?e._e():a("div",[a("let-row",[a("let-col",{staticClass:"grid-content bg-blue",attrs:{span:"8"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.traceId,expression:"traceId"}],staticClass:"custom_input",attrs:{placeholder:"输入TraceID"},domProps:{value:e.traceId},on:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.getTracesList(t):null},input:function(t){t.target.composing||(e.traceId=t.target.value)}}})]),e._v(" "),a("let-col",{staticClass:"grid-content bg-blue-little",attrs:{span:"7",offset:"9"}},[a("let-date-range-picker",{attrs:{start:e.start_time,end:e.end_time},on:{"update:start":function(t){e.start_time=t},"update:end":function(t){e.end_time=t}}}),e._v(" "),a("let-button",{attrs:{theme:"primary"},on:{click:e.getTracesList}},[e._v("查询")])],1)],1),e._v(" "),a("div",{staticClass:"mt10"},[a("let-table",{attrs:{data:e.traceidList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"业务名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.showDetail(t.row.trace_id)}}},[e._v(e._s(t.row.trace_id))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:"产生时间",sortable:!0,prop:"timestamp"}}),e._v(" "),a("let-table-column",{attrs:{title:"耗时(ms)",sortable:!0,prop:"duration"}})],1)],1)],1),e._v(" "),e.showDuration?a("div",[a("h3",[a("a",{staticClass:"link",attrs:{href:"javascript:;"},on:{click:function(t){e.showDuration=!1}}},[e._v("调用链查询")]),e._v(" / "+e._s(e.selectedTraceId))]),e._v(" "),a("let-table",{attrs:{stripe:"",data:e.traceDetailList,title:"服务配置","empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"应用名"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:"margin-left:"+30*(t.row.layer-1)+"px"},[e._v(e._s(t.row.server_endpoint_service_name))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:"IP",prop:"server_endpoint_ipv4"}}),e._v(" "),a("let-table-column",{attrs:{title:"类型",prop:"type"}}),e._v(" "),a("let-table-column",{attrs:{title:"状态",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.status?a("span",[e._v("OK")]):a("span",[e._v("ERROR")])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:"服务/方法",prop:"name"}}),e._v(" "),a("let-table-column",{attrs:{title:"耗时"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"duration",style:"width:"+t.row.duration*t.row.scale+"px;margin-left:"+t.row.marginLeft+"px;background-color:"+t.row.color}),e._v(e._s(t.row.duration)+"ms\n ")]}}])})],1)],1):e._e()])},staticRenderFns:[]};var Ke=a("VU/8")(Ye,Xe,!1,function(e){a("KPHC")},null,null).exports,et={name:"CallChainAnalyze",data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},serviceName:"",start_time:"",end_time:"",chainShapesList:[]}},methods:{showTopo:function(){var e=this,t=document.querySelector("#topo");if(this.$refs.topoForm.validate()){var a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_topo",{serviceName:this.serviceName,start:this.start_time,end:this.end_time}).then(function(o){if(a.hide(),o.dependencyGraph.vertexs.value.length||o.dependencyGraph.links.value.length){var r={nodes:new vis.DataSet(o.dependencyGraph.vertexs.value),edges:new vis.DataSet(o.dependencyGraph.links.value)};new vis.Network(t,r,{physics:{enabled:!1},layout:{hierarchical:{enabled:!0,direction:"LR",levelSeparation:300}},nodes:{shape:"box",color:{border:"#cccccc",background:"#ffffff"},margin:{top:13,bottom:13,left:27,right:27}},edges:{arrows:{to:{enabled:!0,scaleFactor:.5,type:"arrow"}},smooth:{enabled:!0,type:"vertical"}}});e.chainShapesList=o.chainShapes.chainShapes.value}else t.innerHTML='<div class="emptyMsg">没有数据</div>'}).catch(function(t){a.hide(),e.$tip.error(t.message||t.err_msg)})}},setDate:function(){var e=(new Date).getDate(),t=(new Date).setDate(e-1);this.start_time=this.dateToStr(new Date(t),"yyyy-mm-dd"),this.end_time=this.dateToStr(new Date,"yyyy-mm-dd")},dateToStr:function(e,t){if(e&&"Invalid Date"!=e)return t.replace(/yyyy/gi,e.getFullYear().toString()).replace(/MM/i,a(e.getMonth()+1)).replace(/dd/gi,a(e.getDate())).replace(/hh/gi,a(e.getHours())).replace(/mm/gi,a(e.getMinutes())).replace(/ss/gi,a(e.getSeconds()));function a(e){return(e<10?"0"+e:e).toString()}}},created:function(){this.serverData=this.$parent.getServerData();var e=this.$route.params.treeid.split(".").map(function(e){return e.substr(1)});this.serviceName=e.join("."),this.setDate()},mounted:function(){this.showTopo()}},tt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"call-chain-analyze"},[a("let-form",{ref:"topoForm",attrs:{inline:""}},[a("let-form-item",{attrs:{size:3}},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.serviceName,expression:"serviceName"}],staticClass:"custom_input",attrs:{placeholder:"输入服务名"},domProps:{value:e.serviceName},on:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.showTopo(t):null},input:function(t){t.target.composing||(e.serviceName=t.target.value)}}})]),e._v(" "),a("let-form-item",{attrs:{size:3}},[a("let-date-range-picker",{attrs:{required:"",start:e.start_time,end:e.end_time},on:{"update:start":function(t){e.start_time=t},"update:end":function(t){e.end_time=t}}}),e._v(" "),a("let-button",{attrs:{theme:"primary"},on:{click:e.showTopo}},[e._v("查询")])],1)],1),e._v(" "),a("div",{staticClass:"topo_graph",attrs:{id:"topo"}}),e._v(" "),a("div",{staticClass:"let-table let-table_stripe"},[e.chainShapesList.length?a("table",[e._m(0),e._v(" "),e._l(e.chainShapesList,function(t){return a("tbody",e._l(t.value,function(t){return a("tr",[a("td",[e._v(e._s(t.serviceName))]),e._v(" "),a("td",[e._v(e._s(t.method))]),e._v(" "),a("td",[e._v(e._s(t.QPS))]),e._v(" "),a("td",[e._v(e._s(t.peakQPS))]),e._v(" "),a("td",[e._v(e._s(t.callPercent))]),e._v(" "),a("td",[e._v(e._s(t.avgCost))]),e._v(" "),a("td",[e._v(e._s(t.failRate))])])}))})],2):a("table",[e._m(1),e._v(" "),e._m(2)])])],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("thead",[t("tr",[t("th",[this._v("应用名")]),t("th",[this._v("服务/方法")]),t("th",[this._v("QPS")]),t("th",[this._v("QPS峰值")]),t("th",[this._v("调用占比")]),t("th",[this._v("平均耗时")]),t("th",[this._v("失败率")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("thead",[t("tr",[t("th",[this._v("应用名")]),t("th",[this._v("服务/方法")]),t("th",[this._v("QPS")]),t("th",[this._v("QPS峰值")]),t("th",[this._v("调用占比")]),t("th",[this._v("平均耗时")]),t("th",[this._v("失败率")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tbody",[t("tr",[t("td",{attrs:{colspan:"7"}},[this._v("没有数据")])])])}]};var at=a("VU/8")(et,tt,!1,function(e){a("2cJm")},null,null).exports,ot={name:"pageTask",data:function(){return{dragingEls:"",dragData:{},itemId:0,initData:{timer:{id:0,name:"定时器名",type:"timer",x:0,y:0},task:{id:0,name:"任务名",type:"task",x:0,y:0}}}},methods:{dragstartHandler:function(e){e.dataTransfer.effectAllowed="copy",e.dataTransfer.setData("text/plain",x()(this.initData[e.target.dataset.type]))},dragoverHandler:function(e){e.preventDefault()},dropHandler:function(e){e.preventDefault(),e.stopPropagation();var t=document.querySelector(".stage"),a=t.getBoundingClientRect(),o=JSON.parse(e.dataTransfer.getData("text/plain"));"copy"==e.dataTransfer.effectAllowed?(o.x=e.clientX-a.x,o.y=e.clientY-a.y,o.id="item_"+ ++this.itemId,this.dragData[o.id]=o,t.innerHTML+=this.createTaskItem(o)):(this.dragData[o.id].x=e.clientX-a.x,this.dragData[o.id].y=e.clientY-a.y,t.querySelector("div#"+o.id).setAttribute("style","left:"+(e.clientX-a.x-40)+"px;top:"+(e.clientY-a.y-20)+"px"))},createTaskItem:function(e){return'<div class="drag_item" id="'+e.id+'" style="left:'+(e.x-40)+"px;top:"+(e.y-20)+'px" draggable="true">\n <span class="'+e.type+'"></span><p>'+e.name+"</p></div>"},moveStartHandler:function(e){e.dataTransfer.setData("text/plain",x()(this.dragData[e.target.id]))}},mounted:function(){}},rt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_task"},[a("div",{staticClass:"task_container"},[a("div",{staticClass:"toolbar"},[a("h3",[e._v("控制元件")]),e._v(" "),a("ul",[a("li",{staticClass:"interval",attrs:{title:"拖动元件到右侧舞台使用"}},[a("span",{attrs:{id:"item-interval","data-type":"timer",draggable:"true"},on:{dragstart:e.dragstartHandler}}),e._v(" "),a("p",[e._v("定时器")])]),e._v(" "),a("li",{staticClass:"task",attrs:{title:"拖动元件到右侧舞台使用"}},[a("span",{attrs:{id:"item-task","data-type":"task",draggable:"true"},on:{dragstart:e.dragstartHandler}}),e._v(" "),a("p",[e._v("任务")])])])]),e._v(" "),a("div",{staticClass:"draw_panel"},[a("div",{staticClass:"stage",on:{dragover:e.dragoverHandler,drop:e.dropHandler,dragstart:e.moveStartHandler}}),e._v(" "),a("div",{staticClass:"panel"},[e._v("dgg")])])])])},staticRenderFns:[]};var st=a("VU/8")(ot,rt,!1,function(e){a("Ev9G")},null,null).exports,it="/operation/deploy",lt={name:"Oparetion",beforeRouteEnter:function(e,t,a){"/operation"===e.path?a(it):a()},beforeRouteLeave:function(e,t,a){it=t.path,a()},methods:{onTabClick:function(e){this.$router.replace(e)}}},nt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation"},[a("let-tabs",{attrs:{activekey:e.$route.path},on:{click:e.onTabClick}},[a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.deploy"),tabkey:"/operation/deploy"}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.expand"),tabkey:"/operation/expand"}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.template"),tabkey:"/operation/templates"}})],1),e._v(" "),a("router-view",{staticClass:"page_operation_children"})],1)},staticRenderFns:[]};var dt=a("VU/8")(lt,nt,!1,function(e){a("D6P/")},null,null).exports,ct={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:"+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())})}}},mt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"set_inputer"},[a("div",{staticClass:"set_inputer_item"},[a("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),e._v(" "),a("div",{staticClass:"set_inputer_item"},[a("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),e._v(" "),a("div",{staticClass:"set_inputer_item"},[a("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),e._v(" "),a("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)},staticRenderFns:[]};var ut=a("VU/8")(ct,mt,!1,function(e){a("ytXr")},null,null).exports,pt=["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars"],ht=function(){return{application:"",server_name:"",server_type:pt[0],template_name:"",node_name:"0.0.0.0",enable_set:!1,set_name:"",set_area:"",set_group:"",operator:"",developer:"",adapters:[{obj_name:"",bind_ip:"0.0.0.0",port:"",port_type:"tcp",protocol:"tars",thread_num:5,max_connections:2e5,queuecap:1e4,queuetimeout:6e4}],primaryBusiness:"",secondaryBusiness:"",thirdlyBusiness:""}},ft={name:"OperationDeploy",components:{SetInputer:ut},data:function(){return{types:pt,templates:[],model:ht(),enableAuth:!1,resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}},primaryBusiness:[],secondaryBusiness:[],thirdlyBusiness:[]}},mounted:function(){var e=this;this.$ajax.getJSON("/server/api/is_enable_auth").then(function(t){e.enableAuth=t.enableAuth||!1}).catch(function(e){}),this.$ajax.getJSON("/server/api/template_name_list").then(function(t){e.templates=t,e.model.template_name=t[0]}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))}),this.$ajax.getJSON("/server/api/query_service").then(function(t){e.primaryBusiness=t}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},methods:{choosePrimaryBusiness:function(e){var t=this;if(this.secondaryBusiness=[],this.thirdlyBusiness=[],this.model.secondaryBusiness="",this.model.thirdlyBusiness="",void 0===e||""===e)return!1;this.$ajax.getJSON("/server/api/query_system",{ServiceId:e}).then(function(e){t.secondaryBusiness=e}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})},chooseSecondaryBusiness:function(e){var t=this;if(this.thirdlyBusiness=[],this.model.thirdlyBusiness="",void 0===e||""===e)return!1;this.$ajax.getJSON("/server/api/query_module",{SystemId:e}).then(function(e){t.thirdlyBusiness=e}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})},chooseThirdlyBusiness:function(e){if(void 0===e||""===e)return!1;var t=this.thirdlyBusiness.find(function(t){return t.SubSystemId===e}).SubSystemEngName;this.model.application=t},addAdapter:function(e){this.model.adapters.push(j()({},e))},deploy:function(){var e=this;this.$confirm(this.$t("deployService.form.deployServiceTip"),this.$t("common.alert")).then(function(){var t=e.$Loading.show();e.$ajax.postJSON("/server/api/deploy_server",e.model).then(function(a){t.hide(),a.tars_node_rst&&a.tars_node_rst.length?e.showResultModal(a.tars_node_rst):e.$tip.success(e.$t("deployService.form.ret.success")),e.model=ht(),e.$refs.form.resetValid(),e.model.template_name=e.templates[0]}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})})},getAutoPort:function(){var e=this,t=this.$Loading.show(),a=this.model.adapters,o=[];a.forEach(function(e){o.push(e.bind_ip)}),this.$ajax.getJSON("/server/api/auto_port",{node_name:o.join(";")}).then(function(o){t.hide(),o.forEach(function(t,o){e.$set(a[o],"port",String(t.port||""))})}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})},save:function(){var e=this;if(this.$refs.form.validate()){var t=this.model,a=this.$Loading.show();this.$ajax.getJSON("/server/api/server_exist",{application:t.application,server_name:t.server_name,node_name:t.server_name}).then(function(t){a.hide(),t?e.$tip.error(e.$t("deployService.form.nameTips")):e.deploy()}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},showResultModal:function(e){this.resultModal.resultList=e,this.resultModal.show=!0},closeResultModal:function(){this.resultModal.show=!1,this.resultModal.resultList=[]}}},vt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_deploy"},[a("let-form",{ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.primaryBusiness"),required:""}},[a("let-select",{attrs:{size:"small",required:""},on:{change:e.choosePrimaryBusiness},model:{value:e.model.primaryBusiness,callback:function(t){e.$set(e.model,"primaryBusiness",t)},expression:"model.primaryBusiness"}},e._l(e.primaryBusiness,function(t){return a("let-option",{key:t.ServiceId,attrs:{value:t.ServiceId}},[e._v(e._s(t.ServiceName))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.secondaryBusiness"),required:""}},[a("let-select",{attrs:{size:"small",required:""},on:{change:e.chooseSecondaryBusiness},model:{value:e.model.secondaryBusiness,callback:function(t){e.$set(e.model,"secondaryBusiness",t)},expression:"model.secondaryBusiness"}},e._l(e.secondaryBusiness,function(t){return a("let-option",{key:t.SystemId,attrs:{value:t.SystemId}},[e._v(e._s(t.SystemName))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.thirdlyBusiness"),required:""}},[a("let-select",{attrs:{size:"small",required:""},on:{change:e.chooseThirdlyBusiness},model:{value:e.model.thirdlyBusiness,callback:function(t){e.$set(e.model,"thirdlyBusiness",t)},expression:"model.thirdlyBusiness"}},e._l(e.thirdlyBusiness,function(t){return a("let-option",{key:t.SubSystemId,attrs:{value:t.SubSystemId}},[e._v(e._s(t.SubSystemName))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),required:""}},[a("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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceType"),required:""}},[a("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(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[a("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(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableAuth,expression:"enableAuth"}],attrs:{label:e.$t("user.op")}},[a("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),e._v(" "),a("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableAuth,expression:"enableAuth"}],attrs:{label:e.$t("user.dev")}},[a("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._v(" "),a("let-table",{attrs:{data:e.model.adapters}},[a("let-table-column",{attrs:{title:"OBJ"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("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:t.row.obj_name,callback:function(a){e.$set(t.row,"obj_name",a)},expression:"props.row.obj_name"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"100px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("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:t.row.port,callback:function(a){e.$set(t.row,"port",a)},expression:"props.row.port"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:"tcp"},model:{value:t.row.port_type,callback:function(a){e.$set(t.row,"port_type",a)},expression:"props.row.port_type"}},[e._v("TCP")]),e._v(" "),a("let-radio",{attrs:{label:"udp"},model:{value:t.row.port_type,callback:function(a){e.$set(t.row,"port_type",a)},expression:"props.row.port_type"}},[e._v("UDP")])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:"tars"},model:{value:t.row.protocol,callback:function(a){e.$set(t.row,"protocol",a)},expression:"props.row.protocol"}},[e._v("TARS")]),e._v(" "),a("let-radio",{attrs:{label:"not_tars"},model:{value:t.row.protocol,callback:function(a){e.$set(t.row,"protocol",a)},expression:"props.row.protocol"}},[e._v(e._s(e.$t("serverList.servant.notTARS")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"80px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.thread_num,callback:function(a){e.$set(t.row,"thread_num",a)},expression:"props.row.thread_num"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxConnecttions"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.max_connections,callback:function(a){e.$set(t.row,"max_connections",a)},expression:"props.row.max_connections"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxQueue"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.queuecap,callback:function(a){e.$set(t.row,"queuecap",a)},expression:"props.row.queuecap"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0},model:{value:t.row.queuetimeout,callback:function(a){e.$set(t.row,"queuetimeout",a)},expression:"props.row.queuetimeout"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.addAdapter(t.row)}}},[e._v(e._s(e.$t("operate.add")))]),e._v(" "),t.$index?a("let-table-operation",{staticClass:"danger",on:{click:function(a){e.model.adapters.splice(t.$index,1)}}},[e._v(e._s(e.$t("operate.delete"))+"\n ")]):e._e()]}}])})],1),e._v(" "),a("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+"\n ")]),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1),e._v(" "),a("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"}},[a("p",{staticClass:"result-text"},[e._v(e._s(e.$t("deployService.form.ret.success"))+e._s(e.$t("resource.installRstMsg")))]),e._v(" "),a("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[a("let-table-column",{attrs:{title:"ip",prop:"ip"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",{domProps:{textContent:e._s(t.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1)],1)},staticRenderFns:[]};var _t=a("VU/8")(ft,vt,!1,function(e){a("9s/W")},null,null).exports,gt={name:"OperationExpand",components:{SetInputer:ut},data:function(){return{model:{application:"",server_name:"",set:"",node_name:"",expand_nodes:[],enable_set:!1,set_name:"",set_area:"",set_group:"",copy_node_config:!1},applications:[],serverNames:[],sets:[],nodeNames:[],expandIpStr:"",previewItems:[],ipReg:"^((\\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])$",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})}}},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(a+": "+(e.message||e.err_msg))})},previewExpand:function(){var e=this;if(this.$refs.configForm.validate()){var t=j()({},this.model);t.set=-1===parseInt(t.set,10)?"":t.set,t.expand_nodes=this.expandIpStr.trim().split(/[,;\n]/);var a=this.$Loading.show();this.$ajax.postJSON("/server/api/expand_server_preview",t).then(function(t){a.hide();var o=t||[];o.forEach(function(e){e.isChecked=!1}),e.isCheckedAll=!1,e.previewItems=o}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},getAutoPort:function(){var e=this,t=this.$Loading.show(),a=this.previewItems.filter(function(t){return t.status===e.$t("serviceExpand.form.noExpand")&&t.isChecked}),o=[];a.forEach(function(e){o.push(e.bind_ip)}),this.$ajax.getJSON("/server/api/auto_port",{node_name:o.join(";")}).then(function(o){t.hide(),o.forEach(function(t,o){e.$set(a[o],"port",String(t.port||""))})}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})},expand:function(){var e=this;if(this.$refs.expandForm.validate()){var t=this.previewItems.filter(function(t){return t.status===e.$t("serviceExpand.form.noExpand")&&t.isChecked});if(t.length>0){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},r=this.$Loading.show();this.$ajax.postJSON("/server/api/expand_server",o).then(function(t){r.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){r.hide(),e.$tip.error(e.$t("common.error")+": "+(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})}}},bt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_expand"},[a("let-form",{ref:"configForm",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.previewExpand(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){e.changeSelect("application")}},model:{value:e.model.application,callback:function(t){e.$set(e.model,"application",t)},expression:"model.application"}},e._l(e.applications,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v("\n "+e._s(t)+"\n ")])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.service"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){e.changeSelect("server_name")}},model:{value:e.model.server_name,callback:function(t){e.$set(e.model,"server_name",t)},expression:"model.server_name"}},e._l(e.serverNames,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:"Set",itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){e.changeSelect("set")}},model:{value:e.model.set,callback:function(t){e.$set(e.model,"set",t)},expression:"model.set"}},e._l(e.sets,function(t){return a("let-option",{key:t,attrs:{value:t||-1}},[e._v("\n "+e._s(t||e.$t("serviceExpand.form.disableSet"))+"\n ")])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.ip"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.node_name,callback:function(t){e.$set(e.model,"node_name",t)},expression:"model.node_name"}},e._l(e.nodeNames,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serviceExpand.form.tarIP"),itemWidth:"100%",required:""}},[a("let-input",{attrs:{type:"textarea",rows:3,placeholder:e.$t("serviceExpand.form.placeholder"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.expandIpStr,callback:function(t){e.expandIpStr=t},expression:"expandIpStr"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.enableSet")}},[a("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){e.$set(e.model,"enable_set",t)},"update:name":function(t){e.$set(e.model,"set_name",t)},"update:area":function(t){e.$set(e.model,"set_area",t)},"update:group":function(t){e.$set(e.model,"set_group",t)}}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serviceExpand.form.nodeConfig"),itemWidth:"100%"}},[a("let-checkbox",{model:{value:e.model.copy_node_config,callback:function(t){e.$set(e.model,"copy_node_config",t)},expression:"model.copy_node_config"}},[e._v("\n "+e._s(e.$t("serviceExpand.form.copyNodeConfig"))+"\n ")])],1),e._v(" "),a("let-button",{attrs:{type:"sumbit",theme:"primary"}},[e._v(e._s(e.$t("serviceExpand.form.preExpand")))])],1),e._v(" "),a("let-form",{directives:[{name:"show",rawName:"v-show",value:e.previewItems.length>0,expression:"previewItems.length > 0"}],ref:"expandForm",staticClass:"mt40",attrs:{inline:""},nativeOn:{submit:function(t){return t.preventDefault(),e.expand(t)}}},[a("let-table",{ref:"table",attrs:{data:e.previewItems,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[t.row.status==e.$t("serviceExpand.form.noExpand")?a("let-checkbox",{model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}}):e._e()]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:"Set",prop:"set"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.servant.objName"),prop:"obj_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{pattern:t.row.isChecked?e.ipReg:null,"pattern-tip":e.$t("serviceExpand.form.preExpand")},model:{value:t.row.bind_ip,callback:function(a){e.$set(t.row,"bind_ip",a)},expression:"scope.row.bind_ip"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{model:{value:t.row.port,callback:function(a){e.$set(t.row,"port",a)},expression:"scope.row.port"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"}})],1),e._v(" "),a("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort")))]),e._v(" "),a("let-button",{attrs:{type:"sumbit",theme:"primary"}},[e._v(e._s(e.$t("deployService.title.expand")))])],1),e._v(" "),a("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"}},[a("p",{staticClass:"result-text"},[e._v(e._s(e.$t("serviceExpand.form.errTips.success"))+e._s(e.$t("resource.installRstMsg")))]),e._v(" "),a("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[a("let-table-column",{attrs:{title:"ip",prop:"ip"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",{domProps:{textContent:e._s(t.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1)],1)},staticRenderFns:[]};var $t=a("VU/8")(gt,bt,!1,function(e){a("V8Dw")},null,null).exports,wt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("let-button",{staticStyle:{float:"right"},attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("template.btn.addTempate")))]),e._v(" "),a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.template")}},[a("let-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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate")}},[a("let-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),e._v(" "),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),e._v(" "),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name",width:"25%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("template.search.parentTemplate"),prop:"parents_name",width:"25%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.viewItem(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),e._v(" "),a("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?a("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),e._v(" "),a("div",{attrs:{slot:"foot"},slot:"foot"})]),e._v(" "),a("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?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[a("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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate"),required:""}},[a("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"}},[a("let-option",{attrs:{value:""}},[e._v(e._s(e.$t("pub.dlg.defaultValue")))]),e._v(" "),e._l(e.items,function(t){return a("let-option",{key:t.id,attrs:{value:t.template_name}},[e._v(e._s(t.template_name))])})],2)],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("template.form.content"),required:""}},[a("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)},staticRenderFns:[]};var Mt=a("VU/8")({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(e.$t("common.error")+": "+(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},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(e.$t("common.error")+": "+(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(t.$t("common.error")+": "+(e.message||e.err_msg))})}).catch(function(){})}}},wt,!1,function(e){a("11nj")},null,null).exports;o.default.use(ie.a);var yt=new ie.a({routes:[{path:"/server",name:"Server",component:de,children:[{path:":treeid/manage",component:ue},{path:":treeid/publish",component:fe},{path:":treeid/config",component:$e},{path:":treeid/server-monitor",component:Me},{path:":treeid/property-monitor",component:Ve},{path:":treeid/interface-debuger",component:Qe},{path:":treeid/call-chain",component:Ke},{path:":treeid/call-chain-analyze",component:at},{path:":treeid/task",component:st},{path:":treeid/user-manage",component:We}]},{path:"/operation",name:"Operation",component:dt,redirect:"/operation/deploy",children:[{path:"deploy",component:_t},{path:"expand",component:$t},{path:"templates",component:Mt}]},{path:"*",redirect:"/server"}],scrollBehavior:function(e,t,a){return{x:0,y:0}}}),kt=a("TXmL");o.default.use(kt.a),o.default.use(m.a);var xt=new kt.a({}),St=[];o.default.config.productionTip=!1,function(){return new L.a(function(e,t){oe.getJSON("/server/api/get_locale").then(function(t){var a=m.a.get("locale");if("[object Object]"==Object.prototype.toString.call(t)){for(var o in t)xt.setLocaleMessage(o,t[o]),St.push({localeCode:o,localeName:t[o].localeName,localeMessages:t});a=t[a]?a:"cn",St=t}xt.locale=a,e()}).catch(function(e){t(e)})})}.call(this).then(function(){new o.default({i18n:xt,el:"#app",router:yt,components:{App:se},template:"<App/>"})})},OALp:function(e,t){},Q1kj:function(e,t){},V8Dw:function(e,t){},VbM7:function(e,t){},XSxf:function(e,t){},pGHe:function(e,t){},qojy:function(e,t){},s2Rr:function(e,t){},tx3H:function(e,t){},wi40:function(e,t){},ytXr:function(e,t){}},["NHnr"]);
\ No newline at end of file
webpackJsonp([1],{"+NOO":function(e,t){},"43/T":function(e,t){},BskM:function(e,t){},CZtL:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWgAAADkCAMAAACCPk7wAAAB71BMVEUAAACLq/OXr+BOgv+ZsuGasuGas+FHgvibteSgtOSaseFGgPZFgPZFgPZFgPZFgPWasuFGgPZIgPZIgPhGgPaasuFGgPVGgPZGgPWasuGas+FFgPdFgPaZsuGZsuGasuDX4vbE0/Lt8vyZseBFf/VJzI9PaZ5QZ5ZMcLpUX3VMb7ZNba1Oa6ZVXW5ObKpQaJlLc8RLcsFPaqJSZIlRZY1RZpJSYoNUYHpVXGlPaJtUXnJJdtBRZZBKdcxLcb1WW2dVXGtNbrBSY4ZTYX1Jdc5NbrJVXnBKdMlTYoBJd9VRZItJdtJFfvBFf/RIeNpGfe1TYHxHeuFFjeJIed1SY4VJyJVIuKpGkN9Id9dKdMpGlNlKc8ZLcb9OaqRGn8tJypJGfOhGnc5Ho8ZQZpRHe+ZOa6hHsLRIvKVIvqJFi+VKc8dIxphGktxHrblItq1GfOpFiehGoclHq7xIwJ9IxJtFgfJHeuNHpcNNbrRNba9HsrJUX3dFhuxHtK9Iwp1TYX9IuqdPaaBTX3hFg/BMb7hHqb5Hr7dMcLxGl9ZGmdNHp8BGmNVFfvJFhe5Ied9FiOpHm9FGmtFHpsGiuOTc7vFRzpTT3/S8ze2swOi0xurL2fK75tqo4s+J2rl4169i0p98nNxmjNlWgNem4c3j6vmllDHDAAAAIHRSTlMACvcT5WpKNy8b0MSvlvftknJQI9yz0InnpIJg3cS8tkiDxQgAAAvDSURBVHja3JhPTxpRFMXnsxBTa0ErVgcU7dTyr5VOiykLCJCQgBs27giGhdGYsCF85t77PHjf5b3ppptXfplP8MvJuedN9K8kSVImvhCHRKPRuLi4OGAWz8/PpVKp3a5Wq4/fiDiOO53OV+ITcXNzSlwSZ8R4vM98JM7Pz98ZTpjhcFgoFO6OmPxRPp9/eLi+vq7X6/P5B+Ll5T2z/EwMioNi8Zjp96fTZrPZ610RtVqtUqm0Wq3vTLfb/Un8ZtbrW2Y2m00mk9FkNBrd3/9ifhhW6Srdi0JBRB8y5JmB6BJEk+lH9mxUv3mmz5g2nsfwTKJh+unpVXSBuTOq8wyLZtOkWUyz58GgSNiir8g0axbT3VfRUA3RMM2iiY3p1WqVpmkUCgkD0aT5sAHPlug2Es2WY5VoiCYQaDvR4lkizZ450nVibkRbiVaim1MT6N5WorsMNLNoo5o8E7bnIEWX/dWxWBjT7U2iYbqz8UxYnlV1ZCYagSa4Oua+6ih6qqOiTEui19BMbKoD3RFodSTwbERLokmzMQ3PsUFMnxp0R4tnEa08wzQC/WZ6iUDDdH8K0T14VqKlOWAazcGo6kjTwEQj0hJomEaiJdDeRKM6RLTujoI5hnZ1sGhCHcPlVqL7TXQHiTamW45odQyJ4BNdTuB5e3UsStLRiLR0NGnG7DhzV4ckemhXR97u6Ll0tCQ6a3XIMWSs6ljjFhJ2oJHosDo6gWhJNDraOoZVSTRWB0xfMuTZO++MaTvSMI2OlupYqmMI0YQSjXmn9t2tAfPOFo1ruBdUogmdaJl34hnzDjtajQ7GP+8YdLQ+hjI6VKLdeceiK2p2wLN0h5NomXeBdbQkers6EGlV0rqjsxMN0d7qqG+tjmXW6mDRrFlE6+pAoifW6vg/HizujtbH8G87mnF39Ak862OoOxqmiwxKGp4p0jXC6xkdnX0M03QVVEeXk4yX4cLtaC5peGZePZtE74/FM6oD1xAPFivSujsgGi/DY3mwsGq1OvwdPbu1qoMItzrYs+roAyRaNYeIVoEmVEcTkmiIlo5mvPPOfYKbdaeqQzzrfbfpaCboji4z8CzH0LwMIVre4HEs1ZE17wgEGreQ8FWHMZ21oxFoHEPPjkai1/JgCX1HI9JyC90drf/eYd6dqgdL5jH0rzupDnd14GkI0Ui0rg79906vjmBfhmW5hg363hJ94Oxo/fcOpv3zjpEHi2vaOYZ6R+Ov0pW8wdWDRUyv1Y6+V4kO66dSbseJQiG340ShkNtxolDI7ThRKOR2nCgUcjvOH3boHYWBIAaCqI5iGnRjTTS/YC9qDLYxXoVa6BV6WaUlLJCcsEBywgLJCQskJyyQnLBAcsICyQkLJCcskJywQHLCAj4ba7e21zDEeLxd3fcabVO/5md1jQ4f3Zv+aB0vNTp89KF/DgA1Onx015OOGh0+2pqeNKvR4aOnOmaNjh5t6rIaHTx6qGvU6ODRS12rRgeP3uraNfrJ3p3kKAwDURiuhG7opgd6HoWAFDdGQGAH4qDsEBZIiSO/gMvvP8K3AOclkgNDz89DzwlN6Dih+dNxiH+GJqB5vDuKDywGoPkIfhxHJQPQnEmdOPwbgOarLCe+nDUAzc8NnPgBjYEPaMwk11JhPLmWCuNJ+L6nTSqMJ4CeCH2aIHokdDvQ2QOhW4GWzhehW4GWzkdi0GvF9CIVvf8kBb1QTJ9SWW+QEPRYMfUzqSH9nAz0bqaQbu6lTm/JQIOc8zup138i0KVCyrtSt9ckoJeK6RY6e0yiq1RMf36zh3nolWL69Z09jEMvFdMw8549TEOjnPtZg9nDMjTyAO0/e9iFbvcAXT17WIUGOWtXmtUb2IQu1Ql9gA40e8R3n+FG3cDLaKjZI7r7DFHOI/HJf/aI7T7DrTqhD3bhZo/I7jPc5geayx/svGaPyO4z3LN3pj1NBVEAfYi7VK1LjMaYNq8qIFGrKIiKcQVEUErqAm4ssliK7BikUENYCrInCn7yAz/U2zD0to/y+p52JjNv5vyEk5vb09smk/DMRdjZOXuI9Z7hHx3hIexsnD2Ees8wyTMnYWf97CHSe4a0guMMi397CPSeIS3Pp7VskXt2Z9HivGdoCDval9Fsnz2Eec+Q37CzdvYQ5T3DKlqeTcIuq2cPQd4zrDYEB+WfvCmcPQR5z5DvsLNy9hDjPcNkzzyGnYWzhxDvGfIfdimcEvUPNB6dDudyNDq4xBS9oSfB0WXUhDwRRW/w9JO35bOHgKLX0A1vl1Gzs4dwotf1JHi7jJqdPQQTzcN/Rv+Jo7pQ/PJSwqVRJeekLhRej5cSvrwcjR4HDuoisfrbQ0+071CuRov9u3WRWP3poSnad+K4Roe9u3SRWAPPFEUDR/ZpNNijC8U6WKYqGjh8jLiROTc89EUDbg2QOzdYiAYg8yTPDUaiIfMkzw1WoiHz5M4NZqIh86TODXaiIfNkzg2GoiHzJM4NFqIRt7y5wUQ04pI2N1iJxsyTNDeYicbMkzM32InGzJMyNxiKxsyTMTdYisbMkzA3WIpG3PLlhplo+O/rk4JvJQ8rbz64XnznxsUrty5ce/fp8qX7Xwvzy99ebay4+6i66nXtQt1Q65fnz2oyi0Zc0uWGmeh7pZuix0H0UyK6qAhEPy7Mn/YnRNfXDX20LBozT7LcMBUNE11GJhpEtyQmGkSXo+gFW6Ix8+TKDXPRONHFONFJq+M2mWg7qwMzT6rcyLQ6yow7eku0399Y8SY+0fVkdfywKhozT6bcyDjRBSUvUDTuaPwwtD/RmHkS5YaV6hhPVx1+XB12dzTilic3rFRHJVbH9y3R0zDRn7cmutXmRCMuaXIj8+owTHTRtolesLejjZknSW7Yrg7jF5Za2zvamHly5EZG0VgdLTjR2fgwxMyTIjdMPwxL46sjdUfjN8P//jDEzJMhN1gdlcwzT4Lc4EE0ZJ7zc4MP0T6X43ODE9GQeQ7PDV5EQ+Y5Oze4EQ2Z5+jc4Ec0ZJ6Tc4Mj0ZB5Ds4NnkRj5tnCIxJeSmg2UaKVaCXaIxLEixJtQIlWopVoJZoHiBcl2oASrUQr0Uo0DxAvSrQBJVqJVqKVaB4gXpRoA0q0Eq1EK9E8QLw4S/R5wgcgGAyGQqGBgbGxsf7+/o6Ojvb29mj0JdDd3R2JjIyMtLVNTU2Fw+G+vsnJydmVleHh4ebm5t7e90ATsLwcm5ubm5lpaGjo6up6BQQCgc7Ozp6excXF0dH5+YmJwcHBGp8SDZ6BFNFR4jkCnoG46D4ARM8mRPduil5ajsVi4Hm7aDA9iqJr5BYdTDPRUSBpoono8KZnGGkU3QQsxU2nTHQgSbSaaKPogTSrI5IQHTaZ6J1XB+wONdFoOrR9R5OJxtVBTBt2tOXVMaEm+m87drTSQAxEYfgdBS14Z29aKYpUpSBbEYqwVmTtPrHJOpI2szG52Kyx/ecRPoaTOQlv9O1BdIiz22gHbaUjG7058Y2OXR1r7+pYWue27YkOMjoWHeIs0HN9dbjH0GW0fgw7Z73RnHfiHMzoC++8u1HQ1tltNOddakaLdHyj28DVwUZHoRfpd7Ta6Ngd3XB1qGYYuDrE2RUWldG7Hc0wdaMFOn5Hb/syWp13XB0JFdxldCA6dAUPFpaGZuii45cKrqHljk4tLA3N0EnvR4fc0e4t9JqhvqN7o+OMv46CR1yA9gZooIEGuoQRF6C9ARpooE8P+vvLf/HwfD+f2bK9fjI/zsvXdjW1JeTzrTbVY2JKx11VbR4DRQPoROhzDb1d2WJ9Zb6Xa4FugM4EPe02+v3yB/oD6KGgZ2qj96AroDNHBxk90kaT0cNv9MtBRnfQNdEx5HmnoeW8IzoGhdbR0UpGS3RcEx0ZH0MHPWGjcz6G3NEjFZZuo+sa6OzNkAqeLTo47/4kOsjoMaCNMxWcj3+ggf5HIy5AewM00EADXcKIC9DeAA000ECXMOICtDdAAw000CWMuADtDdBAAw10CSMuQHsDNNBAA13CiAvQ3hwt9BeZfObQe9dnUAAAAABJRU5ErkJggg=="},ChhS:function(e,t){},M1ar:function(e,t){},NGNM:function(e,t){},NHnr:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=a("7+uW"),r=a("Dd8w"),s=a.n(r),i=a("pFYg"),l=a.n(i),n=a("QpGM"),d=a.n(n),c=(a("XSxf"),a("K/Lq")),m=a.n(c),u=(a("s2Rr"),{name:"Icon",props:{name:{type:String,required:!0}}}),p={render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{staticClass:"icon"},[t("use",{attrs:{"xlink:href":"#"+this.name}})])},staticRenderFns:[]};var h=a("VU/8")(u,p,!1,function(e){a("BskM")},null,null).exports,f={name:"TarsFormItem",props:{label:String}},v={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("let-form-item",{staticClass:"tars-form-item"},[a("label",{staticClass:"let-form-item__label let-label__position_top clickable",on:{click:function(t){e.$emit("onLabelClick")}}},[e._v(e._s(e.label))]),e._v(" "),e._t("default")],2)},staticRenderFns:[]};var _=a("VU/8")(f,v,!1,function(e){a("NGNM")},null,null).exports,g=a("Z/F5"),b=a.n(g),$=a("aqzs"),w=a.n($);o.default.use(d.a,{locale:{en:w.a,cn:b.a}[m.a.get("locale")||"cn"]||b.a}),o.default.component(h.name,h),o.default.component(_.name,_);var M=o.default.prototype.$Loading;function y(e){this.el=e,this.loading=null}y.prototype.show=function(e,t){"object"===(void 0===e?"undefined":l()(e))&&(t=e,e=null),this.loading&&this.hide();var a=this.el,o=M(s()({fullScreen:!a,target:a&&e?a.querySelector(e):a,boxClass:"loading-inner",background:"rgba(0,0,0,0)",color:"#fff",size:24},t));return o.show(),this.loading=o,this},y.prototype.hide=function(){return this.loading&&(this.loading.hide(),this.loading=null),this},y.show=function(){var e;return y._loading||(y._loading=new y),(e=y._loading).show.apply(e,arguments)},y.hide=function(){return y._loading||(y._loading=new y),y._loading.hide()},M.show=y.show,M.hide=y.hide,Object.defineProperty(o.default.prototype,"$loading",{get:function(){return this._loading||(this._loading=new y(this.$el)),this._loading}}),Object.defineProperty(o.default.prototype,"$tip",{get:function(){return this.$Notice}});a("rplX");var k=a("mvHQ"),x=a.n(k),S=a("//Fk"),L=a.n(S),C=a("Zrlr"),D=a.n(C),F=a("wxAW"),N=a.n(F),q=a("fZjL"),T=a.n(q),R=a("woOf"),O=a.n(R),j=function(e){return"string"==typeof e},z=Array.isArray,E=function(e){return"object"===(void 0===e?"undefined":l()(e))&&null!==e},P=function(e){return"function"==typeof e},I=O.a;function A(e){return String(e).replace(/(?:[\0- "-&\+-\}\x7F-\xA8\xAA-\xAD\xAF-\u2121\u2123-\u23E8\u23F0-\u23F2\u23F4-\u23F7\u23FB-\u24C1\u24C3-\u25B5\u25B7-\u25FF\u27C0-\u2933\u2936-\u2B04\u2B08-\u2B1A\u2B1D-\u2B4F\u2B51-\u2B54\u2B56-\u302F\u3031-\u303C\u303E-\u3296\u3298\u329A-\uD7FF\uE000-\uFFFF]|[\uD800-\uD83B\uD83F-\uDBFF][\uDC00-\uDFFF]|\uD83C[\uDC00-\uDC03\uDC05-\uDCCE\uDCD0-\uDD6F\uDD72-\uDD7D\uDD80-\uDD8D\uDD8F\uDD90\uDE52-\uDEFF]|\uD83D[\uDE50-\uDE7F\uDF00-\uDFFF]|\uD83E[\uDC00-\uDCFF\uDE00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g,encodeURIComponent).replace(/ /g,"+").replace(/[!'()~*]/g,function(e){return"%"+e.charCodeAt().toString(16).slice(-2).toUpperCase()})}function J(e){if(!e)return"";var t=[];return T()(e).forEach(function(a){var o=e[a];null!==o&&void 0!==o||(o=""),t.push(A(a)+"="+A(o))}),t.join("&").replace(/%20/g,"+")}function H(e){return J(T()(e).reduce(function(t,a){return function e(t,a,o){return z(o)||E(o)?(T()(o).forEach(function(r){e(t,a+"["+r+"]",o[r])}),t):(t[a]=o,t)}(t,a,e[a])},{}))}var B=function(){function e(t){D()(this,e),this.defaults=t}return N()(e,[{key:"get",value:function(e){return I({},this.defaults,e)}},{key:"set",value:function(e,t){var a=this;if(e){if(j(e)){var o=e.split(".");o.reduce(function(e,a,r){return r===o.length-1&&(e[a]=t),e[a]},this.defaults)}E(e)&&T()(e).forEach(function(t){a.set(t,e[t])}),z(e)&&e.forEach(function(e){return a.set(e,t)})}}},{key:"remove",value:function(e){var t=this;if(e){if(j(e)){var a=e.split(".");a.reduce(function(e,t,o){return o===a.length-1&&delete e[t],e[t]},this.defaults)}z(e)&&e.forEach(function(e){return t.remove(e)})}}}]),e}(),V=function(){function e(t){D()(this,e),this.handler=t}return N()(e,[{key:"set",value:function(e){P(e)&&(this.handler=e)}},{key:"exec",value:function(){P(this.handler)&&this.handler.apply(null,arguments)}}]),e}(),U=new(function(){function e(t){D()(this,e),this.base=t||""}return N()(e,[{key:"set",value:function(e){j(e)&&(this.base=e)}},{key:"get",value:function(e){return this.base+(e||"")}}]),e}()),W=new B({credentials:"same-origin",timeout:1e4}),G=new B({"X-Requested-With":"XMLHttpRequest"}),Z=new B({}),Q=new V,Y=new V(function(){return!0});function X(e,t){var a=J(Z.get(t));return a&&(a=-1===e.indexOf("?")?"?"+a:"&"+a),e+a}function K(e){var t=e.status;if(t>=200&&t<300||304===t)return e;throw Q.exec(t,e),new Error(e.statusText)}function ee(e){return e.json().then(null,function(t){return Q.exec(500,e),L.a.reject(t)})}function te(e){return Y.handler(e)?e:L.a.reject(e)}function ae(e){return L.a.reject(e)}var oe={ServerUrl:U,Options:W,Headers:G,Body:Z,StatusHandler:Q,ResultHandler:Y,get:function(e,t){var a=W.get({headers:G.get()});return fetch(U.get(X(e,t)),a).then(K).then(ee).catch(ae)},getJSON:function(e,t){var a=W.get({headers:G.get()});return fetch(U.get(X(e,t)),a).then(K).then(ee).then(te).catch(ae)},post:function(e,t){var a=W.get({method:"POST",headers:G.get({"Content-Type":"application/x-www-form-urlencoded"}),body:H(Z.get(t))});return fetch(U.get(e),a).then(K).then(ee).then(te).catch(ae)},postForm:function(e,t){var a=W.get({method:"POST",headers:G.get(),body:t}),o=Z.get({});return T()(o).forEach(function(e){t.append(e,o[e])}),fetch(U.get(e),a).then(K).then(ee).then(te).catch(ae)},postJSON:function(e,t){var a=W.get({method:"POST",headers:G.get({Accept:"application/json","Content-Type":"application/json"}),body:x()(Z.get(t))});return fetch(U.get(e),a).then(K).then(ee).then(te).catch(ae)},put:function(e,t){var a=W.get({method:"PUT",headers:G.get({"Content-Type":"application/x-www-form-urlencoded"}),body:H(Z.get(t))});return fetch(U.get(e),a).then(K).then(ee).then(te).catch(ae)},remove:function(e,t){var a=W.get({method:"DELETE",headers:G.get()});return fetch(U.get(X(e,t)),a).then(K).then(ee).then(te).catch(ae)},download:function(e,t){window.open(U.get(X(e,t)))}};oe.ServerUrl.set("/pages"),oe.ResultHandler.set(function(e){return!(!e||200!==e.ret_code||null==e.data)}),["getJSON","postJSON"].forEach(function(e){var t=oe[e];oe["_"+e]=t,oe[e]=function(){for(var e=arguments.length,a=Array(e),o=0;o<e;o++)a[o]=arguments[o];return t.call.apply(t,[null].concat(a)).then(function(e){return e.data})}}),Object.defineProperty(o.default.prototype,"$ajax",{get:function(){return oe}});var re={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("keep-alive",[t("router-view",{staticClass:"main-width"})],1)],1)},staticRenderFns:[]};var se=a("VU/8")({name:"App"},re,!1,function(e){a("flEL")},null,null).exports,ie=a("/ocq"),le={name:"Server",data:function(){return{treeErrMsg:"加载失败",treeData:null,enableAuth:!1,serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""}}},computed:{base:function(){return"/server/"+this.$route.params.treeid}},watch:{"$route.params.treeid":function(e){this.serverData=this.getServerData(),this.isTrueTreeLevel()}},methods:{selectTree:function(e){"/server"===this.$route.path?this.$router.push("/server/"+e+"/manage"):this.$router.push({params:{treeid:e}})},handleData:function(e,t){var a=this;e&&e.length&&e.forEach(function(e){e.label=e.name,e.nodeKey=e.id,t&&(e.iconClass="tree-icon",e.expand=!0),e.children&&e.children.length&&a.handleData(e.children)})},getTreeData:function(){var e=this;this.treeData=null,this.$nextTick(function(){var t=e.$loading.show({target:e.$refs.treeLoading});e.$ajax.getJSON("/server/api/tree").then(function(a){t.hide(),e.treeData=a,e.handleData(e.treeData,!0)}).catch(function(a){t.hide(),e.treeErrMsg=a.err_msg||a.message||"加载失败",e.treeData=!1})})},getServerData:function(){if(!this.$route.params.treeid)return{};var e={level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""};return this.$route.params.treeid.split(".").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}e.level=a}),e},clickTab:function(e){this.$router.push(O()({},this.$route,{path:e}))},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||(a=!0),5!==this.serverData.level&&4!==this.serverData.level&&1!==this.serverData.level&&"config"===t&&(a=!0),a&&this.$router.replace("manage")}},created:function(){this.serverData=this.getServerData(),this.isTrueTreeLevel()},mounted:function(){var e=this;this.getTreeData(),this.$ajax.getJSON("/server/api/is_enable_auth").then(function(t){e.enableAuth=t.enableAuth||!1}).catch(function(e){})}},ne={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"page_server"},[this.$route.params.treeid?o("div",{staticClass:"right-view"},[o("let-tabs",{attrs:{activekey:e.$route.path},on:{click:e.clickTab}},[o("let-tab-pane",{attrs:{tabkey:e.base+"/manage",tab:e.$t("header.tab.tab1")}}),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/publish",tab:e.$t("index.rightView.tab.patch")}}):e._e(),e._v(" "),5===e.serverData.level||4===e.serverData.level||1===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/config",tab:5===e.serverData.level?e.$t("index.rightView.tab.serviceConfig"):4===e.serverData.level?e.$t("index.rightView.tab.setConfig"):1===e.serverData.level?e.$t("index.rightView.tab.appConfig"):""}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/server-monitor",tab:e.$t("index.rightView.tab.statMonitor")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/property-monitor",tab:e.$t("index.rightView.tab.propertyMonitor")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/interface-debuger",tab:e.$t("index.rightView.tab.infDebuger")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/call-chain",tab:e.$t("index.rightView.tab.callChain")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/call-chain-analyze",tab:e.$t("index.rightView.tab.callChainAnalyze")}}):e._e(),e._v(" "),5===e.serverData.level?o("let-tab-pane",{attrs:{tabkey:e.base+"/task",tab:e.$t("index.rightView.tab.task")}}):e._e(),e._v(" "),5===e.serverData.level&&e.enableAuth?o("let-tab-pane",{attrs:{tabkey:e.base+"/user-manage",tab:e.$t("index.rightView.tab.privileage")}}):e._e()],1),e._v(" "),o("router-view",{key:e.$route.params.treeid,ref:"childView",staticClass:"page_server_child"})],1):o("div",{staticClass:"right-view"},[o("div",{staticClass:"empty"},[o("img",{staticClass:"package",attrs:{src:a("CZtL")}}),e._v(" "),o("p",{staticClass:"title"},[e._v(e._s(e.$t("index.rightView.title")))]),e._v(" "),o("p",{staticClass:"notice",domProps:{innerHTML:e._s(e.$t("index.rightView.tips"))}})])])])},staticRenderFns:[]};var de=a("VU/8")(le,ne,!1,function(e){a("dxeK")},null,null).exports,ce={name:"ServerManage",data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},serverList:[],serverNotifyList:[],pageNum:1,pageSize:20,total:1,serverTypes:["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars"],configModal:{show:!1,model:null},servantModal:{show:!1,model:null,currentServer:null},servantDetailModal:{show:!1,isNew:!0,model:null},logLevels:["NONE","DEBUG","INFO","WARN","ERROR"],moreCmdModal:{show:!1,model:null,currentServer:null},failCount:0}},computed:{showOthers:function(){return 5===this.serverData.level},isEndpointValid:function(){return!(!this.servantDetailModal.model||!this.servantDetailModal.model.endpoint)&&this.checkServantEndpoint(this.servantDetailModal.model.endpoint)}},methods:{getServerList:function(){var e=this,t=this.$refs.serverListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.$route.params.treeid}).then(function(a){t.hide(),e.serverList=a}).catch(function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.msg.fail"),e.$t("common.alert")).then(function(){e.getServerList()})})},getServerNotifyList:function(e){var t=this;if(this.showOthers){var a=this.$refs.serverNotifyListLoading.$loading.show();this.$ajax.getJSON("/server/api/server_notify_list",{tree_node_id:this.$route.params.treeid,page_size:this.pageSize,curr_page:e}).then(function(o){a.hide(),t.pageNum=e,t.total=Math.ceil(o.count/t.pageSize),t.serverNotifyList=o.rows}).catch(function(e){a.hide(),t.$tip.error(t.$t("serverList.restart.failed")+": "+(e.err_msg||e.message))})}},gotoPage:function(e){this.getServerNotifyList(e)},getTemplateList:function(){var e=this;this.$ajax.getJSON("/server/api/template_name_list").then(function(t){e.configModal.model?e.configModal.model.templates=t:e.configModal.model={templates:t}}).catch(function(t){e.$tip.error(e.$t("serverList.restart.failed")+": "+(t.err_msg||t.message))})},getServerConfig:function(e){var t=this,a=this.$loading.show({target:this.$refs.configFormLoading});this.$ajax.getJSON("/server/api/server",{id:e}).then(function(e){a.hide(),t.configModal.model?t.configModal.model=O()({},t.configModal.model,e):(e.templates=[],t.configModal.model=e)}).catch(function(e){a.hide(),t.closeConfigModal(),t.$tip.error(t.$t("serverList.restart.failed")+": "+(e.err_msg||e.message))})},configServer:function(e){this.configModal.show=!0,this.getTemplateList(),this.getServerConfig(e)},saveConfig:function(){var e=this;if(this.$refs.configForm.validate()){var t=this.$Loading.show();this.$ajax.postJSON("/server/api/update_server",s()({isBak:this.configModal.model.bak_flag},this.configModal.model)).then(function(a){t.hide(),e.serverList=e.serverList.map(function(e){return e.id===a.id?a:e}),e.closeConfigModal(),e.$tip.success(e.$t("serverList.restart.success"))}).catch(function(a){t.hide(),e.$tip.error(e.$t("serverList.restart.failed")+": "+(a.message||a.err_msg))})}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1,this.configModal.model=null},checkTaskStatus:function(e,t){var a=this;return new L.a(function(o,r){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: "+t.task_no):r(new Error("taskid: "+t.task_no))}).catch(function(s){t?r(new Error(s.err_msg||s.message||a.$t("common.networkErr"))):setTimeout(function(){o(a.checkTaskStatus(e,!0))},3e3)})})},addTask:function(e,t,a){var o=this,r=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){r.hide(),o.getServerList(),o.$tip.success({title:a.success,message:e})}).catch(function(e){throw e})}).catch(function(e){r.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;this.$confirm(this.$t("serverList.dlg.msg.undeploy"),this.$t("common.alert")).then(function(){t.addTask(e,"undeploy_tars",{success:t.$t("serverList.restart.success"),error:t.$t("serverList.restart.failed")}),t.closeMoreCmdModal()})},manageServant:function(e){var t=this;this.servantModal.show=!0;var a=this.$loading.show({target:this.$refs.servantModalLoading});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(t.$t("serverList.restart.failed")+": "+(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=O()({},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=/^h\s(\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,o=/^t\s([1-9]|[1-9]\d+)$/i,r=/^p\s\d{4,5}$/i,s=!0;if(/^tcp|udp$/i.test(t[0])){for(var i=0,l=1;l<t.length;l++)if(a&&a.test(t[l])&&(i++,this.servantDetailModal.model.node_name=t[l].split(/\s/)[1],a=null),o&&o.test(t[l])&&(i++,o=null),r&&r.test(t[l])){var n=t[l].substring(2);n<0||n>65535||i++,r=null}s=3===i}else s=!1;return s},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(e.$t("common.error")+": "+(a.err_msg||a.message))})}else 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(e.$t("common.error")+": "+(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(e){a.hide(),t.servantModal.model=t.servantModal.model.map(function(t){if(t.id!==e)return t}).filter(function(e){return e}),t.$tip.success(t.$t("common.success"))}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(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.$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(t.$t("common.error")+": "+(e.err_msg||e.message))})},sendCommand:function(e,t,a){var o=this,r=this.$Loading.show();this.$ajax.getJSON("/server/api/send_command",{server_ids:e,command:t}).then(function(e){r.hide();var t=e[0].err_msg.replace(/\n/g,"<br>");if(0!==e[0].ret_code)throw new Error(t);var s={title:o.$t("common.success"),message:t};a&&(s.duration=0),o.$tip.success(s)}).catch(function(e){r.hide(),o.$tip.error({title:o.$t("common.error"),message:e.err_msg||e.message})})},invokeMoreCmd:function(){var e=this.moreCmdModal.model,t=this.moreCmdModal.currentServer;"undeploy_tars"===e.selected?this.undeployServer(t.id):"setloglevel"===e.selected?this.sendCommand(t.id,t.application+".setloglevel "+e.setloglevel):"loadconfig"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,t.application+".loadconfig "+e.loadconfig):"command"===e.selected&&this.$refs.moreCmdForm.validate()?this.sendCommand(t.id,e.command):"connection"===e.selected&&this.sendCommand(t.id,t.application+".connection",!0)},closeMoreCmdModal:function(){this.$refs.moreCmdForm&&this.$refs.moreCmdForm.resetValid(),this.moreCmdModal.unwatch&&this.moreCmdModal.unwatch(),this.moreCmdModal.show=!1,this.moreCmdModal.model=null},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}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getServerList(),this.getServerNotifyList(1)}},me={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_manage"},[e.serverList?a("let-table",{ref:"serverListLoading",attrs:{data:e.serverList,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name",width:"140px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(t){return[t.row.enable_set?a("p",{staticStyle:{"max-width":"200px"}},[e._v("\n "+e._s(e.$t("common.set.setName"))+""+e._s(t.row.set_name)),a("br"),e._v("\n "+e._s(e.$t("common.set.setArea"))+""+e._s(t.row.set_area)),a("br"),e._v("\n "+e._s(e.$t("common.set.setGroup"))+""+e._s(t.row.set_group)+"\n ")]):a("span",[e._v(e._s(e.$t("common.disable")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.setting_state?"status-active":"status-off"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus"),width:"65px"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"===e.row.present_state?"status-active":"activating"===e.row.present_state?"status-activating":"status-off"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.processID"),prop:"process_id",width:"80px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version",width:"68px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.configServer(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.restartServer(t.row.id)}}},[e._v(e._s(e.$t("operate.restart")))]),e._v(" "),a("let-table-operation",{staticClass:"danger",on:{click:function(a){e.stopServer(t.row.id)}}},[e._v(e._s(e.$t("operate.stop")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.manageServant(t.row)}}},[e._v(e._s(e.$t("operate.servant")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showMoreCmd(t.row)}}},[e._v(e._s(e.$t("operate.more")))])]}}])})],1):e._e(),e._v(" "),e.serverNotifyList&&e.showOthers?a("let-table",{ref:"serverNotifyListLoading",attrs:{data:e.serverNotifyList,title:e.$t("serverList.title.serverStatus"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"notifytime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.serviceID"),prop:"server_id"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.threadID"),prop:"thread_id"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result"),prop:"result"}})],1):e._e(),e._v(" "),a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),e._v(" "),a("let-modal",{attrs:{title:e.$t("serverList.dlg.title.editService"),width:"800px",footShow:!(!e.configModal.model||!e.configModal.model.server_name)},on:{"on-confirm":e.saveConfig,close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model&&e.configModal.model.server_name?a("let-form",{ref:"configForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("common.service")}},[e._v(e._s(e.configModal.model.server_name))]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("common.ip")}},[e._v(e._s(e.configModal.model.node_name))]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.isBackup"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("common.yes")},{value:!1,text:e.$t("common.no")}]},model:{value:e.configModal.model.bak_flag,callback:function(t){e.$set(e.configModal.model,"bak_flag",t)},expression:"configModal.model.bak_flag"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("common.template"),required:""}},[e.configModal.model.templates&&e.configModal.model.templates.length?a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.template_name,callback:function(t){e.$set(e.configModal.model,"template_name",t)},expression:"configModal.model.template_name"}},e._l(e.configModal.model.templates,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})):a("span",[e._v(e._s(e.configModal.model.template_name))])],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.serviceType"),required:""}},[a("let-select",{attrs:{size:"small",required:""},model:{value:e.configModal.model.server_type,callback:function(t){e.$set(e.configModal.model,"server_type",t)},expression:"configModal.model.server_type"}},e._l(e.serverTypes,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.enableSet"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:!0,text:e.$t("common.enable")},{value:!1,text:e.$t("common.disable")}]},model:{value:e.configModal.model.enable_set,callback:function(t){e.$set(e.configModal.model,"enable_set",t)},expression:"configModal.model.enable_set"}})],1),e._v(" "),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setName"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setName")},model:{value:e.configModal.model.set_name,callback:function(t){e.$set(e.configModal.model,"set_name",t)},expression:"configModal.model.set_name"}})],1):e._e(),e._v(" "),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setArea"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setArea"),required:"",pattern:"^[a-z]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setArea")},model:{value:e.configModal.model.set_area,callback:function(t){e.$set(e.configModal.model,"set_area",t)},expression:"configModal.model.set_area"}})],1):e._e(),e._v(" "),e.configModal.model.enable_set?a("let-form-item",{attrs:{label:e.$t("common.set.setGroup"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.errMsg.setGroup"),required:"",pattern:"^[0-9\\*]+$","pattern-tip":e.$t("serverList.dlg.errMsg.setGroup")},model:{value:e.configModal.model.set_group,callback:function(t){e.$set(e.configModal.model,"set_group",t)},expression:"configModal.model.set_group"}})],1):e._e(),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.asyncThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.dlg.placeholder.thread"),required:"",pattern:"tars_nodejs"===e.configModal.model.server_type?"^[1-9][0-9]*$":"^([3-9]|[1-9][0-9]+)$","pattern-tip":"$t('serverList.dlg.placeholder.thread')"},model:{value:e.configModal.model.async_thread_num,callback:function(t){e.$set(e.configModal.model,"async_thread_num",t)},expression:"configModal.model.async_thread_num"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.defaultPath")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.base_path,callback:function(t){e.$set(e.configModal.model,"base_path",t)},expression:"configModal.model.base_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.exePath")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.exe_path,callback:function(t){e.$set(e.configModal.model,"exe_path",t)},expression:"configModal.model.exe_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.startScript")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.start_script_path,callback:function(t){e.$set(e.configModal.model,"start_script_path",t)},expression:"configModal.model.start_script_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.stopScript")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.stop_script_path,callback:function(t){e.$set(e.configModal.model,"stop_script_path",t)},expression:"configModal.model.stop_script_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.monitorScript"),itemWidth:"724px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.monitor_script_path,callback:function(t){e.$set(e.configModal.model,"monitor_script_path",t)},expression:"configModal.model.monitor_script_path"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.dlg.privateTemplate"),labelWidth:"150px",itemWidth:"724px"}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:4},model:{value:e.configModal.model.profile,callback:function(t){e.$set(e.configModal.model,"profile",t)},expression:"configModal.model.profile"}})],1)],1):a("div",{ref:"configFormLoading",staticClass:"loading-placeholder"})],1),e._v(" "),a("let-modal",{attrs:{title:e.$t("serverList.table.servant.title"),width:"1200px",footShow:!1},on:{close:e.closeServantModal},model:{value:e.servantModal.show,callback:function(t){e.$set(e.servantModal,"show",t)},expression:"servantModal.show"}},[a("let-button",{staticClass:"tbm16",attrs:{size:"small",theme:"primary"},on:{click:function(t){e.configServant()}}},[e._v(e._s(e.$t("operate.add"))+" Servant")]),e._v(" "),e.servantModal.model?a("let-table",{attrs:{data:e.servantModal.model,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("operate.servant"),prop:"servant"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.adress"),prop:"endpoint"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.thread"),prop:"thread_num"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxConnecttions"),prop:"max_connections"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxQueue"),prop:"queuecap"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),prop:"queuetimeout"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.configServant(t.row.id)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{staticClass:"danger",on:{click:function(a){e.deleteServant(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1):a("div",{ref:"servantModalLoading",staticClass:"loading-placeholder"})],1),e._v(" "),a("let-modal",{attrs:{title:e.servantDetailModal.isNew?e.$t("operate.title.add")+" Servant":e.$t("operate.title.update")+" Servant",width:"800px",footShow:!!e.servantDetailModal.model},on:{"on-confirm":e.saveServantDetail,close:e.closeServantDetailModal,"on-cancel":e.closeServantDetailModal},model:{value:e.servantDetailModal.show,callback:function(t){e.$set(e.servantDetailModal,"show",t)},expression:"servantDetailModal.show"}},[e.servantDetailModal.model?a("let-form",{ref:"servantDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService"),itemWidth:"724px"}},[a("span",[e._v(e._s(e.servantDetailModal.model.application)+"·"+e._s(e.servantDetailModal.model.server_name))])]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.objName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.c"),required:"",pattern:"^[A-Za-z]+$","pattern-tip":e.$t("serverList.servant.obj")},model:{value:e.servantDetailModal.model.obj_name,callback:function(t){e.$set(e.servantDetailModal.model,"obj_name",t)},expression:"servantDetailModal.model.obj_name"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.numOfThread"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("serverList.servant.obj"),required:"",pattern:"^[1-9][0-9]*$","pattern-tip":e.$t("serverList.servant.thread")},model:{value:e.servantDetailModal.model.thread_num,callback:function(t){e.$set(e.servantDetailModal.model,"thread_num",t)},expression:"servantDetailModal.model.thread_num"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.servant.adress"),required:"",itemWidth:"724px"}},[a("let-input",{ref:"endpoint",attrs:{size:"small",placeholder:"tcp -h 172.27.205.40 -t 60000 -p 12000",required:"",extraTip:e.isEndpointValid?"":e.$t("serverList.servant.error")},model:{value:e.servantDetailModal.model.endpoint,callback:function(t){e.$set(e.servantDetailModal.model,"endpoint",t)},expression:"servantDetailModal.model.endpoint"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.maxConnecttions"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.max_connections,callback:function(t){e.$set(e.servantDetailModal.model,"max_connections",t)},expression:"servantDetailModal.model.max_connections"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.lengthOfQueue"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuecap,callback:function(t){e.$set(e.servantDetailModal.model,"queuecap",t)},expression:"servantDetailModal.model.queuecap"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.queueTimeout"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.queuetimeout,callback:function(t){e.$set(e.servantDetailModal.model,"queuetimeout",t)},expression:"servantDetailModal.model.queuetimeout"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.allowIP")}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.allow_ip,callback:function(t){e.$set(e.servantDetailModal.model,"allow_ip",t)},expression:"servantDetailModal.model.allow_ip"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.protocol"),required:""}},[a("let-radio-group",{attrs:{size:"small",data:[{value:"tars",text:"TARS"},{value:"not_tars",text:e.$t("serverList.servant.notTARS")}]},model:{value:e.servantDetailModal.model.protocol,callback:function(t){e.$set(e.servantDetailModal.model,"protocol",t)},expression:"servantDetailModal.model.protocol"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.treatmentGroup"),labelWidth:"150px"}},[a("let-input",{attrs:{size:"small"},model:{value:e.servantDetailModal.model.handlegroup,callback:function(t){e.$set(e.servantDetailModal.model,"handlegroup",t)},expression:"servantDetailModal.model.handlegroup"}})],1)],1):e._e()],1),e._v(" "),a("let-modal",{staticClass:"more-cmd",attrs:{title:e.$t("operate.title.more"),width:"700px"},on:{"on-confirm":e.invokeMoreCmd,close:e.closeMoreCmdModal,"on-cancel":e.closeMoreCmdModal},model:{value:e.moreCmdModal.show,callback:function(t){e.$set(e.moreCmdModal,"show",t)},expression:"moreCmdModal.show"}},[e.moreCmdModal.model?a("let-form",{ref:"moreCmdForm"},[a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"setloglevel"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.logLevel")))]),e._v(" "),a("let-select",{attrs:{size:"small",disabled:"setloglevel"!==e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.setloglevel,callback:function(t){e.$set(e.moreCmdModal.model,"setloglevel",t)},expression:"moreCmdModal.model.setloglevel"}},e._l(e.logLevels,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"loadconfig"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.pushFile")))]),e._v(" "),a("let-select",{attrs:{size:"small",placeholder:e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length?e.$t("pub.dlg.defaultValue"):e.$t("pub.dlg.noConfFile"),disabled:!(e.moreCmdModal.model.configs&&e.moreCmdModal.model.configs.length)||"loadconfig"!==e.moreCmdModal.model.selected,required:"loadconfig"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.loadconfig,callback:function(t){e.$set(e.moreCmdModal.model,"loadconfig",t)},expression:"moreCmdModal.model.loadconfig"}},e._l(e.moreCmdModal.model.configs,function(t){return a("let-option",{key:t.filename,attrs:{value:t.filename}},[e._v(e._s(t.filename))])}))],1),e._v(" "),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"command"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.sendCommand")))]),e._v(" "),a("let-input",{attrs:{size:"small",disabled:"command"!==e.moreCmdModal.model.selected,required:"command"===e.moreCmdModal.model.selected},model:{value:e.moreCmdModal.model.command,callback:function(t){e.$set(e.moreCmdModal.model,"command",t)},expression:"moreCmdModal.model.command"}})],1),e._v(" "),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{attrs:{label:"connection"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("serverList.servant.serviceLink")))])],1),e._v(" "),a("let-form-item",{attrs:{itemWidth:"100%"}},[a("let-radio",{staticClass:"danger",attrs:{label:"undeploy_tars"},model:{value:e.moreCmdModal.model.selected,callback:function(t){e.$set(e.moreCmdModal.model,"selected",t)},expression:"moreCmdModal.model.selected"}},[e._v(e._s(e.$t("operate.undeploy"))+" "+e._s(e.$t("common.service")))])],1)],1):e._e()],1)],1)},staticRenderFns:[]};var ue=a("VU/8")(ce,me,!1,function(e){a("cxxn")},null,null).exports,pe={name:"ServerPublish",data:function(){return{activeKey:"",treeData:[],totalServerList:[],serverList:[],isCheckedAll:!1,totalPage:0,pageSize:20,page:1,publishModal:{show:!1,model:null},finishModal:{show:!1,model:{task_no:"",items:[]}},statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.running"),2:this.$t("serverList.restart.success"),3:this.$t("serverList.restart.failed"),4:this.$t("serverList.restart.cancel"),5:this.$t("serverList.restart.parial")},statusMap:{0:"EM_T_NOT_START",1:"EM_T_RUNNING",2:"EM_T_SUCCESS",3:"EM_T_FAILED",4:"EM_T_CANCEL",5:"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")}],tagList:[],tagVersion:"",publishUrlConfModal:{show:!1,model:{tag:"",compiler:"",task:""}},compilerModal:{show:!1,model:null},pkgUpload:{show:!1,model:null}}},methods:{getCompileConf:function(){var e=this;this.$ajax.getJSON("/server/api/get_compile_conf").then(function(t){t.enable&&e.patchRadioData.push({value:"compile",text:e.$t("pub.dlg.compileAndPublish")})}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getServerList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.$route.params.treeid}).then(function(a){t.hide();var o=a||[];o.forEach(function(e){e.isChecked=!1}),e.totalServerList=o,e.totalPage=Math.ceil(e.totalServerList.length/e.pageSize),e.page=1,e.updateServerList()}).catch(function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.table.msg.fail")).then(function(){e.getServerList()})})},changePage:function(e){this.page=e},openPublishModal:function(){var e=this,t=this.serverList.filter(function(e){return e.isChecked});if(t.length<=0)this.$tip.warning(this.$t("pub.dlg.a"));else{var a=t[0];this.publishModal.model={application:a.application,server_name:a.server_name,serverList:t,patchList:[],patch_id:"",update_text:"",show:!0},this.getPatchList(a.application,a.server_name,1,50).then(function(t){e.publishModal.model.patchList=t.rows}),this.publishModal.show=!0}},getPatchList:function(e,t,a,o){return this.$ajax.getJSON("/server/api/server_patch_list",{application:e,module_name:t,curr_page:a,page_size:o})},closePublishModal:function(){this.publishModal.show=!1,this.publishModal.modal=null,this.patchType="patch",this.$refs.publishForm.resetValid()},savePublishServer:function(){var e=this;if(this.$refs.publishForm.validate()){var t=[];this.publishModal.model.serverList.forEach(function(a){t.push({server_id:a.id.toString(),command:"patch_tars",parameters:{patch_id:e.publishModal.model.patch_id.toString(),bak_flag:a.bak_flag,update_text:e.publishModal.model.update_text}})});var a=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!0,items:t}).then(function(t){a.hide(),e.closePublishModal(),e.finishModal.model.task_no=t,e.finishModal.show=!0,e.getTaskRepeat(t)}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},closeFinishModal:function(){this.finishModal.show=!1,this.finishModal.modal=null,this.$refs.finishForm.resetValid()},getTaskRepeat:function(e){var t=this,a=void 0;a&&clearTimeout(a);!function o(){t.$ajax.getJSON("/server/api/task",{task_no:e}).then(function(e){e.items.forEach(function(e){2===parseInt(e.status,10)||3===parseInt(e.status,10)?clearTimeout(a):a=setTimeout(o,3e3)}),t.finishModal.model.items=e.items}).catch(function(e){clearTimeout(a),t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}()},updateServerList:function(){var e=(this.page-1)*this.pageSize,t=this.page*this.pageSize;this.serverList=this.totalServerList.slice(e,t)},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(t.$t("common.error")+": "+(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})},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){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(e.$t("common.error")+": "+(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,this.getCodeVersion())},getCodeVersion:function(){var e=this;this.$ajax.get("/server/api/get_tag_list",{application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then(function(t){""==t.data?e.openPubConfModal():e.tagList=t.data}).catch(function(t){e.tagList=[],e.$tip.error(e.$t("common.error")+": "+(err.err_msg||err.message))})},openPubConfModal:function(){var e=this;this.publishUrlConfModal.show=!0,this.$ajax.getJSON("/server/api/get_tag_conf",{application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then(function(t){e.publishUrlConfModal.model.tag=t.path}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.err_msg||t.message))})},saveCompilerUrl:function(){var e=this;if(this.$refs.compilerForm.validate()){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/set_tag_conf",{path:this.publishUrlConfModal.model.tag,application:this.publishModal.model.application,server_name:this.publishModal.model.server_name}).then(function(a){t.hide(),e.$tip.success(e.$t("common.success")),e.publishUrlConfModal.show=!1,e.getCodeVersion()}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.err_msg||a.message))})}},addCompileTask:function(){var e=this;this.$ajax.getJSON("/server/api/get_compile_conf").then(function(t){var a=t.getVersionList;if(a){var o=e.publishModal.model.serverList.map(function(e){return e.node_name}),r={application:e.publishModal.model.application,server_name:e.publishModal.model.server_name,node:o.join(";"),path:e.tagVersion.split("--")[0],version:e.tagVersion.split("--")[1],comment:e.publishModal.model.update_text||"",compileUrl:a},s=e.$Loading.show();e.$ajax.postJSON("/server/api/do_compile",r).then(function(t){s.hide(),e.compilerModal.show=!0;var a="string"==typeof t?t:t.data;e.getStatus(a)}).catch(function(t){s.hide(),e.$tip.error(e.$t("common.error")+": "+(t.err_msg||t.message))})}else e.openPubConfModal()}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.err_msg||t.message))})},taskStatus:function(e){this.getStatus(e)},getStatus:function(e){var t=this;!function a(){var o=null;o&&clearTimeout(o),t.$ajax.getJSON("/server/api/compiler_task",{taskNo:e}).then(function(r){var s="array"==typeof r?r:r.data;if(s[0].status=t.statusConfig[s[0].state],1==s[0].state&&(o=setTimeout(a,2e3)),t.compilerModal.model?O()(t.compilerModal.model,{progress:s}):t.compilerModal.model={progress:s},2==s[0].state){var i=t.$Loading({text:"回传发布包"});i.show(),t.compilerModal.show=!1,setTimeout(function a(){t.$ajax.getJSON("/server/api/get_server_patch",{task_id:e}).then(function(e){0!==T()(e).length?(i.hide(),t.publishModal.model.patch_id=e.id,t.publishModal.show=!1,t.savePublishServer()):setTimeout(a,2e3)}).catch(function(e){i.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})},2e3)}}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})}()}},mounted:function(){this.getServerList(),this.getCompileConf()},watch:{isCheckedAll:function(){var e=this.isCheckedAll;this.serverList.forEach(function(t){t.isChecked=e})},page:function(){this.updateServerList()}}},he={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_publish"},[e.showHistory?e._e():a("div",[e.serverList&&e.serverList.length>0?a("let-table",{ref:"table",attrs:{data:e.serverList,title:e.$t("serverList.title.serverList"),"empty-msg":e.$t("common.noService")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{value:t.row.id},model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.enableSet")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.enable_set?e.$t("common.enable"):e.$t("common.disable")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setName"),prop:"set_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setArea"),prop:"set_area"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.set.setGroup"),prop:"set_group"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.configStatus")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"==e.row.setting_state?"status-active":"status-off"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.currStatus")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("span",{class:"active"==e.row.present_state?"status-active":"status-off"})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.version"),prop:"patch_version"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.time")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticStyle:{"word-break":"break-word"}},[e._v(e._s(e.handleNoPublishedTime(t.row.patch_time)))])]}}])}),e._v(" "),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.totalPage,page:e.page},on:{change:e.changePage},slot:"pagination"}),e._v(" "),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:e.openPublishModal}},[e._v(e._s(e.$t("pub.btn.pub")))]),e._v(" "),e.serverList&&e.serverList.length>0?a("let-button",{attrs:{size:"small"},on:{click:e.gotoHistory}},[e._v(e._s(e.$t("pub.btn.history")))]):e._e()],1)],1):e._e(),e._v(" "),a("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?a("let-form",{ref:"publishForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("serverList.servant.appService")}},[e._v("\n "+e._s(e.publishModal.model.application)+"·"+e._s(e.publishModal.model.server_name)+"\n ")]),e._v(" "),a("let-form-item",{attrs:{label:e.$t("pub.dlg.ip")}},e._l(e.publishModal.model.serverList,function(t){return a("div",{key:t.id},[e._v(e._s(t.node_name))])})),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("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._v(" "),a("let-form-item",{attrs:{label:e.$t("pub.dlg.patchType")}},[a("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._v(" "),e.publishModal.model.show?a("let-form-item",{attrs:{label:e.$t("pub.dlg.releaseVersion")}},[a("let-select",{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(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v("\n "+e._s(t.id)+" | "+e._s(t.posttime)+" | "+e._s(t.comment)+"\n ")])})),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.showUploadModal}},[e._v(e._s(e.$t("pub.dlg.upload")))]),e._v(" "),a("br"),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.savePublishServer}},[e._v(e._s(e.$t("common.patch")))])],1):a("let-form-item",{attrs:{label:e.$t("serverList.table.th.version")}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty"),requred:""},model:{value:e.tagVersion,callback:function(t){e.tagVersion=t},expression:"tagVersion"}},e._l(e.tagList,function(t){return a("let-option",{key:""+t.version,attrs:{value:t.path+"--"+t.version}},[e._v(e._s(t.version))])})),e._v(" "),a("let-button",{staticClass:"mt10",attrs:{theme:"primary",size:"small"},on:{click:e.addCompileTask}},[e._v(e._s(e.$t("pub.dlg.compileAndPublish")))]),e._v(" "),e._e()],1)],1):e._e()],1),e._v(" "),a("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?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadPatchPackage(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.releasePkg"),itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue")},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.submit"))+"\n ")]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.comment")}},[a("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),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{title:e.$t("serverList.table.th.result"),width:"880px",footShow:!1},on:{"on-cancel":e.closeFinishModal},model:{value:e.finishModal.show,callback:function(t){e.$set(e.finishModal,"show",t)},expression:"finishModal.show"}},[e.finishModal.model?a("let-table",{attrs:{title:e.$t("serverList.servant.taskID")+e.finishModal.model.task_no,data:e.finishModal.model.items}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.status")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-tag",{attrs:{theme:2==t.row.status?"success":3==t.row.status?"danger":"",checked:""}},[e._v("\n "+e._s(e.statusConfig[t.row.status]+(2!=t.row.status&&3!=t.row.status?"...":""))+"\n ")])]}}])})],1):e._e()],1)],1),e._v(" "),e.showHistory?a("div",[a("let-form",{attrs:{inline:"",itemWidth:"300px"},nativeOn:{submit:function(t){return t.preventDefault(),e.getHistoryList(t)}}},[a("let-form-item",{attrs:{label:e.$t("pub.date")}},[a("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}}})],1),e._v(" "),a("let-form-item",[a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),e._v(" "),e.totalHistoryList&&e.totalHistoryList.length>0?a("let-table",{ref:"historyTable",attrs:{data:e.totalHistoryList,title:e.$t("historyList.title"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.servant.taskID"),prop:"task_no"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c2")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.serial?e.$t("common.yes"):e.$t("common.no")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.dlg.title.taskStatus")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.statusMap[t.row.status]||"-"))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.table.th.c4")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.viewTask(t.row.task_no)}}},[e._v(e._s(e.$t("operate.view")))])]}}])}),e._v(" "),a("let-pagination",{attrs:{slot:"pagination",align:"right",total:e.historyTotalPage,page:e.historyPage},on:{change:e.changeHistoryPage},slot:"pagination"}),e._v(" "),a("div",{staticStyle:{"margin-left":"-15px"},attrs:{slot:"operations"},slot:"operations"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showHistory=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("historyList.table.th.c4"),width:"880px",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?a("let-table",{attrs:{data:e.taskModal.model.items}},[a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c1"),prop:"item_no"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c5"),prop:"command"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.status"),prop:"status_info"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c7"),prop:"execute_info"}})],1):e._e()],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("pub.dlg.conf"),width:"800px",footShow:!0},on:{"on-confirm":e.saveCompilerUrl,"on-cancel":function(t){e.publishUrlConfModal.show=!1}},model:{value:e.publishUrlConfModal.show,callback:function(t){e.$set(e.publishUrlConfModal,"show",t)},expression:"publishUrlConfModal.show"}},[e.publishUrlConfModal.model?a("let-form",{ref:"compilerForm",attrs:{itemWidth:"100%",required:""}},[a("let-form-item",{attrs:{label:e.$t("pub.dlg.tag")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("pub.tips.tag"),"required-tip":e.$t("deployService.table.tips.empty"),required:""},model:{value:e.publishUrlConfModal.model.tag,callback:function(t){e.$set(e.publishUrlConfModal.model,"tag",t)},expression:"publishUrlConfModal.model.tag"}})],1)],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{title:e.$t("pub.dlg.compileProgress"),width:"880px",footShow:!1},model:{value:e.compilerModal.show,callback:function(t){e.$set(e.compilerModal,"show",t)},expression:"compilerModal.show"}},[e.compilerModal.model?a("let-table",{attrs:{data:e.compilerModal.model.progress}},[a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return["1"==t.row.state?a("span",{staticClass:"running"},[e._v(e._s(t.row.status))]):"2"==t.row.state?a("span",{staticClass:"success"},[e._v(e._s(t.row.status))]):a("span",{staticClass:"stop"},[e._v(e._s(t.row.status))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.start"),prop:"start_time"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.end"),prop:"end_time"}})],1):e._e()],1)],1)},staticRenderFns:[]};var fe=a("VU/8")(pe,he,!1,function(e){a("Nu8y")},null,null).exports,ve={render:function(){var e=this.$createElement;return(this._self._c||e)("section",{staticClass:"section"},[this._t("default")],2)},staticRenderFns:[]};var _e=a("VU/8")(null,ve,!1,function(e){a("hqtp")},"data-v-df1b7eae",null).exports,ge={name:"ServerConfig",components:{wrapper:_e},data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},checkedConfigId:"",configList:[],refFileList:null,nodeConfigList:null,nodeCheckList:[],configModal:{show:!1,isNew:!0,model:null},detailModal:{show:!1,title:"",model:null},refFileModal:{show:!1,model:{fileList:[]}},nodeRefFileListModal:{show:!1,model:null},pushResultModal:{show:!1,model:null}}},computed:{showOthers:function(){return 5===this.serverData.level},nodeCheckAll:{get:function(){return!(!this.nodeConfigList||!this.nodeConfigList.length)&&this.nodeCheckList.length===this.nodeConfigList.length},set:function(e){this.nodeCheckList=e?this.nodeConfigList.map(function(e){return e.id}):[]}}},watch:{checkedConfigId:function(){var e=this;this.$nextTick(function(){e.getRefFileList(),e.getNodeConfigList()})}},methods:{getConfigList:function(e){var t=this,a=this.$refs.configListLoading.$loading.show();this.$ajax.getJSON("/server/api/config_file_list",e).then(function(e){a.hide(),t.configList=e,t.refFileList=[],t.nodeConfigList=[],e[0]&&e[0].id&&(t.checkedConfigId=e[0].id)}).catch(function(e){a.hide(),t.$confirm(e.err_msg||e.message||t.$t("common.error"),t.$t("common.retry"),t.$t("common.alert")).then(function(){t.getConfigList()})})},addConfig:function(){this.configModal.model={filename:"",config:""},this.configModal.isNew=!0,this.configModal.show=!0},changeConfig:function(e,t){this.configModal.model=O()({reason:""},e),this.configModal.target=t,this.configModal.isNew=!1,this.configModal.show=!0},updateConfigFile:function(){var e=this;if(this.$refs.configForm.validate()){var t=this.$Loading.show(),a=this.configModal.model;if(this.configModal.isNew){var o=O()({application:this.serverData.application,level:this.serverData.level,server_name:this.serverData.server_name,set_name:this.serverData.set_name,set_area:this.serverData.set_area,set_group:this.serverData.set_group},a);this.$ajax.postJSON("/server/api/add_config_file",o).then(function(a){t.hide(),e.configList.unshift(a),1===e.configList.length&&(e.checkedConfigId=a.id),e.$tip.success(e.$t("common.success")),e.closeConfigModal()}).catch(function(){t.hide(),e.$tip.error(e.$t("common.error"))})}else this.$ajax.postJSON("/server/api/update_config_file",{config:a.config,id:a.id,reason:a.reason}).then(function(a){t.hide(),e[e.configModal.target]=e[e.configModal.target].map(function(e){return e.id===a.id?a:e}),e.checkedConfigId===a.id&&(e.getRefFileList(),e.getNodeConfigList()),e.$tip.success(e.$t("common.success")),e.closeConfigModal()}).catch(function(){t.hide(),e.$tip.error(e.$t("common.error"))})}},closeConfigModal:function(){this.$refs.configForm&&this.$refs.configForm.resetValid(),this.configModal.show=!1},deleteConfig:function(e){var t=this;this.$confirm(this.$t("cfg.msg.confirmCfg"),this.$t("common.alert")).then(function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_config_file",{id:e}).then(function(e){a.hide(),t.getConfigList(t.serverData),t.getNodeConfigList(),t.$tip.success(t.$t("common.success"))}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})})},getUnusedFileList:function(e){var t=this;this.showOthers&&this.$ajax.getJSON("/server/api/unused_config_file_list",{config_id:e,application:this.serverData.application}).then(function(e){t.refFileModal.model.fileList=e}).catch(function(e){t.refFileModal.model.fileList=[],t.$tip.error({title:t.$t("common.error"),message:e.err_msg||e.message||t.$t("common.networkErr")})})},getRefFileList:function(){var e=this;if(this.showOthers){var t=this.$refs.refFileListLoading.$loading.show();this.$ajax.getJSON("/server/api/config_ref_list",{config_id:this.checkedConfigId}).then(function(a){t.hide(),a.map(function(e){var t=e.id;return(e=O()(e,e.reference)).refrence_id=e.id,e.id=t,e}),e.refFileList=a}).catch(function(a){t.hide(),e.refFileList=[],e.$tip.error({title:e.$t("common.error"),message:a.err_msg||a.message||e.$t("common.networkErr")})})}},openRefFileModal:function(){this.refFileModal.show=!0,this.refFileModal.isNodeRef=!1,this.getUnusedFileList(this.checkedConfigId)},openNodeRefFileModal:function(){this.refFileModal.show=!0,this.refFileModal.isNodeRef=!0,this.getUnusedFileList(this.refFileModal.id)},addRefFile:function(){var e=this;if(this.$refs.refForm.validate()){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/add_config_ref",{config_id:this.refFileModal.isNodeRef?this.refFileModal.id:this.checkedConfigId,reference_id:this.refFileModal.model.filename}).then(function(a){t.hide(),e.refFileModal.show=!1,e.refFileModal.isNodeRef?e.getNodeRefFileList(e.refFileModal.id):e.getRefFileList()})}},closeRefFileModal:function(){this.refFileModal.show=!1},deleteRef:function(e,t,a){var o=this;this.$confirm(this.$t("cfg.msg.confirm"),this.$t("common.alert")).then(function(){var r=o.$Loading.show();o.$ajax.getJSON("/server/api/delete_config_ref",{id:e}).then(function(e){r.hide(),"nodeRef"==t?o.getNodeRefFileList(a):o.getRefFileList(),o.$tip.success(o.$t("common.success"))})})},getNodeConfigList:function(){var e=this;if(this.showOthers){var t=this.$refs.nodeConfigListLoading.$loading.show(),a=O()({config_id:this.checkedConfigId},this.serverData);this.$ajax.getJSON("/server/api/node_config_file_list",a).then(function(a){t.hide(),e.nodeConfigList=a}).catch(function(a){t.hide(),e.nodeConfigList=[],e.$tip.error({title:e.$t("common.error"),message:a.err_msg||a.message||e.$t("common.networkErr")})})}},pushNodeConfig:function(){var e=this;if(this.nodeCheckList.length){var t=this.$Loading.show();this.$ajax.getJSON("/server/api/push_config_file",{config_ids:this.nodeCheckList.join(";")}).then(function(a){t.hide(),e.pushResultModal.model=a,e.pushResultModal.show=!0}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.err_msg||a.message))})}else this.$tip.warning(this.$t("cfg.msg.selectNode"))},closePushResultModal:function(){this.pushResultModal.model=null,this.pushResultModal.show=!1},showDetail:function(e){this.detailModal.title=this.$t("cfg.title.viewConf"),this.detailModal.model={detail:e.config},this.detailModal.show=!0},showMergedDetail:function(e){var t=this;this.detailModal.title=this.$t("cfg.title.viewMerged"),this.detailModal.show=!0;var a=this.$loading.show({target:this.$refs.detailModalLoading});this.$ajax.getJSON("/server/api/merged_node_config",{id:e}).then(function(e){a.hide(),t.detailModal.model={detail:e}}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})},showHistory:function(e){var t=this;this.detailModal.title=this.$t("cfg.title.viewHistory"),this.detailModal.show=!0;var a=this.$loading.show({target:this.$refs.detailModalLoading});this.$ajax.getJSON("/server/api/config_file_history_list",{config_id:e}).then(function(e){a.hide(),t.detailModal.model={table:e.rows,detail:""}}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.err_msg||e.message))})},showTableDeatil:function(e){this.detailModal.model.detail=e.content},closeDetailModal:function(){this.detailModal.show=!1,this.detailModal.model=null},getNodeRefFileList:function(e){var t=this;this.$ajax.getJSON("/server/api/config_ref_list",{config_id:e}).then(function(e){e.map(function(e){var t=e.id;return(e=O()(e,e.reference)).refrence_id=e.id,e.id=t,e}),t.nodeRefFileListModal.model={refFileList:e}}).catch(function(e){t.nodeRefFileListModal.model={refFileList:[]},t.$tip.error({title:t.$t("common.error"),message:e.err_msg||e.message||t.$t("common.networkErr")})})},handleRefFiles:function(e){this.nodeRefFileListModal.show=!0,this.nodeRefFileListModal.model=null,this.refFileModal.id=e,this.getNodeRefFileList(e)}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getConfigList(this.serverData)}},be={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_config"},[e.configList?a("wrapper",{ref:"configListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.addConfig}},[e._v(e._s(e.$t("cfg.btn.add")))]),e._v(" "),a("let-table",{attrs:{data:e.configList,title:e.$t("cfg.title.a"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:t.row.id},model:{value:e.checkedConfigId,callback:function(t){e.checkedConfigId=t},expression:"checkedConfigId"}},[e._v(" ")])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.changeConfig(t.row,"configList")}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deleteConfig(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("cfg.title.viewConf")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e(),e._v(" "),e.refFileList&&e.showOthers?a("wrapper",{ref:"refFileListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openRefFileModal}},[e._v(e._s(e.$t("cfg.btn.addRef")))]),e._v(" "),a("let-table",{attrs:{data:e.refFileList,title:e.$t("cfg.title.b"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.deleteRef(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e(),e._v(" "),e.nodeConfigList&&e.showOthers?a("wrapper",{ref:"nodeConfigListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.pushNodeConfig}},[e._v(e._s(e.$t("cfg.btn.pushFile")))]),e._v(" "),e.nodeConfigList.length?a("let-checkbox",{staticClass:"check-all",model:{value:e.nodeCheckAll,callback:function(t){e.nodeCheckAll=t},expression:"nodeCheckAll"}}):e._e(),e._v(" "),a("let-table",{attrs:{data:e.nodeConfigList,title:e.$t("cfg.title.c"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{width:"40px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-checkbox",{attrs:{label:t.row.id},model:{value:e.nodeCheckList,callback:function(t){e.nodeCheckList=t},expression:"nodeCheckList"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"400px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.changeConfig(t.row,"nodeConfigList")}}},[e._v(e._s(e.$t("cfg.table.modCfg")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showMergedDetail(t.row.id)}}},[e._v(e._s(e.$t("cfg.table.viewMerge")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("cfg.table.viewIpContent")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.handleRefFiles(t.row.id)}}},[e._v(e._s(e.$t("cfg.table.mangeRefFile")))])]}}])})],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.configModal.isNew?e.$t("operate.title.add")+" "+e.$t("common.config"):e.$t("operate.title.update")+" "+e.$t("common.config"),width:"700px"},on:{"on-confirm":e.updateConfigFile,close:e.closeConfigModal,"on-cancel":e.closeConfigModal},model:{value:e.configModal.show,callback:function(t){e.$set(e.configModal,"show",t)},expression:"configModal.show"}},[e.configModal.model?a("let-form",{ref:"configForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("cfg.btn.fileName"),required:""}},[a("let-input",{attrs:{size:"small",disabled:!e.configModal.isNew,required:""},model:{value:e.configModal.model.filename,callback:function(t){e.$set(e.configModal.model,"filename",t)},expression:"configModal.model.filename"}})],1),e._v(" "),e.configModal.isNew?e._e():a("let-form-item",{attrs:{label:e.$t("cfg.btn.reason")}},[a("let-input",{attrs:{size:"small"},model:{value:e.configModal.model.reason,callback:function(t){e.$set(e.configModal.model,"reason",t)},expression:"configModal.model.reason"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:4,required:""},model:{value:e.configModal.model.config,callback:function(t){e.$set(e.configModal.model,"config",t)},expression:"configModal.model.config"}})],1)],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{title:e.detailModal.title,width:"700px",footShow:!1},on:{close:e.closeDetailModal},model:{value:e.detailModal.show,callback:function(t){e.$set(e.detailModal,"show",t)},expression:"detailModal.show"}},[e.detailModal.model&&e.detailModal.model.table?a("let-table",{staticClass:"history-table",attrs:{data:e.detailModal.model.table,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.reason"),prop:"reason"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.content"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.showTableDeatil(t.row)}}},[e._v(e._s(e.$t("operate.view")))])]}}])})],1):e._e(),e._v(" "),e.detailModal.model&&!e.detailModal.model.table||e.detailModal.model&&e.detailModal.model.table&&e.detailModal.model.detail?a("pre",[e._v(e._s(e.detailModal.model.detail||e.$t("cfg.msg.empty")))]):e._e(),e._v(" "),a("div",{ref:"detailModalLoading",staticClass:"detail-loading"})],1),e._v(" "),e.refFileModal.model?a("let-modal",{attrs:{title:this.$t("operate.title.add"),width:"700px"},on:{"on-confirm":e.addRefFile,close:e.closeRefFileModal},model:{value:e.refFileModal.show,callback:function(t){e.$set(e.refFileModal,"show",t)},expression:"refFileModal.show"}},[a("let-form",{ref:"refForm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("cfg.msg.refFile"),required:""}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("pub.dlg.defaultValue"),required:""},model:{value:e.refFileModal.model.filename,callback:function(t){e.$set(e.refFileModal.model,"filename",t)},expression:"refFileModal.model.filename"}},e._l(e.refFileModal.model.fileList,function(t){return a("let-option",{key:t.id,attrs:{value:t.id}},[e._v(e._s(t.filename))])}))],1)],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("cfg.table.mangeRefFile"),width:"700px",footShow:!1},on:{close:e.closeDetailModal},model:{value:e.nodeRefFileListModal.show,callback:function(t){e.$set(e.nodeRefFileListModal,"show",t)},expression:"nodeRefFileListModal.show"}},[e.nodeRefFileListModal.model?a("wrapper",[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openNodeRefFileModal}},[e._v(e._s(e.$t("cfg.btn.addRef")))]),e._v(" "),a("let-table",{attrs:{data:e.nodeRefFileListModal.model.refFileList,title:e.$t("cfg.title.b"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.deleteRef(t.row.id,"nodeRef",t.row.config_id)}}},[e._v(e._s(e.$t("operate.delete")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showDetail(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.showHistory(t.row.config_id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1):e._e()],1),e._v(" "),a("let-modal",{attrs:{width:"700px",footShow:!1},on:{close:e.closePushResultModal},model:{value:e.pushResultModal.show,callback:function(t){e.$set(e.pushResultModal,"show",t)},expression:"pushResultModal.show"}},[e.pushResultModal.model?a("let-table",{attrs:{data:e.pushResultModal.model,title:e.$t("serverList.table.th.result"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{class:0!==t.row.ret_code?"danger":"success"},[e._v(e._s(t.row.server_name))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"result",class:0!==t.row.ret_code?"danger":"success"},[e._v(e._s(t.row.err_msg))])]}}])})],1):e._e()],1)],1)},staticRenderFns:[]};var $e=a("VU/8")(ge,be,!1,function(e){a("wgSh")},null,null).exports,we={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"page_server_server_monitor"},[t("iframe",{attrs:{src:"http://dev.log.cf.com/open-page.html#/mon/curve/module_ip_mapping:4",frameborder:"0",width:"100%",height:"1200px"}})])}]};var Me=a("VU/8")({name:"ServerPropertyMonitor"},we,!1,function(e){a("YDi2")},null,null).exports,ye=6e4,ke=60*ye,xe=24*ke;function Se(e){return null==e?new Date:e instanceof Date?e:new Date(e)}function Le(e,t){if(e=Se(e),t=t||"YYYY-MM-DD HH:mm:ss",isNaN(e.getTime()))return t;var a={"M+":e.getMonth()+1,"D+":e.getDate(),"H+":e.getHours(),"h+":e.getHours()%12==0?12:e.getHours()%12,"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};return/(Y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/(dd+)/.test(t)&&(t=t.replace(RegExp.$1,"日一二三四五六七".split("")[e.getDay()])),T()(a).forEach(function(e){if(new RegExp("("+e+")").test(t)){var o=RegExp.$1,r=""+a[e];t=t.replace(o,1===o.length?r:("00"+r).substr(r.length))}}),t}var Ce=Array.apply(null,{length:24}).map(function(e,t){return t}).map(function(e){return{val:e,txt:("0"+e).slice(-2)}}),De=[{val:-1,txt:"all"}].concat(Ce),Fe={name:"HoursFilter",props:{title:{type:String,default:""},value:Number},filters:{format:function(e){return("0"+e).slice(-2)}},data:function(){return{hours:De}},methods:{onChange:function(e){this.$emit("input",e)}}},Ne={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"hours-filter"},[a("h4",[e._v(e._s(e.title))]),e._v(" "),a("ul",e._l(e.hours,function(t){return a("li",{key:t.val,class:{active:t.val===e.value},on:{click:function(a){e.onChange(t.val)}}},[e._v(e._s(t.txt))])}))])},staticRenderFns:[]};var qe=a("VU/8")(Fe,Ne,!1,function(e){a("prId")},null,null).exports,Te=(a("miEh"),a("wQkr"),a("MqDE")),Re=a.n(Te);o.default.component(Re.a.name,Re.a);var Oe=a("Wc9H"),je=a.n(Oe),ze=a("IaZV"),Ee=a.n(ze),Pe=new je.a({id:"zoom-in",use:"zoom-in-usage",viewBox:"0 0 1024 1024",content:'<symbol class="icon" viewBox="0 0 1024 1024" id="zoom-in"><defs><style></style></defs><path d="M426.65984 42.65984q78.00832 0 149.17632 30.49472t122.49088 81.83808 81.83808 122.49088 30.49472 149.17632q0 66.99008-21.83168 128.32768t-62.1568 111.32928l242.33984 241.99168q12.32896 12.32896 12.32896 30.33088 0 18.3296-12.16512 30.49472t-30.49472 12.16512q-18.00192 0-30.33088-12.32896l-241.99168-242.33984q-49.99168 40.32512-111.32928 62.1568t-128.32768 21.83168q-78.00832 0-149.17632-30.49472t-122.49088-81.83808-81.83808-122.49088-30.49472-149.17632 30.49472-149.17632 81.83808-122.49088 122.49088-81.83808 149.17632-30.49472zM426.65984 128q-60.66176 0-115.99872 23.67488t-95.3344 63.67232-63.67232 95.3344-23.67488 115.99872 23.67488 115.99872 63.67232 95.3344 95.3344 63.67232 115.99872 23.67488 115.99872-23.67488 95.3344-63.67232 63.67232-95.3344 23.67488-115.99872-23.67488-115.99872-63.67232-95.3344-95.3344-63.67232-115.99872-23.67488zM426.65984 256q17.67424 0 30.16704 12.4928t12.4928 30.16704l0 85.34016 85.34016 0q17.67424 0 30.16704 12.4928t12.4928 30.16704-12.4928 30.16704-30.16704 12.4928l-85.34016 0 0 85.34016q0 17.67424-12.4928 30.16704t-30.16704 12.4928-30.16704-12.4928-12.4928-30.16704l0-85.34016-85.34016 0q-17.67424 0-30.16704-12.4928t-12.4928-30.16704 12.4928-30.16704 30.16704-12.4928l85.34016 0 0-85.34016q0-17.67424 12.4928-30.16704t30.16704-12.4928z" /></symbol>'}),Ie=(Ee.a.add(Pe),{props:{title:String,timeColumn:String,dataColumns:Array,data:Array},data:function(){return{enlarge:!1}},computed:{chartOptions:function(){var e={},t=[this.timeColumn];return this.dataColumns.forEach(function(a){var o=a.name,r=a.label;e[o]=r,t.push(o)}),{title:{show:!0,text:this.title},grid:{bottom:40,top:50},legend:{top:5},colors:["#f56c77","#6accab"],settings:{labelMap:e,scale:[!0,!1],lineStyle:{width:1}},data:{columns:t,rows:this.data}}},largeChartOptions:function(){var e={},t=[this.timeColumn];return this.dataColumns.forEach(function(a){var o=a.name,r=a.label;e[o]=r,t.push(o)}),{title:{show:!0,text:this.title},grid:{bottom:40,top:50},legend:{top:5},colors:["#f56c77","#6accab"],settings:{labelMap:e,scale:[!0,!1],lineStyle:{width:1}},data:{columns:t,rows:this.data},dataZoom:[{type:"inside",minValueSpan:12,zoomOnMouseWheel:"alt"},{minValueSpan:12}]}}}}),Ae={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"compare-chart"},[a("ve-line",e._b({},"ve-line",e.chartOptions,!1)),e._v(" "),a("a",{staticClass:"compare-chart-zoom-in",attrs:{href:"javascript:"},on:{click:function(t){e.enlarge=!0}}},[a("icon",{attrs:{name:"zoom-in"}})],1),e._v(" "),a("let-modal",{attrs:{width:"80%"},on:{close:function(t){e.enlarge=!1}},model:{value:e.enlarge,callback:function(t){e.enlarge=t},expression:"enlarge"}},[e.enlarge?a("ve-line",e._b({},"ve-line",e.largeChartOptions,!1)):e._e(),e._v(" "),a("div",{attrs:{slot:"foot"},slot:"foot"})],1)],1)},staticRenderFns:[]};var Je={name:"ServerPropertyMonitor",components:{HoursFilter:qe,CompareChart:a("VU/8")(Ie,Ae,!1,function(e){a("zWtZ")},null,null).exports},data:function(){var e=this.$route.params.treeid;return{query:{thedate:Le(new Date,"YYYYMMDD"),predate:Le(Date.now()-xe,"YYYYMMDD"),startshowtime:"0000",endshowtime:"2360",master_name:e.split(".").map(function(e){return e.replace(/^\d+/,"")}).join("."),master_ip:"",property_name:"",policy:"",group_by:""},formatter:"YYYYMMDD",allItems:[],hour:-1,page:1}},computed:{filteredItems:function(){var e=this.hour;return e>=0?this.allItems.filter(function(t){return+t.show_time.slice(0,2)===e}):this.allItems},itemsCount:function(){return this.filteredItems.length},pageCount:function(){return Math.ceil(this.filteredItems.length/20)},pagedItems:function(){return this.filteredItems.slice(20*(this.page-1),20*this.page)},chartOptions:function(){return{title:this.$t("monitor.table.total"),timeColumn:"show_time",dataColumns:[{name:"the_value",label:this.$t("monitor.property.property")},{name:"pre_value",label:this.$t("monitor.property.propertyC")}],data:this.allItems}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.chart.$loading.show(),a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/tarsproperty_monitor_data",this.query).then(function(o){t.hide(),a.hide(),e.allItems=o}).catch(function(o){t.hide(),a.hide(),e.$tip.error(e.$t("common.error")+": "+(o.message||o.err_msg))})},groupBy:function(e){this.query.group_by=e,this.fetchData()},search:function(){delete this.query.group_by,this.fetchData()},changePage:function(e){this.page=e}}},He={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_property_monitor"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-group",[a("let-form-item",{attrs:{label:e.$t("monitor.search.a")}},[a("let-date-picker",{attrs:{size:"small",formatter:e.formatter},model:{value:e.query.thedate,callback:function(t){e.$set(e.query,"thedate",t)},expression:"query.thedate"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("monitor.search.b")}},[a("let-date-picker",{attrs:{size:"small",formatter:e.formatter},model:{value:e.query.predate,callback:function(t){e.$set(e.query,"predate",t)},expression:"query.predate"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("monitor.search.start")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.startshowtime,callback:function(t){e.$set(e.query,"startshowtime",t)},expression:"query.startshowtime"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("monitor.search.end")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.endshowtime,callback:function(t){e.$set(e.query,"endshowtime",t)},expression:"query.endshowtime"}})],1)],1),e._v(" "),a("let-form-group",[a("tars-form-item",{attrs:{label:e.$t("monitor.search.master")},on:{onLabelClick:function(t){e.groupBy("master_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.master_name,callback:function(t){e.$set(e.query,"master_name",t)},expression:"query.master_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.search.masterIP")},on:{onLabelClick:function(t){e.groupBy("master_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.master_ip,callback:function(t){e.$set(e.query,"master_ip",t)},expression:"query.master_ip"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.select.property")},on:{onLabelClick:function(t){e.groupBy("property_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.property_name,callback:function(t){e.$set(e.query,"property_name",t)},expression:"query.property_name"}})],1),e._v(" "),a("tars-form-item",{attrs:{label:e.$t("monitor.select.strategy")},on:{onLabelClick:function(t){e.groupBy("policy")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.policy,callback:function(t){e.$set(e.query,"policy",t)},expression:"query.policy"}})],1),e._v(" "),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1)],1),e._v(" "),a("compare-chart",e._b({ref:"chart",staticClass:"chart"},"compare-chart",e.chartOptions,!1)),e._v(" "),a("hours-filter",{model:{value:e.hour,callback:function(t){e.hour=t},expression:"hour"}}),e._v(" "),a("let-table",{ref:"table",attrs:{data:e.pagedItems,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("common.time"),prop:"show_time",width:"80px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.master"),prop:"master_name",width:""}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.search.masterIP"),prop:"master_ip",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.select.property"),prop:"property_name",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.select.strategy"),prop:"policy",width:"150px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.property.property"),prop:"the_value",align:"right",width:"200px"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("monitor.property.propertyC"),prop:"pre_value",align:"right",width:"230px"}}),e._v(" "),e.pageCount?a("let-pagination",{attrs:{slot:"pagination",total:e.pageCount,page:e.page,sum:e.itemsCount,"show-sums":"",jump:""},on:{change:e.changePage},slot:"pagination"}):e._e()],1)],1)},staticRenderFns:[]};var Be=a("VU/8")(Je,He,!1,function(e){a("+NOO")},null,null).exports,Ve={name:"ServerUserManage",data:function(){return{serverData:O()({},this.$parent.getServerData()),developer:"",operator:"",hasAuth:!1}},mounted:function(){this.checkHasAuth(),this.getAuthList()},methods:{checkHasAuth:function(){var e=this;this.$ajax.getJSON("/server/api/has_auth",{application:this.serverData.application,server_name:this.serverData.server_name,role:"developer"}).then(function(t){e.hasAuth=t.has_auth||!1}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},getAuthList:function(){var e=this;this.$ajax.getJSON("/server/api/get_auth_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then(function(t){e.operator=(t.operator||[]).join(";"),e.developer=(t.developer||[]).join(";")}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},save:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/server/api/update_auth",{application:this.serverData.application,server_name:this.serverData.server_name,operator:this.operator,developer:this.developer}).then(function(a){t.hide(),e.$tip.success(""+e.$t("common.error"))}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}}},Ue={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-form",{attrs:{inline:"",itemWidth:"600px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form-item",{attrs:{label:e.$t("user.op")}},[a("let-input",{attrs:{type:"textarea",disabled:!e.hasAuth},model:{value:e.operator,callback:function(t){e.operator=t},expression:"operator"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("user.dev")}},[a("let-input",{attrs:{type:"textarea",disabled:!e.hasAuth},model:{value:e.developer,callback:function(t){e.developer=t},expression:"developer"}})],1),e._v(" "),a("let-form-item",[e.hasAuth?a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))]):e._e()],1)],1)],1)},staticRenderFns:[]};var We=a("VU/8")(Ve,Ue,!1,function(e){a("43/T")},null,null).exports,Ge={name:"InterfaceDebuger",components:{wrapper:_e},data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},tarsFileList:[],uploadModal:{show:!1,model:{}},showDebug:!1,contextData:[],debuger_panel:!1,inParam:"",outParam:"",selectedFileName:"",selectedMethods:[],objName:"",selectedId:""}},methods:{getFileList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/get_file_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then(function(a){t.hide(),e.tarsFileList=a}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})},openTarsUploadFileModal:function(){this.uploadModal.show=!0,this.uploadModal.model={application:this.serverData.application,server_name:this.serverData.server_name,set_name:this.serverData.set_name,file:null}},uploadFile:function(e){this.uploadModal.model.file=e},uploadTarsFile: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("server_name",this.uploadModal.model.server_name),a.append("set_name",this.uploadModal.model.set_name),a.append("suse",this.uploadModal.model.file),this.$ajax.postForm("/server/api/upload_tars_file",a).then(function(){t.hide(),e.getFileList(),e.uploadModal.show=!1,e.uploadModal.model=null}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}},closeUploadModal:function(){this.uploadModal.show=!1},showDebuger:function(e){this.showDebug=!0,this.selectedFileName=e.file_name,this.inParam=null,this.outParam=null,this.selectedId=e.f_id,this.objName=null,this.getContextData(e.f_id)},getContextData:function(e){var t=this;this.$ajax.getJSON("/server/api/get_contexts",{id:e,application:this.serverData.application,server_name:this.serverData.server_name,type:"all"}).then(function(e){t.contextData=e}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})},getParams:function(e){var t=this;if(this.selectedMethods=e,3==e.length){var a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_params",{application:this.serverData.application,server_name:this.serverData.server_name,id:this.selectedId,module_name:e[0],interface_name:e[1],function_name:e[2]}).then(function(e){a.hide();var o={};e.forEach(function(e){e.out||("string"===e.type?o[e.name]="":"array"===e.type?o[e.name]=[]:o[e.name]="")}),t.inParam=x()(o)}).catch(function(e){a.hide(),t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})}},doDebug:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/server/api/interface_test",{id:this.selectedId,application:this.serverData.application,server_name:this.serverData.server_name,file_name:this.selectedFileName,module_name:this.selectedMethods[0],interface_name:this.selectedMethods[1],function_name:this.selectedMethods[2],params:this.inParam,objName:this.objName}).then(function(a){t.hide(),e.outParam=a}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getFileList()}},Ze={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_debuger"},[e.showDebug?e._e():a("wrapper",{ref:"tarsFileListLoading"},[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.openTarsUploadFileModal}},[e._v(e._s(e.$t("operate.add")))]),e._v(" "),a("let-table",{attrs:{data:e.tarsFileList,title:e.$t("inf.title.listTitle"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.app"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"file_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"260px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.showDebuger(t.row)}}},[e._v(e._s(e.$t("inf.list.debug")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.changeConfig(t.row,"configList")}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.deleteConfig(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1),e._v(" "),e.showDebug?a("div",[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"530px"}},[a("let-form-item",{attrs:{label:e.$t("inf.dlg.selectLabel")}},[a("let-cascader",{attrs:{data:e.contextData,required:"",size:"small"},on:{change:e.getParams}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.servant.objName")}},[a("let-input",{attrs:{required:""},model:{value:e.objName,callback:function(t){e.objName=t},expression:"objName"}})],1),e._v(" "),a("let-form-item",[a("let-button",{attrs:{theme:"primary"},on:{click:e.doDebug}},[e._v(e._s(e.$t("inf.list.debug")))])],1)],1),e._v(" "),a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{span:12,itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:20,placeholder:"请输入方法入参"},model:{value:e.inParam,callback:function(t){e.inParam=t},expression:"inParam"}})],1)],1),e._v(" "),a("let-col",{attrs:{span:12}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area",attrs:{type:"textarea",rows:20,placeholder:"方法出参"},model:{value:e.outParam,callback:function(t){e.outParam=t},expression:"outParam"}})],1)],1)],1)]),e._v(" "),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showDebug=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1):e._e(),e._v(" "),a("let-modal",{attrs:{title:e.$t("inf.title.dlgTitle"),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?a("let-form",{ref:"uploadForm",attrs:{itemWidth:"100%"},nativeOn:{submit:function(t){return t.preventDefault(),e.uploadTarsFile(t)}}},[a("let-form-item",{attrs:{itemWidth:"400px"}},[a("let-uploader",{attrs:{placeholder:e.$t("pub.dlg.defaultValue"),require:""},on:{upload:e.uploadFile}},[e._v("\n "+e._s(e.$t("common.submit")))]),e._v(" "),e.uploadModal.model.file?a("span",[e._v(e._s(e.uploadModal.model.file.name))]):e._e()],1),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1)],1)},staticRenderFns:[]};var Qe=a("VU/8")(Ge,Ze,!1,function(e){a("ChhS")},null,null).exports,Ye={name:"CallChain",components:{wrapper:_e},data:function(){return{traceId:"",start_time:"",end_time:"",traceidList:[],showDuration:null,selectedTraceId:null,traceDetailList:null,colorArr:["#33cc59","#fa5a4b","#ffaa33","#9a41d9","#d99cee","#71d2e7","#e7d271"]}},methods:{getTracesList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/get_trace_list",{id:this.traceId,start_time:this.start_time,end_time:this.end_time}).then(function(a){t.hide(),e.traceidList=a}).catch(function(a){t.hide(),e.$tip.error("系统错误: "+(a.message||a.err_msg))})},showDetail:function(e){var t=this;this.selectedTraceId=e;var a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_trace_detail",{id:e}).then(function(e){t.showDuration=!0,a.hide();var o=0,r=1;e.forEach(function(e){1==e.layer&&(o=e.timestamp,e.marginLeft=0,e.duration>300&&(r=(300/e.duration).toFixed(2))),e.scale=Number(r),e.marginLeft=(e.timestamp-o)*e.scale,e.color=t.colorArr[e.layer-1]}),t.traceDetailList=e}).catch(function(e){a.hide(),t.$tip.error("系统错误: "+(e.message||e.err_msg))})}},mounted:function(){this.getTracesList()}},Xe={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_call_chain"},[e.showDuration?e._e():a("div",[a("let-row",[a("let-col",{staticClass:"grid-content bg-blue",attrs:{span:"8"}},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.traceId,expression:"traceId"}],staticClass:"custom_input",attrs:{placeholder:"输入TraceID"},domProps:{value:e.traceId},on:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.getTracesList(t):null},input:function(t){t.target.composing||(e.traceId=t.target.value)}}})]),e._v(" "),a("let-col",{staticClass:"grid-content bg-blue-little",attrs:{span:"7",offset:"9"}},[a("let-date-range-picker",{attrs:{start:e.start_time,end:e.end_time},on:{"update:start":function(t){e.start_time=t},"update:end":function(t){e.end_time=t}}}),e._v(" "),a("let-button",{attrs:{theme:"primary"},on:{click:e.getTracesList}},[e._v("查询")])],1)],1),e._v(" "),a("div",{staticClass:"mt10"},[a("let-table",{attrs:{data:e.traceidList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"业务名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.showDetail(t.row.trace_id)}}},[e._v(e._s(t.row.trace_id))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:"产生时间",sortable:!0,prop:"timestamp"}}),e._v(" "),a("let-table-column",{attrs:{title:"耗时(ms)",sortable:!0,prop:"duration"}})],1)],1)],1),e._v(" "),e.showDuration?a("div",[a("h3",[a("a",{staticClass:"link",attrs:{href:"javascript:;"},on:{click:function(t){e.showDuration=!1}}},[e._v("调用链查询")]),e._v(" / "+e._s(e.selectedTraceId))]),e._v(" "),a("let-table",{attrs:{stripe:"",data:e.traceDetailList,title:"服务配置","empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"应用名"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{style:"margin-left:"+30*(t.row.layer-1)+"px"},[e._v(e._s(t.row.server_endpoint_service_name))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:"IP",prop:"server_endpoint_ipv4"}}),e._v(" "),a("let-table-column",{attrs:{title:"类型",prop:"type"}}),e._v(" "),a("let-table-column",{attrs:{title:"状态",prop:"status"},scopedSlots:e._u([{key:"default",fn:function(t){return[1==t.row.status?a("span",[e._v("OK")]):a("span",[e._v("ERROR")])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:"服务/方法",prop:"name"}}),e._v(" "),a("let-table-column",{attrs:{title:"耗时"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"duration",style:"width:"+t.row.duration*t.row.scale+"px;margin-left:"+t.row.marginLeft+"px;background-color:"+t.row.color}),e._v(e._s(t.row.duration)+"ms\n ")]}}])})],1)],1):e._e()])},staticRenderFns:[]};var Ke=a("VU/8")(Ye,Xe,!1,function(e){a("k/gA")},null,null).exports,et={name:"CallChainAnalyze",data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},serviceName:"",start_time:"",end_time:"",chainShapesList:[]}},methods:{showTopo:function(){var e=this,t=document.querySelector("#topo");if(this.$refs.topoForm.validate()){var a=this.$Loading.show();this.$ajax.getJSON("/server/api/get_topo",{serviceName:this.serviceName,start:this.start_time,end:this.end_time}).then(function(o){if(a.hide(),o.dependencyGraph.vertexs.value.length||o.dependencyGraph.links.value.length){var r={nodes:new vis.DataSet(o.dependencyGraph.vertexs.value),edges:new vis.DataSet(o.dependencyGraph.links.value)};new vis.Network(t,r,{physics:{enabled:!1},layout:{hierarchical:{enabled:!0,direction:"LR",levelSeparation:300}},nodes:{shape:"box",color:{border:"#cccccc",background:"#ffffff"},margin:{top:13,bottom:13,left:27,right:27}},edges:{arrows:{to:{enabled:!0,scaleFactor:.5,type:"arrow"}},smooth:{enabled:!0,type:"vertical"}}});e.chainShapesList=o.chainShapes.chainShapes.value}else t.innerHTML='<div class="emptyMsg">没有数据</div>'}).catch(function(t){a.hide(),e.$tip.error(t.message||t.err_msg)})}},setDate:function(){var e=(new Date).getDate(),t=(new Date).setDate(e-1);this.start_time=this.dateToStr(new Date(t),"yyyy-mm-dd"),this.end_time=this.dateToStr(new Date,"yyyy-mm-dd")},dateToStr:function(e,t){if(e&&"Invalid Date"!=e)return t.replace(/yyyy/gi,e.getFullYear().toString()).replace(/MM/i,a(e.getMonth()+1)).replace(/dd/gi,a(e.getDate())).replace(/hh/gi,a(e.getHours())).replace(/mm/gi,a(e.getMinutes())).replace(/ss/gi,a(e.getSeconds()));function a(e){return(e<10?"0"+e:e).toString()}}},created:function(){this.serverData=this.$parent.getServerData();var e=this.$route.params.treeid.split(".").map(function(e){return e.substr(1)});this.serviceName=e.join("."),this.setDate()},mounted:function(){this.showTopo()}},tt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"call-chain-analyze"},[a("let-form",{ref:"topoForm",attrs:{inline:""}},[a("let-form-item",{attrs:{size:3}},[a("input",{directives:[{name:"model",rawName:"v-model",value:e.serviceName,expression:"serviceName"}],staticClass:"custom_input",attrs:{placeholder:"输入服务名"},domProps:{value:e.serviceName},on:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.showTopo(t):null},input:function(t){t.target.composing||(e.serviceName=t.target.value)}}})]),e._v(" "),a("let-form-item",{attrs:{size:3}},[a("let-date-range-picker",{attrs:{required:"",start:e.start_time,end:e.end_time},on:{"update:start":function(t){e.start_time=t},"update:end":function(t){e.end_time=t}}}),e._v(" "),a("let-button",{attrs:{theme:"primary"},on:{click:e.showTopo}},[e._v("查询")])],1)],1),e._v(" "),a("div",{staticClass:"topo_graph",attrs:{id:"topo"}}),e._v(" "),a("div",{staticClass:"let-table let-table_stripe"},[e.chainShapesList.length?a("table",[e._m(0),e._v(" "),e._l(e.chainShapesList,function(t){return a("tbody",e._l(t.value,function(t){return a("tr",[a("td",[e._v(e._s(t.serviceName))]),e._v(" "),a("td",[e._v(e._s(t.method))]),e._v(" "),a("td",[e._v(e._s(t.QPS))]),e._v(" "),a("td",[e._v(e._s(t.peakQPS))]),e._v(" "),a("td",[e._v(e._s(t.callPercent))]),e._v(" "),a("td",[e._v(e._s(t.avgCost))]),e._v(" "),a("td",[e._v(e._s(t.failRate))])])}))})],2):a("table",[e._m(1),e._v(" "),e._m(2)])])],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("thead",[t("tr",[t("th",[this._v("应用名")]),t("th",[this._v("服务/方法")]),t("th",[this._v("QPS")]),t("th",[this._v("QPS峰值")]),t("th",[this._v("调用占比")]),t("th",[this._v("平均耗时")]),t("th",[this._v("失败率")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("thead",[t("tr",[t("th",[this._v("应用名")]),t("th",[this._v("服务/方法")]),t("th",[this._v("QPS")]),t("th",[this._v("QPS峰值")]),t("th",[this._v("调用占比")]),t("th",[this._v("平均耗时")]),t("th",[this._v("失败率")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("tbody",[t("tr",[t("td",{attrs:{colspan:"7"}},[this._v("没有数据")])])])}]};var at=a("VU/8")(et,tt,!1,function(e){a("wiLf")},null,null).exports,ot={name:"pageTask",data:function(){return{dragingEls:"",dragData:{},itemId:0,initData:{timer:{id:0,name:"定时器名",type:"timer",x:0,y:0},task:{id:0,name:"任务名",type:"task",x:0,y:0}}}},methods:{dragstartHandler:function(e){e.dataTransfer.effectAllowed="copy",e.dataTransfer.setData("text/plain",x()(this.initData[e.target.dataset.type]))},dragoverHandler:function(e){e.preventDefault()},dropHandler:function(e){e.preventDefault(),e.stopPropagation();var t=document.querySelector(".stage"),a=t.getBoundingClientRect(),o=JSON.parse(e.dataTransfer.getData("text/plain"));"copy"==e.dataTransfer.effectAllowed?(o.x=e.clientX-a.x,o.y=e.clientY-a.y,o.id="item_"+ ++this.itemId,this.dragData[o.id]=o,t.innerHTML+=this.createTaskItem(o)):(this.dragData[o.id].x=e.clientX-a.x,this.dragData[o.id].y=e.clientY-a.y,t.querySelector("div#"+o.id).setAttribute("style","left:"+(e.clientX-a.x-40)+"px;top:"+(e.clientY-a.y-20)+"px"))},createTaskItem:function(e){return'<div class="drag_item" id="'+e.id+'" style="left:'+(e.x-40)+"px;top:"+(e.y-20)+'px" draggable="true">\n <span class="'+e.type+'"></span><p>'+e.name+"</p></div>"},moveStartHandler:function(e){e.dataTransfer.setData("text/plain",x()(this.dragData[e.target.id]))}},mounted:function(){}},rt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_task"},[a("div",{staticClass:"task_container"},[a("div",{staticClass:"toolbar"},[a("h3",[e._v("控制元件")]),e._v(" "),a("ul",[a("li",{staticClass:"interval",attrs:{title:"拖动元件到右侧舞台使用"}},[a("span",{attrs:{id:"item-interval","data-type":"timer",draggable:"true"},on:{dragstart:e.dragstartHandler}}),e._v(" "),a("p",[e._v("定时器")])]),e._v(" "),a("li",{staticClass:"task",attrs:{title:"拖动元件到右侧舞台使用"}},[a("span",{attrs:{id:"item-task","data-type":"task",draggable:"true"},on:{dragstart:e.dragstartHandler}}),e._v(" "),a("p",[e._v("任务")])])])]),e._v(" "),a("div",{staticClass:"draw_panel"},[a("div",{staticClass:"stage",on:{dragover:e.dragoverHandler,drop:e.dropHandler,dragstart:e.moveStartHandler}}),e._v(" "),a("div",{staticClass:"panel"},[e._v("dgg")])])])])},staticRenderFns:[]};var st=a("VU/8")(ot,rt,!1,function(e){a("kLbs")},null,null).exports,it="/operation/deploy",lt={name:"Oparetion",beforeRouteEnter:function(e,t,a){"/operation"===e.path?a(it):a()},beforeRouteLeave:function(e,t,a){it=t.path,a()},methods:{onTabClick:function(e){this.$router.replace(e)}}},nt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation"},[a("let-tabs",{attrs:{activekey:e.$route.path},on:{click:e.onTabClick}},[a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.deploy"),tabkey:"/operation/deploy"}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.expand"),tabkey:"/operation/expand"}}),e._v(" "),a("let-tab-pane",{attrs:{tab:e.$t("deployService.title.template"),tabkey:"/operation/templates"}})],1),e._v(" "),a("router-view",{staticClass:"page_operation_children"})],1)},staticRenderFns:[]};var dt=a("VU/8")(lt,nt,!1,function(e){a("lHrX")},null,null).exports,ct={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:"+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())})}}},mt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"set_inputer"},[a("div",{staticClass:"set_inputer_item"},[a("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),e._v(" "),a("div",{staticClass:"set_inputer_item"},[a("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),e._v(" "),a("div",{staticClass:"set_inputer_item"},[a("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),e._v(" "),a("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)},staticRenderFns:[]};var ut=a("VU/8")(ct,mt,!1,function(e){a("SbLv")},null,null).exports,pt=["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars"],ht=function(){return{application:"",server_name:"",server_type:pt[0],template_name:"",node_name:"0.0.0.0",enable_set:!1,set_name:"",set_area:"",set_group:"",operator:"",developer:"",adapters:[{obj_name:"",bind_ip:"0.0.0.0",port:"",port_type:"tcp",protocol:"tars",thread_num:5,max_connections:2e5,queuecap:1e4,queuetimeout:6e4}],primaryBusiness:"",secondaryBusiness:"",thirdlyBusiness:""}},ft={name:"OperationDeploy",components:{SetInputer:ut},data:function(){return{types:pt,templates:[],model:ht(),enableAuth:!1,resultModal:{show:!1,resultList:[],rowClassName:function(e){return e&&e.row&&!e.row.rst?"err-row":""}},primaryBusiness:[],secondaryBusiness:[],thirdlyBusiness:[]}},mounted:function(){var e=this;this.$ajax.getJSON("/server/api/is_enable_auth").then(function(t){e.enableAuth=t.enableAuth||!1}).catch(function(e){}),this.$ajax.getJSON("/server/api/template_name_list").then(function(t){e.templates=t,e.model.template_name=t[0]}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))}),this.$ajax.getJSON("/server/api/query_service").then(function(t){e.primaryBusiness=t}).catch(function(t){e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})},methods:{choosePrimaryBusiness:function(e){var t=this;if(this.secondaryBusiness=[],this.thirdlyBusiness=[],this.model.secondaryBusiness="",this.model.thirdlyBusiness="",void 0===e||""===e)return!1;this.$ajax.getJSON("/server/api/query_system",{ServiceId:e}).then(function(e){t.secondaryBusiness=e}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})},chooseSecondaryBusiness:function(e){var t=this;if(this.thirdlyBusiness=[],this.model.thirdlyBusiness="",void 0===e||""===e)return!1;this.$ajax.getJSON("/server/api/query_module",{SystemId:e}).then(function(e){t.thirdlyBusiness=e}).catch(function(e){t.$tip.error(t.$t("common.error")+": "+(e.message||e.err_msg))})},chooseThirdlyBusiness:function(e){if(void 0===e||""===e)return!1;var t=this.thirdlyBusiness.find(function(t){return t.SubSystemId===e}).SystemEngName;this.model.application=t},addAdapter:function(e){this.model.adapters.push(O()({},e))},deploy:function(){var e=this;this.$confirm(this.$t("deployService.form.deployServiceTip"),this.$t("common.alert")).then(function(){var t=e.$Loading.show();e.$ajax.postJSON("/server/api/deploy_server",e.model).then(function(a){t.hide(),a.tars_node_rst&&a.tars_node_rst.length?e.showResultModal(a.tars_node_rst):e.$tip.success(e.$t("deployService.form.ret.success")),e.model=ht(),e.$refs.form.resetValid(),e.model.template_name=e.templates[0]}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})})},getAutoPort:function(){var e=this,t=this.$Loading.show(),a=this.model.adapters,o=[];a.forEach(function(e){o.push(e.bind_ip)}),this.$ajax.getJSON("/server/api/auto_port",{node_name:o.join(";")}).then(function(o){t.hide(),o.forEach(function(t,o){e.$set(a[o],"port",String(t.port||""))})}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})},save:function(){var e=this;if(this.$refs.form.validate()){var t=this.model,a=this.$Loading.show();this.$ajax.getJSON("/server/api/server_exist",{application:t.application,server_name:t.server_name,node_name:t.server_name}).then(function(t){a.hide(),t?e.$tip.error(e.$t("deployService.form.nameTips")):e.deploy()}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},showResultModal:function(e){this.resultModal.resultList=e,this.resultModal.show=!0},closeResultModal:function(){this.resultModal.show=!1,this.resultModal.resultList=[]}}},vt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_deploy"},[a("let-form",{ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.primaryBusiness"),required:""}},[a("let-select",{attrs:{size:"small",required:""},on:{change:e.choosePrimaryBusiness},model:{value:e.model.primaryBusiness,callback:function(t){e.$set(e.model,"primaryBusiness",t)},expression:"model.primaryBusiness"}},e._l(e.primaryBusiness,function(t){return a("let-option",{key:t.ServiceId,attrs:{value:t.ServiceId}},[e._v(e._s(t.ServiceName))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.secondaryBusiness"),required:""}},[a("let-select",{attrs:{size:"small",required:""},on:{change:e.chooseSecondaryBusiness},model:{value:e.model.secondaryBusiness,callback:function(t){e.$set(e.model,"secondaryBusiness",t)},expression:"model.secondaryBusiness"}},e._l(e.secondaryBusiness,function(t){return a("let-option",{key:t.SystemId,attrs:{value:t.SystemId}},[e._v(e._s(t.SystemName))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.thirdlyBusiness"),required:""}},[a("let-select",{attrs:{size:"small",required:""},on:{change:e.chooseThirdlyBusiness},model:{value:e.model.thirdlyBusiness,callback:function(t){e.$set(e.model,"thirdlyBusiness",t)},expression:"model.thirdlyBusiness"}},e._l(e.thirdlyBusiness,function(t){return a("let-option",{key:t.SubSystemId,attrs:{value:t.SubSystemId}},[e._v(e._s(t.SubSystemName))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),required:""}},[a("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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceType"),required:""}},[a("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(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[a("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(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableAuth,expression:"enableAuth"}],attrs:{label:e.$t("user.op")}},[a("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),e._v(" "),a("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableAuth,expression:"enableAuth"}],attrs:{label:e.$t("user.dev")}},[a("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._v(" "),a("let-table",{attrs:{data:e.model.adapters}},[a("let-table-column",{attrs:{title:"OBJ"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("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:t.row.obj_name,callback:function(a){e.$set(t.row,"obj_name",a)},expression:"props.row.obj_name"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"100px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("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:t.row.port,callback:function(a){e.$set(t.row,"port",a)},expression:"props.row.port"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.form.portType"),width:"150px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:"tcp"},model:{value:t.row.port_type,callback:function(a){e.$set(t.row,"port_type",a)},expression:"props.row.port_type"}},[e._v("TCP")]),e._v(" "),a("let-radio",{attrs:{label:"udp"},model:{value:t.row.port_type,callback:function(a){e.$set(t.row,"port_type",a)},expression:"props.row.port_type"}},[e._v("UDP")])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.protocol"),width:"180px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-radio",{attrs:{label:"tars"},model:{value:t.row.protocol,callback:function(a){e.$set(t.row,"protocol",a)},expression:"props.row.protocol"}},[e._v("TARS")]),e._v(" "),a("let-radio",{attrs:{label:"not_tars"},model:{value:t.row.protocol,callback:function(a){e.$set(t.row,"protocol",a)},expression:"props.row.protocol"}},[e._v(e._s(e.$t("serverList.servant.notTARS")))])]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"80px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.thread_num,callback:function(a){e.$set(t.row,"thread_num",a)},expression:"props.row.thread_num"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxConnecttions"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.max_connections,callback:function(a){e.$set(t.row,"max_connections",a)},expression:"props.row.max_connections"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.maxQueue"),width:"140px"},scopedSlots:e._u([{key:"head",fn:function(t){return[a("span",{staticClass:"required"},[e._v(e._s(t.column.title))])]}},{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0,required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.queuecap,callback:function(a){e.$set(t.row,"queuecap",a)},expression:"props.row.queuecap"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"140px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{size:"small",type:"number",min:0},model:{value:t.row.queuetimeout,callback:function(a){e.$set(t.row,"queuetimeout",a)},expression:"props.row.queuetimeout"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"120px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.addAdapter(t.row)}}},[e._v(e._s(e.$t("operate.add")))]),e._v(" "),t.$index?a("let-table-operation",{staticClass:"danger",on:{click:function(a){e.model.adapters.splice(t.$index,1)}}},[e._v(e._s(e.$t("operate.delete"))+"\n ")]):e._e()]}}])})],1),e._v(" "),a("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+"\n ")]),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1),e._v(" "),a("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"}},[a("p",{staticClass:"result-text"},[e._v(e._s(e.$t("deployService.form.ret.success"))+e._s(e.$t("resource.installRstMsg")))]),e._v(" "),a("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[a("let-table-column",{attrs:{title:"ip",prop:"ip"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",{domProps:{textContent:e._s(t.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1)],1)},staticRenderFns:[]};var _t=a("VU/8")(ft,vt,!1,function(e){a("gMiN")},null,null).exports,gt={name:"OperationExpand",components:{SetInputer:ut},data:function(){return{model:{application:"",server_name:"",set:"",node_name:"",expand_nodes:[],enable_set:!1,set_name:"",set_area:"",set_group:"",copy_node_config:!1},applications:[],serverNames:[],sets:[],nodeNames:[],expandIpStr:"",previewItems:[],ipReg:"^((\\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])$",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})}}},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(a+": "+(e.message||e.err_msg))})},previewExpand:function(){var e=this;if(this.$refs.configForm.validate()){var t=O()({},this.model);t.set=-1===parseInt(t.set,10)?"":t.set,t.expand_nodes=this.expandIpStr.trim().split(/[,;\n]/);var a=this.$Loading.show();this.$ajax.postJSON("/server/api/expand_server_preview",t).then(function(t){a.hide();var o=t||[];o.forEach(function(e){e.isChecked=!1}),e.isCheckedAll=!1,e.previewItems=o}).catch(function(t){a.hide(),e.$tip.error(e.$t("common.error")+": "+(t.message||t.err_msg))})}},getAutoPort:function(){var e=this,t=this.$Loading.show(),a=this.previewItems.filter(function(t){return t.status===e.$t("serviceExpand.form.noExpand")&&t.isChecked}),o=[];a.forEach(function(e){o.push(e.bind_ip)}),this.$ajax.getJSON("/server/api/auto_port",{node_name:o.join(";")}).then(function(o){t.hide(),o.forEach(function(t,o){e.$set(a[o],"port",String(t.port||""))})}).catch(function(a){t.hide(),e.$tip.error(e.$t("common.error")+": "+(a.message||a.err_msg))})},expand:function(){var e=this;if(this.$refs.expandForm.validate()){var t=this.previewItems.filter(function(t){return t.status===e.$t("serviceExpand.form.noExpand")&&t.isChecked});if(t.length>0){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},r=this.$Loading.show();this.$ajax.postJSON("/server/api/expand_server",o).then(function(t){r.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){r.hide(),e.$tip.error(e.$t("common.error")+": "+(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})}}},bt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_expand"},[a("let-form",{ref:"configForm",attrs:{inline:"","label-position":"top",itemWidth:"480px"},nativeOn:{submit:function(t){return t.preventDefault(),e.previewExpand(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){e.changeSelect("application")}},model:{value:e.model.application,callback:function(t){e.$set(e.model,"application",t)},expression:"model.application"}},e._l(e.applications,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v("\n "+e._s(t)+"\n ")])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.service"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){e.changeSelect("server_name")}},model:{value:e.model.server_name,callback:function(t){e.$set(e.model,"server_name",t)},expression:"model.server_name"}},e._l(e.serverNames,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:"Set",itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},on:{change:function(t){e.changeSelect("set")}},model:{value:e.model.set,callback:function(t){e.$set(e.model,"set",t)},expression:"model.set"}},e._l(e.sets,function(t){return a("let-option",{key:t,attrs:{value:t||-1}},[e._v("\n "+e._s(t||e.$t("serviceExpand.form.disableSet"))+"\n ")])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.ip"),itemWidth:"240px",required:""}},[a("let-select",{attrs:{size:"small",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.model.node_name,callback:function(t){e.$set(e.model,"node_name",t)},expression:"model.node_name"}},e._l(e.nodeNames,function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])}))],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serviceExpand.form.tarIP"),itemWidth:"100%",required:""}},[a("let-input",{attrs:{type:"textarea",rows:3,placeholder:e.$t("serviceExpand.form.placeholder"),required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:e.expandIpStr,callback:function(t){e.expandIpStr=t},expression:"expandIpStr"}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serverList.table.th.enableSet")}},[a("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){e.$set(e.model,"enable_set",t)},"update:name":function(t){e.$set(e.model,"set_name",t)},"update:area":function(t){e.$set(e.model,"set_area",t)},"update:group":function(t){e.$set(e.model,"set_group",t)}}})],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("serviceExpand.form.nodeConfig"),itemWidth:"100%"}},[a("let-checkbox",{model:{value:e.model.copy_node_config,callback:function(t){e.$set(e.model,"copy_node_config",t)},expression:"model.copy_node_config"}},[e._v("\n "+e._s(e.$t("serviceExpand.form.copyNodeConfig"))+"\n ")])],1),e._v(" "),a("let-button",{attrs:{type:"sumbit",theme:"primary"}},[e._v(e._s(e.$t("serviceExpand.form.preExpand")))])],1),e._v(" "),a("let-form",{directives:[{name:"show",rawName:"v-show",value:e.previewItems.length>0,expression:"previewItems.length > 0"}],ref:"expandForm",staticClass:"mt40",attrs:{inline:""},nativeOn:{submit:function(t){return t.preventDefault(),e.expand(t)}}},[a("let-table",{ref:"table",attrs:{data:e.previewItems,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{scopedSlots:e._u([{key:"head",fn:function(t){return[a("let-checkbox",{model:{value:e.isCheckedAll,callback:function(t){e.isCheckedAll=t},expression:"isCheckedAll"}})]}},{key:"default",fn:function(t){return[t.row.status==e.$t("serviceExpand.form.noExpand")?a("let-checkbox",{model:{value:t.row.isChecked,callback:function(a){e.$set(t.row,"isChecked",a)},expression:"scope.row.isChecked"}}):e._e()]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c2"),prop:"application"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c3"),prop:"server_name"}}),e._v(" "),a("let-table-column",{attrs:{title:"Set",prop:"set"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("serverList.servant.objName"),prop:"obj_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c4"),prop:"node_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{attrs:{pattern:t.row.isChecked?e.ipReg:null,"pattern-tip":e.$t("serviceExpand.form.preExpand")},model:{value:t.row.bind_ip,callback:function(a){e.$set(t.row,"bind_ip",a)},expression:"scope.row.bind_ip"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{model:{value:t.row.port,callback:function(a){e.$set(t.row,"port",a)},expression:"scope.row.port"}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("historyList.dlg.th.c8"),prop:"status"}})],1),e._v(" "),a("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort")))]),e._v(" "),a("let-button",{attrs:{type:"sumbit",theme:"primary"}},[e._v(e._s(e.$t("deployService.title.expand")))])],1),e._v(" "),a("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"}},[a("p",{staticClass:"result-text"},[e._v(e._s(e.$t("serviceExpand.form.errTips.success"))+e._s(e.$t("resource.installRstMsg")))]),e._v(" "),a("let-table",{attrs:{data:e.resultModal.resultList,"empty-msg":e.$t("common.nodata"),"row-class-name":e.resultModal.rowClassName}},[a("let-table-column",{attrs:{title:"ip",prop:"ip"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("resource.installResult"),prop:"rst"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("p",{domProps:{textContent:e._s(t.row.rst?e.$t("common.success"):e.$t("common.error"))}})]}}])}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("common.message"),prop:"msg"}})],1)],1)],1)},staticRenderFns:[]};var $t=a("VU/8")(gt,bt,!1,function(e){a("M1ar")},null,null).exports,wt={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("let-button",{staticStyle:{float:"right"},attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("template.btn.addTempate")))]),e._v(" "),a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.template")}},[a("let-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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate")}},[a("let-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),e._v(" "),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),e._v(" "),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("deployService.form.template"),prop:"template_name",width:"25%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("template.search.parentTemplate"),prop:"parents_name",width:"25%"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),e._v(" "),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){e.viewItem(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),e._v(" "),a("let-table-operation",{on:{click:function(a){e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),e._v(" "),a("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?a("pre",[e._v(e._s(e.viewModal.model.profile))]):e._e(),e._v(" "),a("div",{attrs:{slot:"foot"},slot:"foot"})]),e._v(" "),a("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?a("let-form",{ref:"detailForm",attrs:{itemWidth:"700px"}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.template"),required:""}},[a("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),e._v(" "),a("let-form-item",{attrs:{label:e.$t("template.search.parentTemplate"),required:""}},[a("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"}},[a("let-option",{attrs:{value:""}},[e._v(e._s(e.$t("pub.dlg.defaultValue")))]),e._v(" "),e._l(e.items,function(t){return a("let-option",{key:t.id,attrs:{value:t.template_name}},[e._v(e._s(t.template_name))])})],2)],1),e._v(" "),a("let-form-item",{attrs:{label:e.$t("template.form.content"),required:""}},[a("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)},staticRenderFns:[]};var Mt=a("VU/8")({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(e.$t("common.error")+": "+(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},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(e.$t("common.error")+": "+(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(t.$t("common.error")+": "+(e.message||e.err_msg))})}).catch(function(){})}}},wt,!1,function(e){a("pcBg")},null,null).exports;o.default.use(ie.a);var yt=new ie.a({routes:[{path:"/server",name:"Server",component:de,children:[{path:":treeid/manage",component:ue},{path:":treeid/publish",component:fe},{path:":treeid/config",component:$e},{path:":treeid/server-monitor",component:Me},{path:":treeid/property-monitor",component:Be},{path:":treeid/interface-debuger",component:Qe},{path:":treeid/call-chain",component:Ke},{path:":treeid/call-chain-analyze",component:at},{path:":treeid/task",component:st},{path:":treeid/user-manage",component:We}]},{path:"/operation",name:"Operation",component:dt,redirect:"/operation/deploy",children:[{path:"deploy",component:_t},{path:"expand",component:$t},{path:"templates",component:Mt}]},{path:"*",redirect:"/server"}],scrollBehavior:function(e,t,a){return{x:0,y:0}}}),kt=a("TXmL");o.default.use(kt.a),o.default.use(m.a);var xt=new kt.a({}),St=[];o.default.config.productionTip=!1,function(){return new L.a(function(e,t){oe.getJSON("/server/api/get_locale").then(function(t){var a=m.a.get("locale");if("[object Object]"==Object.prototype.toString.call(t)){for(var o in t)xt.setLocaleMessage(o,t[o]),St.push({localeCode:o,localeName:t[o].localeName,localeMessages:t});a=t[a]?a:"cn",St=t}xt.locale=a,e()}).catch(function(e){t(e)})})}.call(this).then(function(){new o.default({i18n:xt,el:"#app",router:yt,components:{App:se},template:"<App/>"})})},Nu8y:function(e,t){},SbLv:function(e,t){},XSxf:function(e,t){},YDi2:function(e,t){},cxxn:function(e,t){},dxeK:function(e,t){},flEL:function(e,t){},gMiN:function(e,t){},hqtp:function(e,t){},"k/gA":function(e,t){},kLbs:function(e,t){},lHrX:function(e,t){},pcBg:function(e,t){},prId:function(e,t){},s2Rr:function(e,t){},wgSh:function(e,t){},wiLf:function(e,t){},zWtZ:function(e,t){}},["NHnr"]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -349,8 +349,8 @@
chooseThirdlyBusiness (SubSystemId) {
if (SubSystemId === undefined || SubSystemId === "") return false;
let item = this.thirdlyBusiness.find(business => business.SubSystemId === SubSystemId);
let {SystemEngName} = item;
this.model.application = SystemEngName
let {SubSystemEngName} = item;
this.model.application = SubSystemEngName
},
addAdapter(template) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment