mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
1 line
5.8 KiB
JavaScript
1 line
5.8 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4894fa64"],{1328:function(t,r,e){"use strict";e.d(r,"p",(function(){return i})),e.d(r,"s",(function(){return o})),e.d(r,"t",(function(){return c})),e.d(r,"r",(function(){return d})),e.d(r,"u",(function(){return p})),e.d(r,"z",(function(){return f})),e.d(r,"q",(function(){return l})),e.d(r,"x",(function(){return m})),e.d(r,"h",(function(){return h})),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 y})),e.d(r,"m",(function(){return x})),e.d(r,"c",(function(){return S})),e.d(r,"i",(function(){return _})),e.d(r,"k",(function(){return j})),e.d(r,"g",(function(){return q})),e.d(r,"b",(function(){return k})),e.d(r,"l",(function(){return D})),e.d(r,"j",(function(){return M})),e.d(r,"v",(function(){return z})),e.d(r,"n",(function(){return I})),e.d(r,"e",(function(){return J})),e.d(r,"w",(function(){return O})),e.d(r,"y",(function(){return A}));var n=e("bc3a"),u=e.n(n),a="admin",s="public";function i(t){var r="/api/v4/clients";return u()({method:"get",url:r,auth:{username:a,password:s},params:t})}function o(t){var r="/api/v4/subscriptions";return u()({method:"get",url:r,auth:{username:a,password:s},params:t})}function c(t){var r="/api/v4/routes";return u()({method:"get",url:r,auth:{username:a,password:s},params:t})}function d(){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 f(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 m(){var t="/api/v4/metrics";return u()({method:"get",url:t,auth:{username:a,password:s}})}function h(){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 y(t){var r="/api/v4/mqtt/subscribe";return u()({method:"post",url:r,auth:{username:a,password:s},params:t})}function x(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 _(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 j(t){var r="/api/v4/resources/"+t;return u()({method:"get",url:r,auth:{username:a,password:s}})}function q(t){var r="/api/v4/resources/"+t;return u()({method:"post",url:r,auth:{username:a,password:s}})}function k(t){var r="/api/v4/resources/"+t;return u()({method:"delete",url:r,auth:{username:a,password:s}})}function D(){var t="/api/v4/resource_types";return u()({method:"get",url:t,auth:{username:a,password:s}})}function M(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 I(){var t="/api/v4/rule_events";return u()({method:"get",url:t,auth:{username:a,password:s}})}function J(){var t="/api/v4/actions";return u()({method:"get",url:t,auth:{username:a,password:s}})}function O(t){var r="/api/v4/rules";return u()({method:"post",url:r,auth:{username:a,password:s},data:t})}function A(t){var r="/api/v4/rules?test=true";return u()({method:"post",url:r,auth:{username:a,password:s},data:t})}},"9a05":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",{staticStyle:{display:"flex"}},[e("dv-active-ring-chart",{staticStyle:{width:"250px",height:"250px"},attrs:{config:t.config}}),e("div",{staticStyle:{"font-size":"14px","margin-top":"80px","line-height":"10px","margin-left":"-20px"}},[e("div",{staticStyle:{"margin-bottom":"20px",color:"#23cdd8"}},[t._v(" 发送字节:"),e("span",{staticStyle:{color:"#fff"}},[t._v(t._s(t.formatter(this.static["bytes.sent"])))]),e("dv-decoration-3",{staticStyle:{width:"200px",height:"20px","margin-top":"5px"}})],1),e("div",{staticStyle:{"margin-bottom":"20px",color:"#23cdd8"}},[t._v(" 接收字节:"),e("span",{staticStyle:{color:"#fff"}},[t._v(t._s(t.formatter(this.static["bytes.received"])))]),e("dv-decoration-3",{staticStyle:{width:"200px",height:"20px","margin-top":"5px"}})],1)])],1)},u=[],a=(e("d3b7"),e("25f0"),e("a15b"),e("a434"),e("1328")),s={data:function(){return{static:{},config:{},timer:null}},created:function(){this.statisticMqtt()},computed:{},beforeDestroy:function(){this.clearData()},methods:{statisticMqtt:function(){var t=this;Object(a["x"])().then((function(r){t.static=r.data.data[0].metrics,t.config={data:[{name:"发送",value:t.static["bytes.sent"]},{name:"接收",value:t.static["bytes.received"]}],color:["#ffdb5c","#67e0e3"]},t.switper()}))},formatter:function(t){if(t){var r=t.toString().split("").reverse(),e=[];while(r.length)e.push(r.splice(0,3).join(""));return e.join(",").split("").reverse().join("")}return 0},clearData:function(){this.timer&&(clearInterval(this.timer),this.timer=null)},switper:function(){var t=this;if(!this.timer){var r=function(r){t.statisticMqtt()};this.timer=setInterval(r,6e4)}}}},i=s,o=e("2877"),c=Object(o["a"])(i,n,u,!1,null,null,null);r["default"]=c.exports}}]); |