mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
1 line
5.9 KiB
JavaScript
1 line
5.9 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2ddd1e3e"],{1328:function(t,r,e){"use strict";e.d(r,"p",(function(){return o})),e.d(r,"s",(function(){return i})),e.d(r,"t",(function(){return d})),e.d(r,"r",(function(){return c})),e.d(r,"u",(function(){return p})),e.d(r,"z",(function(){return h})),e.d(r,"q",(function(){return l})),e.d(r,"x",(function(){return f})),e.d(r,"h",(function(){return m})),e.d(r,"d",(function(){return v})),e.d(r,"f",(function(){return w})),e.d(r,"o",(function(){return g})),e.d(r,"A",(function(){return b})),e.d(r,"a",(function(){return x})),e.d(r,"m",(function(){return y})),e.d(r,"c",(function(){return S})),e.d(r,"i",(function(){return q})),e.d(r,"k",(function(){return k})),e.d(r,"g",(function(){return D})),e.d(r,"b",(function(){return L})),e.d(r,"l",(function(){return _})),e.d(r,"j",(function(){return j})),e.d(r,"v",(function(){return z})),e.d(r,"n",(function(){return A})),e.d(r,"e",(function(){return C})),e.d(r,"w",(function(){return M})),e.d(r,"y",(function(){return O}));var n=e("bc3a"),u=e.n(n),a="admin",s="public";function o(t){var r="/api/v4/clients";return u()({method:"get",url:r,auth:{username:a,password:s},params:t})}function i(t){var r="/api/v4/subscriptions";return u()({method:"get",url:r,auth:{username:a,password:s},params:t})}function d(t){var r="/api/v4/routes";return u()({method:"get",url:r,auth:{username:a,password:s},params:t})}function c(){var t="/api/v4/plugins";return u()({method:"get",url:t,auth:{username:a,password:s}})}function p(t,r){var e="/api/v4/nodes/"+t+"/plugins/"+r+"/load";return u()({method:"put",url:e,auth:{username:a,password:s}})}function h(t,r){var e="/api/v4/nodes/"+t+"/plugins/"+r+"/unload";return u()({method:"put",url:e,auth:{username:a,password:s}})}function l(){var t="/api/v4/listeners";return u()({method:"get",url:t,auth:{username:a,password:s}})}function f(){var t="/api/v4/metrics";return u()({method:"get",url:t,auth:{username:a,password:s}})}function m(){var t="/api/v4/stats";return u()({method:"get",url:t,auth:{username:a,password:s}})}function v(t){var r="/api/v4/clients/"+t;return u()({method:"delete",url:r,auth:{username:a,password:s}})}function w(t){var r="/api/v4/clients/"+t;return u()({method:"get",url:r,auth:{username:a,password:s}})}function g(t){var r="/api/v4/subscriptions/"+t;return u()({method:"get",url:r,auth:{username:a,password:s}})}function b(t){var r="/api/v4/mqtt/unsubscribe";return u()({method:"post",url:r,auth:{username:a,password:s},params:t})}function x(t){var r="/api/v4/mqtt/subscribe";return u()({method:"post",url:r,auth:{username:a,password:s},params:t})}function y(t){var r="";return r="undefined"==typeof t||""==t||null==t?"/api/v4/rules":"/api/v4/rules/"+t,u()({method:"get",url:r,auth:{username:a,password:s}})}function S(t){var r="/api/v4/rules/"+t;return u()({method:"delete",url:r,auth:{username:a,password:s}})}function q(t){var r="";return r="undefined"==typeof t||""==t||null==t?"/api/v4/resources":"/api/v4/resources/"+t,u()({method:"get",url:r,auth:{username:a,password:s}})}function k(t){var r="/api/v4/resources/"+t;return u()({method:"get",url:r,auth:{username:a,password:s}})}function D(t){var r="/api/v4/resources/"+t;return u()({method:"post",url:r,auth:{username:a,password:s}})}function L(t){var r="/api/v4/resources/"+t;return u()({method:"delete",url:r,auth:{username:a,password:s}})}function _(){var t="/api/v4/resource_types";return u()({method:"get",url:t,auth:{username:a,password:s}})}function j(t){var r="/api/v4/resources?test=true";return u()({method:"post",url:r,auth:{username:a,password:s},data:t})}function z(t){var r="/api/v4/resources";return u()({method:"post",url:r,auth:{username:a,password:s},data:t})}function A(){var t="/api/v4/rule_events";return u()({method:"get",url:t,auth:{username:a,password:s}})}function C(){var t="/api/v4/actions";return u()({method:"get",url:t,auth:{username:a,password:s}})}function M(t){var r="/api/v4/rules";return u()({method:"post",url:r,auth:{username:a,password:s},data:t})}function O(t){var r="/api/v4/rules?test=true";return u()({method:"post",url:r,auth:{username:a,password:s},data:t})}},e569:function(t,r,e){"use strict";e.r(r);var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("div",[e("div",{ref:"statsChart",staticStyle:{height:"240px",margin:"20px 0 40px 0"}})])},u=[],a=e("1328"),s={data:function(){return{timer:null,stats:{}}},created:function(){this.getMqttStats()},beforeDestroy:function(){this.clearData()},methods:{getMqttStats:function(){var t=this;Object(a["h"])().then((function(r){t.stats=r.data.data[0].stats,t.drawStats(),t.switper()}))},drawStats:function(){var t,r=this.$echarts.init(this.$refs.statsChart);t={animationDuration:3e3,tooltip:{trigger:"axis",axisPointer:{type:"shadow"},backgroundColor:"rgba(58,73,116,0.7)",textStyle:{color:"rgba(65,235,246,1)"}},legend:{textStyle:{color:"rgba(65,235,246,1)"}},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},xAxis:{type:"value",boundaryGap:[0,.01],axisLabel:{fontSize:12,color:"#fff"},splitLine:{lineStyle:{type:"dashed",color:"rgba(65,235,246,1)",width:.5}}},yAxis:{type:"category",axisLabel:{fontSize:12,color:"#fff"},data:["共享订阅","订阅数量","路由数量","保留消息","主题数量","连接数量"]},series:[{name:"当前数量",type:"bar",data:[this.stats["subscriptions.shared.count"],this.stats["subscribers.count"],this.stats["routes.count"],this.stats["retained.count"],this.stats["topics.count"],this.stats["connections.count"]],itemStyle:{color:"#67e0e3"}},{name:"历史最大数",type:"bar",data:[this.stats["subscriptions.shared.max"],this.stats["subscribers.max"],this.stats["routes.max"],this.stats["retained.max"],this.stats["topics.max"],this.stats["connections.max"]],itemStyle:{color:"#ffdb5c"}}]},t&&r.setOption(t)},clearData:function(){this.timer&&(clearInterval(this.timer),this.timer=null)},switper:function(){var t=this;if(!this.timer){var r=function(r){t.getMqttStats()};this.timer=setInterval(r,6e4)}}}},o=s,i=e("2877"),d=Object(i["a"])(o,n,u,!1,null,null,null);r["default"]=d.exports}}]); |