text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-common"],{"00b0":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-select",{ref:"localSelect",attrs:{clearable:!1,size:"small"},on:{change:e.changeLocale},model:{value:e.locale,callback:function(t){e.locale=t},expression:"locale"}},[e._l(e.localeMessages,(function(t){return[a("let-option",{key:t.localeCode,attrs:{value:t.localeCode}},[e._v(e._s(t.localeName))])]}))],2)],1)},s=[],i=a("f51c"),o={data:function(){return{locale:this.$cookie.get("locale")||"cn",localeMessages:i["c"]}},methods:{changeLocale:function(){this.$cookie.set("locale",this.locale,{expires:"1Y"}),location.reload()}}},n=o,l=a("2877"),c=Object(l["a"])(n,r,s,!1,null,null,null);t["a"]=c.exports},"0215":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"}},[a("el-form",{attrs:{"label-width":"100px","label-position":"top",size:"mini"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.limitCpu"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":1000",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.resources.limitCpu,callback:function(t){e.$set(e.resources,"limitCpu",t)},expression:"resources.limitCpu"}},[a("template",{slot:"append"},[e._v("milli CPUs")])],2)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.limitMem"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":128",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.resources.limitMem,callback:function(t){e.$set(e.resources,"limitMem",t)},expression:"resources.limitMem"}},[a("template",{slot:"append"},[e._v("MiB")])],2)],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.requestCpu"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":1000",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.resources.requestCpu,callback:function(t){e.$set(e.resources,"requestCpu",t)},expression:"resources.requestCpu"}},[a("template",{slot:"append"},[e._v("milli CPUs")])],2)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.resources.requestMem"),itemWidth:"50%"}},[a("el-input",{attrs:{placeholder:e.$t("deployService.resources.example")+":128",size:"small",onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:e.resources.requestMem,callback:function(t){e.$set(e.resources,"requestMem",t)},expression:"resources.requestMem"}},[a("template",{slot:"append"},[e._v("MiB")])],2)],1)],1)],1),e.install?e._e():a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)],1)},s=[],i=(a("ac1f"),a("5319"),{props:["sourceModel","install"],name:"resource",data:function(){return{resources:{}}},mounted:function(){this.resources=this.sourceModel},methods:{save:function(){console.log(this.resources);var e=JSON.parse(JSON.stringify(this.resources));for(var t in e)e[t]=e[t].replace(/[^\d]/g,""),""!=e[t]&&(e[t]+="m");this.$emit("saveResource",e)}}}),o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,"8bca2f68",null);t["a"]=l.exports},"04b0":function(e,t,a){"use strict";var r=a("a4e9"),s=a.n(r);s.a},"0585":function(e,t,a){"use strict";var r=a("120f"),s=a.n(r);s.a},"0810":function(e,t,a){"use strict";var r=a("be1a"),s=a.n(r);s.a},"08cb":function(e,t,a){"use strict";var r=a("f614"),s=a.n(r);s.a},"0a5e":function(e,t,a){e.exports=a.p+"static/img/zoom-in.a42f35f1.svg"},"0abb":function(e,t,a){"use strict";var r=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)),a("a",{staticClass:"compare-chart-zoom-in",attrs:{href:"javascript:"},on:{click:function(t){e.enlarge=!0}}},[a("icon",{attrs:{name:"zoom-in"}})],1),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(),a("div",{attrs:{slot:"foot"},slot:"foot"})],1)],1)},s=[],i=(a("4160"),a("b0c0"),a("159b"),a("a026")),o=(a("627c"),a("0a6d"),a("ba1a")),n=a.n(o);i["default"].component(n.a.name,n.a);a("0a5e");var l={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 r=a.name,s=a.label;e[r]=s,t.push(r)})),{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}},dataZoom:[{type:"inside",show:!0,xAxisIndex:[0],zoomOnMouseWheel:!0,start:0,end:100}],data:{columns:t,rows:this.data}}},largeChartOptions:function(){var e={},t=[this.timeColumn];return this.dataColumns.forEach((function(a){var r=a.name,s=a.label;e[r]=s,t.push(r)})),{title:{show:!0,text:this.title,left:"center",top:"bottom"},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}]}}}},c=l,u=(a("29ab"),a("2877")),d=Object(u["a"])(c,r,s,!1,null,null,null);t["a"]=d.exports},"0b18":function(e,t,a){"use strict";var r=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))]),a("ul",e._l(e.hours,(function(t){return a("li",{key:t.val,class:{active:t.val===e.value},on:{click:function(a){return e.onChange(t.val)}}},[e._v(e._s(t.txt)+" ")])})),0)])},s=[],i=(a("99af"),a("d81d"),a("fb6a"),a("a9e3"),Array.apply(null,{length:24}).map((function(e,t){return t}))),o=i.map((function(e){return{val:e,txt:"0".concat(e).slice(-2)}})),n=[{val:-1,txt:"all"}].concat(o),l={name:"HoursFilter",props:{title:{type:String,default:""},value:Number},filters:{format:function(e){return"0".concat(e).slice(-2)}},data:function(){return{hours:n}},methods:{onChange:function(e){this.$emit("input",e)}}},c=l,u=(a("25d5"),a("2877")),d=Object(u["a"])(c,r,s,!1,null,null,null);t["a"]=d.exports},"0ce2":function(e,t,a){"use strict";a("99af"),a("2ca0");var r=a("d4ec"),s=a("bee2"),i=(a("6d93"),a("a026")),o=a("7ad2"),n=new o["a"];n.ServerUrl.set("https://api.k.tarsyun.com/json"),n.ServerUrl.set("https://api.k.tarsyun.com/json"),n.ResultHandler.set((function(e){return!(!e||0!==e.tars_ret)})),n.call=function(e,t,a){return n.Headers.set("X-Token",window.localStorage.ticket||""),n.postJSON("/".concat(e,"/").concat(t),a)},Object.defineProperty(i["default"].prototype,"$cloud",{get:function(){return n}});var l=function(){function e(t){Object(r["a"])(this,e),this.vue=t}return Object(s["a"])(e,[{key:"onLogin",value:function(e){e&&this.vue.$store.commit({type:"marketUid",uid:window.localStorage.uid}),e||location.hash.startsWith("#/market/user")?e&&"#/market"==location.hash&&this.vue.$router.push({name:"MarketList"}):this.vue.$router.push({name:"MarketLogin"})}},{key:"checkLogin",value:function(){var e=this,t=window.localStorage.ticket;t?this.vue.$cloud.call("cloud-user","isLogin",{ticket:t}).then((function(t){t.uid?(window.localStorage.uid=t.uid,e.onLogin(!0)):e.onLogin(!1)})).catch((function(t){e.vue.$message({message:t,type:"error"})})):this.onLogin(!1)}}]),e}();Object.defineProperty(i["default"].prototype,"$loginUtil",{get:function(){return this.loginUtil||(this.loginUtil=new l(this)),this.loginUtil}})},"0d3c":function(e,t,a){"use strict";var r=a("8f5f"),s=a.n(r);s.a},1:function(e,t){},"120f":function(e,t,a){},1342:function(e,t,a){},"13e1":function(e,t,a){"use strict";var r=a("5d02"),s=a.n(r);s.a},1817:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsBAMAAADsqkcyAAAAIVBMVEUAAACZsuGasuCbtuRFf/WZseD////q8P3z9vt6o/e2x+iGuTfsAAAABHRSTlMA6aYc+fzKlQAAAGFJREFUKM9jgIBQBEIA+gszK4YiASEDqLBhKAoQhgqrrkhDAl1BUGHRNmThjECYfWkuSCAtFI8w0A50YSDAIUyC2SPOJdMrsZpdlk6MMMIQOoYJZvLBl9gwkybuhDx4choAeHa83egTBYcAAAAASUVORK5CYII="},"1c27":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"yaml-editor"},[a("textarea",{ref:"textarea",attrs:{id:"textarea"}})])},s=[],i=a("56b3"),o=a.n(i);a("0dd0"),a("a7be"),a("b866"),a("ced0"),a("8822"),a("b8d1");window.jsyaml=a("e2c1");var n={name:"yaml-editor",props:["value"],data:function(){return{yamlEditor:!1}},watch:{value:function(e){var t=this.yamlEditor.getValue();e!==t&&this.yamlEditor.setValue(this.value)}},mounted:function(){var e=this;this.yamlEditor=o.a.fromTextArea(this.$refs.textarea,{lineNumbers:!0,mode:"text/x-yaml",theme:"idea",lint:!0,lineWrapping:!0,autofocus:!0,extraKeys:{"Ctrl-Space":"autocomplete"},foldGutter:!0,gutters:["CodeMirror-lint-markers"],smartIndent:!0}),this.yamlEditor.on("change",(function(t){e.$emit("changed",t.getValue()),e.$emit("input",t.getValue())})),this.yamlEditor.setValue(this.value),this.$nextTick((function(){var t=e;setInterval((function(){t.yamlEditor.refresh()}),500)}))},methods:{getValue:function(){return this.yamlEditor.getValue()},refresh:function(){this.yamlEditor.refresh()},readonly:function(){this.yamlEditor.setOption("readOnly",!0)}}},l=n,c=(a("0d3c"),a("2877")),u=Object(c["a"])(l,r,s,!1,null,"d17a4854",null);t["a"]=u.exports},"1ca6":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAoCAMAAACyy+glAAAA81BMVEUAAACNpf+ky/+ZsuFFgPaasuJoiv9GgPZHgfZGgPWasuJGgPVKgvdMgf9FgPaZsuBGgPWZseFFgPZFgPaas+FHgPdGgfZHgPabs+JIgflGgf+gu+lQh/9FgPWasuBFgPZFgPZFgPWasuFFgPZGgPWas+FGgPaZsuFGgfaas+FGgfZGgPiatOGcteVIgvqduOVFgPWasuGasuGasuFGgPWasuFFgPaZsuJHgfZGgPeZseFGgfeasuKasuNHgfectuKbs+RIgfids+GZseGZsuCZseBFgPaaseFGgPaZseFFgPZGgPZGgPagtOeZs+ZFf/WZseByc+/7AAAAT3RSTlMABAH493gHUTS5k4IcEvvx6d7Wyn99dE5DKRYQDO7p5eDSsqagiGxrZ2ZURjswLxzxycCfmpmJcG9hX1xWST4rJSMh7NDOwLuuqpOPOhkKbHRT8QAAAbxJREFUOMut1Gl3wUAUxvEniQRB0VZROy0tSvd9Qfd17vf/NBUycZmp40V/L3P+52RyMzP4P0Yku9fOO6uk8VhFeHZWaLMlMbG+zR4+uPY3VBmhabsWkeX2F9uwrsUReayz0fx6D6dtKA8uTVOWDeZcTJ1izi5Jd2xmKT/eg8/JFAEUkjJ+NiFFhC8m26i4x9gmSQeQ2jKuGbIVVxgrPKrxpZA+vToxbkUGHttv6wjciMDGZTuWmi3/xx9IssvWrOpgou+WiY7fybqb/RJFqBiMqpszzTOybjFxH1LjHSgj358s4lBt13oslJ9qA/mSUG1BsU+bGFY0bQMaA8SrmjVsmdBJ1NQ5NCLQKm7MLbTTjDWzCeg5L/zlV8tPc5S/Pby0NRu87QCFJfEpa0tfQC7pGn+156xN9YBbi+ior28zrK0OgRZ5yjld22TtepydTVv9ITesrW3DOKFAffE7w2vsbCRg1olJH4CLsA0c9Xb5NXHJBx6zn/zm+PuPe+K7hx0IOdkWcSN2swXthwnpgscDzFTZBaSryw6/uLVnxyapNT+6lBCVMBh+s7mLu7OXNwB9fWJiJbnX9PE1fL8fY9HHKD9QSQAAAABJRU5ErkJggg=="},"1df8":function(e,t,a){"use strict";var r=a("f990"),s=a.n(r);s.a},"1e96":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.DetailModel.show?a("el-dialog",{attrs:{title:e.$t("operate.k8s"),visible:e.DetailModel.show,width:"1060px","before-close":e.closeDetailModel,top:"10px","close-on-click-modal":!1},on:{"update:visible":function(t){return e.$set(e.DetailModel,"show",t)}}},[a("el-collapse",{attrs:{accordion:""},on:{change:e.HandleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-collapse-item",{attrs:{name:"copyNode"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.copyNode")))])]),a("replicas",{ref:"replicas",attrs:{install:!0,replicas:e.deployObj.replicas},on:{saveReplicas:e.saveReplicas}})],2),a("el-collapse-item",{attrs:{name:"pull"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.pull")))])]),a("pull",{ref:"pull",attrs:{install:!0,pull:e.deployObj.imagePullPolicy},on:{savePull:e.savePull}})],2),a("el-collapse-item",{attrs:{name:"stacked"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.stacked")))])]),a("stacked",{ref:"stacked",attrs:{install:!0,notStacked:e.deployObj.notStacked},on:{saveStacked:e.saveStacked}})],2),a("el-collapse-item",{attrs:{name:"launcherType"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.launcherType")))])]),a("launcher-type",{ref:"launcherType",attrs:{install:!0,launcherType:e.deployObj.launcherType},on:{saveLauncherType:e.saveLauncherType}})],2),a("el-collapse-item",{attrs:{name:"jobModel"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.jobModel")))])]),e.k8sModel?a("jobModel",{ref:"jobModel",attrs:{install:!0,daemonSet:e.deployObj.daemonSet},on:{saveJobModel:e.saveJobModel}}):e._e()],2),a("el-collapse-item",{attrs:{name:"nodeSelect"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.nodeSelect")))])]),a("abilityAffinity",{ref:"affinity",attrs:{install:!0,k8sModel:e.k8sModel,labelMatchArr:e.labelMatchArr,LabelMatchOperator:e.LabelMatchOperator},on:{saveAffinity:e.saveAffinity}})],2),a("el-collapse-item",{attrs:{name:"network"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.network")))])]),a("network-mapping",{ref:"network",attrs:{install:!0,k8sModel:e.k8sModel},on:{saveNetwork:e.saveNetwork}})],2),a("el-collapse-item",{attrs:{name:"disk"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.disk")))])]),a("disk-manger",{ref:"disk",attrs:{install:!0,k8sModel:e.k8sModel,mounts:e.mounts},on:{saveDisk:e.saveDisk}})],2),a("el-collapse-item",{attrs:{name:"resource"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.resource")))])]),a("resource-manger",{ref:"resource",attrs:{install:!0,sourceModel:e.sourceModel},on:{saveResource:e.saveResource}})],2),a("el-collapse-item",{attrs:{name:"yaml"}},[a("template",{slot:"title"},[a("b",[e._v(e._s(e.$t("operate.yaml")))])]),a("YamlEditor",{ref:"yamlEdit",model:{value:e.yamlContent,callback:function(t){e.yamlContent=t},expression:"yamlContent"}})],2)],1),a("br"),a("let-button",{attrs:{type:"submit",theme:"primary"},on:{click:e.submit}},[e._v(e._s(e.$t("common.submit")))])],1):e._e()},s=[],i=(a("c740"),a("4160"),a("b0c0"),a("159b"),a("e2c1")),o=a("f897"),n=a("be8e"),l=a("a02f"),c=a("b3a0"),u=a("da55"),d=a("8a5b"),p=a("709f"),m=a("bfdc"),f=a("0215"),h=a("a8ca"),g=a("1c27"),v={name:"install",components:{pull:o["a"],launcherType:n["a"],stacked:l["a"],jobModel:c["a"],replicas:u["a"],abilityAffinity:d["a"],diskManger:m["a"],networkMapping:p["a"],resourceManger:f["a"],YamlEditor:g["a"],hpaManger:h["a"]},props:["deployObj"],data:function(){return{DetailModel:{show:!1},activeName:"copyNode",k8sModel:{},labelMatchArr:[],LabelMatchOperator:[],sourceModel:{},serverData:{},hpaModel:{minReplicas:"",maxReplicas:"",indicatorData:[]},indicators:[],yamlContent:"",mounts:this.deployObj.mounts||[]}},methods:{HandleClick:function(e){var t=this;"yaml"==e&&this.$nextTick((function(){var e=JSON.parse(JSON.stringify(t.deployObj));delete e.cloud,t.yamlContent=i["default"].dump(e),t.$refs.yamlEdit.refresh()}))},show:function(){var e=this;this.getDefaultValue(),this.deployObj.repo=this.deployObj.repo||{},this.deployObj.repo.id="",this.deployObj.replicas=this.deployObj.replicas||1,this.deployObj.daemonSet=this.deployObj.daemonSet||!1,this.deployObj.launcherType=this.deployObj.launcherType||"background",this.deployObj.notStacked=this.deployObj.notStacked||!0,this.deployObj.imagePullPolicy=this.deployObj.imagePullPolicy||"Always",this.k8sModel.abilityAffinity=this.deployObj.abilityAffinity||"AppOrServerPreferred",this.k8sModel.labelMatchArr=this.deployObj.nodeSelector||[],this.k8sModel.HostIpc=this.deployObj.hostIPC||!1,this.k8sModel.HostNetwork=this.deployObj.hostNetwork||!1,this.k8sModel.showHostPort=this.deployObj.hostPorts.length>0,this.k8sModel.HostPortArr=[],(this.deployObj.servants||[]).forEach((function(t){var a=e.deployObj.hostPorts.findIndex((function(e){return e.name==t.name}));e.k8sModel.HostPortArr.push({obj:t.name,HostPort:t.port,open:-1!=a})})),this.DetailModel.show=!0},saveLauncherType:function(e){this.deployObj.launcherType=e},savePull:function(e){this.deployObj.imagePullPolicy=e},saveStacked:function(e){this.deployObj.notStacked=e},saveReplicas:function(e){this.deployObj.replicas=parseInt(e)},saveJobModel:function(e){this.deployObj.daemonSet=e},saveAffinity:function(e){this.deployObj.abilityAffinity=e.abilityAffinity,this.deployObj.nodeSelector=e.NodeSelector},saveHpa:function(e){},saveDisk:function(e){this.deployObj.mounts=e},saveResource:function(e){this.deployObj.resources=e},saveNetwork:function(e){var t=this;if(e.HostNetwork&&e.showHostPort)return this.$message.error("".concat(this.$t("deployService.form.portOrNetWork")));e.showHostPort&&(this.deployObj.hostPorts=[],e.HostPortArr&&e.HostPortArr.forEach((function(e){e.open&&t.deployObj.hostPorts.push({nameRef:e.obj,port:Math.floor(e.HostPort)})}))),this.deployObj.hostIPC=e.HostIpc,this.deployObj.hostNetwork=e.HostNetwork},submit:function(){for(var e in this.$refs)"yamlEdit"!=e&&this.$refs[e].save();var t=i["default"].load(this.yamlContent);this.deployObj=Object.assign(this.deployObj,t),this.$emit("doInstall",this.deployObj)},closeDetailModel:function(){this.DetailModel.show=!1,this.k8sModel={},this.mounts=[],this.labelMatchArr=[],this.sourceModel={},this.serverData={},this.hpaModel={minReplicas:"",maxReplicas:"",indicatorData:[]}},getDefaultValue:function(){var e=this;this.$ajax.getJSON("/k8s/api/default",{}).then((function(t){e.defaultObj=t.ServerServantElem,e.LabelMatchOperator=t.LabelMatchOperator||[],e.indicators=t.indicators||[]}))}}},b=v,_=a("2877"),y=Object(_["a"])(b,r,s,!1,null,null,null);t["a"]=y.exports},"235c":function(e,t,a){"use strict";var r=a("5664"),s=a.n(r);s.a},2435:function(e,t,a){},2494:function(e,t,a){"use strict";var r=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),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),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),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)},s=[],i=(a("b0c0"),a("a9e3"),{props:{enabled:Boolean,name:String,area:String,group:[Number,String]},created:function(){this.updaters={name:this.updater("name"),area:this.updater("area"),group:this.updater("group"),enabled:this.updater("enabled")}},methods:{updater:function(e){var t=this;return function(a){return t.$emit("update:".concat(e),a)}},onEnabledChange:function(){var e=this;this.$nextTick((function(){e.enabled||(e.updaters.name(""),e.$refs.name.resetValid(),e.updaters.area(""),e.$refs.area.resetValid(),e.updaters.group(""),e.$refs.group.resetValid())}))}}}),o=i,n=(a("c1df0"),a("2877")),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},"255b":function(e,t,a){"use strict";var r=a("f76c"),s=a.n(r);s.a},"25d5":function(e,t,a){"use strict";var r=a("1342"),s=a.n(r);s.a},2699:function(e,t,a){"use strict";a.d(t,"a",(function(){return o})),a.d(t,"b",(function(){return l}));a("4160"),a("b64b"),a("4d63"),a("ac1f"),a("25f0"),a("5319"),a("1276"),a("159b");var r=1e3,s=60*r,i=60*s,o=24*i;function n(e){return null==e?new Date:e instanceof Date?e:new Date(e)}function l(e,t){if(e=n(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()])),Object.keys(a).forEach((function(e){if(new RegExp("("+e+")").test(t)){var r=RegExp.$1,s="".concat(a[e]);t=t.replace(r,1===r.length?s:"00".concat(s).substr(s.length))}})),t}},2876:function(e,t,a){},2998:function(e,t,a){"use strict";var r=a("a197"),s=a.n(r);s.a},"29ab":function(e,t,a){"use strict";var r=a("6663"),s=a.n(r);s.a},"2d43":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"progressTable"},[a("let-table",{ref:"ProgressTable",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("service.serverName"),prop:"server_name",width:"30%"}}),a("let-table-column",{attrs:{title:e.$t("service.serverIp"),prop:"node_name",width:"30%"}}),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(" "+e._s(e.statusConfig[t.row.status]+(2!=t.row.status&&3!=t.row.status&&4!=t.row.status?"...":""))+" ")])]}}])})],1),a("p",{ref:"progressTip"},[e._v(e._s(e.$t(e.success?"dcache.executeSuccess":"dcache.execute")))])],1)},s=[],i=(a("4160"),a("caad"),a("a9e3"),a("159b"),a("96cf"),a("1da1")),o=a("393d"),n={props:{releaseId:{type:[Number,String],required:!0}},data:function(){return{items:[],timer:"",progressTip:"",success:!1,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.pauseFlow")}}},methods:{getProgress:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Object(o["q"])({releaseId:e.releaseId});case 3:a=t.sent,r=a.items,a.serial,a.status,a.task_no,e.items=r,s=!0,r.forEach((function(e){return[2,3,4].includes(e.status)?"":s=!1})),s?(e.timer&&window.clearTimeout(e.timer),e.success=!0,e.$emit("done-fn")):e.timer=window.setTimeout(e.getProgress,1e3),t.next=19;break;case 14:t.prev=14,t.t0=t["catch"](0),e.success=!0,console.error(t.t0),e.$tip.error(t.t0.message);case 19:case"end":return t.stop()}}),t,null,[[0,14]])})))()}},created:function(){this.getProgress()},destroyed:function(){this.timer&&window.clearTimeout(this.timer),this.$emit("close-fn")}},l=n,c=(a("5236"),a("2877")),u=Object(c["a"])(l,r,s,!1,null,"99a14be8",null);t["a"]=u.exports},"2d59":function(e,t,a){},"33c3":function(e,t,a){"use strict";var r=a("4d7d"),s=a.n(r);s.a},3430:function(e,t,a){"use strict";var r=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),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),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)},s=[],i=(a("99af"),a("a15b"),{name:"ServerUserManage",data:function(){return{serverData:Object.assign({},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("".concat(e.$t("common.error"),": ").concat(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("".concat(e.$t("common.error"),": ").concat(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("".concat(e.$t("common.success")))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))}}}),o=i,n=(a("13e1"),a("2877")),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},"346f":function(e,t,a){},"393d":function(e,t,a){"use strict";a.d(t,"d",(function(){return c})),a.d(t,"bb",(function(){return u})),a.d(t,"cb",(function(){return d})),a.d(t,"m",(function(){return p})),a.d(t,"q",(function(){return m})),a.d(t,"n",(function(){return f})),a.d(t,"r",(function(){return h})),a.d(t,"X",(function(){return g})),a.d(t,"w",(function(){return v})),a.d(t,"c",(function(){return b})),a.d(t,"v",(function(){return _})),a.d(t,"Z",(function(){return y})),a.d(t,"Y",(function(){return w})),a.d(t,"p",(function(){return $})),a.d(t,"u",(function(){return k})),a.d(t,"db",(function(){return x})),a.d(t,"g",(function(){return S})),a.d(t,"i",(function(){return j})),a.d(t,"h",(function(){return C})),a.d(t,"s",(function(){return M})),a.d(t,"t",(function(){return O})),a.d(t,"W",(function(){return N})),a.d(t,"a",(function(){return D})),a.d(t,"j",(function(){return L})),a.d(t,"k",(function(){return A})),a.d(t,"ab",(function(){return I})),a.d(t,"l",(function(){return T})),a.d(t,"f",(function(){return R})),a.d(t,"b",(function(){return F})),a.d(t,"e",(function(){return P})),a.d(t,"o",(function(){return z})),a.d(t,"C",(function(){return E})),a.d(t,"D",(function(){return V})),a.d(t,"G",(function(){return q})),a.d(t,"E",(function(){return B})),a.d(t,"F",(function(){return U})),a.d(t,"x",(function(){return G})),a.d(t,"y",(function(){return J})),a.d(t,"B",(function(){return H})),a.d(t,"z",(function(){return Z})),a.d(t,"A",(function(){return Y})),a.d(t,"H",(function(){return W})),a.d(t,"I",(function(){return Q})),a.d(t,"L",(function(){return K})),a.d(t,"J",(function(){return X})),a.d(t,"K",(function(){return ee})),a.d(t,"M",(function(){return te})),a.d(t,"N",(function(){return ae})),a.d(t,"Q",(function(){return re})),a.d(t,"O",(function(){return se})),a.d(t,"P",(function(){return ie})),a.d(t,"R",(function(){return oe})),a.d(t,"S",(function(){return ne})),a.d(t,"V",(function(){return le})),a.d(t,"T",(function(){return ce})),a.d(t,"U",(function(){return ue}));a("ac1f"),a("5319");var r=a("bc3a"),s=a.n(r),i=a("4328"),o=a.n(i),n=s.a.create({baseURL:"/pages/server/api",timeout:25e3,transformRequest:[function(e,t){return"multipart/form-data"===t["Content-Type"]?e:"application/json"===t["Content-Type"]?JSON.stringify(e):o.a.stringify(e)}]});n.interceptors.request.use((function(e){return e}),(function(e){throw new Error(e)})),n.interceptors.response.use((function(e){var t=e.data;if(200===t.ret_code)return t.data;throw new Error(t.err_msg)}),(function(e){throw new Error(e)}));var l=n;function c(e){var t=e.servers,a=e.appName,r=e.moduleName,s=e.status,i=void 0===s?"1":s,o=e.cache_version,n=e.srcGroupName,c=void 0===n?[]:n,u=e.dstGroupName,d=void 0===u?[]:u;return l({method:"post",url:"/cache/expandModule",data:{appName:a,moduleName:r,servers:t,status:i,cache_version:o,srcGroupName:c,dstGroupName:d}})}function u(e){var t=e.servers,a=e.appName,r=e.moduleName,s=e.cache_version,i=e.srcGroupName,o=e.dstGroupName,n=e.transferData;return l({method:"post",url:"/cache/transferDCache",data:{servers:t,appName:a,moduleName:r,cache_version:s,srcGroupName:i,dstGroupName:o,transferData:n}})}function d(e){var t=e.appName,a=e.moduleName,r=e.srcGroupName,s=e.dstGroupName,i=e.transferData;return l({method:"post",url:"/cache/transferDCacheGroup",data:{appName:t,moduleName:a,srcGroupName:r,dstGroupName:s,transferData:i},headers:{"Content-Type":"application/json"}})}function p(e){var t=e.releaseId;return l({method:"get",url:"/cache/getReleaseProgress",params:{releaseId:t}})}function m(e){var t=e.releaseId;return l({method:"get",url:"/task",params:{task_no:t}})}function f(e){var t=e.type,a=void 0===t?"1":t;return l({method:"get",url:"/cache/getRouterChange",params:{type:a}})}function h(e){var t=e.appName,a=e.moduleName,r=e.type,s=e.srcGroupName;return l({method:"get",url:"/cache/hasOperation",params:{appName:t,moduleName:a,type:r,srcGroupName:s}})}function g(e){var t=e.appName,a=void 0===t?"":t,r=e.moduleName,s=void 0===r?"":r,i=e.type,o=void 0===i?"1":i,n=e.srcGroupName,c=void 0===n?[]:n,u=e.dstGroupName,d=void 0===u?[]:u;return l({method:"post",url:"/cache/stopTransfer",data:{appName:a,moduleName:s,type:o,srcGroupName:c,dstGroupName:d}})}function v(e){var t=e.appName,a=void 0===t?"":t,r=e.moduleName,s=void 0===r?"":r,i=e.type,o=void 0===i?"1":i,n=e.srcGroupName,c=void 0===n?[]:n,u=e.dstGroupName,d=void 0===u?[]:u;return l({method:"post",url:"/cache/restartTransfer",data:{appName:a,moduleName:s,type:o,srcGroupName:c,dstGroupName:d}})}function b(e){var t=e.appName,a=void 0===t?"":t,r=e.moduleName,s=void 0===r?"":r,i=e.type,o=void 0===i?"1":i,n=e.srcGroupName,c=void 0===n?[]:n,u=e.dstGroupName,d=void 0===u?[]:u;return l({method:"post",url:"/cache/deleteTransfer",data:{appName:a,moduleName:s,type:o,srcGroupName:c,dstGroupName:d}})}function _(e){var t=e.appName,a=void 0===t?"":t,r=e.moduleName,s=void 0===r?"":r,i=e.srcGroupName,o=void 0===i?[]:i;return l({method:"post",url:"/cache/reduceDcache",data:{appName:a,moduleName:s,srcGroupName:o}})}function y(e){var t=e.appName,a=void 0===t?"":t,r=e.moduleName,s=void 0===r?"":r,i=e.groupName,o=void 0===i?"":i;return l({method:"post",url:"/cache/switchServer",data:{appName:a,moduleName:s,groupName:o}})}function w(e){var t=e.appName,a=void 0===t?"":t,r=e.moduleName,s=void 0===r?"":r,i=e.groupName,o=void 0===i?"":i,n=e.imageIdc,c=void 0===n?"":n;return l({method:"post",url:"/cache/switchMIServer",data:{appName:a,moduleName:s,groupName:o,imageIdc:c}})}function $(e){var t=e.appName,a=void 0===t?"":t,r=e.moduleName,s=void 0===r?"":r,i=e.groupName,o=void 0===i?"":i;return l({method:"get",url:"/cache/getSwitchInfo",params:{appName:a,moduleName:s,groupName:o}})}function k(e){var t=e.appName,a=e.moduleName,r=e.groupName,s=e.mirrorIdc,i=e.dbFlag,o=e.enableErase;return l({method:"post",url:"/cache/recoverMirrorStatus",data:{appName:t,moduleName:a,groupName:r,mirrorIdc:s,dbFlag:i,enableErase:o}})}function x(e){var t=e.unType,a=e.appName,r=e.moduleName,s=e.serverNames;return l({method:"post",url:"/cache/uninstall4DCache",data:{unType:t,appName:a,moduleName:r,serverNames:s}})}function S(e){var t=e.appName,a=e.moduleName;return l({method:"get",url:"/cache/getCacheServerList",params:{appName:t,moduleName:a}})}function j(e){var t=e.appName,a=e.moduleName;return l({method:"get",url:"/cache/getModuleConfig",params:{appName:t,moduleName:a}})}function C(){return l({method:"get",url:"/cache/getConfig"})}function M(e){var t=e.applyId,a=e.replace;return l({method:"get",url:"/cache/install_and_publish",params:{applyId:t,replace:a}})}function O(e){var t=e.thedate,a=e.predate,r=e.startshowtime,s=e.endshowtime,i=e.moduleName,o=e.serverName;return l({method:"get",url:"/cache/queryProperptyData",params:{thedate:t,predate:a,startshowtime:r,endshowtime:s,moduleName:i,serverName:o}})}function N(e){var t=e.application,a=void 0===t?"DCache":t,r=e.moduleName,s=void 0===r?"DCacheServerGroup":r,i=e.currPage,o=void 0===i?1:i,n=e.pageSize,c=void 0===n?5:n,u=e.cacheVersion;return l({method:"get",url:"/server_patch_list",params:{application:a,module_name:s,curr_page:o,page_size:c,package_type:u}})}function D(e){var t=e.serial,a=void 0!==t&&t,r=e.elegant,s=void 0!==r&&r,i=e.eachnum,o=void 0===i?1:i,n=e.items,c=void 0===n?[{server_id:"",command:"patch_tars",parameters:{patch_id:0,bak_flag:"",group_name:""}}]:n;return l({method:"post",url:"/add_task",data:{serial:a,elegant:s,eachnum:o,items:c},headers:{"Content-Type":"application/json"}})}function L(e){var t=e.moduleId;return l({method:"get",url:"/get_module_config_info",params:{moduleId:t}})}function A(e){var t=e.module_name;return l({method:"get",url:"/get_module_group",params:{module_name:t}})}function I(){return l({method:"get",url:"/template_name_list",params:{}})}function T(){return l({method:"get",url:"/get_region_list"})}function R(e){var t=e.application,a=void 0===t?"":t,r=e.server_name,s=void 0===r?"":r,i=e.set,o=void 0===i?"":i,n=e.node_name,c=void 0===n?"":n,u=e.expand_nodes,d=void 0===u?[""]:u,p=e.enable_set,m=void 0!==p&&p,f=e.set_name,h=void 0===f?"":f,g=e.set_area,v=void 0===g?"":g,b=e.set_group,_=void 0===b?"":b,y=e.copy_node_config,w=void 0!==y&&y;return l({method:"post",url:"/expand_server_preview",data:{application:a,server_name:s,set:o,node_name:c,expand_nodes:d,enable_set:m,set_name:h,set_area:v,set_group:_,copy_node_config:w},headers:{"Content-Type":"application/json"}})}function F(e){var t=e.node_name;return l({method:"get",url:"/auto_port",params:{node_name:t}})}function P(e){var t=e.application,a=void 0===t?"":t,r=e.server_name,s=void 0===r?"":r,i=e.set,o=void 0===i?"":i,n=e.node_name,c=void 0===n?"":n,u=e.copy_node_config,d=void 0!==u&&u,p=e.expand_preview_servers,m=void 0===p?[{bind_ip:"",node_name:"",obj_name:"",port:"",set:""}]:p;return l({method:"post",url:"/expand_server",data:{application:a,server_name:s,set:o,node_name:c,copy_node_config:d,expand_preview_servers:m},headers:{"Content-Type":"application/json"}})}function z(){return l({method:"get",url:"/routerTree"})}function E(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerModule/create",data:a})}function V(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerModule/delete",data:a})}function q(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerModule/update",data:a})}function B(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerModule/find",params:a})}function U(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerModule/list",params:a})}function G(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerGroup/create",data:a})}function J(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerGroup/delete",data:a})}function H(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerGroup/update",data:a})}function Z(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerGroup/find",params:a})}function Y(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerGroup/list",params:a})}function W(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerRecord/create",data:a})}function Q(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerRecord/delete",data:a})}function K(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerRecord/update",data:a})}function X(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerRecord/find",params:a})}function ee(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerRecord/list",params:a})}function te(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerServer/create",data:a})}function ae(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerServer/delete",data:a})}function re(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerServer/update",data:a})}function se(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerServer/find",params:a})}function ie(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerServer/list",params:a})}function oe(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerTransfer/create",data:a})}function ne(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerTransfer/delete",data:a})}function le(e){var t=e.data,a=void 0===t?{}:t;return l({method:"post",url:"/routerTransfer/udpate",data:a})}function ce(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerTransfer/find",params:a})}function ue(e){var t=e.data,a=void 0===t?{}:t;return l({method:"get",url:"/routerTransfer/list",params:a})}},"3e1a":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ZDFiOTQyYS0zZWUyLTkxNGQtOTBiYS1iZTVkYzNjOTU1OTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzZBQzM5NkM2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzZBQzM5NkI2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjEwODNhYzItNzY4Yy02MjRkLWEyYWMtYTFiMTdmOTZhZmZhIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NzRmMzZhYTgtODFhOC04ZTQ5LWExN2UtMDI2MDYwMWE2ZGMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FAOt6wAAAWlJREFUeNrsWUEOwiAQhIY3mNSLj/CqD/DiyR9YX2X8gScP+gD16CM8WBs/gTRBU5ulLlCgVTbZNC2ddroMC0sp55z0yRLSM+sdYWYKXO+u5WEmfCM8RcLuwpfCD6v5KEiEdcgSee8mSIQrBMj2MqCYmxfjB9f8QKcaLuWRC+c1z2Vb5wadSh7WMnBFODVsi3k4Eu4K4XtDW9FFwpmC2E3ObmGnZsD2bWYDV4RLGaRyBsNaEVISmSYBa3kwRzJ4RZy2LQnadsUhl51vwqbLyJ/Jw8oIy0iZmrUkVD3DkC+2Ja4dyL+r6agnSfCfG3T9zBINGYEHkgRVZY7kSwFZfZCqoISwdRwWC+E+sK8I55qbIcPKuTesiPCQ6ewvVPcVyu6RUvKKhQbdEeiSIzIKzrEQ4QnyGgmBjXk4EkYQPgHXzsjnOcdCi5+pRQCcY5lB9VtYVM7W2ESz+oWqXq9YGn97RcKRsF97CjAAb0qmeUJR5DMAAAAASUVORK5CYII="},4201:function(e,t,a){"use strict";var r=a("98c9"),s=a.n(r);s.a},4290:function(e,t,a){"use strict";var r=a("c44a"),s=a.n(r);s.a},"42a1":function(e,t,a){"use strict";a("b0c0");var r=a("a026"),s=a("1861"),i=a.n(s),o=(a("8c47"),a("00e7")),n=a.n(o),l=(a("6609"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("svg",{staticClass:"icon"},[a("use",{attrs:{"xlink:href":"#"+e.name}})])}),c=[],u={name:"Icon",props:{name:{type:String,required:!0}}},d=u,p=(a("e166"),a("2877")),m=Object(p["a"])(d,l,c,!1,null,null,null),f=m.exports,h=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){return e.$emit("onLabelClick")}}},[e._v(e._s(e.label))]),e._t("default")],2)},g=[],v={name:"TarsFormItem",props:{label:String}},b=v,_=(a("04b0"),Object(p["a"])(b,h,g,!1,null,null,null)),y=_.exports,w=a("0c80"),$=a.n(w),k=a("c400"),x=a.n(k),S=a("5c96");function j(){this.loading=null}r["default"].use(i.a,{locale:{en:x.a,cn:$.a}[n.a.get("locale")||"cn"]||$.a}),r["default"].component(f.name,f),r["default"].component(y.name,y),j.prototype.show=function(e){this.loading&&this.hide();var t=S["Loading"].service({fullscreen:!0,text:e||"Loading",background:"rgba(0,0,0,0)"});return this.loading=t,this},j.prototype.hide=function(){return this.loading&&(this.loading.close(),this.loading=null),this},j.show=function(e){return j._loading||(j._loading=new j),j._loading.show(e)},j.hide=function(){return j._loading||(j._loading=new j),j._loading.hide()},Object.defineProperty(r["default"].prototype,"$Loading",{get:function(){return this._loading||(this._loading=new j),this._loading},set:function(e){}}),Object.defineProperty(r["default"].prototype,"$loading",{get:function(){return this._loading||(this._loading=new j),this._loading},set:function(e){}});var C={error:function(e){r["default"].prototype.$message({showClose:!0,message:e,type:"error"})},success:function(e){r["default"].prototype.$message({showClose:!0,message:e,type:"success"})},warning:function(e){r["default"].prototype.$message({showClose:!0,message:e,type:"warning"})}};Object.defineProperty(r["default"].prototype,"$tip",{get:function(){return C},set:function(e){}})},"42a2a":function(e,t,a){"use strict";a("b0c0");var r=a("a026"),s=a("2f62");r["default"].use(s["a"]);var i=new s["a"].Store({state:{name:"",marketUid:"",version:""},mutations:{increment:function(e,t){e.name=t},quit:function(e){e.marketUid="",window.localStorage.uid="",window.localStorage.ticket=""},marketUid:function(e,t){e.marketUid=t},version:function(e,t){e.version=t}}});t["a"]=i},4527:function(e,t,a){"use strict";var r=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),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),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),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),a("let-form-group",[a("tars-form-item",{attrs:{label:e.$t("monitor.search.master")},on:{onLabelClick:function(t){return 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),a("tars-form-item",{attrs:{label:e.$t("monitor.search.masterIP")},on:{onLabelClick:function(t){return 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),a("tars-form-item",{attrs:{label:e.$t("monitor.select.property")},on:{onLabelClick:function(t){return 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),a("tars-form-item",{attrs:{label:e.$t("monitor.select.strategy")},on:{onLabelClick:function(t){return 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),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.showChart?a("compare-chart",e._b({ref:"chart",staticClass:"chart"},"compare-chart",e.chartOptions,!1)):e._e(),e.enableHourFilter?a("hours-filter",{model:{value:e.hour,callback:function(t){e.hour=t},expression:"hour"}}):e._e(),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"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.show_time||t.row.show_date))]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.search.master")},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.master_name?a("span",[e._v(e._s(t.row.master_name))]):e._e(),"%"==t.row.master_name?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("master_name",t.row)}}},[e._v(e._s(t.row.master_name))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.search.masterIP"),width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.master_ip?a("span",[e._v(e._s(t.row.master_ip))]):e._e(),"%"==t.row.master_ip?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("master_ip",t.row)}}},[e._v(e._s(t.row.master_ip))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.select.property"),width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.property_name?a("span",[e._v(e._s(t.row.property_name))]):e._e(),"%"==t.row.property_name?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("property_name",t.row)}}},[e._v(e._s(t.row.property_name))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.select.strategy"),width:"150px"},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.policy?a("span",[e._v(e._s(t.row.policy))]):e._e(),"%"==t.row.policy?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("policy",t.row)}}},[e._v(e._s(t.row.policy))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.property.property"),prop:"the_value",align:"right",width:"200px"}}),a("let-table-column",{attrs:{title:e.$t("monitor.property.propertyC"),prop:"pre_value",align:"right",width:"230px"}}),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)},s=[],i=(a("99af"),a("4de4"),a("4160"),a("d81d"),a("fb6a"),a("b64b"),a("ac1f"),a("1276"),a("159b"),a("5530"),a("2699")),o=a("0b18"),n=a("0abb"),l=20,c="YYYYMMDD",u={name:"ServerPropertyMonitor",components:{HoursFilter:o["a"],CompareChart:n["a"]},data:function(){var e=this.treeid,t=e.split("."),a="",r=!0;return"/k8s.html"==location.pathname?(r=!0,2==t.length&&(a=t[0]+"."+t[1])):(r=!1,2==t.length?a=t[0].substring(1)+"."+t[1].substring(1):5==_slave_name_arr.length&&(a=t[0].substring(1)+"."+t[4].substring(1)+"."+t[1].substring(1)+t[2].substring(1)+t[3].substring(1))),{query:{thedate:Object(i["b"])(new Date,c),predate:Object(i["b"])(Date.now()-i["a"],c),startshowtime:"0000",endshowtime:"2360",master_name:a,master_ip:"",property_name:"",policy:"",group_by:"",k8s:r},formatter:c,allItems:[],hour:-1,page:1,showChart:!0}},props:["treeid"],computed:{enableHourFilter:function(){return this.allItems.length&&this.allItems[0].show_time},filteredItems:function(){var e=this.hour;return e>=0&&this.enableHourFilter?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/l)},pagedItems:function(){return this.filteredItems.slice(l*(this.page-1),l*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&&this.$refs.chart.$loading.show(),a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/property_monitor_data",this.query).then((function(r){t&&t.hide(),a.hide(),e.allItems=r})).catch((function(r){t&&t.hide(),a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(r.message||r.err_msg))}))},groupBy:function(e,t){this.query.group_by=e,this.showChart=!1,t&&(t.show_time&&(this.query.startshowtime=t.show_time,this.query.endshowtime=t.show_time),t.master_name&&"%"!=t.master_name&&(this.query.master_name=t.master_name),t.master_ip&&"%"!=t.master_ip&&(this.query.master_ip=t.master_ip),t.property_name&&"%"!=t.property_name&&(this.query.property_name=t.property_name),t.policy&&"%"!=t.policy&&(this.query.policy=t.policy)),this.fetchData()},search:function(){delete this.query.group_by,this.showChart=!0,this.fetchData()},changePage:function(e){this.page=e}}},d=u,p=(a("49de"),a("2877")),m=Object(p["a"])(d,r,s,!1,null,null,null);t["a"]=m.exports},4678:function(e,t,a){var r={"./af":"2bfb","./af.js":"2bfb","./ar":"8e73","./ar-dz":"a356","./ar-dz.js":"a356","./ar-kw":"423e","./ar-kw.js":"423e","./ar-ly":"1cfd","./ar-ly.js":"1cfd","./ar-ma":"0a84","./ar-ma.js":"0a84","./ar-sa":"8230","./ar-sa.js":"8230","./ar-tn":"6d83","./ar-tn.js":"6d83","./ar.js":"8e73","./az":"485c","./az.js":"485c","./be":"1fc1","./be.js":"1fc1","./bg":"84aa","./bg.js":"84aa","./bm":"a7fa","./bm.js":"a7fa","./bn":"9043","./bn.js":"9043","./bo":"d26a","./bo.js":"d26a","./br":"6887","./br.js":"6887","./bs":"2554","./bs.js":"2554","./ca":"d716","./ca.js":"d716","./cs":"3c0d","./cs.js":"3c0d","./cv":"03ec","./cv.js":"03ec","./cy":"9797","./cy.js":"9797","./da":"0f14","./da.js":"0f14","./de":"b469","./de-at":"b3eb","./de-at.js":"b3eb","./de-ch":"bb71","./de-ch.js":"bb71","./de.js":"b469","./dv":"598a","./dv.js":"598a","./el":"8d47","./el.js":"8d47","./en-SG":"cdab","./en-SG.js":"cdab","./en-au":"0e6b","./en-au.js":"0e6b","./en-ca":"3886","./en-ca.js":"3886","./en-gb":"39a6","./en-gb.js":"39a6","./en-ie":"e1d3","./en-ie.js":"e1d3","./en-il":"7333","./en-il.js":"7333","./en-nz":"6f50","./en-nz.js":"6f50","./eo":"65db","./eo.js":"65db","./es":"898b","./es-do":"0a3c","./es-do.js":"0a3c","./es-us":"55c9","./es-us.js":"55c9","./es.js":"898b","./et":"ec18","./et.js":"ec18","./eu":"0ff2","./eu.js":"0ff2","./fa":"8df4","./fa.js":"8df4","./fi":"81e9","./fi.js":"81e9","./fo":"0721","./fo.js":"0721","./fr":"9f26","./fr-ca":"d9f8","./fr-ca.js":"d9f8","./fr-ch":"0e49","./fr-ch.js":"0e49","./fr.js":"9f26","./fy":"7118","./fy.js":"7118","./ga":"5120","./ga.js":"5120","./gd":"f6b4","./gd.js":"f6b4","./gl":"8840","./gl.js":"8840","./gom-latn":"0caa","./gom-latn.js":"0caa","./gu":"e0c5","./gu.js":"e0c5","./he":"c7aa","./he.js":"c7aa","./hi":"dc4d","./hi.js":"dc4d","./hr":"4ba9","./hr.js":"4ba9","./hu":"5b14","./hu.js":"5b14","./hy-am":"d6b6","./hy-am.js":"d6b6","./id":"5038","./id.js":"5038","./is":"0558","./is.js":"0558","./it":"6e98","./it-ch":"6f12","./it-ch.js":"6f12","./it.js":"6e98","./ja":"079e","./ja.js":"079e","./jv":"b540","./jv.js":"b540","./ka":"201b","./ka.js":"201b","./kk":"6d79","./kk.js":"6d79","./km":"e81d","./km.js":"e81d","./kn":"3e92","./kn.js":"3e92","./ko":"22f8","./ko.js":"22f8","./ku":"2421","./ku.js":"2421","./ky":"9609","./ky.js":"9609","./lb":"440c","./lb.js":"440c","./lo":"b29d","./lo.js":"b29d","./lt":"26f9","./lt.js":"26f9","./lv":"b97c","./lv.js":"b97c","./me":"293c","./me.js":"293c","./mi":"688b","./mi.js":"688b","./mk":"6909","./mk.js":"6909","./ml":"02fb","./ml.js":"02fb","./mn":"958b","./mn.js":"958b","./mr":"39bd","./mr.js":"39bd","./ms":"ebe4","./ms-my":"6403","./ms-my.js":"6403","./ms.js":"ebe4","./mt":"1b45","./mt.js":"1b45","./my":"8689","./my.js":"8689","./nb":"6ce3","./nb.js":"6ce3","./ne":"3a39","./ne.js":"3a39","./nl":"facd","./nl-be":"db29","./nl-be.js":"db29","./nl.js":"facd","./nn":"b84c","./nn.js":"b84c","./pa-in":"f3ff","./pa-in.js":"f3ff","./pl":"8d57","./pl.js":"8d57","./pt":"f260","./pt-br":"d2d4","./pt-br.js":"d2d4","./pt.js":"f260","./ro":"972c","./ro.js":"972c","./ru":"957c","./ru.js":"957c","./sd":"6784","./sd.js":"6784","./se":"ffff","./se.js":"ffff","./si":"eda5","./si.js":"eda5","./sk":"7be6","./sk.js":"7be6","./sl":"8155","./sl.js":"8155","./sq":"c8f3","./sq.js":"c8f3","./sr":"cf1e","./sr-cyrl":"13e9","./sr-cyrl.js":"13e9","./sr.js":"cf1e","./ss":"52bd","./ss.js":"52bd","./sv":"5fbd","./sv.js":"5fbd","./sw":"74dc","./sw.js":"74dc","./ta":"3de5","./ta.js":"3de5","./te":"5cbb","./te.js":"5cbb","./tet":"576c","./tet.js":"576c","./tg":"3b1b","./tg.js":"3b1b","./th":"10e8","./th.js":"10e8","./tl-ph":"0f38","./tl-ph.js":"0f38","./tlh":"cf75","./tlh.js":"cf75","./tr":"0e81","./tr.js":"0e81","./tzl":"cf51","./tzl.js":"cf51","./tzm":"c109","./tzm-latn":"b53d","./tzm-latn.js":"b53d","./tzm.js":"c109","./ug-cn":"6117","./ug-cn.js":"6117","./uk":"ada2","./uk.js":"ada2","./ur":"5294","./ur.js":"5294","./uz":"2e8c","./uz-latn":"010e","./uz-latn.js":"010e","./uz.js":"2e8c","./vi":"2921","./vi.js":"2921","./x-pseudo":"fd7e","./x-pseudo.js":"fd7e","./yo":"7f33","./yo.js":"7f33","./zh-cn":"5c3a","./zh-cn.js":"5c3a","./zh-hk":"49ab","./zh-hk.js":"49ab","./zh-tw":"90ea","./zh-tw.js":"90ea"};function s(e){var t=i(e);return a(t)}function i(e){if(!a.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}s.keys=function(){return Object.keys(r)},s.resolve=i,e.exports=s,s.id="4678"},"46e7":function(e,t,a){"use strict";a.d(t,"d",(function(){return Ht})),a.d(t,"b",(function(){return Zt})),a.d(t,"c",(function(){return Yt})),a.d(t,"a",(function(){return Wt}));var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("router-view",{ref:"childView"})},s=[],i={name:"Index",data:function(){return{}},beforeRouteEnter:function(e,t,a){a((function(e){var t=window.localStorage.ticket;t||e.$loginUtil.onLogin(!1)}))},methods:{},mounted:function(){}},o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,null,null),c=l.exports,u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server"},[a("div",{staticClass:"left-view"},[a("div",[a("span",[a("el-input",{staticStyle:{width:"80%"},attrs:{size:"small",placeholder:e.$t("home.placeholder")},nativeOn:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.filterTextChange(t)}},model:{value:e.treeSearchKey,callback:function(t){e.treeSearchKey=t},expression:"treeSearchKey"}}),e._v(" "),a("i",{staticClass:"iconfont el-icon-third-shuaxin",class:{active:e.isIconPlay},staticStyle:{cursor:"pointer","font-family":"iconfont  !important","z-index":"99"},on:{click:e.treeSearch}})],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.serviceList,stripe:"","show-header":!1},on:{"row-click":e.selectService}},[a("el-table-column",{attrs:{label:e.$t("market.table.version")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:4}},[a("el-avatar",{attrs:{size:30,src:t.row.logo}})],1),a("el-col",{attrs:{span:20}},[a("span",[a("span",[e._v(e._s(t.row.group+"/"+t.row.name))]),a("span",{staticClass:"overflow"},[e._v(e._s(e.getDescription(t.row)))])])])],1)]}}])})],1)],1)]),a("div",{staticClass:"right-view"},[e.isRouterAlive?a("router-view",{ref:"childView"}):e._e()],1)])},d=[],p=(a("a4d3"),a("e01a"),a("4160"),a("b0c0"),a("159b"),a("c1df")),m=a.n(p),f={name:"Market",data:function(){return{uid:"",treeErrMsg:"load failed",treeData:null,treeSearchKey:"",isIconPlay:!1,serviceList:[],group:"",name:"",version:"",total:0,offset:0,limit:20,isRouterAlive:!1,k8s:!0}},computed:{webVersion:function(){return this.$store.state.version}},watch:{webVersion:function(e,t){e.version&&e.version!=t.version&&this.checkVersion(e.version)}},beforeRouteEnter:function(e,t,a){a((function(e){var t=window.localStorage.ticket;e.isRouterAlive=!1,t?(e.$loginUtil.onLogin(!0),e.isRouterAlive=!0,0==e.serviceList.length&&e.fetchServiceData()):e.$loginUtil.onLogin(!1)}))},methods:{iconLoading:function(){var e=this;e.isIconPlay||(e.isIconPlay=!0,setTimeout((function(){e.isIconPlay=!1}),1e3))},treeSearch:function(){this.iconLoading(),this.fetchServiceData()},selectService:function(e,t,a){this.group=e.group,this.name=e.name,this.version=e.version,this.$router.push("/market/service/"+this.group+"/"+this.name+"/"+this.version)},getDescription:function(e){return"cn"==this.$cookie.get("locale")&&e.description_cn||e.description},fetchServiceData:function(){var e=this;this.$cloud.call("cloud-market","getServiceBaseList",{req:{offset:this.offset,native:!this.k8s,limit:this.limit}}).then((function(t){e.serviceList=t.rsp.services,e.serviceList.forEach((function(e){e.create_time=m()(e.create_time).format("YYYY-MM-DD HH:mm:ss"),e.update_time=m()(e.update_time).format("YYYY-MM-DD HH:mm:ss"),e.logo=e.prefix+e.logo+"?t="+e.update_time})),e.total=t.rsp.total})).catch((function(t){e.$message({message:t,type:"error"})}))},checkVersion:function(e){var t=this;this.$cloud.call("cloud-market","checkVersion",{req:{web:e}}).then((function(e){0!=e.info.code&&t.$message({message:"en"==t.$cookie.get("locale")?e.info.info_en:e.info.info_cn,type:"error"})})).catch((function(e){t.$message({message:e,type:"error"})}))}},created:function(){},mounted:function(){this.k8s="/k8s.html"==location.pathname}},h=f,g=(a("c2e9"),Object(n["a"])(h,u,d,!1,null,null,null)),v=g.exports,b=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"list"},[e._l(e.row,(function(t){return a("el-row",{key:t,staticStyle:{"padding-bottom":"10px"},attrs:{gutter:24}},e._l(e.column,(function(r){return a("el-col",{key:r,attrs:{span:24/e.column}},[e.valid(t,r)?a("el-card",{staticClass:"box-card",attrs:{"body-style":{padding:"0px"}}},[a("div",{staticStyle:{"line-height":"25px",position:"relative"},attrs:{slot:"header"},slot:"header"},[a("el-avatar",{attrs:{size:25,src:e.getServerLogo(t,r)}}),a("span",{staticStyle:{"margin-left":"5px",position:"absolute"}},[e._v(e._s(e.getServerName(t,r)))]),a("el-popover",{staticStyle:{float:"right"},attrs:{placement:"bottom"},model:{value:e.isVisible[t+"_"+r],callback:function(a){e.$set(e.isVisible,t+"_"+r,a)},expression:"isVisible[i + '_' + j]"}},[e._v(" "+e._s(e.$t("market.service.versionList"))+" "),e.serviceVersion?a("el-select",{staticClass:"pop",staticStyle:{width:"100px"},model:{value:e.version,callback:function(t){e.version=t},expression:"version"}},e._l(e.versions,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1):e._e(),a("el-button",{staticStyle:{"line-height":"25px",padding:"0px 10px 0 10px"},attrs:{size:"small"},on:{click:function(a){return e.changeVersion(t,r)}}},[e._v(e._s(e.$t("market.service.change")))]),e.isUpgrade(t,r)?a("el-badge",{staticClass:"item",attrs:{slot:"reference","is-dot":""},slot:"reference"},[a("el-button",{staticStyle:{"line-height":"25px",padding:"0px 10px 0 10px"},attrs:{size:"small"},on:{click:function(a){return e.fetchVersionListData(t,r)}}},[e._v(e._s(e.$t("market.service.changeVersion")))])],1):a("el-button",{staticStyle:{"line-height":"25px",padding:"0px 10px 0 10px"},attrs:{slot:"reference",size:"small"},on:{click:function(a){return e.fetchVersionListData(t,r)}},slot:"reference"},[e._v(e._s(e.$t("market.service.changeVersion")))])],1)],1),a("div",{attrs:{slot:"header"},slot:"header"},[a("el-button",{attrs:{type:"text"},on:{click:function(a){e.goService(e.getCloudServerName(t,r))}}},[e._v(e._s(e.getCloudServerName(t,r)))]),a("br"),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:e.getDigest(t,r),placement:"top-start"}},[a("span",{staticStyle:{"font-size":"10px"}},[e._v(e._s(e.getDigest(t,r,10)))])])],1)]):e._e()],1)})),1)})),e.upgradeServiceVersion&&e.k8s?a("upgradeK8S",{ref:"upgradeK8S",attrs:{serviceVersion:e.upgradeServiceVersion},on:{upgradeSucc:e.upgradeSucc}}):e._e(),e.upgradeServiceVersion&&!e.k8s?a("upgradeNative",{ref:"upgradeNative",attrs:{serviceVersion:e.upgradeServiceVersion},on:{upgradeSucc:e.upgradeSucc}}):e._e()],2)},_=[],y=(a("c975"),a("ac1f"),a("5319"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",{attrs:{title:e.$t("market.service.install"),visible:e.dialogVisible,width:"80%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[e.deployObj?a("baseInfo",{attrs:{deployObj:e.deployObj},on:{next:e.next}}):e._e()],1),e.deployObj?a("el-dialog",{attrs:{title:e.$t("common.config"),visible:e.dialogConfigVisible,width:"80%"},on:{"update:visible":function(t){e.dialogConfigVisible=t}},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form",{ref:"configForm",attrs:{itemWidth:"100%"}},[a("el-tabs",{attrs:{type:"border-card"},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.deployObj.config,(function(t){return a("el-tab-pane",{key:t.name,attrs:{label:t.name,name:t.name}},[a("let-form-item",{attrs:{label:e.$t("cfg.btn.fileName"),required:""}},[a("let-input",{attrs:{size:"small",disabled:"",required:""},model:{value:t.name,callback:function(a){e.$set(t,"name",a)},expression:"config.name"}})],1),a("let-form-item",{attrs:{label:e.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:16,required:""},model:{value:t.content,callback:function(a){e.$set(t,"content",a)},expression:"config.content"}})],1)],1)})),1),a("br"),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))]),e._v(" "),a("let-button",{on:{click:e.prevStep}},[e._v(e._s(e.$t("common.prevStep")))])],1)],1):e._e(),e.deployObj?a("install",{ref:"install",attrs:{deployObj:e.deployObj},on:{doInstall:e.doInstall}}):e._e()],1)}),w=[],k=a("7ad2"),x=a("e2c1"),S=a("b15f"),j=a("1e96"),C={name:"Install",components:{install:j["a"],baseInfo:S["a"]},data:function(){return{dialogVisible:!1,dialogConfigVisible:!1,upgrade:!1,deployObj:null,activeName:null,k8s:!0}},props:["serviceVersion"],mounted:function(){this.k8s="/k8s.html"==location.pathname},methods:{show:function(){this.upgrade=!1,this.dialogVisible=!0,this.dialogConfigVisible=!1,this.fetchDeployObj()},upgradeK8S:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/k8s/api/upgrade",{deploy:this.deployObj,cloud:{installData:{group:this.serviceVersion.installData.group,name:this.serviceVersion.installData.name},group:this.serviceVersion.group,name:this.serviceVersion.name,version:this.serviceVersion.version,logo:this.serviceVersion.logo,digest:this.serviceVersion.digest},serviceVersion:this.serviceVersion,k8s:this.k8s}).then((function(a){t.hide(),e.$message({message:"".concat(e.$t("common.success")),type:"success"})})).catch((function(e){t.hide()}))},showUpgrade:function(){var e=this;this.$confirm(this.$t("market.deploy.upgradeInfo"),this.$t("market.deploy.upgrade"),{confirmButtonText:this.$t("market.deploy.upgrade"),cancelButtonText:this.$t("market.deploy.cancel"),type:"warning"}).then((function(){e.upgrade=!0,e.fetchDeployObj((function(){e.upgradeK8S()}))})).catch((function(){}))},initialModelK8S:function(e){e.config&&e.config.length>0&&(this.activeName=e.config[0].name)},fetchDeployObj:function(e){var t=this,a=this.$Loading.show();(new k["a"]).getPlain(this.serviceVersion.deploy).then((function(r){a.hide(),r.ok&&r.text().then((function(a){t.deployObj=x["default"].load(a),t.initialModelK8S(t.deployObj),e&&e()}))})).catch((function(e){a.hide(),t.$message({message:e,type:"error"})}))},doInstall:function(){var e=this;this.$confirm(this.$t("market.deploy.install"),"Hint",{confirmButtonText:this.$t("market.deploy.confirm"),cancelButtonText:this.$t("market.deploy.cancel"),type:"warning"}).then((function(){var t=e.$Loading.show();e.$ajax.postJSON("/k8s/api/install",{deploy:e.deployObj,cloud:{group:e.serviceVersion.group,name:e.serviceVersion.name,version:e.serviceVersion.version,logo:e.serviceVersion.logo,digest:e.serviceVersion.digest}}).then((function(a){t.hide(),e.$message({message:"".concat(e.$t("common.success")),type:"success"}),e.dialogVisible=!1,e.$refs.install.closeDetailModel()})).catch((function(a){t.hide(),201==a.ret_code?e.$message({showClose:!0,message:e.$t("market.deploy.existsK8S"),type:"warning"}):e.$message({message:a,type:"error"})}))})).catch((function(){}))},prevStep:function(){this.dialogVisible=!0,this.dialogConfigVisible=!1},next:function(e){this.deployObj=e,this.dialogVisible=!1,this.activeName?this.dialogConfigVisible=!0:this.save()},save:function(){this.dialogConfigVisible=!1,this.$refs.install.show()}}},M=C,O=Object(n["a"])(M,y,w,!1,null,null,null),N=O.exports,D=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-dialog",{attrs:{title:e.$t("market.service.install"),visible:e.dialogVisible,width:"80%"},on:{"update:visible":function(t){e.dialogVisible=t}}},[e.model?a("let-form",{ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"45%"},nativeOn:{submit:function(t){return t.preventDefault(),e.next(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.node_name"),required:""}},[a("let-select",{attrs:{size:"small",multiple:""},on:{change:e.nodeChange},model:{value:e.selectNodeList,callback:function(t){e.selectNodeList=t},expression:"selectNodeList"}},e._l(e.nodeList,(function(e){return a("let-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.format"),required:""}},[a("el-radio",{attrs:{label:"docker"},model:{value:e.model.format,callback:function(t){e.$set(e.model,"format",t)},expression:"model.format"}},[e._v(e._s(e.$t("deployService.form.docker")))]),a("el-radio",{attrs:{label:"tgz"},model:{value:e.model.format,callback:function(t){e.$set(e.model,"format",t)},expression:"model.format"}},[e._v(e._s(e.$t("deployService.form.tgz")))])],1),a("br"),a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),required:""}},[a("let-input",{attrs:{size:"small",disabled:e.upgrade,placeholder:e.$t("deployService.form.appAdd"),required:"","required-tip":e.$t("deployService.form.appTips"),pattern:"^[a-zA-Z]([a-zA-Z0-9]+)?$","pattern-tip":e.$t("deployService.form.applicationTip")},model:{value:e.model.application,callback:function(t){e.$set(e.model,"application",t)},expression:"model.application"}})],1),a("let-form-item",{attrs:{label:e.$t("deployService.form.serviceName"),required:""}},[a("let-input",{attrs:{size:"small",disabled:e.upgrade,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),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)],1),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)],1),a("let-form-item",{attrs:{label:"SET"}},[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){return e.$set(e.model,"enable_set",t)},"update:name":function(t){return e.$set(e.model,"set_name",t)},"update:area":function(t){return e.$set(e.model,"set_area",t)},"update:group":function(t){return e.$set(e.model,"set_group",t)}}})],1),a("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],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),a("let-form-item",{directives:[{name:"show",rawName:"v-show",value:e.enableLogin,expression:"enableLogin"}],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),a("let-table",{attrs:{data:e.model.adapters}},[a("let-table-column",{attrs:{title:"OBJ",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-input",{attrs:{size:"small",disabled:"",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"}})]}}],null,!1,2824267205)}),a("let-table-column",{attrs:{title:e.$t("deployService.form.node_name"),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-input",{attrs:{size:"small",disabled:"",required:""},model:{value:t.row.node_name,callback:function(a){e.$set(t.row,"node_name",a)},expression:"props.row.node_name"}})]}}],null,!1,1244740371)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.endpoint"),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",placeholder:"IP",required:"","required-tip":e.$t("deployService.table.tips.ip")},model:{value:t.row.bind_ip,callback:function(a){e.$set(t.row,"bind_ip",a)},expression:"props.row.bind_ip"}})]}}],null,!1,3068069897)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"90px"},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"}})]}}],null,!1,1220625212)}),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:{disabled:"",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")]),a("let-radio",{attrs:{disabled:"",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")])]}}],null,!1,3557108815)}),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:{disabled:"",label:"tars"},model:{value:t.row.protocol,callback:function(a){e.$set(t.row,"protocol",a)},expression:"props.row.protocol"}},[e._v("TARS")]),a("let-radio",{attrs:{disabled:"",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")))])]}}],null,!1,3140062114)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"60px"},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"}})]}}],null,!1,2817937256)}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.connections"),width:"90px"},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"}})]}}],null,!1,1416507745)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"90px"},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"}})]}}],null,!1,244119276)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"120px"},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"}})]}}],null,!1,2974112774)})],1),a("let-button",{attrs:{type:"button",theme:"sub-primary"},on:{click:function(t){return e.getAutoPort()}}},[e._v(e._s(e.$t("deployService.form.getPort"))+" ")]),e._v(" "),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1):e._e()],1),e.model?a("el-dialog",{attrs:{title:e.$t("common.config"),visible:e.dialogConfigVisible,width:"80%"},on:{"update:visible":function(t){e.dialogConfigVisible=t}},nativeOn:{submit:function(t){return t.preventDefault(),e.save(t)}}},[a("let-form",{ref:"configForm",attrs:{itemWidth:"100%"}},[a("el-tabs",{attrs:{type:"border-card"},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.model.config,(function(t){return a("el-tab-pane",{key:t.name,attrs:{label:t.name,name:t.name}},[a("let-form-item",{attrs:{label:e.$t("cfg.btn.fileName"),required:""}},[a("let-input",{attrs:{size:"small",disabled:"",required:""},model:{value:t.name,callback:function(a){e.$set(t,"name",a)},expression:"config.name"}})],1),a("let-form-item",{attrs:{label:e.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:16,required:""},model:{value:t.content,callback:function(a){e.$set(t,"content",a)},expression:"config.content"}})],1)],1)})),1),a("br"),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1)],1):e._e(),a("PublishStatus",{ref:"publishStatus"})],1)},L=[],A=(a("99af"),a("a15b"),a("acfd")),I=a("2494"),T=["tars_cpp","tars_java","tars_php","tars_nodejs","not_tars","tars_go"],R=function(e){switch(e){case"cpp":return T[0];case"java":return T[1];case"php":return T[2];case"nodejs":return T[3];case"go":return T[5]}return T[4]},F={name:"Install",components:{SetInputer:I["a"],PublishStatus:A["a"]},data:function(){return{dialogVisible:!1,dialogConfigVisible:!1,upgrade:!1,types:T,applicationList:[],selectNodeList:[],nodeList:[],templates:[],deployObj:{},model:null,activeName:null,enableLogin:!1,socket:null,k8s:!0,publishModal:{show:!1,model:null,elegant:!1,eachnum:1}}},props:["serviceVersion"],mounted:function(){this.k8s="/k8s.html"==location.pathname},methods:{show:function(){this.upgrade=!1,this.dialogVisible=!0,this.dialogConfigVisible=!1,this.fetchBaseInfo(),this.fetchServiceVersion()},showUpgrade:function(){var e=this;this.$confirm(this.$t("market.deploy.exists"),this.$t("market.deploy.upgrade"),{confirmButtonText:this.$t("market.deploy.exists"),cancelButtonText:this.$t("market.deploy.cancel"),type:"warning"}).then((function(){e.upgrade=!0,e.upgradeNative()})).catch((function(){}))},initialModelK8S:function(e){e.config&&e.config.length>0&&(this.activeName=e.config[0].name),this.model={application:e.app,server_name:e.server,server_type:R(e.cloud.lang),template_name:e.template_name||"tars.default",enable_set:!1,format:"docker",profile:e.profile||"",set_name:"",set_area:"",set_group:"",operator:"",developer:"",adapters:[],source:"",config:e.config||[]},this.nodeChange(this.selectNodeList)},nodeChange:function(e){var t=this;this.model.adapters=[],e.forEach((function(e){t.deployObj.servants.forEach((function(a){t.model.adapters.push({obj_name:a.name,bind_ip:e,port:a.port,node_name:e,port_type:a.isTcp?"tcp":"udp",protocol:a.isTars?"tars":"not_tars",thread_num:a.thread,max_connections:a.connection,queuecap:a.capacity,queuetimeout:2e4})}))}))},fetchBaseInfo:function(){var e=this;this.$ajax.getJSON("/server/api/isEnableLogin").then((function(t){e.enableLogin=t.enableLogin||!1})).catch((function(e){})),this.$ajax.getJSON("/server/api/application_list").then((function(t){e.applicationList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/node_list").then((function(t){e.nodeList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))})),this.$ajax.getJSON("/server/api/template_name_list").then((function(t){e.templates=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},fetchServiceVersion:function(){var e=this,t=this.$Loading.show();(new k["a"]).getPlain(this.serviceVersion.deploy).then((function(a){t.hide(),a.ok&&a.text().then((function(t){e.deployObj=x["default"].load(t),e.initialModelK8S(e.deployObj)}))})).catch((function(a){t.hide(),e.$message({message:a,type:"error"})}))},upgradeNative:function(){this.publishService(this.serviceVersion.installData.group,this.serviceVersion.installData.name)},deploy:function(){for(var e=this,t=[],a=0;a<this.model.adapters.length;a++){var r=this.model.adapters[a].obj_name+"-"+this.model.adapters[a].node_name;if(-1!=t.indexOf(r))return void this.$tip.error("".concat(this.$t("deployService.infos.objNodedupErr")));t.push(r)}var s=this.$Loading.show(),i={};i["tars.io/CloudLogo"]=this.serviceVersion.logo,i["tars.io/ServerApp"]=this.model.application,i["tars.io/ServerName"]=this.model.server_name,i["tars.io/CloudInstall"]=this.deployObj.cloud.group+"-"+this.deployObj.cloud.name+"-"+this.deployObj.cloud.version,i["tars.io/CloudDigest"]=this.serviceVersion.digest,this.model.source=JSON.stringify(i),this.$ajax.postJSON("/server/api/deploy_server_from_cloud",this.model).then((function(t){s.hide(),e.publishService(e.model.application,e.model.server_name)})).catch((function(t){s.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getAutoPort:function(){var e=this,t=this.$Loading.show(),a=this.model.adapters,r=[];a.forEach((function(e){r.push(e.bind_ip)})),this.$ajax.getJSON("/server/api/auto_port",{node_name:r.join(";")}).then((function(r){t.hide(),r.forEach((function(t,r){e.$set(a[r],"port",String(t.port||""))}))})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},next:function(){0!=this.selectNodeList.length?(this.dialogVisible=!1,this.activeName?this.dialogConfigVisible=!0:this.save()):this.$tip.error("".concat(this.$t("deployService.form.nodeListTip")))},savePublishServer:function(e,t,a,r){var s=this;this.publishModal.elegant=this.elegantChecked||!1,this.publishModal.eachnum=this.eachNum||1,this.publishModal.command="patch_tars",this.publishModal.model={application:e,server_name:t,serverList:[],patch_id:a,update_text:"install from cloud"},r.forEach((function(e){s.publishModal.model.serverList.push({id:e})})),this.$refs.publishStatus.savePublishServer(this.publishModal)},publishService:function(e,t){var a=this,r=this.$Loading.show(this.$t("market.service.installing")),s="";if("http:"==window.location.protocol)s="ws://".concat(window.location.host,"/web/upload?app=").concat(e,"&server=").concat(t,"&uid=").concat(window.localStorage.localUid);else{if("https:"!=window.location.protocol)return void console.log("unknown protocol",window.location);s="wss://".concat(window.location.host,"/web/upload?app=").concat(e,"&server=").concat(t,"&uid=").concat(window.localStorage.localUid)}var i=this,o=new WebSocket(s,"upload-protocol");o.onopen=function(){var e=a.serviceVersion.prefix+a.serviceVersion.bin,t=new k["a"];t.getPlain(e).then((function(e){var t=e.body.getReader();new ReadableStream({start:function(e){function a(){t.read().then((function(t){var r=t.done,s=t.value;if(r)return o.send("end"),void e.close();if(!o||1!=o.readyState)return i.$message({message:i.$t("common.error"),type:"error"}),void e.close();while(1){if(!(s.length>65535)){o.send(s);break}o.send(s.subarray(0,65535)),s=s.subarray(65535)}a()}))}o.send("start"),a()}})})).catch((function(e){i.$message({message:"".concat(i.$t("common.error"),": ").concat(e.message||e.err_msg),type:"error"})}))},o.onerror=function(){r.hide(),console.log("[error] Connection error"),o=null},o.close=function(){r.hide(),console.log("[close] Connection closed cleanly")},o.onmessage=function(a){r.hide(),i.dialogConfigVisible=!1;var s=JSON.parse(a.data);if(200!=s.code)i.$message({message:"".concat(i.$t("common.error")),type:"error"});else{var o=s.data.id,n=s.data.serverIds;i.savePublishServer(e,t,o,n)}},o.onsend=function(e){o.send(e)}},save:function(){var e=this;if(this.$refs.form.validate()){var t=this.model,a=this.$Loading.show(),r=[];t.adapters.forEach((function(e){r.push(e.node_name)})),this.$ajax.postJSON("/server/api/server_exist",{application:t.application,server_name:t.server_name,node_names:r}).then((function(t){a.hide(),t?e.$confirm(e.$t("deployService.form.overwriteDeployServiceTip"),e.$t("common.alert")).then((function(){e.deploy()})).catch((function(){})):e.deploy()})).catch((function(t){a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}}}},P=F,z=(a("c9e0"),Object(n["a"])(P,D,L,!1,null,null,null)),E=z.exports,V={name:"List",components:{upgradeK8S:N,upgradeNative:E},data:function(){return{column:4,row:0,data:[],upgrade:{},isVisible:{},serviceVersion:null,upgradeServiceVersion:null,version:"",versions:[],k8s:!0}},methods:{valid:function(e,t){return(e-1)*this.column+t-1<this.data.length},get:function(e,t){var a=(e-1)*this.column+t-1;return this.data[a]},isUpgrade:function(e,t){var a=this.getUpgrade(this.get(e,t));return this.upgrade[a.group+"-"+a.name+"-"+a.version]},getServerLogo:function(e,t){return this.get(e,t)["tars.io/CloudLogo"]},getServerName:function(e,t){return this.get(e,t)["tars.io/ServerApp"]+"/"+this.get(e,t)["tars.io/ServerName"]},getCloudServerName:function(e,t){return this.get(e,t)["tars.io/CloudInstall"]},getDigest:function(e,t,a){return a?this.get(e,t)["tars.io/CloudDigest"].substr(0,a+7):this.get(e,t)["tars.io/CloudDigest"]},getUpgrade:function(e){var t=e["tars.io/CloudInstall"],a=t.indexOf("-"),r=t.substr(0,a),s=t.indexOf("-",a+1),i=t.substr(a+1,s-a-1),o=t.substr(s+1);return{group:r,name:i,version:o,digest:e["tars.io/CloudDigest"]}},goService:function(e){this.$router.push("/market/service/"+e.replace(/-/g,"/"))},fetchListInstall:function(){var e=this;this.$ajax.getJSON("/market/api/list_install",{k8s:this.k8s}).then((function(t){e.data=t,e.row=Math.ceil((e.data.length+1)/e.column),e.fetchCheckUpgrade()})).catch((function(t){e.$message({message:t.err_msg,type:"error"})}))},fetchServiceVersionData:function(e,t,a){var r=this,s=this.getUpgrade(this.get(e,t));this.$cloud.call("cloud-market","getServiceVersion",{req:{group:s.group,name:s.name,version:s.version}}).then((function(e){r.serviceVersion=null,r.$nextTick((function(){r.serviceVersion=e.rsp,r.version=r.serviceVersion.version,a&&a()}))})).catch((function(e){r.$message({message:e,type:"error"})}))},fetchVersionListData:function(e,t){var a=this;this.fetchServiceVersionData(e,t,(function(){var r=a.getUpgrade(a.get(e,t));a.$cloud.call("cloud-market","getServiceVersionList",{req:{group:r.group,name:r.name}}).then((function(r){a.versions=r.rsp.versions,a.isVisible[e+"_"+t]=!0})).catch((function(e){a.$message({message:e,type:"error"})}))}))},changeVersion:function(e,t){var a=this,r=this.getUpgrade(this.get(e,t));this.$cloud.call("cloud-market","getServiceVersion",{req:{group:r.group,name:r.name,version:this.version}}).then((function(r){a.upgradeServiceVersion=r.rsp,a.upgradeServiceVersion.logo=a.upgradeServiceVersion.prefix+a.upgradeServiceVersion.logo+"?t="+a.upgradeServiceVersion.update_time,a.upgradeServiceVersion.readme=a.upgradeServiceVersion.prefix+a.upgradeServiceVersion.readme+"?t="+a.upgradeServiceVersion.update_time,a.upgradeServiceVersion.deploy=a.upgradeServiceVersion.prefix+a.upgradeServiceVersion.deploy+"?t="+a.upgradeServiceVersion.update_time,a.upgradeServiceVersion.changelist=a.upgradeServiceVersion.prefix+a.upgradeServiceVersion.changelist+"?t="+a.upgradeServiceVersion.update_time,a.upgradeServiceVersion.create_time=m()(a.upgradeServiceVersion.create_time).format("YYYY-MM-DD"),a.upgradeServiceVersion.update_time=m()(a.upgradeServiceVersion.update_time).format("YYYY-MM-DD"),a.upgradeServiceVersion.installData={group:a.get(e,t)["tars.io/ServerApp"],name:a.get(e,t)["tars.io/ServerName"]},a.isVisible[e+"_"+t]=!1,a.$nextTick((function(){a.k8s?a.$refs.upgradeK8S.showUpgrade():a.$refs.upgradeNative.showUpgrade()}))})).catch((function(e){a.$message({message:e,type:"error"})}))},upgradeSucc:function(){this.fetchInstallFromCloud()},fetchCheckUpgrade:function(){var e=this,t=[];this.data.forEach((function(a){var r=e.getUpgrade(a);t.push(r)})),this.$cloud.call("cloud-market","checkUpgrade",{req:{info:t}}).then((function(t){e.upgrade={},t.rsp.info.forEach((function(t){e.upgrade[t.group+"-"+t.name+"-"+t.version]=t.upgrade}))})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){this.k8s="/k8s.html"==location.pathname,window.localStorage.ticket&&this.fetchListInstall()}},q=V,B=(a("c2e92"),Object(n["a"])(q,b,_,!1,null,null,null)),U=B.exports,G=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"75%"}},[a("el-header",{staticClass:"header"},[e.serviceVersion?a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:3}},[a("el-avatar",{attrs:{size:100,src:e.serviceVersion.logo}})],1),a("el-col",{attrs:{span:21}},[a("span",[a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticClass:"title"},[e._v(e._s(e.serviceVersion.name))]),a("el-select",{staticStyle:{width:"100px"},on:{"visible-change":e.visibleChange,change:e.change},model:{value:e.serviceVersion.version,callback:function(t){e.$set(e.serviceVersion,"version",t)},expression:"serviceVersion.version"}},e._l(e.versions,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticStyle:{"margin-bottom":"10px","margin-right":"10px"}},[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",size:"mini"}},[e._v(e._s(e.$t("market.service.lang")))]),a("el-tag",{attrs:{effect:"plain",type:"success",size:"mini"}},[e._v(e._s(e.serviceVersion.lang))])],1)]),a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticStyle:{"margin-bottom":"10px","margin-right":"10px"}},[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",size:"mini"}},[e._v(e._s(e.$t("market.service.developer")))]),e._l(e.serviceVersion.collaborators.split(","),(function(t){return a("el-tag",{key:t,staticStyle:{"margin-right":"5px"},attrs:{effect:"plain",type:"success",size:"mini"}},[e._v(e._s(t))])}))],2)]),a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticStyle:{"margin-bottom":"10px","margin-right":"10px"}},[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",type:"warning",size:"mini"}},[e._v(e._s(e.$t("market.service.project")))]),a("el-tag",{staticStyle:{cursor:"pointer"},attrs:{effect:"plain",type:"warning",size:"mini"},on:{click:function(t){return e.goRepository(e.serviceVersion.repository)}}},[e._v(e._s(e.serviceVersion.repository))])],1)]),a("div",{staticStyle:{"margin-bottom":"5px"}},[a("span",{staticStyle:{"margin-bottom":"10px","margin-right":"10px"}},[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",size:"mini",type:"danger"}},[e._v(e._s(e.$t("market.service.create")))]),a("el-tag",{attrs:{effect:"plain",type:"danger",size:"mini"}},[e._v(e._s(e.serviceVersion.create_time))])],1),a("span",[a("el-tag",{staticStyle:{"margin-right":"5px"},attrs:{effect:"dark",size:"mini",type:"danger"}},[e._v(e._s(e.$t("market.service.update")))]),a("el-tag",{attrs:{effect:"plain",type:"danger",size:"mini"}},[e._v(e._s(e.serviceVersion.update_time))])],1)]),a("span",{staticClass:"description"},[a("el-alert",{attrs:{title:e.getDescription(e.serviceVersion),type:"info",closable:!1}})],1),a("el-tag",{staticStyle:{"margin-top":"10px",cursor:"pointer"},attrs:{type:"danger"},on:{click:e.showInstall}},[e._v(e._s(e.$t("market.service.install")))])],1)])],1):e._e()],1),e.serviceVersion?a("el-main",[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:e.$t("market.service.service"),name:"readme"}},["readme"==e.activeName?a("markdown",{attrs:{serviceVersion:e.serviceVersion,file:e.getReadme(e.serviceVersion)}}):e._e()],1),a("el-tab-pane",{attrs:{label:e.$t("market.service.deploy"),name:"deploy"}},["deploy"==e.activeName?a("deploy",{attrs:{serviceVersion:e.serviceVersion}}):e._e()],1),a("el-tab-pane",{attrs:{label:e.$t("market.service.protocol"),name:"protocols"}},["protocols"==e.activeName?a("protocols",{attrs:{serviceVersion:e.serviceVersion}}):e._e()],1),a("el-tab-pane",{attrs:{label:e.$t("market.service.changelist"),name:"changelist"}},["changelist"==e.activeName?a("markdown",{attrs:{serviceVersion:e.serviceVersion,file:e.serviceVersion.changelist}}):e._e()],1),a("el-tab-pane",{attrs:{label:e.$t("market.service.log"),name:"logs"}},["logs"==e.activeName?a("logs",{attrs:{serviceVersion:e.serviceVersion}}):e._e()],1)],1)],1):e._e(),e.installServiceVersion&&e.k8s?a("installK8S",{ref:"installK8S",attrs:{serviceVersion:e.installServiceVersion}}):e._e(),e.installServiceVersion&&!e.k8s?a("installNative",{ref:"installNative",attrs:{serviceVersion:e.installServiceVersion}}):e._e()],1)},J=[],H=(a("2ca0"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{padding:"20px",width:"75%"}},[a("div",{staticClass:"markdown-body hljs",domProps:{innerHTML:e._s(e.html)}}),a("div",{staticClass:"fix_nav"},[a("div",{staticClass:"tit_index"},[e._v(" "+e._s(e.$t("market.index.directory"))+" ")]),a("ul"),a("div",{staticClass:"cur_bg"})])])}),Z=[],Y=(a("baa5"),a("7c5c")),W=a("1487"),Q=a.n(W);a("2876");Y["marked"].setOptions({renderer:new Y["marked"].Renderer,highlight:function(e,t){var a=Q.a.getLanguage(t)?t:"plaintext";return Q.a.highlight(e,{language:a}).value},langPrefix:"hljs language-",pedantic:!1,gfm:!0,breaks:!1,sanitize:!1,smartLists:!0,smartypants:!1,xhtml:!1});var K=new k["a"],X={name:"Markdown",data:function(){return{html:""}},props:["serviceVersion","file"],methods:{markdownToHtml:function(e){this.html=Y["marked"].parse(e),this.$nextTick((function(){var e=[],t=[];function a(){$(".fix_nav ul").html(e),$(".fix_nav ul li").eq(0).addClass("active")}$(".cur_bg").css("top",0),$("main h1,main h2,main h3").each((function(a){$(this).attr("role",a),t.push(a),e.push('<li class="'+("H2"==$(this).get(0).tagName?"h2":"H1"==$(this).get(0).tagName?"h1":"h3")+'"><a href="javascript:document.getElementById(&apos;'+$(this).attr("id")+'&apos;).scrollIntoView()">'+$(this).text()+"</a></li>")})),a(),$("main").scroll((function(){if($("main").scrollTop()+$("main").height()>=$("main>div").height())$(".fix_nav ul li").eq(t.length-1).addClass("active").siblings().removeClass("active"),$(".cur_bg").css("top",26*(t.length-1));else for(var e=0;e<t.length;e++)null!=$('[role ="'+t[e]+'"]').offset()&&null!=$('[role ="'+t[e+1]+'"]').offset()&&$('[role ="'+t[e]+'"]').offset().top-100<0&&$('[role ="'+t[e+1]+'"]').offset().top>0&&($(".fix_nav ul li").eq(e).addClass("active").siblings("li").removeClass("active"),$(".cur_bg").css("top",26*e))})),$(".fix_nav ul li a").on("click",(function(){$("this").parent().addClass("active").siblings().removeClass("active"),$(".cur_bg").css("top",26*$(this).parent().index())})),$(".fix_nav").toggleClass("show")}))},fetchReadme:function(e){var t=this;K.getPlain(e).then((function(e){e.ok&&e.text().then((function(e){t.markdownToHtml(e)}))})).catch((function(e){t.$message({message:e,type:"error"})}))}},created:function(){window.fetchReadme=this},mounted:function(){var e=this,t={link:function(t,a,r){var s="";return t.startsWith("#")?s="<a href=\"javascript:document.getElementById('"+t.substring(1)+"').scrollIntoView();\"":t.startsWith("http://")||t.startsWith("https://")?s='<a target="_black" href="'+t+'"':(t=e.file.substr(0,e.file.lastIndexOf("/"))+"/"+t,s="<a javascript=':;' href='#' onclick=\"doFetchReadme('"+t+"')\""),a&&(s+=' title="'+a+'"'),s+=">"+r+"</a>",s},image:function(t,a,r){0!=t.indexOf("/")&&(t=e.serviceVersion.prefix+t);var s='<div class="images" v-viewer><img src="'+t+'" alt="'+r+'"';return s+="> </div>",s}};Y["marked"].use({renderer:t}),e.fetchReadme(this.file)}};window.doFetchReadme=function(e){window.fetchReadme.fetchReadme(e)};var ee=X,te=(a("a462"),Object(n["a"])(ee,H,Z,!1,null,null,null)),ae=te.exports,re=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("yaml-editor",{ref:"yamlEdit",staticStyle:{margin:"1px"},model:{value:e.data.deploy,callback:function(t){e.$set(e.data,"deploy",t)},expression:"data.deploy"}})],1)},se=[],ie=a("1c27"),oe={name:"Deploy",components:{YamlEditor:ie["a"]},props:["serviceVersion"],data:function(){return{data:{deploy:"",k8s:!0}}},methods:{fetchDeploy:function(){var e=this;(new k["a"]).getPlain(this.serviceVersion.deploy).then((function(t){t.ok&&t.text().then((function(t){e.data.deploy=t}))})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){this.k8s="/k8s.html"==location.pathname,this.$refs.yamlEdit.readonly(),this.fetchDeploy()}},ne=oe,le=Object(n["a"])(ne,re,se,!1,null,null,null),ce=le.exports,ue=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-tabs",{attrs:{type:"border-card"}},e._l(e.protocols,(function(t){return a("el-tab-pane",{key:t.name,attrs:{label:t.name}},[a("el-tag",{attrs:{type:"success"},on:{click:function(a){return e.download(t.name)}}},[e._v(e._s(e.$t("market.download")))]),a("br"),a("br"),a("div",{staticStyle:{border:"1px solid grey"}},[a("pre",{staticStyle:{margin:"5px 10px 10px 10px"},domProps:{innerHTML:e._s(t.content)}})])],1)})),1)],1)},de=[],pe={name:"Protocols",components:{},props:["serviceVersion"],data:function(){return{protocols:[]}},methods:{download:function(e){(new k["a"]).download(this.serviceVersion.prefix+e)},fetchProtocol:function(){var e=this,t=function(t){(new k["a"]).getPlain(e.serviceVersion.prefix+e.serviceVersion.protocols[t]).then((function(a){a.ok&&a.text().then((function(a){e.protocols.push({name:t,content:Q.a.highlight(a,{language:"cpp"}).value})}))})).catch((function(t){e.$message({message:t,type:"error"})}))};for(var a in this.serviceVersion.protocols)t(a)}},created:function(){},mounted:function(){this.fetchProtocol()}},me=pe,fe=Object(n["a"])(me,ue,de,!1,null,null,null),he=fe.exports,ge=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.logs,stripe:"","show-header":!1}},[a("el-table-column",{attrs:{label:e.$t("market.table.version")},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-row",{attrs:{gutter:24}},[a("el-col",{attrs:{span:24}},[a("span",[a("span",{style:e.getLogStyle(t.row.logLevel)},[e._v(e._s(t.row.text))])])])],1)]}}])})],1)},ve=[],be={name:"Logs",data:function(){return{logs:[]}},props:["serviceVersion"],methods:{getLogStyle:function(e){return 1==e?"color:green":2==e?"color:red":""},fetchLogs:function(){var e=this;this.$cloud.call("cloud-market","getServiceLogs",{req:{group:this.serviceVersion.group,name:this.serviceVersion.name,version:this.serviceVersion.version}}).then((function(t){e.logs=t.logs})).catch((function(t){e.$message({message:t,type:"error"})}))}},created:function(){},mounted:function(){this.fetchLogs()}},_e=be,ye=(a("da9f"),Object(n["a"])(_e,ge,ve,!1,null,null,null)),we=ye.exports,$e={name:"ServiceInfo",components:{markdown:ae,deploy:ce,protocols:he,installK8S:N,installNative:E,logs:we},data:function(){return{group:"",name:"",version:"",versions:[],installServiceVersion:null,serviceVersion:null,activeName:"readme",k8s:!0}},watch:{$route:function(e,t){e.path.startsWith("/market/service")&&this.loadData(e.params.group,e.params.name,e.params.version)}},methods:{handleClick:function(){},goRepository:function(e){window.open(e)},loadData:function(e,t,a){this.group=e,this.name=t,this.version=a,this.fetchServiceVersionData(this.version)},change:function(e){this.version=e,this.fetchServiceVersionData(e)},visibleChange:function(e){e&&this.fetchVersionListData()},getDescription:function(e){return"cn"==this.$cookie.get("locale")&&e.description_cn||e.description},getReadme:function(e){return"cn"==this.$cookie.get("locale")&&e.readme_cn||e.readme},fetchServiceVersionData:function(e){var t=this;this.$cloud.call("cloud-market","getServiceVersion",{req:{group:this.group,name:this.name,version:e}}).then((function(e){t.serviceVersion=null,t.$nextTick((function(){t.serviceVersion=e.rsp,t.serviceVersion.logo=t.serviceVersion.prefix+t.serviceVersion.logo+"?t="+t.serviceVersion.update_time,t.serviceVersion.readme=t.serviceVersion.prefix+t.serviceVersion.readme+"?t="+t.serviceVersion.update_time,t.serviceVersion.readme_cn=t.serviceVersion.prefix+t.serviceVersion.readme_cn+"?t="+t.serviceVersion.update_time,t.serviceVersion.deploy=t.serviceVersion.prefix+t.serviceVersion.deploy+"?t="+t.serviceVersion.update_time,t.serviceVersion.changelist=t.serviceVersion.prefix+t.serviceVersion.changelist+"?t="+t.serviceVersion.update_time,t.serviceVersion.create_time=m()(t.serviceVersion.create_time).format("YYYY-MM-DD"),t.serviceVersion.update_time=m()(t.serviceVersion.update_time).format("YYYY-MM-DD")}))})).catch((function(e){t.$message({message:e,type:"error"})}))},fetchVersionListData:function(){var e=this;this.$cloud.call("cloud-market","getServiceVersionList",{req:{group:this.group,name:this.name}}).then((function(t){e.versions=t.rsp.versions})).catch((function(t){e.$message({message:t,type:"error"})}))},showInstall:function(){var e=this;this.installServiceVersion=this.serviceVersion,this.$nextTick((function(){e.k8s?e.$refs.installK8S.show():e.$refs.installNative.show()}))}},created:function(){},mounted:function(){this.k8s="/k8s.html"==location.pathname,this.loadData(this.$route.params.group,this.$route.params.name,this.$route.params.version)}},ke=$e,xe=(a("c762"),Object(n["a"])(ke,G,J,!1,null,null,null)),Se=xe.exports,je=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("div",[a("h1",{staticClass:"top_txt"},[e._v(" "+e._s(e.$t("market.login.loginTitle"))+" ")])]),a("el-form",{ref:"ruleFormLogin",attrs:{"label-width":"0",model:e.login,rules:e.rules,autocomplete:"on"}},[a("el-form-item",{attrs:{prop:"uid"}},[a("el-input",{attrs:{placeholder:e.$t("market.login.userName"),"prefix-icon":"el-icon-message",autocomplete:"on"},model:{value:e.login.uid,callback:function(t){e.$set(e.login,"uid",t)},expression:"login.uid"}})],1),a("el-form-item",{attrs:{prop:"password"}},[a("el-input",{attrs:{placeholder:e.$t("market.login.password"),"show-password":"","prefix-icon":"el-icon-lock",autocomplete:"on"},model:{value:e.login.password,callback:function(t){e.$set(e.login,"password",t)},expression:"login.password"}})],1),a("el-form-item",{attrs:{required:""}},[a("div",{staticClass:"captcha_box"},[a("el-input",{attrs:{"prefix-icon":"el-icon-finished",type:"text",placeholder:e.$t("market.login.captcha"),required:"","required-tip":e.$t("market.login.captchaTips")},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.login(t)}},model:{value:e.login.captcha,callback:function(t){e.$set(e.login,"captcha",t)},expression:"login.captcha"}}),a("img",{staticClass:"captcha_code",attrs:{title:e.$t("market.login.refresh"),src:e.login.captchaUrl},on:{click:e.reloadCaptcha}})],1)]),a("el-button",{staticClass:"btn_long",attrs:{type:"primary",size:"small",round:""},on:{click:e.doLogin}},[e._v(e._s(e.$t("market.login.login")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("div",{staticClass:"bot_txt"},[a("span",[e._v(e._s(e.$t("market.login.registerInfo"))+" "),a("a",{attrs:{size:"small",round:""},on:{click:e.show_registry}},[e._v(e._s(e.$t("market.login.register")))]),e._v(" "+e._s(e.$t("market.login.and"))+" "),a("a",{attrs:{size:"small",round:""},on:{click:e.show_active}},[e._v(e._s(e.$t("market.login.activated")))])]),a("br"),a("span",[e._v(e._s(e.$t("market.login.forget"))+" "),a("a",{staticStyle:{float:"right"},attrs:{size:"small",round:""},on:{click:e.forget_pass}},[e._v(e._s(e.$t("market.login.findPassword")))]),e._v(" "+e._s(e.$t("market.login.and"))+" "),a("a",{staticStyle:{float:"right"},attrs:{size:"small",round:""},on:{click:e.reset_pass}},[e._v(e._s(e.$t("market.login.resetPassword")))]),e._v(" "+e._s(e.$t("market.login.password"))+" ")])])])],1)],1)],1)},Ce=[],Me=(a("466d"),a("58b7")),Oe=a.n(Me),Ne=(a("83a3"),{name:"Login",data:function(){var e=this,t=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},a=function(a,r,s){r.length<8?s(new Error(e.$t("market.login.passwordInfo"))):t(r)?s():s(new Error(e.$t("market.login.passwordInfo")))},r=function(t,a,r){var s=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){s.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{login:{ticket:"",uid:window.localStorage.uid||"",captcha:"",password:"",captchaUrl:"",session:""},rules:{uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:r,trigger:"blur"}],password:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}]}}},methods:{reloadCaptcha:function(){var e=this;this.$cloud.call("cloud-user","captcha").then((function(t){e.login.captchaUrl="data:image/svg+xml;base64,"+t.ci.captchaBase64,e.login.session=t.ci.session})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))},forget_pass:function(){this.$router.push("/market/user/forget")},show_registry:function(){this.$router.push("/market/user/register")},show_active:function(){this.$router.push("/market/user/activate")},reset_pass:function(){this.$router.push("/market/user/resetPass")},doLogin:function(){var e=this;this.$refs["ruleFormLogin"].validate((function(t){if(!t)return!1;e.$cloud.call("cloud-user","login",{li:{uid:e.login.uid,password:Oe()(e.login.password),captcha:e.login.captcha,session:e.login.session}}).then((function(t){t.ticket?(e.login.ticket=t.ticket,e.login.isLogin=!0,window.localStorage.ticket=t.ticket,window.localStorage.uid=e.login.uid,e.$store.commit({type:"marketUid",uid:window.localStorage.uid}),e.$router.push("/market/list")):(e.login.ticket="",e.login.isLogin=!1,window.localStorage.ticket="")})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){this.reloadCaptcha(),this.$refs["ruleFormLogin"].resetFields()}}),De=Ne,Le=Object(n["a"])(De,je,Ce,!1,null,null,null),Ae=Le.exports,Ie=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(" "+e._s(e.$t("market.login.register"))+" ")]),a("el-form",{ref:"ruleRegisterForm",attrs:{"label-width":"200px",model:e.login,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.userName"),prop:"uid",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputUserName"),"prefix-icon":"el-icon-message"},model:{value:e.login.uid,callback:function(t){e.$set(e.login,"uid",t)},expression:"login.uid"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.password"),prop:"password"}},[a("el-input",{attrs:{"prefix-icon":"el-icon-key",placeholder:e.$t("market.login.passwordInfo"),"show-password":""},model:{value:e.login.password,callback:function(t){e.$set(e.login,"password",t)},expression:"login.password"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.repeatPassword"),prop:"checkPass",required:""}},[a("el-input",{attrs:{"prefix-icon":"el-icon-key",placeholder:e.$t("market.login.inputRepeatPassword"),"show-password":""},model:{value:e.login.checkPass,callback:function(t){e.$set(e.login,"checkPass",t)},expression:"login.checkPass"}})],1),a("el-button",{staticClass:"btn_long",attrs:{type:"primary",size:"small",round:""},on:{click:e.register}},[e._v(e._s(e.$t("market.login.register")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.show_login}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},Te=[],Re=a("ade3"),Fe={name:"Register",data:function(){var e=this,t=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},a=function(a,r,s){r.length<8?s(new Error(e.$t("market.login.passwordInfo"))):t(r)?s():s(new Error(e.$t("market.login.passwordInfo")))},r=function(t,a,r){""===a?r(new Error(e.$t("market.login.inputPasswordAgain"))):a!==e.login.password?r(new Error(e.$t("market.login.passwordDiff"))):r()},s=function(t,a,r){var s=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){s.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{login:{ticket:"",uid:window.localStorage.uid||"",captcha:"",password:"",checkPass:"",captchaUrl:"",session:""},rules:Object(Re["a"])({uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:s,trigger:"blur"}],password:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}],checkPass:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}]},"checkPass",[{validator:r,trigger:"blur"}])}},methods:{show_login:function(){this.$router.push("/market/user/login")},show_activate:function(){this.$router.push("/market/user/activate")},register:function(){var e=this;this.$refs["ruleRegisterForm"].validate((function(t){if(!t)return!1;e.$cloud.call("cloud-user","register",{uid:e.login.uid,password:Oe()(e.login.password),origin:window.location.origin}).then((function(t){window.localStorage.uid=e.login.uid,e.show_activate()})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){}},Pe=Fe,ze=Object(n["a"])(Pe,Ie,Te,!1,null,null,null),Ee=ze.exports,Ve=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("el-alert",{attrs:{title:e.$t("market.login.registerSucc"),type:"success"}}),a("div",[a("h1",{staticClass:"top_txt"},[e._v(" "+e._s(e.$t("market.login.activing"))+" ")])]),a("el-form",{ref:"ruleForgetForm",attrs:{"label-width":"150px",model:e.login,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.userName"),prop:"uid",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputUserName"),"prefix-icon":"el-icon-message"},model:{value:e.login.uid,callback:function(t){e.$set(e.login,"uid",t)},expression:"login.uid"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.activeCode"),prop:"activeCode",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputActiveCode"),"prefix-icon":"el-icon-bell"},model:{value:e.login.activeCode,callback:function(t){e.$set(e.login,"activeCode",t)},expression:"login.activeCode"}})],1),a("el-button",{staticClass:"btn_long btn_submit",attrs:{type:"primary",size:"small",round:""},on:{click:e.activate}},[e._v(e._s(e.$t("market.login.activated")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.show_login}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},qe=[],Be={name:"Activate",data:function(){var e=this,t=function(t,a,r){var s=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){s.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{login:{uid:window.localStorage.uid||"",activeCode:""},rules:{uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:t,trigger:"blur"}],activeCode:[{required:!0,message:this.$t("market.login.inputActiveCode"),trigger:"blur"}]}}},mounted:function(){this.login.activeCode=this.$route.params.uid},methods:{show_login:function(){this.$router.push("/market/user/login")},activate:function(){var e=this;this.$cloud.call("cloud-user","activate",{uid:this.login.uid,activeCode:this.login.activeCode}).then((function(){e.$message({message:e.$t("market.login.activateSuccAndRedirect"),type:"success"}),setTimeout((function(){e.$router.push("/market/user/login")}),1e3)})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"warning"})}))}}},Ue=Be,Ge=Object(n["a"])(Ue,Ve,qe,!1,null,null,null),Je=Ge.exports,He=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(" "+e._s(e.$t("market.login.findPasswordTitle"))+" ")]),a("el-form",{ref:"ruleForgetForm",attrs:{"label-width":"80px",model:e.login,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.userName"),prop:"uid",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputUserName"),"prefix-icon":"el-icon-message"},model:{value:e.login.uid,callback:function(t){e.$set(e.login,"uid",t)},expression:"login.uid"}})],1),a("el-button",{staticClass:"btn_long btn_submit",attrs:{type:"primary",size:"small",round:""},on:{click:e.forget}},[e._v(e._s(e.$t("market.login.submit")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.show_login}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},Ze=[],Ye={name:"Forget",data:function(){var e=this,t=function(t,a,r){var s=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){s.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{login:{ticket:"",uid:window.localStorage.uid||""},rules:{uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:t,trigger:"blur"}]}}},methods:{show_login:function(){this.$router.push("/market/user/login")},forget:function(){var e=this;this.$refs["ruleForgetForm"].validate((function(t){if(!t)return!1;e.$cloud.call("cloud-user","forget",{uid:e.login.uid,origin:window.location.origin}).then((function(t){e.$message({message:e.$t("market.login.findPasswordSucc"),type:"success"}),window.localStorage.uid=e.login.uid,e.$router.push("/market/user/resetPass")})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){}},We=Ye,Qe=Object(n["a"])(We,He,Ze,!1,null,null,null),Ke=Qe.exports,Xe=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(e._s(e.$t("market.login.modifyPass")))]),a("el-form",{ref:"ruleForm",attrs:{"label-width":"200px",model:e.data,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.inputOldPass"),prop:"oldPassword",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.passwordInfo"),"show-password":""},model:{value:e.data.oldPassword,callback:function(t){e.$set(e.data,"oldPassword",t)},expression:"data.oldPassword"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.inputNewPass"),prop:"newPassword",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.passwordInfo"),"show-password":""},model:{value:e.data.newPassword,callback:function(t){e.$set(e.data,"newPassword",t)},expression:"data.newPassword"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.repeatInputNewPass"),prop:"checkPass",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.repeatInputNewPass"),"show-password":""},model:{value:e.data.checkPass,callback:function(t){e.$set(e.data,"checkPass",t)},expression:"data.checkPass"}})],1),a("el-button",{staticClass:"btn_long",attrs:{type:"primary",size:"small",round:""},on:{click:e.modifyPass}},[e._v(e._s(e.$t("market.login.modifyPass")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.back}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},et=[],tt={name:"ModifyPass",data:function(){var e=this,t=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},a=function(a,r,s){r.length<8?s(new Error(e.$t("market.login.passwordInfo"))):t(r)?s():s(new Error(e.$t("market.login.passwordInfo")))},r=function(t,a,r){""===a?r(new Error(e.$t("login.inputPasswordAgain"))):a!==e.data.newPassword?r(new Error(e.$t("login.passwordDiff"))):r()};return{data:{newPassword:"",oldPassword:"",checkPass:""},rules:Object(Re["a"])({newPassword:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}],oldPassword:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:a,trigger:"blur"}],checkPass:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"}]},"checkPass",[{validator:r,trigger:"blur"}])}},methods:{back:function(){this.$router.go(-1)},modifyPass:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(!t)return!1;e.$cloud.call("cloud-user","resetPass",{ticket:window.localStorage.ticket,oldPassword:Oe()(e.data.oldPassword),newPassword:Oe()(e.data.newPassword)}).then((function(t){e.$message({message:e.$t("market.login.modifySucc"),type:"success"}),e.$router.push("/market/list")})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}}},at=tt,rt=Object(n["a"])(at,Xe,et,!1,null,null,null),st=rt.exports,it=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(e._s(e.$t("market.login.resetPass")))]),a("el-form",{ref:"ruleForm",attrs:{"label-width":"200px",model:e.data,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.login.userName"),prop:"uid",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputUserName"),"prefix-icon":"el-icon-message"},model:{value:e.data.uid,callback:function(t){e.$set(e.data,"uid",t)},expression:"data.uid"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.inputPassword"),prop:"password",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.passwordInfo"),"show-password":""},model:{value:e.data.password,callback:function(t){e.$set(e.data,"password",t)},expression:"data.password"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.repeatPassword"),prop:"checkPass",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputRepeatPassword"),"show-password":""},model:{value:e.data.checkPass,callback:function(t){e.$set(e.data,"checkPass",t)},expression:"data.checkPass"}})],1),a("el-form-item",{attrs:{label:e.$t("market.login.activeCode"),prop:"activeCode",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.login.inputActiveCode"),"show-password":""},model:{value:e.data.activeCode,callback:function(t){e.$set(e.data,"activeCode",t)},expression:"data.activeCode"}})],1),a("el-form-item",{attrs:{required:""}},[a("div",{staticClass:"captcha_box"},[a("el-input",{attrs:{"prefix-icon":"el-icon-finished",type:"text",placeholder:e.$t("market.login.captcha"),required:"","required-tip":e.$t("market.login.captchaTips")},on:{keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.login(t)}},model:{value:e.data.captcha,callback:function(t){e.$set(e.data,"captcha",t)},expression:"data.captcha"}}),a("img",{staticClass:"captcha_code",attrs:{title:e.$t("market.login.refresh"),src:e.data.captchaUrl},on:{click:e.reloadCaptcha}})],1)]),a("el-button",{attrs:{type:"primary",size:"small",round:""},on:{click:e.resetPass}},[e._v(e._s(e.$t("market.login.resetPass")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.show_login}},[e._v(e._s(e.$t("market.login.back")))])])],1)],1)],1)},ot=[],nt={name:"ResetPass1",data:function(){var e,t=this,a=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},r=function(e,r,s){r.length<8?s(new Error(t.$t("market.login.passwordInfo"))):a(r)?s():s(new Error(t.$t("market.login.passwordInfo")))},s=function(e,a,r){var s=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(t.$t("market.login.userNameRegTips")));setTimeout((function(){s.test(a)?r():r(new Error(t.$t("market.login.userNameRegTips")))}),100)},i=function(e,a,r){""===a?r(new Error(t.$t("market.login.inputPasswordAgain"))):a!==t.data.password?r(new Error(t.$t("market.login.passwordDiff"))):r()};return{data:{uid:window.localStorage.uid||"",activeCode:"",password:"",checkPass:"",captchaUrl:"",session:"",captcha:""},rules:(e={uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:s,trigger:"blur"}],password:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"},{validator:r,trigger:"blur"}],checkPass:[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.login.passwordInfo"),trigger:"blur"}]},Object(Re["a"])(e,"checkPass",[{validator:i,trigger:"blur"}]),Object(Re["a"])(e,"activeCode",[{required:!0,message:this.$t("market.login.inputPassword"),trigger:"blur"}]),e)}},methods:{show_login:function(){this.$router.push("/market/user/login")},reloadCaptcha:function(){var e=this;this.$cloud.call("cloud-user","captcha").then((function(t){e.data.captchaUrl="data:image/svg+xml;base64,"+t.ci.captchaBase64,e.data.session=t.ci.session})).catch((function(t){e.$message({message:t.err_msg,type:"error"})}))},resetPass:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(!t)return!1;e.$cloud.call("cloud-user","resetPassByActiveCode",{rp:{uid:e.data.uid,activeCode:e.data.activeCode,password:Oe()(e.data.password),captcha:e.data.captcha,session:e.data.session}}).then((function(t){e.$message({message:e.$t("market.login.findPasswordSucc"),type:"success"}),window.localStorage.uid=e.data.uid,e.$router.push("/market/user/login")})).catch((function(t){e.$message({message:e.$t("market.userRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){this.reloadCaptcha()}},lt=nt,ct=Object(n["a"])(lt,it,ot,!1,null,null,null),ut=ct.exports,dt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-card",{staticClass:"box-card market_page"},[a("h1",{staticClass:"top_txt"},[e._v(e._s(e.$t("market.repo.resetPass")))]),a("el-form",{ref:"ruleForm",attrs:{"label-width":"200px",model:e.data,"label-position":"left",rules:e.rules}},[a("el-form-item",{attrs:{label:e.$t("market.repo.inputPassword"),prop:"password",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.repo.passwordInfo"),"show-password":""},model:{value:e.data.password,callback:function(t){e.$set(e.data,"password",t)},expression:"data.password"}})],1),a("el-form-item",{attrs:{label:e.$t("market.repo.repeatPassword"),prop:"checkPass",required:""}},[a("el-input",{attrs:{placeholder:e.$t("market.repo.inputRepeatPassword"),"show-password":""},model:{value:e.data.checkPass,callback:function(t){e.$set(e.data,"checkPass",t)},expression:"data.checkPass"}})],1),a("el-button",{attrs:{type:"primary",size:"small",round:""},on:{click:e.createRepoUser}},[e._v(e._s(e.$t("market.repo.resetPass")))]),a("br"),a("br"),a("div",{staticClass:"sub_menu"},[a("a",{attrs:{size:"small",round:""},on:{click:e.back}},[e._v(e._s(e.$t("market.repo.back")))])])],1)],1)],1)},pt=[],mt={name:"createRepoUser",data:function(){var e,t=this,a=function(e){var t=e.match(/^.*[A-Z]+.*$/);if(null==t)return!1;t=e.match(/^.*[a-z]+.*$/);if(null==t)return!1;t=e.match(/^.*[0-9]+.*$/);return null!=t},r=function(e,r,s){r.length<8?s(new Error(t.$t("market.repo.passwordInfo"))):a(r)?s():s(new Error(t.$t("market.repo.passwordInfo")))},s=function(e,a,r){""===a?r(new Error(t.$t("market.login.inputPasswordAgain"))):a!==t.data.password?r(new Error(t.$t("market.login.passwordDiff"))):r()};return{data:{uid:window.localStorage.uid||"",password:"",checkPass:""},rules:(e={password:[{required:!0,message:this.$t("market.repo.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.repo.passwordInfo"),trigger:"blur"},{validator:r,trigger:"blur"}],checkPass:[{required:!0,message:this.$t("market.repo.inputPassword"),trigger:"blur"},{min:8,max:16,message:this.$t("market.repo.passwordInfo"),trigger:"blur"}]},Object(Re["a"])(e,"checkPass",[{validator:s,trigger:"blur"}]),Object(Re["a"])(e,"activeCode",[{required:!0,message:this.$t("market.repo.inputPassword"),trigger:"blur"}]),e)}},methods:{back:function(){this.$router.go(-1)},createRepoUser:function(){var e=this;this.$refs["ruleForm"].validate((function(t){if(!t)return!1;e.$cloud.call("cloud-harbor","createRepoUser",{password:e.data.password}).then((function(t){e.$message({message:e.$t("market.repo.resetPassSucc"),type:"success"}),setTimeout((function(){e.$router.go(-1)}),1e3)})).catch((function(t){e.$message({message:e.$t("market.repoRet."+t.tars_ret||!1),type:"error"})}))}))}},mounted:function(){}},ft=mt,ht=Object(n["a"])(ft,dt,pt,!1,null,null,null),gt=ht.exports,vt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-button",{staticStyle:{"margin-top":"20px"},attrs:{type:"primary",size:"small"},on:{click:function(t){return e.showAddProject()}}},[e._v(e._s(e.$t("market.repo.project")))]),a("br"),a("el-table",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{data:e.data,stripe:"",border:""}},[a("el-table-column",{attrs:{prop:"project",label:e.$t("market.repo.projectName"),"min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.showListRepo(t.row.name)}}},[e._v(e._s(t.row.name))])]}}])}),a("el-table-column",{attrs:{prop:"repo_count",label:e.$t("market.repo.repoCount"),"min-width":"100"}}),a("el-table-column",{attrs:{label:e.$t("market.repo.developer"),"min-width":"800px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._l(t.row.uids,(function(r){return a("el-tag",{key:r,staticStyle:{"margin-right":"5px"},attrs:{closable:e.closable[r]},on:{close:function(a){return e.deleteMember(t.row,r)}}},[e._v(" "+e._s(r)+" ")])})),a("el-tag",{staticStyle:{cursor:"pointer"},on:{click:function(a){return e.showAddMember(t.row.name)}}},[e._v("+")])]}}])}),a("el-table-column",{attrs:{prop:"update_time",label:e.$t("market.repo.updateTime"),"min-width":"200"}}),a("el-table-column",{attrs:{label:e.$t("operate.operates"),"min-width":"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticStyle:{"text-align":"center"},attrs:{type:"danger",size:"small"},on:{click:function(a){return e.deleteProject(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("br"),a("div",[a("el-pagination",{staticStyle:{display:"inline"},attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.page_size,"current-page":e.page},on:{"update:pageSize":function(t){e.page_size=t},"update:page-size":function(t){e.page_size=t},"update:currentPage":function(t){e.page=t},"update:current-page":function(t){e.page=t},"current-change":e.changePage,"prev-click":e.changePage,"next-click":e.changePage}})],1),a("addProject",{ref:"addProject",on:{addProjectSucc:e.addProjectSucc}}),a("addMember",{ref:"addMember",on:{addMemberSucc:e.addMemberSucc}}),a("listRepo",{ref:"listRepo",on:{showListArtifacts:e.showListArtifacts,closeRepo:e.closeRepo}}),a("listArtifacts",{ref:"listArtifacts"})],1)},bt=[],_t=(a("a434"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.$t("market.repo.project"),visible:e.project.addDialogVisible,width:"500px"},on:{"update:visible":function(t){return e.$set(e.project,"addDialogVisible",t)}}},[a("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.project}},[a("el-form-item",{attrs:{required:"",label:e.$t("market.repo.projectName"),prop:"project","label-width":"200"}},[a("el-input",{attrs:{placeholder:e.$t("market.repo.inputProjectName"),maxlength:"40","suffix-icon":e.suffixIcon},on:{input:e.inputProjectName},model:{value:e.project.project,callback:function(t){e.$set(e.project,"project",t)},expression:"project.project"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.project.addDialogVisible=!1}}},[e._v(e._s(e.$t("market.deploy.cancel")))]),a("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v(e._s(e.$t("market.repo.project")))])],1)],1)}),yt=[],wt={name:"addProject",data:function(){var e=this,t=function(e){var t=e.match(/^[a-z]+$/);return null!=t},a=function(a,r,s){t(r)?s():s(new Error(e.$t("market.repo.projectNameRegTips")))};return{project:{addDialogVisible:!1,project:""},suffixIcon:"",interval:null,rules:{project:[{required:!0,message:"项目名称不能为空",trigger:"blur"},{message:this.$t("market.repo.projectNameRegTips"),trigger:"blur"},{validator:a,trigger:"blur"}]}}},methods:{show:function(){this.project.addDialogVisible=!0},closeDialog:function(){this.project.addDialogVisible=!1,this.$emit("addProjectSucc")},inputProjectName:function(e){var t=this;e&&(this.interval&&(clearTimeout(this.interval),this.interval=null),this.interval=setTimeout((function(){t.$cloud.call("cloud-harbor","hasProject",{project:e}).then((function(a){t.interval=null,e==t.project.project&&(a.exists?t.suffixIcon="el-icon-close":t.suffixIcon="el-icon-check")})).catch((function(e){}))}),500))},submit:function(){var e=this;this.$refs["ruleForm"].validate((function(t){t&&e.$cloud.call("cloud-harbor","createProject",{project:e.project.project}).then((function(t){e.$message({message:e.$t("market.repo.createProjectSucc"),type:"success"}),e.closeDialog()})).catch((function(t){e.$message({message:e.$t("market.marketRet."+t.tars_ret||!1),type:"error"})}))}))}},created:function(){},mounted:function(){}},$t=wt,kt=Object(n["a"])($t,_t,yt,!1,null,null,null),xt=kt.exports,St=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.$t("market.repo.auth"),visible:e.project.addDialogVisible,width:"500px"},on:{"update:visible":function(t){return e.$set(e.project,"addDialogVisible",t)}}},[a("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.project}},[a("el-form-item",{attrs:{required:"",label:e.$t("market.repo.userName"),prop:"uid","label-width":"200"}},[a("el-autocomplete",{staticStyle:{width:"100%"},attrs:{"fetch-suggestions":e.searchUserName,placeholder:e.$t("market.repo.inputUser"),"trigger-on-focus":!1,"suffix-icon":e.suffixIcon},on:{select:e.handleSelect},model:{value:e.project.uid,callback:function(t){e.$set(e.project,"uid",t)},expression:"project.uid"}})],1)],1),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.project.addDialogVisible=!1}}},[e._v(e._s(e.$t("market.deploy.cancel")))]),a("el-button",{attrs:{type:"primary",disabled:"el-icon-check"!=e.suffixIcon},on:{click:e.submit}},[e._v(e._s(e.$t("market.repo.auth")))])],1)],1)},jt=[],Ct=(a("4de4"),{name:"addMember",data:function(){var e=this,t=function(t,a,r){var s=/^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;if(!a)return r(new Error(e.$t("market.login.userNameRegTips")));setTimeout((function(){s.test(a)?r():r(new Error(e.$t("market.login.userNameRegTips")))}),100)};return{project:{addDialogVisible:!1,project:"",uid:""},uids:[],suffixIcon:"",interval:null,rules:{uid:[{required:!0,message:this.$t("market.login.inputUserName"),trigger:"blur"},{message:this.$t("market.login.userNameRegTips"),trigger:"blur"},{validator:t,trigger:"blur"}]}}},methods:{show:function(e){this.project.project=e,this.project.uid="",this.project.addDialogVisible=!0},closeDialog:function(){this.project.addDialogVisible=!1,this.$emit("addMemberSucc")},searchUserName:function(e,t){var a=this;if(e){var r=this.uids.filter((function(t){return 0==t.toLowerCase().indexOf(e.toLowerCase())})),s=function(r){var s=[];r.forEach((function(e){s.push({value:e})})),r.length>0&&e==r[0]?a.suffixIcon="el-icon-check":a.suffixIcon="el-icon-close",t(s)};0==r.length&&e?this.$cloud.call("cloud-harbor","searchRepoUser",{userId:e}).then((function(e){a.uids=e.uids,s(a.uids)})).catch((function(e){})):s(r||[])}},handleSelect:function(e){this.suffixIcon="el-icon-check"},submit:function(){var e=this;this.$refs["ruleForm"].validate((function(t){t&&e.$cloud.call("cloud-harbor","addProjectDeveloper",{project:e.project.project,uid:e.project.uid}).then((function(t){e.$message({message:e.$t("market.repo.createMemberSucc"),type:"success"}),e.closeDialog()})).catch((function(t){e.$message({message:e.$t("market.repoRet."+t.tars_ret||!1),type:"error"})}))}))}},created:function(){},mounted:function(){var e=this;setInterval((function(){e.searchUserName()}),200)}}),Mt=Ct,Ot=Object(n["a"])(Mt,St,jt,!1,null,null,null),Nt=Ot.exports,Dt=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.$t("market.repo.repoList"),visible:e.addDialogVisible,width:"80%"},on:{"update:visible":function(t){e.addDialogVisible=t},close:e.closeRepo}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.repos,border:"",stripe:""}},[a("el-table-column",{attrs:{label:e.$t("market.repo.repoName"),"min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"},on:{click:function(a){return e.showListArtifacts(t.row.name)}}},[e._v(e._s(t.row.name))])]}}])}),a("el-table-column",{attrs:{prop:"artifact_count",label:"Artifacts"}}),a("el-table-column",{attrs:{prop:"pull_count",label:e.$t("market.repo.downloadCount"),"min-width":"50"}}),a("el-table-column",{attrs:{prop:"update_time",label:e.$t("market.repo.updateTime"),"min-width":"200"}}),a("el-table-column",{attrs:{label:e.$t("operate.operates"),"min-width":"100"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticStyle:{"text-align":"center"},attrs:{type:"danger",size:"small"},on:{click:function(a){return e.deleteRepo(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("br"),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.page_size,"current-page":e.page},on:{"update:pageSize":function(t){e.page_size=t},"update:page-size":function(t){e.page_size=t},"update:currentPage":function(t){e.page=t},"update:current-page":function(t){e.page=t},"current-change":e.changePage,"prev-click":e.changePage,"next-click":e.changePage}})],1)},Lt=[],At={name:"ListRepo",components:{},data:function(){return{project:"",repos:[],total:0,page_size:15,page:1,addDialogVisible:!1}},methods:{show:function(e){this.project=e,this.fetchRepoList(),this.addDialogVisible=!0},closeRepo:function(){this.$emit("closeRepo")},showListArtifacts:function(e){this.$emit("showListArtifacts",this.project,e)},changePage:function(e){this.page=e,this.fetchRepoList()},fetchRepoList:function(){var e=this;this.$loading.show(),this.$cloud.call("cloud-harbor","getRepositoryList",{project:this.project,page_size:this.page_size,page:this.page}).then((function(t){t.info.gList.forEach((function(e){e.update_time=m()(e.update_time).format("YYYY-MM-DD HH:mm:ss"),e.create_time=m()(e.create_time).format("YYYY-MM-DD HH:mm:ss")})),e.total=t.info.total,e.repos=t.info.gList,e.$loading.hide()})).catch((function(t){e.$loading.hide(),e.$message({message:e.$t("market.repoRet."+t.tars_ret||!1),type:"error"})}))},deleteRepo:function(e){var t=this;this.$confirm(this.$t("market.repo.deleteRepo"),"Hint",{confirmButtonText:this.$t("el.messagebox.confirm"),cancelButtonText:this.$t("market.deploy.cancel"),type:"warning"}).then((function(){console.log(e),t.$cloud.call("cloud-harbor","delRepository",{project:t.project,repo:e.name.substr(t.project.length+1)}).then((function(e){t.$message({message:t.$t("market.repo.deleteRepoSucc"),type:"success"}),t.fetchRepoList()})).catch((function(e){t.$message({message:t.$t("market.repoRet."+e.tars_ret||!1),type:"error"})}))})).catch((function(){}))}},created:function(){},mounted:function(){}},It=At,Tt=Object(n["a"])(It,Dt,Lt,!1,null,null,null),Rt=Tt.exports,Ft=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"Artifacts",visible:e.addDialogVisible,width:"80%"},on:{"update:visible":function(t){e.addDialogVisible=t}}},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.artifacts,border:"",stripe:""}},[a("el-table-column",{attrs:{prop:"digest_short",label:"digest","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-link",{attrs:{type:"primary"}},[e._v(e._s(t.row.digest_short))])]}}])}),a("el-table-column",{attrs:{label:"tag","min-width":"200"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(t.row.tags,(function(t){return a("el-tag",{key:t,staticStyle:{"margin-right":"5px"}},[e._v(" "+e._s(t)+" ")])}))}}])}),a("el-table-column",{attrs:{prop:"push_time",label:"$t('market.repo.pushTime')","min-width":"100"}}),a("el-table-column",{attrs:{prop:"pull_time",label:"$t('market.repo.pullTime')","min-width":"100"}}),a("el-table-column",{attrs:{label:e.$t("operate.operates"),"min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticStyle:{"text-align":"center"},attrs:{type:"danger",size:"small"},on:{click:function(a){return e.deleteArtifact(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("br"),a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.page_size,"current-page":e.page},on:{"update:pageSize":function(t){e.page_size=t},"update:page-size":function(t){e.page_size=t},"update:currentPage":function(t){e.page=t},"update:current-page":function(t){e.page=t},"current-change":e.changePage,"prev-click":e.changePage,"next-click":e.changePage}})],1)},Pt=[],zt={name:"ListArtifacts",components:{},data:function(){return{project:"",name:"",artifacts:[],total:0,page_size:5,page:1,addDialogVisible:!1}},methods:{show:function(e,t){this.project=e,this.repo=t,this.fetchArtifactsList(),this.addDialogVisible=!0},changePage:function(e){this.page=e,this.fetchArtifactsList()},fetchArtifactsList:function(){var e=this;this.$loading.show(),this.$cloud.call("cloud-harbor","getArtifactsList",{project:this.project,repo:this.repo.substr(this.project.length+1),page_size:this.page_size,page:this.page}).then((function(t){t.info.gList.forEach((function(e){e.digest_short=e.digest.substr(0,17),e.pull_time=m()(e.pull_time).format("YYYY-MM-DD HH:mm:ss"),e.push_time=m()(e.push_time).format("YYYY-MM-DD HH:mm:ss")})),e.total=t.info.total,e.artifacts=t.info.gList,e.$loading.hide()})).catch((function(t){e.$message({message:e.$t("market.repoRet."+t.tars_ret||!1),type:"error"}),e.$loading.hide()}))},deleteArtifact:function(e){var t=this;this.$confirm(this.$t("market.repo.deleteArtifact"),"Hint",{confirmButtonText:this.$t("el.messagebox.confirm"),cancelButtonText:this.$t("market.deploy.cancel"),type:"warning"}).then((function(){t.$loading.show(),t.$cloud.call("cloud-harbor","delArtifacts",{project:t.project,repo:t.repo.substr(t.project.length+1),reference:e.digest}).then((function(e){t.$message({message:t.$t("market.repo.deleteArtifactSucc"),type:"success"}),t.$loading.hide(),t.fetchArtifactsList()})).catch((function(e){t.$message({message:t.$t("market.repoRet."+e.tars_ret||!1),type:"error"}),t.$loading.hide()}))})).catch((function(){}))}},created:function(){},mounted:function(){}},Et=zt,Vt=Object(n["a"])(Et,Ft,Pt,!1,null,null,null),qt=Vt.exports,Bt={name:"ListProject",components:{addProject:xt,addMember:Nt,listRepo:Rt,listArtifacts:qt},data:function(){return{data:[],total:0,page_size:15,page:1,closable:{}}},beforeRouteEnter:function(e,t,a){a((function(e){var t=window.localStorage.ticket;t?e.$loginUtil.onLogin(!0):e.$loginUtil.onLogin(!1)}))},methods:{showAddProject:function(){this.$refs.addProject.show()},showAddMember:function(e){this.$refs.addMember.show(e)},showListRepo:function(e){this.$refs.listRepo.show(e)},showListArtifacts:function(e,t){this.$refs.listArtifacts.show(e,t)},addMemberSucc:function(){this.fetchProjects()},addProjectSucc:function(){this.fetchProjects()},closeRepo:function(){this.fetchProjects()},deleteMember:function(e,t){var a=this;this.$confirm("确定取消该用户的权限么?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){a.$cloud.call("cloud-harbor","delProjectDeveloper",{project:e.name,uid:t}).then((function(r){a.$message({message:a.$t("market.repo.deleteMemberSucc"),type:"success"}),e.uids.splice(e.uids.indexOf(t),1)})).catch((function(e){a.$message({message:a.$t("market.repoRet."+e.tars_ret||!1),type:"error"})}))})).catch((function(){}))},deleteProject:function(e){var t=this;this.$confirm("确定删除该项目么?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){t.$cloud.call("cloud-harbor","delProject",{project:e.name}).then((function(e){t.$message({message:t.$t("market.repo.deleteProjectSucc"),type:"success"}),t.fetchProjects()})).catch((function(e){t.$message({message:t.$t("market.repoRet."+e.tars_ret||!1),type:"error"})}))})).catch((function(){}))},changePage:function(e){this.page=e,this.fetchProjects()},fetchProjects:function(){var e=this;this.$cloud.call("cloud-harbor","getProjectList",{page_size:this.page_size,page:this.page}).then((function(t){e.data=t.info.gList,e.data.forEach((function(t){t.update_time=m()(t.update_time).format("YYYY-MM-DD HH:mm:ss"),t.uids.forEach((function(t){e.closable[t]=t!=window.localStorage.uid}))})),e.total=t.info.total})).catch((function(t){e.$message({message:e.$t("market.repoRet."+t.tars_ret||!1),type:"error"})}))}},created:function(){},mounted:function(){this.fetchProjects()}},Ut=Bt,Gt=(a("0810"),Object(n["a"])(Ut,vt,bt,!1,null,null,null)),Jt=Gt.exports,Ht={path:"/market/user",name:"MarketUser",component:c,children:[{path:"login",name:"MarketLogin",component:Ae},{path:"register",component:Ee},{path:"activate",component:Je},{path:"forget",component:Ke},{path:"modifyPass",component:st},{path:"resetPass",component:ut}]},Zt={path:"/market/repo",name:"MarketRepo",component:c,children:[{path:"pass",component:gt},{path:"project",component:Jt}]},Yt={path:"/market/service",name:"MarketService",component:v,children:[{path:":group/:name/:version",component:Se}]},Wt={path:"/market/list",component:v,children:[{path:"/",name:"MarketList",component:U}]}},4824: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=="},4998:function(e,t,a){},"49de":function(e,t,a){"use strict";var r=a("e15a"),s=a.n(r);s.a},"4ad0":function(e,t,a){"use strict";var r=a("d6c4"),s=a.n(r);s.a},"4d18":function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ZDFiOTQyYS0zZWUyLTkxNGQtOTBiYS1iZTVkYzNjOTU1OTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzY2QzI2NEY2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzY2QzI2NEU2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjEwODNhYzItNzY4Yy02MjRkLWEyYWMtYTFiMTdmOTZhZmZhIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NzRmMzZhYTgtODFhOC04ZTQ5LWExN2UtMDI2MDYwMWE2ZGMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+5sw1KwAAAedJREFUeNpi/P//P8NQAkwMQwyMOnjUwWiAhRLNszc9ROayAXEGEEcCsQ5U7AoQLwfiGUD8C6Yw1U9+YByMBKSBeAsQG6CJW0BxIhD7APHTwZAk2JAcexuIQ4BYAIpDoGIgua1AzD4YHJwOddBNIDYD4rVA/BGK10LFQHL6QJxGqWWM2CoOtLRJCByHRnswEK/DoSYI6vgTQGxJrMHY0joTnmieCMTvgPg/AWwB1bMWj5q1SGmakHnvoHazkZLpuoA4b4BKLkGo3d+BuIJYB8dCads1Z8WO0NO1IcavbIDUYVCKwOZgXElCCERAHesJxM+IiEpKMcgOT6QAEiK3lJgLxJJ0CFxJqF0UF2uSdEwRktRw8GjjZ9TBQ715yThkHAwsxDHEgOUkA6l6BkOSOIyl4D88KJIEjhC1wSVGKAaIqJqpEsLoIYoLUFI1Hx5qpQQjtUoJcKsNS0gOSInCQmqagqbRI1jS8VF6lBLk9pptiVVI7WKQhdq5GE+mRY+RI6R4nNJijVRAdDFIq2KNVExMMTharFECqFYMstAok9GsGGShU3TbUssgXA5+B+1m20BDh2aNGSzAGskNRGe6xVQqHcjBsACaQ0oIl0EzRCx06Iie4D00wGqx5tLRaa9RB486mL4AIMAA17Dgy9SYTKQAAAAASUVORK5CYII="},"4d7d":function(e,t,a){},"4e91":function(e,t,a){},5236:function(e,t,a){"use strict";var r=a("72f1"),s=a.n(r);s.a},"559f":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"app_index__footer"})},s=[],i={data:function(){return{thisYear:(new Date).getFullYear()}}},o=i,n=(a("e73b"),a("2877")),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},5664:function(e,t,a){},"5bc8":function(e,t,a){},"5d02":function(e,t,a){},"5da8":function(e,t,a){"use strict";var r=a("2435"),s=a.n(r);s.a},"5e39":function(e,t,a){"use strict";var r=a("f263"),s=a.n(r);s.a},"65f9":function(e,t,a){"use strict";var r=a("346f"),s=a.n(r);s.a},6609:function(e,t,a){},6663:function(e,t,a){},"67ac":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:e.$t("index.rightView.tab.averageDuration"),name:"first"}},[a("homes")],1),a("el-tab-pane",{attrs:{label:e.$t("index.rightView.tab.trackingNumber"),name:"second"}},[a("times")],1)],1)},s=[],i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"home"},[a("let-form",{ref:"form",staticStyle:{"font-size":"16px"},attrs:{inline:!0}},[a("let-form-item",{attrs:{label:e.$t("callChain.date")}},[a("let-date-picker",{staticStyle:{width:"200px"},attrs:{theme:"primary",size:"small"},model:{value:e.date1,callback:function(t){e.date1=t},expression:"date1"}})],1),a("let-form-item",{attrs:{label:e.$t("callChain.method")}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("callChain.selectMethod"),clearable:""},model:{value:e.funcName,callback:function(t){e.funcName=t},expression:"funcName"}},e._l(e.funcNames,(function(e,t){return a("let-option",{key:t,attrs:{label:e,value:e}})})),1)],1),a("let-form-item",[a("let-button",{ref:"myButton",staticStyle:{"margin-left":"10px"},attrs:{theme:"primary",size:"mini"},on:{click:e.sub}},[e._v(" "+e._s(e.$t("callChain.sub"))+" ")])],1)],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.svgLoading,expression:"svgLoading"}],staticStyle:{height:"600px"}},[a("vue-scroll",{staticStyle:{width:"100%",height:"100%"},attrs:{ops:e.ops}},e._l(e.nodeinfos,(function(t,r){return a("div",{key:r},[a("div",{class:"svg"+r,staticStyle:{float:"left",width:"100%"}},[a("svg",{attrs:{id:e.svgId+"-"+r,width:"100%",height:"100%"}},[a("g"),a("rect")]),a("hr")]),a("div",{staticClass:"exportModal",attrs:{id:"exportModal-"+e.svgId+"-"+r}},[a("let-modal",{attrs:{title:"Gantt chart",width:"80%",footShow:!1,closeOnClickBackdrop:!0},on:{close:e.closeModel},model:{value:e.exportModal,callback:function(t){e.exportModal=t},expression:"exportModal"}},[a("div",{staticClass:"container",staticStyle:{width:"1400%",height:"500px"},attrs:{id:"container-"+e.svgId+"-"+r}})])],1)])})),0)],1)],1)},o=[],n=(a("99af"),a("4160"),a("c975"),a("a15b"),a("a434"),a("b0c0"),a("b680"),a("4d63"),a("ac1f"),a("5377"),a("25f0"),a("5319"),a("1276"),a("4c53"),a("159b"),a("96cf"),a("1da1")),l=a("b85c"),c=a("1226"),u=a.n(c),d=a("6e58"),p=a("6ace"),m=a("381a"),f=a.n(m),h={components:{},data:function(){var e="/k8s.html"==location.pathname;return{svgLoading:!1,k8s:e,exportModal:!1,changenum:0,surenum:"",svgId:"svg-"+f()(10),funcName:"",funcNames:[],date1:"",today:"",dateTime:"",flags:!1,options:[],resdata:[],restdata:[],value:"",serverArrs:[],datalist:[],dataLists:[],dataarr:[],traceIds:[],nodeinfos:[],edges:[],funcIds:[],begin:"",value1:"",loading:!1,flag2:!1,ops:{vuescroll:{},scrollPanel:{},rail:{keepShow:!0},bar:{hoverStyle:!0,onlyShowBarOnScroll:!1,background:"#9096A3","overflow-x":"hidden"}}}},mounted:function(){var e=new Date,t=e.getMonth()+1,a=e.getDate();t>=1&&t<=9&&(t="0"+t),a>=1&&a<=9&&(a="0"+a),this.date1=e.getFullYear()+"-"+t+"-"+a,this.dateTime=["00:00:00","23:59:59"],this.value=this.$store.state.name.name.application+"."+this.$store.state.name.name.server_name,this.sub()},created:function(){},watch:{changenum:function(e){this.exportModal=!0;var t,a=document.getElementsByClassName("exportModal"),r=Object(l["a"])(a);try{for(r.s();!(t=r.n()).done;){var s=t.value;s.style&&(s.style.display="none")}}catch(n){r.e(n)}finally{r.f()}var i="exportModal-".concat(this.svgId,"-").concat(this.surenum),o=document.getElementById(i);o.style.display="block"}},methods:{sub:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r,s,i,o,n,l,c,u;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(t.prev=0,e.svgLoading=!0,a=new RegExp("-","g"),e.today=e.date1.replace(a,""),e.flags=!0,e.flag2=!0,e.funcName){t.next=11;break}return t.next=9,e.$ajax.getJSON("/server/api/funcList",{id:e.value,nowDate:e.today,k8s:e.k8s});case 9:r=t.sent,e.funcNames=r.funcList;case 11:if(s={},e.funcName){t.next=18;break}return t.next=15,e.$ajax.getJSON("/server/api/getAverage",{label:e.value,nowDate:e.today,k8s:e.k8s});case 15:s=t.sent,t.next=21;break;case 18:return t.next=20,e.$ajax.getJSON("/server/api/getAverageByFuncName",{label:e.funcName,nowDate:e.today,k8s:e.k8s});case 20:s=t.sent;case 21:if(!s.error&&!s.err_msg){t.next=25;break}return e.$Notice({message:s.error||err_msg,type:"error"}),e.svgLoading=!1,t.abrupt("return");case 25:for(l in 0==s.rows.length&&(e.$Notice({message:e.$t("callChain.noResult"),type:"warning"}),e.svgLoading=!1),e.dataarr=[],s.rows.forEach((function(t){var a={};t.forEach((function(e,t){a[s.columns[t].name]=e})),e.dataarr.push(a)})),e.dataarr.forEach((function(e){e.vertexes=JSON.parse(e.vertexes),e.edges=JSON.parse(e.edges)})),e.resdata=[],e.restdata=[],i=[],o=[],e.traceIds=[],e.funcIds=[],n=-1,e.serverArrs=[],e.dataarr.forEach((function(t){e.serverArrs.push(t.id),e.traceIds.push(t.traceIds),e.funcIds.push(t.funcIds),n++,i[n]=[],o[n]=[],e.resdata[e.resdata.length]=t.vertexes,e.restdata[e.restdata.length]=t.edges;var a=t.vertexes,r=t.edges;a.forEach((function(e){i[n].push({id:e.vertex,label:e.vertex,time:0==e.callCount?0:(e.callTime/e.callCount).toFixed(2)})})),r.forEach((function(e){o[n].push({source:e.fromVertex,target:e.toVertex,label:0==e.callCount?0:(e.callTime/e.callCount).toFixed(2)})}))})),o.forEach((function(t,a){var r=[];t.forEach((function(e){r.push(e.target)})),t.forEach((function(t){r.indexOf(t.source)<0&&(e.begin=t.source,i[a].push({id:t.source,label:t.source}))}))})),e.edges=o,e.nodeinfos=i,e.traceIds)c=e.traceIds[l].replace("[","").replace("]","").replace(/\s/g,"").split(","),e.traceIds[l]=c;for(l in e.funcIds)u=e.funcIds[l].replace("[","").replace("]","").replace(/\s/g,"").split(","),e.funcIds[l]=u;e.becomeD3(o,i),e.svgLoading=!1,t.next=50;break;case 47:t.prev=47,t.t0=t["catch"](0),e.svgLoading=!1;case 50:case"end":return t.stop()}}),t,null,[[0,47]])})))()},becomeD3:function(e,t){var a=this;this.$nextTick((function(){var r=function(r){var s=(new u.a.graphlib.Graph).setGraph({});s.setGraph({rankdir:"LR",marginy:60}),t[r].forEach((function(e,t){e.rx=e.ry=5,s.setNode(e.id,{labelType:"html",label:e.time?'<div class="wrap"> <span class="span1" >'.concat(e.id,'</span> <p class="p1" style="height:20px" >( ').concat(e.time," ms )</p></div>"):'<div class="wrap"> <span class="span1" >'.concat(e.id,"</span> </div>"),style:"fill:#457ff5"})})),e[r].forEach((function(e){r%2==0?s.setEdge(e.source,e.target,{label:e.label+"ms",style:"fill:#fff;stroke:#333;stroke-width:1.5px;"}):s.setEdge(e.source,e.target,{label:e.label+"ms",style:"fill:#ffffff;stroke:#333;stroke-width:1.5px;"})}));var o="#".concat(a.svgId,"-").concat(r),n=d["select"](o),l=n.select("g"),c=new u.a.render;c(l,s),l.selectAll(".edgeLabel tspan").attr("dy","-1.2em");var m=document.querySelectorAll("".concat(o," .span1"));for(i in m){if(i==m.length)break;m[i].innerHTML==a.value&&(m[i].style.color="red")}var f=document.querySelector(o);f.style.height=f.getBBox().height+150,l.selectAll("g.node").on("click",(function(t,s){var i=[],n=d["select"](o);n.selectAll("rect").style("fill","#457FF5"),e[r].forEach((function(e,r){t==e.source&&a.begin!=e.target&&i.push(e)})),l.selectAll("rect").style("fill",(function(e){return e==t&&i.length>0?"#3F5AE0":"#457FF5"})),i.length>0&&(Object(p["a"])(i,e[r],0,i.length,t),a.ganTe(i,s,r))}))};for(var s in e){var i;r(s)}}))},closeModel:function(){},ganTe:function(e,t,r){var s=this;return Object(n["a"])(regeneratorRuntime.mark((function i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:s.$nextTick((function(){var i=s,o="container-".concat(s.svgId,"-").concat(r),n=document.getElementById(o);n.style.display="block";var l=e;l.forEach((function(e){s.resdata[r].forEach((function(t){e.target==t.vertex&&(e.server_time=0==t.callCount?0:t.callTime/t.callCount)})),s.restdata[r].forEach((function(t){e.source==t.fromVertex&&e.target==t.toVertex&&(e.client_time=0==t.callCount?0:t.callTime/t.callCount)}))}));var c=[],u=[],d=[],m=[],f=[],h=[];Object(p["b"])(l,c,u,d,m,f,h);var g=new Date,v=b(g);function b(e){var t=e.toLocaleDateString().split("/");return t[1].length<2&&t.splice(1,1,"0"+t[1]),t[2].length<2&&t.splice(2,1,"0"+t[2]),t.join("-")}var _=t,y=a("313e"),w=y.init(n),$=[],k=d.length-1;for(var x in d)$.push({name:d[x],value:[k-parseInt(x),h[x],h[x]+m[x],(m[x]-f[x])/2+h[x],f[x]]});var S=[];$.forEach((function(e){S.push(e.value[2])})),S.sort((function(e,t){return t-e})),d=d.reverse();var j=d;function C(e,t){var a=t.value(0),r=t.coord([t.value(1),a]),s=t.coord([t.value(2),a]),i=.35*t.size([0,1])[1]>30?30:.35*t.size([0,1])[1],o=y.graphic.clipRectByRect({x:r[0],y:r[1],width:s[0]-r[0],height:i},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height}),n=null;if(""!==t.value(3)){var l,c=t.coord([t.value(3),a]),u=t.value(4),d=t.value(3),p=+y.number.parseDate(v);if(p-d<=u)l=t.coord([p,a]);else{var m=d+u;l=t.coord([m,a])}n=y.graphic.clipRectByRect({x:c[0],y:c[1],width:l[0]-c[0],height:i},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height})}return null==n?o&&{type:"group",children:[{type:"rect",shape:o,style:t.style({fill:"#AACCF9"})}]}:o&&n&&{type:"group",children:[{type:"rect",shape:o,style:t.style({fill:"#a1a8f5"})},{type:"rect",shape:n,style:t.style({fill:"#9c9c9c"})}]}}w.setOption({tooltip:{formatter:function(e){return e.name+"<br/>"+i.$t("callChain.stringBtime")+e.value[1].toFixed(2)+"ms<br/>"+i.$t("callChain.stringEtime")+e.value[2].toFixed(2)+"ms<br/>"+i.$t("callChain.clientTime")+(e.value[2].toFixed(2)-e.value[1].toFixed(2))+"ms<br/>"+i.$t("callChain.serverTime")+e.value[4].toFixed(2)+"ms"}},title:{text:s.serverArrs[r]+"："+_,left:"center"},xAxis:{type:"value",min:0,max:S[0].toFixed(2),axisLabel:{interval:0},splitLine:{show:!0}},yAxis:{data:j,axisTick:{alignWithLabel:!0},splitLine:{show:!0}},legend:{left:"70%",top:20,data:["client","server"]},grid:{left:200},series:[{type:"custom",renderItem:C,name:"client",itemStyle:{color:"#a1a8f5"},encode:{x:[1,2],y:0},data:$},{type:"custom",name:"server",itemStyle:{color:"#9c9c9c"}}]}),s.surenum=r,s.changenum+=1}));case 1:case"end":return i.stop()}}),i)})))()}}},g=h,v=(a("7253"),a("2877")),b=Object(v["a"])(g,i,o,!1,null,null,null),_=b.exports,y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"all"},[a("div",[a("let-form",{attrs:{size:"small",inline:""}},[a("let-form-item",{attrs:{label:e.$t("callChain.date")}},[a("let-date-picker",{staticStyle:{width:"200px"},model:{value:e.today,callback:function(t){e.today=t},expression:"today"}})],1),a("let-form-item",{attrs:{label:e.$t("callChain.btime")}},[a("let-time-picker",{staticStyle:{width:"200px"},model:{value:e.dateTime[0],callback:function(t){e.$set(e.dateTime,0,t)},expression:"dateTime[0]"}})],1),a("let-form-item",{attrs:{label:e.$t("callChain.etime")}},[a("let-time-picker",{staticStyle:{width:"200px"},model:{value:e.dateTime[1],callback:function(t){e.$set(e.dateTime,1,t)},expression:"dateTime[1]"}})],1),a("let-form-item",[a("let-button",{staticStyle:{"margin-left":"10px","margin-bottom":"2px"},attrs:{theme:"primary"},on:{click:e.sub}},[e._v(" "+e._s(e.$t("callChain.sub"))+" ")])],1)],1)],1),a("div",{staticStyle:{height:"500px"}},[a("div",{staticClass:"block"},[a("let-pagination",{attrs:{total:e.total%e.fsize?parseInt(e.total/e.fsize)+1:e.total/e.fsize,page:e.currentPage,size:"small","no-border":"","show-sums":"",sum:e.total,jump:""},on:{change:e.handleCurrentChange}})],1),a("vue-scroll",{staticStyle:{width:"100%",height:"100%","margin-top":"5px"},attrs:{ops:e.ops}},[a("let-table",{ref:"detailsTable",staticStyle:{width:"100%",height:"580px"},attrs:{data:e.dataarrs,stripe:!0,"empty-msg":e.$t("callChain.noResult"),border:"true",sortable:!0}},[a("let-table-column",{attrs:{prop:"name",title:"ID"}}),a("let-table-column",{attrs:{prop:"timeStamp",title:e.$t("callChain.btime"),width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.startTime))]}}])}),a("let-table-column",{attrs:{prop:"timeFrame",title:e.$t("callChain.etime"),width:"15%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.endTime))]}}])}),a("let-table-column",{attrs:{prop:"timeFrame",title:e.$t("callChain.allTime"),width:"10%"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(t.row.callTime)+"ms")]}}])}),a("let-table-column",{attrs:{align:"center",title:e.$t("callChain.operation"),width:"10%"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.handleEdit(t.row)}}},[e._v(e._s(e.$t("callChain.detail")))])]}}])})],1)],1),a("let-modal",{staticStyle:{height:"1200px",top:"-120px"},attrs:{width:"90%",footShow:!1},model:{value:e.dialogVisible1s,callback:function(t){e.dialogVisible1s=t},expression:"dialogVisible1s"}},[a("div",{staticStyle:{height:"800px"}},[a("vue-scroll",{staticStyle:{width:"100%",height:"100%"},attrs:{ops:e.ops}},[a("gantt-chart",{attrs:{nodeinfos:e.nodeinfos,serverArrs:e.serverArrs,edges:e.edges,traceIds:e.traceIds,funcIds:e.funcIds,values:e.value,dialogVisible1s:e.dialogVisible1s}})],1)],1)])],1),a("opendiv",{attrs:{flag:e.flag,res:e.res,rest:e.rest,title:e.title}})],1)},w=[],$=(a("fb6a"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:"svgs"}},e._l(e.nodeinfos,(function(e,t){return a("div",{key:t},[a("div",{style:t%2==1?"margin-top: 20px; padding: 10px;  background-color: #EBF2FF":"margin-top: 20px; padding: 10px;"},[a("div",{class:"svgs"+t,staticStyle:{float:"left",width:"100%"}},[a("svg",{style:t%2==1?"background-color: #EBF2FF;":"background-color: #ffffff;",attrs:{width:"100%",height:"600"}},[a("g"),a("rect")]),a("div",{staticClass:"containers",staticStyle:{width:"85%",height:"500px",display:"none"},attrs:{id:"containers"+t}})])])])})),0)}),k=[],x=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{attrs:{id:e.id}},[a("let-modal",{staticClass:"pop_tit",staticStyle:{"margin-top":"-100px"},attrs:{title:e.title,width:"90%",footShow:!1},on:{close:e.closeDialog},model:{value:e.dialogVisible,callback:function(t){e.dialogVisible=t},expression:"dialogVisible"}},[a("div",e._l(this.datalist.rows,(function(t,r){return a("div",{key:r,style:r%2==1?"background-color: #EBF2FF;":"background-color: #ffffff;"},[a("div",{class:"svgF"+r},[a("svg",{attrs:{id:"svg-"+e.id+"-"+r,width:"100%"}},[a("g"),a("rect")]),a("div",{staticClass:"wcontainer",staticStyle:{width:"85%",height:"500px",display:"none"},attrs:{id:"funccontainer-"+e.id+"-"+r}})])])})),0)])],1)},S=[],j=a("ee72"),C=j["a"],M=(a("8b05"),Object(v["a"])(C,x,S,!1,null,null,null)),O=M.exports;a("e1d2");var N={name:"svgs",components:{opendiv:O},props:["nodeinfos","serverArrs","funcIds","traceIds","values","dialogVisible1s"],data:function(){return{obj:[],value:[],value1:[],value2:[],res:"",rest:"",flag:!1,title:"",funcIdss:[],traceIdss:[],arr1:[],flags:[],ops:{vuescroll:{},scrollPanel:{},rail:{keepShow:!0},bar:{hoverStyle:!0,onlyShowBarOnScroll:!1,background:"#9096A3","overflow-x":"hidden"}}}},created:function(){},mounted:function(){},watch:{funcIds:function(e){var t=this;this.value=[],this.flags=[],e.forEach((function(e){t.flags.push(!0),t.value.push("")}))},nodeinfos:function(e){this.value=[],this.value1=[]},traceIds:function(e){var t=this;this.value=[],this.flags=[],e.forEach((function(e){t.flags.push(!0),t.value1.push("")}))}},computed:{},methods:{}},D=N,L=(a("1df8"),Object(v["a"])(D,$,k,!1,null,"f3fed824",null)),A=L.exports,I=a("c1df"),T=a.n(I),R={components:{ganttChart:A,opendiv:O},data:function(){var e="/k8s.html"==location.pathname;return{dialogVisible1s:!1,form:{},flag:!1,k8s:e,res:"",rest:"",title:"",flags:!1,vname:"",options:[],resdata:[],restdata:[],value:"",serverArrs:[],datalist:[],dataLists:[],dataarr:[],traceIds:[],nodeinfos:[],edges:[],funcIds:[],begin:"",value1:"",today:"",dateTime:["",""],fsize:10,currentPage:1,total:0,dataarrs:[],ops:{vuescroll:{},scrollPanel:{},rail:{keepShow:!0},bar:{hoverStyle:!0,onlyShowBarOnScroll:!1,background:"#F5F5F5",opacity:.5,"overflow-x":"hidden"}}}},mounted:function(){var e=(new Date).setHours(0,0,0,0),t=(new Date).setHours(23,59,59,999);this.value1=[e,t];var a=new Date,r=a.getMonth()+1;r>=1&&r<=9&&(r="0"+r);var s=a.getDate();s>=1&&s<=9&&(s="0"+s),this.today=a.getFullYear()+"-"+r+"-"+s,this.dateTime=["00:00","23:59"],this.vname=this.$store.state.name.name.application+"."+this.$store.state.name.name.server_name,this.sub()},methods:{handleCurrentChange:function(e){this.currentPage=e;var t=(this.currentPage-1)*this.fsize,a=t+this.fsize;this.dataarrs=this.dataarr.slice(t,a)},fortime:function(e){var t=new Date(e);e+="";var a=e.substring(e.length-3);return"".concat(t.getFullYear(),"-").concat(t.getMonth()+1,"-").concat(t.getDate()," ").concat(t.getHours(),":").concat(t.getMinutes(),":").concat(t.getSeconds(),".").concat(a)},sub:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){var a,r,s,i,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.form.label=e.vname,e.dateTime[0]){t.next=4;break}return e.$Notice({message:e.$t("callChain.sbtime"),type:"warning"}),t.abrupt("return");case 4:if(e.dateTime[1]){t.next=7;break}return e.$Notice({message:e.$t("callChain.setime"),type:"warning"}),t.abrupt("return");case 7:if(e.form.stime="".concat(e.today," ").concat(e.dateTime[0]),e.form.etime="".concat(e.today," ").concat(e.dateTime[1]),e.form.stime=new Date(e.form.stime).getTime(),e.form.etime=new Date(e.form.etime).getTime(),e.form.nowDate=e.today,e.form.k8s=e.k8s,""!=e.form.nowDate){t.next=16;break}return e.$Notice({message:e.$t("callChain.sdata"),type:"error"}),t.abrupt("return");case 16:return a=[],t.prev=17,e.$refs.detailsTable.$loading.show(),t.next=21,e.$ajax.getJSON("/server/api/detailByStartEndTime",e.form);case 21:a=t.sent,e.$refs.detailsTable.$loading.hide(),t.next=28;break;case 25:t.prev=25,t.t0=t["catch"](17),e.$refs.detailsTable.$loading.hide();case 28:e.options=[],e.flags=!0,e.dataarr=[],r=Object(l["a"])(a),t.prev=32,r.s();case 34:if((s=r.n()).done){t.next=46;break}if(i=s.value,0!=i.endTime&&0!=i.startTime){t.next=38;break}return t.abrupt("continue",44);case 38:o={},o.name=i.name,o.callTime=i.endTime-i.startTime,o.startTime=T()(i.startTime).format("YYYY-MM-DD HH:mm:ss"),o.endTime=T()(i.endTime).format("YYYY-MM-DD HH:mm:ss"),e.dataarr.push(o);case 44:t.next=34;break;case 46:t.next=51;break;case 48:t.prev=48,t.t1=t["catch"](32),r.e(t.t1);case 51:return t.prev=51,r.f(),t.finish(51);case 54:e.total=e.dataarr.length,e.handleCurrentChange(1);case 56:case"end":return t.stop()}}),t,null,[[17,25],[32,48,51,54]])})))()},handleEdit:function(e){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var r,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return r=new RegExp("-","g"),t.form.nowDate.replace(r,""),a.next=4,t.$ajax.getJSON("/server/api/detailByTraceId",{id:e.name,nowDate:t.form.nowDate.replace(r,""),k8s:t.k8s});case 4:return s=a.sent,t.title="TraceId："+e.name,t.res=s,t.flag=!0,a.abrupt("return");case 9:case"end":return a.stop()}}),a)})))()},becomeD3:function(e,t){var a=this;this.$nextTick((function(){var r=function(r){var s=(new u.a.graphlib.Graph).setGraph({});s.setGraph({rankdir:"LR",marginy:60}),t[r].forEach((function(e,t){e.rx=e.ry=5,s.setNode(e.id,{labelType:"html",label:e.time?'<div class="wrap"> <span class="span1">'.concat(e.id,'</span><p class="p1" style="height:20px" >( ').concat(e.time," ms )</p></div>"):'<div class="wrap"><span class="span1">'.concat(e.id,"</span ></div>"),style:"fill:#457ff5"})})),e[r].forEach((function(e){r%2==0?s.setEdge(e.source,e.target,{label:e.label+"ms",style:"fill:#fff;stroke:#333;stroke-width:1.5px;"}):s.setEdge(e.source,e.target,{label:e.label+"ms",style:"fill:#EBF2FF;stroke:#333;stroke-width:1.5px;"})}));var o=d["select"](".svgs".concat(r," svg")),n=o.select("g"),l=new u.a.render;l(n,s),document.getElementsByClassName("svg".concat(r)),n.selectAll(".edgeLabel tspan").attr("dy","-1.2em");var c=document.querySelectorAll(".svgs".concat(r," svg .span1"));for(i in c)if(i==c.length)break;n.selectAll("g.node").on("click",(function(t,s,i){var o=[],l=d["select"]("#svgs");if(l.selectAll(".all rect").style("fill","white"),e[r].forEach((function(e,r){t==e.source&&a.begin!=e.target&&o.push(e)})),n.selectAll("rect").style("fill",(function(e,a){return e==t&&o.length>0?"#3F5AE0":"#457FF5"})),o.length>0){Object(p["a"])(o,e[r],0,o.length,t);var c=[],u=-1;for(var m in o)o[m-1]&&o[m].source==o[m-1].source||(u+=1,c[u]=[]),c[u].push(o[m]);c.forEach((function(e){e.sort((function(e,t){return e.startTimeStamp-t.startTimeStamp}))}));var f=[];c.forEach((function(e){e.forEach((function(e){f.push(e)}))})),a.ganTe(f,t,r)}}))};for(var s in e){var i;r(s)}}))},ganTe:function(e,t,r){var s=this;return Object(n["a"])(regeneratorRuntime.mark((function i(){var o,n,l,c,u,d,m,f,h,g,v,b,_,y,w,$,k,x,S,j,C,M,O,N,D;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:for(n in N=function(e,t){var a=t.value(0),r=t.coord([t.value(1),a]),s=t.coord([t.value(2),a]),i=.35*t.size([0,1])[1]>30?30:.35*t.size([0,1])[1],o=$.graphic.clipRectByRect({x:r[0],y:r[1],width:s[0]-r[0],height:i},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height}),n=null;if(""!==t.value(3)){var l,c=t.coord([t.value(3),a]),u=t.value(4),d=t.value(3),p=($.number.parseDate(_),d+u);l=t.coord([p,a]),n=$.graphic.clipRectByRect({x:c[0],y:c[1],width:l[0]-c[0],height:i},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height})}return null==n?o&&{type:"group",children:[{type:"rect",shape:o,style:t.style({fill:"#AACCF9"})}]}:o&&n&&{type:"group",children:[{type:"rect",shape:o,style:t.style({fill:"#a1a8f5"})},{type:"rect",shape:n,style:t.style({fill:"#9c9c9c"})}]}},y=function(e){var t=e.toLocaleDateString().split("/");return t[1].length<2&&t.splice(1,1,"0"+t[1]),t[2].length<2&&t.splice(2,1,"0"+t[2]),t.join("-")},o=document.getElementsByClassName("containers"),o)o[n].style&&(o[n].style.display="none");for(j in l=document.getElementById("containers".concat(r)),l.style.display="block",c=e,u=[],c.forEach((function(e){u.push(e.startTimeStamp),s.resdata[r].forEach((function(t){e.target==t.vertex&&(e.server_time=t.callTime/t.callCount)})),s.restdata[r].forEach((function(t){e.source==t.fromVertex&&e.target==t.toVertex&&(e.client_time=t.callTime/t.callCount)}))})),d=[],m=[],f=[],h=[],g=[],v=[],Object(p["c"])(c,d,m,f,h,g,v),b=new Date,_=y(b),w=t,$=a("313e"),k=$.init(l),x=[],S=f.length-1,f)x.push({name:f[j],value:[S-parseInt(j),v[j],v[j]+h[j],(h[j]-g[j])/2+v[j],g[j]]});C=[],M=[],x.forEach((function(e){C.push(e.value[2]),M.push(e.value[1])})),C.sort((function(e,t){return t-e})),M.sort((function(e,t){return e-t})),f=f.reverse(),O=f,D=s,k.setOption({tooltip:{formatter:function(e){return e.name+"<br/>"+D.$t("callChain.stringBtime")+D.fortime(e.value[1])+"ms<br/>"+D.$t("callChain.stringEtime")+D.fortime(e.value[2])+"ms<br/>"+D.$t("callChain.clientTime")+(e.value[2].toFixed(2)-e.value[1].toFixed(2))+"ms<br/>"+D.$t("callChain.serverTime")+e.value[4].toFixed(2)+"ms"}},title:{text:s.serverArrs[r]+"："+w,left:"center"},xAxis:{type:"value",min:M[0],max:C[0],axisLabel:{interval:0,formatter:function(e){return D.fortime(e)}},splitLine:{show:!0}},yAxis:{data:O,axisTick:{alignWithLabel:!0},splitLine:{show:!0}},legend:{left:"70%",top:20,data:["client","server"]},grid:{left:260},series:[{type:"custom",renderItem:N,name:"client",itemStyle:{color:"#a1a8f5"},encode:{x:[1,2],y:0},data:x},{type:"custom",name:"server",itemStyle:{color:"#9c9c9c"}}]});case 33:case"end":return i.stop()}}),i)})))()},getdatas:function(){return Object(n["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)})))()}}},F=R,P=(a("4290"),Object(v["a"])(F,y,w,!1,null,null,null)),z=P.exports,E={data:function(){return{activeName:"first"}},components:{homes:_,times:z}},V=E,q=(a("65f9"),Object(v["a"])(V,r,s,!1,null,null,null));t["a"]=q.exports},"6ace":function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return s})),a.d(t,"a",(function(){return i}));a("99af"),a("c740"),a("4160"),a("c975"),a("d81d"),a("fb6a"),a("a434"),a("b0c0"),a("d3b7"),a("4d63"),a("ac1f"),a("25f0"),a("6062"),a("3ca3"),a("466d"),a("5319"),a("1276"),a("159b"),a("ddb0"),a("53ca"),a("2909");var r=function(e,t,a,r,s,i,o,n,l,c,u,d){var p=0;e.forEach((function(e){e.btime=p,t.length>=1&&e.source==a[a.length-1]?e.btime=o[o.length-1]+(s[s.length-1]-i[i.length-1])/2:a.length>=1&&t.forEach((function(t,a){t==e.source&&(e.btime=o[a]+s[a])})),o.push(e.btime),t.push(e.source),a.push(e.target),e.source.length>e.target.length?r.push(e.source+"\n调用"+e.target):r.push(e.source+"调用\n"+e.target),s.push(e.client_time),i.push(e.server_time),n&&n.push(e.ret),l&&l.push(e.csData),c&&c.push(e.csData),u&&u.push(e.csData),d&&d.push(e.csData)}))},s=function(e,t,a,r,s,i,o){e.forEach((function(e){e.btime=e.startTimeStamp,o.push(e.btime),t.push(e.source),a.push(e.target),e.source.length>e.target.length?r.push(e.source+"\n调用"+e.target):r.push(e.source+"调用\n"+e.target),s.push(e.client_time),i.push(e.server_time)}))},i=function e(t,a,r,s,i){if(s>1)for(var o=function(r){var o=!0;a.forEach((function(n,l){t[r].target==n.source&&(o?(t.push(t[r]),t.push(n)):t.push(n),o=!1,e(t,a,t.length-1,1,i)),l==a.length-1&&1==o&&t.push(t[r]),r==s-1&&l==a.length-1&&t.splice(0,s)}))},n=0;n<s;n++)o(n);else a.forEach((function(s){t[r].target==s.source&&t[r].target!=i&&(t.push(s),e(t,a,t.length-1,1,i))}))}},"706f":function(e,t,a){},"709f":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"},attrs:{shadow:"never"}},[a("let-form",{ref:"k8sDetailForm",attrs:{itemWidth:"360px",columns:3}},[a("div",[a("div",[a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostIpc"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sModel.HostIpc,callback:function(t){e.$set(e.k8sModel,"HostIpc",t)},expression:"k8sModel.HostIpc"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostNetwork"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sModel.HostNetwork,callback:function(t){e.$set(e.k8sModel,"HostNetwork",t)},expression:"k8sModel.HostNetwork"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1),a("let-form-item",{attrs:{label:e.$t("deployService.table.th.hostPort"),itemWidth:"25%"}},[a("el-radio-group",{on:{change:e.changeKind},model:{value:e.k8sModel.showHostPort,callback:function(t){e.$set(e.k8sModel,"showHostPort",t)},expression:"k8sModel.showHostPort"}},[a("el-radio",{attrs:{label:!0}},[e._v(e._s(e.$t("common.true")))]),a("el-radio",{attrs:{label:!1}},[e._v(e._s(e.$t("common.false")))])],1)],1)],1),e.k8sModel.showHostPort?a("let-table",{staticStyle:{"padding-right":"30px"},attrs:{data:e.HostPortArr}},[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",disabled:"",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,callback:function(a){e.$set(t.row,"obj",a)},expression:"props.row.obj"}})]}}],null,!1,2224078653)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.hostPort")},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:1,max:65535,placeholder:"1-65535",required:"","required-tip":e.$t("deployService.table.tips.empty")},model:{value:t.row.HostPort,callback:function(a){e.$set(t.row,"HostPort",a)},expression:"props.row.HostPort"}})]}}],null,!1,4126442684)}),a("let-table-column",{scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-button",{staticClass:"port-button",attrs:{size:"small",theme:"primary"},on:{click:function(a){return e.generateHostPort(t.row)}}},[e._v(" "+e._s(e.$t("deployService.table.th.checkHostPort"))+" ")])]}}],null,!1,642882776)}),a("let-table-column",{attrs:{title:"Open"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-switch",{attrs:{size:"small"},on:{change:e.change},model:{value:t.row.open,callback:function(a){e.$set(t.row,"open",a)},expression:"props.row.open"}},[a("span",{attrs:{slot:"open"},slot:"open"},[e._v("ON")]),a("span",{attrs:{slot:"close"},slot:"close"},[e._v("OFF")])])]}}],null,!1,623562718)})],1):e._e()],1)]),e.install?e._e():a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},s=[],i=(a("99af"),a("c740"),a("4160"),a("159b"),{props:["k8sModel","install"],name:"Network",data:function(){return{HostPortArr:[]}},mounted:function(){this.HostPortArr=this.k8sModel.HostPortArr},methods:{changeKind:function(){if(this.k8sModel.showHostPort){var e=this.HostPortArr.findIndex((function(e){return e.open}));-1==e&&(this.HostPortArr.forEach((function(e){e.open=!0})),this.k8sModel.HostPortArr=this.HostPortArr)}this.$forceUpdate()},change:function(){var e=this.HostPortArr.findIndex((function(e){return e.open}));-1==e&&(this.showHostPort=!1),this.$forceUpdate()},save:function(){this.$refs.k8sDetailForm.validate()&&(this.k8sModel.HostPortArr=this.HostPortArr,this.$emit("saveNetwork",this.k8sModel))},generateHostPort:function(e){var t=this;this.$ajax.getJSON("/k8s/api/check_host_port",{NodePort:e.HostPort}).then((function(e){var a="";e.forEach((function(e){-1==e.ret?a+="<p>".concat(e.node,":").concat(e.port,": can use</p>"):a+='<p style="color: #F56C6C">'.concat(e.node,":").concat(e.port,": cannot use</p>")})),t.$message.success({dangerouslyUseHTMLString:!0,message:a})})).catch((function(e){t.$message.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))}}}),o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},7253:function(e,t,a){"use strict";var r=a("dd29"),s=a.n(r);s.a},"72f1":function(e,t,a){},7720:function(e,t,a){},"78e2":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"batch-publish",staticStyle:{display:"inline"}},[a("let-button",{attrs:{size:e.size,theme:"primary",disabled:e.disabled},on:{click:e.init}},[e._v(e._s(e.$t("dcache.batch."+e.type)))]),a("let-modal",{attrs:{closeOnClickBackdrop:!0,width:"1000px",title:e.$t("dcache.batch."+e.type)},on:{"on-confirm":e.confirm},model:{value:e.show,callback:function(t){e.show=t},expression:"show"}},[a("let-form",[a("let-form-item",{attrs:{label:e.$t("service.serverName")}},e._l(e.checkedServers,(function(t){return a("p",[e._v(e._s(t.application+"."+t.server_name+"_"+t.node_name))])})),0)],1),a("let-form",{staticClass:"elegant-form"},[a("div",{staticClass:"elegant-switch"},[a("let-switch",{attrs:{size:"large"},on:{change:e.changeElegantStatus},model:{value:e.elegantChecked,callback:function(t){e.elegantChecked=t},expression:"elegantChecked"}},[a("span",{attrs:{slot:"open"},slot:"open"},[e._v(e._s(e.$t("dcache.batch.elegantTask")))]),a("span",{attrs:{slot:"close"},slot:"close"},[e._v(e._s(e.$t("dcache.batch.commonTask")))])]),e._v(" "),e.elegantChecked?a("div",{staticClass:"elegant-num"},[a("span",{staticClass:"elegant-label"},[e._v(e._s(e.$t("dcache.batch.elegantEachNum")))]),a("let-input-number",{staticClass:"elegant-box",attrs:{max:20,min:1,step:1,size:"small"},model:{value:e.eachNum,callback:function(t){e.eachNum=t},expression:"eachNum"}})],1):e._e()],1)])],1),a("let-modal",{attrs:{footShow:!1,closeOnClickBackdrop:!0,width:"1000px",title:e.$t("dcache.batch."+e.type)},model:{value:e.releaseIng,callback:function(t){e.releaseIng=t},expression:"releaseIng"}},[e.releaseId&&e.releaseIng?a("tars-release-progress",{attrs:{"release-id":e.releaseId},on:{"close-fn":this.getServerList}}):e._e()],1)],1)},s=[],i=(a("99af"),a("4160"),a("d3b7"),a("25f0"),a("159b"),a("96cf"),a("1da1")),o=a("393d"),n=a("2d43"),l=a("e51e"),c={components:{tarsReleaseProgress:n["a"]},mixins:[l["a"]],props:{size:String,disabled:Boolean,expandServers:{required:!1,type:Array},checkedServers:{required:!1,type:Array},type:String},data:function(){return{versionList:[],releaseId:null,show:!1,publishModal:{moduleName:"DCacheServerGroup",application:"DCache",totalPatchPage:0,pageSize:5,currPage:1},releaseIng:!1,elegantChecked:!1,eachNum:0}},methods:{init:function(){this.show=!0,this.releaseId=null,this.releaseIng=!1},confirm:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r,s,i,n,l;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=[],r=e.checkedServers,r.forEach((function(t){a.push({server_id:t.id.toString(),command:e.type})})),t.prev=3,s=e.elegantChecked,i=e.eachNum,n=!1,t.next=9,Object(o["a"])({serial:n,elegant:s,eachnum:i,items:a});case 9:l=t.sent,e.releaseIng=!0,e.releaseId=l,t.next=17;break;case 14:t.prev=14,t.t0=t["catch"](3),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.t0.message||t.t0.err_msg));case 17:case"end":return t.stop()}}),t,null,[[3,14]])})))()},getServerList:function(){this.show=!1,this.$emit("success-fn")},changeElegantStatus:function(e){this.checked=e,e&&(this.eachNum=1)}}},u=c,d=(a("4ad0"),a("2877")),p=Object(d["a"])(u,r,s,!1,null,null,null);t["a"]=p.exports},"79c7":function(e,t,a){},"7ad2":function(e,t,a){"use strict";a("99af"),a("4160"),a("c975"),a("a15b"),a("13d5"),a("fb6a"),a("b64b"),a("d3b7"),a("ac1f"),a("25f0"),a("5319"),a("1276"),a("159b");var r=a("d4ec"),s=a("bee2"),i=a("53ca"),o=function(e){return"string"===typeof e},n=Array.isArray,l=function(e){return"object"===Object(i["a"])(e)&&null!==e},c=function(e){return"function"===typeof e},u=Object.assign;function d(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"%".concat(e.charCodeAt().toString(16).slice(-2).toUpperCase())}))}function p(e){if(!e)return"";var t=[];return Object.keys(e).forEach((function(a){var r=e[a];null!==r&&void 0!==r||(r=""),t.push("".concat(d(a),"=").concat(d(r)))})),t.join("&").replace(/%20/g,"+")}function m(e){var t=function e(t,a,r){return n(r)||l(r)?(Object.keys(r).forEach((function(s){e(t,"".concat(a,"[").concat(s,"]"),r[s])})),t):(t[a]=r,t)};return p(Object.keys(e).reduce((function(a,r){return t(a,r,e[r])}),{}))}var f=function(){function e(t){Object(r["a"])(this,e),this.defaults=t}return Object(s["a"])(e,[{key:"get",value:function(e){return u({},this.defaults,e)}},{key:"set",value:function(e,t){var a=this;if(e){if(o(e)){var r=e.split(".");r.reduce((function(e,a,s){return s===r.length-1&&(e[a]=t),e[a]}),this.defaults)}l(e)&&Object.keys(e).forEach((function(t){a.set(t,e[t])})),n(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,r){return r===a.length-1&&delete e[t],e[t]}),this.defaults)}n(e)&&e.forEach((function(e){return t.remove(e)}))}}}]),e}(),h=function(){function e(t){Object(r["a"])(this,e),this.handler=t}return Object(s["a"])(e,[{key:"set",value:function(e){c(e)&&(this.handler=e)}},{key:"exec",value:function(){c(this.handler)&&this.handler.apply(null,arguments)}}]),e}(),g=function(){function e(t){Object(r["a"])(this,e),this.base=t||""}return Object(s["a"])(e,[{key:"set",value:function(e){o(e)&&(this.base=e)}},{key:"get",value:function(e){return this.base+(e||"")}}]),e}(),v=function e(){var t=this;Object(r["a"])(this,e),this.ServerUrl=new g,this.Options=new f({credentials:"same-origin",timeout:5e3}),this.Headers=new f({"X-Requested-With":"XMLHttpRequest"}),this.Body=new f({}),this.StatusHandler=new h,this.ResultHandler=new h((function(){return!0})),this.parseUrl=function(e,a){var r=p(t.Body.get(a));return r&&(r=-1===e.indexOf("?")?"?".concat(r):"&".concat(r)),e+r},this.checkStatus=function(e){var a=e.status;if(a>=200&&a<300||304===a)return e;throw t.StatusHandler.exec(a,e),new Error(e.statusText)},this.parseJSON=function(e){return e.json().then(null,(function(a){return t.StatusHandler.exec(500,e),Promise.reject(a)}))},this.successCallback=function(e){return t.ResultHandler.handler(e)?e:Promise.reject(e)},this.errorCallback=function(e){return Promise.reject(e)},this.get=function(e,a){var r=t.Options.get({headers:t.Headers.get()});return fetch(t.ServerUrl.get(t.parseUrl(e,a)),r).then(t.checkStatus).then(t.parseJSON).catch(t.errorCallback)},this.getJSON=function(e,a){var r=t.Options.get({headers:t.Headers.get()});return fetch(t.ServerUrl.get(t.parseUrl(e,a)),r).then(t.checkStatus).then(t.parseJSON).then(t.successCallback).catch(t.errorCallback)},this.post=function(e,a){var r=t.Options.get({method:"POST",headers:t.Headers.get({"Content-Type":"application/x-www-form-urlencoded"}),body:m(t.Body.get(a))});return fetch(t.ServerUrl.get(e),r).then(t.checkStatus).then(t.parseJSON).then(t.successCallback).catch(t.errorCallback)},this.postForm=function(e,a){var r=t.Options.get({method:"POST",headers:t.Headers.get(),body:a}),s=t.Body.get({});return Object.keys(s).forEach((function(e){a.append(e,s[e])})),fetch(t.ServerUrl.get(e),r).then(t.checkStatus).then(t.parseJSON).then(t.successCallback).catch(t.errorCallback)},this.postJSON=function(e,a){var r=t.Options.get({method:"POST",headers:t.Headers.get({Accept:"application/json","Content-Type":"application/json"}),body:JSON.stringify(t.Body.get(a))});return fetch(t.ServerUrl.get(e),r).then(t.checkStatus).then(t.parseJSON).then(t.successCallback).catch(t.errorCallback)},this.put=function(e,a){var r=t.Options.get({method:"PUT",headers:t.Headers.get({"Content-Type":"application/x-www-form-urlencoded"}),body:m(t.Body.get(a))});return fetch(t.ServerUrl.get(e),r).then(t.checkStatus).then(t.parseJSON).then(t.successCallback).catch(t.errorCallback)},this.remove=function(e,a){var r=t.Options.get({method:"DELETE",headers:t.Headers.get()});return fetch(t.ServerUrl.get(t.parseUrl(e,a)),r).then(t.checkStatus).then(t.parseJSON).then(t.successCallback).catch(t.errorCallback)},this.getPlain=function(e,a){var r=t.Options.get({method:"GET",headers:t.Headers.get()});return fetch(t.ServerUrl.get(t.parseUrl(e,a)),r).then(t.checkStatus).then(t.successCallback).catch(t.errorCallback)},this.postPlain=function(e,a){var r=t.Options.get({method:"POST",headers:t.Headers.get()});return fetch(t.ServerUrl.get(t.parseUrl(e,a)),r).then(t.checkStatus).then(t.successCallback).catch(t.errorCallback)},this.postBinary=function(e,a){var r=t.Options.get({method:"POST",headers:t.Headers.get(),body:a});return fetch(t.ServerUrl.get(t.parseUrl(e)),r).then(t.checkStatus).then(t.successCallback).catch(t.errorCallback)},this.download=function(e,a){window.open(t.ServerUrl.get(t.parseUrl(e,a)))}};t["a"]=v},8266:function(e,t,a){"use strict";var r=a("79c7"),s=a.n(r);s.a},"83a3":function(e,t,a){},8636:function(e,t,a){},"8a5b":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"}},[a("let-form",{ref:"k8sDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("div",[a("let-form-item",{attrs:{label:e.$t("deployService.form.affinity"),itemWidth:"100%"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small"},model:{value:e.k8sModel.abilityAffinity,callback:function(t){e.$set(e.k8sModel,"abilityAffinity",t)},expression:"k8sModel.abilityAffinity"}},e._l(e.abilityAffinities,(function(t){return a("el-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1),a("el-alert",{staticStyle:{margin:"5px"},attrs:{size:"small",type:"warning"}},[e._v("AppRequired:在满足其他条件后,节点必须有tars.io/ability.${namespace}.${App} 标签")]),a("el-alert",{staticStyle:{margin:"5px"},attrs:{type:"warning"}},[e._v("ServerRequired: 在满足其他条件后,节点必须有tars.io/ability.${namespace}.${App}-${Server} 标签")]),a("el-alert",{staticStyle:{margin:"5px"},attrs:{type:"warning"}},[e._v("AppOrServerPreferred: 在满足其他条件后,优先选择有tars.io/ability.${namespace}.${App}-${Server}, tars.io/ability.${namespace}.${App} 标签的节点")]),a("el-alert",{staticStyle:{margin:"5px"},attrs:{type:"warning"}},[e._v("None: 不对节点标签做要求")])],1),0==e.labelMatchArr.length?a("let-form-item",{attrs:{itemWidth:"45%"}},[a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"text",size:"mini"},on:{click:function(t){return e.addItems(0,e.labelMatchArr)}}},[e._v(" "+e._s(e.$t("deployService.form.labelMatch.addLabel"))+" ")])],1):e._e(),e._l(e.labelMatchArr,(function(t,r){return a("div",{key:r},[a("let-form-item",{attrs:{label:e.$t("nodeList.table.th.label"),itemWidth:"30%"}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("nodeList.table.th.label"),"pattern-tip":e.$t("deployService.form.labelMatch.labelValid")},model:{value:t.key,callback:function(a){e.$set(t,"key",a)},expression:"item.key"}})],1),a("let-form-item",{attrs:{label:"operator",itemWidth:"15%"}},[a("el-select",{attrs:{size:"small"},on:{change:e.changeLabelOperator},model:{value:t.operator,callback:function(a){e.$set(t,"operator",a)},expression:"item.operator"}},e._l(e.LabelMatchOperator,(function(t){return a("el-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1),a("let-form-item",{attrs:{label:e.$t("nodes.label.value"),itemWidth:"40%"}},[a("el-select",{staticStyle:{width:"95%"},attrs:{disabled:t.disableValue,multiple:"",filterable:"","allow-create":"","multiple-limit":63,"default-first-option":"",placeholder:e.$t("deployService.form.labelMatch.labelValue"),size:"small"},on:{change:function(t){e.addLabelValues(t,r)}},model:{value:t.values,callback:function(a){e.$set(t,"values",a)},expression:"item.values"}},e._l(t.values,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1),a("el-button",{attrs:{type:"primary",icon:"el-icon-plus",size:"mini",circle:""},on:{click:function(t){return e.addItems(r,e.labelMatchArr)}}}),a("el-button",{attrs:{type:"danger",icon:"el-icon-minus",size:"mini",circle:""},on:{click:function(t){return e.delItems(r,e.labelMatchArr)}}})],1)}))],2)]),e.install?e._e():a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},s=[],i=(a("4160"),a("d81d"),a("a434"),a("d3b7"),a("498a"),a("159b"),a("ddb0"),a("b85c")),o={props:["k8sModel","labelMatchArr","LabelMatchOperator","install"],name:"AbilityAffinity",data:function(){return{abilityAffinities:["AppRequired","ServerRequired","AppOrServerPreferred","None"]}},methods:{changeKind:function(){this.$forceUpdate()},adapterServerK8S:function(e){var t=Object.assign({},e),a=this.labelMatchArr.map((function(e){return{key:e.key,operator:e.operator,values:e.values}}));return t.NodeSelector=a,t},save:function(){if(this.$refs.k8sDetailForm.validate()&&this.validateLabels()){var e=this.adapterServerK8S(this.k8sModel);this.$emit("saveAffinity",e)}},validateLabels:function(e){var t,a=!0,r=Object(i["a"])(this.labelMatchArr);try{for(r.s();!(t=r.n()).done;){var s=t.value;if(""==s.key.trim()){this.$message.error("".concat(this.$t("deployService.form.labelMatch.errorKey"))),a=!1;break}if(-1=="Exists,DoesNotExist".indexOf(s.operator)&&0==s.values.length){this.$message.error("".concat(this.$t("deployService.form.labelMatch.errorValue"))),a=!1;break}}}catch(o){r.e(o)}finally{r.f()}return a},addLabelValues:function(e,t){var a=this,r=/^([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]?$/;this.labelMatchArr[t].values.forEach((function(e,t){r.test(e)||(a.labelMatchArr[t].values.splice(t,1),a.$message.error("".concat(a.$t("deployService.form.labelMatch.labelValueValid"))))}))},changeLabelOperator:function(e){var t=this;this.labelMatchArr.forEach((function(e){"Exists"==e.operator||"DoesNotExist"==e.operator?(t.$set(e,"disableValue",!0),t.$set(e,"values",[])):t.$set(e,"disableValue",!1)}))},addItems:function(e,t){t.length>=63?this.$message.error("".concat(this.$t("deployService.form.labelMatch.labelMax"))):(t.splice(e+1,0,{key:"",operator:"In",values:[]}),this.$forceUpdate())},delItems:function(e,t){t.splice(e,1),this.$forceUpdate()}}},n=o,l=a("2877"),c=Object(l["a"])(n,r,s,!1,null,null,null);t["a"]=c.exports},"8b05":function(e,t,a){"use strict";var r=a("9c4c"),s=a.n(r);s.a},"8b32":function(e,t,a){},"8f5f":function(e,t,a){},"918a":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_config"},[a("div",{staticStyle:{"margin-bottom":"5px"}},[a("h4",[e._v(" "+e._s(e.$t("cfg.title.a"))+" "),a("i",{staticClass:"icon iconfont el-icon-third-shuaxin",staticStyle:{"font-family":"iconfont  !important"},on:{click:function(t){return e.getConfigList(e.serverData)}}}),a("let-button",{staticStyle:{float:"right"},attrs:{size:"mini",theme:"primary"},on:{click:e.addConfig}},[e._v(e._s(e.$t("cfg.btn.add")))])],1)]),a("wrapper",{ref:"configListLoading"},[a("let-table",{attrs:{data:e.configList,"empty-text":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"}},[a("span")])]}}])}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.lastUser"),prop:"lastuser"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),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){return e.changeConfig(t.row,"configList")}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.deleteConfig(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))]),a("let-table-operation",{on:{click:function(a){return e.showDetail(t.row)}}},[e._v(e._s(e.$t("cfg.title.viewConf")))]),a("let-table-operation",{on:{click:function(a){return e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}])})],1)],1),e.refFileList&&e.showOthers?a("div",{staticStyle:{"margin-bottom":"5px"}},[a("h4",[e._v(" "+e._s(e.$t("cfg.title.b"))+" "),a("let-button",{staticStyle:{float:"right"},attrs:{size:"mini",theme:"primary"},on:{click:e.openRefFileModal}},[e._v(e._s(e.$t("cfg.btn.addRef")))])],1)]):e._e(),e.refFileList&&e.showOthers?a("wrapper",{ref:"refFileListLoading"},[a("let-table",{attrs:{data:e.refFileList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),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){return e.deleteRef(t.row.id)}}},[e._v(e._s(e.$t("operate.delete")))]),a("let-table-operation",{on:{click:function(a){return e.showDetail(t.row)}}},[e._v(e._s(e.$t("operate.view")))])]}}],null,!1,3391403769)})],1)],1):e._e(),e.nodeConfigList&&e.showOthers?a("div",{staticStyle:{"margin-bottom":"5px"}},[a("h4",[e._v(" "+e._s(e.$t("cfg.title.c"))+" "),a("let-button",{staticStyle:{float:"right"},attrs:{size:"mini",theme:"primary"},on:{click:e.pushNodeConfig}},[e._v(e._s(e.$t("cfg.btn.pushFile")))])],1)]):e._e(),e.nodeConfigList&&e.showOthers?a("wrapper",{ref:"nodeConfigListLoading"},[e.nodeConfigList.length?a("let-checkbox",{staticClass:"check-all",model:{value:e.nodeCheckAll,callback:function(t){e.nodeCheckAll=t},expression:"nodeCheckAll"}}):e._e(),a("let-table",{attrs:{data:e.nodeConfigList,"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"}})]}}],null,!1,3731714217)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),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){return e.changeConfig(t.row,"nodeConfigList")}}},[e._v(e._s(e.$t("cfg.table.modCfg")))]),a("let-table-operation",{on:{click:function(a){return e.showMergedDetail(t.row.id)}}},[e._v(e._s(e.$t("cfg.table.viewMerge")))]),a("let-table-operation",{on:{click:function(a){return e.showDetail(t.row)}}},[e._v(e._s(e.$t("cfg.table.viewIpContent")))]),a("let-table-operation",{on:{click:function(a){return e.showHistory(t.row.id)}}},[e._v(e._s(e.$t("pub.btn.history")))]),a("let-table-operation",{on:{click:function(a){return e.handleRefFiles(t.row.id)}}},[e._v(e._s(e.$t("cfg.table.mangeRefFile")))])]}}],null,!1,2593104344)})],1)],1):e._e(),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:"80%"},on:{"on-confirm":e.configDiff,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.configModal.isNew?e._e():a("let-form-item",{attrs:{label:e.$t("cfg.btn.reason"),required:""}},[a("let-input",{attrs:{size:"small",required:""},model:{value:e.configModal.model.reason,callback:function(t){e.$set(e.configModal.model,"reason",t)},expression:"configModal.model.reason"}})],1),a("let-form-item",{attrs:{label:e.$t("cfg.btn.content"),required:""}},[a("let-input",{attrs:{size:"large",type:"textarea",rows:20,required:""},model:{value:e.configContent,callback:function(t){e.configContent=t},expression:"configContent"}})],1)],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("filter.title.diffTxt"),width:"1200px"},on:{"on-confirm":e.updateConfigDiff,close:e.closeConfigDiffModal,"on-cancel":e.closeConfigDiffModal},model:{value:e.configDiffModal.show,callback:function(t){e.$set(e.configDiffModal,"show",t)},expression:"configDiffModal.show"}},[e.configDiffModal.model?a("div",{staticStyle:{"padding-top":"30px"}},[a("div",{staticClass:"codediff_head"},[a("div",{staticClass:"codediff_th"},[e._v("旧内容:")]),a("div",{staticClass:"codediff_th"},[e._v("新内容:")])]),a("diff",{attrs:{"old-string":e.configDiffModal.model.oldData,"new-string":e.configDiffModal.model.newData,context:10,"output-format":"side-by-side"}})],1):e._e()]),a("let-modal",{attrs:{title:e.detailModal.title,width:"80%",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"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.reason"),prop:"reason"}}),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){return e.showTableDeatil(t.row)}}},[e._v(e._s(e.$t("operate.view")))])]}}],null,!1,3817607729)})],1):e._e(),a("div",{staticClass:"pre_con"},[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()]),a("div",{ref:"detailModalLoading",staticClass:"detail-loading"})],1),e.refFileModal.model?a("let-modal",{attrs:{title:this.$t("operate.title.add"),width:"80%"},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)],1):e._e(),a("let-modal",{attrs:{title:e.$t("cfg.table.mangeRefFile"),width:"700",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")))]),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"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"filename"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),prop:"node_name"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),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){return e.deleteRef(t.row.id,"nodeRef",t.row.config_id)}}},[e._v(e._s(e.$t("operate.delete")))]),a("let-table-operation",{on:{click:function(a){return e.showDetail(t.row)}}},[e._v(e._s(e.$t("operate.view")))]),a("let-table-operation",{on:{click:function(a){return e.showHistory(t.row.config_id)}}},[e._v(e._s(e.$t("pub.btn.history")))])]}}],null,!1,1797373192)})],1)],1):e._e()],1),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))])]}}],null,!1,1546843640)}),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))])]}}],null,!1,3216099087)})],1):e._e()],1)],1)},s=[],i=(a("99af"),a("a15b"),a("d81d"),a("d3b7"),a("ac1f"),a("25f0"),a("8a79"),a("5319"),a("dcab")),o=a("e68e"),n={name:"ServerConfig",components:{wrapper:i["a"],diff:o["a"]},data:function(){return{oldStr:"old code",newStr:"new code",serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},checkedConfigId:"",configList:[],refFileList:[],nodeConfigList:null,nodeCheckList:[],configContent:"",configModal:{show:!1,isNew:!0,model:null},configDiffModal:{type:"",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:this.serverData.server_name+".conf",config:""},""==this.serverData.server_name&&(this.configModal.model.filename=this.serverData.application+".conf"),this.configModal.isNew=!0,this.configModal.show=!0},changeConfig:function(e,t){this.configModal.model=Object.assign({reason:""},e),this.configContent=e.config,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();this.configModal.model.filename=this.configModal.model.filename.replace(/(^\s*)|(\s*$)/g,"");var a=this.configModal.model;if(this.configModal.isNew){var r=Object.assign({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",r).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(),e.closeConfigDiffModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}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(),e.closeConfigDiffModal()})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.err_msg||a.message))}))}},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("".concat(t.$t("common.error"),": ").concat(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=Object.assign(e,e.reference),e.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()})).catch((function(a){t.hide(),e.$tip.error({title:e.$t("common.error"),message:a.err_msg||a.message||e.$t("common.networkErr")})}))}},closeRefFileModal:function(){this.refFileModal.show=!1},deleteRef:function(e,t,a){var r=this;this.$confirm(this.$t("cfg.msg.confirm"),this.$t("common.alert")).then((function(){var s=r.$Loading.show();r.$ajax.getJSON("/server/api/delete_config_ref",{id:e}).then((function(e){s.hide(),"nodeRef"==t?r.getNodeRefFileList(a):r.getRefFileList(),r.$tip.success(r.$t("common.success"))})).catch((function(e){s.hide(),r.$tip.error({title:r.$t("common.error"),message:e.err_msg||e.message||r.$t("common.networkErr")})}))}))},getNodeConfigList:function(){var e=this;if(this.showOthers){var t=this.$refs.nodeConfigListLoading.$loading.show(),a=Object.assign({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",{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("".concat(e.$t("common.error"),": ").concat(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("".concat(t.$t("common.error"),": ").concat(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("".concat(t.$t("common.error"),": ").concat(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=Object.assign(e,e.reference),e.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)},configDiff:function(){this.$refs.configForm.validate()&&(this.configDiffModal.type="config",this.configDiffModal.show=!0,this.configDiffModal.isNew=!1,this.configDiffModal.model={oldData:this.configModal.model.config,newData:this.configContent})},updateConfigDiff:function(){var e=this.configDiffModal.type,t=this.configModal.model;if(t.filename.toLowerCase().endsWith(".json"))try{JSON.parse(this.configContent)}catch(o){return void alert("config format error:"+o.toString())}if(t.filename.toLowerCase().endsWith(".xml"))try{var a=new DOMParser,r=a.parseFromString(this.configContent,"text/xml"),s=r.getElementsByTagName("parsererror"),i="";if(s.length>0)return i="parsererror"==r.documentElement.nodeName?r.documentElement.childNodes[0].nodeValue:r.getElementsByTagName("parsererror")[0].innerHTML,void alert("config format error:"+i)}catch(o){return void alert("config format error:"+o.toString())}"config"===e&&(this.configModal.model.config=this.configContent,this.updateConfigFile())},closeConfigDiffModal:function(){this.configDiffModal.show=!1},nodeConfigDiff:function(){this.$refs.nodeConfigForm.validate()&&(this.configDiffModal.type="nodeConfig",this.configDiffModal.show=!0,this.configDiffModal.isNew=!1,this.configDiffModal.model={oldData:this.nodeConfigModal.model.config,newData:this.nodeConfigContent})}},created:function(){this.serverData=this.$parent.getServerData()},mounted:function(){this.getConfigList(this.serverData)}},l=n,c=(a("4201"),a("2877")),u=Object(c["a"])(l,r,s,!1,null,null,null);t["a"]=u.exports},"98c9":function(e,t,a){},"9bdc":function(e,t,a){"use strict";var r=a("c10a"),s=a.n(r);s.a},"9c4c":function(e,t,a){},"9c65":function(e,t,a){},a02f:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"}},[a("let-form",{ref:"k8sDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("div",[a("let-form-item",{attrs:{label:e.$t("operate.stacked"),itemWidth:"60%"}},[a("let-switch",{attrs:{size:"small"},model:{value:e.inputValue,callback:function(t){e.inputValue=t},expression:"inputValue"}},[a("span",{attrs:{slot:"open"},slot:"open"},[e._v("ON")]),a("span",{attrs:{slot:"close"},slot:"close"},[e._v("OFF")])]),a("el-alert",{staticStyle:{"margin-top":"5px","margin-bottom":"5px"},attrs:{title:e.$t("operate.stackedInvalid"),"show-icon":"",closable:!1,type:"warning"}}),a("el-alert",{attrs:{title:e.$t("operate.stackedInfo"),"show-icon":"",closable:!1,type:"warning"}})],1)],1)]),e.install?e._e():a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},s=[],i={props:["notStacked","install"],name:"stacked",data:function(){return{inputValue:!this.notStacked}},methods:{save:function(){this.$refs.k8sDetailForm.validate()&&this.$emit("saveStacked",!this.inputValue)}}},o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},a082:function(e,t,a){},a197:function(e,t,a){},a462:function(e,t,a){"use strict";var r=a("2d59"),s=a.n(r);s.a},a4e9:function(e,t,a){},a8ca:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"}},[a("el-form",{ref:"hpaForm",attrs:{"label-position":"top",size:"small",model:e.hpaModel}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.minReplicas"),prop:"minReplicas",rules:[{required:!0,message:e.$t("deployService.hpa.tip.minReplicas"),trigger:"blur"}]}},[a("el-input",{attrs:{oninput:"value=value.replace(/[^\\d]/g,'')",placeholder:e.$t("deployService.hpa.tip.minReplicas")},model:{value:e.hpaModel.minReplicas,callback:function(t){e.$set(e.hpaModel,"minReplicas",t)},expression:"hpaModel.minReplicas"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.maxReplicas"),prop:"maxReplicas",rules:[{required:!0,message:e.$t("deployService.hpa.tip.maxReplicas")}]}},[a("el-input",{attrs:{oninput:"value=value.replace(/[^\\d]/g,'')",placeholder:e.$t("deployService.hpa.tip.maxReplicas")},model:{value:e.hpaModel.maxReplicas,callback:function(t){e.$set(e.hpaModel,"maxReplicas",t)},expression:"hpaModel.maxReplicas"}})],1)],1)],1),a("el-divider",{attrs:{"content-position":"left"}},[e._v(e._s(e.$t("inf.benchmark.detail")))]),e._l(e.hpaModel.indicatorData,(function(t,r){return a("el-card",{key:r,staticStyle:{"margin-bottom":"5px"},attrs:{shadow:"hover"}},[a("el-alert",{attrs:{type:"warning",title:e.$t("deployService.hpa.tip.t2"),"show-icon":"",closable:!1}}),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.IndicatorName"),prop:"indicatorData."+r+".name",rules:[{required:!0,message:e.$t("deployService.hpa.tip.IndicatorName"),trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},attrs:{filterable:""},on:{change:function(a){return e.changeType(r,t.name)}},model:{value:t.name,callback:function(a){e.$set(t,"name",a)},expression:"item.name"}},e._l(e.customTargets,(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1)],1)],1)],1),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.targetType"),prop:"indicatorData."+r+".targetType",rules:[{required:!0,message:e.$t("deployService.hpa.tip.targetType"),trigger:"change"}]}},[a("el-select",{staticStyle:{width:"100%"},on:{change:function(t){return e.$forceUpdate()}},model:{value:t.targetType,callback:function(a){e.$set(t,"targetType",a)},expression:"item.targetType"}},e._l(e.getTargetTypes(t.name),(function(e,t){return a("el-option",{key:t,attrs:{label:e,value:t}})})),1)],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:e.$t("deployService.hpa.form.value"),prop:"indicatorData."+r+".value",rules:[{required:!0,message:e.$t("deployService.hpa.tip.value"),trigger:"change"}]}},[a("el-input",{attrs:{onkeyup:"value=value.replace(/[^\\d]/g,'')"},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"item.value"}},[a("template",{slot:"append"},[e._v(e._s(e._f("getValueUnit")(t.targetType)))])],2)],1)],1)],1),a("el-row",{attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:3}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.addItems(r,e.hpaModel.indicatorData)}}},[e._v(" "+e._s(e.$t("deployService.hpa.form.addIndicator"))+" ")])],1),a("el-col",{attrs:{span:3}},[a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.delItems(r,e.hpaModel.indicatorData)}}},[e._v(" "+e._s(e.$t("deployService.hpa.form.delIndicator"))+" ")])],1)],1)],1)}))],2),e.install?e._e():a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},s=[],i=(a("4160"),a("a434"),a("4d63"),a("ac1f"),a("25f0"),a("466d"),a("159b"),a("b85c")),o={props:["hpaModel","serverData","sourceModel","indicators","install"],name:"hpa",data:function(){return{customTargets:["cpu","memory"]}},mounted:function(){},filters:{getValueUnit:function(e){return"averagevalue"==e.toLowerCase()?"MiB":"averageutilization"==e.toLowerCase()?"%":"MiB"}},methods:{save:function(){var e=this;this.sourceModel.limitCpu||this.sourceModel.limitMem||this.sourceModel.requestCpu||this.sourceModel.requestMem?this.$refs.hpaForm.validate((function(t){var a=Object.assign({},e.hpaModel,{serverData:e.serverData});t&&e.$emit("saveHpa",a)})):this.$message.error("".concat(this.$t("deployService.resources.tip.resources")))},addItems:function(e,t){t.splice(e+1,0,{name:"cpu",targetType:"AverageUtilization",value:""}),this.$forceUpdate()},delItems:function(e,t){1!==t.length&&(t.splice(e,1),this.$forceUpdate())},changeType:function(e,t){var a=this.getMatchIndicators(t);this.$set(this.hpaModel.indicatorData[e],"targetType",a.target[0].type),this.$forceUpdate()},getMatchIndicators:function(e){var t,a,r=Object(i["a"])(this.indicators);try{for(r.s();!(a=r.n()).done;){var s=a.value;if("exact"==s.matchType&&s.match.toLowerCase()==e.toLowerCase()){t=s;break}if("regex"==s.matchType){var o=new RegExp(s.match);if(o.test(e)){t=s;break}}}}catch(n){r.e(n)}finally{r.f()}return t||this.$message.error("".concat(this.$t("deployService.hpa.tip.noIndicator"))),t},getTargetTypes:function(e){var t=this,a=this.getMatchIndicators(e),r={};return a.target.forEach((function(e){e.type.toLowerCase()=="AverageValue".toLowerCase()&&(r[e.type]=t.$t("deployService.hpa.form.averageValue")),e.type.toLowerCase()=="AverageUtilization".toLowerCase()&&(r[e.type]=t.$t("deployService.hpa.form.averageUtilization"))})),r}}},n=o,l=(a("255b"),a("2877")),c=Object(l["a"])(n,r,s,!1,null,"fd6e5e88",null);t["a"]=c.exports},acfd:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-modal",{attrs:{title:e.$t("serverList.table.th.result"),width:"70%",footShow:!1},on:{"on-cancel":e.onClose,close:e.onClose},model:{value:e.finishModal.show,callback:function(t){e.$set(e.finishModal,"show",t)},expression:"finishModal.show"}},[e.finishModal.model?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",width:"200px"}}),a("let-table-column",{attrs:{title:e.$t("common.status"),width:"180px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-tag",{attrs:{theme:3==t.row.status?"success":4==t.row.status?"danger":"",checked:""}},[e._v(" "+e._s(e.statusConfig[t.row.status]+(3!=t.row.status&&4!=t.row.status?t.row.desc:""))+" ")])]}}],null,!1,3849836014)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.result"),prop:"execute_info"}})],1):e._e()],1)],1)},s=[],i=(a("99af"),a("4160"),a("caad"),a("d3b7"),a("25f0"),a("2532"),a("159b"),{name:"PublishStatus",data:function(){return{closeCallback:null,timerId:null,finishModal:{show:!1,model:{task_no:"",items:[]}},statusConfig:{0:this.$t("serverList.restart.notStart"),1:this.$t("serverList.restart.preparing"),2:this.$t("serverList.restart.running"),3:this.$t("serverList.restart.success"),4:this.$t("serverList.restart.failed"),5:this.$t("serverList.restart.cancel"),6:this.$t("serverList.restart.pauseFlow")},statusMap:{0:"EM_T_NOT_START",1:"EM_T_PREPARE",2:"EM_T_RUNNING",3:"EM_T_SUCCESS",4:"EM_T_FAILED",5:"EM_T_CANCEL",6:"EM_T_PARIAL"},endStatus:[3,4]}},methods:{onClose:function(){this.closeCallback&&this.closeCallback(),clearTimeout(this.timerId)},savePublishServer:function(e,t,a,r){var s=this;a=a||"",r=r||e.model.patch_id.toString(),this.closeCallback=t;var i=[],o=e.elegant||!1;e.model.serverList.forEach((function(t){i.push({server_id:t.id.toString(),command:e.command||"patch_tars",parameters:{patch_id:r,bak_flag:t.bak_flag||!1,update_text:e.model.update_text||"",group_name:a,run_type:t.run_type||""}})}));var n=this.$Loading.show();this.$ajax.postJSON("/server/api/add_task",{serial:!o,elegant:o,eachnum:e.eachnum||1,items:i}).then((function(e){n.hide(),s.finishModal.model.task_no=e,s.finishModal.show=!0,s.getTaskRepeat(e)})).catch((function(e){n.hide(),s.$tip.error("".concat(s.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getTaskRepeat:function(e){var t=this;this.timerId&&clearTimeout(this.timerId);var a=function a(){t.$ajax.getJSON("/server/api/task",{task_no:e}).then((function(e){var r=!0;e.items.forEach((function(e){t.endStatus.includes(e.status)||(r=!1),e.percent?e.desc="("+e.percent+"%)":e.desc="..."})),r?clearTimeout(t.timerId):t.timerId=setTimeout(a,2e3),t.finishModal.model.items=e.items})).catch((function(e){clearTimeout(t.timerId),t.timerId=null,t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))};a()}}}),o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},ad4b:function(e,t,a){},ae6e:function(e,t,a){},b15f:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.deployObj?a("let-form",{ref:"form",attrs:{inline:"","label-position":"top",itemWidth:"30%"},nativeOn:{submit:function(t){return t.preventDefault(),e.next(t)}}},[a("let-form-item",{attrs:{label:e.$t("deployService.form.app"),required:""}},[a("let-select",{attrs:{size:"small",placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.form.appTips"),pattern:"^[a-zA-Z0-9]+$","pattern-tip":e.$t("deployService.form.placeholder")},model:{value:e.deployObj.app,callback:function(t){e.$set(e.deployObj,"app",t)},expression:"deployObj.app"}},e._l(e.appList,(function(t){return a("let-option",{key:t.ServerApp,attrs:{value:t.ServerApp}},[e._v(e._s(t.ServerApp))])})),1)],1),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.deployObj.server,callback:function(t){e.$set(e.deployObj,"server",t)},expression:"deployObj.server"}})],1),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.deployObj.template,callback:function(t){e.$set(e.deployObj,"template",t)},expression:"deployObj.template"}},e._l(e.templates,(function(t){return a("let-option",{key:t.TemplateId,attrs:{value:t.TemplateId}},[e._v(e._s(t.TemplateId))])})),1)],1),a("let-table",{attrs:{data:e.deployObj.servants}},[a("let-table-column",{attrs:{title:"OBJ",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-input",{attrs:{size:"small",disabled:!e.deployObj.new,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.name,callback:function(a){e.$set(t.row,"name",a)},expression:"props.row.name"}})]}}],null,!1,3854246402)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.port"),width:"90px"},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"}})]}}],null,!1,1220625212)}),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:{disabled:!e.deployObj.new,label:!0},model:{value:t.row.isTcp,callback:function(a){e.$set(t.row,"isTcp",a)},expression:"props.row.isTcp"}},[e._v("TCP")]),a("let-radio",{attrs:{disabled:!e.deployObj.new,label:!1},model:{value:t.row.isTcp,callback:function(a){e.$set(t.row,"isTcp",a)},expression:"props.row.isTcp"}},[e._v("UDP")])]}}],null,!1,2191313922)}),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:{disabled:!e.deployObj.new,label:!0},model:{value:t.row.isTars,callback:function(a){e.$set(t.row,"isTars",a)},expression:"props.row.isTars"}},[e._v("TARS")]),a("let-radio",{attrs:{disabled:!e.deployObj.new,label:!1},model:{value:t.row.isTars,callback:function(a){e.$set(t.row,"isTars",a)},expression:"props.row.isTars"}},[e._v(e._s(e.$t("serverList.servant.notTARS")))])]}}],null,!1,1987037891)}),a("let-table-column",{attrs:{title:e.$t("deployService.table.th.threads"),width:"60px"},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,callback:function(a){e.$set(t.row,"thread",a)},expression:"props.row.thread"}})]}}],null,!1,759048193)}),a("let-table-column",{attrs:{title:e.$t("serverList.servant.connections"),width:"90px"},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.connection,callback:function(a){e.$set(t.row,"connection",a)},expression:"props.row.connection"}})]}}],null,!1,2155341273)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.capacity"),width:"90px"},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.capacity,callback:function(a){e.$set(t.row,"capacity",a)},expression:"props.row.capacity"}})]}}],null,!1,1786573115)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.servant.timeout"),width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-input",{staticStyle:{"padding-right":"20px"},attrs:{size:"small",type:"number",min:0},model:{value:t.row.timeout,callback:function(a){e.$set(t.row,"timeout",a)},expression:"props.row.timeout"}})]}}],null,!1,1790878308)}),e.deployObj.new?a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"60px"},scopedSlots:e._u([{key:"default",fn:function(t){return[0===t.$index?a("let-table-operation",{on:{click:function(a){return e.addAdapter(t.row)}}},[e._v(e._s(e.$t("operate.add"))+" ")]):e._e(),t.$index?a("let-table-operation",{staticClass:"danger",on:{click:function(a){return e.deployObj.servants.splice(t.$index,1)}}},[e._v(e._s(e.$t("operate.delete"))+" ")]):e._e()]}}],null,!1,2141953043)}):e._e()],1),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("common.submit")))])],1):e._e()],1)},s=[],i=(a("99af"),a("7db0"),a("1e96")),o={name:"Base",components:{install:i["a"]},data:function(){return{appList:[],templates:[]}},props:["deployObj"],mounted:function(){this.getServerTemplate(),this.getAppList()},methods:{addAdapter:function(e){e=this.deployObj.servants[this.deployObj.servants.length-1];var t=e.Port+1,a=Object.assign({},e,{Port:t});this.deployObj.servants.push(Object.assign({},a))},getAppList:function(){var e=this;this.$ajax.getJSON("/k8s/api/application_select",{isAll:!0}).then((function(t){e.appList=t.Data;var a=e.appList.find((function(t){return t.ServerApp==e.deployObj.app}));-1==a&&e.appList.push({ServerApp:e.deployObj.app})})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getServerTemplate:function(){var e=this;this.$ajax.getJSON("/k8s/api/template_select",{isAll:!0}).then((function(t){e.templates=t.Data})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},next:function(){var e=this;this.$ajax.getJSON("/k8s/api/exists",{app:this.deployObj.app,server:this.deployObj.server}).then((function(t){t?e.$message({showClose:!0,message:e.$t("market.deploy.existsK8S"),type:"warning"}):e.$emit("next",e.deployObj)})).catch((function(e){}))}}},n=o,l=a("2877"),c=Object(l["a"])(n,r,s,!1,null,null,null);t["a"]=c.exports},b3a0:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"}},[a("let-form",{ref:"k8sDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("div",[a("let-form-item",{attrs:{label:e.$t("operate.jobModel"),itemWidth:"45%",required:""}},[a("let-switch",{attrs:{size:"small"},model:{value:e.inputValue,callback:function(t){e.inputValue=t},expression:"inputValue"}},[a("span",{attrs:{slot:"open"},slot:"open"},[e._v("DaemonSet")]),a("span",{attrs:{slot:"close"},slot:"close"},[e._v("StatefullSet")])])],1)],1)]),e.install?e._e():a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},s=[],i={props:["daemonSet","install"],name:"JobModel",data:function(){return{inputValue:this.daemonSet}},methods:{save:function(){this.$refs.k8sDetailForm.validate()&&this.$emit("saveJobModel",this.inputValue)}}},o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},b3f5:function(e,t,a){"use strict";a("99af"),a("4160"),a("6d93");var r=a("a026"),s=a("7ad2"),i=new s["a"];i.ServerUrl.set("/pages"),i.ResultHandler.set((function(e){return!(!e||200!==e.ret_code||null==e.data)})),["getJSON","postJSON"].forEach((function(e){var t=i[e];i["_".concat(e)]=t,i[e]=function(){for(var e=arguments.length,a=new Array(e),r=0;r<e;r++)a[r]=arguments[r];return t.call.apply(t,[null].concat(a)).then((function(e){return e.data}))}})),Object.defineProperty(r["default"].prototype,"$ajax",{get:function(){return i}}),t["a"]=i},be1a:function(e,t,a){},be8e:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"}},[a("let-form",{ref:"k8sDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("div",[a("let-form-item",{attrs:{label:e.$t("operate.launcherType"),itemWidth:"45%"}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small"},model:{value:e.inputValue,callback:function(t){e.inputValue=t},expression:"inputValue"}},e._l(e.launcherTypes,(function(t){return a("el-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1),a("el-alert",{staticStyle:{"margin-top":"5px","margin-bottom":"5px"},attrs:{title:e.$t("operate.backgroundInfo"),"show-icon":"",closable:!1,type:"warning"}}),a("el-alert",{attrs:{title:e.$t("operate.foregroundInfo"),"show-icon":"",closable:!1,type:"warning"}})],1)],1)]),e.install?e._e():a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},s=[],i={props:["launcherType","install"],name:"LauncherType",data:function(){return{inputValue:this.launcherType,launcherTypes:["background","foreground"]}},methods:{save:function(){this.$refs.k8sDetailForm.validate()&&this.$emit("saveLauncherType",this.inputValue)}}},o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},bfdc:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"},attrs:{shadow:"never"}},[0==e.mounts.length?a("div",[a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"text",size:"mini"},on:{click:function(t){return e.addDisk(0,e.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.addDisk"))+" ")])],1):e._e(),a("el-form",{ref:"disk",attrs:{"label-position":"top","label-width":"120px",size:"mini"}},[e._l(e.mounts,(function(t,r){return a("div",{key:r},[a("el-card",{staticStyle:{padding:"10px"},attrs:{shadow:"never"}},[a("el-row",{attrs:{gutter:22}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:e.$t("deployService.disk.diskName"),required:""}},[a("el-input",{model:{value:t.name,callback:function(a){e.$set(t,"name",a)},expression:"disk.name"}})],1)],1),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{label:e.$t("deployService.disk.path"),required:""}},[a("el-input",{model:{value:t.mountPath,callback:function(a){e.$set(t,"mountPath",a)},expression:"disk.mountPath"}})],1)],1)],1),a("el-row",{attrs:{gutter:22}},[a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"uid",required:""}},[a("el-input",{attrs:{placeholder:"0"},model:{value:t.source.tLocalVolume.uid,callback:function(a){e.$set(t.source.tLocalVolume,"uid",a)},expression:"disk.source.tLocalVolume.uid"}})],1)],1),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"gid",required:""}},[a("el-input",{attrs:{placeholder:"0"},model:{value:t.source.tLocalVolume.gid,callback:function(a){e.$set(t.source.tLocalVolume,"gid",a)},expression:"disk.source.tLocalVolume.gid"}})],1)],1),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"mode",required:""}},[a("el-input",{attrs:{placeholder:"755"},model:{value:t.source.tLocalVolume.mode,callback:function(a){e.$set(t.source.tLocalVolume,"mode",a)},expression:"disk.source.tLocalVolume.mode"}})],1)],1)],1),a("el-row",[a("el-col",{attrs:{offset:18}},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){return e.addDisk(r,e.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.addDisk"))+" ")]),a("el-button",{staticStyle:{"margin-left":"20px"},attrs:{type:"danger",size:"mini"},on:{click:function(t){return e.delDisk(r,e.mounts)}}},[e._v(" "+e._s(e.$t("deployService.disk.delDisk"))+" ")])],1)],1)],1)],1)})),e.install?e._e():a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex"}},[a("el-col",{attrs:{span:18}},[a("el-alert",{attrs:{title:e.$t("deployService.disk.info"),type:"info"}})],1),a("el-col",{attrs:{span:4}}),a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],2)],1)},s=[],i=(a("a434"),{props:["k8sModel","mounts","install"],name:"disk",methods:{save:function(){this.$emit("saveDisk",this.mounts)},addDisk:function(e,t){t.splice(e+1,0,{name:"",source:{tLocalVolume:{uid:"",gid:"",mode:""}},mountPath:""}),this.$forceUpdate()},delDisk:function(e,t){t.splice(e,1),this.$forceUpdate()}}}),o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,"6a37019f",null);t["a"]=l.exports},c047:function(e,t,a){"use strict";var r=a("4e91"),s=a.n(r);s.a},c10a:function(e,t,a){},c1df0:function(e,t,a){"use strict";var r=a("ea4d"),s=a.n(r);s.a},c2de:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_debuger"},[e.showDebug||e.showBm||e.addTestCase||e.showCaseList||e.modifyTestCase?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")))]),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"}}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.service"),prop:"server_name"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.fileName"),prop:"file_name"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"posttime"}}),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){return e.showDebuger(t.row)}}},[e._v(e._s(e.$t("inf.list.debug")))]),a("let-table-operation",{on:{click:function(a){return e.showBenchmark(t.row)}}},[e._v(e._s(e.$t("inf.list.benchmark")))]),a("let-table-operation",{on:{click:function(a){return e.getTestCaseList(t.row)}}},[e._v(e._s(e.$t("operate.testCaseList")))]),a("let-table-operation",{on:{click:function(a){return e.deleteTarsFile(t.row.f_id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}],null,!1,1032352349)})],1)],1),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.objList.length?a("let-form-item",{attrs:{label:e.$t("inf.dlg.objName")}},[a("let-select",{model:{value:e.objName,callback:function(t){e.objName=t},expression:"objName"}},e._l(e.objList,(function(e){return a("let-option",{key:e.servant,attrs:{value:e.servant}})})),1)],1):e._e(),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),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:e.$t("inf.dlg.inParam")},model:{value:e.inParam,callback:function(t){e.inParam=t},expression:"inParam"}})],1)],1),a("let-col",{attrs:{span:12}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area",attrs:{type:"textarea",rows:20,placeholder:e.$t("inf.dlg.outParam")},model:{value:e.outParam,callback:function(t){e.outParam=t},expression:"outParam"}})],1)],1)],1)]),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.showBm?a("InterfaceBenchmark",{ref:"bm",attrs:{servantList:e.objList}}):e._e(),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.filetype"),accept:".tars",multiple:""},on:{upload:e.uploadFile}},[e._v(e._s(e.$t("common.choose")))]),e._l(e.uploadModal.fileList2Show,(function(t){return a("li",{key:t.index},[e._v(e._s(t.name))])}))],2),a("let-button",{attrs:{type:"submit",theme:"primary"}},[e._v(e._s(e.$t("serverList.servant.upload")))])],1):e._e()],1),a("let-modal",{attrs:{title:e.$t("inf.benchmark.installBenchmark"),width:"400px",headShow:!1},model:{value:e.showInstallBm,callback:function(t){e.showInstallBm=t},expression:"showInstallBm"}},[a("div",[a("p",[e._v(e._s(e.$t("inf.benchmark.installTip")))])])]),e.addTestCase&&!e.showCaseList?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.objList.length?a("let-form-item",{attrs:{label:e.$t("inf.dlg.objName")}},[a("let-select",{model:{value:e.objName,callback:function(t){e.objName=t},expression:"objName"}},e._l(e.objList,(function(e){return a("let-option",{key:e.servant,attrs:{value:e.servant}})})),1)],1):e._e()],1),a("let-form",{staticClass:"left_align"},[a("let-form-item",{attrs:{label:e.$t("inf.dlg.testCastName")}},[a("let-input",{attrs:{type:"textarea",rows:1,placeholder:e.$t("inf.dlg.testCastName")},model:{value:e.testCastName,callback:function(t){e.testCastName=t},expression:"testCastName"}})],1)],1),a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:20,placeholder:e.$t("inf.dlg.inParam")},model:{value:e.inParam,callback:function(t){e.inParam=t},expression:"inParam"}})],1)],1)],1)]),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary"},on:{click:e.doAddTestCast}},[e._v(e._s(e.$t("operate.add")))]),e._v(" "),a("let-button",{attrs:{theme:"primary"},on:{click:function(t){e.addTestCase=!1,e.showCaseList=!0}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1):e._e(),e.showCaseList&&!e.addTestCase?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.getTestCaseByParams}})],1),e.objList.length?a("let-form-item",{attrs:{label:e.$t("inf.dlg.objName")}},[a("let-select",{model:{value:e.objName,callback:function(t){e.objName=t},expression:"objName"}},e._l(e.objList,(function(e){return a("let-option",{key:e.servant,attrs:{value:e.servant}})})),1)],1):e._e()],1),a("let-table",{attrs:{data:e.testCaseList,title:e.$t("operate.testCaseList"),"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("inf.dlg.testCastName"),prop:"test_case_name",width:"100px"}}),a("let-table-column",{attrs:{title:e.$t("inf.dlg.objName"),prop:"object_name",width:"100px"}}),a("let-table-column",{attrs:{title:e.$t("inf.dlg.fileName"),prop:"file_name",width:"100px"}}),a("let-table-column",{attrs:{title:e.$t("module.title"),prop:"module_name",width:"100px"}}),a("let-table-column",{attrs:{title:e.$t("callChain.method"),prop:"function_name",width:"100px"}}),a("let-table-column",{attrs:{title:e.$t("nodes.user"),prop:"modify_user",width:"100px"}}),a("let-table-column",{attrs:{title:e.$t("board.alarm.table.content"),width:"460px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("font",{attrs:{color:"red"}},[e._v(e._s(t.row.context))])]}}],null,!1,3845679684)}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.gotoModify(t.row)}}},[e._v(e._s(e.$t("operate.modify")))]),a("let-table-operation",{on:{click:function(a){return e.deleteTestCase(t.row.case_id)}}},[e._v(e._s(e.$t("operate.delete")))])]}}],null,!1,1901094221)}),a("let-table-column",{attrs:{title:e.$t("serverList.table.th.ip"),width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return e._l(e.totalServerList,(function(r){return a("div",{key:r,attrs:{value:r}},[a("let-table-operation",{on:{click:function(a){return e.doNodedebug(r,t.row)}}},[e._v(e._s(r.node_name))]),a("br")],1)}))}}],null,!1,945768999)})],1),a("let-pagination",{staticStyle:{"margin-bottom":"32px"},attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){return e.gotoAddTestCase()}}},[e._v(e._s(e.$t("operate.addTestCase")))]),e._v(" "),a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.showCaseList=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1):e._e(),e.modifyTestCase?a("div",[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"530px"}},[a("let-form-item",[a("span",{staticClass:"text-blue"},[e._v(e._s(e.modifyCaseItem.object_name))])]),a("let-form-item",[a("span",{staticClass:"text-blue"},[e._v(e._s(e.modifyCaseItem.module_name))]),a("span",{staticClass:"text-blue"},[e._v(e._s(e.modifyCaseItem.interface_name))]),a("span",{staticClass:"text-blue"},[e._v(e._s(e.modifyCaseItem.function_name))])])],1),a("let-form",{staticClass:"left_align"},[a("let-form-item",{attrs:{label:e.$t("inf.dlg.testCastName")}},[a("let-input",{attrs:{type:"textarea",rows:1,placeholder:e.$t("inf.dlg.testCastName")},model:{value:e.testCastName,callback:function(t){e.testCastName=t},expression:"testCastName"}})],1)],1),a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:20,placeholder:e.$t("inf.dlg.inParam")},model:{value:e.inParam,callback:function(t){e.inParam=t},expression:"inParam"}})],1)],1)],1)]),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary"},on:{click:e.doModifyTestCase}},[e._v(e._s(e.$t("operate.modify")))]),e._v(" "),a("let-button",{attrs:{theme:"primary"},on:{click:function(t){e.modifyTestCase=!1,e.showCaseList=!0}}},[e._v(e._s(e.$t("operate.goback")))])],1)],1):e._e(),a("let-modal",{attrs:{title:e.$t("dcache.debug.debugResult"),width:"600px",footShow:!1},on:{close:e.closeDebugModal},model:{value:e.debugModal.show,callback:function(t){e.$set(e.debugModal,"show",t)},expression:"debugModal.show"}},[a("let-row",[a("div",{staticClass:"params_container"},[a("let-col",{attrs:{itemWidth:"100%"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-input",{staticClass:"param_area div_line",attrs:{type:"textarea",rows:40,placeholder:e.$t("dcache.debug.debugResult")},model:{value:e.debugModal.resultParam,callback:function(t){e.$set(e.debugModal,"resultParam",t)},expression:"debugModal.resultParam"}})],1)],1)],1)])],1)],1)},s=[],i=(a("99af"),a("4160"),a("a630"),a("b0c0"),a("ac1f"),a("3ca3"),a("1276"),a("159b"),a("53ca")),o=a("b85c"),n=a("dcab"),l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"benchmark_wrapper"},[a("let-form",{staticClass:"left_align",attrs:{itemWidth:"350px"}},[a("let-form-item",{attrs:{label:e.$t("inf.dlg.objName")}},[a("let-select",{attrs:{size:"small"},on:{change:e.objChange},model:{value:e.servant,callback:function(t){e.servant=t},expression:"servant"}},e._l(e.servantList,(function(e){return a("let-option",{key:e.servant,attrs:{value:e.servant}})})),1)],1)],1),a("let-table",{attrs:{data:e.fnList,title:e.$t("inf.benchmark.fnlist"),"empty-msg":e.$t("inf.benchmark.nofn"),"row-class-name":e.fnRowClassName}},[a("let-table-column",{attrs:{title:e.$t("inf.benchmark.interface"),prop:"interface",width:"100px"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.fnname"),prop:"name",width:"120px"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.returnType"),prop:"return",width:"120px"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.inParam")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("json-view",{attrs:{maxDepth:0,rootKey:"view",colorScheme:"dark",data:JSON.parse(e.row.inParams)}})]}}])}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.outParam")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("json-view",{attrs:{maxDepth:0,rootKey:"view",colorScheme:"dark",data:JSON.parse(e.row.outParams)}})]}}])}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.queryCase(t.row)}}},[e._v(e._s(e.$t("inf.benchmark.case")))])]}}])})],1),e.showCase?a("wrapper",[a("let-button",{staticClass:"add-btn",attrs:{size:"small",theme:"primary"},on:{click:e.initCaseContentForm}},[e._v(e._s(e.$t("inf.benchmark.addCase")))]),a("let-table",{attrs:{data:e.bmCaseList,title:e.currentFn.interface+"."+e.currentFn.name+" "+e.$t("inf.benchmark.caselist"),"empty-msg":e.$t("inf.benchmark.nocase")}},[a("let-table-column",{attrs:{title:e.$t("inf.benchmark.des"),prop:"des"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.inputValue"),prop:"in_values"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"240px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.initCaseContentForm(t.row)}}},[e._v(e._s(e.$t("inf.benchmark.modifyCase")))]),a("let-table-operation",{on:{click:function(a){return e.initCaseConfigForm(t.row,"test")}}},[e._v(e._s(e.$t("inf.benchmark.testCase")))]),a("let-table-operation",{on:{click:function(a){return e.initCaseConfigForm(t.row,"start")}}},[e._v(e._s(e.$t("inf.benchmark.runCase")))]),a("let-table-operation",{on:{click:function(a){return e.queryResult(t.row)}}},[e._v(e._s(e.$t("inf.benchmark.viewResult")))]),a("let-table-operation",{on:{click:function(a){return e.deleteBmCase(t.row)}}},[e._v(e._s(e.$t("inf.benchmark.deleteCase")))])]}}],null,!1,2362952868)})],1)],1):e._e(),a("div",{staticClass:"mt10"},[a("let-button",{attrs:{theme:"primary",size:"small"},on:{click:function(t){e.$parent.showBm=!1}}},[e._v(e._s(e.$t("operate.goback")))])],1),a("let-modal",{attrs:{title:e.$t("inf.benchmark.case"),width:"700px"},on:{"on-confirm":e.upsertCaseContent},model:{value:e.upsertCaseContentModal,callback:function(t){e.upsertCaseContentModal=t},expression:"upsertCaseContentModal"}},[a("let-form",{attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:e.$t("inf.benchmark.des")}},[a("let-input",{attrs:{size:"small"},model:{value:e.caseModel.des,callback:function(t){e.$set(e.caseModel,"des",t)},expression:"caseModel.des"}})],1),a("let-form-item",{attrs:{label:e.$t("inf.benchmark.inParam")}},[a("json-view",{attrs:{maxDepth:0,rootKey:"view",data:JSON.parse(e.currentFn.inParams||"{}")}})],1),a("let-form-item",{attrs:{label:e.$t("inf.benchmark.inputValue")}},[a("let-input",{attrs:{size:"small",rows:10,type:"textarea"},model:{value:e.caseModel.in_values,callback:function(t){e.$set(e.caseModel,"in_values",t)},expression:"caseModel.in_values"}}),a("a",{attrs:{target:"_blank",href:"https://github.com/TarsCloud/TarsDocs/blob/master/benchmark/tars-guide.md"}},[a("let-table-operation",[e._v(e._s(e.$t("inf.benchmark.inputValueDes")))])],1)],1)],1)],1),a("let-modal",{ref:"startBm",attrs:{footShow:!1,title:e.$t("inf.benchmark.bmParams"),width:"700px"},model:{value:e.upsertCaseConfigModal,callback:function(t){e.upsertCaseConfigModal=t},expression:"upsertCaseConfigModal"}},[a("let-form",{staticClass:"start-bm",attrs:{itemWidth:"100%"}},[a("let-form-item",{attrs:{label:"servant"}},[a("let-input",{attrs:{disabled:"",size:"small"},model:{value:e.caseModel.servant,callback:function(t){e.$set(e.caseModel,"servant",t)},expression:"caseModel.servant"}})],1),a("let-form-item",{attrs:{label:e.$t("inf.benchmark.endpoints")}},[e._l(e.endpoints,(function(t,r){return a("let-checkbox",{key:r,staticClass:"checkbox_endpoint_item",model:{value:e.endpoints[r],callback:function(t){e.$set(e.endpoints,r,t)},expression:"endpoints[name]"}},[e._v(e._s(r))])})),a("let-input",{attrs:{size:"small",type:"textarea",placeholder:e.$t("inf.benchmark.endpointsTip")},model:{value:e.caseModel.endpoints,callback:function(t){e.$set(e.caseModel,"endpoints",t)},expression:"caseModel.endpoints"}})],2),a("let-form-group",{attrs:{inline:"","label-position":"top"}},["start"==e.upsertCaseConfigModalName?a("let-form-item",{attrs:{label:e.$t("inf.benchmark.links"),size:5}},[a("let-input",{attrs:{type:"number",size:"small",required:""},model:{value:e.caseModel.links,callback:function(t){e.$set(e.caseModel,"links",t)},expression:"caseModel.links"}})],1):e._e(),"start"==e.upsertCaseConfigModalName?a("let-form-item",{attrs:{label:e.$t("inf.benchmark.speed"),size:5}},[a("let-input",{attrs:{type:"number",size:"small",required:""},model:{value:e.caseModel.speed,callback:function(t){e.$set(e.caseModel,"speed",t)},expression:"caseModel.speed"}})],1):e._e(),"start"==e.upsertCaseConfigModalName?a("let-form-item",{attrs:{label:e.$t("inf.benchmark.duration"),size:5}},[a("let-input",{attrs:{type:"number",size:"small",required:""},model:{value:e.caseModel.duration,callback:function(t){e.$set(e.caseModel,"duration",t)},expression:"caseModel.duration"}})],1):e._e(),e.testResultModal?a("let-form-item",{attrs:{label:e.$t("inf.benchmark.testResult"),size:5}},[a("div",[e._v(" "+e._s(e.testResult.errmsg||e.testResultRsp)+" ")])]):e._e(),a("let-form-item",{attrs:{size:5}},["test"==e.upsertCaseConfigModalName?a("let-button",{staticClass:"start_bm",attrs:{theme:"primary"},on:{click:function(t){return e.execBenchmark("test")}}},[e._v(e._s(e.$t("inf.benchmark.infTest")))]):e._e(),"start"==e.upsertCaseConfigModalName?a("let-button",{staticClass:"start_bm",attrs:{theme:"primary"},on:{click:e.upsertCaseConfig}},[e._v(e._s(e.$t("inf.benchmark.startBenchmark")))]):e._e(),a("let-button",{staticClass:"cancel_bm",on:{click:function(t){e.upsertCaseConfigModal=!1}}},[e._v(e._s(e.$t("inf.benchmark.cancelTest")))])],1)],1)],1)],1),a("let-modal",{attrs:{footShow:!1,title:e.result.fn+" - "+e.$t("inf.benchmark.testResult"),width:"1300px"},model:{value:e.resultModal,callback:function(t){e.resultModal=t},expression:"resultModal"}},[a("wrapper",[a("div",{staticClass:"result_op"},[0==e.result.status?a("let-button",{staticClass:"bmop-btn",attrs:{size:"small",theme:"success"},on:{click:function(t){return e.initCaseConfigForm(e.currentCase,"start")}}},[e._v(e._s(e.$t("inf.benchmark.startBenchmark")))]):e._e(),1==e.result.status?a("let-button",{staticClass:"bmop-btn",attrs:{size:"small",theme:"danger"},on:{click:function(t){return e.execBenchmark("stop")}}},[e._v(e._s(e.$t("inf.benchmark.stopBenchmark")))]):e._e(),a("let-button",{staticClass:"bmop-btn",attrs:{size:"small",theme:"sub-primary"},on:{click:function(t){return e.getResultById(e.result.id)}}},[e._v(e._s(e.$t("inf.benchmark.refresh"))),1==e.result.status?a("span",[e._v("("+e._s(e.nextRefresh)+"s)")]):e._e()])],1),a("div",{staticClass:"result_select"},[a("let-radio",{attrs:{label:"detail"},model:{value:e.resultMode,callback:function(t){e.resultMode=t},expression:"resultMode"}},[e._v(e._s(e.$t("inf.benchmark.detail")))]),a("let-radio",{attrs:{label:"chart"},model:{value:e.resultMode,callback:function(t){e.resultMode=t},expression:"resultMode"}},[e._v(e._s(e.$t("inf.benchmark.stat")))])],1),"detail"==e.resultMode?a("let-table",{staticStyle:{height:"500px",overflow:"auto"},attrs:{data:e.result.results,"empty-msg":"data is empty"}},[a("let-table-column",{attrs:{title:e.$t("inf.benchmark.time"),prop:"time_stamp",width:"150px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(e.formatDate(1e3*r.time_stamp)))])]}}],null,!1,765786504)}),a("let-table-column",{attrs:{title:"qps",prop:"avg_speed",width:"70px",align:"center"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.total"),prop:"total_request",width:"70px",align:"center"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.success"),prop:"succ_request",width:"70px",align:"center"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.fail"),prop:"fail_request",width:"70px",align:"center"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.successRate"),width:"80px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(e.getSuccessRate(r)))])]}}],null,!1,1802954844)}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.maxCost"),prop:"max_time",width:"80px",align:"center"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.minCost"),prop:"min_time",width:"80px",align:"center"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.avgCost"),width:"80px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(0==r.total_request?0:(r.total_time/r.total_request).toFixed(2)))])]}}],null,!1,882222135)}),a("let-table-column",{attrs:{title:"p90",width:"70px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(r.p90_time.toFixed(2)))])]}}],null,!1,1999143014)}),a("let-table-column",{attrs:{title:"p99",width:"70px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(r.p99_time.toFixed(2)))])]}}],null,!1,1672509679)}),a("let-table-column",{attrs:{title:"p999",width:"70px",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[a("span",[e._v(e._s(r.p999_time.toFixed(2)))])]}}],null,!1,1192471318)}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.sendBytes"),prop:"send_bytes",width:"80px",align:"center"}}),a("let-table-column",{attrs:{title:e.$t("inf.benchmark.recvBytes"),prop:"recv_bytes",width:"80px",align:"center"}})],1):e._e(),"chart"==e.resultMode?a("div",{staticClass:"return_chart"},[a("ve-pie",{attrs:{legend:e.returnChartOptions.legend,title:e.returnChartOptions.title,data:e.returnChartOptions,width:"500px"}}),a("ve-pie",{attrs:{legend:e.costChartOptions.legend,title:e.costChartOptions.title,data:e.costChartOptions,width:"500px"}})],1):e._e()],1)],1)],1)},c=[],u=(a("4de4"),a("c975"),a("a15b"),a("d81d"),a("a434"),a("b680"),a("b64b"),a("d3b7"),a("6062"),a("5319"),a("ddb0"),a("ade3")),d=a("10be"),p=a.n(d),m=a("3057"),f=a("2699"),h={id:-1,des:"",in_values:""},g=5e3,v={name:"InterfaceBenchmark",components:{wrapper:n["a"],VePie:p.a,"json-view":m["a"]},data:function(){return{showCase:!1,upsertCaseContentModal:!1,upsertCaseConfigModalName:"",upsertCaseConfigModal:!1,resultModal:!1,testResultModal:!1,servant:"",currentFn:{},currentCase:{},resultMode:"detail",endpoints:{},selectedEndpoints:[],fnList:[],bmCaseList:[],result:{results:[],status:0},testResult:{},nextRefresh:6,nextRefreshTimer:0,caseModel:Object.assign({},h)}},methods:{formatDate:f["b"],fnRowClassName:function(e){var t=e.row;e.rowIndex;return t==this.currentFn?"current_fn":""},getSuccessRate:function(e){var t=e.succ_request+e.fail_request;return t?(100*e.succ_request/t).toFixed(2)+"%":"0%"},upsertBmCase:function(e){var t=this,a=this.$Loading.show();e.servant=this.servant,e.fn=this.currentFn.name,this.$ajax.postJSON("/server/api/upsert_bm_case",e).then((function(e){a.hide(),t.getBenchmarkCaseList(),t.upsertCaseContentModal=!1,t.upsertCaseConfigModal=!1})).catch((function(e){a.hide(),t.upsertCaseContentModal=!1,t.upsertCaseConfigModal=!1,t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},initCaseContentForm:function(e){e&&e.id?this.caseModel=Object.assign({},e):(this.caseModel=Object.assign({},h),this.caseModel.in_values=this.currentFn.funInput),this.upsertCaseContentModal=!0},initCaseConfigForm:function(e,t){if(e){this.currentCase=e,this.testResult={},this.testResultModal=!1,this.caseModel=Object.assign({},e),this.caseModel.links||(this.caseModel.links=1),this.caseModel.speed||(this.caseModel.speed=100),this.caseModel.duration||(this.caseModel.duration=20);var a=this.caseModel.endpoints.split("\n");for(var r in this.endpoints){var s=a.indexOf(r);s>-1?(this.endpoints[r]=!0,a.splice(s,1)):this.endpoints[r]=!1}this.caseModel.endpoints=a.join("\n"),this.upsertCaseConfigModalName=t,this.upsertCaseConfigModal=!0,this.resultModal=!1}},upsertCaseContent:function(){var e={};this.caseModel.id>0&&(e.id=this.caseModel.id),e.des=this.caseModel.des,e.in_values=this.caseModel.in_values,this.upsertBmCase(e)},upsertCaseConfig:function(){var e={};e.id=this.caseModel.id,e.links=this.caseModel.links,e.speed=this.caseModel.speed,e.duration=this.caseModel.duration,e.endpoints=this.queryFullEndpoints(),this.upsertBmCase(e),e.endpoints&&this.caseModel.links&&this.caseModel.speed&&this.caseModel.duration?this.execBenchmark():this.$Notice({title:"missing params",type:"error"})},execBenchmark:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"start",a={caseId:this.currentCase.id,servant:this.servant,fn:this.currentFn.name},r="";switch(t){case"start":r="/server/api/start_bencmark",a.para_input=this.currentFn.inParams,a.para_value=this.currentCase.in_values,a.para_output=this.currentFn.outParams,a.endpoints=this.queryFullEndpoints(),a.links=this.caseModel.links,a.speed=this.caseModel.speed,a.duration=this.caseModel.duration;break;case"stop":r="/server/api/stop_bencmark";break;case"test":r="/server/api/test_bencmark",a.para_input=this.currentFn.inParams,a.para_value=this.currentCase.in_values,a.para_output=this.currentFn.outParams,a.endpoints=this.queryFullEndpoints();break}this.$ajax.postJSON(r,a).then((function(a){switch("start"==t&&e.queryResult(),t){case"start":e.result.status=e.currentCase.status=1,e.queryResult();break;case"stop":e.result.status=e.currentCase.status=0,e.stopPollingResult();break;case"test":e.testResult=a,e.testResultModal=!0;break}})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},queryFullEndpoints:function(){var e=[];for(var t in this.endpoints)this.endpoints[t]&&e.push(t);return this.caseModel.endpoints.split("\n").forEach((function(t){e.push(t)})),Array.from(new Set(e)).filter((function(e){return!!e})).join("\n")},queryResult:function(e){e&&(this.currentCase=e),this.getResultById(this.currentCase.id),this.resultModal=!0},queryCase:function(e){this.showCase=!0,this.currentFn=e,this.getBenchmarkCaseList()},getBenchmarkDes:function(e){var t=this;this.$ajax.getJSON("/server/api/get_benchmark_des",{id:e}).then((function(e){t.fnList=e})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},getBenchmarkCaseList:function(){var e=this;this.$ajax.getJSON("/server/api/get_bm_case_list",{servant:this.servant,fn:this.currentFn.name}).then((function(t){e.bmCaseList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},getResultById:function(e){var t=this;this.result.id=e,this.$ajax.getJSON("/server/api/get_bm_result_by_id",{id:e}).then((function(e){e.results=JSON.parse(e.results||"[]"),e.results.reverse(),t.result=e})).catch((function(e){t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},deleteBmCase:function(e){var t=this;this.$confirm(this.$t("inf.benchmark.deleteCaseConfirm"),this.$t("common.alert")).then((function(){t.$Loading.show();var a={};a.id=e.id,a.is_deleted=1,t.upsertBmCase(a)}))},startPollingResult:function(){var e=this;this.stopPollingResult(),this.nextRefreshTimer=setInterval((function(){e.nextRefresh--,0==e.nextRefresh?e.queryResult():e.nextRefresh<0&&e.nextRefresh<0&&(e.nextRefresh=g/1e3)}),1e3)},stopPollingResult:function(){this.nextRefresh=g/1e3,clearInterval(this.nextRefreshTimer)},objChange:function(){var e=this;this.servant&&this.$ajax.getJSON("/server/api/get_endpoints",{servant:this.servant}).then((function(t){e.endpoints={},t.forEach((function(t){e.endpoints["".concat(t.istcp?"tcp":"udp"," -h ").concat(t.host," -p ").concat(t.port," -t ").concat(t.timeout)]=!1}))})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},pieFromResult:function(e,t,a,r){var s,i={},n=Object(o["a"])(this.result.results);try{for(n.s();!(s=n.n()).done;){var l=s.value;if(l[r])for(var c in l[r])i[c]||(i[c]=0),i[c]+=l[r][c]}}catch(p){n.e(p)}finally{n.f()}var d=Object.keys(i).map((function(e){var r;return r={},Object(u["a"])(r,t,e),Object(u["a"])(r,a,i[e]),r}));return{title:{text:e||""},legend:{orient:"vertical",top:50,right:0},columns:[t,a],rows:d}}},computed:{testResultRsp:function(){return(this.testResult.rsp||"").replace(/<br>/g,"\n")},costChartOptions:function(){return this.pieFromResult(this.$t("inf.benchmark.costStat"),"返回值","数量","cost_map")},returnChartOptions:function(){return this.pieFromResult(this.$t("inf.benchmark.retStat"),"返回值","数量","ret_map")}},props:{servantList:{type:Array,required:!0}},watch:{servantList:{immediate:!0,handler:function(e,t){e.length&&!this.servant&&(this.servant=e[0].servant,this.objChange())}},resultModal:function(e,t){if(e){if(0==this.currentCase.status)return;this.startPollingResult()}else this.stopPollingResult()}},beforeDestory:function(){this.stopPollingResult()}},b=v,_=(a("2998"),a("2877")),y=Object(_["a"])(b,l,c,!1,null,null,null),w=y.exports,$={name:"InterfaceDebuger",components:{wrapper:n["a"],InterfaceBenchmark:w},data:function(){return{serverData:{level:5,application:"",server_name:"",set_name:"",set_area:"",set_group:""},tarsFileList:[],totalServerList:[],uploadModal:{show:!1,model:{},fileList2Show:[]},debugModal:{show:!1,resultParam:""},showDebug:!1,showBm:!1,showInstallBm:!1,isBmInstalled:null,contextData:[],debuger_panel:!1,inParam:"",outParam:"",selectedFileName:"",selectedMethods:[],objName:"",objList:[],selectedId:"",testCastName:"",testCaseList:[],showCaseList:!1,pageNum:1,pageSize:20,total:1,addTestCase:!1,modifyTestCase:!1,modifyCaseItem:{},rowData:{}}},props:["treeid"],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("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},getBmInstalled:function(){var e=this;this.$ajax.getJSON("/server/api/is_benchmark_installed").then((function(t){e.isBmInstalled=t})).catch((function(t){console.error("get bm installed status error",t),e.$tip.error("error:".concat(t.err_msg||t.message)),e.isBmInstalled=!1}))},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:[]},this.uploadModal.fileList2Show=[]},uploadFile:function(e){if(this.uploadModal.fileList2Show=[],e.length){var t,a=0,r=Object(o["a"])(e);try{for(r.s();!(t=r.n()).done;){var s=t.value;this.uploadModal.fileList2Show.push({name:s.name,index:100*Math.random()});var i=s.name.split(".");i[i.length-1];a+=1}}catch(n){r.e(n)}finally{r.f()}a===e.length&&(this.uploadModal.model.file=Array.from(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),this.uploadModal.model.file.forEach((function(e){return a.append("suse",e)})),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("".concat(e.$t("common.error"),": ").concat(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),this.getObjList()},showBenchmark:function(e){var t=this;null!==this.isBmInstalled&&(this.isBmInstalled?(this.showBm=!0,this.showDebug=!1,this.$nextTick((function(){t.$refs.bm.getBenchmarkDes(e.f_id)}))):this.showInstallBm=!0)},deleteTarsFile:function(e){var t=this;this.$confirm(this.$t("inf.dlg.deleteMsg"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_tars_file",{id:e}).then((function(e){a.hide(),t.getFileList()})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},getObjList:function(){var e=this;this.$ajax.getJSON("/server/api/all_adapter_conf_list",{application:this.serverData.application,server_name:this.serverData.server_name}).then((function(t){t.length&&(e.objList=t,e.objName=t[0].servant)})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},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("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},parseFields:function(e){var t={};for(var a in e){var r=e[a].defaultValue;r||("string"===e[a].type?r="":"long"!==e[a].type&&"int"!==e[a].type||(r=0)),t[a]=r}return t},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(r){a.hide();var s={};t.$ajax.getJSON("/server/api/get_structs",{id:t.selectedId,module_name:e[0]}).then((function(e){r.forEach((function(a){if(!a.out)if("string"===a.type)s[a.name]="";else if("array"===a.type)s[a.name]=[];else if("object"===Object(i["a"])(a.type))if(a.type.vector)s[a.name]=[];else if(a.type.isEnum){s[a.name]={}}else a.type.isStruct&&(s[a.name]=t.parseFields(e.structs[a.type.name].fields));else s[a.name]=""})),t.inParam=JSON.stringify(s,null,4)}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(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("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},deleteTestCase:function(e){var t=this;this.$confirm(this.$t("inf.dlg.deleteMsg"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.getJSON("/server/api/delete_test_case",{case_id:e}).then((function(e){a.hide(),t.getTestCaseListInner(t.pageNum)})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))},gotoAddTestCase:function(){this.addTestCase=!0,this.showCaseList=!1,this.selectedFileName=this.rowData.file_name,this.inParam="",this.outParam="",this.selectedId=this.rowData.f_id,this.objName="",this.testCastName="",this.selectedMethods=[],this.getContextData(this.rowData.f_id),this.getObjList()},getTestCaseListInner:function(e){var t=this,a=this.$Loading.show();this.showCaseList=!0,this.$ajax.getJSON("/server/api/get_testcase_list",{f_id:this.selectedId,application:this.serverData.application,server_name:this.serverData.server_name,page_size:this.pageSize,curr_page:e}).then((function(r){a.hide(),t.pageNum=e,t.total=Math.ceil(r.count/t.pageSize),t.testCaseList=r.rows})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("get_testcase_list.failed"),": ").concat(e.err_msg||e.message))}))},gotoPage:function(e){this.getTestCaseListInner(e)},getTestCaseList:function(e){this.rowData=e,this.showCaseList=!0,this.testCaseList=[],this.selectedFileName=e.file_name,this.inParam=null,this.outParam=null,this.selectedId=e.f_id,this.objName=null,this.priorSet=null,this.selectedMethods=[],this.getContextData(e.f_id),this.getObjList(),this.getTestCaseListInner(1)},getTestCaseByParams:function(e){this.selectedMethods=e,3==e.length&&this.getTestCaseListInner(1)},doAddTestCast:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/server/api/interface_add_testcase",{f_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,test_case_name:this.testCastName,objName:this.objName}).then((function(a){t.hide(),e.addTestCase=!1,e.getTestCaseListInner(e.pageNum)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},getServerList:function(){var e=this,t=this.$Loading.show();this.$ajax.getJSON("/server/api/server_list",{tree_node_id:this.treeid}).then((function(a){t.hide();var r=a||[];r.forEach((function(e){e.isChecked=!1})),e.totalServerList=r})).catch((function(a){t.hide(),e.$confirm(a.err_msg||a.message||e.$t("serverList.table.msg.fail")).then((function(){e.getServerList()}))}))},gotoModify:function(e){this.modifyCaseItem=e,this.modifyTestCase=!0,this.showCaseList=!1,this.inParam=e.context,this.testCastName=e.test_case_name},doModifyTestCase:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/server/api/modify_test_case",{case_id:this.modifyCaseItem.case_id,params:this.inParam,test_case_name:this.testCastName}).then((function(a){t.hide(),e.modifyTestCase=!1,e.getTestCaseListInner(e.pageNum)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},doNodedebug:function(e,t){var a=this,r=this.$Loading.show();this.$ajax.getJSON("/server/api/adapter_conf_list",{id:e.id}).then((function(e){var s,i={},n=Object(o["a"])(e);try{for(n.s();!(s=n.n()).done;){var l=s.value;i[l.servant]=l.endpoint}}catch(c){n.e(c)}finally{n.f()}a.$ajax.postJSON("/server/api/interface_test",{id:a.selectedId,application:a.serverData.application,server_name:a.serverData.server_name,file_name:a.selectedFileName,module_name:t.module_name,interface_name:t.interface_name,function_name:t.function_name,params:t.context,objName:t.object_name+"@"+i[t.object_name]}).then((function(e){r.hide(),a.debugModal.show=!0,a.debugModal.resultParam=JSON.stringify(JSON.parse(e),null,4)})).catch((function(e){r.hide(),a.debugModal.show=!0,a.debugModal.resultParam=e.message||e.err_msg}))})).catch((function(e){r.hide(),a.$tip.error("".concat(a.$t("serverList.restart.failed"),": ").concat(e.err_msg||e.message))}))}},created:function(){this.serverData=this.$parent.getServerData(),this.getObjList()},mounted:function(){this.getFileList(),this.getBmInstalled(),this.getServerList()}},k=$,x=(a("5e39"),Object(_["a"])(k,r,s,!1,null,"8a83376a",null));t["a"]=x.exports},c2e9:function(e,t,a){"use strict";var r=a("5bc8"),s=a.n(r);s.a},c2e92:function(e,t,a){"use strict";var r=a("8636"),s=a.n(r);s.a},c44a:function(e,t,a){},c762:function(e,t,a){"use strict";var r=a("ad4b"),s=a.n(r);s.a},c9e0:function(e,t,a){"use strict";var r=a("706f"),s=a.n(r);s.a},c9e9:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_server_server_monitor"},[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("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),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),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),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),a("tars-form-item",{attrs:{label:e.$t("monitor.search.interfaceName")},on:{onLabelClick:function(t){return e.groupBy("interface_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.interface_name,callback:function(t){e.$set(e.query,"interface_name",t)},expression:"query.interface_name"}})],1),a("tars-form-item",{attrs:{label:e.$t("monitor.search.master")},on:{onLabelClick:function(t){return 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),a("tars-form-item",{attrs:{label:e.$t("monitor.search.slave")},on:{onLabelClick:function(t){return e.groupBy("slave_name")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.slave_name,callback:function(t){e.$set(e.query,"slave_name",t)},expression:"query.slave_name"}})],1),a("tars-form-item",{attrs:{label:e.$t("monitor.search.masterIP")},on:{onLabelClick:function(t){return 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),a("tars-form-item",{attrs:{label:e.$t("monitor.search.slaveIP")},on:{onLabelClick:function(t){return e.groupBy("slave_ip")}}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.slave_ip,callback:function(t){e.$set(e.query,"slave_ip",t)},expression:"query.slave_ip"}})],1),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.showChart?a("let-row",{ref:"charts",staticClass:"charts"},e._l(e.charts,(function(t){return a("let-col",{key:t.title,attrs:{span:12}},[e.allItems.length>0?a("compare-chart",e._b({},"compare-chart",t,!1)):e._e()],1)})),1):e._e(),e.enableHourFilter?a("hours-filter",{model:{value:e.hour,callback:function(t){e.hour=t},expression:"hour"}}):e._e(),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"),width:"90px"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.show_time||t.row.show_date))]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.search.master")},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.master_name?a("span",[e._v(e._s(t.row.master_name))]):e._e(),"%"==t.row.master_name?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("master_name",t.row)}}},[e._v(e._s(t.row.master_name))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.search.slave")},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.slave_name?a("span",[e._v(e._s(t.row.slave_name))]):e._e(),"%"==t.row.slave_name?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("slave_name",t.row)}}},[e._v(e._s(t.row.slave_name))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.search.interfaceName")},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.interface_name?a("span",[e._v(e._s(t.row.interface_name))]):e._e(),"%"==t.row.interface_name?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("interface_name",t.row)}}},[e._v(e._s(t.row.interface_name))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.search.masterIP")},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.master_ip?a("span",[e._v(e._s(t.row.master_ip))]):e._e(),"%"==t.row.master_ip?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("master_ip",t.row)}}},[e._v(e._s(t.row.master_ip))]):e._e()]}}])}),a("let-table-column",{attrs:{title:e.$t("monitor.search.slaveIP")},scopedSlots:e._u([{key:"default",fn:function(t){return["%"!=t.row.slave_ip?a("span",[e._v(e._s(t.row.slave_ip))]):e._e(),"%"==t.row.slave_ip?a("span",{staticClass:"btn-link",on:{click:function(a){return e.groupBy("slave_ip",t.row)}}},[e._v(e._s(t.row.slave_ip))]):e._e()]}}])}),a("let-table-column",{attrs:{prop:"the_total_count",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.curr"))),a("br"),e._v(e._s(e.$t("monitor.table.total")))])}}])}),a("let-table-column",{attrs:{prop:"pre_total_count",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.contrast"))),a("br"),e._v(e._s(e.$t("monitor.table.total")))])}}])}),a("let-table-column",{attrs:{prop:"total_count_wave",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.fluctuating")))])}}])}),a("let-table-column",{attrs:{align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.curr"))),a("br"),e._v(e._s(e.$t("monitor.table.a")))])}},{key:"default",fn:function(t){return[e._v(e._s(t.row.the_avg_time)+"ms")]}}])}),a("let-table-column",{attrs:{align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.contrast"))),a("br"),e._v(e._s(e.$t("monitor.table.a")))])}},{key:"default",fn:function(t){return[e._v(e._s(t.row.pre_avg_time)+"ms")]}}])}),a("let-table-column",{attrs:{prop:"the_fail_rate",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.curr"))),a("br"),e._v(e._s(e.$t("monitor.table.b")))])}}])}),a("let-table-column",{attrs:{prop:"pre_fail_rate",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.contrast"))),a("br"),e._v(e._s(e.$t("monitor.table.b")))])}}])}),a("let-table-column",{attrs:{prop:"the_timeout_rate",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.curr"))),a("br"),e._v(e._s(e.$t("monitor.table.c")))])}}])}),a("let-table-column",{attrs:{prop:"pre_timeout_rate",align:"right"},scopedSlots:e._u([{key:"head",fn:function(t){return a("span",{},[e._v(e._s(e.$t("monitor.table.contrast"))),a("br"),e._v(e._s(e.$t("monitor.table.c")))])}}])}),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)},s=[],i=(a("99af"),a("4de4"),a("4160"),a("d81d"),a("fb6a"),a("b64b"),a("ac1f"),a("1276"),a("159b"),a("5530")),o=a("2699"),n=a("0b18"),l=a("0abb"),c=20,u="YYYYMMDD",d=function(e){return e&&e.length>0?e.map((function(e){var t=Object(i["a"])({},e),a=Object.keys(e),r=/^pre_.*/,s=/^the_.*/;return a.forEach((function(a){(r.test(a)||s.test(a))&&"0.00%"===e[a]&&(t[a]="0")})),t})):e},p={name:"ServerPropertyMonitor",components:{HoursFilter:n["a"],CompareChart:l["a"]},data:function(){var e=this.treeid,t=e.split("."),a="",r=!0;return"/k8s.html"==location.pathname?(r=!0,2==t.length&&(a=t[0]+"."+t[1])):(r=!1,2==t.length?a=t[0].substring(1)+"."+t[1].substring(1):5==t.length&&(a=t[0].substring(1)+"."+t[4].substring(1)+"."+t[1].substring(1)+t[2].substring(1)+t[3].substring(1))),{query:{thedate:Object(o["b"])(new Date,"YYYYMMDD"),predate:Object(o["b"])(Date.now()-o["a"],"YYYYMMDD"),startshowtime:"0000",endshowtime:"2360",master_name:"",slave_name:a,interface_name:"",master_ip:"",slave_ip:"",group_by:"",k8s:r},formatter:u,allItems:[],hour:-1,page:1,showChart:!0}},props:["treeid"],computed:{enableHourFilter:function(){return this.allItems.length&&this.allItems[0].show_time},filteredItems:function(){var e=this.hour;return e>=0&&this.enableHourFilter?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/c)},pagedItems:function(){return this.filteredItems.slice(c*(this.page-1),c*this.page)},charts:function(){return[{title:this.$t("monitor.table.total"),timeColumn:"show_time",dataColumns:[{name:"the_total_count",label:this.$t("monitor.table.curr")},{name:"pre_total_count",label:this.$t("monitor.table.contrast")}],data:this.allItems},{title:this.$t("monitor.table.a"),timeColumn:"show_time",dataColumns:[{name:"the_avg_time",label:this.$t("monitor.table.curr")},{name:"pre_avg_time",label:this.$t("monitor.table.contrast")}],data:this.allItems},{title:this.$t("monitor.table.b"),timeColumn:"show_time",dataColumns:[{name:"the_fail_rate",label:this.$t("monitor.table.curr")},{name:"pre_fail_rate",label:this.$t("monitor.table.contrast")}],data:this.allItems},{title:this.$t("monitor.table.c"),timeColumn:"show_time",dataColumns:[{name:"the_timeout_rate",label:this.$t("monitor.table.curr")},{name:"pre_timeout_rate",label:this.$t("monitor.table.contrast")}],data:this.allItems}]},chartOptions:function(){return{title:{show:!0,text:"".concat(this.$t("monitor.table.curr")," ").concat(this.$t("monitor.table.total"))},grid:{bottom:40,top:50},legend:{top:5},settings:{labelMap:{the_value:this.$t("monitor.property.property"),pre_value:this.$t("monitor.property.propertyC")},scale:[!0,!1]},data:{columns:["show_time","the_value","pre_value"],rows:this.allItems}}}},mounted:function(){this.fetchData()},methods:{fetchData:function(){var e=this,t=this.$refs.chart&&this.$refs.chart.$loading.show(),a=this.$refs.table.$loading.show();return this.$ajax.getJSON("/server/api/stat_monitor_data",this.query).then((function(r){t&&t.hide(),a.hide(),e.allItems=d(r)})).catch((function(r){t&&t.hide(),a.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(r.message||r.err_msg))}))},groupBy:function(e,t){this.query.group_by=e,this.showChart=!1,t&&(t.show_time&&(this.query.startshowtime=t.show_time,this.query.endshowtime=t.show_time),t.interface_name&&"%"!=t.interface_name&&(this.query.interface_name=t.interface_name),t.master_ip&&"%"!=t.master_ip&&(this.query.master_ip=t.master_ip),t.master_name&&"%"!=t.master_name&&(this.query.master_name=t.master_name),t.slave_ip&&"%"!=t.slave_ip&&(this.query.slave_ip=t.slave_ip),t.slave_name&&"%"!=t.slave_name&&(this.query.slave_name=t.slave_name)),this.fetchData()},search:function(){delete this.query.group_by,this.showChart=!0,this.fetchData()},changePage:function(e){this.page=e}}},m=p,f=(a("9bdc"),a("2877")),h=Object(f["a"])(m,r,s,!1,null,null,null);t["a"]=h.exports},cc08:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA4RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo1ZDFiOTQyYS0zZWUyLTkxNGQtOTBiYS1iZTVkYzNjOTU1OTAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NzY4QUI4NjE2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NzY4QUI4NjA2MUUwMTFFQUE2QjFBQzg4RDAwMDRCRDQiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6NjEwODNhYzItNzY4Yy02MjRkLWEyYWMtYTFiMTdmOTZhZmZhIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6NzRmMzZhYTgtODFhOC04ZTQ5LWExN2UtMDI2MDYwMWE2ZGMwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+1rWp/gAABUtJREFUeNrsWX9MVVUc/94HT/xVEiqIEgwVZCa0VGrZL1OJRUbRWouIWjUasqHJZq7VP23+mJUV9hudo9LppsV4IZbKVlKmYm7MRiiuhkgs5IGCwft13+1z7j338a7vPnn3wRVtfrcP57377rnnc8/5fH+cgyBJEt1IZqEbzG4SNtsi9S5utbWqHx8HVgOZwMQwxzgGLAH6Q+1QlJsU1gyvA2zAw8Mgy+we4FtgjJmSWA68CbiAVcBkQAgDKcAFIBuoBCJMkQSsjLdr9/4Wu2UYzz/79ILOLLQ/AfnARTyv5MqbcM+wZ3ghb7/iLVvOcsAOSCFiLesIgo1onuQaXgFy68yQxC287ebtO8BKIMbAszcCBZz0j3yGRSY1kF5ldlgrDOPZTMPbeaRhpJkDv8hn/wOQLjCTsG9mPyqKoh/eHie3IRiT0m4eKRjpndw/2MtUgnSu6YkjNcGiaUOw8cB3wDxO+kM0G7jD7wLph0wlfOa8V25beBuiTQX2AwmcNAuZn/GXqQYyhhvWglrpVme4/sLI1gJLeWwuBW4DngUOAYtYGLzeaol0Lo/xmGWRO+FBvgIH1BUYUcIGnS5Yqt7FHBKkXTxGs3ojma/AqDudnuXykCeANEsoOX4rcF04nZ4V8Gjhn6CGDu56WySUl+pFNgPEg70pBnkJ/mOitBT+/wX8UE7H9MukYTTEjbUSPbMoku5ItNCUaIGaz/lklXtfegzFTZYdmRVZXwInR4RwuE635gkrLZuvHS5hivwMVtznzU1W6y25yFrJI8lzo+J0FqiSkWXu8vtfXtqw20Wlnzvo8oAs2zz2Z0edm1ZXOOj7Bg/1O+Tr+TyxXPtM58X4Fy9LFD1RoE1VLuq8pPhw0cdOWjIvgs7bvXS0RZmApnY3zZpuoZQZsu+lAb8Oi7BRK1tupTRolpGVdew3YjdeYu9RT0Af6+BG6gugnqfuKtOjREVJFGVnRlJSnDJM7XEPnbMPHSE/rXWrcmGJpETVuakzXJKtEG1p99In+1zkdBP92RlaOG9s9dJL5U6Kj8ZebXYEvbDMqu4zq0wjPDdRWdftB9z0R3sg0TnxAuU/aKWkWIEGUFH80iTSzvpBefRihnsHiE53eFTC95s6w5P4SUZXXyDZWXECbSkeq70GR5seI9C71e7RKS+b2xSim1+JothJ2mxb9IhVtw8LfemJWkpvPOW792dTCW+udlFDs0i3ThDosfna8xPVCfUsI8miyYyL75RFwGLpClMJ35saQZlpCtGmNm2S6esP7nwXLg3+5kaJb1e+s5z9shHC3UYJ5yxU3GPHITcdO6slbNOJvfIg0Ht9s+j7LqLbxj2+RPWAEcJfGyU853ZFt98cFwN+qzkp0p7DWudq/cdLZduccsTwt1NtkuY0KliU6OOnPzF8dl/nZwmFevldz05joIyZAhVnRdL7NYGev63OQwcbRUqNt9C/TomOnNGvTVLjfQ576mqET5ByzFrIyz31FDPkI6aMmZa7WImYtUBJIA5wrqxzaWJya5cEiLr9X0NKT0a/aTGCJkoE23Gw4yUbJ7qGS6LHqCywe2C1wKvqdw+4Pf+eg3r6JaOlaDXfrAadYbYVX0/KGXE5h2FjJ/kWQaB4FOZLM6dSlNVCwhUboHFjKEC3s2f4XGsxP6toD6Vaewto4DK4G5gQDmkvVvBvu0MmyxbzUcTkmhMiifhcmhNJmQh/Xb0SVexHCu+QKGWaIL8Etw5/sleTxIjHZciDHU0VG+jCSsqsgKuM8DVEHmADeoBeYB+QCqwHDgN9wBFgU7BnCDf/E2qy/SfAAC62Smq8ek9cAAAAAElFTkSuQmCC"},d6c4:function(e,t,a){},da55:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"}},[a("let-form",{ref:"k8sDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("div",[a("let-form-item",{attrs:{label:e.$t("deployService.table.th.replicas")}},[a("let-input",{attrs:{size:"small",type:"number",min:0,placeholder:e.$t("deployService.form.placeholder"),required:"","required-tip":e.$t("deployService.table.tips.empty"),"pattern-tip":e.$t("deployService.form.placeholder")},model:{value:e.inputValue,callback:function(t){e.inputValue=t},expression:"inputValue"}})],1)],1)]),e.install?e._e():a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},s=[],i={props:["replicas","install"],name:"Replicas",data:function(){return{inputValue:this.replicas}},methods:{save:function(){this.$refs.k8sDetailForm.validate()&&this.$emit("saveReplicas",this.inputValue)}}},o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},da9f:function(e,t,a){"use strict";var r=a("ae6e"),s=a.n(r);s.a},dcab:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("section",{staticClass:"section"},[e._t("default")],2)},s=[],i=(a("33c3"),a("2877")),o={},n=Object(i["a"])(o,r,s,!1,null,"2643216f",null);t["a"]=n.exports},dd29:function(e,t,a){},e15a:function(e,t,a){},e166:function(e,t,a){"use strict";var r=a("8b32"),s=a.n(r);s.a},e1d2:function(e,t,a){"use strict";a.r(t),a.d(t,"post",(function(){return i})),a.d(t,"get",(function(){return o}));a("4160"),a("d3b7"),a("159b");var r=a("bc3a");r.interceptors.response.use((function(e){if(200==e.status&&-2==e.data.code&&(document.location.href="/login"),400===e.status&&e.data.errors.length>0){var t="";return e.data.errors.forEach((function(e){t+="".concat(e.message,"\n")})),Promise.reject(t)}return e}),(function(e){return console.log(e),Promise.reject(e)}));var s="";function i(e,t){return r.post(s+e,t).then((function(e){return e}))}function o(e,t){return r(s+e,t).then((function(e){return e}))}t["default"]=r},e3f3:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"100%","margin-top":"30px"}},[e.gatewayObj?e._e():a("GatewayObjList",{on:{config:e.config}}),e.gatewayObj?a("let-tabs",[a("let-tab-pane",{attrs:{tab:e.$t("gateway.station")}},[a("Station",{attrs:{gatewayObj:e.gatewayObj}})],1),a("let-tab-pane",{attrs:{tab:e.$t("gateway.upstream")}},[a("Upstream",{attrs:{gatewayObj:e.gatewayObj}})],1),a("let-tab-pane",{attrs:{tab:e.$t("gateway.globalblack")}},[a("BwList",{attrs:{gatewayObj:e.gatewayObj,station:e.globalStation,type:"black"}})],1)],1):e._e(),e.gatewayObj?a("let-button",{attrs:{theme:"sub-primary"},on:{click:function(t){return e.switchGateway()}}},[e._v(e._s(e.$t("gateway.switchGateway")))]):e._e()],1)},s=[],i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("div",{staticClass:"between"},[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("gateway.stationId")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.f_station_id,callback:function(t){e.$set(e.query,"f_station_id",t)},expression:"query.f_station_id"}})],1),a("let-form-item",{attrs:{label:e.$t("gateway.stationName")}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.f_name_cn,callback:function(t){e.$set(e.query,"f_name_cn",t)},expression:"query.f_name_cn"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("gateway.btn.addGateway")))]),a("let-button",{staticStyle:{"margin-left":"20px"},attrs:{size:"small",theme:"primary"},on:{click:e.loadAll}},[e._v(e._s(e.$t("gateway.btn.loadAll")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("gateway.stationId"),prop:"f_station_id",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("gateway.stationName"),prop:"f_name_cn",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("gateway.monitorUrl"),prop:"f_monitor_url",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"f_update_time"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"300px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.viewItem(t.row)}}},[e._v(e._s(e.$t("operate.config")))]),a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-pagination",{attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),a("br"),a("let-modal",{attrs:{title:(e.viewModal.model?e.viewModal.model.f_name_cn:"")+" "+e.$t("gateway.config.title"),width:"1000px"},model:{value:e.viewModal.show,callback:function(t){e.$set(e.viewModal,"show",t)},expression:"viewModal.show"}},["http"==e.stationMode?a("let-tabs",[a("let-tab-pane",{attrs:{tab:e.$t("gateway.router.title")}},[e.viewModal.model?a("HttpRouter",{attrs:{gatewayObj:e.gatewayObj,station:e.viewModal.model}}):e._e()],1),a("let-tab-pane",{attrs:{tab:e.$t("gateway.flowControl.title")}},[e.viewModal.model?a("FlowControl",{attrs:{gatewayObj:e.gatewayObj,station:e.viewModal.model}}):e._e()],1),a("let-tab-pane",{attrs:{tab:e.$t("gateway.bwlist.title.black")}},[e.viewModal.model?a("BwList",{attrs:{gatewayObj:e.gatewayObj,station:e.viewModal.model,type:"black"}}):e._e()],1),a("let-tab-pane",{attrs:{tab:e.$t("gateway.bwlist.title.white")}},[e.viewModal.model?a("BwList",{attrs:{gatewayObj:e.gatewayObj,station:e.viewModal.model,type:"white"}}):e._e()],1)],1):e._e(),"tars"==e.stationMode?a("let-tabs",[a("let-tab-pane",{attrs:{tab:e.$t("gateway.flowControl.title")}},[e.viewModal.model?a("FlowControl",{attrs:{gatewayObj:e.gatewayObj,station:e.viewModal.model}}):e._e()],1),a("let-tab-pane",{attrs:{tab:e.$t("gateway.bwlist.title.black")}},[e.viewModal.model?a("BwList",{attrs:{gatewayObj:e.gatewayObj,station:e.viewModal.model,type:"black"}}):e._e()],1),a("let-tab-pane",{attrs:{tab:e.$t("gateway.bwlist.title.white")}},[e.viewModal.model?a("BwList",{attrs:{gatewayObj:e.gatewayObj,station:e.viewModal.model,type:"white"}}):e._e()],1)],1):e._e(),a("div",{attrs:{slot:"foot"},slot:"foot"})],1),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("gateway.add.title"):this.$t("gateway.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("gateway.stationId"),required:""}},[a("let-radio",{attrs:{label:"http"},model:{value:e.stationMode,callback:function(t){e.stationMode=t},expression:"stationMode"}},[e._v("http")]),a("let-radio",{attrs:{label:"tars"},model:{value:e.stationMode,callback:function(t){e.stationMode=t},expression:"stationMode"}},[e._v("tars")]),"http"==e.stationMode?a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.add.idFormatTips"),required:"","required-tip":e.$t("gateway.add.idFormatTips"),pattern:"^[a-zA-Z](([a-zA-Z_0-9](?<!obj|Obj))+)?$","pattern-tip":e.$t("gateway.add.idFormatTips")},model:{value:e.detailModal.model.f_station_id,callback:function(t){e.$set(e.detailModal.model,"f_station_id",t)},expression:"detailModal.model.f_station_id"}}):e._e(),"tars"==e.stationMode?a("ServantSelector",{attrs:{gatewayObj:e.gatewayObj},model:{value:e.detailModal.model.f_station_id,callback:function(t){e.$set(e.detailModal.model,"f_station_id",t)},expression:"detailModal.model.f_station_id"}}):e._e()],1),a("let-form-item",{attrs:{label:e.$t("gateway.stationName"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.add.stationNameTips"),required:"","required-tip":e.$t("gateway.add.stationNameTips"),"pattern-tip":e.$t("gateway.add.stationNameTips")},model:{value:e.detailModal.model.f_name_cn,callback:function(t){e.$set(e.detailModal.model,"f_name_cn",t)},expression:"detailModal.model.f_name_cn"}})],1),a("let-form-item",{attrs:{label:e.$t("gateway.monitorUrl")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.add.monitorUrlTips"),"pattern-tip":e.$t("gateway.add.monitorUrlTips")},model:{value:e.detailModal.model.f_monitor_url,callback:function(t){e.$set(e.detailModal.model,"f_monitor_url",t)},expression:"detailModal.model.f_monitor_url"}})],1)],1):e._e()],1)],1)},o=[],n=(a("99af"),a("ac1f"),a("8a79"),a("5319"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_bwlist"},[a("div",{staticClass:"between"},[a("let-form",{ref:"detailForm",attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.addItem(t)}}},[a("let-form-item",{attrs:{label:"IP",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.bwlist.ipTip"),required:"","required-tip":e.$t("gateway.bwlist.ipTip"),pattern:"^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9]|\\*)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d|\\*)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d|\\*)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d|\\*)$","pattern-tip":e.$t("gateway.bwlist.ipTip")},model:{value:e.form.f_ip,callback:function(t){e.$set(e.form,"f_ip",t)},expression:"form.f_ip"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.add")))])],1),a("let-form-item")],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.loadAll}},[e._v(e._s(e.$t("gateway.btn.loadAll")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"IP",prop:"f_ip",width:"300px"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"f_update_time"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"80px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1)}),l=[],c={name:"BwList",props:{station:{type:Object,required:!0},type:{type:String,required:!0},gatewayObj:{type:String,required:!0}},data:function(){return{items:[],form:{f_ip:""}}},methods:{fetchData:function(){var e=this;return this.$ajax.getJSON("/gateway/api/bwlist",{f_station_id:this.station.f_station_id,type:this.type,gatewayObj:this.gatewayObj}).then((function(t){e.items=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},loadAll:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/gateway/api/loadAll_conf",{gatewayObj:this.gatewayObj,command:"loadAll"}).then((function(a){t.hide();var r=a[0].err_msg.replace(/\n/g,"<br>");if(0!==a[0].ret_code)throw new Error(r);var s={title:e.$t("common.success"),message:r,duration:0};e.$tip.success(s)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},addItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.form;t.f_station_id=this.station.f_station_id,t.type=this.type;var a="/gateway/api/add_bwlist",r=this.$Loading.show();t.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.form.f_ip="",e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("gateway.delete.bwListConfirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.postJSON("/gateway/api/delete_bwlist",{f_id:e.f_id,type:t.type,gatewayObj:t.gatewayObj}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}},watch:{station:function(){this.items=[],this.fetchData()}},mounted:function(){this.fetchData()}},u=c,d=(a("235c"),a("2877")),p=Object(d["a"])(u,n,l,!1,null,"3a99c38a",null),m=p.exports,f=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-form",{ref:"detailForm",attrs:{itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.saveItem(t)}}},[a("let-form-item",{attrs:{label:e.$t("gateway.flowControl.duration"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",disabled:!e.editing,placeholder:e.$t("gateway.flowControl.durationTip"),required:"","required-tip":e.$t("gateway.flowControl.durationTip"),pattern:"^\\d+$","pattern-tip":e.$t("gateway.flowControl.durationTip")},model:{value:e.form.f_duration,callback:function(t){e.$set(e.form,"f_duration",t)},expression:"form.f_duration"}})],1),a("let-form-item",{attrs:{label:e.$t("gateway.flowControl.maxFlow"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",disabled:!e.editing,placeholder:e.$t("gateway.flowControl.maxFlowTip"),required:"","required-tip":e.$t("gateway.flowControl.maxFlowTip"),pattern:"^\\d+$","pattern-tip":e.$t("gateway.flowControl.maxFlowTip")},model:{value:e.form.f_max_flow,callback:function(t){e.$set(e.form,"f_max_flow",t)},expression:"form.f_max_flow"}})],1),a("let-form-item",[e.editing?e._e():a("let-button",{attrs:{size:"small",type:"button",theme:"primary"},on:{click:function(t){t.preventDefault(),e.editing=!0}}},[e._v(e._s(e.$t("operate.modify")))]),e.editing?a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.save")))]):e._e()],1),a("let-form-item")],1)],1)},h=[],g={name:"FlowControl",props:{station:{type:Object,required:!0},gatewayObj:{type:String,required:!0}},data:function(){return{form:{f_duration:60,f_max_flow:0},editing:!1}},methods:{fetchData:function(){var e=this;return this.$ajax.getJSON("/gateway/api/get_flowcontrol",{f_station_id:this.station.f_station_id,gatewayObj:this.gatewayObj}).then((function(t){e.form=t.f_duration?t:{f_duration:60,f_max_flow:0}})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.form;t.f_station_id=this.station.f_station_id;var a="/gateway/api/upsert_flowcontrol",r=this.$Loading.show();t.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.fetchData(),e.editing=!1})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}}},watch:{station:function(){this.items=[],this.fetchData()}},mounted:function(){this.fetchData()}},v=g,b=Object(d["a"])(v,f,h,!1,null,"477f3872",null),_=b.exports,y=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("div",{staticClass:"between"},[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("gateway.btn.addHttpRouter")))])],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("gateway.serverName"),prop:"f_server_name",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("gateway.pathRule"),prop:"f_path_rule",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("gateway.proxyPass"),prop:"f_proxy_pass",width:"25%"}}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"f_update_time",width:"160px"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"100px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("gateway.btn.addHttpRouter"):this.$t("gateway.update.routerTitle"),width:"900px"},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("gateway.serverName")}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.add.serverNameTip")},model:{value:e.detailModal.model.f_server_name,callback:function(t){e.$set(e.detailModal.model,"f_server_name",t)},expression:"detailModal.model.f_server_name"}})],1),a("let-form-item",{attrs:{label:e.$t("gateway.pathRule"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.add.pathRuleTip"),required:"","required-tip":e.$t("gateway.add.pathRuleTip"),"pattern-tip":e.$t("gateway.add.pathRuleTip")},model:{value:e.detailModal.model.f_path_rule,callback:function(t){e.$set(e.detailModal.model,"f_path_rule",t)},expression:"detailModal.model.f_path_rule"}})],1),a("let-form-item",{attrs:{label:e.$t("gateway.proxyPass"),required:""}},[a("let-radio",{attrs:{label:"ipport"},model:{value:e.proxypassMode,callback:function(t){e.proxypassMode=t},expression:"proxypassMode"}},[e._v("ip:port")]),a("let-radio",{attrs:{label:"upstream"},model:{value:e.proxypassMode,callback:function(t){e.proxypassMode=t},expression:"proxypassMode"}},[e._v("upstream")]),a("let-radio",{attrs:{label:"tars"},model:{value:e.proxypassMode,callback:function(t){e.proxypassMode=t},expression:"proxypassMode"}},[e._v("tars")]),"ipport"==e.proxypassMode?a("div",{staticClass:"set_upstream"},[a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.add.proxyPassTip"),pattern:"^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d):\\d+$",required:"","required-tip":e.$t("gateway.add.proxyPassTip"),"pattern-tip":e.$t("gateway.add.proxyPassTip")},model:{value:e.detailModal.model.f_proxy_pass,callback:function(t){e.$set(e.detailModal.model,"f_proxy_pass",t)},expression:"detailModal.model.f_proxy_pass"}}),a("let-input",{attrs:{size:"small",placeholder:"/some/path",pattern:"^\\/","pattern-tip":"/some/path"},model:{value:e.detailModal.model.f_proxy_pass_path,callback:function(t){e.$set(e.detailModal.model,"f_proxy_pass_path",t)},expression:"detailModal.model.f_proxy_pass_path"}})],1):e._e(),"upstream"==e.proxypassMode?a("div",{staticClass:"set_upstream"},[a("let-select",{attrs:{size:"small",filterable:""},model:{value:e.detailModal.model.f_proxy_pass_upstream,callback:function(t){e.$set(e.detailModal.model,"f_proxy_pass_upstream",t)},expression:"detailModal.model.f_proxy_pass_upstream"}},e._l(e.upstreams,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1),a("let-input",{attrs:{size:"small",placeholder:"/some/path",pattern:"^\\/","pattern-tip":"/some/path"},model:{value:e.detailModal.model.f_proxy_pass_path,callback:function(t){e.$set(e.detailModal.model,"f_proxy_pass_path",t)},expression:"detailModal.model.f_proxy_pass_path"}})],1):e._e(),"tars"==e.proxypassMode&&e.detailModal.model?a("ServantSelector",{attrs:{gatewayObj:e.gatewayObj},model:{value:e.detailModal.model.f_proxy_pass,callback:function(t){e.$set(e.detailModal.model,"f_proxy_pass",t)},expression:"detailModal.model.f_proxy_pass"}}):e._e()],1)],1):e._e()],1)],1)},w=[],$=(a("a630"),a("d81d"),a("d3b7"),a("6062"),a("3ca3"),a("1276"),a("498a"),a("ddb0"),a("3835")),k=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"select_wrapper"},[a("let-select",{staticClass:"select_item select_app",attrs:{size:"small"},on:{change:function(t){return e.changeSelect("application")}},model:{value:e.application,callback:function(t){e.application=t},expression:"application"}},e._l(e.applications,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1),a("let-select",{staticClass:"select_item select_server",attrs:{size:"small"},on:{change:function(t){return e.changeSelect("server_name")}},model:{value:e.server_name,callback:function(t){e.server_name=t},expression:"server_name"}},e._l(e.serverNames,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1),a("let-select",{staticClass:"select_item  select_obj",attrs:{size:"small"},on:{change:function(t){return e.changeSelect("obj")}},model:{value:e.obj,callback:function(t){e.obj=t},expression:"obj"}},e._l(e.objs,(function(t){return a("let-option",{key:t,attrs:{value:t}},[e._v(" "+e._s(t)+" ")])})),1)],1)},x=[],S=(a("c975"),a("fb6a"),{name:"ServantSelector",model:{prop:"servant",event:"input"},props:{servant:String,gatewayObj:{type:String,required:!0}},data:function(){return{applications:[],serverNames:[],objs:[],application:"",server_name:"",obj:""}},methods:{changeSelect:function(e){var t=this;switch(e){case"application":this.serverNames=[],this.application&&this.getCascadeSelectServer({level:2,application:this.application},this.$t("common.error")).then((function(e){t.serverNames=e,t.serverNames.indexOf(t.server_name)<0&&(t.server_name="")}));break;case"server_name":this.objs=[],this.server_name&&this.getCascadeSelectServer({level:5,application:this.application,server_name:this.server_name},this.$t("common.error")).then((function(e){t.objs=e.map((function(e){return e.split(".").slice(-1)[0]})),t.objs.indexOf(t.obj)<0&&(t.obj="")}));break;case"obj":this.obj&&this.$emit("input","".concat(this.application,".").concat(this.server_name,".").concat(this.obj));break;default:break}},getCascadeSelectServer:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.$t("common.error");return e.gatewayObj=this.gatewayObj,this.$ajax.getJSON("/server/api/cascade_select_server",e).then((function(e){return e})).catch((function(e){t.$tip.error("".concat(a,": ").concat(e.message||e.err_msg))}))},initData:function(){if(this.servant&&/^[^.]+.[^.]+.[^.]+obj$/i.test(this.servant)){var e=this.servant.split(".");this.application=e[0]||"",this.server_name=e[1]||"",this.obj=e[2]||""}}},mounted:function(){var e=this;this.initData(),this.getCascadeSelectServer({level:1},this.$t("common.error")).then((function(t){e.applications=t}))},watch:{servant:function(){this.initData()}}}),j=S,C=(a("0585"),Object(d["a"])(j,k,x,!1,null,"eafc7750",null)),M=C.exports,O=/(obj|Obj)$/,N=/^(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d):\d+/,D=/^http:\/\//,L={name:"HttpRouter",components:{ServantSelector:M},props:{station:{type:Object,required:!0},gatewayObj:{type:String,required:!0}},data:function(){return{items:[],upstreams:[],proxypassMode:"ipport",detailModal:{show:!1,model:null,isNew:!1}}},mounted:function(){this.fetchData(),this.fetchUpstreams()},methods:{fetchData:function(){var e=this,t=this.$refs.table.$loading.show();return this.$ajax.getJSON("/gateway/api/httprouter_list",{f_station_id:this.station.f_station_id,gatewayObj:this.gatewayObj}).then((function(a){t.hide(),e.items=a})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},fetchUpstreams:function(){var e=this;return this.$ajax.getJSON("/gateway/api/upstream_list",{gatewayObj:this.gatewayObj}).then((function(t){if(t&&t.rows){var a=t.rows.map((function(e){return e.f_upstream}));a=Array.from(new Set(a)),e.upstreams=a}})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},addItem:function(){this.fetchUpstreams(),this.detailModal.model={},this.detailModal.show=!0,this.detailModal.isNew=!0},editItem:function(e){if(this.fetchUpstreams(),e=Object.assign({},e),this.detailModal.model=e,this.detailModal.show=!0,this.detailModal.isNew=!1,e.f_proxy_pass=e.f_proxy_pass.replace(D,""),this.setProxypassMode(e),"upstream"==this.proxypassMode)e.f_proxy_pass_upstream=e.f_proxy_pass.split("/")[0],e.f_proxy_pass_path="/"+(e.f_proxy_pass.split("/")[1]||""),this.$nextTick((function(){document.querySelector(".set_upstream .let-select__filter__input").value=e.f_proxy_pass_upstream}));else if("ipport"==this.proxypassMode){var t=e.f_proxy_pass.split("/"),a=Object($["a"])(t,2),r=a[0],s=a[1];e.f_proxy_pass=r,e.f_proxy_pass_path="/"+(s||"")}},setProxypassMode:function(e){O.test(e.f_proxy_pass)?this.proxypassMode="tars":N.test(e.f_proxy_pass)?this.proxypassMode="ipport":this.proxypassMode="upstream"},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model;t.f_station_id=this.station.f_station_id;var a=t.f_id?"/gateway/api/update_httprouter":"/gateway/api/add_httprouter",r=this.$Loading.show(),s=Object.assign({},t);if("upstream"==this.proxypassMode){var i=document.querySelector(".set_upstream .let-select__filter__input").value.trim();s.f_proxy_pass_upstream=i,s.f_proxy_pass="".concat(s.f_proxy_pass_upstream).concat(s.f_proxy_pass_path||"")}else"ipport"==this.proxypassMode&&(s.f_proxy_pass="".concat(s.f_proxy_pass).concat(s.f_proxy_pass_path||""));D.test(s.f_proxy_pass)||(s.f_proxy_pass="http://"+s.f_proxy_pass),s.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,s).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("gateway.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.postJSON("/gateway/api/delete_httprouter",{f_id:e.f_id,gatewayObj:t.gatewayObj}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}},watch:{station:function(){this.items=[],this.fetchData()}}},A=L,I=(a("5da8"),Object(d["a"])(A,y,w,!1,null,"294e7236",null)),T=I.exports,R={name:"Station",components:{BwList:m,FlowControl:_,HttpRouter:T,ServantSelector:M},props:{gatewayObj:{type:String,required:!0}},data:function(){return{query:{f_station_id:"",f_name_cn:""},items:[],stationMode:"http",viewModal:{show:!1,model:null},detailModal:{show:!1,model:null,isNew:!1},pageNum:1,pageSize:12,total:1}},mounted:function(){this.fetchData(1)},methods:{gotoPage:function(e){this.fetchData(e)},fetchData:function(e){var t=this;e&&"number"==typeof e||(e=this.pageNum||1);var a=this.$refs.table.$loading.show();return this.query.gatewayObj=this.gatewayObj,this.query.page_size=this.pageSize,this.query.curr_page=e,this.$ajax.getJSON("/gateway/api/station_list",this.query).then((function(r){a.hide(),t.pageNum=e,t.total=Math.ceil(r.count/t.pageSize),t.items=r.rows})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.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},loadAll:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/gateway/api/loadAll_conf",{gatewayObj:this.gatewayObj,command:"loadAll"}).then((function(a){t.hide();var r=a[0].err_msg.replace(/\n/g,"<br>");if(0!==a[0].ret_code)throw new Error(r);var s={title:e.$t("common.success"),message:r,duration:0};e.$tip.success(s)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},viewItem:function(e){this.viewModal.model=e,this.setStationMode(e),this.viewModal.show=!0},editItem:function(e){this.detailModal.model=e,this.setStationMode(e),this.detailModal.show=!0,this.detailModal.isNew=!1},setStationMode:function(e){e.f_station_id.endsWith("obj")||e.f_station_id.endsWith("Obj")?this.stationMode="tars":this.stationMode="http"},saveItem:function(){var e=this;if(this.$refs.detailForm.validate()){var t=this.detailModal.model,a=t.f_id?"/gateway/api/update_station":"/gateway/api/add_station",r=this.$Loading.show();t.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("gateway.delete.confirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.postJSON("/gateway/api/delete_station",{f_id:e.f_id,gatewayObj:t.gatewayObj}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(e){console.error(e)}))}}},F=R,P=(a("c047"),Object(d["a"])(F,i,o,!1,null,"e7b76f44",null)),z=P.exports,E=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"page_operation_templates"},[a("div",{staticClass:"between"},[a("let-form",{attrs:{inline:"",itemWidth:"200px"},nativeOn:{submit:function(t){return t.preventDefault(),e.search(t)}}},[a("let-form-item",{attrs:{label:"upstream"}},[a("let-input",{attrs:{size:"small"},model:{value:e.query.f_upstream,callback:function(t){e.$set(e.query,"f_upstream",t)},expression:"query.f_upstream"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.search")))])],1)],1),a("div",[a("let-button",{attrs:{size:"small",theme:"primary"},on:{click:e.addItem}},[e._v(e._s(e.$t("gateway.btn.addUpstream")))]),a("let-button",{staticStyle:{"margin-left":"20px"},attrs:{size:"small",theme:"primary"},on:{click:e.loadAll}},[e._v(e._s(e.$t("gateway.btn.loadAll")))])],1)],1),a("let-table",{ref:"table",attrs:{data:e.items,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:"upstream",prop:"f_upstream",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("gateway.addr"),prop:"f_addr",width:"20%"}}),a("let-table-column",{attrs:{title:e.$t("gateway.weight"),prop:"f_weight"}}),a("let-table-column",{attrs:{title:e.$t("gateway.fusing"),prop:"f_fusing_onoff"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(1==t.row.f_fusing_onoff?e.$t("gateway.fusingOn"):e.$t("gateway.fusingOff")))])]}}])}),a("let-table-column",{attrs:{title:e.$t("cfg.btn.lastUpdate"),prop:"f_update_time"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"200px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.editItem(t.row)}}},[e._v(e._s(e.$t("operate.update")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1),a("let-pagination",{attrs:{page:e.pageNum,total:e.total},on:{change:e.gotoPage}}),a("br"),a("let-modal",{attrs:{title:e.detailModal.isNew?this.$t("gateway.btn.addUpstream"):this.$t("gateway.update.upstream"),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:"upstream",required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.add.upstreamFormatTips"),required:"","required-tip":e.$t("gateway.add.upstreamFormatTips"),pattern:"^[a-zA-Z](([a-zA-Z0-9_](?<!obj|Obj))+)?$","pattern-tip":e.$t("gateway.add.upstreamFormatTips")},model:{value:e.detailModal.model.f_upstream,callback:function(t){e.$set(e.detailModal.model,"f_upstream",t)},expression:"detailModal.model.f_upstream"}})],1),a("let-form-item",{attrs:{label:e.$t("gateway.addr"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:e.$t("gateway.add.addrFormatTips"),required:"",pattern:"^(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|[1-9])\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d)\\.(1\\d{2}|2[0-4]\\d|25[0-5]|[1-9]\\d|\\d):\\d+$","required-tip":e.$t("gateway.add.addrFormatTips"),"pattern-tip":e.$t("gateway.add.addrFormatTips")},model:{value:e.detailModal.model.f_addr,callback:function(t){e.$set(e.detailModal.model,"f_addr",t)},expression:"detailModal.model.f_addr"}})],1),a("let-form-item",{attrs:{label:e.$t("gateway.weight"),required:""}},[a("let-input",{attrs:{size:"small",type:"number",required:"",pattern:"^\\d+$","required-tip":e.$t("gateway.add.weightFormatTips"),placeholder:e.$t("gateway.add.weightFormatTips"),"pattern-tip":e.$t("gateway.add.weightFormatTips")},model:{value:e.detailModal.model.f_weight,callback:function(t){e.$set(e.detailModal.model,"f_weight",t)},expression:"detailModal.model.f_weight"}})],1),a("let-form-item",{attrs:{label:e.$t("gateway.fusing")}},[a("let-radio",{attrs:{label:1},model:{value:e.detailModal.model.f_fusing_onoff,callback:function(t){e.$set(e.detailModal.model,"f_fusing_onoff",t)},expression:"detailModal.model.f_fusing_onoff"}},[e._v(e._s(e.$t("gateway.fusingOn")))]),a("let-radio",{attrs:{label:0},model:{value:e.detailModal.model.f_fusing_onoff,callback:function(t){e.$set(e.detailModal.model,"f_fusing_onoff",t)},expression:"detailModal.model.f_fusing_onoff"}},[e._v(e._s(e.$t("gateway.fusingOff")))])],1)],1):e._e()],1)],1)},V=[],q={name:"Upstream",props:{gatewayObj:{type:String,required:!0}},data:function(){return{query:{f_upstream:""},items:[],detailModal:{show:!1,model:null,isNew:!1},pageNum:1,pageSize:12,total:1}},mounted:function(){this.fetchData(1)},methods:{gotoPage:function(e){this.fetchData(e)},fetchData:function(e){var t=this;e&&"number"==typeof e||(e=this.pageNum||1);var a=this.$refs.table.$loading.show();return this.query.gatewayObj=this.gatewayObj,this.query.page_size=this.pageSize,this.query.curr_page=e,this.$ajax.getJSON("/gateway/api/upstream_list",this.query).then((function(r){a.hide(),t.pageNum=e,t.total=Math.ceil(r.count/t.pageSize),t.items=r.rows})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))},search:function(){this.fetchData()},closeDetailModal:function(){this.$refs.detailForm.resetValid(),this.detailModal.show=!1,this.detailModal.model=null},loadAll:function(){var e=this,t=this.$Loading.show();this.$ajax.postJSON("/gateway/api/loadAll_conf",{gatewayObj:this.gatewayObj,command:"loadAll"}).then((function(a){t.hide();var r=a[0].err_msg.replace(/\n/g,"<br>");if(0!==a[0].ret_code)throw new Error(r);var s={title:e.$t("common.success"),message:r,duration:0};e.$tip.success(s)})).catch((function(a){t.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(a.message||a.err_msg))}))},addItem:function(){this.detailModal.model={f_weight:1,f_fusing_onoff:1},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.f_id?"/gateway/api/update_upstream":"/gateway/api/add_upstream",r=this.$Loading.show();t.gatewayObj=this.gatewayObj,this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.closeDetailModal(),e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm(this.$t("gateway.delete.upstreamConfirmTips"),this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.postJSON("/gateway/api/delete_upstream",{f_id:e.f_id,gatewayObj:t.gatewayObj}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}}},B=q,U=(a("08cb"),Object(d["a"])(B,E,V,!1,null,"f0c6ec80",null)),G=U.exports,J=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("let-form",{ref:"addForm",attrs:{inline:"",itemWidth:"400px"},nativeOn:{submit:function(t){return t.preventDefault(),e.addItem(t)}}},[a("let-form-item",{attrs:{label:e.$t("gateway.gatewayObj"),required:""}},[a("let-input",{attrs:{size:"small",placeholder:"eg:Base.GatewayServer.FlowControlObj",required:"","required-tip":"please input gateway flowcontrol obj"},model:{value:e.form.gatewayObj,callback:function(t){e.$set(e.form,"gatewayObj",t)},expression:"form.gatewayObj"}})],1),a("let-form-item",[a("let-button",{attrs:{size:"small",type:"submit",theme:"primary"}},[e._v(e._s(e.$t("operate.add")))])],1),a("let-form-item")],1),a("let-table",{ref:"table",attrs:{data:e.objList,"empty-msg":e.$t("common.nodata")}},[a("let-table-column",{attrs:{title:e.$t("gateway.gatewayObj"),prop:"obj"}}),a("let-table-column",{attrs:{title:e.$t("operate.operates"),width:"200px"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("let-table-operation",{on:{click:function(a){return e.emitConfig(t.row)}}},[e._v(e._s(e.$t("operate.config")))]),a("let-table-operation",{on:{click:function(a){return e.removeItem(t.row)}}},[e._v(e._s(e.$t("operate.delete")))])]}}])})],1)],1)},H=[],Z={name:"GatewayObjList",props:{},data:function(){return{form:{gatewayObj:""},items:[],gatewayObjList:[]}},methods:{fetchData:function(){var e=this;return this.$ajax.getJSON("/gateway/api/gatewayobj_list",{}).then((function(t){e.gatewayObjList=t})).catch((function(t){e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))},emitConfig:function(e){localStorage.setItem("gatewayObj",e.obj),this.$emit("config",e.obj)},addItem:function(){var e=this;if(this.$refs.addForm.validate()){var t=this.form,a="/gateway/api/add_gatewayobj",r=this.$Loading.show();this.$ajax.postJSON(a,t).then((function(){r.hide(),e.$tip.success(e.$t("common.success")),e.form.gatewayObj="",e.fetchData()})).catch((function(t){r.hide(),e.$tip.error("".concat(e.$t("common.error"),": ").concat(t.message||t.err_msg))}))}},removeItem:function(e){var t=this;this.$confirm("delete this gateway?",this.$t("common.alert")).then((function(){var a=t.$Loading.show();t.$ajax.postJSON("/gateway/api/delete_gatewayobj",{gatewayObj:e.obj}).then((function(){a.hide(),t.fetchData().then((function(){t.$tip.success(t.$t("common.success"))}))})).catch((function(e){a.hide(),t.$tip.error("".concat(t.$t("common.error"),": ").concat(e.message||e.err_msg))}))})).catch((function(){}))}},computed:{objList:function(){return this.gatewayObjList.map((function(e){return{obj:e}}))}},watch:{},mounted:function(){this.fetchData()}},Y=Z,W=Object(d["a"])(Y,J,H,!1,null,"2332f030",null),Q=W.exports,K={name:"Gateway",components:{Station:z,Upstream:G,BwList:m,GatewayObjList:Q},data:function(){return{gatewayObj:"",globalStation:{f_station_id:""}}},methods:{config:function(e){this.gatewayObj=e},switchGateway:function(){this.gatewayObj="",localStorage.setItem("gatewayObj","")}},mounted:function(){var e=localStorage.getItem("gatewayObj");e&&(this.gatewayObj=e)}},X=K,ee=(a("8266"),Object(d["a"])(X,r,s,!1,null,null,null));t["a"]=ee.exports},e51e:function(e,t,a){"use strict";a("99af"),a("d81d"),a("fb6a"),a("a434"),a("ac1f"),a("5319");var r=a("5530");t["a"]={data:function(){return{servers:[],transferData:!0,migrationMethods:[{value:!0,text:this.$t("dcache.migrationMethod1")},{value:!1,text:this.$t("dcache.migrationMethod2")}]}},props:{expandServers:{required:!0,type:Array}},computed:{appName:function(){return this.expandServers[0].app_name},moduleName:function(){return this.expandServers[0].module_name},cache_version:function(){return this.expandServers[0].cache_version},srcGroupName:function(){return this.expandServers[0].group_name},dstGroupName:function(){return this.servers[0].group_name}},methods:{getServers:function(){this.servers=this.newGroup(this.expandServers)},addNewGroup:function(){var e=this.servers;this.servers=e.concat(this.newGroup(e.slice(e.length-this.expandServers.length)))},deleteGroup:function(){this.servers.splice(this.servers.length-this.expandServers.length,this.expandServers.length)},newGroup:function(e){return e.map((function(e,t){var a=e.group_name,s=e.server_name;a=a.replace(/^(.*?)(\d+)$/,(function(){return arguments[1]+(+arguments[2]+1)})),s=s.replace(/^(.*?)(\d+)-\d+$/,(function(){return arguments[1]+(+arguments[2]+1)+"-"+(t+1)}));var i=e.server_type;return Object(r["a"])(Object(r["a"])({},e),{},{group_name:a,server_name:s,server_ip:"",shmKey:"",server_type:i})}))}}}},e68e:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"diff_wrap",attrs:{id:"app"}},[a("div",{directives:[{name:"highlight",rawName:"v-highlight"}],domProps:{innerHTML:e._s(e.html)}})])},s=[],i=(a("4160"),a("a9e3"),a("ac1f"),a("5319"),a("159b"),a("bf68")),o=a("0eda"),n=a("1487"),l=a.n(n),c=(a("eba2"),a("1257"),{props:{oldString:{type:String,default:""},newString:{type:String,default:""},context:{type:Number,default:5},outputFormat:{type:String,default:"line-by-line"}},directives:{highlight:function(e){var t=e.querySelectorAll("code");t.forEach((function(e){l.a.highlightBlock(e)}))}},computed:{html:function(){return this.createdHtml(this.oldString,this.newString,this.context,this.outputFormat)}},methods:{createdHtml:function(e,t,a,r){function s(e){return e.replace(/<span class="d2h-code-line-ctn">(.+?)<\/span>/g,'<span class="d2h-code-line-ctn"><code>$1</code></span>')}var n=["",e,t,"","",{context:a}],l=i["createPatch"].apply(void 0,n),c=o["Diff2Html"].getJsonFromDiff(l,{inputFormat:"diff",outputFormat:r,showFiles:!1,matching:"lines"}),u=o["Diff2Html"].getPrettyHtml(c,{inputFormat:"json",outputFormat:r,showFiles:!1,matching:"lines"});return s(u)}}}),u=c,d=(a("f8e0"),a("2877")),p=Object(d["a"])(u,r,s,!1,null,null,null);t["a"]=p.exports},e73b:function(e,t,a){"use strict";var r=a("4998"),s=a.n(r);s.a},ea4d:function(e,t,a){},ee72:function(e,t,a){"use strict";(function(e){a("99af"),a("4160"),a("c975"),a("a15b"),a("a434"),a("b0c0"),a("b680"),a("d3b7"),a("ac1f"),a("25f0"),a("1276"),a("159b"),a("96cf");var r=a("1da1"),s=a("1226"),i=a.n(s),o=a("6e58"),n=a("381a"),l=a.n(n),c=a("6ace");t["a"]={props:["res","rest","title"],data:function(){return{dialogVisible:!1,options:[],resdata:[],restdata:[],value:"",serverArrs:[],dataLists:[],dataarr:[],traceIds:[],nodeinfos:[],edges:[],funcIds:[],datalist:[],arrdata:[],begin:"",id:"opendiv-"+l()(20)}},mounted:function(){},created:function(){},watch:{res:function(e){this.dialogVisible=!0,this.datalist=e,this.getdatas()},rest:function(e){this.dialogVisible=!0,this.datalist=e,this.getdatas()}},methods:{getdatas:function(){var e=this;this.$nextTick((function(){(new Date).getTime();var t=document.getElementsByClassName("wcontainer");(new Date).getTime();for(var a in t)t[a].style&&(t[a].style.display="none");(new Date).getTime();var r=[];e.datalist.rows.forEach((function(t){var a={};t.forEach((function(t,r){a[e.datalist.columns[r].name]=t})),r.push(a)}));(new Date).getTime();var s=[],i=[];r.forEach((function(e,t){e.vertexes=JSON.parse(e.vertexes),e.edges=JSON.parse(e.edges),s[t]=[],i[t]=[],e.vertexes.forEach((function(e){s[t].push({id:e.vertex,label:e.vertex,time:(e.callTime/e.callCount).toFixed(2)})})),e.edges.forEach((function(e){i[t].push({source:e.fromVertex,target:e.toVertex,label:(e.callTime/e.callCount).toFixed(2)})}))}));(new Date).getTime();e.arrdata=r,e.begin="",i.forEach((function(t,a){var r=[];t.forEach((function(e){r.push(e.target)})),t.forEach((function(t){r.indexOf(t.source)<0&&(e.begin=t.source,s[a].push({id:t.source,label:t.source}))}))}));(new Date).getTime();e.becomeD3(i,s)}))},becomeD3:function(e,t){var a=this;this.$nextTick((function(){var r=function(r){var s=(new i.a.graphlib.Graph).setGraph({});s.setGraph({rankdir:"LR",marginy:60}),t[r].forEach((function(e,t){e.rx=e.ry=5,s.setNode(e.id,{labelType:"html",label:e.time?'<div class="wrap"> <span class="span1">'.concat(e.id,'</span><p class="p1" style="height:20px" >( ').concat(e.time," ms )</p></div>"):'<div class="wrap"><span class="span1">'.concat(e.id,"</span ></div>"),style:"fill:#457ff5"})})),e[r].forEach((function(e){r%2==0?s.setEdge(e.source,e.target,{label:e.label+"ms",style:"fill:#fff;stroke:#333;stroke-width:1.5px;"}):s.setEdge(e.source,e.target,{label:e.label+"ms",style:"fill:#EBF2FF;stroke:#333;stroke-width:1.5px;"})}));var l="#svg-".concat(a.id,"-").concat(r),u=o["select"](l),d=u.select("g"),p=new i.a.render;p(d,s),d.selectAll(".edgeLabel tspan").attr("dy","-1.2em");var m=document.querySelectorAll("".concat(l," .span1"));for(n in m){if(n==m.length)break;m[n].innerHTML==a.value&&(m[n].style.color="red")}var f=document.querySelector("#svg-".concat(a.id,"-").concat(r)),h=f.getBBox().height;f.style.height=h+100,d.selectAll("g.node").on("click",(function(t,s){var i=[],n=o["select"]("#".concat(a.id));n.selectAll("rect").style("fill","#457FF5"),e[r].forEach((function(e,r){t==e.source&&a.begin!=e.target&&i.push(e)})),d.selectAll("rect").style("fill",(function(e,a){return e==t&&i.length>0?"#3F5AE0":"#457FF5"})),i.length>0&&(Object(c["a"])(i,e[r],0,i.length),a.ganTe(i,t,r))}))};for(var s in e){var n;r(s)}}))},ganTe:function(t,s,i){var o=this;return Object(r["a"])(regeneratorRuntime.mark((function r(){var n,l,u,d,p,m,f,h,g,v,b,_,y,w,$,k,x,S,j,C,M,O,N,D,L,A,I,T;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:for(u in T=function(e,t){var a=t.value(0),r=t.coord([t.value(1),a]),s=t.coord([t.value(2),a]),i=.35*t.size([0,1])[1]>30?30:.35*t.size([0,1])[1],o=M.graphic.clipRectByRect({x:r[0],y:r[1],width:s[0]-r[0],height:i},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height}),n=null;if(""!==t.value(3)){var l,c=t.coord([t.value(3),a]),u=t.value(4),d=t.value(3),p=(M.number.parseDate(S),d+u);l=t.coord([p,a]),n=M.graphic.clipRectByRect({x:c[0],y:c[1],width:l[0]-c[0],height:i},{x:e.coordSys.x,y:e.coordSys.y,width:e.coordSys.width,height:e.coordSys.height})}return null==n?o&&{type:"group",children:[{type:"rect",shape:o,style:t.style({fill:"#AACCF9"})}]}:o&&n&&{type:"group",children:[{type:"rect",shape:o,style:t.style({fill:"#a1a8f5"})},{type:"rect",shape:n,style:t.style({fill:"#9c9c9c"})}]}},j=function(e){var t=e.toLocaleDateString().split("/");return t[1].length<2&&t.splice(1,1,"0"+t[1]),t[2].length<2&&t.splice(2,1,"0"+t[2]),t.join("-")},n=document.getElementsByClassName("wcontainer"),l=o,n)n[u].style&&(n[u].style.display="none");for(L in d=document.getElementById("funccontainer-".concat(o.id,"-").concat(i)),d.style.display="block",p=t,p.forEach((function(e){o.arrdata[i].vertexes.forEach((function(t){e.target==t.vertex&&(e.server_time=t.callTime/t.callCount)})),o.arrdata[i].edges.forEach((function(t){e.source==t.fromVertex&&e.target==t.toVertex&&(e.client_time=t.callTime/t.callCount,e.ret=t.ret,e.csData=t.csData,e.srData=t.srData,e.ssData=t.ssData,e.crData=t.crData)}))})),m=[],f=[],h=[],g=[],v=[],b=[],_=[],y=[],w=[],$=[],k=[],Object(c["b"])(p,m,f,h,g,v,b,_,y,w,$,k),x=new Date,S=j(x),C=s,M=a("313e"),O=M.init(d),N=[],D=h.length-1,h)N.push({name:h[L],value:[D-parseInt(L),b[L],b[L]+g[L],(g[L]-v[L])/2+b[L],v[L],_[L],y[L],w[L],$[L],k[L]]});A=[],N.forEach((function(e){A.push(e.value[2])})),A.sort((function(e,t){return t-e})),h=h.reverse(),I=h,O.setOption({tooltip:{enterable:!0,appendToBody:!0,position:function(t,a){return new e(a.value[6],"base64").toString().length>=500||new e(a.value[7],"base64").toString().length>=500||new e(a.value[8],"base64").toString().length>=500||new e(a.value[9],"base64").toString().length>=500?[t[0]-100,t[1]-250]:[t[0]-100,t[1]-100]},formatter:function(t){return t.name+"<br/>"+l.$t("callChain.stringBtime")+t.value[1].toFixed(2)+"ms<br/>"+l.$t("callChain.stringEtime")+t.value[2].toFixed(2)+"ms<br/>"+l.$t("callChain.clientTime")+(t.value[2].toFixed(2)-t.value[1].toFixed(2))+"ms<br/>"+l.$t("callChain.serverTime")+t.value[4].toFixed(2)+"ms<br>ret:"+t.value[5]+"<div style='word-wrap:break-word;white-space:normal;max-width: 900px;overflow-y: scroll;max-height: 400px'>csData:"+new e(t.value[6],"base64").toString()+"<br>srData:"+new e(t.value[7],"base64").toString()+"<br>ssData:"+new e(t.value[8],"base64").toString()+"<br>crData:"+new e(t.value[9],"base64").toString()+"</div>"}},title:{text:C,left:"center"},xAxis:{type:"value",min:0,max:A[0].toFixed(2),axisLabel:{interval:0},splitLine:{show:!0}},yAxis:{data:I,axisTick:{alignWithLabel:!0},splitLine:{show:!0}},legend:{left:"70%",top:20,data:["client","server"]},grid:{left:260},series:[{type:"custom",renderItem:T,name:"client",itemStyle:{color:"#a1a8f5"},encode:{x:[1,2],y:0},data:N},{type:"custom",name:"server",itemStyle:{color:"#9c9c9c"}}]});case 32:case"end":return r.stop()}}),r)})))()},closeDialog:function(){var e=a("313e"),t=document.getElementsByClassName("wcontainer");for(var r in t)e.init(t[r]).clear()}}}}).call(this,a("b639").Buffer)},f263:function(e,t,a){},f51c:function(e,t,a){"use strict";a.d(t,"a",(function(){return p})),a.d(t,"c",(function(){return m})),a.d(t,"b",(function(){return f}));a("d3b7"),a("25f0");var r=a("a026"),s=a("a925"),i=a("00e7"),o=a.n(i),n=a("b3f5"),l=a("f0d9"),c=a.n(l),u=a("b2d6"),d=a.n(u);r["default"].use(s["a"]),r["default"].use(o.a);var p=new s["a"]({});p.setLocaleMessage("cn",c.a),p.setLocaleMessage("en",d.a);var m=[];function f(){return new Promise((function(e,t){n["a"].getJSON("/server/api/get_locale").then((function(t){var a=o.a.get("locale");if("[object Object]"==Object.prototype.toString.call(t)){for(var r in t)p.mergeLocaleMessage(r,t[r]),m.push({localeCode:r,localeName:t[r]["localeName"],localeMessages:t});a=t[a]?a:"cn",m=t}p.locale=a,e()})).catch((function(e){t(e)}))}))}},f614:function(e,t,a){},f76c:function(e,t,a){},f897:function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticStyle:{padding:"5px"}},[a("let-form",{ref:"k8sDetailForm",staticClass:"two-columns",attrs:{itemWidth:"360px",columns:2}},[a("div",[a("let-form-item",{attrs:{label:e.$t("operate.pull"),itemWidth:"45%",required:""}},[a("el-select",{staticStyle:{width:"100%"},attrs:{size:"small"},model:{value:e.inputValue,callback:function(t){e.inputValue=t},expression:"inputValue"}},e._l(e.pulls,(function(t){return a("el-option",{key:t,attrs:{value:t}},[e._v(e._s(t))])})),1)],1)],1)]),e.install?e._e():a("el-row",{staticStyle:{"margin-top":"15px"},attrs:{type:"flex",justify:"end"}},[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.save}},[e._v(e._s(e.$t("operate.save")))])],1)],1)],1)},s=[],i={props:["pull","install"],name:"Pull",data:function(){return{inputValue:this.pull,pulls:["Always","IfNotPresent","Never"]}},methods:{save:function(){this.$refs.k8sDetailForm.validate()&&this.$emit("savePull",this.inputValue)}}},o=i,n=a("2877"),l=Object(n["a"])(o,r,s,!1,null,null,null);t["a"]=l.exports},f8e0:function(e,t,a){"use strict";var r=a("7720"),s=a.n(r);s.a},f990:function(e,t,a){}}]);