web/frps: upgrade vue and element-plus (#3310)
This commit is contained in:
1 parent
39941117b6
commit
24f0b3afa5
48 files changed
+3925
-7309
No files matched your search
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
@charset "UTF-8";.el-affix--fixed{position:fixed}.el-alert{--el-alert-padding:8px 16px;--el-alert-border-radius-base:var(--el-border-radius-base);--el-alert-title-font-size:13px;--el-alert-description-font-size:12px;--el-alert-close-font-size:12px;--el-alert-close-customed-font-size:13px;--el-alert-icon-size:16px;--el-alert-icon-large-size:28px;width:100%;padding:var(--el-alert-padding);margin:0;box-sizing:border-box;border-radius:var(--el-alert-border-radius-base);position:relative;background-color:var(--el-color-white);overflow:hidden;opacity:1;display:flex;align-items:center;transition:opacity var(--el-transition-duration-fast)}.el-alert.is-light .el-alert__close-btn{color:var(--el-text-color-placeholder)}.el-alert.is-dark .el-alert__close-btn,.el-alert.is-dark .el-alert__description{color:var(--el-color-white)}.el-alert.is-center{justify-content:center}.el-alert--success{--el-alert-bg-color:var(--el-color-success-light-9)}.el-alert--success.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-success)}.el-alert--success.is-light .el-alert__description{color:var(--el-color-success)}.el-alert--success.is-dark{background-color:var(--el-color-success);color:var(--el-color-white)}.el-alert--info{--el-alert-bg-color:var(--el-color-info-light-9)}.el-alert--info.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-info)}.el-alert--info.is-light .el-alert__description{color:var(--el-color-info)}.el-alert--info.is-dark{background-color:var(--el-color-info);color:var(--el-color-white)}.el-alert--warning{--el-alert-bg-color:var(--el-color-warning-light-9)}.el-alert--warning.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-warning)}.el-alert--warning.is-light .el-alert__description{color:var(--el-color-warning)}.el-alert--warning.is-dark{background-color:var(--el-color-warning);color:var(--el-color-white)}.el-alert--error{--el-alert-bg-color:var(--el-color-error-light-9)}.el-alert--error.is-light{background-color:var(--el-alert-bg-color);color:var(--el-color-error)}.el-alert--error.is-light .el-alert__description{color:var(--el-color-error)}.el-alert--error.is-dark{background-color:var(--el-color-error);color:var(--el-color-white)}.el-alert__content{display:table-cell;padding:0 8px}.el-alert .el-alert__icon{font-size:var(--el-alert-icon-size);width:var(--el-alert-icon-size)}.el-alert .el-alert__icon.is-big{font-size:var(--el-alert-icon-large-size);width:var(--el-alert-icon-large-size)}.el-alert__title{font-size:var(--el-alert-title-font-size);line-height:18px;vertical-align:text-top}.el-alert__title.is-bold{font-weight:700}.el-alert .el-alert__description{font-size:var(--el-alert-description-font-size);margin:5px 0 0}.el-alert .el-alert__close-btn{font-size:var(--el-alert-close-font-size);opacity:1;position:absolute;top:12px;right:15px;cursor:pointer}.el-alert .el-alert__close-btn.is-customed{font-style:normal;font-size:var(--el-alert-close-customed-font-size);top:9px}.el-alert-fade-enter-from,.el-alert-fade-leave-active{opacity:0}.el-aside{overflow:auto;box-sizing:border-box;flex-shrink:0;width:var(--el-aside-width,300px)}.el-autocomplete{position:relative;display:inline-block}.el-autocomplete__popper.el-popper{background:var(--el-bg-color-overlay);border:1px solid var(--el-border-color-light);box-shadow:var(--el-box-shadow-light)}.el-autocomplete__popper.el-popper .el-popper__arrow:before{border:1px solid var(--el-border-color-light)}.el-autocomplete__popper.el-popper[data-popper-placement^=top] .el-popper__arrow:before{border-top-color:transparent;border-left-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=bottom] .el-popper__arrow:before{border-bottom-color:transparent;border-right-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=left] .el-popper__arrow:before{border-left-color:transparent;border-bottom-color:transparent}.el-autocomplete__popper.el-popper[data-popper-placement^=right] .el-popper__arrow:before{border-right-color:transparent;border-top-color:transparent}.el-autocomplete-suggestion{border-radius:var(--el-border-radius-base);box-sizing:border-box}.el-autocomplete-suggestion__wrap{max-height:280px;padding:10px 0;box-sizing:border-box}.el-autocomplete-suggestion__list{margin:0;padding:0}.el-autocomplete-suggestion li{padding:0 20px;margin:0;line-height:34px;cursor:pointer;color:var(--el-text-color-regular);font-size:var(--el-font-size-base);list-style:none;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.el-autocomplete-suggestion li:hover,.el-autocomplete-suggestion li.highlighted{background-color:var(--el-fill-color-light)}.el-autocomplete-suggestion li.divider{margin-top:6px;border-top:1px solid var(--el-color-black)}.el-autocomplete-suggestion li.divider:last-child{margin-bottom:-6px}.el-autocomplete-suggestion.is-loading li{text-align:center;height:100px;line-height:100px;font-size:20px;color:var(--el-text-color-secondary)}.el-autocomplete-suggestion.is-loLine truncated
|
||||
@@ -0,0 +1,74 @@
|
||||
var TL=Object.defineProperty;var ML=(e,t,r)=>t in e?TL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var AL=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wt=(e,t,r)=>(ML(e,typeof t!="symbol"?t+"":t,r),r);var Iee=AL((Or,kr)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=r(i);fetch(i.href,a)}})();function mm(e,t){const r=Object.create(null),n=e.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return t?i=>!!r[i.toLowerCase()]:i=>!!r[i]}function At(e){if(ye(e)){const t={};for(let r=0;r<e.length;r++){const n=e[r],i=Ue(n)?DL(n):At(n);if(i)for(const a in i)t[a]=i[a]}return t}else{if(Ue(e))return e;if(je(e))return e}}const EL=/;(?![^(]*\))/g,PL=/:([^]+)/,LL=/\/\*.*?\*\//gs;function DL(e){const t={};return e.replace(LL,"").split(EL).forEach(r=>{if(r){const n=r.split(PL);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function de(e){let t="";if(Ue(e))t=e;else if(ye(e))for(let r=0;r<e.length;r++){const n=de(e[r]);n&&(t+=n+" ")}else if(je(e))for(const r in e)e[r]&&(t+=r+" ");return t.trim()}const IL="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",RL=mm(IL);function US(e){return!!e||e===""}function OL(e,t){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=gd(e[n],t[n]);return r}function gd(e,t){if(e===t)return!0;let r=N0(e),n=N0(t);if(r||n)return r&&n?e.getTime()===t.getTime():!1;if(r=Zl(e),n=Zl(t),r||n)return e===t;if(r=ye(e),n=ye(t),r||n)return r&&n?OL(e,t):!1;if(r=je(e),n=je(t),r||n){if(!r||!n)return!1;const i=Object.keys(e).length,a=Object.keys(t).length;if(i!==a)return!1;for(const o in e){const s=e.hasOwnProperty(o),l=t.hasOwnProperty(o);if(s&&!l||!s&&l||!gd(e[o],t[o]))return!1}}return String(e)===String(t)}function YS(e,t){return e.findIndex(r=>gd(r,t))}const Re=e=>Ue(e)?e:e==null?"":ye(e)||je(e)&&(e.toString===KS||!Ee(e.toString))?JSON.stringify(e,qS,2):String(e),qS=(e,t)=>t&&t.__v_isRef?qS(e,t.value):Qo(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((r,[n,i])=>(r[`${n} =>`]=i,r),{})}:yd(t)?{[`Set(${t.size})`]:[...t.values()]}:je(t)&&!ye(t)&&!XS(t)?String(t):t,mt={},Zo=[],or=()=>{},kL=()=>!1,NL=/^on[^a-z]/,md=e=>NL.test(e),ym=e=>e.startsWith("onUpdate:"),jt=Object.assign,_m=(e,t)=>{const r=e.indexOf(t);r>-1&&e.splice(r,1)},BL=Object.prototype.hasOwnProperty,ze=(e,t)=>BL.call(e,t),ye=Array.isArray,Qo=e=>Du(e)==="[object Map]",yd=e=>Du(e)==="[object Set]",N0=e=>Du(e)==="[object Date]",Ee=e=>typeof e=="function",Ue=e=>typeof e=="string",Zl=e=>typeof e=="symbol",je=e=>e!==null&&typeof e=="object",jS=e=>je(e)&&Ee(e.then)&&Ee(e.catch),KS=Object.prototype.toString,Du=e=>KS.call(e),FL=e=>Du(e).slice(8,-1),XS=e=>Du(e)==="[object Object]",bm=e=>Ue(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,nc=mm(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),_d=e=>{const t=Object.create(null);return r=>t[r]||(t[r]=e(r))},$L=/-(\w)/g,Sn=_d(e=>e.replace($L,(t,r)=>r?r.toUpperCase():"")),HL=/\B([A-Z])/g,Ps=_d(e=>e.replace(HL,"-$1").toLowerCase()),bd=_d(e=>e.charAt(0).toUpperCase()+e.slice(1)),ic=_d(e=>e?`on${bd(e)}`:""),Ql=(e,t)=>!Object.is(e,t),ac=(e,t)=>{for(let r=0;r<e.length;r++)e[r](t)},Ic=(e,t,r)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:r})},wm=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let B0;const zL=()=>B0||(B0=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Dr;class WL{constructor(t=!1){this.detached=t,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Dr,!t&&Dr&&(this.index=(Dr.scopes||(Dr.scopes=[])).push(this)-1)}run(t){if(this.active){const r=Dr;try{return Dr=this,t()}finally{Dr=r}}}on(){Dr=this}off(){Dr=this.parent}stop(t){if(this.active){let r,n;for(r=0,n=this.effects.length;r<n;r++)this.effects[r].stop();for(r=0,n=this.cleanups.length;r<n;r++)this.cleanups[r]();if(this.scopes)for(r=0,n=this.scopes.length;r<n;r++)this.scopes[r].stop(!0);if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this.active=!1}}}function VL(e,t=Dr){t&&t.active&&t.effects.push(e)}function GL(){return Dr}function UL(e){Dr&&Dr.cleanups.push(e)}const xm=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ZS=e=>(e.w&Zi)>0,QS=e=>(e.n&Zi)>0,YL=({deps:e})=>{if(e.lenLine truncated
|
||||
* Checks if an event is supported in the current execution environment.
|
||||
*
|
||||
* NOTE: This will not work correctly for non-generic events such as `change`,
|
||||
* `reset`, `load`, `error`, and `select`.
|
||||
*
|
||||
* Borrows from Modernizr.
|
||||
*
|
||||
* @param {string} eventNameSuffix Event name, e.g. "click".
|
||||
* @param {?boolean} capture Check if the capture phase is supported.
|
||||
* @return {boolean} True if the event is supported.
|
||||
* @internal
|
||||
* @license Modernizr 3.0.0pre (Custom Build) | MIT
|
||||
*/const BH=function(e,t){if(e&&e.addEventListener){const r=function(n){const i=NH(n);t&&Reflect.apply(t,this,[n,i])};e.addEventListener("wheel",r,{passive:!0})}},FH={beforeMount(e,t){BH(e,t.value)}},yM={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object]},indeterminate:Boolean,disabled:Boolean,checked:Boolean,name:{type:String,default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},controls:{type:String,default:void 0},border:Boolean,size:Vd,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0}},_M={[zd]:e=>Ue(e)||_r(e)||pi(e),change:e=>Ue(e)||_r(e)||pi(e)},$H=({model:e,isChecked:t})=>{const r=De(Os,void 0),n=$(()=>{var a,o;const s=(a=r==null?void 0:r.max)==null?void 0:a.value,l=(o=r==null?void 0:r.min)==null?void 0:o.value;return!Wc(s)&&e.value.length>=s&&!t.value||!Wc(l)&&e.value.length<=l&&t.value});return{isDisabled:oy($(()=>(r==null?void 0:r.disabled.value)||n.value)),isLimitDisabled:n}},HH=(e,{model:t,isLimitExceeded:r,hasOwnLabel:n,isDisabled:i,isLabeledByFormItem:a})=>{const o=De(Os,void 0),{formItem:s}=Gd(),{emit:l}=dt();function u(v){var p,g;return v===e.trueLabel||v===!0?(p=e.trueLabel)!=null?p:!0:(g=e.falseLabel)!=null?g:!1}function f(v,p){l("change",u(v),p)}function c(v){if(r.value)return;const p=v.target;l("change",u(p.checked),v)}async function d(v){r.value||!n.value&&!i.value&&a.value&&(v.composedPath().some(m=>m.tagName==="LABEL")||(t.value=u([!1,e.falseLabel].includes(t.value)),await Ht(),f(t.value,v)))}const h=$(()=>(o==null?void 0:o.validateEvent)||e.validateEvent);return Me(()=>e.modelValue,()=>{h.value&&(s==null||s.validate("change").catch(v=>void 0))}),{handleChange:c,onClickRoot:d}},zH=e=>{const t=H(!1),{emit:r}=dt(),n=De(Os,void 0),i=$(()=>Wc(n)===!1),a=H(!1);return{model:$({get(){var s,l;return i.value?(s=n==null?void 0:n.modelValue)==null?void 0:s.value:(l=e.modelValue)!=null?l:t.value},set(s){var l,u;i.value&&ye(s)?(a.value=((l=n==null?void 0:n.max)==null?void 0:l.value)!==void 0&&s.length>(n==null?void 0:n.max.value),a.value===!1&&((u=n==null?void 0:n.changeEvent)==null||u.call(n,s))):(r(zd,s),t.value=s)}}),isGroup:i,isLimitExceeded:a}},WH=(e,t,{model:r})=>{const n=De(Os,void 0),i=H(!1),a=$(()=>{const u=r.value;return pi(u)?u:ye(u)?je(e.label)?u.map(Ze).some(f=>zF(f,e.label)):u.map(Ze).includes(e.label):u!=null?u===e.trueLabel:!!u}),o=fo($(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value}),{prop:!0}),s=fo($(()=>{var u;return(u=n==null?void 0:n.size)==null?void 0:u.value})),l=$(()=>!!(t.default||e.label));return{checkboxButtonSize:o,isChecked:a,isFocused:i,checkboxSize:s,hasOwnLabel:l}},VH=(e,{model:t})=>{function r(){ye(t.value)&&!t.value.includes(e.label)?t.value.push(e.label):t.value=e.trueLabel||!0}e.checked&&r()},bM=(e,t)=>{const{formItem:r}=Gd(),{model:n,isGroup:i,isLimitExceeded:a}=zH(e),{isFocused:o,isChecked:s,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:f}=WH(e,t,{model:n}),{isDisabled:c}=$H({model:n,isChecked:s}),{inputId:d,isLabeledByFormItem:h}=FT(e,{formItemContext:r,disableIdGeneration:f,disableIdManagement:i}),{handleChange:v,onClickRoot:p}=HH(e,{model:n,isLimitExceeded:a,hasOwnLabel:f,isDisabled:c,isLabeledByFormItem:h});return VH(e,{model:n}),{inputId:d,isLabeledByFormItem:h,isChecked:s,isDisabled:c,isFocused:o,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:f,model:n,handleChange:v,onClickRoot:p}},GH=["tabindex","role","aria-checked"],UH=["id","aria-hidden","name","tabindex","disabled","true-value","false-value"],YH=["id","aria-hidden","disabled","value","name","tabindex"],qH=ue({name:"ElCheckbox"}),jH=ue({...qH,props:yM,emits:_M,setup(e){const t=e,r=Id(),{inputId:n,isLabeledByFormItem:i,isChecked:a,isDisabled:o,isFocused:s,checkboxSize:l,hasOwnLabel:u,model:f,handleChange:c,onClickRoot:d}=bM(t,r),h=Ne("checkbox"),v=$(()=>[h.b(),h.m(l.value),h.is("disabled",o.value),h.is("bordered",t.border),h.is("checked",a.value)]),p=$(()=>[h.e("input"),h.is("disabled",o.value),h.is("checked",a.value),h.is("indeterminate",t.indeterminate),h.is("focus",s.value)]);return(g,m)=>(X(),Ie(hi(!L(u)&&L(i)?"span":"label"),{class:de(L(v)),"aria-controls":g.indeterminate?g.controls:null,onClick:L(d)},{default:ee(()=>[le("span",{class:de(L(p)),tabindex:g.indeterminate?0:void 0,role:g.indeterminate?"checkbox":void 0,"aria-checked":g.indeterminate?"mixed":void 0},[g.trueLabel||g.falseLabel?sr((X(),Se("input",{key:0,id:L(n),"onUpdate:modelValue":m[0]||(m[0]=y=>St(f)?f.value=y:null),class:de(L(h).e("original")),type:"checkbox","aria-hidden":g.indeterminate?"true":"false",name:g.name,tabindex:g.tabindex,disabled:L(o),"true-value":g.trueLabel,"false-value":g.falseLabel,onChange:m[1]||(m[1]=(...y)=>L(c)&&L(c)(...y)),onFocus:m[2]||(m[2]=y=>s.value=!0),onBlur:m[3]||(m[3]=y=>s.value=!1)},null,42,UH)),[[Nc,L(f)]]):sr((X(),Se("input",{key:1,id:L(n),"onUpdate:modelValue":m[4]||(m[4]=y=>St(f)?f.value=y:null),class:de(L(h).e("original")),Line truncated
|
||||
(?:
|
||||
(?:`+n+":){7}(?:"+n+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8
|
||||
(?:`+n+":){6}(?:"+r+"|:"+n+`|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4
|
||||
(?:`+n+":){5}(?::"+r+"|(?::"+n+`){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4
|
||||
(?:`+n+":){4}(?:(?::"+n+"){0,1}:"+r+"|(?::"+n+`){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4
|
||||
(?:`+n+":){3}(?:(?::"+n+"){0,2}:"+r+"|(?::"+n+`){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4
|
||||
(?:`+n+":){2}(?:(?::"+n+"){0,3}:"+r+"|(?::"+n+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4
|
||||
(?:`+n+":){1}(?:(?::"+n+"){0,4}:"+r+"|(?::"+n+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4
|
||||
(?::(?:(?::`+n+"){0,5}:"+r+"|(?::"+n+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4
|
||||
)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1
|
||||
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),a=new RegExp("(?:^"+r+"$)|(?:^"+i+"$)"),o=new RegExp("^"+r+"$"),s=new RegExp("^"+i+"$"),l=function(b){return b&&b.exact?a:new RegExp("(?:"+t(b)+r+t(b)+")|(?:"+t(b)+i+t(b)+")","g")};l.v4=function(_){return _&&_.exact?o:new RegExp(""+t(_)+r+t(_),"g")},l.v6=function(_){return _&&_.exact?s:new RegExp(""+t(_)+i+t(_),"g")};var u="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",c=l.v4().source,d=l.v6().source,h="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",v="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",p="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",g="(?::\\d{2,5})?",m='(?:[/?#][^\\s"]*)?',y="(?:"+u+"|www\\.)"+f+"(?:localhost|"+c+"|"+d+"|"+h+v+p+")"+g+m;return hf=new RegExp("(?:^"+y+"$)","i"),hf},Vb={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},gl={integer:function(t){return gl.number(t)&&parseInt(t,10)===t},float:function(t){return gl.number(t)&&!gl.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!gl.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Vb.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(Uz())},hex:function(t){return typeof t=="string"&&!!t.match(Vb.hex)}},Yz=function(t,r,n,i,a){if(t.required&&r===void 0){CM(t,r,n,i,a);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;o.indexOf(s)>-1?gl[s](r)||i.push(Rr(a.messages.types[s],t.fullField,t.type)):s&&typeof r!==t.type&&i.push(Rr(a.messages.types[s],t.fullField,t.type))},qz=function(t,r,n,i,a){var o=typeof t.len=="number",s=typeof t.min=="number",l=typeof t.max=="number",u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,f=r,c=null,d=typeof r=="number",h=typeof r=="string",v=Array.isArray(r);if(d?c="number":h?c="string":v&&(c="array"),!c)return!1;v&&(f=r.length),h&&(f=r.replace(u,"_").length),o?f!==t.len&&i.push(Rr(a.messages[c].len,t.fullField,t.len)):s&&!l&&f<t.min?i.push(Rr(a.messages[c].min,t.fullField,t.min)):l&&!s&&f>t.max?i.push(Rr(a.messages[c].max,t.fullField,t.max)):s&&l&&(f<t.min||f>t.max)&&i.push(Rr(a.messages[c].range,t.fullField,t.min,t.max))},To="enum",jz=function(t,r,n,i,a){t[To]=Array.isArray(t[To])?t[To]:[],t[To].indexOf(r)===-1&&i.push(Rr(a.messages[To],t.fullField,t[To].join(", ")))},Kz=function(t,r,n,i,a){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(r)||i.push(Rr(a.messages.pattern.mismatch,t.fullField,r,t.pattern));else if(typeof t.pattern=="string"){var o=new RegExp(t.pattern);o.test(r)||i.push(Rr(a.messages.pattern.mismatch,t.fullField,r,t.pattern))}}},Ye={required:CM,whitespace:Gz,type:Yz,range:qz,enum:jz,pattern:Kz},Xz=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Bt(r,"string")&&!t.required)return n();Ye.required(t,r,i,o,a,"string"),Bt(r,"string")||(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a),Ye.pattern(t,r,i,o,a),t.whitespace===!0&&Ye.whitespace(t,r,i,o,a))}n(o)},Zz=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Bt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye.type(t,r,i,o,a)}n(o)},Qz=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(r===""&&(r=void 0),Bt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},Jz=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Bt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&Ye.type(t,r,i,o,a)}n(o)},e6=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Bt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),Bt(r)||Ye.type(t,r,i,o,a)}n(o)},t6=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Bt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},r6=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(Bt(r)&&!t.required)return n();Ye.required(t,r,i,o,a),r!==void 0&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},n6=function(t,r,n,i,a){var o=[],s=t.required||!t.required&&i.hasOwnProperty(t.field);if(s){if(r==null&&!t.required)return n();Ye.required(t,r,i,o,a,"array"),r!=null&&(Ye.type(t,r,i,o,a),Ye.range(t,r,i,o,a))}n(o)},i6=function(t,r,n,i,a){var
Line truncated
|
||||
* escape-html
|
||||
* Copyright(c) 2012-2013 TJ Holowaychuk
|
||||
* Copyright(c) 2015 Andreas Lubbe
|
||||
* Copyright(c) 2015 Tiancheng "Timothy" Gu
|
||||
* MIT Licensed
|
||||
*/var t8=/["'&<>]/,r8=n8;function n8(e){var t=""+e,r=t8.exec(t);if(!r)return t;var n,i="",a=0,o=0;for(a=r.index;a<t.length;a++){switch(t.charCodeAt(a)){case 34:n=""";break;case 38:n="&";break;case 39:n="'";break;case 60:n="<";break;case 62:n=">";break;default:continue}o!==a&&(i+=t.substring(o,a)),o=a+1,i+=n}return o!==a?i+t.substring(o,a):i}const Vh=function(e){var t;return(t=e.target)==null?void 0:t.closest("td")},i8=function(e,t,r,n,i){if(!t&&!n&&(!i||Array.isArray(i)&&!i.length))return e;typeof r=="string"?r=r==="descending"?-1:1:r=r&&r<0?-1:1;const a=n?null:function(s,l){return i?(Array.isArray(i)||(i=[i]),i.map(u=>typeof u=="string"?lu(s,u):u(s,l,e))):(t!=="$key"&&je(s)&&"$value"in s&&(s=s.$value),[je(s)?lu(s,t):s])},o=function(s,l){if(n)return n(s.value,l.value);for(let u=0,f=s.key.length;u<f;u++){if(s.key[u]<l.key[u])return-1;if(s.key[u]>l.key[u])return 1}return 0};return e.map((s,l)=>({value:s,index:l,key:a?a(s,l):null})).sort((s,l)=>{let u=o(s,l);return u||(u=s.index-l.index),u*+r}).map(s=>s.value)},RM=function(e,t){let r=null;return e.columns.forEach(n=>{n.id===t&&(r=n)}),r},a8=function(e,t){let r=null;for(let n=0;n<e.columns.length;n++){const i=e.columns[n];if(i.columnKey===t){r=i;break}}return r||lo("ElTable",`No column matching with column-key: ${t}`),r},Yb=function(e,t,r){const n=(t.className||"").match(new RegExp(`${r}-table_[^\\s]+`,"gm"));return n?RM(e,n[0]):null},Ut=(e,t)=>{if(!e)throw new Error("Row is required when get row identity");if(typeof t=="string"){if(!t.includes("."))return`${e[t]}`;const r=t.split(".");let n=e;for(const i of r)n=n[i];return`${n}`}else if(typeof t=="function")return t.call(null,e)},ja=function(e,t){const r={};return(e||[]).forEach((n,i)=>{r[Ut(n,t)]={row:n,index:i}}),r};function o8(e,t){const r={};let n;for(n in e)r[n]=e[n];for(n in t)if(ze(t,n)){const i=t[n];typeof i<"u"&&(r[n]=i)}return r}function xy(e){return e===""||e!==void 0&&(e=Number.parseInt(e,10),Number.isNaN(e)&&(e="")),e}function OM(e){return e===""||e!==void 0&&(e=xy(e),Number.isNaN(e)&&(e=80)),e}function s8(e){return typeof e=="number"?e:typeof e=="string"?/^\d+(?:px)?$/.test(e)?Number.parseInt(e,10):e:null}function l8(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Rl(e,t,r){let n=!1;const i=e.indexOf(t),a=i!==-1,o=s=>{s==="add"?e.push(t):e.splice(i,1),n=!0,ye(t.children)&&t.children.forEach(l=>{Rl(e,l,r??!a)})};return pi(r)?r&&!a?o("add"):!r&&a&&o("remove"):o(a?"remove":"add"),n}function u8(e,t,r="children",n="hasChildren"){const i=o=>!(Array.isArray(o)&&o.length);function a(o,s,l){t(o,s,l),s.forEach(u=>{if(u[n]){t(u,null,l+1);return}const f=u[r];i(f)||a(u,f,l+1)})}e.forEach(o=>{if(o[n]){t(o,null,0);return}const s=o[r];i(s)||a(o,s,0)})}let ai;function f8(e,t,r,n){n=wT({enterable:!0,showArrow:!0},n);const{nextZIndex:i}=yy(),a=e==null?void 0:e.dataset.prefix,o=e==null?void 0:e.querySelector(`.${a}-scrollbar__wrap`);function s(){const g=n.effect==="light",m=document.createElement("div");return m.className=[`${a}-popper`,g?"is-light":"is-dark",n.popperClass||""].join(" "),r=r8(r),m.innerHTML=r,m.style.zIndex=String(i()),e==null||e.appendChild(m),m}function l(){const g=document.createElement("div");return g.className=`${a}-popper__arrow`,g}function u(){f&&f.update()}ai==null||ai(),ai=()=>{try{f&&f.destroy(),h&&(e==null||e.removeChild(h)),t.removeEventListener("mouseenter",c),t.removeEventListener("mouseleave",d),o==null||o.removeEventListener("scroll",ai),ai=void 0}catch{}};let f=null,c=u,d=ai;n.enterable&&({onOpen:c,onClose:d}=JT({showAfter:n.showAfter,hideAfter:n.hideAfter,open:u,close:ai}));const h=s();h.onmouseenter=c,h.onmouseleave=d;const v=[];if(n.offset&&v.push({name:"offset",options:{offset:[0,n.offset]}}),n.showArrow){const g=h.appendChild(l());v.push({name:"arrow",options:{element:g,padding:10}})}const p=n.popperOptions||{};return f=ZT(t,h,{placement:n.placement||"top",strategy:"fixed",...p,modifiers:p.modifiers?v.concat(p.modifiers):v}),t.addEventListener("mouseenter",c),t.addEventListener("mouseleave",d),o==null||o.addEventListener("scroll",ai),f}function kM(e){return e.children?$F(e.children,kM):[e]}function qb(e,t){return e+t.colSpan}const NM=(e,t,r,n)=>{let i=0,a=e;const o=r.states.columns.value;if(n){const l=kM(n[e]);i=o.slice(0,o.indexOf(l[0])).reduce(qb,0),a=i+l.reduce(qb,0)-1}else i=e;let s;switch(t){case"left":a<r.states.fixedLeafColumnsLength.value&&(s="left");break;case"right":i>=o.length-r.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:a<r.states.fixedLeafColumnsLength.value?s="left":i>=o.length-r.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:i,after:a}:{}},Sy=(e,t,r,n,i,a=0)=>{const o=[],{direction:s,start:l,after:u}=NM(t,r,n,i);if(s){const f=s==="left";o.push(`${e}-fixed-column--${s}`),f&&u+a===n.states.fixedLeafColumnsLength.value-1?o.push("is-last-column"):!f&&l-a===n.states.columns.value.length-n.states.rightFixedLeafColumnsLength.value&&o.push("is-fiLine truncated
|
||||
* vue-router v4.1.6
|
||||
* (c) 2022 Eduardo San Martin Morote
|
||||
* @license MIT
|
||||
*/const Wo=typeof window<"u";function EW(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ot=Object.assign;function Gh(e,t){const r={};for(const n in t){const i=t[n];r[n]=Tn(i)?i.map(e):e(i)}return r}const kl=()=>{},Tn=Array.isArray,PW=/\/$/,LW=e=>e.replace(PW,"");function Uh(e,t,r="/"){let n,i={},a="",o="";const s=t.indexOf("#");let l=t.indexOf("?");return s<l&&s>=0&&(l=-1),l>-1&&(n=t.slice(0,l),a=t.slice(l+1,s>-1?s:t.length),i=e(a)),s>-1&&(n=n||t.slice(0,s),o=t.slice(s,t.length)),n=OW(n??t,r),{fullPath:n+(a&&"?")+a+o,path:n,query:i,hash:o}}function DW(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function Xb(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function IW(e,t,r){const n=t.matched.length-1,i=r.matched.length-1;return n>-1&&n===i&&Ss(t.matched[n],r.matched[i])&&YM(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function Ss(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function YM(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!RW(e[r],t[r]))return!1;return!0}function RW(e,t){return Tn(e)?Zb(e,t):Tn(t)?Zb(t,e):e===t}function Zb(e,t){return Tn(t)?e.length===t.length&&e.every((r,n)=>r===t[n]):e.length===1&&e[0]===t}function OW(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),n=e.split("/");let i=r.length-1,a,o;for(a=0;a<n.length;a++)if(o=n[a],o!==".")if(o==="..")i>1&&i--;else break;return r.slice(0,i).join("/")+"/"+n.slice(a-(a===n.length?1:0)).join("/")}var vu;(function(e){e.pop="pop",e.push="push"})(vu||(vu={}));var Nl;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Nl||(Nl={}));function kW(e){if(!e)if(Wo){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),LW(e)}const NW=/^[^#]+#/;function BW(e,t){return e.replace(NW,"#")+t}function FW(e,t){const r=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-r.left-(t.left||0),top:n.top-r.top-(t.top||0)}}const jd=()=>({left:window.pageXOffset,top:window.pageYOffset});function $W(e){let t;if("el"in e){const r=e.el,n=typeof r=="string"&&r.startsWith("#"),i=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!i)return;t=FW(i,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Qb(e,t){return(history.state?history.state.position-t:-1)+e}const og=new Map;function HW(e,t){og.set(e,t)}function zW(e){const t=og.get(e);return og.delete(e),t}let WW=()=>location.protocol+"//"+location.host;function qM(e,t){const{pathname:r,search:n,hash:i}=t,a=e.indexOf("#");if(a>-1){let s=i.includes(e.slice(a))?e.slice(a).length:1,l=i.slice(s);return l[0]!=="/"&&(l="/"+l),Xb(l,"")}return Xb(r,e)+n+i}function VW(e,t,r,n){let i=[],a=[],o=null;const s=({state:d})=>{const h=qM(e,location),v=r.value,p=t.value;let g=0;if(d){if(r.value=h,t.value=d,o&&o===v){o=null;return}g=p?d.position-p.position:0}else n(h);i.forEach(m=>{m(r.value,v,{delta:g,type:vu.pop,direction:g?g>0?Nl.forward:Nl.back:Nl.unknown})})};function l(){o=r.value}function u(d){i.push(d);const h=()=>{const v=i.indexOf(d);v>-1&&i.splice(v,1)};return a.push(h),h}function f(){const{history:d}=window;d.state&&d.replaceState(ot({},d.state,{scroll:jd()}),"")}function c(){for(const d of a)d();a=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",f)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",f),{pauseListeners:l,listen:u,destroy:c}}function Jb(e,t,r,n=!1,i=!1){return{back:e,current:t,forward:r,replaced:n,position:window.history.length,scroll:i?jd():null}}function GW(e){const{history:t,location:r}=window,n={value:qM(e,r)},i={value:t.state};i.value||a(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(l,u,f){const c=e.indexOf("#"),d=c>-1?(r.host&&document.querySelector("base")?e:e.slice(c))+l:WW()+e+l;try{t[f?"replaceState":"pushState"](u,"",d),i.value=u}catch(h){console.error(h),r[f?"replace":"assign"](d)}}function o(l,u){const f=ot({},t.state,Jb(i.value.back,l,i.value.forward,!0),u,{position:i.value.position});a(l,f,!0),n.value=l}function s(l,u){const f=ot({},i.value,t.state,{forward:l,scroll:jd()});a(f.current,f,!0);const c=ot({},Jb(n.value,l,null),{position:f.position+1},u);a(l,c,!1),n.value=l}return{location:n,state:i,push:s,replace:o}}function UW(e){e=kW(e);const t=GW(e),r=VW(e,t.state,t.location,t.replace);function n(a,o=!0){o||r.pauseListeners(),history.go(a)}const i=ot({location:"",base:e,go:n,createHref:BW.bind(null,e)},t,r);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function YW(e){return e=locLine truncated
|
||||
`:arguments[1];return c.replace(/\<br\s*\/?\>/g,d)},capitalize:function(c){var d=arguments.length<=1||arguments[1]===void 0?!1:arguments[1];return""+c.charAt(0).toUpperCase()+(d?c.slice(1).toLowerCase():c.slice(1))},capitalizeAll:function(c){return c.replace(/(?:^|\s)\S/g,function(d){return d.toUpperCase()})},titleCase:function(c){var d=/\b(a|an|and|at|but|by|de|en|for|if|in|of|on|or|the|to|via|vs?\.?)\b/i,h=/\S+[A-Z]+\S*/,v=/\s+/,p=/-/,g=void 0;return g=function(y){for(var _=arguments.length<=1||arguments[1]===void 0?!1:arguments[1],b=arguments.length<=2||arguments[2]===void 0?!0:arguments[2],x=[],w=y.split(_?p:v),S=0;S<w.length;++S){var C=w[S];if(C.indexOf("-")!==-1){x.push(g(C,!0,S===0||S===w.length-1));continue}if(b&&(S===0||S===w.length-1)){x.push(h.test(C)?C:u.capitalize(C));continue}h.test(C)?x.push(C):d.test(C)?x.push(C.toLowerCase()):x.push(u.capitalize(C))}return x.join(_?"-":" ")},g(c)},titlecase:function(){return u.titleCase.apply(u,arguments)}};return u})})(IV,Ji);/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */var ug=function(e,t){return ug=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(r[i]=n[i])},ug(e,t)};function pe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");ug(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var RV=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),OV=function(){function e(){this.browser=new RV,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e}(),Fa=new OV;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Fa.wxa=!0,Fa.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Fa.worker=!0:typeof navigator>"u"?(Fa.node=!0,Fa.svgSupported=!0):kV(navigator.userAgent,Fa);function kV(e,t){var r=t.browser,n=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);n&&(r.firefox=!0,r.version=n[1]),i&&(r.ie=!0,r.version=i[1]),a&&(r.edge=!0,r.version=a[1],r.newEdge=+a[1].split(".")[0]>18),o&&(r.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!r.ie&&!r.edge,t.pointerEventsSupported="onpointerdown"in window&&(r.edge||r.ie&&+r.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(r.ie&&"transition"in s||r.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||r.ie&&+r.version>=9}const Ve=Fa;var Ey=12,NV="sans-serif",co=Ey+"px "+NV,BV=20,FV=100,$V="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function HV(e){var t={};if(typeof JSON>"u")return t;for(var r=0;r<e.length;r++){var n=String.fromCharCode(r+32),i=(e.charCodeAt(r)-BV)/FV;t[n]=i}return t}var zV=HV($V),bo={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var e,t;return function(r,n){if(!e){var i=bo.createCanvas();e=i&&i.getContext("2d")}if(e)return t!==n&&(t=e.font=n||co),e.measureText(r);r=r||"",n=n||co;var a=/(\d+)px/.exec(n),o=a&&+a[1]||Ey,s=0;if(n.indexOf("mono")>=0)s=o*r.length;else for(var l=0;l<r.length;l++){var u=zV[r[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(e,t,r){var n=new Image;return n.onload=t,n.onerror=r,n.src=e,n}},nA=ea(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(e,t){return e["[object "+t+"]"]=!0,e},{}),iA=ea(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(e,t){return e["[object "+t+"Array]"]=!0,e},{}),zu=Object.prototype.toString,Kd=Array.prototype,WV=Kd.forEach,VV=Kd.filter,Py=Kd.slice,GV=Kd.map,d1=function(){}.constructor,vf=d1?d1.prototype:null,Ly="__proto__",UV=2311;function aA(){return UV++}function Dy(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];typeof console<"u"&&console.error.apply(console,e)}function Xe(e){if(e==null||typeof e!="object")return e;var t=e,r=zu.call(e);if(r==="[object Array]"){if(!Fl(e)){t=[];for(var n=0,i=e.length;n<i;n++)t[n]=Xe(e[n])}}else if(iA[r]){if(!Fl(e)){var a=e.constructor;if(a.from)t=a.from(e);else{t=new a(e.length);for(var n=0,i=e.length;n<i;n++)t[n]=e[n]}}}else if(!nA[r]&&!Fl(e)&&!Yc(e)){t={};for(var o in e)e.hasOwnProperty(o)&&o!==Ly&&(t[o]=Xe(e[o]))}return t}function it(e,t,r){if(!Pe(t)||!Pe(e))return r?Xe(t):e;for(var n in t)if(t.hasOwnProperty(n)&&n!==Ly){var i=e[n],a=t[n];Pe(a)&&Pe(i)&&!ge(a)&&!ge(i)&&!Yc(a)&&!Yc(i)&&!h1(a)&&!h1(i)&&!Fl(a)&&!Fl(i)?it(i,a,r):(r||!(n in e))&&(e[n]=Xe(t[n]))}return e}function oe(e,t){if(Object.assign)Object.assign(e,t);else for(var r in t)t.hasOwnProperty(r)&&r!==Ly&&(e[r]=t[r]);return e}function ut(e,t,r){for(var n=xt(t),i=0;i<n.length;i++){var a=n[i];(r?t[a]!=null:e[a]==null)&&(e[a]=t[a])}return e}bo.createCanvas;function nt(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r}return-1}function YV(e,t){var r=e.prototype;function n(){}n.prototype=t.prototype,e.prototype=new n;for(var i in r)r.hasOwnProperty(i)&&(e.prototype[i]=r[i]);e.prototype.constructor=e,e.superClass=t}function Qn(e,t,r){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(r?t[a]!=null:e[a]==null)&&(e[a]=t[a])}else ut(e,t,r)}function Tr(e){return!e||typeof e=="string"?!1:typeof e.length=="number"}fLine truncated
|
||||
`),a=i.length;if(a===1)return H1(i[0],t,r,n);for(var o=new et(0,0,0,0),s=0;s<i.length;s++){var l=H1(i[s],t,r,n);s===0?o.copy(l):o.union(l)}return o}function _l(e,t,r){return r==="right"?e-=t:r==="center"&&(e-=t/2),e}function Go(e,t,r){return r==="middle"?e-=t/2:r==="bottom"&&(e-=t),e}function $y(e){return Nr("国",e)}function ta(e,t){return typeof e=="string"?e.lastIndexOf("%")>=0?parseFloat(e)/100*t:parseFloat(e):e}function Jc(e,t,r){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=r.height,o=r.width,s=a/2,l=r.x,u=r.y,f="left",c="top";if(n instanceof Array)l+=ta(n[0],r.width),u+=ta(n[1],r.height),f=null,c=null;else switch(n){case"left":l-=i,u+=s,f="right",c="middle";break;case"right":l+=i+o,u+=s,c="middle";break;case"top":l+=o/2,u-=i,f="center",c="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=i,u+=s,c="middle";break;case"insideRight":l+=o-i,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",c="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,c="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",c="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=f,e.verticalAlign=c,e}var cv="__zr_normal__",dv=mu.concat(["ignore"]),dU=ea(mu,function(e,t){return e[t]=!0,e},{ignore:!1}),Lo={},hU=new et(0,0,0,0),Hy=function(){function e(t){this.id=aA(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,r,n){switch(this.draggable){case"horizontal":r=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=r,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var r=this._textContent;if(r&&(!r.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=r.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(r),n.position!=null){var f=hU;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Lo,n,f):Jc(Lo,n,f),a.x=Lo.x,a.y=Lo.y,o=Lo.align,s=Lo.verticalAlign;var c=n.origin;if(c&&n.rotation!=null){var d=void 0,h=void 0;c==="center"?(d=f.width*.5,h=f.height*.5):(d=ta(c[0],f.width),h=ta(c[1],f.height)),u=!0,a.originX=-a.x+d+(i?0:f.x),a.originY=-a.y+h+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var v=n.offset;v&&(a.x+=v[0],a.y+=v[1],u||(a.originX=-v[0],a.originY=-v[1]));var p=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;p&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=o,g.verticalAlign=s,r.setDefaultTextStyle(g)),r.__dirty|=Ir,l&&r.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ag:Mg},e.prototype.getOutsideStroke=function(t){var r=this.__zr&&this.__zr.getBackgroundColor(),n=typeof r=="string"&&to(r);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,Ny(n,"rgba")},e.prototype.traverse=function(t,r){},e.prototype.attrKV=function(t,r){t==="textConfig"?this.setTextConfig(r):t==="textContent"?this.setTextContent(r):t==="clipPath"?this.setClipPath(r):t==="extra"?(this.extra=this.extra||{},oe(this.extra,r)):this[t]=r},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,r){if(typeof t=="string")this.attrKV(t,r);else if(Pe(t))for(var n=t,i=xt(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,t[o])}return this.markRedraw(),this},e.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var r=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==cv)){var o=i.targetName,s=o?r[o]:r;i.saveTo(s)}}},e.prototype._innerSaveToNormal=function(t){var r=this._normalState;r||(r=this._normalState={}),t.textCon
Line truncated
|
||||
* ZRender, a high performance 2d drawing library.
|
||||
*
|
||||
* Copyright (c) 2013, Baidu Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* LICENSE
|
||||
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
||||
*/var Cc={},OA={};function yU(e){delete OA[e]}function _U(e){if(!e)return!1;if(typeof e=="string")return Zc(e,1)<Tg;if(e.colorStops){for(var t=e.colorStops,r=0,n=t.length,i=0;i<n;i++)r+=Zc(t[i].color,1);return r/=n,r<Tg}return!1}var bU=function(){function e(t,r,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=r,this.id=t;var a=new NG,o=n.renderer||"canvas";Cc[o]||(o=xt(Cc)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new Cc[o](r,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!Ve.node&&!Ve.worker&&!l?new lU(s.getViewportRoot(),s.root):null,f=n.useCoarsePointer,c=f==null||f==="auto"?Ve.touchEventsSupported:!!f,d=44,h;c&&(h=qe(n.pointerSize,d)),this.handler=new DG(a,s,u,s.root,h),this.animation=new eU({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return e.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},e.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},e.prototype.configLayer=function(t,r){this.painter.configLayer&&this.painter.configLayer(t,r),this.refresh()},e.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=_U(t)},e.prototype.getBackgroundColor=function(){return this._backgroundColor},e.prototype.setDarkMode=function(t){this._darkMode=t},e.prototype.isDarkMode=function(){return this._darkMode},e.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},e.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},e.prototype.flush=function(){this._flush(!1)},e.prototype._flush=function(t){var r,n=Ko();this._needsRefresh&&(r=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(r=!0,this.refreshHoverImmediately());var i=Ko();r?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover()},e.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},e.prototype.clearAnimation=function(){this.animation.clear()},e.prototype.getWidth=function(){return this.painter.getWidth()},e.prototype.getHeight=function(){return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,r){return this.handler.findHover(t,r)},e.prototype.on=function(t,r,n){return this.handler.on(t,r,n),this},e.prototype.off=function(t,r){this.handler.off(t,r)},e.prototype.trigger=function(t,r){this.handler.trigger(t,r)},e.prototype.clear=function(){for(var t=this.storage.getRoots(),r=0;r<t.length;r++)t[r]instanceof sn&&t[r].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},e.prototype.dispose=function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,yU(this.id)},e}();function z1(e,t){var r=new bU(aA(),e,t);return OA[r.id]=r,r}function wU(e,t){Cc[e]=t}var W1=1e-4,kA=20;function xU(e){return e.replace(/^\s+|\s+$/g,"")}function Eg(e,t,r,n){var i=t[0],a=t[1],o=r[0],s=r[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(e<=i)return o;if(e>=a)return s}else{if(e>=i)return o;if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/l*u+o}function pt(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Ce(e)?xU(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function It(e,t,r){return t==null&&(t=10),t=Math.min(Math.max(0,t),kA),e=(+e).toFixed(t),r?e:+e}function ui(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,r=0;r<15;r++,t*=10)if(Math.round(e*t)/t===e)return r}return SU(e)}function SU(e){var t=e.toString().toLowerCase(),r=t.indexOf("e"),n=r>0?+t.slice(r+1):0,i=r>0?r:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function CU(e,t){var r=Math.log,n=Math.LN10,i=Math.floor(r(e[1]-e[0])/n),a=Math.round(r(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function TU(e,t){var r=ea(e,function(h,v){return h+(isNaN(v)?0:v)},0);if(r===0)return[];for(var n=Math.pow(10,t),i=Oe(e,function(h){return(isNaN(h)?0:h)/r*n*100}),a=n*100,o=Oe(i,function(h){return Math.floor(h)}),s=ea(o,function(h,v){reLine truncated
|
||||
`);i=YA(t,r,n,i);for(var o=0,s=a.length;o<s;o++)a[o]=qA(a[o],i);return a.join(`
|
||||
`)}function YA(e,t,r,n){n=n||{};var i=oe({},n);i.font=t,r=qe(r,"..."),i.maxIterations=qe(n.maxIterations,2);var a=i.minChar=qe(n.minChar,0);i.cnCharWidth=Nr("国",t);var o=i.ascCharWidth=Nr("a",t);i.placeholder=qe(n.placeholder,"");for(var s=e=Math.max(0,e-1),l=0;l<a&&s>=o;l++)s-=o;var u=Nr(r,t);return u>s&&(r="",u=0),s=e-u,i.ellipsis=r,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=e,i}function qA(e,t){var r=t.containerWidth,n=t.font,i=t.contentWidth;if(!r)return"";var a=Nr(e,n);if(a<=r)return e;for(var o=0;;o++){if(a<=i||o>=t.maxIterations){e+=t.ellipsis;break}var s=o===0?i9(e,i,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(e.length*i/a):0;e=e.substr(0,s),a=Nr(e,n)}return e===""&&(e=t.placeholder),e}function i9(e,t,r,n){for(var i=0,a=0,o=e.length;a<o&&i<t;a++){var s=e.charCodeAt(a);i+=0<=s&&s<=127?r:n}return a}function a9(e,t){e!=null&&(e+="");var r=t.overflow,n=t.padding,i=t.font,a=r==="truncate",o=$y(i),s=qe(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",f=t.width,c;f!=null&&(r==="break"||r==="breakAll")?c=e?jA(e,t.font,f,r==="breakAll",0).lines:[]:c=e?e.split(`
|
||||
`):[];var d=c.length*s,h=qe(t.height,d);if(d>h&&u){var v=Math.floor(h/s);c=c.slice(0,v)}if(e&&a&&f!=null)for(var p=YA(f,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),g=0;g<c.length;g++)c[g]=qA(c[g],p);for(var m=h,y=0,g=0;g<c.length;g++)y=Math.max(Nr(c[g],i),y);f==null&&(f=y);var _=y;return n&&(m+=n[0]+n[2],_+=n[1]+n[3],f+=n[1]+n[3]),l&&(_=f),{lines:c,height:h,outerWidth:_,outerHeight:m,lineHeight:s,calculatedLineHeight:o,contentWidth:y,contentHeight:d,width:f}}var o9=function(){function e(){}return e}(),q1=function(){function e(t){this.tokens=[],t&&(this.tokens=t)}return e}(),s9=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return e}();function l9(e,t){var r=new s9;if(e!=null&&(e+=""),!e)return r;for(var n=t.width,i=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=gv.lastIndex=0,l;(l=gv.exec(e))!=null;){var u=l.index;u>s&&mv(r,e.substring(s,u),t,o),mv(r,l[2],t,o,l[1]),s=gv.lastIndex}s<e.length&&mv(r,e.substring(s,e.length),t,o);var f=[],c=0,d=0,h=t.padding,v=a==="truncate",p=t.lineOverflow==="truncate";function g(B,N,U){B.width=N,B.lineHeight=U,c+=U,d=Math.max(d,N)}e:for(var m=0;m<r.lines.length;m++){for(var y=r.lines[m],_=0,b=0,x=0;x<y.tokens.length;x++){var w=y.tokens[x],S=w.styleName&&t.rich[w.styleName]||{},C=w.textPadding=S.padding,T=C?C[1]+C[3]:0,E=w.font=S.font||t.font;w.contentHeight=$y(E);var A=qe(S.height,w.contentHeight);if(w.innerHeight=A,C&&(A+=C[0]+C[2]),w.height=A,w.lineHeight=Bl(S.lineHeight,t.lineHeight,A),w.align=S&&S.align||t.align,w.verticalAlign=S&&S.verticalAlign||"middle",p&&i!=null&&c+w.lineHeight>i){x>0?(y.tokens=y.tokens.slice(0,x),g(y,b,_),r.lines=r.lines.slice(0,m+1)):r.lines=r.lines.slice(0,m);break e}var M=S.width,D=M==null||M==="auto";if(typeof M=="string"&&M.charAt(M.length-1)==="%")w.percentWidth=M,f.push(w),w.contentWidth=Nr(w.text,E);else{if(D){var O=S.backgroundColor,k=O&&O.image;k&&(k=r9(k),th(k)&&(w.width=Math.max(w.width,k.width*A/k.height)))}var F=v&&n!=null?n-b:null;F!=null&&F<w.width?!D||F<T?(w.text="",w.width=w.contentWidth=0):(w.text=n9(w.text,F-T,E,t.ellipsis,{minChar:t.truncateMinChar}),w.width=w.contentWidth=Nr(w.text,E)):w.contentWidth=Nr(w.text,E)}w.width+=T,b+=w.width,S&&(_=Math.max(_,w.lineHeight))}g(y,b,_)}r.outerWidth=r.width=qe(n,d),r.outerHeight=r.height=qe(i,c),r.contentHeight=c,r.contentWidth=d,h&&(r.outerWidth+=h[1]+h[3],r.outerHeight+=h[0]+h[2]);for(var m=0;m<f.length;m++){var w=f[m],j=w.percentWidth;w.width=parseInt(j,10)/100*r.width}return r}function mv(e,t,r,n,i){var a=t==="",o=i&&r.rich[i]||{},s=e.lines,l=o.font||r.font,u=!1,f,c;if(n){var d=o.padding,h=d?d[1]+d[3]:0;if(o.width!=null&&o.width!=="auto"){var v=ta(o.width,n.width)+h;s.length>0&&v+n.accumWidth>n.width&&(f=t.split(`
|
||||
`),u=!0),n.accumWidth=v}else{var p=jA(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+h,c=p.linesWidths,f=p.lines}}else f=t.split(`
|
||||
`);for(var g=0;g<f.length;g++){var m=f[g],y=new o9;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!a,typeof o.width=="number"?y.width=o.width:y.width=c?c[g]:Nr(m,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new q1)).tokens,b=_.length;b===1&&_[0].isLineHolder?_[0]=y:(m||!b||a)&&_.push(y)}else s.push(new q1([y]))}}function u9(e){var t=e.charCodeAt(0);return t>=33&&t<=383}var f9=ea(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function c9(e){return u9(e)?!!f9[e]:!0}function jA(e,t,r,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,c=0;c<e.length;c++){var d=e.charAt(c);if(d===`
|
||||
`){l&&(s+=l,f+=u),a.push(s),o.push(f),s="",l="",u=0,f=0;continue}var h=Nr(d,t),v=n?!1:!c9(d);if(a.length?f+h>r:i+f+h>r){f?(s||l)&&(v?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=d,u+=h,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=d,f=h)):v?(a.push(l),o.push(u),l=d,u=h):(a.push(d),o.push(h));continue}f+=h,v?(l+=d,u+=h):(l&&(s+=l,l="",u=0),s+=d)}return!a.length&&!s&&(s=e,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var Dg="__zr_style_"+Math.round(Math.random()*10),ro={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},rh={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ro[Dg]=!0;var j1=["z","z2","invisible"],d9=["invisible"],h9=function(e){pe(t,e);function t(r){return e.call(this,r)||this}return t.prototype._init=function(r){for(var n=xt(r),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(r[a]):e.prototype.attrKV.call(this,a,r[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(r,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&v9(this,r,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(r,n){return this.rectContain(r,n)},t.prototype.traverse=function(r,n){r.call(n,this)},t.prototype.rectContain=function(r,n){var i=this.transformCoordToLocal(r,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var r=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;r=this._paintRect||(this._paintRect=new et(0,0,0,0)),n?et.applyTransform(r,i,n):r.copy(i),(o||s||l)&&(r.width+=o*2+Math.abs(s),r.height+=o*2+Math.abs(l),r.x=Math.min(r.x,r.x+s-o),r.y=Math.min(r.y,r.y+l-o));var u=this.dirtyRectTolerance;r.isZero()||(r.x=Math.floor(r.x-u),r.y=Math.floor(r.y-u),r.width=Math.ceil(r.width+1+u*2),r.height=Math.ceil(r.height+1+u*2))}return r},t.prototype.setPrevPaintRect=function(r){r?(this._prevPaintRect=this._prevPaintRect||new et(0,0,0,0),this._prevPaintRect.copy(r)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(r){return this.animate("style",r)},t.prototype.updateDuringAnimation=function(r){r==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(r,n){r!=="style"?e.prototype.attrKV.call(this,r,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(r,n){return typeof r=="string"?this.style[r]=n:oe(this.style,r),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(r){r||this.markRedraw(),this.__dirty|=ml,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&ml)},t.prototype.styleUpdated=function(){this.__dirty&=~ml},t.prototype.createStyle=function(r){return Zd(ro,r)},t.prototype.useStyle=function(r){r[Dg]||(r=this.createStyle(r)),this.__inHover?this.__hoverStyle=r:this.style=r,this.dirtyStyle()},t.prototype.isStyleObject=function(r){return r[Dg]},t.prototype._innerSaveToNormal=function(r){e.prototype._innerSaveToNormal.call(this,r);var n=this._normalState;r.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(r,n,j1)},t.prototype._applyStateObj=function(r,n,i,a,o,s){e.prototype._applyStateObj.call(this,r,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var c=xt(f),d=0;d<c.length;d++){var h=c[d];h in u&&(u[h]=u[h],this.style[h]=f[h])}for(var v=xt(u),d=0;d<v.length;d++){var h=v[d];this.style[h]=this.style[h]}this._transitionState(r,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?d9:j1,d=0;d<p.length;d++){var h=p[d];n&&n[h]!=null?this[h]=n[h]:l&&i[h]!=null&&(this[h]=i[h])}},t.prototype._mergeStates=function(r){for(var n=e.prototype._mergeStates.call(this,r),i,a=0;a<r.length;a++){var o=r[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},t.prototype._mergeStyle=function(r,n){return oe(r,n),r},t.prototype.getAnimationStyleProps=function(){return rh},t.initDefaultProps=function(){var r=t.prototype;r.type="displayable",r.invisible=!1,r.z=0,r.z2=0,r.zlevel=0,r.culling=!1,r.cursor="pointer",r.rectHover=!1,r.incremental=!1,r._rect=null,r.di
Line truncated
|
||||
`,`
|
||||
|
||||
`,`
|
||||
|
||||
|
||||
`];function Mu(e,t){return t.type=e,t}function qg(e){return e.type==="section"}function EE(e){return qg(e)?Vq:Gq}function PE(e){if(qg(e)){var t=0,r=e.blocks.length,n=r>1||r>0&&!e.noHeader;return R(e.blocks,function(i){var a=PE(i);a>=t&&(t=a+ +(n&&(!a||qg(i)&&!i.noHeader)))}),t}return 0}function Vq(e,t,r,n){var i=t.noHeader,a=Uq(PE(t)),o=[],s=t.blocks||[];mi(!s||ge(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Ts(u,l)){var f=new Aq(u[l],null);s.sort(function(v,p){return f.evaluate(v.sortParam,p.sortParam)})}else l==="seriesDesc"&&s.reverse()}R(s,function(v,p){var g=t.valueFormatter,m=EE(v)(g?oe(oe({},e),{valueFormatter:g}):e,v,p>0?a.html:0,n);m!=null&&o.push(m)});var c=e.renderMode==="richText"?o.join(a.richText):jg(o.join(""),i?r:a.html);if(i)return c;var d=Gg(t.header,"ordinal",e.useUTC),h=AE(n,e.renderMode).nameStyle;return e.renderMode==="richText"?LE(e,d,h)+a.richText+c:jg('<div style="'+h+";"+ME+';">'+Kr(d)+"</div>"+c,r)}function Gq(e,t,r,n){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,f=t.valueFormatter||e.valueFormatter||function(b){return b=ge(b)?b:[b],Oe(b,function(x,w){return Gg(x,ge(h)?h[w]:h,u)})};if(!(a&&o)){var c=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),d=a?"":Gg(l,"ordinal",u),h=t.valueType,v=o?[]:f(t.value),p=!s||!a,g=!s&&a,m=AE(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":c)+(a?"":LE(e,d,y))+(o?"":jq(e,v,p,g,_)):jg((s?"":c)+(a?"":Yq(d,!s,y))+(o?"":qq(v,p,g,_)),r)}}function ax(e,t,r,n,i,a){if(e){var o=EE(e),s={useUTC:i,renderMode:r,orderMode:n,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,a)}}function Uq(e){return{html:zq[e],richText:Wq[e]}}function jg(e,t){var r='<div style="clear:both"></div>',n="margin: "+t+"px 0 0";return'<div style="'+n+";"+ME+';">'+e+r+"</div>"}function Yq(e,t,r){var n=t?"margin-left:2px":"";return'<span style="'+r+";"+n+'">'+Kr(e)+"</span>"}function qq(e,t,r,n){var i=r?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return e=ge(e)?e:[e],'<span style="'+a+";"+n+'">'+Oe(e,function(o){return Kr(o)}).join(" ")+"</span>"}function LE(e,t,r){return e.markupStyleCreator.wrapRichTextStyle(t,r)}function jq(e,t,r,n,i){var a=[i],o=n?10:20;return r&&a.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(ge(t)?t.join(" "):t,a)}function Kq(e,t){var r=e.getData().getItemVisual(t,"style"),n=r[e.visualDrawType];return Su(n)}function DE(e,t){var r=e.get("padding");return r??(t==="richText"?[8,10]:10)}var zv=function(){function e(){this.richTextStyles={},this._nextStyleNameId=FA()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,r,n){var i=n==="richText"?this._generateStyleName():null,a=k7({color:r,type:t,renderMode:n,markerId:i});return Ce(a)?a:(this.richTextStyles[i]=a.style,a.content)},e.prototype.wrapRichTextStyle=function(t,r){var n={};ge(r)?R(r,function(a){return oe(n,a)}):oe(n,r);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},e}();function Xq(e){var t=e.series,r=e.dataIndex,n=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(r),l=ge(s),u=Kq(t,r),f,c,d,h;if(o>1||l&&!o){var v=Zq(s,t,r,a,u);f=v.inlineValues,c=v.inlineValueTypes,d=v.blocks,h=v.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);h=f=Es(i,r,a[0]),c=p.type}else h=f=l?s[0]:s;var g=Wy(t),m=g&&t.name||"",y=i.getName(r),_=n?m:y;return Mu("section",{header:m,noHeader:n||!g,sortParam:h,blocks:[Mu("nameValue",{markerType:"item",markerColor:u,name:_,noName:!zn(_),value:f,valueType:c})].concat(d||[])})}function Zq(e,t,r,n,i){var a=t.getData(),o=ea(e,function(c,d,h){var v=a.getDimensionInfo(h);return c=c||v&&v.tooltip!==!1&&v.displayName!=null},!1),s=[],l=[],u=[];n.length?R(n,function(c){f(Es(a,r,c),c)}):R(e,f);function f(c,d){var h=a.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(Mu("nameValue",{markerType:"subItem",markerColor:i,name:h.displayName,value:c,valueType:h.type})):(s.push(c),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Ii=Tt();function kf(e,t){return e.getName(t)||e.getId(t)}var Qq="__universalTransitionEnabled",gh=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._selectedDataIndicesMap={},r}return t.prototype.init=function(r,n,i){this.seriesIndex=this.componentIndex,this.dataTask=ql({count:ej,reset:tj}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(r,i);var a=Ii(this).sourceManager=new Hq(this);a.prepareSource();var o=this.getInitialData(r,i);sx(o,this),this.dataTask.context.data=o,Ii(this).dataBeforeProcessed=o,ox(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(r,n){var i=Cu(this),a=i?hh(r):{},o=this.subType;bt.hasClass(o)&&(o+="Series"),it(r,n.getTheme().get(this.subType)),it(r,this.getDefaultOption()),Pg(r,"
Line truncated
|
||||
|
||||
`:"<br/>",m=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(r,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],h,null,d)})},t.prototype._showSeriesItemTooltip=function(r,n,i){var a=this._ecModel,o=lt(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,d=u.getData(c),h=this._renderMode,v=r.positionDefault,p=hl([d.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,v?{position:v}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(f,c),y=new zv;m.marker=y.makeTooltipMarker("item",Su(m.color),h);var _=ex(u.formatTooltip(f,!1,c)),b=p.get("order"),x=p.get("valueFormatter"),w=_.frag,S=w?ax(x?oe({valueFormatter:x},w):w,y,h,b,a.get("useUTC"),p.get("textStyle")):_.text,C="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,S,m,C,r.offsetX,r.offsetY,r.position,r.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:d.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(r,n,i){var a=lt(n),o=a.tooltipConfig,s=o.option||{};if(Ce(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(a.componentMainType,a.componentIndex);f&&u.push(f),u.push({formatter:s.content});var c=r.positionDefault,d=hl(u,this._tooltipModel,c?{position:c}:null),h=d.get("content"),v=Math.random()+"",p=new zv;this._showOrMove(d,function(){var g=Xe(d.get("formatterParams")||{});this._showTooltipContent(d,h,g,v,r.offsetX,r.offsetY,r.position,n,p)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(r,n,i,a,o,s,l,u,f){if(this._ticket="",!(!r.get("showContent")||!r.get("show"))){var c=this._tooltipContent;c.setEnterable(r.get("enterable"));var d=r.get("formatter");l=l||r.get("position");var h=n,v=this._getNearestPoint([o,s],i,r.get("trigger"),r.get("borderColor")),p=v.color;if(d)if(Ce(d)){var g=r.ecModel.get("useUTC"),m=ge(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;h=d,y&&(h=sh(m.axisValue,h,g)),h=aE(h,i,!0)}else if(We(d)){var _=yt(function(b,x){b===this._ticket&&(c.setContent(x,f,r,p,l),this._updatePosition(r,l,o,s,c,i,u))},this);this._ticket=a,h=d(i,a,_)}else h=d;c.setContent(h,f,r,p,l),c.show(r,p),this._updatePosition(r,l,o,s,c,i,u)}},t.prototype._getNearestPoint=function(r,n,i,a){if(i==="axis"||ge(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!ge(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(r,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||r.get("position");var c=o.getSize(),d=r.get("align"),h=r.get("verticalAlign"),v=l&&l.getBoundingRect().clone();if(l&&v.applyTransform(l.transform),We(n)&&(n=n([i,a],s,o.el,v,{viewSize:[u,f],contentSize:c.slice()})),ge(n))i=pt(n[0],u),a=pt(n[1],f);else if(Pe(n)){var p=n;p.width=c[0],p.height=c[1];var g=Ms(p,{width:u,height:f});i=g.x,a=g.y,d=null,h=null}else if(Ce(n)&&l){var m=WJ(n,v,c,r.get("borderWidth"));i=m[0],a=m[1]}else{var m=HJ(i,a,o,u,f,d?null:20,h?null:20);i=m[0],a=m[1]}if(d&&(i-=zS(d)?c[0]/2:d==="right"?c[0]:0),h&&(a-=zS(h)?c[1]/2:h==="bottom"?c[1]:0),hL(r)){var m=zJ(i,a,o,u,f);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(r,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===r.length;return o&&R(i,function(s,l){var u=s.dataByAxis||[],f=r[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&R(u,function(d,h){var v=c[h]||{},p=d.seriesDataIndices||[],g=v.seriesDataIndices||[];o=o&&d.value===v.value&&d.axisType===v.axisType&&d.axisId===v.axisId&&p.length===g.length,o&&R(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&R(d.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],b=a[y];_&&b&&b.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=r,this._cbParamsList=n,!!o},t.prototype._hide=function(r){this._lastDataByCoordSys=null,r({type:"hideTip",from:this.uid})},t.prototype.dispose=function(r,n){Ve.node||!n.getDom()||(Xg(this,"_updatePosition"),this._tooltipContent.dispose(),dm("itemTooltip",n))},t.type="tooltip",t}(_i);function hl(e,t,r){var n=t.ecModel,i;r?(i=new er(r,n,n),i=new er(t.option,i,n)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof er&&(o=o.get("tooltip",!0)),Ce(o)&&(o={formatter:o}),o&&(i=new er(o,i,n)))}return i}function HS(e,t){return e.dispatchAction||yt(t.dispatchAction,t)}function HJ(e,t,r,n,i,a,o){var s=r.getSize(),l=s[0],u=s[1];return a!=null&&(e+l+a+2>n?e-=l+a:e+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[e,t]}function zJ(e,t,r,n,i){var a=r.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,n)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function WJ(e,t,r,n){var i=r[0],a=r[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(e){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=
Line truncated
|
||||
`)){var g=new rc;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(p)[0];if(!f.get(p))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},b=y.getVisual("legendIcon"),x=y.getVisual("style"),w=this._createItem(m,p,v,h,n,r,_,x,b,c,a);w.on("click",Ho(WS,p,null,a,d)).on("mouseover",Ho(pm,m.name,null,a,d)).on("mouseout",Ho(gm,m.name,null,a,d)),f.set(p,!0)}else i.eachRawSeries(function(S){if(!f.get(p)&&S.legendVisualProvider){var C=S.legendVisualProvider;if(!C.containName(p))return;var T=C.indexOfName(p),E=C.getItemVisual(T,"style"),A=C.getItemVisual(T,"legendIcon"),M=to(E.fill);M&&M[3]===0&&(M[3]=.2,E=oe(oe({},E),{fill:Ny(M,"rgba")}));var D=this._createItem(S,p,v,h,n,r,{},E,A,c,a);D.on("click",Ho(WS,null,p,a,d)).on("mouseover",Ho(pm,null,p,a,d)).on("mouseout",Ho(gm,null,p,a,d)),f.set(p,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(r,n,i,a,o){var s=this.getSelectorGroup();vm(r,function(u){var f=u.type,c=new fr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(c);var d=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);i0(c,{normal:d,emphasis:h},{defaultText:u.title}),Fg(c)})},t.prototype._createItem=function(r,n,i,a,o,s,l,u,f,c,d){var h=r.visualDrawType,v=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var b=QJ(f,a,l,u,h,g,d),x=new rc,w=a.getModel("textStyle");if(We(r.getLegendIcon)&&(!_||_==="inherit"))x.add(r.getLegendIcon({itemWidth:v,itemHeight:p,icon:f,iconRotate:m,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}));else{var S=_==="inherit"&&r.getData().getVisual("symbol")?m==="inherit"?r.getData().getVisual("symbolRotate"):m:0;x.add(JJ({itemWidth:v,itemHeight:p,icon:f,iconRotate:S,itemStyle:b.itemStyle,lineStyle:b.lineStyle,symbolKeepAspect:y}))}var C=s==="left"?v+5:-5,T=s,E=o.get("formatter"),A=n;Ce(E)&&E?A=E.replace("{name}",n??""):We(E)&&(A=E(n));var M=a.get("inactiveColor");x.add(new fr({style:ra(w,{text:A,x:C,y:p/2,fill:g?w.getTextColor():M,align:T,verticalAlign:"middle"})}));var D=new Nt({shape:x.getBoundingRect(),invisible:!0}),O=a.getModel("tooltip");return O.get("show")&&r0({el:D,componentModel:o,itemName:n,itemTooltipOption:O.option}),x.add(D),x.eachChild(function(k){k.silent=!0}),D.silent=!c,this.getContentGroup().add(x),Fg(x),x.__legendDataIndex=i,x},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Yl(r.get("orient"),l,r.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Yl("horizontal",u,r.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],v=r.get("selectorButtonGap",!0),p=r.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?h[p]+=f[g]+v:c[p]+=d[g]+v,h[1-p]+=f[m]/2-d[m]/2,u.x=h[0],u.y=h[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=f[g]+v+d[g],_[m]=Math.max(f[m],d[m]),_[y]=Math.min(0,d[y]+h[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(_i);function QJ(e,t,r,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),vm(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=e.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:tm(c,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:r).opacity),s(u,n);var d=t.getModel("lineStyle"),h=d.getLineStyle();if(s(h,r),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!a){var v=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=v==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function JJ(e){var t=e.icon||"roundRect",r=w0(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return r.setStyle(e.itemStyle),r.rotation=(e.iconRotate||0)*Math.PI/180,r.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(r.style.stroke=r.style.fill,r.style.fill="#fff",r.style.lineWidth=2),r}function WS(e,t,r,n){gm(e,t,r,n),r.dispatchAction({type:"legendToggleSelect",name:e??t}),pm(e,t,r,n)}function mL(e){for(var t=e.getZr().storage.getDisplayList(),r,n=0,i=t.length;n<i&&!(r=t[n].states.emphasis);)n++;return r&&r.hoverLayer}function pm(e,t,r,n){mL(r)||r.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:n})}function gm(e,t,r,n){mL(r)||r.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:n})}const yL=ZJ;function eee(e){var t=e.findC
Line truncated
|
||||
`||u==="")){var f=o.isSelected(u);n.hasOwnProperty(u)?n[u]=n[u]&&f:n[u]=f}})}),e==="allSelect"||e==="inverseSelect"?{selected:n}:{name:t.name,selected:n}}function tee(e){e.registerAction("legendToggleSelect","legendselectchanged",Dt(vl,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Dt(vl,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Dt(vl,"inverseSelect")),e.registerAction("legendSelect","legendselected",Dt(vl,"select")),e.registerAction("legendUnSelect","legendunselected",Dt(vl,"unSelect"))}function _L(e){e.registerComponentModel(hm),e.registerComponentView(yL),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,eee),e.registerSubTypeDefaulter("legend",function(){return"plain"}),tee(e)}var ree=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r}return t.prototype.setScrollDataIndex=function(r){this.option.scrollDataIndex=r},t.prototype.init=function(r,n,i){var a=hh(r);e.prototype.init.call(this,r,n,i),VS(this,r,a)},t.prototype.mergeOption=function(r,n){e.prototype.mergeOption.call(this,r,n),VS(this,this.option,r)},t.type="legend.scroll",t.defaultOption=Y2(hm.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(hm);function VS(e,t,r){var n=e.getOrient(),i=[1,1];i[n.index]=0,As(t,r,{type:"box",ignoreSize:!!i})}const nee=ree;var GS=sn,dp=["width","height"],hp=["x","y"],iee=function(e){pe(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.type=t.type,r.newlineDisabled=!0,r._currentIndex=0,r}return t.prototype.init=function(){e.prototype.init.call(this),this.group.add(this._containerGroup=new GS),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new GS)},t.prototype.resetInner=function(){e.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(r,n,i,a,o,s,l){var u=this;e.prototype.renderInner.call(this,r,n,i,a,o,s,l);var f=this._controllerGroup,c=n.get("pageIconSize",!0),d=ge(c)?c:[c,c];v("pagePrev",0);var h=n.getModel("pageTextStyle");f.add(new fr({name:"pageText",style:{text:"xx/xx",fill:h.getTextColor(),font:h.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),v("pageNext",1);function v(p,g){var m=p+"DataIndex",y=t0(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:yt(u._pageGo,u,m,n,a)},{x:-d[0]/2,y:-d[1]/2,width:d[0],height:d[1]});y.name=p,f.add(y)}},t.prototype.layoutInner=function(r,n,i,a,o,s){var l=this.getSelectorGroup(),u=r.getOrient().index,f=dp[u],c=hp[u],d=dp[1-u],h=hp[1-u];o&&Yl("horizontal",l,r.get("selectorItemGap",!0));var v=r.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=Xe(i);o&&(m[f]=i[f]-p[f]-v);var y=this._layoutContentAndController(r,a,m,u,f,d,h,c);if(o){if(s==="end")g[u]+=y[f]+v;else{var _=p[f]+v;g[u]-=_,y[c]-=_}y[f]+=p[f]+v,g[1-u]+=y[h]+y[d]/2-p[d]/2,y[d]=Math.max(y[d],p[d]),y[h]=Math.min(y[h],p[h]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(r,n,i,a,o,s,l,u){var f=this.getContentGroup(),c=this._containerGroup,d=this._controllerGroup;Yl(r.get("orient"),f,r.get("itemGap"),a?i.width:null,a?null:i.height),Yl("horizontal",d,r.get("pageButtonItemGap",!0));var h=f.getBoundingRect(),v=d.getBoundingRect(),p=this._showController=h[o]>i[o],g=[-h.x,-h.y];n||(g[a]=f[u]);var m=[0,0],y=[-v.x,-v.y],_=qe(r.get("pageButtonGap",!0),r.get("itemGap",!0));if(p){var b=r.get("pageButtonPosition",!0);b==="end"?y[a]+=i[o]-v[o]:m[a]+=v[o]+_}y[1-a]+=h[s]/2-v[s]/2,f.setPosition(g),c.setPosition(m),d.setPosition(y);var x={x:0,y:0};if(x[o]=p?i[o]:h[o],x[s]=Math.max(h[s],v[s]),x[l]=Math.min(0,v[l]+y[1-a]),c.__rectSize=i[o],p){var w={x:0,y:0};w[o]=Math.max(i[o]-v[o]-_,0),w[s]=x[s],c.setClipPath(new Nt({shape:w})),c.__rectSize=w[o]}else d.eachChild(function(C){C.attr({invisible:!0,silent:!0})});var S=this._getPageInfo(r);return S.pageIndex!=null&&Mr(f,{x:S.contentPosition[0],y:S.contentPosition[1]},p?r:null),this._updatePageInfoView(r,S),x},t.prototype._pageGo=function(r,n,i){var a=this._getPageInfo(n)[r];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(r,n){var i=this._controllerGroup;R(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",d=n[c]!=null,h=i.childOfName(f);h&&(h.setStyle("fill",d?r.get("pageIconColor",!0):r.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var a=i.childOfName("pageText"),o=r.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",Ce(o)?o.replace("{current}",l==null?"":l+""
Line truncated
|
||||
@@ -1 +1,16 @@
|
||||
<!doctype html> <html lang=en> <head> <meta charset=utf-8> <title>frps dashboard</title> <link rel="shortcut icon" href="favicon.ico"></head> <body> <div id=app></div> <script type="text/javascript" src="manifest.js?5d154ba4c6b342d8c0c3"></script><script type="text/javascript" src="vendor.js?ddbd1f69fb6e67be4b78"></script></body> </html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>frps dashboard</title>
|
||||
<script type="module" crossorigin src="./index-cd02d3b4.js"></script>
|
||||
<link rel="stylesheet" href="./index-4ce77078.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,u,c){for(var i,a,f,l=0,s=[];l<t.length;l++)a=t[l],o[a]&&s.push(o[a][0]),o[a]=0;for(i in u)Object.prototype.hasOwnProperty.call(u,i)&&(e[i]=u[i]);for(r&&r(t,u,c);s.length;)s.shift()();if(c)for(l=0;l<c.length;l++)f=n(n.s=c[l]);return f};var t={},o={1:0};n.e=function(e){function r(){i.onerror=i.onload=null,clearTimeout(a);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var u=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=u;var c=document.getElementsByTagName("head")[0],i=document.createElement("script");i.type="text/javascript",i.charset="utf-8",i.async=!0,i.timeout=12e4,n.nc&&i.setAttribute("nonce",n.nc),i.src=n.p+""+e+".js?"+{0:"ddbd1f69fb6e67be4b78"}[e];var a=setTimeout(r,12e4);return i.onerror=i.onload=r,c.appendChild(i),u},n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="",n.oe=function(e){throw console.error(e),e}}([]);
|
||||
@@ -1 +0,0 @@
|
||||
webpackJsonp([0],[function(e,t){function n(e,t){q[e]=t}function o(e){if(null==e||"object"!=typeof e)return e;var t=e,n=V.call(e);if("[object Array]"===n){t=[];for(var i=0,r=e.length;i<r;i++)t[i]=o(e[i])}else if(F[n]){var a=e.constructor;if(e.constructor.from)t=a.from(e);else{t=new a(e.length);for(var i=0,r=e.length;i<r;i++)t[i]=o(e[i])}}else if(!B[n]&&!D(e)&&!M(e)){t={};for(var l in e)e.hasOwnProperty(l)&&(t[l]=o(e[l]))}return t}function i(e,t,n){if(!k(t)||!k(e))return n?o(t):e;for(var r in t)if(t.hasOwnProperty(r)){var a=e[r],l=t[r];!k(l)||!k(a)||y(l)||y(a)||M(l)||M(a)||S(l)||S(a)||D(l)||D(a)?!n&&r in e||(e[r]=o(t[r],!0)):i(a,l,n)}return e}function r(e,t){for(var n=e[0],o=1,r=e.length;o<r;o++)n=i(n,e[o],t);return n}function a(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function l(e,t,n){for(var o in t)t.hasOwnProperty(o)&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o]);return e}function s(){return Z||(Z=Y().getContext("2d")),Z}function c(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,o=e.length;n<o;n++)if(e[n]===t)return n}return-1}function u(e,t){function n(){}var o=e.prototype;n.prototype=t.prototype,e.prototype=new n;for(var i in o)e.prototype[i]=o[i];e.prototype.constructor=e,e.superClass=t}function d(e,t,n){e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,l(e,t,n)}function f(e){if(e)return"string"!=typeof e&&"number"==typeof e.length}function p(e,t,n){if(e&&t)if(e.forEach&&e.forEach===$)e.forEach(t,n);else if(e.length===+e.length)for(var o=0,i=e.length;o<i;o++)t.call(n,e[o],o,e);else for(var r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}function h(e,t,n){if(e&&t){if(e.map&&e.map===G)return e.map(t,n);for(var o=[],i=0,r=e.length;i<r;i++)o.push(t.call(n,e[i],i,e));return o}}function g(e,t,n,o){if(e&&t){if(e.reduce&&e.reduce===U)return e.reduce(t,n,o);for(var i=0,r=e.length;i<r;i++)n=t.call(o,n,e[i],i,e);return n}}function m(e,t,n){if(e&&t){if(e.filter&&e.filter===H)return e.filter(t,n);for(var o=[],i=0,r=e.length;i<r;i++)t.call(n,e[i],i,e)&&o.push(e[i]);return o}}function v(e,t,n){if(e&&t)for(var o=0,i=e.length;o<i;o++)if(t.call(n,e[o],o,e))return e[o]}function b(e,t){var n=W.call(arguments,2);return function(){return e.apply(t,n.concat(W.call(arguments)))}}function x(e){var t=W.call(arguments,1);return function(){return e.apply(this,t.concat(W.call(arguments)))}}function y(e){return"[object Array]"===V.call(e)}function _(e){return"function"==typeof e}function w(e){return"[object String]"===V.call(e)}function k(e){var t=typeof e;return"function"===t||!!e&&"object"==t}function S(e){return!!B[V.call(e)]}function M(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function C(e){return e!==e}function A(e){for(var t=0,n=arguments.length;t<n;t++)if(null!=arguments[t])return arguments[t]}function T(e,t){return null!=e?e:t}function E(e,t,n){return null!=e?e:null!=t?t:n}function I(){return Function.call.apply(W,arguments)}function O(e){if("number"==typeof e)return[e,e,e,e];var t=e.length;return 2===t?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function L(e,t){if(!e)throw new Error(t)}function P(e){e[X]=!0}function D(e){return e[X]}function z(e){e&&p(e,function(e,t){this.set(t,e)},this)}function R(e){return new z(e)}function N(){}var B={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},F={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},V=Object.prototype.toString,j=Array.prototype,$=j.forEach,H=j.filter,W=j.slice,G=j.map,U=j.reduce,q={},Y=function(){return q.createCanvas()};q.createCanvas=function(){return document.createElement("canvas")};var Z,X="__ec_primitive__";z.prototype={constructor:z,get:function(e){return this["_ec_"+e]},set:function(e,t){return this["_ec_"+e]=t,t},each:function(e,t){void 0!==t&&(e=b(e,t));for(var n in this)this.hasOwnProperty(n)&&e(this[n],n.slice(4))},removeKey:function(e){delete this["_ec_"+e]}},t.$override=n,t.clone=o,t.merge=i,t.mergeAll=r,t.extend=a,t.defaults=l,t.createCanvas=Y,t.getContext=s,t.indexOf=c,t.inherits=u,t.mixin=d,t.isArrayLike=f,t.each=p,t.map=h,t.reduce=g,t.filter=m,t.find=v,t.bind=b,t.curry=x,t.isArray=y,t.isFunction=_,t.isString=w,t.isObject=k,t.isBuiltInObject=S,t.isDom=M,t.eqNaN=C,t.retrieve=A,t.retrieve2=T,t.retrieve3=E,t.slice=I,t.normalizeCssArray=O,t.assert=L,t.setAsPrimitive=P,t.isPrimitive=D,t.createHashMap=R,t.noop=N},function(e,t,n){function o(e){return function(t,n,o){t=t&&t.toLowerCase(),J.prototype[e].call(this,t,n,o)}}function i(){J.call(this)}function r(e,t,n){function o(e,t){return e.prio-t.prio}n=n||{},"string"==typeof t&&(t=Pe[t]),this.id,this.group,this._dom=e;var r=this._zr=q.init(e,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.widthLine truncated
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["es2015", { "modules": false }]
|
||||
],
|
||||
"plugins": [
|
||||
[
|
||||
"component",
|
||||
{
|
||||
"libraryName": "element-ui",
|
||||
"styleLibraryName": "theme-chalk"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/* eslint-env node */
|
||||
require('@rushstack/eslint-patch/modern-module-resolution')
|
||||
|
||||
module.exports = {
|
||||
root: true,
|
||||
extends: [
|
||||
'plugin:vue/vue3-essential',
|
||||
'eslint:recommended',
|
||||
'@vue/eslint-config-typescript',
|
||||
'@vue/eslint-config-prettier',
|
||||
],
|
||||
parserOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
},
|
||||
rules: {
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'warn',
|
||||
{
|
||||
argsIgnorePattern: '^_',
|
||||
varsIgnorePattern: '^_',
|
||||
},
|
||||
],
|
||||
'vue/multi-word-component-names': [
|
||||
'error',
|
||||
{
|
||||
ignores: ['Traffic'],
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
+26
-4
@@ -1,6 +1,28 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
.DS_Store
|
||||
node_modules/
|
||||
dist/
|
||||
npm-debug.log
|
||||
dist
|
||||
dist-ssr
|
||||
coverage
|
||||
*.local
|
||||
|
||||
/cypress/videos/
|
||||
/cypress/screenshots/
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.vscode/settings.json
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"tabWidth": 2,
|
||||
"semi": false,
|
||||
"singleQuote": true
|
||||
}
|
||||
+8
-2
@@ -1,7 +1,13 @@
|
||||
.PHONY: dist build
|
||||
.PHONY: dist build preview lint
|
||||
|
||||
build:
|
||||
@npm run build
|
||||
|
||||
dev: install
|
||||
dev:
|
||||
@npm run dev
|
||||
|
||||
preview:
|
||||
@npm run preview
|
||||
|
||||
lint:
|
||||
@npm run lint
|
||||
@@ -0,0 +1,46 @@
|
||||
# frps-dashboard
|
||||
|
||||
This template should help get you started developing with Vue 3 in Vite.
|
||||
|
||||
## Recommended IDE Setup
|
||||
|
||||
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
||||
|
||||
## Type Support for `.vue` Imports in TS
|
||||
|
||||
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
||||
|
||||
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
||||
|
||||
1. Disable the built-in TypeScript Extension
|
||||
1) Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
||||
2) Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
||||
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
||||
|
||||
## Customize configuration
|
||||
|
||||
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
||||
|
||||
## Project Setup
|
||||
|
||||
```sh
|
||||
npm install
|
||||
```
|
||||
|
||||
### Compile and Hot-Reload for Development
|
||||
|
||||
```sh
|
||||
npm run dev
|
||||
```
|
||||
|
||||
### Type-Check, Compile and Minify for Production
|
||||
|
||||
```sh
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Lint with [ESLint](https://eslint.org/)
|
||||
|
||||
```sh
|
||||
npm run lint
|
||||
```
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
// Generated by 'unplugin-auto-import'
|
||||
export {}
|
||||
declare global {
|
||||
|
||||
}
|
||||
Vendored
+35
@@ -0,0 +1,35 @@
|
||||
// generated by unplugin-vue-components
|
||||
// We suggest you to commit this file into source control
|
||||
// Read more: https://github.com/vuejs/core/pull/3399
|
||||
import '@vue/runtime-core'
|
||||
|
||||
export {}
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
export interface GlobalComponents {
|
||||
ElButton: typeof import('element-plus/es')['ElButton']
|
||||
ElCol: typeof import('element-plus/es')['ElCol']
|
||||
ElForm: typeof import('element-plus/es')['ElForm']
|
||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||
ElMenu: typeof import('element-plus/es')['ElMenu']
|
||||
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
|
||||
ElPopover: typeof import('element-plus/es')['ElPopover']
|
||||
ElRow: typeof import('element-plus/es')['ElRow']
|
||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||
ElTable: typeof import('element-plus/es')['ElTable']
|
||||
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
|
||||
ElTag: typeof import('element-plus/es')['ElTag']
|
||||
ProxiesHTTP: typeof import('./src/components/ProxiesHTTP.vue')['default']
|
||||
ProxiesHTTPS: typeof import('./src/components/ProxiesHTTPS.vue')['default']
|
||||
ProxiesSTCP: typeof import('./src/components/ProxiesSTCP.vue')['default']
|
||||
ProxiesSUDP: typeof import('./src/components/ProxiesSUDP.vue')['default']
|
||||
ProxiesTCP: typeof import('./src/components/ProxiesTCP.vue')['default']
|
||||
ProxiesUDP: typeof import('./src/components/ProxiesUDP.vue')['default']
|
||||
ProxyView: typeof import('./src/components/ProxyView.vue')['default']
|
||||
ProxyViewExpand: typeof import('./src/components/ProxyViewExpand.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
ServerOverview: typeof import('./src/components/ServerOverview.vue')['default']
|
||||
Traffic: typeof import('./src/components/Traffic.vue')['default']
|
||||
}
|
||||
}
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>frps dashboard</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.ts"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+27
-37
@@ -1,48 +1,38 @@
|
||||
{
|
||||
"name": "frps-dashboard",
|
||||
"description": "A dashboard for frp server.",
|
||||
"author": "fatedier",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "webpack-dev-server -d --inline --hot --env.dev",
|
||||
"build": "rimraf dist && webpack -p --progress --hide-modules"
|
||||
"dev": "vite",
|
||||
"build": "run-p type-check build-only",
|
||||
"preview": "vite preview",
|
||||
"build-only": "vite build",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
|
||||
},
|
||||
"dependencies": {
|
||||
"bootstrap": "^3.3.7",
|
||||
"echarts": "^3.5.0",
|
||||
"element-ui": "^2.3.8",
|
||||
"@types/humanize-plus": "^1.8.0",
|
||||
"echarts": "^5.4.1",
|
||||
"element-plus": "^2.2.28",
|
||||
"humanize-plus": "^1.8.2",
|
||||
"vue": "^2.5.16",
|
||||
"vue-resource": "^1.2.1",
|
||||
"vue-router": "^2.3.0",
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
"vue": "^3.2.45",
|
||||
"vue-router": "^4.1.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.6.0",
|
||||
"babel-core": "^6.21.0",
|
||||
"babel-eslint": "^7.1.1",
|
||||
"babel-loader": "^6.4.0",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"babel-preset-es2015": "^6.13.2",
|
||||
"css-loader": "^0.27.0",
|
||||
"eslint": "^3.12.2",
|
||||
"eslint-config-enough": "^0.2.2",
|
||||
"eslint-loader": "^1.6.3",
|
||||
"file-loader": "^0.10.1",
|
||||
"html-loader": "^0.4.5",
|
||||
"html-webpack-plugin": "^2.24.1",
|
||||
"less": "^3.0.4",
|
||||
"less-loader": "^4.1.0",
|
||||
"postcss-loader": "^1.3.3",
|
||||
"rimraf": "^2.5.4",
|
||||
"style-loader": "^0.13.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"vue-loader": "^15.0.10",
|
||||
"vue-template-compiler": "^2.1.8",
|
||||
"webpack": "^2.2.0-rc.4",
|
||||
"webpack-dev-server": "^3.1.4"
|
||||
"@rushstack/eslint-patch": "^1.1.4",
|
||||
"@types/node": "^18.11.12",
|
||||
"@vitejs/plugin-vue": "^4.0.0",
|
||||
"@vue/eslint-config-prettier": "^7.0.0",
|
||||
"@vue/eslint-config-typescript": "^11.0.0",
|
||||
"@vue/tsconfig": "^0.1.3",
|
||||
"eslint": "^8.22.0",
|
||||
"eslint-plugin-vue": "^9.3.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "~4.7.4",
|
||||
"unplugin-auto-import": "^0.13.0",
|
||||
"unplugin-vue-components": "^0.23.0",
|
||||
"vite": "^4.0.4",
|
||||
"vue-tsc": "^1.0.12"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
require('autoprefixer')()
|
||||
]
|
||||
}
|
||||
File renamed without changes.
+77
-73
@@ -1,81 +1,85 @@
|
||||
<template>
|
||||
<div id="app">
|
||||
<header class="grid-content header-color">
|
||||
<el-row>
|
||||
<a class="brand" href="#">frp</a>
|
||||
</el-row>
|
||||
</header>
|
||||
<section>
|
||||
<el-row>
|
||||
<el-col id="side-nav" :xs="24" :md="4">
|
||||
<el-menu default-active="1" mode="vertical" theme="light" router="false" @select="handleSelect">
|
||||
<el-menu-item index="/">Overview</el-menu-item>
|
||||
<el-submenu index="/proxies">
|
||||
<template slot="title">Proxies</template>
|
||||
<el-menu-item index="/proxies/tcp">TCP</el-menu-item>
|
||||
<el-menu-item index="/proxies/udp">UDP</el-menu-item>
|
||||
<el-menu-item index="/proxies/http">HTTP</el-menu-item>
|
||||
<el-menu-item index="/proxies/https">HTTPS</el-menu-item>
|
||||
<el-menu-item index="/proxies/stcp">STCP</el-menu-item>
|
||||
<el-menu-item index="/proxies/sudp">SUDP</el-menu-item>
|
||||
</el-submenu>
|
||||
<el-menu-item index="">Help</el-menu-item>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
<div id="app">
|
||||
<header class="grid-content header-color">
|
||||
<el-row>
|
||||
<a class="brand" href="#">frp</a>
|
||||
</el-row>
|
||||
</header>
|
||||
<section>
|
||||
<el-row>
|
||||
<el-col id="side-nav" :xs="24" :md="4">
|
||||
<el-menu
|
||||
default-active="/"
|
||||
mode="vertical"
|
||||
theme="light"
|
||||
router="false"
|
||||
@select="handleSelect"
|
||||
>
|
||||
<el-menu-item index="/">Overview</el-menu-item>
|
||||
<el-sub-menu index="/proxies">
|
||||
<template #title>
|
||||
<span>Proxies</span>
|
||||
</template>
|
||||
<el-menu-item index="/proxies/tcp">TCP</el-menu-item>
|
||||
<el-menu-item index="/proxies/udp">UDP</el-menu-item>
|
||||
<el-menu-item index="/proxies/http">HTTP</el-menu-item>
|
||||
<el-menu-item index="/proxies/https">HTTPS</el-menu-item>
|
||||
<el-menu-item index="/proxies/stcp">STCP</el-menu-item>
|
||||
<el-menu-item index="/proxies/sudp">SUDP</el-menu-item>
|
||||
</el-sub-menu>
|
||||
<el-menu-item index="">Help</el-menu-item>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
||||
<el-col :xs="24" :md="20">
|
||||
<div id="content">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</section>
|
||||
<footer></footer>
|
||||
</div>
|
||||
<el-col :xs="24" :md="20">
|
||||
<div id="content">
|
||||
<router-view></router-view>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</section>
|
||||
<footer></footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
handleSelect(key, path) {
|
||||
if (key == '') {
|
||||
window.open("https://github.com/fatedier/frp")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
<script setup lang="ts">
|
||||
const handleSelect = (key: string) => {
|
||||
if (key == '') {
|
||||
window.open('https://github.com/fatedier/frp')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
body {
|
||||
background-color: #fafafa;
|
||||
margin: 0px;
|
||||
font-family: -apple-system,BlinkMacSystemFont,Helvetica Neue,sans-serif;
|
||||
}
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.header-color {
|
||||
background: #58B7FF;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-top: 20px;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.brand {
|
||||
color: #fff;
|
||||
background-color: transparent;
|
||||
margin-left: 20px;
|
||||
float: left;
|
||||
line-height: 25px;
|
||||
font-size: 25px;
|
||||
padding: 15px 15px;
|
||||
height: 30px;
|
||||
text-decoration: none;
|
||||
}
|
||||
body {
|
||||
background-color: #fafafa;
|
||||
margin: 0px;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, sans-serif;
|
||||
}
|
||||
|
||||
header {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.header-color {
|
||||
background: #58b7ff;
|
||||
}
|
||||
|
||||
#content {
|
||||
margin-top: 20px;
|
||||
padding-right: 40px;
|
||||
}
|
||||
|
||||
.brand {
|
||||
color: #fff;
|
||||
background-color: transparent;
|
||||
margin-left: 20px;
|
||||
float: left;
|
||||
line-height: 25px;
|
||||
font-size: 25px;
|
||||
padding: 15px 15px;
|
||||
height: 30px;
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,22 @@
|
||||
.el-form-item span {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.proxy-table-expand {
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.proxy-table-expand .el-form-item__label{
|
||||
width: 90px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
|
||||
.proxy-table-expand .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.el-table .el-table__expanded-cell {
|
||||
padding: 20px 50px;
|
||||
}
|
||||
@@ -1,169 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :md="12">
|
||||
<div class="source">
|
||||
<el-form label-position="left" class="server_info">
|
||||
<el-form-item label="Version">
|
||||
<span>{{ version }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="BindPort">
|
||||
<span>{{ bind_port }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="BindUdpPort">
|
||||
<span>{{ bind_udp_port }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Http Port">
|
||||
<span>{{ vhost_http_port }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Https Port">
|
||||
<span>{{ vhost_https_port }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Subdomain Host">
|
||||
<span>{{ subdomain_host }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Max PoolCount">
|
||||
<span>{{ max_pool_count }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Max Ports Per Client">
|
||||
<span>{{ max_ports_per_client }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="HeartBeat Timeout">
|
||||
<span>{{ heart_beat_timeout }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Client Counts">
|
||||
<span>{{ client_counts }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Current Connections">
|
||||
<span>{{ cur_conns }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Proxy Counts">
|
||||
<span>{{ proxy_counts }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :md="12">
|
||||
<div id="traffic" style="width: 400px;height:250px;margin-bottom: 30px;"></div>
|
||||
<div id="proxies" style="width: 400px;height:250px;"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {DrawTrafficChart, DrawProxyChart} from '../utils/chart.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
version: '',
|
||||
bind_port: '',
|
||||
bind_udp_port: '',
|
||||
vhost_http_port: '',
|
||||
vhost_https_port: '',
|
||||
subdomain_host: '',
|
||||
max_pool_count: '',
|
||||
max_ports_per_client: '',
|
||||
heart_beat_timeout: '',
|
||||
client_counts: '',
|
||||
cur_conns: '',
|
||||
proxy_counts: ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
'$route': 'fetchData'
|
||||
},
|
||||
methods: {
|
||||
fetchData() {
|
||||
fetch('../api/serverinfo', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.version = json.version
|
||||
this.bind_port = json.bind_port
|
||||
this.bind_udp_port = json.bind_udp_port
|
||||
if (this.bind_udp_port == 0) {
|
||||
this.bind_udp_port = "disable"
|
||||
}
|
||||
this.vhost_http_port = json.vhost_http_port
|
||||
if (this.vhost_http_port == 0) {
|
||||
this.vhost_http_port = "disable"
|
||||
}
|
||||
this.vhost_https_port = json.vhost_https_port
|
||||
if (this.vhost_https_port == 0) {
|
||||
this.vhost_https_port = "disable"
|
||||
}
|
||||
this.subdomain_host = json.subdomain_host
|
||||
this.max_pool_count = json.max_pool_count
|
||||
this.max_ports_per_client = json.max_ports_per_client
|
||||
if (this.max_ports_per_client == 0) {
|
||||
this.max_ports_per_client = "no limit"
|
||||
}
|
||||
this.heart_beat_timeout = json.heart_beat_timeout
|
||||
this.client_counts = json.client_counts
|
||||
this.cur_conns = json.cur_conns
|
||||
this.proxy_counts = 0
|
||||
if (json.proxy_type_count != null) {
|
||||
if (json.proxy_type_count.tcp != null) {
|
||||
this.proxy_counts += json.proxy_type_count.tcp
|
||||
}
|
||||
if (json.proxy_type_count.udp != null) {
|
||||
this.proxy_counts += json.proxy_type_count.udp
|
||||
}
|
||||
if (json.proxy_type_count.http != null) {
|
||||
this.proxy_counts += json.proxy_type_count.http
|
||||
}
|
||||
if (json.proxy_type_count.https != null) {
|
||||
this.proxy_counts += json.proxy_type_count.https
|
||||
}
|
||||
if (json.proxy_type_count.stcp != null) {
|
||||
this.proxy_counts += json.proxy_type_count.stcp
|
||||
}
|
||||
if (json.proxy_type_count.sudp != null) {
|
||||
this.proxy_counts += json.proxy_type_count.sudp
|
||||
}
|
||||
if (json.proxy_type_count.xtcp != null) {
|
||||
this.proxy_counts += json.proxy_type_count.xtcp
|
||||
}
|
||||
}
|
||||
DrawTrafficChart('traffic', json.total_traffic_in, json.total_traffic_out)
|
||||
DrawProxyChart('proxies', json)
|
||||
}).catch( err => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Get server info from frps failed!',
|
||||
type: 'warning'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.source {
|
||||
border: 1px solid #eaeefb;
|
||||
border-radius: 4px;
|
||||
transition: .2s;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.server_info {
|
||||
margin-left: 40px;
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
.server_info label {
|
||||
width: 150px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
|
||||
.server_info .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,148 +1,41 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="proxies" :default-sort="{prop: 'name', order: 'ascending'}" style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-popover
|
||||
ref="popover4"
|
||||
placement="right"
|
||||
width="600"
|
||||
style="margin-left:0px"
|
||||
trigger="click">
|
||||
<my-traffic-chart :proxy_name="props.row.name"></my-traffic-chart>
|
||||
</el-popover>
|
||||
|
||||
<el-button v-popover:popover4 type="primary" size="small" icon="view" style="margin-bottom:10px">Traffic Statistics</el-button>
|
||||
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="Name">
|
||||
<span>{{ props.row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Type">
|
||||
<span>{{ props.row.type }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Domains">
|
||||
<span>{{ props.row.custom_domains }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="SubDomain">
|
||||
<span>{{ props.row.subdomain }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="locations">
|
||||
<span>{{ props.row.locations }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="HostRewrite">
|
||||
<span>{{ props.row.host_header_rewrite }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Encryption">
|
||||
<span>{{ props.row.encryption }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Compression">
|
||||
<span>{{ props.row.compression }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Start">
|
||||
<span>{{ props.row.last_start_time }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Close">
|
||||
<span>{{ props.row.last_close_time }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Name"
|
||||
prop="name"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Port"
|
||||
prop="port"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Connections"
|
||||
prop="conns"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic In"
|
||||
prop="traffic_in"
|
||||
:formatter="formatTrafficIn"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic Out"
|
||||
prop="traffic_out"
|
||||
:formatter="formatTrafficOut"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="status"
|
||||
prop="status"
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.status === 'online'">{{ scope.row.status }}</el-tag>
|
||||
<el-tag type="danger" v-else>{{ scope.row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<ProxyView :proxies="proxies" proxyType="http" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Humanize from 'humanize-plus';
|
||||
import Traffic from './Traffic.vue'
|
||||
import {
|
||||
HttpProxy
|
||||
} from '../utils/proxy.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
proxies: new Array(),
|
||||
vhost_http_port: "",
|
||||
subdomain_host: ""
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { HTTPProxy } from '../utils/proxy.js'
|
||||
import ProxyView from './ProxyView.vue'
|
||||
|
||||
let proxies = ref<HTTPProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
let vhost_http_port: number
|
||||
let subdomain_host: string
|
||||
fetch('../api/serverinfo', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
vhost_http_port = json.vhost_http_port
|
||||
subdomain_host = json.subdomain_host
|
||||
if (vhost_http_port == null || vhost_http_port == 0) {
|
||||
return
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
'$route': 'fetchData'
|
||||
},
|
||||
methods: {
|
||||
formatTrafficIn(row, column) {
|
||||
return Humanize.fileSize(row.traffic_in)
|
||||
},
|
||||
formatTrafficOut(row, column) {
|
||||
return Humanize.fileSize(row.traffic_out)
|
||||
},
|
||||
fetchData() {
|
||||
fetch('../api/serverinfo', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.vhost_http_port = json.vhost_http_port
|
||||
this.subdomain_host = json.subdomain_host
|
||||
if (this.vhost_http_port == null || this.vhost_http_port == 0) {
|
||||
return
|
||||
} else {
|
||||
fetch('../api/proxy/http', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.proxies = new Array()
|
||||
for (let proxyStats of json.proxies) {
|
||||
this.proxies.push(new HttpProxy(proxyStats, this.vhost_http_port, this.subdomain_host))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'my-traffic-chart': Traffic
|
||||
}
|
||||
}
|
||||
fetch('../api/proxy/http', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(
|
||||
new HTTPProxy(proxyStats, vhost_http_port, subdomain_host)
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
@@ -1,143 +1,41 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="proxies" :default-sort="{prop: 'name', order: 'ascending'}" style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-popover
|
||||
ref="popover4"
|
||||
placement="right"
|
||||
width="600"
|
||||
style="margin-left:0px"
|
||||
trigger="click">
|
||||
<my-traffic-chart :proxy_name="props.row.name"></my-traffic-chart>
|
||||
</el-popover>
|
||||
|
||||
<el-button v-popover:popover4 type="primary" size="small" icon="view" style="margin-bottom:10px">Traffic Statistics</el-button>
|
||||
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="Name">
|
||||
<span>{{ props.row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Type">
|
||||
<span>{{ props.row.type }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Domains">
|
||||
<span>{{ props.row.custom_domains }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="SubDomain">
|
||||
<span>{{ props.row.subdomain }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Encryption">
|
||||
<span>{{ props.row.encryption }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Compression">
|
||||
<span>{{ props.row.compression }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Start">
|
||||
<span>{{ props.row.last_start_time }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Close">
|
||||
<span>{{ props.row.last_close_time }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Name"
|
||||
prop="name"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Port"
|
||||
prop="port"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Connections"
|
||||
prop="conns"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic In"
|
||||
prop="traffic_in"
|
||||
:formatter="formatTrafficIn"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic Out"
|
||||
prop="traffic_out"
|
||||
:formatter="formatTrafficOut"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="status"
|
||||
prop="status"
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.status === 'online'">{{ scope.row.status }}</el-tag>
|
||||
<el-tag type="danger" v-else>{{ scope.row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
<ProxyView :proxies="proxies" proxyType="https" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Humanize from 'humanize-plus';
|
||||
import Traffic from './Traffic.vue'
|
||||
import {
|
||||
HttpsProxy
|
||||
} from '../utils/proxy.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
proxies: new Array(),
|
||||
vhost_https_port: '',
|
||||
subdomain_host: ''
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { HTTPSProxy } from '../utils/proxy.js'
|
||||
import ProxyView from './ProxyView.vue'
|
||||
|
||||
let proxies = ref<HTTPSProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
let vhost_https_port: number
|
||||
let subdomain_host: string
|
||||
fetch('../api/serverinfo', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
vhost_https_port = json.vhost_https_port
|
||||
subdomain_host = json.subdomain_host
|
||||
if (vhost_https_port == null || vhost_https_port == 0) {
|
||||
return
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
'$route': 'fetchData'
|
||||
},
|
||||
methods: {
|
||||
formatTrafficIn(row, column) {
|
||||
return Humanize.fileSize(row.traffic_in)
|
||||
},
|
||||
formatTrafficOut(row, column) {
|
||||
return Humanize.fileSize(row.traffic_out)
|
||||
},
|
||||
fetchData() {
|
||||
fetch('../api/serverinfo', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.vhost_https_port = json.vhost_https_port
|
||||
this.subdomain_host = json.subdomain_host
|
||||
if (this.vhost_https_port == null || this.vhost_https_port == 0) {
|
||||
return
|
||||
} else {
|
||||
fetch('../api/proxy/https', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.proxies = new Array()
|
||||
for (let proxyStats of json.proxies) {
|
||||
this.proxies.push(new HttpsProxy(proxyStats, this.vhost_https_port, this.subdomain_host))
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'my-traffic-chart': Traffic
|
||||
}
|
||||
}
|
||||
fetch('../api/proxy/https', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(
|
||||
new HTTPSProxy(proxyStats, vhost_https_port, subdomain_host)
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
@@ -1,116 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="proxies" :default-sort="{prop: 'name', order: 'ascending'}" style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-popover
|
||||
ref="popover4"
|
||||
placement="right"
|
||||
width="600"
|
||||
style="margin-left:0px"
|
||||
trigger="click">
|
||||
<my-traffic-chart :proxy_name="props.row.name"></my-traffic-chart>
|
||||
</el-popover>
|
||||
|
||||
<el-button v-popover:popover4 type="primary" size="small" icon="view" :name="props.row.name" style="margin-bottom:10px" @click="fetchData2">Traffic Statistics</el-button>
|
||||
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="Name">
|
||||
<span>{{ props.row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Type">
|
||||
<span>{{ props.row.type }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Encryption">
|
||||
<span>{{ props.row.encryption }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Compression">
|
||||
<span>{{ props.row.compression }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Start">
|
||||
<span>{{ props.row.last_start_time }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Close">
|
||||
<span>{{ props.row.last_close_time }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Name"
|
||||
prop="name"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Connections"
|
||||
prop="conns"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic In"
|
||||
prop="traffic_in"
|
||||
:formatter="formatTrafficIn"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic Out"
|
||||
prop="traffic_out"
|
||||
:formatter="formatTrafficOut"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="status"
|
||||
prop="status"
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.status === 'online'">{{ scope.row.status }}</el-tag>
|
||||
<el-tag type="danger" v-else>{{ scope.row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<ProxyView :proxies="proxies" proxyType="stcp" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Humanize from 'humanize-plus'
|
||||
import Traffic from './Traffic.vue'
|
||||
import { StcpProxy } from '../utils/proxy.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
proxies: new Array(),
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { STCPProxy } from '../utils/proxy.js'
|
||||
import ProxyView from './ProxyView.vue'
|
||||
|
||||
let proxies = ref<STCPProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
fetch('../api/proxy/stcp', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(new STCPProxy(proxyStats))
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
'$route': 'fetchData'
|
||||
},
|
||||
methods: {
|
||||
formatTrafficIn(row, column) {
|
||||
return Humanize.fileSize(row.traffic_in)
|
||||
},
|
||||
formatTrafficOut(row, column) {
|
||||
return Humanize.fileSize(row.traffic_out)
|
||||
},
|
||||
fetchData() {
|
||||
fetch('../api/proxy/stcp', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.proxies = new Array()
|
||||
for (let proxyStats of json.proxies) {
|
||||
this.proxies.push(new StcpProxy(proxyStats))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'my-traffic-chart': Traffic
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
@@ -1,116 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="proxies" :default-sort="{prop: 'name', order: 'ascending'}" style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-popover
|
||||
ref="popover4"
|
||||
placement="right"
|
||||
width="600"
|
||||
style="margin-left:0px"
|
||||
trigger="click">
|
||||
<my-traffic-chart :proxy_name="props.row.name"></my-traffic-chart>
|
||||
</el-popover>
|
||||
|
||||
<el-button v-popover:popover4 type="primary" size="small" icon="view" :name="props.row.name" style="margin-bottom:10px" @click="fetchData2">Traffic Statistics</el-button>
|
||||
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="Name">
|
||||
<span>{{ props.row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Type">
|
||||
<span>{{ props.row.type }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Encryption">
|
||||
<span>{{ props.row.encryption }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Compression">
|
||||
<span>{{ props.row.compression }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Start">
|
||||
<span>{{ props.row.last_start_time }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Close">
|
||||
<span>{{ props.row.last_close_time }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Name"
|
||||
prop="name"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Connections"
|
||||
prop="conns"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic In"
|
||||
prop="traffic_in"
|
||||
:formatter="formatTrafficIn"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic Out"
|
||||
prop="traffic_out"
|
||||
:formatter="formatTrafficOut"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="status"
|
||||
prop="status"
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.status === 'online'">{{ scope.row.status }}</el-tag>
|
||||
<el-tag type="danger" v-else>{{ scope.row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<ProxyView :proxies="proxies" proxyType="sudp" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Humanize from 'humanize-plus'
|
||||
import Traffic from './Traffic.vue'
|
||||
import { SudpProxy } from '../utils/proxy.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
proxies: new Array(),
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { SUDPProxy } from '../utils/proxy.js'
|
||||
import ProxyView from './ProxyView.vue'
|
||||
|
||||
let proxies = ref<SUDPProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
fetch('../api/proxy/sudp', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(new SUDPProxy(proxyStats))
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
'$route': 'fetchData'
|
||||
},
|
||||
methods: {
|
||||
formatTrafficIn(row, column) {
|
||||
return Humanize.fileSize(row.traffic_in)
|
||||
},
|
||||
formatTrafficOut(row, column) {
|
||||
return Humanize.fileSize(row.traffic_out)
|
||||
},
|
||||
fetchData() {
|
||||
fetch('../api/proxy/sudp', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.proxies = new Array()
|
||||
for (let proxyStats of json.proxies) {
|
||||
this.proxies.push(new SudpProxy(proxyStats))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'my-traffic-chart': Traffic
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
@@ -1,124 +1,26 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="proxies" :default-sort="{prop: 'name', order: 'ascending'}" style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-popover
|
||||
ref="popover4"
|
||||
placement="right"
|
||||
width="600"
|
||||
style="margin-left:0px"
|
||||
trigger="click">
|
||||
<my-traffic-chart :proxy_name="props.row.name"></my-traffic-chart>
|
||||
</el-popover>
|
||||
|
||||
<el-button v-popover:popover4 type="primary" size="small" icon="view" :name="props.row.name" style="margin-bottom:10px" @click="fetchData2">Traffic Statistics</el-button>
|
||||
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="Name">
|
||||
<span>{{ props.row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Type">
|
||||
<span>{{ props.row.type }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Addr">
|
||||
<span>{{ props.row.addr }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Encryption">
|
||||
<span>{{ props.row.encryption }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Compression">
|
||||
<span>{{ props.row.compression }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Start">
|
||||
<span>{{ props.row.last_start_time }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Close">
|
||||
<span>{{ props.row.last_close_time }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Name"
|
||||
prop="name"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Port"
|
||||
prop="port"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Connections"
|
||||
prop="conns"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic In"
|
||||
prop="traffic_in"
|
||||
:formatter="formatTrafficIn"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic Out"
|
||||
prop="traffic_out"
|
||||
:formatter="formatTrafficOut"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="status"
|
||||
prop="status"
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.status === 'online'">{{ scope.row.status }}</el-tag>
|
||||
<el-tag type="danger" v-else>{{ scope.row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<ProxyView :proxies="proxies" proxyType="tcp" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Humanize from 'humanize-plus'
|
||||
import Traffic from './Traffic.vue'
|
||||
import { TcpProxy } from '../utils/proxy.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
proxies: new Array(),
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { TCPProxy } from '../utils/proxy.js'
|
||||
import ProxyView from './ProxyView.vue'
|
||||
|
||||
let proxies = ref<TCPProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
fetch('../api/proxy/tcp', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(new TCPProxy(proxyStats))
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
'$route': 'fetchData'
|
||||
},
|
||||
methods: {
|
||||
formatTrafficIn(row, column) {
|
||||
return Humanize.fileSize(row.traffic_in)
|
||||
},
|
||||
formatTrafficOut(row, column) {
|
||||
return Humanize.fileSize(row.traffic_out)
|
||||
},
|
||||
fetchData() {
|
||||
fetch('../api/proxy/tcp', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.proxies = new Array()
|
||||
for (let proxyStats of json.proxies) {
|
||||
this.proxies.push(new TcpProxy(proxyStats))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'my-traffic-chart': Traffic
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
@@ -1,126 +1,27 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table :data="proxies" :default-sort="{prop: 'name', order: 'ascending'}" style="width: 100%">
|
||||
<el-table-column type="expand">
|
||||
<template slot-scope="props">
|
||||
<el-popover
|
||||
ref="popover4"
|
||||
placement="right"
|
||||
width="600"
|
||||
style="margin-left:0px"
|
||||
trigger="click">
|
||||
<my-traffic-chart :proxy_name="props.row.name"></my-traffic-chart>
|
||||
</el-popover>
|
||||
|
||||
<el-button v-popover:popover4 type="primary" size="small" icon="view" style="margin-bottom:10px">Traffic Statistics</el-button>
|
||||
|
||||
<el-form label-position="left" inline class="demo-table-expand">
|
||||
<el-form-item label="Name">
|
||||
<span>{{ props.row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Type">
|
||||
<span>{{ props.row.type }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Addr">
|
||||
<span>{{ props.row.addr }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Encryption">
|
||||
<span>{{ props.row.encryption }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Compression">
|
||||
<span>{{ props.row.compression }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Start">
|
||||
<span>{{ props.row.last_start_time }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Close">
|
||||
<span>{{ props.row.last_close_time }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Name"
|
||||
prop="name"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Port"
|
||||
prop="port"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Connections"
|
||||
prop="conns"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic In"
|
||||
prop="traffic_in"
|
||||
:formatter="formatTrafficIn"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic Out"
|
||||
prop="traffic_out"
|
||||
:formatter="formatTrafficOut"
|
||||
sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="status"
|
||||
prop="status"
|
||||
sortable>
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.status === 'online'">{{ scope.row.status }}</el-tag>
|
||||
<el-tag type="danger" v-else>{{ scope.row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<ProxyView :proxies="proxies" proxyType="udp" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Humanize from 'humanize-plus';
|
||||
import Traffic from './Traffic.vue'
|
||||
import {
|
||||
UdpProxy
|
||||
} from '../utils/proxy.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
proxies: new Array(),
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { UDPProxy } from '../utils/proxy.js'
|
||||
import ProxyView from './ProxyView.vue'
|
||||
|
||||
let proxies = ref<UDPProxy[]>([])
|
||||
|
||||
const fetchData = () => {
|
||||
fetch('../api/proxy/udp', { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
for (let proxyStats of json.proxies) {
|
||||
proxies.value.push(new UDPProxy(proxyStats))
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
watch: {
|
||||
'$route': 'fetchData'
|
||||
},
|
||||
methods: {
|
||||
formatTrafficIn(row, column) {
|
||||
return Humanize.fileSize(row.traffic_in)
|
||||
},
|
||||
formatTrafficOut(row, column) {
|
||||
return Humanize.fileSize(row.traffic_out)
|
||||
},
|
||||
fetchData() {
|
||||
fetch('../api/proxy/udp', {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
this.proxies = new Array()
|
||||
for (let proxyStats of json.proxies) {
|
||||
this.proxies.push(new UdpProxy(proxyStats))
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
components: {
|
||||
'my-traffic-chart': Traffic
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
<style></style>
|
||||
@@ -0,0 +1,91 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
:data="proxies"
|
||||
:default-sort="{ prop: 'name', order: 'ascending' }"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="expand">
|
||||
<template #default="props">
|
||||
<el-popover
|
||||
ref="popoverTraffic"
|
||||
:virtual-ref="buttonTraffic"
|
||||
placement="right"
|
||||
width="600"
|
||||
style="margin-left: 0px"
|
||||
trigger="click"
|
||||
virtual-triggering
|
||||
>
|
||||
<Traffic :proxy_name="props.row.name" />
|
||||
</el-popover>
|
||||
|
||||
<el-button
|
||||
ref="buttonTraffic"
|
||||
type="primary"
|
||||
size="large"
|
||||
:name="props.row.name"
|
||||
style="margin-bottom: 10px"
|
||||
v-click-outside="onClickTrafficStats"
|
||||
>Traffic Statistics
|
||||
</el-button>
|
||||
|
||||
<ProxyViewExpand :row="props.row" :proxyType="proxyType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Name" prop="name" sortable> </el-table-column>
|
||||
<el-table-column label="Port" prop="port" sortable> </el-table-column>
|
||||
<el-table-column label="Connections" prop="conns" sortable>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic In"
|
||||
prop="traffic_in"
|
||||
:formatter="formatTrafficIn"
|
||||
sortable
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="Traffic Out"
|
||||
prop="traffic_out"
|
||||
:formatter="formatTrafficOut"
|
||||
sortable
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="status" prop="status" sortable>
|
||||
<template #default="scope">
|
||||
<el-tag v-if="scope.row.status === 'online'" type="success">{{
|
||||
scope.row.status
|
||||
}}</el-tag>
|
||||
<el-tag v-else type="danger">{{ scope.row.status }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, unref } from 'vue'
|
||||
import * as Humanize from 'humanize-plus'
|
||||
import type { TableColumnCtx } from 'element-plus'
|
||||
import type { BaseProxy } from '../utils/proxy.js'
|
||||
import ProxyViewExpand from './ProxyViewExpand.vue'
|
||||
|
||||
defineProps<{
|
||||
proxies: BaseProxy[]
|
||||
proxyType: string
|
||||
}>()
|
||||
|
||||
const formatTrafficIn = (row: BaseProxy, _: TableColumnCtx<BaseProxy>) => {
|
||||
return Humanize.fileSize(row.traffic_in)
|
||||
}
|
||||
|
||||
const formatTrafficOut = (row: BaseProxy, _: TableColumnCtx<BaseProxy>) => {
|
||||
return Humanize.fileSize(row.traffic_out)
|
||||
}
|
||||
|
||||
const buttonTraffic = ref()
|
||||
const popoverTraffic = ref()
|
||||
|
||||
const onClickTrafficStats = () => {
|
||||
unref(popoverTraffic).popoverTraffic?.delayHide?.()
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,70 @@
|
||||
<template>
|
||||
<el-form
|
||||
label-position="left"
|
||||
inline
|
||||
class="proxy-table-expand"
|
||||
v-if="proxyType === 'http' || proxyType === 'https'"
|
||||
>
|
||||
<el-form-item label="Name">
|
||||
<span>{{ row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Type">
|
||||
<span>{{ row.type }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Domains">
|
||||
<span>{{ row.custom_domains }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="SubDomain">
|
||||
<span>{{ row.subdomain }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="locations">
|
||||
<span>{{ row.locations }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="HostRewrite">
|
||||
<span>{{ row.host_header_rewrite }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Encryption">
|
||||
<span>{{ row.encryption }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Compression">
|
||||
<span>{{ row.compression }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Start">
|
||||
<span>{{ row.last_start_time }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Close">
|
||||
<span>{{ row.last_close_time }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-form label-position="left" inline class="proxy-table-expand" v-else>
|
||||
<el-form-item label="Name">
|
||||
<span>{{ row.name }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Type">
|
||||
<span>{{ row.type }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Addr">
|
||||
<span>{{ row.addr }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Encryption">
|
||||
<span>{{ row.encryption }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Compression">
|
||||
<span>{{ row.compression }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Start">
|
||||
<span>{{ row.last_start_time }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Last Close">
|
||||
<span>{{ row.last_close_time }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{
|
||||
row: any
|
||||
proxyType: string
|
||||
}>()
|
||||
</script>
|
||||
@@ -0,0 +1,177 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :md="12">
|
||||
<div class="source">
|
||||
<el-form
|
||||
label-position="left"
|
||||
label-width="160px"
|
||||
class="server_info"
|
||||
>
|
||||
<el-form-item label="Version">
|
||||
<span>{{ data.version }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="BindPort">
|
||||
<span>{{ data.bind_port }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="BindUdpPort">
|
||||
<span>{{ data.bind_udp_port }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Http Port">
|
||||
<span>{{ data.vhost_http_port }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Https Port">
|
||||
<span>{{ data.vhost_https_port }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Subdomain Host">
|
||||
<span>{{ data.subdomain_host }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Max PoolCount">
|
||||
<span>{{ data.max_pool_count }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Max Ports Per Client">
|
||||
<span>{{ data.max_ports_per_client }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="HeartBeat Timeout">
|
||||
<span>{{ data.heart_beat_timeout }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Client Counts">
|
||||
<span>{{ data.client_counts }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Current Connections">
|
||||
<span>{{ data.cur_conns }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="Proxy Counts">
|
||||
<span>{{ data.proxy_counts }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :md="12">
|
||||
<div
|
||||
id="traffic"
|
||||
style="width: 400px; height: 250px; margin-bottom: 30px"
|
||||
></div>
|
||||
<div id="proxies" style="width: 400px; height: 250px"></div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { DrawTrafficChart, DrawProxyChart } from '../utils/chart'
|
||||
|
||||
let data = ref({
|
||||
version: '',
|
||||
bind_port: '',
|
||||
bind_udp_port: '',
|
||||
vhost_http_port: '',
|
||||
vhost_https_port: '',
|
||||
subdomain_host: '',
|
||||
max_pool_count: '',
|
||||
max_ports_per_client: '',
|
||||
heart_beat_timeout: '',
|
||||
client_counts: '',
|
||||
cur_conns: '',
|
||||
proxy_counts: 0,
|
||||
})
|
||||
|
||||
const fetchData = () => {
|
||||
fetch('../api/serverinfo', { credentials: 'include' })
|
||||
.then((res) => res.json())
|
||||
.then((json) => {
|
||||
data.value.version = json.version
|
||||
data.value.bind_port = json.bind_port
|
||||
data.value.bind_udp_port = json.bind_udp_port
|
||||
if (data.value.bind_udp_port == '0') {
|
||||
data.value.bind_udp_port = 'disable'
|
||||
}
|
||||
data.value.vhost_http_port = json.vhost_http_port
|
||||
if (data.value.vhost_http_port == '0') {
|
||||
data.value.vhost_http_port = 'disable'
|
||||
}
|
||||
data.value.vhost_https_port = json.vhost_https_port
|
||||
if (data.value.vhost_https_port == '0') {
|
||||
data.value.vhost_https_port = 'disable'
|
||||
}
|
||||
data.value.subdomain_host = json.subdomain_host
|
||||
data.value.max_pool_count = json.max_pool_count
|
||||
data.value.max_ports_per_client = json.max_ports_per_client
|
||||
if (data.value.max_ports_per_client == '0') {
|
||||
data.value.max_ports_per_client = 'no limit'
|
||||
}
|
||||
data.value.heart_beat_timeout = json.heart_beat_timeout
|
||||
data.value.client_counts = json.client_counts
|
||||
data.value.cur_conns = json.cur_conns
|
||||
data.value.proxy_counts = 0
|
||||
if (json.proxy_type_count != null) {
|
||||
if (json.proxy_type_count.tcp != null) {
|
||||
data.value.proxy_counts += json.proxy_type_count.tcp
|
||||
}
|
||||
if (json.proxy_type_count.udp != null) {
|
||||
data.value.proxy_counts += json.proxy_type_count.udp
|
||||
}
|
||||
if (json.proxy_type_count.http != null) {
|
||||
data.value.proxy_counts += json.proxy_type_count.http
|
||||
}
|
||||
if (json.proxy_type_count.https != null) {
|
||||
data.value.proxy_counts += json.proxy_type_count.https
|
||||
}
|
||||
if (json.proxy_type_count.stcp != null) {
|
||||
data.value.proxy_counts += json.proxy_type_count.stcp
|
||||
}
|
||||
if (json.proxy_type_count.sudp != null) {
|
||||
data.value.proxy_counts += json.proxy_type_count.sudp
|
||||
}
|
||||
if (json.proxy_type_count.xtcp != null) {
|
||||
data.value.proxy_counts += json.proxy_type_count.xtcp
|
||||
}
|
||||
}
|
||||
|
||||
// draw chart
|
||||
DrawTrafficChart('traffic', json.total_traffic_in, json.total_traffic_out)
|
||||
DrawProxyChart('proxies', json)
|
||||
})
|
||||
.catch(() => {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: 'Get server info from frps failed!',
|
||||
type: 'warning',
|
||||
})
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.source {
|
||||
border: 1px solid #eaeefb;
|
||||
border-radius: 4px;
|
||||
transition: 0.2s;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.server_info {
|
||||
margin-left: 40px;
|
||||
font-size: 0px;
|
||||
}
|
||||
|
||||
.server_info .el-form-item__label {
|
||||
color: #99a9bf;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.server_info .el-form-item__content {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.server_info .el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
@@ -1,36 +1,32 @@
|
||||
<template>
|
||||
<div :id="proxy_name" style="width: 600px;height:400px;"></div>
|
||||
<div :id="proxy_name" style="width: 600px; height: 400px"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {DrawProxyTrafficChart} from '../utils/chart.js'
|
||||
export default {
|
||||
props: ['proxy_name'],
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
//watch: {
|
||||
//'$route': 'fetchData'
|
||||
//},
|
||||
methods: {
|
||||
fetchData() {
|
||||
let url = '../api/traffic/' + this.proxy_name
|
||||
fetch(url, {credentials: 'include'})
|
||||
.then(res => {
|
||||
return res.json()
|
||||
}).then(json => {
|
||||
DrawProxyTrafficChart(this.proxy_name, json.traffic_in, json.traffic_out)
|
||||
}).catch( err => {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: 'Get server info from frps failed!' + err,
|
||||
type: 'warning'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script setup lang="ts">
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { DrawProxyTrafficChart } from '../utils/chart.js'
|
||||
|
||||
<style>
|
||||
</style>
|
||||
const props = defineProps<{
|
||||
proxy_name: string
|
||||
}>()
|
||||
|
||||
const fetchData = () => {
|
||||
let url = '../api/traffic/' + props.proxy_name
|
||||
fetch(url, { credentials: 'include' })
|
||||
.then((res) => {
|
||||
return res.json()
|
||||
})
|
||||
.then((json) => {
|
||||
DrawProxyTrafficChart(props.proxy_name, json.traffic_in, json.traffic_out)
|
||||
})
|
||||
.catch((err) => {
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: 'Get traffic info failed!' + err,
|
||||
type: 'warning',
|
||||
})
|
||||
})
|
||||
}
|
||||
fetchData()
|
||||
</script>
|
||||
<style></style>
|
||||
@@ -1,15 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>frps dashboard</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!--<script src="https://code.jquery.com/jquery-3.2.0.min.js"></script>-->
|
||||
<!--<script src="//cdn.bootcss.com/echarts/3.4.0/echarts.min.js"></script>-->
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,48 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
//import ElementUI from 'element-ui'
|
||||
import {
|
||||
Button,
|
||||
Form,
|
||||
FormItem,
|
||||
Row,
|
||||
Col,
|
||||
Table,
|
||||
TableColumn,
|
||||
Popover,
|
||||
Menu,
|
||||
Submenu,
|
||||
MenuItem,
|
||||
Tag
|
||||
} from 'element-ui'
|
||||
import lang from 'element-ui/lib/locale/lang/en'
|
||||
import locale from 'element-ui/lib/locale'
|
||||
import 'element-ui/lib/theme-chalk/index.css'
|
||||
import './utils/less/custom.less'
|
||||
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import 'whatwg-fetch'
|
||||
|
||||
locale.use(lang)
|
||||
|
||||
Vue.use(Button)
|
||||
Vue.use(Form)
|
||||
Vue.use(FormItem)
|
||||
Vue.use(Row)
|
||||
Vue.use(Col)
|
||||
Vue.use(Table)
|
||||
Vue.use(TableColumn)
|
||||
Vue.use(Popover)
|
||||
Vue.use(Menu)
|
||||
Vue.use(Submenu)
|
||||
Vue.use(MenuItem)
|
||||
Vue.use(Tag)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
template: '<App/>',
|
||||
components: { App }
|
||||
})
|
||||
@@ -0,0 +1,12 @@
|
||||
import { createApp } from 'vue'
|
||||
import 'element-plus/dist/index.css'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
|
||||
import './assets/custom.css'
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
app.use(router)
|
||||
|
||||
app.mount('#app')
|
||||
@@ -1,43 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import Overview from '../components/Overview.vue'
|
||||
import ProxiesTcp from '../components/ProxiesTcp.vue'
|
||||
import ProxiesUdp from '../components/ProxiesUdp.vue'
|
||||
import ProxiesHttp from '../components/ProxiesHttp.vue'
|
||||
import ProxiesHttps from '../components/ProxiesHttps.vue'
|
||||
import ProxiesStcp from '../components/ProxiesStcp.vue'
|
||||
import ProxiesSudp from '../components/ProxiesSudp.vue'
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
routes: [{
|
||||
path: '/',
|
||||
name: 'Overview',
|
||||
component: Overview
|
||||
}, {
|
||||
path: '/proxies/tcp',
|
||||
name: 'ProxiesTcp',
|
||||
component: ProxiesTcp
|
||||
}, {
|
||||
path: '/proxies/udp',
|
||||
name: 'ProxiesUdp',
|
||||
component: ProxiesUdp
|
||||
}, {
|
||||
path: '/proxies/http',
|
||||
name: 'ProxiesHttp',
|
||||
component: ProxiesHttp
|
||||
}, {
|
||||
path: '/proxies/https',
|
||||
name: 'ProxiesHttps',
|
||||
component: ProxiesHttps
|
||||
}, {
|
||||
path: '/proxies/stcp',
|
||||
name: 'ProxiesStcp',
|
||||
component: ProxiesStcp
|
||||
}, {
|
||||
path: '/proxies/sudp',
|
||||
name: 'ProxiesSudp',
|
||||
component: ProxiesSudp
|
||||
}]
|
||||
})
|
||||
@@ -0,0 +1,51 @@
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import ServerOverview from '../components/ServerOverview.vue'
|
||||
import ProxiesTCP from '../components/ProxiesTCP.vue'
|
||||
import ProxiesUDP from '../components/ProxiesUDP.vue'
|
||||
import ProxiesHTTP from '../components/ProxiesHTTP.vue'
|
||||
import ProxiesHTTPS from '../components/ProxiesHTTPS.vue'
|
||||
import ProxiesSTCP from '../components/ProxiesSTCP.vue'
|
||||
import ProxiesSUDP from '../components/ProxiesSUDP.vue'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: [
|
||||
{
|
||||
path: '/',
|
||||
name: 'ServerOverview',
|
||||
component: ServerOverview,
|
||||
},
|
||||
{
|
||||
path: '/proxies/tcp',
|
||||
name: 'ProxiesTCP',
|
||||
component: ProxiesTCP,
|
||||
},
|
||||
{
|
||||
path: '/proxies/udp',
|
||||
name: 'ProxiesUDP',
|
||||
component: ProxiesUDP,
|
||||
},
|
||||
{
|
||||
path: '/proxies/http',
|
||||
name: 'ProxiesHTTP',
|
||||
component: ProxiesHTTP,
|
||||
},
|
||||
{
|
||||
path: '/proxies/https',
|
||||
name: 'ProxiesHTTPS',
|
||||
component: ProxiesHTTPS,
|
||||
},
|
||||
{
|
||||
path: '/proxies/stcp',
|
||||
name: 'ProxiesSTCP',
|
||||
component: ProxiesSTCP,
|
||||
},
|
||||
{
|
||||
path: '/proxies/sudp',
|
||||
name: 'ProxiesSUDP',
|
||||
component: ProxiesSUDP,
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
export default router
|
||||
@@ -1,186 +0,0 @@
|
||||
import Humanize from "humanize-plus"
|
||||
import echarts from "echarts/lib/echarts"
|
||||
|
||||
import "echarts/theme/macarons"
|
||||
import "echarts/lib/chart/bar"
|
||||
import "echarts/lib/chart/pie"
|
||||
import "echarts/lib/component/tooltip"
|
||||
import "echarts/lib/component/title"
|
||||
|
||||
function DrawTrafficChart(elementId, trafficIn, trafficOut) {
|
||||
let myChart = echarts.init(document.getElementById(elementId), 'macarons');
|
||||
myChart.showLoading()
|
||||
|
||||
let option = {
|
||||
title: {
|
||||
text: 'Network Traffic',
|
||||
subtext: 'today',
|
||||
x: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: function(v) {
|
||||
return Humanize.fileSize(v.data.value) + " (" + v.percent + "%)"
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
type: 'pie',
|
||||
radius: '55%',
|
||||
center: ['50%', '60%'],
|
||||
data: [{
|
||||
value: trafficIn,
|
||||
name: 'Traffic In'
|
||||
}, {
|
||||
value: trafficOut,
|
||||
name: 'Traffic Out'
|
||||
}, ],
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
myChart.hideLoading()
|
||||
}
|
||||
|
||||
function DrawProxyChart(elementId, serverInfo) {
|
||||
let myChart = echarts.init(document.getElementById(elementId), 'macarons')
|
||||
myChart.showLoading()
|
||||
|
||||
let option = {
|
||||
title: {
|
||||
text: 'Proxies',
|
||||
subtext: 'now',
|
||||
x: 'center'
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: function(v) {
|
||||
return v.data.value
|
||||
}
|
||||
},
|
||||
series: [{
|
||||
type: 'pie',
|
||||
radius: '55%',
|
||||
center: ['50%', '60%'],
|
||||
data: [],
|
||||
itemStyle: {
|
||||
emphasis: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)'
|
||||
}
|
||||
}
|
||||
}]
|
||||
};
|
||||
|
||||
if (serverInfo.proxy_type_count.tcp != null && serverInfo.proxy_type_count.tcp != 0) {
|
||||
option.series[0].data.push({value: serverInfo.proxy_type_count.tcp, name: 'TCP'})
|
||||
}
|
||||
if (serverInfo.proxy_type_count.udp != null && serverInfo.proxy_type_count.udp != 0) {
|
||||
option.series[0].data.push({value: serverInfo.proxy_type_count.udp, name: 'UDP'})
|
||||
}
|
||||
if (serverInfo.proxy_type_count.http != null && serverInfo.proxy_type_count.http != 0) {
|
||||
option.series[0].data.push({value: serverInfo.proxy_type_count.http, name: 'HTTP'})
|
||||
}
|
||||
if (serverInfo.proxy_type_count.https != null && serverInfo.proxy_type_count.https != 0) {
|
||||
option.series[0].data.push({value: serverInfo.proxy_type_count.https, name: 'HTTPS'})
|
||||
}
|
||||
if (serverInfo.proxy_type_count.stcp != null && serverInfo.proxy_type_count.stcp != 0) {
|
||||
option.series[0].data.push({value: serverInfo.proxy_type_count.stcp, name: 'STCP'})
|
||||
}
|
||||
if (serverInfo.proxy_type_count.sudp != null && serverInfo.proxy_type_count.sudp != 0) {
|
||||
option.series[0].data.push({value: serverInfo.proxy_type_count.sudp, name: 'SUDP'})
|
||||
}
|
||||
if (serverInfo.proxy_type_count.xtcp != null && serverInfo.proxy_type_count.xtcp != 0) {
|
||||
option.series[0].data.push({value: serverInfo.proxy_type_count.xtcp, name: 'XTCP'})
|
||||
}
|
||||
|
||||
myChart.setOption(option);
|
||||
myChart.hideLoading()
|
||||
}
|
||||
|
||||
// 7 days
|
||||
function DrawProxyTrafficChart(elementId, trafficInArr, trafficOutArr) {
|
||||
let params = {
|
||||
width: '600px',
|
||||
height: '400px'
|
||||
}
|
||||
|
||||
let myChart = echarts.init(document.getElementById(elementId), 'macarons', params);
|
||||
myChart.showLoading()
|
||||
|
||||
trafficInArr = trafficInArr.reverse()
|
||||
trafficOutArr = trafficOutArr.reverse()
|
||||
let now = new Date()
|
||||
now = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 6)
|
||||
let dates = new Array()
|
||||
for (let i = 0; i < 7; i++) {
|
||||
dates.push(now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate())
|
||||
now = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1)
|
||||
}
|
||||
|
||||
let option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow'
|
||||
},
|
||||
formatter: function(data) {
|
||||
let html = ''
|
||||
if (data.length > 0) {
|
||||
html += data[0].name + '<br/>'
|
||||
}
|
||||
for (let v of data) {
|
||||
let colorEl = '<span style="display:inline-block;margin-right:5px;' +
|
||||
'border-radius:10px;width:9px;height:9px;background-color:' + v.color + '"></span>';
|
||||
html += colorEl + v.seriesName + ': ' + Humanize.fileSize(v.value) + '<br/>'
|
||||
}
|
||||
return html
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: ['Traffic In', 'Traffic Out']
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
data: dates
|
||||
}],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
formatter: function(value) {
|
||||
return Humanize.fileSize(value)
|
||||
}
|
||||
}
|
||||
}],
|
||||
series: [{
|
||||
name: 'Traffic In',
|
||||
type: 'bar',
|
||||
data: trafficInArr
|
||||
}, {
|
||||
|
||||
name: 'Traffic Out',
|
||||
type: 'bar',
|
||||
data: trafficOutArr
|
||||
}]
|
||||
};
|
||||
myChart.setOption(option);
|
||||
myChart.hideLoading()
|
||||
}
|
||||
|
||||
export {
|
||||
DrawTrafficChart,
|
||||
DrawProxyChart,
|
||||
DrawProxyTrafficChart
|
||||
}
|
||||
@@ -0,0 +1,293 @@
|
||||
import * as Humanize from 'humanize-plus'
|
||||
import * as echarts from 'echarts/core'
|
||||
import { PieChart, BarChart } from 'echarts/charts'
|
||||
import { CanvasRenderer } from 'echarts/renderers'
|
||||
import { LabelLayout } from 'echarts/features'
|
||||
|
||||
import {
|
||||
TitleComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent,
|
||||
GridComponent,
|
||||
} from 'echarts/components'
|
||||
|
||||
echarts.use([
|
||||
PieChart,
|
||||
BarChart,
|
||||
CanvasRenderer,
|
||||
LabelLayout,
|
||||
TitleComponent,
|
||||
TooltipComponent,
|
||||
LegendComponent,
|
||||
GridComponent,
|
||||
])
|
||||
|
||||
function DrawTrafficChart(
|
||||
elementId: string,
|
||||
trafficIn: number,
|
||||
trafficOut: number
|
||||
) {
|
||||
const myChart = echarts.init(
|
||||
document.getElementById(elementId) as HTMLElement,
|
||||
'macarons'
|
||||
)
|
||||
myChart.showLoading()
|
||||
|
||||
const option = {
|
||||
title: {
|
||||
text: 'Network Traffic',
|
||||
subtext: 'today',
|
||||
left: 'center',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: function (v: any) {
|
||||
return Humanize.fileSize(v.data.value) + ' (' + v.percent + '%)'
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
data: ['Traffic In', 'Traffic Out'],
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: '55%',
|
||||
center: ['50%', '60%'],
|
||||
data: [
|
||||
{
|
||||
value: trafficIn,
|
||||
name: 'Traffic In',
|
||||
},
|
||||
{
|
||||
value: trafficOut,
|
||||
name: 'Traffic Out',
|
||||
},
|
||||
],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
myChart.setOption(option)
|
||||
myChart.hideLoading()
|
||||
}
|
||||
|
||||
function DrawProxyChart(elementId: string, serverInfo: any) {
|
||||
const myChart = echarts.init(
|
||||
document.getElementById(elementId) as HTMLElement,
|
||||
'macarons'
|
||||
)
|
||||
myChart.showLoading()
|
||||
|
||||
const option = {
|
||||
title: {
|
||||
text: 'Proxies',
|
||||
subtext: 'now',
|
||||
left: 'center',
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
formatter: function (v: any) {
|
||||
return String(v.data.value)
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
orient: 'vertical',
|
||||
left: 'left',
|
||||
data: <string[]>[],
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: '55%',
|
||||
center: ['50%', '60%'],
|
||||
data: <any[]>[],
|
||||
emphasis: {
|
||||
itemStyle: {
|
||||
shadowBlur: 10,
|
||||
shadowOffsetX: 0,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.5)',
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
if (
|
||||
serverInfo.proxy_type_count.tcp != null &&
|
||||
serverInfo.proxy_type_count.tcp != 0
|
||||
) {
|
||||
option.series[0].data.push({
|
||||
value: serverInfo.proxy_type_count.tcp,
|
||||
name: 'TCP',
|
||||
})
|
||||
option.legend.data.push('TCP')
|
||||
}
|
||||
if (
|
||||
serverInfo.proxy_type_count.udp != null &&
|
||||
serverInfo.proxy_type_count.udp != 0
|
||||
) {
|
||||
option.series[0].data.push({
|
||||
value: serverInfo.proxy_type_count.udp,
|
||||
name: 'UDP',
|
||||
})
|
||||
option.legend.data.push('UDP')
|
||||
}
|
||||
if (
|
||||
serverInfo.proxy_type_count.http != null &&
|
||||
serverInfo.proxy_type_count.http != 0
|
||||
) {
|
||||
option.series[0].data.push({
|
||||
value: serverInfo.proxy_type_count.http,
|
||||
name: 'HTTP',
|
||||
})
|
||||
option.legend.data.push('HTTP')
|
||||
}
|
||||
if (
|
||||
serverInfo.proxy_type_count.https != null &&
|
||||
serverInfo.proxy_type_count.https != 0
|
||||
) {
|
||||
option.series[0].data.push({
|
||||
value: serverInfo.proxy_type_count.https,
|
||||
name: 'HTTPS',
|
||||
})
|
||||
option.legend.data.push('HTTPS')
|
||||
}
|
||||
if (
|
||||
serverInfo.proxy_type_count.stcp != null &&
|
||||
serverInfo.proxy_type_count.stcp != 0
|
||||
) {
|
||||
option.series[0].data.push({
|
||||
value: serverInfo.proxy_type_count.stcp,
|
||||
name: 'STCP',
|
||||
})
|
||||
option.legend.data.push('STCP')
|
||||
}
|
||||
if (
|
||||
serverInfo.proxy_type_count.sudp != null &&
|
||||
serverInfo.proxy_type_count.sudp != 0
|
||||
) {
|
||||
option.series[0].data.push({
|
||||
value: serverInfo.proxy_type_count.sudp,
|
||||
name: 'SUDP',
|
||||
})
|
||||
option.legend.data.push('SUDP')
|
||||
}
|
||||
if (
|
||||
serverInfo.proxy_type_count.xtcp != null &&
|
||||
serverInfo.proxy_type_count.xtcp != 0
|
||||
) {
|
||||
option.series[0].data.push({
|
||||
value: serverInfo.proxy_type_count.xtcp,
|
||||
name: 'XTCP',
|
||||
})
|
||||
option.legend.data.push('XTCP')
|
||||
}
|
||||
|
||||
myChart.setOption(option)
|
||||
myChart.hideLoading()
|
||||
}
|
||||
|
||||
// 7 days
|
||||
function DrawProxyTrafficChart(
|
||||
elementId: string,
|
||||
trafficInArr: number[],
|
||||
trafficOutArr: number[]
|
||||
) {
|
||||
const params = {
|
||||
width: '600px',
|
||||
height: '400px',
|
||||
}
|
||||
|
||||
const myChart = echarts.init(
|
||||
document.getElementById(elementId) as HTMLElement,
|
||||
'macarons',
|
||||
params
|
||||
)
|
||||
myChart.showLoading()
|
||||
|
||||
trafficInArr = trafficInArr.reverse()
|
||||
trafficOutArr = trafficOutArr.reverse()
|
||||
let now = new Date()
|
||||
now = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 6)
|
||||
const dates: Array<string> = []
|
||||
for (let i = 0; i < 7; i++) {
|
||||
dates.push(
|
||||
now.getFullYear() + '-' + (now.getMonth() + 1) + '-' + now.getDate()
|
||||
)
|
||||
now = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1)
|
||||
}
|
||||
|
||||
const option = {
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
},
|
||||
formatter: function (data: any) {
|
||||
let html = ''
|
||||
if (data.length > 0) {
|
||||
html += data[0].name + '<br/>'
|
||||
}
|
||||
for (const v of data) {
|
||||
const colorEl =
|
||||
'<span style="display:inline-block;margin-right:5px;' +
|
||||
'border-radius:10px;width:9px;height:9px;background-color:' +
|
||||
v.color +
|
||||
'"></span>'
|
||||
html +=
|
||||
colorEl + v.seriesName + ': ' + Humanize.fileSize(v.value) + '<br/>'
|
||||
}
|
||||
return html
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
data: ['Traffic In', 'Traffic Out'],
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true,
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
data: dates,
|
||||
},
|
||||
],
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
formatter: function (value: number) {
|
||||
return Humanize.fileSize(value)
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'Traffic In',
|
||||
type: 'bar',
|
||||
data: trafficInArr,
|
||||
},
|
||||
{
|
||||
name: 'Traffic Out',
|
||||
type: 'bar',
|
||||
data: trafficOutArr,
|
||||
},
|
||||
],
|
||||
}
|
||||
myChart.setOption(option)
|
||||
myChart.hideLoading()
|
||||
}
|
||||
|
||||
export { DrawTrafficChart, DrawProxyChart, DrawProxyTrafficChart }
|
||||
@@ -1,22 +0,0 @@
|
||||
@color: red;
|
||||
|
||||
.el-form-item {
|
||||
span {
|
||||
margin-left: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.demo-table-expand {
|
||||
font-size: 0;
|
||||
|
||||
label {
|
||||
width: 90px;
|
||||
color: #99a9bf;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-right: 0;
|
||||
margin-bottom: 0;
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
class BaseProxy {
|
||||
constructor(proxyStats) {
|
||||
this.name = proxyStats.name
|
||||
if (proxyStats.conf != null) {
|
||||
this.encryption = proxyStats.conf.use_encryption
|
||||
this.compression = proxyStats.conf.use_compression
|
||||
} else {
|
||||
this.encryption = ""
|
||||
this.compression = ""
|
||||
}
|
||||
this.conns = proxyStats.cur_conns
|
||||
this.traffic_in = proxyStats.today_traffic_in
|
||||
this.traffic_out = proxyStats.today_traffic_out
|
||||
this.last_start_time = proxyStats.last_start_time
|
||||
this.last_close_time = proxyStats.last_close_time
|
||||
this.status = proxyStats.status
|
||||
}
|
||||
}
|
||||
|
||||
class TcpProxy extends BaseProxy {
|
||||
constructor(proxyStats) {
|
||||
super(proxyStats)
|
||||
this.type = "tcp"
|
||||
if (proxyStats.conf != null) {
|
||||
this.addr = ":" + proxyStats.conf.remote_port
|
||||
this.port = proxyStats.conf.remote_port
|
||||
} else {
|
||||
this.addr = ""
|
||||
this.port = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class UdpProxy extends BaseProxy {
|
||||
constructor(proxyStats) {
|
||||
super(proxyStats)
|
||||
this.type = "udp"
|
||||
if (proxyStats.conf != null) {
|
||||
this.addr = ":" + proxyStats.conf.remote_port
|
||||
this.port = proxyStats.conf.remote_port
|
||||
} else {
|
||||
this.addr = ""
|
||||
this.port = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class HttpProxy extends BaseProxy {
|
||||
constructor(proxyStats, port, subdomain_host) {
|
||||
super(proxyStats)
|
||||
this.type = "http"
|
||||
this.port = port
|
||||
if (proxyStats.conf != null) {
|
||||
this.custom_domains = proxyStats.conf.custom_domains
|
||||
this.host_header_rewrite = proxyStats.conf.host_header_rewrite
|
||||
this.locations = proxyStats.conf.locations
|
||||
if (proxyStats.conf.subdomain != "") {
|
||||
this.subdomain = proxyStats.conf.subdomain + "." + subdomain_host
|
||||
} else {
|
||||
this.subdomain = ""
|
||||
}
|
||||
} else {
|
||||
this.custom_domains = ""
|
||||
this.host_header_rewrite = ""
|
||||
this.subdomain = ""
|
||||
this.locations = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class HttpsProxy extends BaseProxy {
|
||||
constructor(proxyStats, port, subdomain_host) {
|
||||
super(proxyStats)
|
||||
this.type = "https"
|
||||
this.port = port
|
||||
if (proxyStats.conf != null) {
|
||||
this.custom_domains = proxyStats.conf.custom_domains
|
||||
if (proxyStats.conf.subdomain != "") {
|
||||
this.subdomain = proxyStats.conf.subdomain + "." + subdomain_host
|
||||
} else {
|
||||
this.subdomain = ""
|
||||
}
|
||||
} else {
|
||||
this.custom_domains = ""
|
||||
this.subdomain = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class StcpProxy extends BaseProxy {
|
||||
constructor(proxyStats) {
|
||||
super(proxyStats)
|
||||
this.type = "stcp"
|
||||
}
|
||||
}
|
||||
|
||||
class SudpProxy extends BaseProxy {
|
||||
constructor(proxyStats) {
|
||||
super(proxyStats)
|
||||
this.type = "sudp"
|
||||
}
|
||||
}
|
||||
|
||||
export {BaseProxy, TcpProxy, UdpProxy, HttpProxy, HttpsProxy, StcpProxy, SudpProxy}
|
||||
@@ -0,0 +1,138 @@
|
||||
class BaseProxy {
|
||||
name: string
|
||||
type: string
|
||||
encryption: boolean
|
||||
compression: boolean
|
||||
conns: number
|
||||
traffic_in: number
|
||||
traffic_out: number
|
||||
last_start_time: string
|
||||
last_close_time: string
|
||||
status: string
|
||||
addr: string
|
||||
port: number
|
||||
|
||||
custom_domains: string
|
||||
host_header_rewrite: string
|
||||
locations: string
|
||||
subdomain: string
|
||||
|
||||
constructor(proxyStats: any) {
|
||||
this.name = proxyStats.name
|
||||
this.type = ''
|
||||
if (proxyStats.conf != null) {
|
||||
this.encryption = proxyStats.conf.use_encryption
|
||||
this.compression = proxyStats.conf.use_compression
|
||||
} else {
|
||||
this.encryption = false
|
||||
this.compression = false
|
||||
}
|
||||
this.conns = proxyStats.cur_conns
|
||||
this.traffic_in = proxyStats.today_traffic_in
|
||||
this.traffic_out = proxyStats.today_traffic_out
|
||||
this.last_start_time = proxyStats.last_start_time
|
||||
this.last_close_time = proxyStats.last_close_time
|
||||
this.status = proxyStats.status
|
||||
|
||||
this.addr = ''
|
||||
this.port = 0
|
||||
this.custom_domains = ''
|
||||
this.host_header_rewrite = ''
|
||||
this.locations = ''
|
||||
this.subdomain = ''
|
||||
}
|
||||
}
|
||||
|
||||
class TCPProxy extends BaseProxy {
|
||||
constructor(proxyStats: any) {
|
||||
super(proxyStats)
|
||||
this.type = 'tcp'
|
||||
if (proxyStats.conf != null) {
|
||||
this.addr = ':' + proxyStats.conf.remote_port
|
||||
this.port = proxyStats.conf.remote_port
|
||||
} else {
|
||||
this.addr = ''
|
||||
this.port = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class UDPProxy extends BaseProxy {
|
||||
constructor(proxyStats: any) {
|
||||
super(proxyStats)
|
||||
this.type = 'udp'
|
||||
if (proxyStats.conf != null) {
|
||||
this.addr = ':' + proxyStats.conf.remote_port
|
||||
this.port = proxyStats.conf.remote_port
|
||||
} else {
|
||||
this.addr = ''
|
||||
this.port = 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class HTTPProxy extends BaseProxy {
|
||||
constructor(proxyStats: any, port: number, subdomain_host: string) {
|
||||
super(proxyStats)
|
||||
this.type = 'http'
|
||||
this.port = port
|
||||
if (proxyStats.conf != null) {
|
||||
this.custom_domains = proxyStats.conf.custom_domains
|
||||
this.host_header_rewrite = proxyStats.conf.host_header_rewrite
|
||||
this.locations = proxyStats.conf.locations
|
||||
if (proxyStats.conf.subdomain != '') {
|
||||
this.subdomain = proxyStats.conf.subdomain + '.' + subdomain_host
|
||||
} else {
|
||||
this.subdomain = ''
|
||||
}
|
||||
} else {
|
||||
this.custom_domains = ''
|
||||
this.host_header_rewrite = ''
|
||||
this.subdomain = ''
|
||||
this.locations = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class HTTPSProxy extends BaseProxy {
|
||||
constructor(proxyStats: any, port: number, subdomain_host: string) {
|
||||
super(proxyStats)
|
||||
this.type = 'https'
|
||||
this.port = port
|
||||
if (proxyStats.conf != null) {
|
||||
this.custom_domains = proxyStats.conf.custom_domains
|
||||
if (proxyStats.conf.subdomain != '') {
|
||||
this.subdomain = proxyStats.conf.subdomain + '.' + subdomain_host
|
||||
} else {
|
||||
this.subdomain = ''
|
||||
}
|
||||
} else {
|
||||
this.custom_domains = ''
|
||||
this.subdomain = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class STCPProxy extends BaseProxy {
|
||||
constructor(proxyStats: any) {
|
||||
super(proxyStats)
|
||||
this.type = 'stcp'
|
||||
}
|
||||
}
|
||||
|
||||
class SUDPProxy extends BaseProxy {
|
||||
constructor(proxyStats: any) {
|
||||
super(proxyStats)
|
||||
this.type = 'sudp'
|
||||
}
|
||||
}
|
||||
|
||||
export {
|
||||
BaseProxy,
|
||||
TCPProxy,
|
||||
UDPProxy,
|
||||
HTTPProxy,
|
||||
HTTPSProxy,
|
||||
STCPProxy,
|
||||
SUDPProxy,
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.node.json",
|
||||
"include": ["vite.config.*", "vitest.config.*", "cypress.config.*", "playwright.config.*"],
|
||||
"compilerOptions": {
|
||||
"composite": true,
|
||||
"types": ["node"]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "@vue/tsconfig/tsconfig.web.json",
|
||||
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
},
|
||||
|
||||
"references": [
|
||||
{
|
||||
"path": "./tsconfig.config.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import AutoImport from 'unplugin-auto-import/vite'
|
||||
import Components from 'unplugin-vue-components/vite'
|
||||
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
base: '',
|
||||
plugins: [
|
||||
vue(),
|
||||
AutoImport({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
}),
|
||||
Components({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
}),
|
||||
],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
build: {
|
||||
assetsDir: '',
|
||||
},
|
||||
})
|
||||
@@ -1,107 +0,0 @@
|
||||
const path = require('path')
|
||||
var webpack = require('webpack')
|
||||
var HtmlWebpackPlugin = require('html-webpack-plugin')
|
||||
var VueLoaderPlugin = require('vue-loader/lib/plugin')
|
||||
var url = require('url')
|
||||
var publicPath = ''
|
||||
|
||||
module.exports = (options = {}) => ({
|
||||
entry: {
|
||||
vendor: './src/main'
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: options.dev ? '[name].js' : '[name].js?[chunkhash]',
|
||||
chunkFilename: '[id].js?[chunkhash]',
|
||||
publicPath: options.dev ? '/assets/' : publicPath
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.vue', '.json'],
|
||||
alias: {
|
||||
'vue$': 'vue/dist/vue.esm.js',
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.vue$/,
|
||||
loader: 'vue-loader'
|
||||
}, {
|
||||
test: /\.js$/,
|
||||
use: ['babel-loader'],
|
||||
exclude: /node_modules/
|
||||
}, {
|
||||
test: /\.html$/,
|
||||
use: [{
|
||||
loader: 'html-loader',
|
||||
options: {
|
||||
root: path.resolve(__dirname, 'src'),
|
||||
attrs: ['img:src', 'link:href']
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
test: /\.less$/,
|
||||
loader: 'style-loader!css-loader!postcss-loader!less-loader'
|
||||
}, {
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader', 'postcss-loader']
|
||||
}, {
|
||||
test: /favicon\.png$/,
|
||||
use: [{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]?[hash]'
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
test: /\.(png|jpg|jpeg|gif|eot|ttf|woff|woff2|svg|svgz)(\?.+)?$/,
|
||||
exclude: /favicon\.png$/,
|
||||
use: [{
|
||||
loader: 'url-loader',
|
||||
options: {
|
||||
limit: 10000
|
||||
}
|
||||
}]
|
||||
}]
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.CommonsChunkPlugin({
|
||||
names: ['vendor', 'manifest']
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
favicon: 'src/assets/favicon.ico',
|
||||
template: 'src/index.html'
|
||||
}),
|
||||
new webpack.NormalModuleReplacementPlugin(/element-ui[\/\\]lib[\/\\]locale[\/\\]lang[\/\\]zh-CN/, 'element-ui/lib/locale/lang/en'),
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: '"production"'
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
sourceMap: false,
|
||||
comments: false,
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
}),
|
||||
new VueLoaderPlugin()
|
||||
],
|
||||
devServer: {
|
||||
host: '127.0.0.1',
|
||||
port: 8010,
|
||||
proxy: {
|
||||
'/api/': {
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': ''
|
||||
}
|
||||
}
|
||||
},
|
||||
historyApiFallback: {
|
||||
index: url.parse(options.dev ? '/assets/' : publicPath).pathname
|
||||
}
|
||||
}//,
|
||||
//devtool: options.dev ? '#eval-source-map' : '#source-map'
|
||||
})
|
||||
+2474
-5708
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user