kongx/kongx-serve/src/main/resources/static/js/chunk-05d1190a.191e8a4f.js
2023-03-17 21:42:09 +08:00

1 line
5.4 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-05d1190a"],{"405d":function(a,t,e){"use strict";e.r(t);var n=function(){var a=this,t=a.$createElement,e=a._self._c||t;return e("div",[e("basic-container",[e("el-card",{staticClass:"box-card",attrs:{shadow:"always"}},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("span",[e("h3",[e("strong",[a._v("CONNECTIONS【"+a._s(a.kongClient.url)+"】")])])])]),e("avue-data-display",{attrs:{option:a.easyDataOption}})],1)],1),e("el-row",[e("el-col",{attrs:{span:8}},[e("basic-container",{attrs:{height:"160"}},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("span",[e("h3",[e("strong",[a._v("NODE INFO")])])])]),e("avue-crud",{attrs:{option:a.nodeOption,data:a.nodeData}})],1)],1)],1),e("el-col",{attrs:{span:8}},[e("basic-container",[e("el-card",{attrs:{shadow:"always"}},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("span",[e("h3",[e("strong",[a._v("CONFIG INFO")])])])]),e("avue-crud",{attrs:{option:a.nodeOption,data:a.configData}})],1)],1)],1),e("el-col",{attrs:{span:8}},[e("basic-container",[e("el-card",{attrs:{shadow:"always"}},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("h3",[e("span",[e("strong",[a._v("DATASTORE INFO")])]),a.reachable?e("div",{staticStyle:{float:"right",padding:"0px 0",color:"green","font-size":"14px"}},[e("strong",[a._v("Reachable")])]):e("div",{staticStyle:{float:"right",padding:"0px 0",color:"red","font-size":"14px"}},[e("strong",[a._v("Unreachable")])])])]),e("avue-crud",{attrs:{option:a.nodeOption,data:a.dbData},model:{value:a.obj,callback:function(t){a.obj=t},expression:"obj"}})],1)],1)],1)],1),e("basic-container",[e("el-card",[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("span",[e("h3",[e("strong",[a._v("PLUGINS")])])])]),e("div",{staticClass:"tag-group"},a._l(a.plugins,function(t){return e("el-tag",{key:t.name,staticStyle:{"margin-top":"5px"},attrs:{"disable-transitions":!1,type:t.type,effect:"dark"}},[e("strong",[a._v(a._s(t.name))])])}),1)])],1)],1)},o=[],s=(e("ac6a"),e("cebc")),i=e("a573"),r=e("5880"),c={data:function(){return{total_requests:0,reachable:!1,plugins:[],nodeData:[],configData:[],obj:{},dbData:[],nodeOption:{border:!1,header:!1,simplePage:!0,showHeader:!1,addBtn:!1,delBtn:!1,editBtn:!1,refreshBtn:!1,filterBtn:!1,searchBtn:!1,selectClearBtn:!1,columnBtn:!1,menuAlign:"right",menu:!1,menuWidth:180,align:"center",column:[{label:"名称",prop:"name"},{label:"值",prop:"value",width:230,align:"left"}]},easyDataOption:{span:4,data:[{click:function(a){},title:"ACTIVE",count:0,icon:"icon-yonghuguanli",color:"rgb(49, 180, 141)"},{title:"READING",count:0,icon:"icon-shujuzhanshi2",color:"rgb(56, 161, 242)"},{title:"WRITING",count:0,icon:"icon-jiaoseguanli",color:"rgb(117, 56, 199)"},{title:"WAITING",count:0,icon:"icon-jiaoseguanli",color:"rgb(117, 56, 199)"},{title:"ACCEPTED",count:0,icon:"icon-jiaoseguanli",color:"rgb(117, 56, 199)"},{title:"HANDLED",count:0,icon:"icon-jiaoseguanli",color:"rgb(117, 56, 199)"}]}}},computed:Object(s["a"])({},Object(r["mapGetters"])(["userInfo","kongClient"])),created:function(){this.findActiveKongclient()},mounted:function(){var a=this,t=setInterval(function(){a.queryInfo()},5e3);this.$once("hook:beforeDestroy",function(){clearInterval(t)})},watch:{kongClient:function(a){this.queryInfo(),this.queryStatus()}},methods:{findActiveKongclient:function(){this.$store.dispatch("FindActiveClient",this.userInfo).then(function(a){})},queryStatus:function(){var a=this;Object(i["b"])().then(function(t){var e=t.data,n=e["server"];a.reachable=e.database.reachable,a.easyDataOption.data.forEach(function(a){var t="connections_"+a.title.toLowerCase();a["count"]=n[t]}),a.total_requests=n["total_requests"]})},queryInfo:function(){var a=this;Object(i["a"])().then(function(t){var e=t.data,n=e.plugins;if(e&&n){a.nodeData=[],a.plugins=[],a.dbData=[],a.configData=[],a.nodeData.push({name:"HostName",value:e.hostname}),a.nodeData.push({name:"Tag Line",value:e.tagline}),a.nodeData.push({name:" Version",value:e.version}),a.nodeData.push({name:"Lua version",value:e.lua_version}),a.nodeData.push({name:"Admin Listen",value:e.configuration.admin_listen});var o=e.configuration;for(var s in a.configData.push({name:"Config path",value:o.nginx_kong_conf}),a.configData.push({name:"Log level",value:o.log_level}),a.configData.push({name:"Keepalive",value:o.upstream_keepalive}),a.configData.push({name:"Access log",value:o.proxy_access_log}),a.configData.push({name:"Error log",value:o.proxy_error_log}),a.dbData.push({name:"DBMS",value:o.database}),a.dbData.push({name:"Host",value:o.pg_host}),a.dbData.push({name:"Database",value:o.pg_database}),a.dbData.push({name:"User",value:o.pg_user}),a.dbData.push({name:"Port",value:o.pg_port}),n.available_on_server){var i="info";n.enabled_in_cluster.forEach(function(a){if(a!==s)return"info";i="success"}),a.plugins.push({name:s,type:i})}}})}}},l=c,u=(e("73dc"),e("2877")),d=Object(u["a"])(l,n,o,!1,null,null,null);t["default"]=d.exports},"73dc":function(a,t,e){"use strict";var n=e("dfc5"),o=e.n(n);o.a},a573:function(a,t,e){"use strict";e.d(t,"a",function(){return s}),e.d(t,"b",function(){return i});var n=e("b5c6"),o=e("074d"),s=function(){return Object(n["a"])({url:o["a"].path+"/kong/api/info",method:"get"})},i=function(){return Object(n["a"])({url:o["a"].path+"/kong/api/status",method:"get"})}},dfc5:function(a,t,e){}}]);