| 1 |
- var Yt=Object.defineProperty,Vt=Object.defineProperties;var zt=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var Bt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;var tt=(i,n,a)=>n in i?Yt(i,n,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[n]=a,et=(i,n)=>{for(var a in n||(n={}))Bt.call(n,a)&&tt(i,a,n[a]);if(Z)for(var a of Z(n))kt.call(n,a)&&tt(i,a,n[a]);return i},rt=(i,n)=>Vt(i,zt(n));import{l as $,d as it,f as q,o as Xt,ag as F,aq as Jt,ar as Qt,k as _,aD as g,G as S,at,au as Wt,u as nt}from"./vue-vendor-Be68asQ6.js";import{u as Zt}from"./index-D2G57Sln.js";import{j as te,u as ee,a as re}from"./index-BFfnEkVs.js";import{c as I,a as ae,i as ne,X as G}from"./antd-vue-vendor-DcqS7Wvq.js";import oe from"./BasicTable-CuSLkXEu.js";import"./componentMap-BUTAcOmo.js";import"./useFormItem-CtGMPcLp.js";import"./index-CETWS1o0.js";import"./BasicModal-D4gc2R81.js";import"./useTimeout-Ca5eqGu-.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./useWindowSizeFn-BTSGGcie.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./download-CjoX0_mR.js";import"./base64Conver-24EVOS6V.js";import"./index-D1703ozz.js";import"./index-Bi7PIj53.js";import"./useCountdown-B7iR27pS.js";import"./useFormItemSingle-nLM0QlcI.js";import"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JAddInput-BBXQvvpq.js";import"./areaDataUtil-Cik-Rc_P.js";import"./index-BOEzG86y.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./depart.api-CDwTvdwQ.js";import"./JSelectDept-DT6g7V5M.js";import"./JPopup-DKJW27Yk.js";import"./JEllipsis-C04xKxcI.js";import"./JUpload-cB_Qj2H2.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";import"./index-D68l__AG.js";import"./BasicForm-Cv-dsB-e.js";import"./useForm-kcRIHoe0.js";import"./JAreaLinkage-BNOKwn5l.js";import"./JCodeEditor-CSivhUhT.js";import"./htmlmixed-DNSd26j0.js";import"./vue-DbzutmLn.js";/* empty css */import"./EasyCronInput-wCv2YMHn.js";import"./injectionKey-DPVn4AgL.js";const ie=(i,n)=>te.get({url:"/actuator/jeecghttptrace/"+i+"/"+n},{isTransformResponse:!1});var L,ot;function se(){if(ot)return L;ot=1;var i="Expected a function",n="__lodash_hash_undefined__",a=1/0,s="[object Function]",d="[object GeneratorFunction]",O="[object Symbol]",A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,h=/^\w*$/,j=/^\./,y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,u=/[\\^$.*+?()[\]{}|]/g,c=/\\(\\)?/g,l=/^\[object .+?Constructor\]$/,P=typeof I=="object"&&I&&I.Object===Object&&I,D=typeof self=="object"&&self&&self.Object===Object&&self,E=P||D||Function("return this")();function st(t,e){return t==null?void 0:t[e]}function ut(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(r){}return e}var ct=Array.prototype,lt=Function.prototype,K=Object.prototype,R=E["__core-js_shared__"],U=function(){var t=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Y=lt.toString,N=K.hasOwnProperty,V=K.toString,pt=RegExp("^"+Y.call(N).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),z=E.Symbol,ft=ct.splice,dt=X(E,"Map"),v=X(Object,"create"),B=z?z.prototype:void 0,k=B?B.toString:void 0;function p(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function ht(){this.__data__=v?v(null):{}}function mt(t){return this.has(t)&&delete this.__data__[t]}function _t(t){var e=this.__data__;if(v){var r=e[t];return r===n?void 0:r}return N.call(e,t)?e[t]:void 0}function gt(t){var e=this.__data__;return v?e[t]!==void 0:N.call(e,t)}function yt(t,e){var r=this.__data__;return r[t]=v&&e===void 0?n:e,this}p.prototype.clear=ht,p.prototype.delete=mt,p.prototype.get=_t,p.prototype.has=gt,p.prototype.set=yt;function m(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function vt(){this.__data__=[]}function bt(t){var e=this.__data__,r=C(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():ft.call(e,r,1),!0}function xt(t){var e=this.__data__,r=C(e,t);return r<0?void 0:e[r][1]}function Ct(t){return C(this.__data__,t)>-1}function Tt(t,e){var r=this.__data__,o=C(r,t);return o<0?r.push([t,e]):r[o][1]=e,this}m.prototype.clear=vt,m.prototype.delete=bt,m.prototype.get=xt,m.prototype.has=Ct,m.prototype.set=Tt;function f(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var o=t[e];this.set(o[0],o[1])}}function St(){this.__data__={hash:new p,map:new(dt||m),string:new p}}function It(t){return T(this,t).delete(t)}function wt(t){return T(this,t).get(t)}function Ot(t){return T(this,t).has(t)}function jt(t,e){return T(this,t).set(t,e),this}f.prototype.clear=St,f.prototype.delete=It,f.prototype.get=wt,f.prototype.has=Ot,f.prototype.set=jt;function C(t,e){for(var r=t.length;r--;)if(Gt(t[r][0],e))return r;return-1}function Pt(t,e){e=Nt(e,t)?[e]:Rt(e);for(var r=0,o=e.length;t!=null&&r<o;)t=t[qt(e[r++])];return r&&r==o?t:void 0}function Dt(t){if(!Q(t)||Mt(t))return!1;var e=Lt(t)||ut(t)?pt:l;return e.test(Ft(t))}function Et(t){if(typeof t=="string")return t;if(M(t))return k?k.call(t):"";var e=t+"";return e=="0"&&1/t==-a?"-0":e}function Rt(t){return J(t)?t:$t(t)}function T(t,e){var r=t.__data__;return Ht(e)?r[typeof e=="string"?"string":"hash"]:r.map}function X(t,e){var r=st(t,e);return Dt(r)?r:void 0}function Nt(t,e){if(J(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||M(t)?!0:h.test(t)||!A.test(t)||e!=null&&t in Object(e)}function Ht(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Mt(t){return!!U&&U in t}var $t=H(function(t){t=Kt(t);var e=[];return j.test(t)&&e.push(""),t.replace(y,function(r,o,b,x){e.push(b?x.replace(c,"$1"):o||r)}),e});function qt(t){if(typeof t=="string"||M(t))return t;var e=t+"";return e=="0"&&1/t==-a?"-0":e}function Ft(t){if(t!=null){try{return Y.call(t)}catch(e){}try{return t+""}catch(e){}}return""}function H(t,e){if(typeof t!="function"||e&&typeof e!="function")throw new TypeError(i);var r=function(){var o=arguments,b=e?e.apply(this,o):o[0],x=r.cache;if(x.has(b))return x.get(b);var W=t.apply(this,o);return r.cache=x.set(b,W),W};return r.cache=new(H.Cache||f),r}H.Cache=f;function Gt(t,e){return t===e||t!==t&&e!==e}var J=Array.isArray;function Lt(t){var e=Q(t)?V.call(t):"";return e==s||e==d}function Q(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function At(t){return!!t&&typeof t=="object"}function M(t){return typeof t=="symbol"||At(t)&&V.call(t)==O}function Kt(t){return t==null?"":Et(t)}function Ut(t,e,r){var o=t==null?void 0:Pt(t,e);return o===void 0?r:o}return L=Ut,L}var ue=se();const w=ae(ue),ce=[{title:"请求时间",dataIndex:"timestamp",width:50,customRender({text:i}){return ne(i).format("YYYY-MM-DD HH:mm:ss")}},{title:"请求方法",dataIndex:"request.method",width:20,customRender({record:i,column:n}){let a=w(i,n.dataIndex),s="";return a==="GET"&&(s="#87d068"),a==="POST"&&(s="#2db7f5"),a==="PUT"&&(s="#ffba5a"),a==="DELETE"&&(s="#ff5500"),$(G,{color:s},()=>a)}},{title:"请求URL",dataIndex:"request.uri",width:200,customRender({record:i,column:n}){return w(i,n.dataIndex)}},{title:"响应状态",dataIndex:"response.status",width:50,customRender({record:i,column:n}){let a=w(i,n.dataIndex),s="";return a<200?s="pink":a<201?s="green":a<399?s="cyan":a<403?s="orange":a<501&&(s="red"),$(G,{color:s},()=>a)}},{title:"请求耗时",dataIndex:"timeTaken",width:50,customRender({record:i,column:n}){let a=w(i,n.dataIndex),s="red";return a<500?s="green":a<1e3?s="cyan":a<1500&&(s="orange"),$(G,{color:s},()=>`${a} ms`)},sorter:!0}],le={class:"p-4"},pe={slot:"message"},fe=it({name:"monitor-trace"}),de=it(rt(et({},fe),{setup(i){const n=q([]),{createMessage:a}=ee(),s=q("all"),d=q(""),[O,{reload:A}]=Zt({columns:ce,showIndexColumn:!1,bordered:!0,rowKey:"id"});function h(){ie(s.value,d.value).then(y=>{let u=[];for(let c of y.traces)c.request.method!=="OPTIONS"&&c.request.uri.indexOf("httptrace")===-1&&u.push(c);n.value=u})}const j=(y,u,c,l)=>{l.action=="sort"&&c.field&&(d.value=c.field,c.order?d.value+=c.order=="ascend"?"/asc":"/desc":d.value=""),h()};return Xt(()=>{h()}),(y,u)=>{const c=F("a-divider"),l=F("a-radio-button"),P=F("a-radio-group");return Qt(),Jt("div",le,[_(nt(oe),{onRegister:nt(O),dataSource:n.value,onChange:j},{tableTitle:g(()=>[at("div",pe,[S(" 共追踪到 "+Wt(n.value.length)+" 条近期HTTP请求记录 ",1),_(c,{type:"vertical"}),at("a",{onClick:h},"立即刷新")])]),toolbar:g(()=>[_(P,{class:"http-status-choose",size:"small",value:s.value,"onUpdate:value":u[0]||(u[0]=D=>s.value=D),onChange:h},{default:g(()=>[_(l,{value:"all"},{default:g(()=>u[1]||(u[1]=[S("全部")])),_:1}),_(l,{value:"success"},{default:g(()=>u[2]||(u[2]=[S("成功")])),_:1}),_(l,{value:"error"},{default:g(()=>u[3]||(u[3]=[S("错误")])),_:1})]),_:1},8,["value"])]),_:1},8,["onRegister","dataSource"])])}}})),lr=re(de,[["__scopeId","data-v-0e0680ff"]]);export{lr as default};
|