Backup and Restore: packages, Local/S3/SFTP/FTP destinations, UI and API
Encrypted packages (databases, PKI, client profiles) with safe restore and a pre-restore safety copy, usable for server-to-server migration across container and system-service installs. New Management page, ovp_backups volume, migrations code in the profiler image, server name in package names. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d29c261347
commit
f8cdcd0fc6
55 files changed
+4401
-37
No files matched your search
@@ -55,14 +55,15 @@ RUN rm -f /etc/nginx/http.d/default.conf \
|
||||
COPY deploy/allinone/supervisord.conf /etc/supervisord.conf
|
||||
COPY deploy/allinone/entrypoint.sh /usr/local/bin/ovpmon-entrypoint.sh
|
||||
|
||||
# Mount points of the five named volumes
|
||||
# Mount points of the five data volumes and of the backup packages volume (ovp_backups)
|
||||
RUN chmod +x /usr/local/bin/ovpmon-entrypoint.sh \
|
||||
&& mkdir -p /app/db /app/easy-rsa /app/client-config /etc/openvpn /var/log/openvpn
|
||||
&& mkdir -p /app/db /app/easy-rsa /app/client-config /app/backups /etc/openvpn /var/log/openvpn
|
||||
|
||||
# Default database locations (the compose file sets the same values)
|
||||
ENV OVPMON_PROFILER_DB_PATH=/app/db/ovpn_profiler.db \
|
||||
OVPMON_OPENVPN_MONITOR_DB_PATH=/app/db/openvpn_monitor.db \
|
||||
OVPMON_OPENVPN_MONITOR_LOG_PATH=/var/log/openvpn/openvpn-status.log
|
||||
OVPMON_OPENVPN_MONITOR_LOG_PATH=/var/log/openvpn/openvpn-status.log \
|
||||
OVPMON_BACKUP_LOCAL_ROOT=/app/backups
|
||||
|
||||
EXPOSE 80
|
||||
EXPOSE 1194/udp
|
||||
|
||||
@@ -1 +1 @@
|
||||
39d777d3a2df602f7ce737dd7fe333c29695557053b85cba7f3b3d8c367ec20b
|
||||
796072800fd2abd0a674c02ef1c626b796e587b263818d13f1159561c7a7d724
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{G as $,H as N,r as S,I as ae,o as ne,F as ue,a as j,c as x,d,A as V,g as z,J as K,x as Q,t as de,w as B,q as U,m as q,C as ee,j as ce,k}from"./index-DQu6UtRL.js";import{S as O}from"./vendor-ui-jlFFG6nm.js";import{a as te,_ as re}from"./ConfirmModal-likdDJzi.js";import"./vendor-charts-Bcjh2pZL.js";var T=function(){return T=Object.assign||function(c){for(var f,u=1,h=arguments.length;u<h;u++){f=arguments[u];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(c[m]=f[m])}return c},T.apply(this,arguments)};var D;(function(s){var c=(function(){function a(e,t,r,n){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<a.MIN_VERSION||e>a.MAX_VERSION)throw new RangeError("Version value out of range");if(n<-1||n>7)throw new RangeError("Mask value out of range");this.size=e*4+17;for(var o=[],i=0;i<this.size;i++)o.push(!1);for(var i=0;i<this.size;i++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();var v=this.addEccAndInterleave(r);if(this.drawCodewords(v),n==-1)for(var p=1e9,i=0;i<8;i++){this.applyMask(i),this.drawFormatBits(i);var M=this.getPenaltyScore();M<p&&(n=i,p=M),this.applyMask(i)}h(0<=n&&n<=7),this.mask=n,this.applyMask(n),this.drawFormatBits(n),this.isFunction=[]}return a.encodeText=function(e,t){var r=s.QrSegment.makeSegments(e);return a.encodeSegments(r,t)},a.encodeBinary=function(e,t){var r=s.QrSegment.makeBytes(e);return a.encodeSegments([r],t)},a.encodeSegments=function(e,t,r,n,o,i){if(r===void 0&&(r=1),n===void 0&&(n=40),o===void 0&&(o=-1),i===void 0&&(i=!0),!(a.MIN_VERSION<=r&&r<=n&&n<=a.MAX_VERSION)||o<-1||o>7)throw new RangeError("Invalid value");var v,p;for(v=r;;v++){var M=a.getNumDataCodewords(v,t)*8,w=m.getTotalBits(e,v);if(w<=M){p=w;break}if(v>=n)throw new RangeError("Data too long")}for(var C=0,A=[a.Ecc.MEDIUM,a.Ecc.QUARTILE,a.Ecc.HIGH];C<A.length;C++){var y=A[C];i&&p<=a.getNumDataCodewords(v,y)*8&&(t=y)}for(var b=[],_=0,R=e;_<R.length;_++){var P=R[_];f(P.mode.modeBits,4,b),f(P.numChars,P.mode.numCharCountBits(v),b);for(var F=0,g=P.getData();F<g.length;F++){var l=g[F];b.push(l)}}h(b.length==p);var E=a.getNumDataCodewords(v,t)*8;h(b.length<=E),f(0,Math.min(4,E-b.length),b),f(0,(8-b.length%8)%8,b),h(b.length%8==0);for(var I=236;b.length<E;I^=253)f(I,8,b);for(var L=[];L.length*8<b.length;)L.push(0);return b.forEach(function(Y,G){return L[G>>>3]|=Y<<7-(G&7)}),new a(v,t,L,o)},a.prototype.getModule=function(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]},a.prototype.getModules=function(){return this.modules},a.prototype.drawFunctionPatterns=function(){for(var e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);for(var t=this.getAlignmentPatternPositions(),r=t.length,e=0;e<r;e++)for(var n=0;n<r;n++)e==0&&n==0||e==0&&n==r-1||e==r-1&&n==0||this.drawAlignmentPattern(t[e],t[n]);this.drawFormatBits(0),this.drawVersion()},a.prototype.drawFormatBits=function(e){for(var t=this.errorCorrectionLevel.formatBits<<3|e,r=t,n=0;n<10;n++)r=r<<1^(r>>>9)*1335;var o=(t<<10|r)^21522;h(o>>>15==0);for(var n=0;n<=5;n++)this.setFunctionModule(8,n,u(o,n));this.setFunctionModule(8,7,u(o,6)),this.setFunctionModule(8,8,u(o,7)),this.setFunctionModule(7,8,u(o,8));for(var n=9;n<15;n++)this.setFunctionModule(14-n,8,u(o,n));for(var n=0;n<8;n++)this.setFunctionModule(this.size-1-n,8,u(o,n));for(var n=8;n<15;n++)this.setFunctionModule(8,this.size-15+n,u(o,n));this.setFunctionModule(8,this.size-8,!0)},a.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var r=this.version<<12|e;h(r>>>18==0);for(var t=0;t<18;t++){var n=u(r,t),o=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(o,i,n),this.setFunctionModule(i,o,n)}}},a.prototype.drawFinderPattern=function(e,t){for(var r=-4;r<=4;r++)for(var n=-4;n<=4;n++){var o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,v=t+r;0<=i&&i<this.size&&0<=v&&v<this.size&&this.setFunctionModule(i,v,o!=2&&o!=4)}},a.prototype.drawAlignmentPattern=function(e,t){for(var r=-2;r<=2;r++)for(var n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,Math.max(Math.abs(n),Math.abs(r))!=1)},a.prototype.setFunctionModule=function(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0},a.prototype.addEccAndInterleave=function(e){var t=this.version,r=this.errorCorrectionLevel;if(e.length!=a.getNumDataCodewords(t,r))throw new RangeError("Invalid argument");for(var n=a.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t],o=a.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t],i=Math.floor(a.getNumRawDataModules(t)/8),v=n-i%n,p=Math.floor(i/n),M=[],w=a.reedSolomonComputeDivisor(o),C=0,A=0;C<n;C++){var y=e.slice(A,A+p-o+(C<v?0:1));A+=y.length;var b=a.reedSolomonComputeRemainder(y,w);C<v&&y.push(0),M.push(y.concat(b))}for(var _=[],R=function(P){M.forEach(function(F,g){(P!=p-o||g>=v)&&_.push(F[P])})},C=0;C<M[0].length;C++)R(C);return h(_.length==i),_},a.prototype.dLine truncated
|
||||
import{G as $,H as N,r as S,I as ae,o as ne,F as ue,a as j,c as x,d,A as V,g as z,J as K,x as Q,t as de,w as B,q as U,m as q,C as ee,j as ce,k}from"./index-BsVv6gaD.js";import{S as O}from"./vendor-ui-jlFFG6nm.js";import{a as te,_ as re}from"./ConfirmModal-CzamKe9d.js";import"./vendor-charts-Bcjh2pZL.js";var T=function(){return T=Object.assign||function(c){for(var f,u=1,h=arguments.length;u<h;u++){f=arguments[u];for(var m in f)Object.prototype.hasOwnProperty.call(f,m)&&(c[m]=f[m])}return c},T.apply(this,arguments)};var D;(function(s){var c=(function(){function a(e,t,r,n){if(this.version=e,this.errorCorrectionLevel=t,this.modules=[],this.isFunction=[],e<a.MIN_VERSION||e>a.MAX_VERSION)throw new RangeError("Version value out of range");if(n<-1||n>7)throw new RangeError("Mask value out of range");this.size=e*4+17;for(var o=[],i=0;i<this.size;i++)o.push(!1);for(var i=0;i<this.size;i++)this.modules.push(o.slice()),this.isFunction.push(o.slice());this.drawFunctionPatterns();var v=this.addEccAndInterleave(r);if(this.drawCodewords(v),n==-1)for(var p=1e9,i=0;i<8;i++){this.applyMask(i),this.drawFormatBits(i);var M=this.getPenaltyScore();M<p&&(n=i,p=M),this.applyMask(i)}h(0<=n&&n<=7),this.mask=n,this.applyMask(n),this.drawFormatBits(n),this.isFunction=[]}return a.encodeText=function(e,t){var r=s.QrSegment.makeSegments(e);return a.encodeSegments(r,t)},a.encodeBinary=function(e,t){var r=s.QrSegment.makeBytes(e);return a.encodeSegments([r],t)},a.encodeSegments=function(e,t,r,n,o,i){if(r===void 0&&(r=1),n===void 0&&(n=40),o===void 0&&(o=-1),i===void 0&&(i=!0),!(a.MIN_VERSION<=r&&r<=n&&n<=a.MAX_VERSION)||o<-1||o>7)throw new RangeError("Invalid value");var v,p;for(v=r;;v++){var M=a.getNumDataCodewords(v,t)*8,w=m.getTotalBits(e,v);if(w<=M){p=w;break}if(v>=n)throw new RangeError("Data too long")}for(var C=0,A=[a.Ecc.MEDIUM,a.Ecc.QUARTILE,a.Ecc.HIGH];C<A.length;C++){var y=A[C];i&&p<=a.getNumDataCodewords(v,y)*8&&(t=y)}for(var b=[],_=0,R=e;_<R.length;_++){var P=R[_];f(P.mode.modeBits,4,b),f(P.numChars,P.mode.numCharCountBits(v),b);for(var F=0,g=P.getData();F<g.length;F++){var l=g[F];b.push(l)}}h(b.length==p);var E=a.getNumDataCodewords(v,t)*8;h(b.length<=E),f(0,Math.min(4,E-b.length),b),f(0,(8-b.length%8)%8,b),h(b.length%8==0);for(var I=236;b.length<E;I^=253)f(I,8,b);for(var L=[];L.length*8<b.length;)L.push(0);return b.forEach(function(Y,G){return L[G>>>3]|=Y<<7-(G&7)}),new a(v,t,L,o)},a.prototype.getModule=function(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]},a.prototype.getModules=function(){return this.modules},a.prototype.drawFunctionPatterns=function(){for(var e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);for(var t=this.getAlignmentPatternPositions(),r=t.length,e=0;e<r;e++)for(var n=0;n<r;n++)e==0&&n==0||e==0&&n==r-1||e==r-1&&n==0||this.drawAlignmentPattern(t[e],t[n]);this.drawFormatBits(0),this.drawVersion()},a.prototype.drawFormatBits=function(e){for(var t=this.errorCorrectionLevel.formatBits<<3|e,r=t,n=0;n<10;n++)r=r<<1^(r>>>9)*1335;var o=(t<<10|r)^21522;h(o>>>15==0);for(var n=0;n<=5;n++)this.setFunctionModule(8,n,u(o,n));this.setFunctionModule(8,7,u(o,6)),this.setFunctionModule(8,8,u(o,7)),this.setFunctionModule(7,8,u(o,8));for(var n=9;n<15;n++)this.setFunctionModule(14-n,8,u(o,n));for(var n=0;n<8;n++)this.setFunctionModule(this.size-1-n,8,u(o,n));for(var n=8;n<15;n++)this.setFunctionModule(8,this.size-15+n,u(o,n));this.setFunctionModule(8,this.size-8,!0)},a.prototype.drawVersion=function(){if(!(this.version<7)){for(var e=this.version,t=0;t<12;t++)e=e<<1^(e>>>11)*7973;var r=this.version<<12|e;h(r>>>18==0);for(var t=0;t<18;t++){var n=u(r,t),o=this.size-11+t%3,i=Math.floor(t/3);this.setFunctionModule(o,i,n),this.setFunctionModule(i,o,n)}}},a.prototype.drawFinderPattern=function(e,t){for(var r=-4;r<=4;r++)for(var n=-4;n<=4;n++){var o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,v=t+r;0<=i&&i<this.size&&0<=v&&v<this.size&&this.setFunctionModule(i,v,o!=2&&o!=4)}},a.prototype.drawAlignmentPattern=function(e,t){for(var r=-2;r<=2;r++)for(var n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,Math.max(Math.abs(n),Math.abs(r))!=1)},a.prototype.setFunctionModule=function(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0},a.prototype.addEccAndInterleave=function(e){var t=this.version,r=this.errorCorrectionLevel;if(e.length!=a.getNumDataCodewords(t,r))throw new RangeError("Invalid argument");for(var n=a.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][t],o=a.ECC_CODEWORDS_PER_BLOCK[r.ordinal][t],i=Math.floor(a.getNumRawDataModules(t)/8),v=n-i%n,p=Math.floor(i/n),M=[],w=a.reedSolomonComputeDivisor(o),C=0,A=0;C<n;C++){var y=e.slice(A,A+p-o+(C<v?0:1));A+=y.length;var b=a.reedSolomonComputeRemainder(y,w);C<v&&y.push(0),M.push(y.concat(b))}for(var _=[],R=function(P){M.forEach(function(F,g){(P!=p-o||g>=v)&&_.push(F[P])})},C=0;C<M[0].length;C++)R(C);return h(_.length==i),_},a.prototype.dLine truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{r as _,a as U,o as G,u as Z,b as q,c as r,d as t,t as i,e as I,f as J,g as f,w as z,v as K,h as Q,F as E,i as j,j as Y,k as d,n as $}from"./index-DQu6UtRL.js";import{C as H}from"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const tt={class:"kpi-grid mb-4"},et={class:"stat-item"},st={class:"stat-content"},at={class:"stat-item"},ot={class:"stat-content"},lt={class:"stat-item"},nt={class:"stat-content"},it={class:"card mb-4"},rt={class:"card-header d-flex justify-content-between align-items-center flex-wrap"},dt={class:"chart-header-controls"},ct={class:"d-flex align-items-center"},ut={class:"toggle-wrapper me-2"},mt={class:"toggle-switch"},ft={class:"card-body"},pt={class:"chart-container"},vt={class:"row"},ht={class:"col-lg-7"},_t={class:"card"},gt={class:"card-body p-0"},bt={class:"table-responsive"},xt={class:"table"},yt={key:0},Ct={key:1},kt={class:"user-select-all fw-bold",style:{color:"var(--text-heading)"}},wt={class:"font-monospace text-muted"},St={class:"d-flex align-items-center"},Rt={class:"progress flex-grow-1",style:{height:"6px"}},Tt={class:"ms-2 small text-muted w-25 text-end"},At={class:"col-lg-5"},Dt={class:"card mb-4"},Mt={class:"card-body p-3",style:{"min-height":"120px","max-height":"200px","overflow-y":"auto"}},Et={key:0,class:"text-muted text-center py-3 mb-0"},Nt={key:1,class:"text-muted text-center py-3 mb-0"},Lt={key:2,class:"list-group list-group-flush"},Bt={class:"fw-bold small"},Ut={class:"text-muted",style:{"font-size":"0.75rem"}},It={class:"badge status-warning text-dark"},zt={class:"card"},jt={class:"card-body d-flex align-items-center justify-content-around p-4",style:{"min-height":"200px"}},Ht={class:"pie-container",style:{width:"140px",height:"140px",flex:"0 0 auto"}},Ot={class:"ms-3 flex-grow-1"},Vt={class:"mb-3"},Ft={class:"h5 mb-0",style:{color:"var(--text-heading)"}},Pt={class:"h5 mb-0",style:{color:"var(--text-heading)"}},Wt=96,Jt={__name:"Analytics",setup(Xt){const{fetchAnalytics:O,fetchCertificates:V}=Y(),{formatBytes:C,parseServerDate:F}=J(),{config:P}=Z(),w=_(null),S=_(null);let g=null,b=null;const p=U({analytics:!0,certs:!0}),x=_("24h"),y=_(!1),o=U({concurrentUsers:"-",totalTraffic:0,expiringCerts:"-",totalReceived:0,totalSent:0,totalReceivedString:"-",totalSentString:"-"}),R=_([]),T=_([]);let N=null;const A=async()=>{p.analytics=!0;try{const a=await O(x.value);a.success&&W(a.data)}catch(a){console.error(a)}finally{p.analytics=!1}},L=async()=>{p.certs=!0;try{const a=await V();if(a.success&&Array.isArray(a.data)){const e=a.data.filter(s=>!s.is_revoked&&!s.is_expired&&s.days_remaining!==null&&s.days_remaining<=45);o.expiringCerts=e.length,T.value=e.sort((s,n)=>(s.days_remaining||0)-(n.days_remaining||0))}}catch(a){console.error(a)}finally{p.certs=!1}},W=a=>{o.concurrentUsers=a.max_concurrent_24h||0;const e=a.traffic_distribution||{rx:0,tx:0};o.totalReceived=Number(e.rx||0),o.totalSent=Number(e.tx||0),o.totalTraffic=o.totalReceived+o.totalSent,o.totalReceivedString=C(o.totalReceived),o.totalSentString=C(o.totalSent),R.value=(a.top_clients_24h||[]).map(s=>({name:s.common_name,total:Number(s.total_traffic||0),percent:o.totalTraffic>0?(Number(s.total_traffic)/o.totalTraffic*100).toFixed(1):0})),N=a.global_history_24h||[],D(),B()},D=()=>{if(!w.value)return;g&&g.destroy();const a=X(N,Wt),e=[],s=[],n=[];a.forEach(c=>{const m=F(c.timestamp);let u="";x.value.includes("h")||x.value==="1d"?u=m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):u=m.toLocaleDateString([],{month:"short",day:"numeric"})+" "+m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),e.push(u),y.value?(s.push(c.rx_rate_mbps||0),n.push(c.tx_rate_mbps||0)):(s.push(c.bytes_received/(1024*1024)),n.push(c.bytes_sent/(1024*1024)))});const l=document.documentElement.getAttribute("data-theme")==="dark",v=l?"rgba(240, 246, 252, 0.1)":"rgba(0,0,0,0.05)",h=l?"#8b949e":"#6c757d",k=w.value.getContext("2d");g=new H(k,{type:"line",data:{labels:e,datasets:[{label:y.value?"RX Mbps":"Received (MB)",data:s,borderColor:"#1652B8",backgroundColor:"rgba(22, 82, 184, 0.15)",borderWidth:2,fill:!0,tension:.3,pointRadius:3,pointHoverRadius:4},{label:y.value?"TX Mbps":"Sent (MB)",data:n,borderColor:"#EC7C31",backgroundColor:"rgba(236, 124, 49, 0.15)",borderWidth:2,fill:!0,tension:.3,pointRadius:3,pointHoverRadius:4}]},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{labels:{color:h}}},scales:{x:{ticks:{color:h,maxTicksLimit:8},grid:{color:v}},y:{beginAtZero:!0,ticks:{color:h},grid:{color:v}}}}})},B=()=>{if(!S.value)return;b&&b.destroy();const a=S.value.getContext("2d"),s=document.documentElement.getAttribute("data-theme")==="dark"?"#161b22":"#ffffff";b=new H(a,{type:"doughnut",data:{labels:["Received","Sent"],datasets:[{data:[o.totalReceived,o.totalSent],backgroundColor:["#1652B8","#EC7C31"],borderColor:s,borderWidth:2,hoverOffset:4}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"70%",plugins:{legend:{display:!1}}}})},X=(a,e)=>{if(!a||a.lLine truncated
|
||||
import{r as _,a as U,o as G,u as Z,b as q,c as r,d as t,t as i,e as I,f as J,g as f,w as z,v as K,h as Q,F as E,i as j,j as Y,k as d,n as $}from"./index-BsVv6gaD.js";import{C as H}from"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const tt={class:"kpi-grid mb-4"},et={class:"stat-item"},st={class:"stat-content"},at={class:"stat-item"},ot={class:"stat-content"},lt={class:"stat-item"},nt={class:"stat-content"},it={class:"card mb-4"},rt={class:"card-header d-flex justify-content-between align-items-center flex-wrap"},dt={class:"chart-header-controls"},ct={class:"d-flex align-items-center"},ut={class:"toggle-wrapper me-2"},mt={class:"toggle-switch"},ft={class:"card-body"},pt={class:"chart-container"},vt={class:"row"},ht={class:"col-lg-7"},_t={class:"card"},gt={class:"card-body p-0"},bt={class:"table-responsive"},xt={class:"table"},yt={key:0},Ct={key:1},kt={class:"user-select-all fw-bold",style:{color:"var(--text-heading)"}},wt={class:"font-monospace text-muted"},St={class:"d-flex align-items-center"},Rt={class:"progress flex-grow-1",style:{height:"6px"}},Tt={class:"ms-2 small text-muted w-25 text-end"},At={class:"col-lg-5"},Dt={class:"card mb-4"},Mt={class:"card-body p-3",style:{"min-height":"120px","max-height":"200px","overflow-y":"auto"}},Et={key:0,class:"text-muted text-center py-3 mb-0"},Nt={key:1,class:"text-muted text-center py-3 mb-0"},Lt={key:2,class:"list-group list-group-flush"},Bt={class:"fw-bold small"},Ut={class:"text-muted",style:{"font-size":"0.75rem"}},It={class:"badge status-warning text-dark"},zt={class:"card"},jt={class:"card-body d-flex align-items-center justify-content-around p-4",style:{"min-height":"200px"}},Ht={class:"pie-container",style:{width:"140px",height:"140px",flex:"0 0 auto"}},Ot={class:"ms-3 flex-grow-1"},Vt={class:"mb-3"},Ft={class:"h5 mb-0",style:{color:"var(--text-heading)"}},Pt={class:"h5 mb-0",style:{color:"var(--text-heading)"}},Wt=96,Jt={__name:"Analytics",setup(Xt){const{fetchAnalytics:O,fetchCertificates:V}=Y(),{formatBytes:C,parseServerDate:F}=J(),{config:P}=Z(),w=_(null),S=_(null);let g=null,b=null;const p=U({analytics:!0,certs:!0}),x=_("24h"),y=_(!1),o=U({concurrentUsers:"-",totalTraffic:0,expiringCerts:"-",totalReceived:0,totalSent:0,totalReceivedString:"-",totalSentString:"-"}),R=_([]),T=_([]);let N=null;const A=async()=>{p.analytics=!0;try{const a=await O(x.value);a.success&&W(a.data)}catch(a){console.error(a)}finally{p.analytics=!1}},L=async()=>{p.certs=!0;try{const a=await V();if(a.success&&Array.isArray(a.data)){const e=a.data.filter(s=>!s.is_revoked&&!s.is_expired&&s.days_remaining!==null&&s.days_remaining<=45);o.expiringCerts=e.length,T.value=e.sort((s,n)=>(s.days_remaining||0)-(n.days_remaining||0))}}catch(a){console.error(a)}finally{p.certs=!1}},W=a=>{o.concurrentUsers=a.max_concurrent_24h||0;const e=a.traffic_distribution||{rx:0,tx:0};o.totalReceived=Number(e.rx||0),o.totalSent=Number(e.tx||0),o.totalTraffic=o.totalReceived+o.totalSent,o.totalReceivedString=C(o.totalReceived),o.totalSentString=C(o.totalSent),R.value=(a.top_clients_24h||[]).map(s=>({name:s.common_name,total:Number(s.total_traffic||0),percent:o.totalTraffic>0?(Number(s.total_traffic)/o.totalTraffic*100).toFixed(1):0})),N=a.global_history_24h||[],D(),B()},D=()=>{if(!w.value)return;g&&g.destroy();const a=X(N,Wt),e=[],s=[],n=[];a.forEach(c=>{const m=F(c.timestamp);let u="";x.value.includes("h")||x.value==="1d"?u=m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):u=m.toLocaleDateString([],{month:"short",day:"numeric"})+" "+m.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),e.push(u),y.value?(s.push(c.rx_rate_mbps||0),n.push(c.tx_rate_mbps||0)):(s.push(c.bytes_received/(1024*1024)),n.push(c.bytes_sent/(1024*1024)))});const l=document.documentElement.getAttribute("data-theme")==="dark",v=l?"rgba(240, 246, 252, 0.1)":"rgba(0,0,0,0.05)",h=l?"#8b949e":"#6c757d",k=w.value.getContext("2d");g=new H(k,{type:"line",data:{labels:e,datasets:[{label:y.value?"RX Mbps":"Received (MB)",data:s,borderColor:"#1652B8",backgroundColor:"rgba(22, 82, 184, 0.15)",borderWidth:2,fill:!0,tension:.3,pointRadius:3,pointHoverRadius:4},{label:y.value?"TX Mbps":"Sent (MB)",data:n,borderColor:"#EC7C31",backgroundColor:"rgba(236, 124, 49, 0.15)",borderWidth:2,fill:!0,tension:.3,pointRadius:3,pointHoverRadius:4}]},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{labels:{color:h}}},scales:{x:{ticks:{color:h,maxTicksLimit:8},grid:{color:v}},y:{beginAtZero:!0,ticks:{color:h},grid:{color:v}}}}})},B=()=>{if(!S.value)return;b&&b.destroy();const a=S.value.getContext("2d"),s=document.documentElement.getAttribute("data-theme")==="dark"?"#161b22":"#ffffff";b=new H(a,{type:"doughnut",data:{labels:["Received","Sent"],datasets:[{data:[o.totalReceived,o.totalSent],backgroundColor:["#1652B8","#EC7C31"],borderColor:s,borderWidth:2,hoverOffset:4}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:"70%",plugins:{legend:{display:!1}}}})},X=(a,e)=>{if(!a||a.lLine truncated
|
||||
@@ -0,0 +1,15 @@
|
||||
import{r as v,a as B,s as N,D as ze,o as qe,B as We,b as Ye,c as n,d as t,A as F,g as c,x as u,F as b,i as _,t as o,w as g,q as x,p as Ge,y as C,v as X,m as q,h as ee,C as ge,j as Je,k as l,f as Ze}from"./index-BsVv6gaD.js";import{_ as ye,a as te}from"./ConfirmModal-CzamKe9d.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const Qe={class:"backup-page"},Xe={class:"config-card backup-card"},et={class:"d-flex justify-content-between align-items-center mb-3 flex-wrap gap-2"},tt=["disabled"],st={class:"table-responsive"},at={class:"table table-hover mb-0"},nt={key:0},lt={key:1},ot={class:"fw-semibold",style:{color:"var(--text-heading)"}},it={class:"text-muted small"},rt={key:0,class:"small mt-1"},dt=["title"],ct={key:1,class:"status-badge status-warning"},ut={key:1,class:"small mt-1"},pt={class:"status-badge status-client"},mt=["title"],bt={key:1,class:"text-muted small"},ft={key:2,class:"text-muted small"},gt=["onClick","disabled"],yt={key:0,class:"fas fa-spinner fa-spin"},vt={key:1,class:"fas fa-plug"},kt=["onClick","disabled"],ht=["onClick","disabled"],_t={class:"config-card backup-card"},wt={class:"d-flex justify-content-between align-items-center flex-wrap gap-2 mb-2"},xt={key:0,class:"status-badge status-valid"},St={key:1,class:"status-badge status-warning"},Ct=["disabled"],$t={class:"text-muted small mb-3"},Tt={class:"config-input-group"},Pt=["disabled"],Nt=["disabled"],Vt={class:"text-muted small mt-2 mb-0"},It={class:"text-main"},Dt={key:0},Ut={key:1},At={key:0,class:"text-muted small mb-3"},Et={key:1,class:"mb-3"},Rt=["id","value","disabled"],Bt=["for"],Ft={class:"text-muted small"},Mt={key:0,class:"text-muted small"},jt={class:"btn-action-group justify-content-center mt-3"},Lt=["disabled"],Ot={key:0,class:"fas fa-spinner fa-spin"},Ht={key:1,class:"fas fa-box-archive"},Kt={key:2,class:"nested-box fade-in mt-4"},zt={class:"nested-label d-flex justify-content-between"},qt={class:"backup-steps"},Wt={key:0,class:"fas fa-spinner fa-spin me-1"},Yt={class:"fw-semibold ms-2",style:{color:"var(--text-heading)"}},Gt={key:0,class:"text-muted small ms-1 mt-1"},Jt={key:0,class:"text-muted small mt-2"},Zt={key:3,class:"mt-4"},Qt={class:"table-responsive"},Xt={class:"table table-hover mb-0"},es={class:"text-capitalize"},ts={class:"small text-muted"},ss={class:"config-card backup-card"},as={class:"config-row"},ns={class:"config-col"},ls={class:"select-container"},os=["disabled"],is=["value"],rs={key:0,class:"text-muted small mt-2"},ds={key:1,class:"mt-2"},cs={class:"text-muted small mt-1"},us={key:2,class:"mt-2"},ps={class:"text-muted small ms-2"},ms={class:"config-row"},bs={class:"config-col"},fs={class:"select-container"},gs=["disabled"],ys={value:"",disabled:""},vs=["value"],ks={key:0,class:"config-row"},hs={class:"config-col"},_s={class:"btn-action-group justify-content-center"},ws=["disabled"],xs={key:0,class:"fas fa-spinner fa-spin"},Ss={key:1,class:"fas fa-rotate-left"},Cs={key:1,class:"nested-box fade-in mt-4"},$s={class:"nested-label d-flex justify-content-between"},Ts={class:"backup-steps"},Ps={class:"status-badge status-warning"},Ns={key:1,class:"mt-3"},Vs={class:"mb-3"},Is={class:"mb-3"},Ds={class:"select-container"},Us=["value"],As={key:0,class:"form-text mt-2 small text-warning"},Es={class:"form-label small fw-bold text-muted text-uppercase d-block"},Rs={class:"toggle-wrapper"},Bs={class:"toggle-switch"},Fs=["onUpdate:modelValue"],Ms={class:"form-label small fw-bold text-muted text-uppercase"},js=["onUpdate:modelValue","placeholder"],Ls={key:0,class:"form-text mt-1 text-muted small"},Os={class:"form-label small fw-bold text-muted text-uppercase"},Hs=["onUpdate:modelValue","placeholder"],Ks={class:"form-label small fw-bold text-muted text-uppercase"},zs=["onUpdate:modelValue"],qs={class:"form-label small fw-bold text-muted text-uppercase"},Ws=["onUpdate:modelValue","placeholder"],Ys={key:0,class:"form-text mt-1 text-muted small"},Gs={key:5,class:"form-text mt-2 small text-warning"},Js={key:0,class:"mb-3"},Zs={key:0,class:"small text-main",style:{"word-break":"break-all"}},Qs={key:1,class:"form-text small text-warning"},Xs={class:"mb-3"},ea={class:"mb-1 d-flex align-items-center"},ta={class:"toggle-wrapper me-2"},sa={class:"toggle-switch"},aa=["disabled"],na={key:0,class:"spinner-border spinner-border-sm me-2"},la={class:"mb-3"},oa={class:"mb-2"},ia=["disabled"],ra=["disabled"],da={key:0,class:"spinner-border spinner-border-sm me-2"},fa={__name:"BackupRestore",setup(ca){const{profilesApiClient:y}=Je(),m=We(),{formatBytes:ve}=Ze(),se=v(!0),k=v(!1),M=v(null),p=B({encryption_enabled:!1,default_retention:14,local_root:"",types:[],server_name:"",effective_server_name:"",server_name_source:"hostname"}),P=v(""),V=v([]),W=v([]),$=v([]),i=B({kind:null,state:"idle",stages:[],results:[],warnings:[],message:null,relogin:!1}),j=v(!1),I=v(null),L=v(null),ae=v(null),ne=v(null),le=v(null),r=B({id:null,name:"",type:"local",enabled:!0,retention_count:14,params:{},secrets:{}}),O=v({}),S=B({value:"",cLine truncated
|
||||
|
||||
`:`The server of "${a.name}" showed this host key. Compare it with the fingerprint you know (ssh-keygen -lf on the server) before you trust it.
|
||||
|
||||
`)+`Type: ${e.key_type}
|
||||
SHA-256: ${e.fingerprint}
|
||||
|
||||
Packages are sent only to a server with exactly this key.`,confirmText:e.key_changed?"Trust the new key":"Trust",confirmBtnClass:e.key_changed?"btn-action-danger":"btn-action-primary",data:{id:a.id,name:a.name,fingerprint:e.fingerprint}})},Ee=async a=>{try{await y.post(`/backup/destinations/${a.id}/trust-host-key`,{fingerprint:a.fingerprint}),m.show(`Host key of ${a.name} trusted. Press Test to check the connection.`,"success"),await T()}catch(e){m.show(w(e),"error")}},Re=a=>{ae.value.open({title:"Delete Destination?",message:`Delete "${a.name}"? Packages already stored there are not deleted.`,confirmText:"Yes, Delete",data:a})},Be=async a=>{try{await y.delete(`/backup/destinations/${a.id}`),m.show(`${a.name} deleted.`,"success"),d.sourceId===a.id&&(d.sourceId=null),await T()}catch(e){m.show(w(e),"error")}},Fe=()=>{S.value="",S.confirm="",L.value.show()},Me=async()=>{if(S.value!==S.confirm){m.show("Passphrases do not match.","error");return}await be({passphrase:S.value},"Passphrase saved.")},je=async()=>{await be({clear_passphrase:!0},"Passphrase removed. New packages are not encrypted.")},me=async()=>{const a=P.value.trim();if(a!==(p.server_name||"")){k.value=!0;try{const e=await y.put("/backup/settings",{server_name:a});Object.assign(p,e.data),P.value=p.server_name||"",m.show(a?"Server name saved.":"Server name cleared.","success")}catch(e){m.show(w(e),"error")}finally{k.value=!1}}},be=async(a,e)=>{k.value=!0;try{const s=await y.put("/backup/settings",a);Object.assign(p,s.data),m.show(e,"success"),L.value.hide(),await T()}catch(s){m.show(w(s),"error")}finally{k.value=!1}},Le=async()=>{try{await y.post("/backup/run",{destination_ids:$.value}),j.value=!1,i.kind="backup",i.state="running",await R(),Z()}catch(a){a.response?.status===409&&await R(),m.show(w(a),"error")}},fe=async()=>{if(d.packages=[],d.packageName="",d.passphrase="",d.sourceError="",d.sourceId!==null){d.checking=!0;try{const a=await y.get(`/backup/destinations/${d.sourceId}/packages`);d.packages=a.data.packages}catch(a){d.sourceError=w(a)}finally{d.checking=!1}}};ze(()=>d.sourceId,fe);const Oe=()=>{const a=E.value;ne.value.open({title:"Restore from Backup?",message:`Package: ${a.server_name}, ${oe(a.created_at)} (${z(a.created_at)} local)
|
||||
|
||||
This replaces:
|
||||
- the monitoring database (statistics, administrator accounts, 2FA),
|
||||
- the profiler database and the server settings,
|
||||
- the PKI (CA, keys, certificates) and the client profiles.
|
||||
|
||||
OpenVPN is stopped and started again; connected clients are disconnected. The current state is saved to a local safety copy first. You will have to log in again.`,confirmText:"Yes, Restore",confirmBtnClass:"btn-action-danger",data:a})},He=async a=>{try{await y.post("/backup/restore",{destination_id:d.sourceId,package:a.name,passphrase:a.encrypted?d.passphrase:null}),j.value=!1,d.passphrase="",i.kind="restore",i.state="running",await R(),Z()}catch(e){m.show(w(e),"error")}},Ke=()=>{localStorage.removeItem("ovpmon_token"),localStorage.removeItem("ovpmon_user"),window.location.href="/login"};return qe(async()=>{try{await Te(),await T(),ce(),await Promise.all([de(),R()])}catch(a){m.show(`Failed to load backup settings: ${w(a)}`,"error")}finally{se.value=!1}}),Ye(ue),(a,e)=>(l(),n("div",Qe,[t("div",Xe,[e[23]||(e[23]=t("div",{class:"config-header"},[t("h1",null,"Backup Destinations")],-1)),t("div",et,[e[14]||(e[14]=t("span",{class:"text-muted small"},"Where backup packages are stored. A backup goes to every selected destination.",-1)),t("button",{type:"button",class:"btn-action btn-action-save btn-sm",onClick:Ne,disabled:!p.types.length},[...e[13]||(e[13]=[t("i",{class:"fas fa-plus"},null,-1),c(" Add destination ",-1)])],8,tt)]),t("div",st,[t("table",at,[e[22]||(e[22]=t("thead",null,[t("tr",null,[t("th",null,"Name"),t("th",null,"Type"),t("th",null,"Status"),t("th",null,"Last result"),t("th",null,"Actions")])],-1)),t("tbody",null,[se.value?(l(),n("tr",nt,[...e[15]||(e[15]=[t("td",{colspan:"5",class:"text-center py-4"},[t("div",{class:"spinner-border spinner-border-sm text-primary",role:"status"},[t("span",{class:"visually-hidden"},"Loading...")])],-1)])])):V.value.length===0?(l(),n("tr",lt,[...e[16]||(e[16]=[t("td",{colspan:"5",class:"empty-state text-center py-4"},[t("i",{class:"fas fa-box-archive fa-2x mb-3 text-muted"}),t("p",{class:"text-muted mb-0"},"No destinations yet. Add one to start making backups.")],-1)])])):u("",!0),(l(!0),n(b,null,_(V.value,s=>(l(),n("tr",{key:s.id},[t("td",null,[t("div",ot,o(s.name),1),t("div",it,o(we(s)),1),U(s.type)?.pins_host_key?(l(),n("div",rt,[s.params.host_key?(l(),n("span",{key:0,class:"status-badge status-valid",title:s.params.host_key},[...e[17]||(e[17]=[t("i",{class:"fas fa-fingerprint me-1"},null,-1),c("Host key trusted ",-1)])],8,dt)):(l(),n("span",ct,[...e[18]||(e[18]=[t("i",{class:"fas fa-triangle-exclamation me-1"},null,-1),c("Host key not trusted: press Test and confirm it ",-1)])]))])):u("",!0),xe(s)?(l(),n("div",ut,[...e[19]||(e[19]=[t("span",{class:"status-badge status-warning"},[t("i",{class:"fas fa-triangle-exclamation me-1"}),c("No TLS: clear text")],-1)])])):u("",!0)]),t("td",null,[t("span",pt,o(Y(s.type)),1)]),t("td",null,[t("span",{class:C(["status-badge",s.enabled?"status-valid":"status-secondary"])},o(s.enabled?"Enabled":"Disabled"),3)]),t("td",null,[s.last_status?(l(),n("span",{key:0,class:C(["status-badge",s.last_status==="ok"?"status-valid":"status-expired"]),title:s.last_message},o(s.last_status==="ok"?"OK":"Failed"),11,mt)):(l(),n("span",bt,"never used")),s.last_at?(l(),n("div",ft,o(z(s.last_at)),1)):u("",!0)]),t("td",null,[t("button",{class:"btn btn-sm btn-link text-primary p-0 me-2",title:"Test connection",onClick:f=>Ue(s),disabled:M.value===s.id},[M.value===s.id?(l(),n("i",yt)):(l(),n("i",vt))],8,gt),t("button",{class:"btn btn-sm btn-link text-warning p-0 me-2",title:"Edit",onClick:f=>Ve(s),disabled:h.value},[...e[20]||(e[20]=[t("i",{class:"fas fa-pen"},null,-1)])],8,kt),t("button",{class:"btn btn-sm btn-link text-danger p-0",title:"Delete",onClick:f=>Re(s),disabled:h.value},[...e[21]||(e[21]=[t("i",{class:"fas fa-trash"},null,-1)])],8,ht)])]))),128))])])])]),t("div",_t,[e[34]||(e[34]=t("div",{class:"config-header"},[t("h1",null,"Backup")],-1)),t("div",wt,[t("div",null,[p.encryption_enabled?(l(),n("span",xt,[...e[24]||(e[24]=[t("i",{class:"fas fa-lock me-1"},null,-1),c("Packages are encrypted ",-1)])])):(l(),n("span",St,[...e[25]||(e[25]=[t("i",{class:"fas fa-triangle-exclamation me-1"},null,-1),c("Packages are NOT encrypted ",-1)])]))]),t("button",{type:"button",class:"btn-action btn-action-secondary btn-sm",onClick:Fe,disabled:h.value},[e[26]||(e[26]=t("i",{class:"fas fa-key"},null,-1)),c(" "+o(p.encryption_enabled?"Change passphrase":"Set passphrase"),1)],8,Ct)]),t("p",$t,[e[27]||(e[27]=c(" A package contains the CA private key, the certificates and the password hashes of the administrators. ",-1)),p.encryption_enabled?(l(),n(b,{key:1},[c("Keep the passphrase: a package cannot be restored without it, and it is not stored in the package.")],64)):(l(),n(b,{key:0},[c("Remote destinations need an encryption passphrase; a local folder can be used without it.")],64))]),e[35]||(e[35]=t("div",{class:"config-divider"},null,-1)),e[36]||(e[36]=t("label",{class:"config-label"},"Server name",-1)),t("div",Tt,[g(t("input",{type:"text",class:"config-input","onUpdate:modelValue":e[0]||(e[0]=s=>P.value=s),maxlength:"63",autocomplete:"off",placeholder:"e.g. vpn-m
Line truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{r as m,l as Q,k as i,m as R,d as e,w as D,p as ne,q as j,g as C,s as y,c,x as w,t as n,F as A,y as G,o as oe,z as ie,A as P,e as H,h as re,i as K,j as de,B as ue,C as F}from"./index-DQu6UtRL.js";import{_ as J,a as ce}from"./ConfirmModal-likdDJzi.js";import{T as pe}from"./vendor-ui-jlFFG6nm.js";import"./vendor-charts-Bcjh2pZL.js";const fe={class:"mb-3"},ve={class:"input-group"},me=["disabled"],_e={__name:"NewClientModal",emits:["create"],setup(r,{expose:d,emit:E}){const T=E,g=m(null),l=m(""),f=m(null),x=()=>{l.value="",g.value.show(),setTimeout(()=>f.value?.focus(),500)},b=()=>{g.value.hide()},k=()=>{l.value&&(T("create",l.value),b())};return d({open:x,close:b}),($,v)=>(i(),Q(J,{id:"newClientModal",title:"Create New Client",ref_key:"modal",ref:g},{body:R(()=>[e("div",fe,[v[2]||(v[2]=e("label",{for:"clientName",class:"form-label small text-muted text-uppercase fw-bold"},"Client Name",-1)),e("div",ve,[v[1]||(v[1]=e("span",{class:"input-group-text"},[e("i",{class:"fas fa-user"})],-1)),D(e("input",{type:"text",class:"form-control",id:"clientName","onUpdate:modelValue":v[0]||(v[0]=p=>l.value=p),placeholder:"e.g. laptop-user",onKeyup:ne(k,["enter"]),ref_key:"inputRef",ref:f},null,544),[[j,l.value]])]),v[3]||(v[3]=e("div",{class:"form-text mt-2 text-muted small"},[e("i",{class:"fas fa-info-circle me-1"}),C(" Use only alphanumeric characters, dashes, or underscores. ")],-1))])]),footer:R(()=>[e("button",{type:"button",class:"btn-action btn-action-secondary",onClick:b},"Cancel"),e("button",{type:"button",class:"btn-action btn-action-save",onClick:k,disabled:!l.value}," Create Client ",8,me)]),_:1},512))}},be={class:"d-flex align-items-center gap-2 flex-wrap"},ge={class:"modal-title fw-bold mb-0",style:{color:"var(--text-heading)"}},ye={key:0},xe={class:"profile-meta"},ke={key:0,class:"text-muted"},he={class:"certificate-file text-muted small text-break mt-0"},Ce={class:"form-text text-end"},we=["disabled"],$e={__name:"ProfileDetailsModal",emits:["save"],setup(r,{expose:d,emit:E}){const T=E,g=m(null),l=m(null),f=m(""),x=y(()=>f.value!==(l.value?.note||"")),b=y(()=>{const u=l.value;return u?.is_revoked?{label:"Revoked",cls:"status-expired"}:u?.is_expired?{label:"Expired",cls:"status-expired"}:u?.days_remaining!=null&&u.days_remaining<=30?{label:"Expiring Soon",cls:"status-warning"}:{label:"Active",cls:"status-valid"}}),k=y(()=>{const u=l.value?.days_remaining;return u==null?"":u>0?`${u} d`:"expired"}),$=u=>{if(!u)return"N/A";const o=new Date(u);if(isNaN(o))return u;const h=V=>String(V).padStart(2,"0");return`${o.getFullYear()}-${h(o.getMonth()+1)}-${h(o.getDate())} ${h(o.getHours())}:${h(o.getMinutes())}`},v=u=>{l.value=u,f.value=u.note||"",g.value.show()},p=()=>{g.value.hide()},S=()=>{T("save",{id:l.value.id,note:f.value}),p()};return d({open:v,close:p}),(u,o)=>(i(),Q(J,{id:"profileDetailsModal",title:"Profile Details",ref_key:"modal",ref:g},{header:R(()=>[e("div",be,[e("h5",ge,n(l.value?.username),1),l.value?(i(),c("span",{key:0,class:G(["status-badge",b.value.cls])},n(b.value.label),3)):w("",!0)])]),body:R(()=>[l.value?(i(),c("div",ye,[e("dl",xe,[o[2]||(o[2]=e("dt",null,"Created",-1)),e("dd",null,n($(l.value.created_at)),1),o[3]||(o[3]=e("dt",null,"Expires",-1)),e("dd",null,[C(n($(l.value.expiration_date)),1),k.value?(i(),c("span",ke," ("+n(k.value)+")",1)):w("",!0)]),l.value.revoked_at?(i(),c(A,{key:0},[o[1]||(o[1]=e("dt",null,"Revoked",-1)),e("dd",null,n($(l.value.revoked_at)),1)],64)):w("",!0),o[4]||(o[4]=e("dt",null,"File",-1)),e("dd",he,n(l.value.file_path||"N/A"),1)]),o[5]||(o[5]=e("label",{for:"profileNote",class:"form-label small text-muted text-uppercase fw-bold"},"Note",-1)),D(e("textarea",{class:"form-control",id:"profileNote",rows:"3",maxlength:"1000","onUpdate:modelValue":o[0]||(o[0]=h=>f.value=h),placeholder:"Add a note about this profile..."},null,512),[[j,f.value]]),e("div",Ce,n(f.value.length)+" / 1000",1)])):w("",!0)]),footer:R(()=>[e("button",{type:"button",class:"btn-action btn-action-secondary",onClick:p},"Close"),e("button",{type:"button",class:"btn-action btn-action-save",onClick:S,disabled:!x.value},"Save",8,we)]),_:1},512))}},O=(r,d)=>{r._noteTooltip=new pe(r,{title:d,placement:"top",container:"body",html:!1,trigger:"hover",customClass:"note-tooltip"})},Y=r=>{r._noteTooltip?.dispose(),r._noteTooltip=null},Ne=r=>r._noteTooltip?.hide(),q={mounted(r,d){r.addEventListener("click",()=>Ne(r)),d.value&&O(r,d.value)},updated(r,d){d.value!==d.oldValue&&(Y(r),d.value&&O(r,d.value))},unmounted(r){Y(r)}},Te={class:"stats-info mb-4",id:"statsInfo"},Me={class:"stat-item"},Ae={class:"stat-value"},De={class:"stat-item"},Ee={class:"stat-value"},Le={class:"stat-item"},Re={class:"stat-value"},Se={class:"stat-item"},Ve={class:"stat-value"},Be={class:"d-flex justify-content-between align-items-center mb-3 flex-wrap gap-3"},He={class:"d-flex gap-3 align-items-center flex-wrap"},Ue={class:"input-group input-group-sm",style:{width:"250px"}},Pe=["disabled","title"],Fe={class:"d-flex align-items-center"},je={Line truncated
|
||||
import{r as m,l as Q,k as i,m as R,d as e,w as D,p as ne,q as j,g as C,s as y,c,x as w,t as n,F as A,y as G,o as oe,z as ie,A as P,e as H,h as re,i as K,j as de,B as ue,C as F}from"./index-BsVv6gaD.js";import{_ as J,a as ce}from"./ConfirmModal-CzamKe9d.js";import{T as pe}from"./vendor-ui-jlFFG6nm.js";import"./vendor-charts-Bcjh2pZL.js";const fe={class:"mb-3"},ve={class:"input-group"},me=["disabled"],_e={__name:"NewClientModal",emits:["create"],setup(r,{expose:d,emit:E}){const T=E,g=m(null),l=m(""),f=m(null),x=()=>{l.value="",g.value.show(),setTimeout(()=>f.value?.focus(),500)},b=()=>{g.value.hide()},k=()=>{l.value&&(T("create",l.value),b())};return d({open:x,close:b}),($,v)=>(i(),Q(J,{id:"newClientModal",title:"Create New Client",ref_key:"modal",ref:g},{body:R(()=>[e("div",fe,[v[2]||(v[2]=e("label",{for:"clientName",class:"form-label small text-muted text-uppercase fw-bold"},"Client Name",-1)),e("div",ve,[v[1]||(v[1]=e("span",{class:"input-group-text"},[e("i",{class:"fas fa-user"})],-1)),D(e("input",{type:"text",class:"form-control",id:"clientName","onUpdate:modelValue":v[0]||(v[0]=p=>l.value=p),placeholder:"e.g. laptop-user",onKeyup:ne(k,["enter"]),ref_key:"inputRef",ref:f},null,544),[[j,l.value]])]),v[3]||(v[3]=e("div",{class:"form-text mt-2 text-muted small"},[e("i",{class:"fas fa-info-circle me-1"}),C(" Use only alphanumeric characters, dashes, or underscores. ")],-1))])]),footer:R(()=>[e("button",{type:"button",class:"btn-action btn-action-secondary",onClick:b},"Cancel"),e("button",{type:"button",class:"btn-action btn-action-save",onClick:k,disabled:!l.value}," Create Client ",8,me)]),_:1},512))}},be={class:"d-flex align-items-center gap-2 flex-wrap"},ge={class:"modal-title fw-bold mb-0",style:{color:"var(--text-heading)"}},ye={key:0},xe={class:"profile-meta"},ke={key:0,class:"text-muted"},he={class:"certificate-file text-muted small text-break mt-0"},Ce={class:"form-text text-end"},we=["disabled"],$e={__name:"ProfileDetailsModal",emits:["save"],setup(r,{expose:d,emit:E}){const T=E,g=m(null),l=m(null),f=m(""),x=y(()=>f.value!==(l.value?.note||"")),b=y(()=>{const u=l.value;return u?.is_revoked?{label:"Revoked",cls:"status-expired"}:u?.is_expired?{label:"Expired",cls:"status-expired"}:u?.days_remaining!=null&&u.days_remaining<=30?{label:"Expiring Soon",cls:"status-warning"}:{label:"Active",cls:"status-valid"}}),k=y(()=>{const u=l.value?.days_remaining;return u==null?"":u>0?`${u} d`:"expired"}),$=u=>{if(!u)return"N/A";const o=new Date(u);if(isNaN(o))return u;const h=V=>String(V).padStart(2,"0");return`${o.getFullYear()}-${h(o.getMonth()+1)}-${h(o.getDate())} ${h(o.getHours())}:${h(o.getMinutes())}`},v=u=>{l.value=u,f.value=u.note||"",g.value.show()},p=()=>{g.value.hide()},S=()=>{T("save",{id:l.value.id,note:f.value}),p()};return d({open:v,close:p}),(u,o)=>(i(),Q(J,{id:"profileDetailsModal",title:"Profile Details",ref_key:"modal",ref:g},{header:R(()=>[e("div",be,[e("h5",ge,n(l.value?.username),1),l.value?(i(),c("span",{key:0,class:G(["status-badge",b.value.cls])},n(b.value.label),3)):w("",!0)])]),body:R(()=>[l.value?(i(),c("div",ye,[e("dl",xe,[o[2]||(o[2]=e("dt",null,"Created",-1)),e("dd",null,n($(l.value.created_at)),1),o[3]||(o[3]=e("dt",null,"Expires",-1)),e("dd",null,[C(n($(l.value.expiration_date)),1),k.value?(i(),c("span",ke," ("+n(k.value)+")",1)):w("",!0)]),l.value.revoked_at?(i(),c(A,{key:0},[o[1]||(o[1]=e("dt",null,"Revoked",-1)),e("dd",null,n($(l.value.revoked_at)),1)],64)):w("",!0),o[4]||(o[4]=e("dt",null,"File",-1)),e("dd",he,n(l.value.file_path||"N/A"),1)]),o[5]||(o[5]=e("label",{for:"profileNote",class:"form-label small text-muted text-uppercase fw-bold"},"Note",-1)),D(e("textarea",{class:"form-control",id:"profileNote",rows:"3",maxlength:"1000","onUpdate:modelValue":o[0]||(o[0]=h=>f.value=h),placeholder:"Add a note about this profile..."},null,512),[[j,f.value]]),e("div",Ce,n(f.value.length)+" / 1000",1)])):w("",!0)]),footer:R(()=>[e("button",{type:"button",class:"btn-action btn-action-secondary",onClick:p},"Close"),e("button",{type:"button",class:"btn-action btn-action-save",onClick:S,disabled:!x.value},"Save",8,we)]),_:1},512))}},O=(r,d)=>{r._noteTooltip=new pe(r,{title:d,placement:"top",container:"body",html:!1,trigger:"hover",customClass:"note-tooltip"})},Y=r=>{r._noteTooltip?.dispose(),r._noteTooltip=null},Ne=r=>r._noteTooltip?.hide(),q={mounted(r,d){r.addEventListener("click",()=>Ne(r)),d.value&&O(r,d.value)},updated(r,d){d.value!==d.oldValue&&(Y(r),d.value&&O(r,d.value))},unmounted(r){Y(r)}},Te={class:"stats-info mb-4",id:"statsInfo"},Me={class:"stat-item"},Ae={class:"stat-value"},De={class:"stat-item"},Ee={class:"stat-value"},Le={class:"stat-item"},Re={class:"stat-value"},Se={class:"stat-item"},Ve={class:"stat-value"},Be={class:"d-flex justify-content-between align-items-center mb-3 flex-wrap gap-3"},He={class:"d-flex gap-3 align-items-center flex-wrap"},Ue={class:"input-group input-group-sm",style:{width:"250px"}},Pe=["disabled","title"],Fe={class:"d-flex align-items-center"},je={Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
import{M as B}from"./vendor-ui-jlFFG6nm.js";import{r as t,o as M,b as $,l as C,k as u,d as e,y as g,e as S,c as k,x as w,K as p,T as z,t as _,m as y}from"./index-BsVv6gaD.js";const T=["id"],E={class:"modal-content"},L={class:"modal-header border-0 pb-0"},N={class:"modal-title fw-bold",style:{color:"var(--text-heading)"}},R={class:"modal-body"},V={key:0,class:"modal-footer border-0 pt-0"},q={__name:"BaseModal",props:{id:{type:String,required:!0},title:{type:String,default:""},size:{type:String,default:""}},emits:["close","opened","closed"],setup(d,{expose:f,emit:b}){const v=d,o=b,s=t(null);let a=null;const i=v.size||"",c=()=>{a?.show()},r=()=>{a?.hide()};return M(()=>{a=new B(s.value),s.value.addEventListener("shown.bs.modal",()=>{o("opened")}),s.value.addEventListener("hidden.bs.modal",()=>{o("closed"),o("close")})}),$(()=>{a?.dispose()}),f({show:c,hide:r}),(n,m)=>(u(),C(z,{to:"body"},[e("div",{class:"modal fade",id:d.id,tabindex:"-1","aria-hidden":"true",ref_key:"modalRef",ref:s},[e("div",{class:g(["modal-dialog modal-dialog-centered",S(i)])},[e("div",E,[e("div",L,[p(n.$slots,"header",{},()=>[e("h5",N,_(d.title),1)]),m[0]||(m[0]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",R,[p(n.$slots,"body")]),n.$slots.footer?(u(),k("div",V,[p(n.$slots,"footer")])):w("",!0)])],2)],8,T)]))}},A={class:"text-main",style:{"white-space":"pre-line"}},j={__name:"ConfirmModal",emits:["confirm"],setup(d,{expose:f,emit:b}){const v=b,o=t(null),s=t(""),a=t(""),i=t("Confirm"),c=t("btn-action-danger"),r=t(!0),n=t(null),m=l=>{s.value=l.title||"Are you sure?",a.value=l.message||"",i.value=l.confirmText||"Confirm",c.value=l.confirmBtnClass||"btn-action-danger",r.value=l.showCancel!==!1,n.value=l.data||null,o.value.show()},h=()=>{o.value.hide()},x=()=>{v("confirm",n.value),h()};return f({open:m,close:h}),(l,D)=>(u(),C(q,{id:"confirmModal",title:s.value,ref_key:"modal",ref:o},{body:y(()=>[e("p",A,_(a.value),1)]),footer:y(()=>[r.value?(u(),k("button",{key:0,type:"button",class:"btn-action btn-action-secondary",onClick:h},"Cancel")):w("",!0),e("button",{type:"button",class:g(["btn-action",c.value]),onClick:x},_(i.value),3)]),_:1},8,["title"]))}};export{q as _,j as a};
|
||||
@@ -1 +0,0 @@
|
||||
import{M as B}from"./vendor-ui-jlFFG6nm.js";import{r as o,o as M,b as $,l as C,k as u,d as e,y as g,e as S,c as k,x as w,K as _,T as z,t as p,m as y}from"./index-DQu6UtRL.js";const T=["id"],E={class:"modal-content"},L={class:"modal-header border-0 pb-0"},N={class:"modal-title fw-bold",style:{color:"var(--text-heading)"}},R={class:"modal-body"},V={key:0,class:"modal-footer border-0 pt-0"},q={__name:"BaseModal",props:{id:{type:String,required:!0},title:{type:String,default:""},size:{type:String,default:""}},emits:["close","opened","closed"],setup(d,{expose:f,emit:b}){const v=d,t=b,s=o(null);let a=null;const i=v.size||"",c=()=>{a?.show()},r=()=>{a?.hide()};return M(()=>{a=new B(s.value),s.value.addEventListener("shown.bs.modal",()=>{t("opened")}),s.value.addEventListener("hidden.bs.modal",()=>{t("closed"),t("close")})}),$(()=>{a?.dispose()}),f({show:c,hide:r}),(n,m)=>(u(),C(z,{to:"body"},[e("div",{class:"modal fade",id:d.id,tabindex:"-1","aria-hidden":"true",ref_key:"modalRef",ref:s},[e("div",{class:g(["modal-dialog modal-dialog-centered",S(i)])},[e("div",E,[e("div",L,[_(n.$slots,"header",{},()=>[e("h5",N,p(d.title),1)]),m[0]||(m[0]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1))]),e("div",R,[_(n.$slots,"body")]),n.$slots.footer?(u(),k("div",V,[_(n.$slots,"footer")])):w("",!0)])],2)],8,T)]))}},A={class:"text-main"},j={__name:"ConfirmModal",emits:["confirm"],setup(d,{expose:f,emit:b}){const v=b,t=o(null),s=o(""),a=o(""),i=o("Confirm"),c=o("btn-action-danger"),r=o(!0),n=o(null),m=l=>{s.value=l.title||"Are you sure?",a.value=l.message||"",i.value=l.confirmText||"Confirm",c.value=l.confirmBtnClass||"btn-action-danger",r.value=l.showCancel!==!1,n.value=l.data||null,t.value.show()},h=()=>{t.value.hide()},x=()=>{v("confirm",n.value),h()};return f({open:m,close:h}),(l,D)=>(u(),C(q,{id:"confirmModal",title:s.value,ref_key:"modal",ref:t},{body:y(()=>[e("p",A,p(a.value),1)]),footer:y(()=>[r.value?(u(),k("button",{key:0,type:"button",class:"btn-action btn-action-secondary",onClick:h},"Cancel")):w("",!0),e("button",{type:"button",class:g(["btn-action",c.value]),onClick:x},p(i.value),3)]),_:1},8,["title"]))}};export{q as _,j as a};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as I,r as P,s as m,o as A,b as T,c,d as t,C as D,x as N,w as l,q as a,v as V,h as B,g as w,t as R,j as L,B as M,z as O,k as p}from"./index-DQu6UtRL.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const G={class:"config-wrapper"},j={class:"config-card"},F={class:"config-row"},Q={class:"config-col"},Y={class:"config-col"},H={class:"config-row"},X={class:"config-col",style:{"max-width":"50%"}},J={class:"select-container"},W={class:"config-row"},Z={class:"config-col"},h={class:"config-col"},ss={class:"config-row"},ts={class:"config-col"},es={class:"config-col"},ns={class:"config-row"},is={class:"config-col"},ls={class:"config-col"},as={class:"config-row"},os={class:"config-col"},rs={class:"select-container"},us={class:"config-col"},ds={class:"number-input-container"},cs={class:"number-input-controls"},ps={class:"config-row"},fs={class:"config-col"},ys={class:"number-input-container"},vs={class:"number-input-controls"},gs={class:"config-col"},bs={class:"number-input-container"},_s={class:"number-input-controls"},ms={class:"config-row"},ws={class:"config-col"},Cs={class:"number-input-container"},ks={class:"number-input-controls"},xs={class:"config-col"},qs={class:"toggle-wrapper"},Is={class:"toggle-switch"},Ps={class:"btn-action-group"},Vs=["disabled"],zs=["disabled","title"],Us={key:0,class:"fas fa-spinner fa-spin"},Ss={key:1,class:"fas fa-play-circle"},Ks=["disabled"],Es={key:0,class:"fas fa-spinner fa-spin"},$s={key:1,class:"fas fa-trash-alt"},As={key:0,class:"config-label"},Rs={__name:"PKIConfig",setup(Ts){const{profilesApiClient:f}=L(),z=M(),{refresh:C}=O(),n=I({fqdn_ca:"",fqdn_server:"",easyrsa_dn:"cn_only",easyrsa_req_country:"",easyrsa_req_province:"",easyrsa_req_city:"",easyrsa_req_org:"",easyrsa_req_email:"",easyrsa_req_ou:"",easyrsa_key_size:2048,easyrsa_ca_expire:null,easyrsa_cert_expire:null,easyrsa_cert_renew:null,easyrsa_crl_days:null,easyrsa_batch:!0}),r=P(!1),u=P(""),o=I({state:"idle",step:null,initialized:!1,error:null}),g=m(()=>o.state==="running"||u.value==="init"),b=m(()=>r.value||g.value),U={"init-pki":"Initializing PKI...",ca:"Building CA...","server-cert":"Building server certificate...",dh:"Generating DH parameters (this can take several minutes)...","ta-key":"Generating TLS key...",crl:"Generating CRL..."},S=m(()=>U[o.step]||"Initializing PKI...");let y=null;const d=(i,s="success")=>z.show(i,s),K=async()=>{try{const s=(await f.get("/config",{params:{section:"pki"}})).data,e=s.pki?s.pki:s;Object.keys(e).forEach(_=>{n.hasOwnProperty(_)&&(n[_]=e[_])})}catch(i){console.error(i),d("Failed to load PKI config from Management API.","error")}},k=()=>{y&&(clearInterval(y),y=null)},x=()=>{y||(y=setInterval(()=>v(),3e3))},v=async(i=!1)=>{const s=o.state==="running";try{const e=await f.get("/system/init/status");Object.assign(o,e.data)}catch(e){console.error(e);return}if(o.state==="running"){x();return}k(),s&&C(),s&&o.state==="done"?d("PKI initialized successfully!","success"):(s||i)&&o.state==="error"&&d(`Error initializing: ${o.error}`,"error")},q=async()=>{r.value=!0,u.value="save";try{await f.put("/config/pki",n),d("Configuration saved successfully!","success")}catch(i){d(`Error saving: ${i.message}`,"error")}finally{r.value=!1,u.value=""}},E=async()=>{if(confirm("Are you sure you want to Initialize system? This will start the PKI initialization process.")){r.value=!0,u.value="init";try{await f.post("/system/init"),o.state="running",x()}catch(i){i.response&&i.response.status===409?await v():d(`Error initializing: ${i.response?.data?.detail||i.message}`,"error")}finally{r.value=!1,u.value=""}}},$=async()=>{if(confirm("Are you sure you want to CLEAR PKI? This will delete all certificates and cannot be undone.")){r.value=!0,u.value="clear";try{const s=(await f.delete("/system/pki")).data;d(s.message||"PKI cleared successfully!","warning"),await v(),C()}catch(i){d(`Error clearing PKI: ${i.response?.data?.detail||i.message}`,"error")}finally{r.value=!1,u.value=""}}};return A(()=>{K(),v(!0)}),T(k),(i,s)=>(p(),c("div",G,[t("div",j,[s[58]||(s[58]=t("div",{class:"config-header"},[t("h1",null,"PKI Infrastructure Configuration")],-1)),t("form",{onSubmit:D(q,["prevent"])},[t("div",F,[t("div",Q,[s[23]||(s[23]=t("label",{class:"config-label"},"FQDN: CA Cert CN",-1)),l(t("input",{type:"text",class:"config-input","onUpdate:modelValue":s[0]||(s[0]=e=>n.fqdn_ca=e)},null,512),[[a,n.fqdn_ca]])]),t("div",Y,[s[24]||(s[24]=t("label",{class:"config-label"},"FQDN: Server Cert CN",-1)),l(t("input",{type:"text",class:"config-input","onUpdate:modelValue":s[1]||(s[1]=e=>n.fqdn_server=e)},null,512),[[a,n.fqdn_server]])])]),s[55]||(s[55]=t("div",{class:"config-divider"},null,-1)),t("div",H,[t("div",X,[s[27]||(s[27]=t("label",{class:"config-label"},"EASYRSA DN",-1)),t("div",J,[l(t("select",{class:"config-select","onUpdate:modelValue":s[2]||(s[2]=e=>n.easyrsa_dn=e)},[...s[25]||(s[25]=[t("option",{value:"cn_only"},"CN_ONLY",-1),t("option",{value:"org"},"ORG",-1)])],512),[[V,n.easyrsa_dn]]),s[26]|Line truncated
|
||||
import{a as I,r as P,s as m,o as A,b as T,c,d as t,C as D,x as N,w as l,q as a,v as V,h as B,g as w,t as R,j as L,B as M,z as O,k as p}from"./index-BsVv6gaD.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const G={class:"config-wrapper"},j={class:"config-card"},F={class:"config-row"},Q={class:"config-col"},Y={class:"config-col"},H={class:"config-row"},X={class:"config-col",style:{"max-width":"50%"}},J={class:"select-container"},W={class:"config-row"},Z={class:"config-col"},h={class:"config-col"},ss={class:"config-row"},ts={class:"config-col"},es={class:"config-col"},ns={class:"config-row"},is={class:"config-col"},ls={class:"config-col"},as={class:"config-row"},os={class:"config-col"},rs={class:"select-container"},us={class:"config-col"},ds={class:"number-input-container"},cs={class:"number-input-controls"},ps={class:"config-row"},fs={class:"config-col"},ys={class:"number-input-container"},vs={class:"number-input-controls"},gs={class:"config-col"},bs={class:"number-input-container"},_s={class:"number-input-controls"},ms={class:"config-row"},ws={class:"config-col"},Cs={class:"number-input-container"},ks={class:"number-input-controls"},xs={class:"config-col"},qs={class:"toggle-wrapper"},Is={class:"toggle-switch"},Ps={class:"btn-action-group"},Vs=["disabled"],zs=["disabled","title"],Us={key:0,class:"fas fa-spinner fa-spin"},Ss={key:1,class:"fas fa-play-circle"},Ks=["disabled"],Es={key:0,class:"fas fa-spinner fa-spin"},$s={key:1,class:"fas fa-trash-alt"},As={key:0,class:"config-label"},Rs={__name:"PKIConfig",setup(Ts){const{profilesApiClient:f}=L(),z=M(),{refresh:C}=O(),n=I({fqdn_ca:"",fqdn_server:"",easyrsa_dn:"cn_only",easyrsa_req_country:"",easyrsa_req_province:"",easyrsa_req_city:"",easyrsa_req_org:"",easyrsa_req_email:"",easyrsa_req_ou:"",easyrsa_key_size:2048,easyrsa_ca_expire:null,easyrsa_cert_expire:null,easyrsa_cert_renew:null,easyrsa_crl_days:null,easyrsa_batch:!0}),r=P(!1),u=P(""),o=I({state:"idle",step:null,initialized:!1,error:null}),g=m(()=>o.state==="running"||u.value==="init"),b=m(()=>r.value||g.value),U={"init-pki":"Initializing PKI...",ca:"Building CA...","server-cert":"Building server certificate...",dh:"Generating DH parameters (this can take several minutes)...","ta-key":"Generating TLS key...",crl:"Generating CRL..."},S=m(()=>U[o.step]||"Initializing PKI...");let y=null;const d=(i,s="success")=>z.show(i,s),K=async()=>{try{const s=(await f.get("/config",{params:{section:"pki"}})).data,e=s.pki?s.pki:s;Object.keys(e).forEach(_=>{n.hasOwnProperty(_)&&(n[_]=e[_])})}catch(i){console.error(i),d("Failed to load PKI config from Management API.","error")}},k=()=>{y&&(clearInterval(y),y=null)},x=()=>{y||(y=setInterval(()=>v(),3e3))},v=async(i=!1)=>{const s=o.state==="running";try{const e=await f.get("/system/init/status");Object.assign(o,e.data)}catch(e){console.error(e);return}if(o.state==="running"){x();return}k(),s&&C(),s&&o.state==="done"?d("PKI initialized successfully!","success"):(s||i)&&o.state==="error"&&d(`Error initializing: ${o.error}`,"error")},q=async()=>{r.value=!0,u.value="save";try{await f.put("/config/pki",n),d("Configuration saved successfully!","success")}catch(i){d(`Error saving: ${i.message}`,"error")}finally{r.value=!1,u.value=""}},E=async()=>{if(confirm("Are you sure you want to Initialize system? This will start the PKI initialization process.")){r.value=!0,u.value="init";try{await f.post("/system/init"),o.state="running",x()}catch(i){i.response&&i.response.status===409?await v():d(`Error initializing: ${i.response?.data?.detail||i.message}`,"error")}finally{r.value=!1,u.value=""}}},$=async()=>{if(confirm("Are you sure you want to CLEAR PKI? This will delete all certificates and cannot be undone.")){r.value=!0,u.value="clear";try{const s=(await f.delete("/system/pki")).data;d(s.message||"PKI cleared successfully!","warning"),await v(),C()}catch(i){d(`Error clearing PKI: ${i.response?.data?.detail||i.message}`,"error")}finally{r.value=!1,u.value=""}}};return A(()=>{K(),v(!0)}),T(k),(i,s)=>(p(),c("div",G,[t("div",j,[s[58]||(s[58]=t("div",{class:"config-header"},[t("h1",null,"PKI Infrastructure Configuration")],-1)),t("form",{onSubmit:D(q,["prevent"])},[t("div",F,[t("div",Q,[s[23]||(s[23]=t("label",{class:"config-label"},"FQDN: CA Cert CN",-1)),l(t("input",{type:"text",class:"config-input","onUpdate:modelValue":s[0]||(s[0]=e=>n.fqdn_ca=e)},null,512),[[a,n.fqdn_ca]])]),t("div",Y,[s[24]||(s[24]=t("label",{class:"config-label"},"FQDN: Server Cert CN",-1)),l(t("input",{type:"text",class:"config-input","onUpdate:modelValue":s[1]||(s[1]=e=>n.fqdn_server=e)},null,512),[[a,n.fqdn_server]])])]),s[55]||(s[55]=t("div",{class:"config-divider"},null,-1)),t("div",H,[t("div",X,[s[27]||(s[27]=t("label",{class:"config-label"},"EASYRSA DN",-1)),t("div",J,[l(t("select",{class:"config-select","onUpdate:modelValue":s[2]||(s[2]=e=>n.easyrsa_dn=e)},[...s[25]||(s[25]=[t("option",{value:"cn_only"},"CN_ONLY",-1),t("option",{value:"org"},"ORG",-1)])],512),[[V,n.easyrsa_dn]]),s[26]|Line truncated
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{s as S,z as w,a as C,r as g,o as M,b as $,c as o,d as t,t as c,n as P,y as x,e as y,g as _,j as I,B as U,k as i}from"./index-DQu6UtRL.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const j={class:"config-wrapper"},A={class:"config-card"},B={class:"stats-grid mb-4"},N={class:"stat-item full-width cpu-progress"},z={class:"stat-label d-flex justify-content-between"},T={class:"progress"},V=["aria-valuenow"],D={class:"stat-item"},F={class:"d-flex align-items-center"},O={class:"stat-item"},R={class:"stat-value"},E={class:"stat-item"},H={class:"stat-value"},K={class:"stat-item"},L={class:"stat-value monospace"},q={class:"btn-action-group justify-content-center"},G=["disabled","title"],J={key:0,class:"fas fa-spinner fa-spin"},Q={key:1,class:"fas fa-play"},W=["disabled","title"],X={key:0,class:"fas fa-spinner fa-spin"},Y={key:1,class:"fas fa-sync-alt"},Z=["disabled"],ss={key:0,class:"fas fa-spinner fa-spin"},ts={key:1,class:"fas fa-stop"},is={__name:"ServerManagement",setup(es){const{profilesApiClient:f}=I(),h=U(),{status:r,refresh:k}=w(),b=S(()=>r.server_ready?"":r.pki_ready&&r.missing.length?`Missing server files: ${r.missing.join(", ")}`:"Initialize PKI first"),a=C({status:"unknown",pid:null,cpu_percent:0,memory_mb:0,uptime:null}),n=g(!1),l=g("");let d=null;const m=(e,s="success")=>h.show(e,s),p=async()=>{try{const e=await f.get("/server/process/stats");Object.assign(a,e.data)}catch(e){console.error("Failed to fetch stats:",e)}},v=async e=>{if(confirm(`Are you sure you want to ${e.toUpperCase()} the OpenVPN service?`)){n.value=!0,l.value=e;try{const s=await f.post(`/server/process/${e}`);m(s.data.message||`Service ${e} successful`,"success"),setTimeout(p,1e3)}catch(s){const u=s.response?.data?.detail||s.message;m(`Failed to ${e}: ${u}`,"error")}finally{n.value=!1,l.value=""}}};return M(()=>{k(),p(),d=setInterval(p,5e3)}),$(()=>{d&&clearInterval(d)}),(e,s)=>(i(),o("div",j,[t("div",A,[s[11]||(s[11]=t("div",{class:"config-header"},[t("h1",null,"Server Process Management")],-1)),t("div",B,[t("div",N,[t("label",z,[s[3]||(s[3]=t("span",null,"CPU Usage",-1)),t("span",null,c(a.cpu_percent)+"%",1)]),t("div",T,[t("div",{class:"progress-bar progress-bar-brand",role:"progressbar",style:P({width:Math.min(a.cpu_percent,100)+"%"}),"aria-valuenow":a.cpu_percent,"aria-valuemin":"0","aria-valuemax":"100"},null,12,V)])]),t("div",D,[s[4]||(s[4]=t("label",{class:"stat-label"},"Status",-1)),t("div",F,[t("span",{class:x(["status-badge","status-"+(a.status==="running"?"active":"revoked")])},c(a.status.toUpperCase()),3)])]),t("div",O,[s[5]||(s[5]=t("label",{class:"stat-label"},"Process ID",-1)),t("div",R,c(a.pid||"N/A"),1)]),t("div",E,[s[6]||(s[6]=t("label",{class:"stat-label"},"Memory (RSS)",-1)),t("div",H,c(a.memory_mb)+" MB",1)]),t("div",K,[s[7]||(s[7]=t("label",{class:"stat-label"},"Uptime",-1)),t("div",L,c(a.uptime||"N/A"),1)])]),t("div",q,[t("button",{type:"button",class:"btn-action btn-action-primary",onClick:s[0]||(s[0]=u=>v("start")),disabled:n.value||a.status==="running"||!y(r).server_ready,title:b.value},[n.value&&l.value==="start"?(i(),o("i",J)):(i(),o("i",Q)),s[8]||(s[8]=_(" Start Service ",-1))],8,G),t("button",{type:"button",class:"btn-action btn-action-save",onClick:s[1]||(s[1]=u=>v("restart")),disabled:n.value||!y(r).server_ready,title:b.value},[n.value&&l.value==="restart"?(i(),o("i",X)):(i(),o("i",Y)),s[9]||(s[9]=_(" Restart Service ",-1))],8,W),t("button",{type:"button",class:"btn-action btn-action-danger",onClick:s[2]||(s[2]=u=>v("stop")),disabled:n.value||a.status!=="running"},[n.value&&l.value==="stop"?(i(),o("i",ss)):(i(),o("i",ts)),s[10]||(s[10]=_(" Stop Service ",-1))],8,Z)])])]))}};export{is as default};
|
||||
import{s as S,z as w,a as C,r as g,o as M,b as $,c as o,d as t,t as c,n as P,y as x,e as y,g as _,j as I,B as U,k as i}from"./index-BsVv6gaD.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const j={class:"config-wrapper"},A={class:"config-card"},B={class:"stats-grid mb-4"},N={class:"stat-item full-width cpu-progress"},z={class:"stat-label d-flex justify-content-between"},T={class:"progress"},V=["aria-valuenow"],D={class:"stat-item"},F={class:"d-flex align-items-center"},O={class:"stat-item"},R={class:"stat-value"},E={class:"stat-item"},H={class:"stat-value"},K={class:"stat-item"},L={class:"stat-value monospace"},q={class:"btn-action-group justify-content-center"},G=["disabled","title"],J={key:0,class:"fas fa-spinner fa-spin"},Q={key:1,class:"fas fa-play"},W=["disabled","title"],X={key:0,class:"fas fa-spinner fa-spin"},Y={key:1,class:"fas fa-sync-alt"},Z=["disabled"],ss={key:0,class:"fas fa-spinner fa-spin"},ts={key:1,class:"fas fa-stop"},is={__name:"ServerManagement",setup(es){const{profilesApiClient:f}=I(),h=U(),{status:r,refresh:k}=w(),b=S(()=>r.server_ready?"":r.pki_ready&&r.missing.length?`Missing server files: ${r.missing.join(", ")}`:"Initialize PKI first"),a=C({status:"unknown",pid:null,cpu_percent:0,memory_mb:0,uptime:null}),n=g(!1),l=g("");let d=null;const m=(e,s="success")=>h.show(e,s),p=async()=>{try{const e=await f.get("/server/process/stats");Object.assign(a,e.data)}catch(e){console.error("Failed to fetch stats:",e)}},v=async e=>{if(confirm(`Are you sure you want to ${e.toUpperCase()} the OpenVPN service?`)){n.value=!0,l.value=e;try{const s=await f.post(`/server/process/${e}`);m(s.data.message||`Service ${e} successful`,"success"),setTimeout(p,1e3)}catch(s){const u=s.response?.data?.detail||s.message;m(`Failed to ${e}: ${u}`,"error")}finally{n.value=!1,l.value=""}}};return M(()=>{k(),p(),d=setInterval(p,5e3)}),$(()=>{d&&clearInterval(d)}),(e,s)=>(i(),o("div",j,[t("div",A,[s[11]||(s[11]=t("div",{class:"config-header"},[t("h1",null,"Server Process Management")],-1)),t("div",B,[t("div",N,[t("label",z,[s[3]||(s[3]=t("span",null,"CPU Usage",-1)),t("span",null,c(a.cpu_percent)+"%",1)]),t("div",T,[t("div",{class:"progress-bar progress-bar-brand",role:"progressbar",style:P({width:Math.min(a.cpu_percent,100)+"%"}),"aria-valuenow":a.cpu_percent,"aria-valuemin":"0","aria-valuemax":"100"},null,12,V)])]),t("div",D,[s[4]||(s[4]=t("label",{class:"stat-label"},"Status",-1)),t("div",F,[t("span",{class:x(["status-badge","status-"+(a.status==="running"?"active":"revoked")])},c(a.status.toUpperCase()),3)])]),t("div",O,[s[5]||(s[5]=t("label",{class:"stat-label"},"Process ID",-1)),t("div",R,c(a.pid||"N/A"),1)]),t("div",E,[s[6]||(s[6]=t("label",{class:"stat-label"},"Memory (RSS)",-1)),t("div",H,c(a.memory_mb)+" MB",1)]),t("div",K,[s[7]||(s[7]=t("label",{class:"stat-label"},"Uptime",-1)),t("div",L,c(a.uptime||"N/A"),1)])]),t("div",q,[t("button",{type:"button",class:"btn-action btn-action-primary",onClick:s[0]||(s[0]=u=>v("start")),disabled:n.value||a.status==="running"||!y(r).server_ready,title:b.value},[n.value&&l.value==="start"?(i(),o("i",J)):(i(),o("i",Q)),s[8]||(s[8]=_(" Start Service ",-1))],8,G),t("button",{type:"button",class:"btn-action btn-action-save",onClick:s[1]||(s[1]=u=>v("restart")),disabled:n.value||!y(r).server_ready,title:b.value},[n.value&&l.value==="restart"?(i(),o("i",X)):(i(),o("i",Y)),s[9]||(s[9]=_(" Restart Service ",-1))],8,W),t("button",{type:"button",class:"btn-action btn-action-danger",onClick:s[2]||(s[2]=u=>v("stop")),disabled:n.value||a.status!=="running"},[n.value&&l.value==="stop"?(i(),o("i",ss)):(i(),o("i",ts)),s[10]||(s[10]=_(" Stop Service ",-1))],8,Z)])])]))}};export{is as default};
|
||||
+1
-1
@@ -1 +1 @@
|
||||
import{a as N,r as k,D as A,o as E,z as F,c as i,e as R,d as t,A as B,g as v,m as j,E as z,x as _,w as l,v as K,q as u,h as c,F as C,i as x,C as O,j as q,B as G,k as a}from"./index-DQu6UtRL.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const X={class:"config-wrapper"},H={key:0,class:"config-card"},J={key:1,class:"config-card"},Q={class:"config-row"},W={class:"config-col"},Y={class:"select-container"},Z={class:"config-col"},h={class:"number-input-container"},ss={class:"number-input-controls"},ts={class:"config-row"},ns={class:"config-col"},os={class:"config-col"},es={class:"config-row"},ls={class:"config-col"},is={class:"number-input-container"},as={class:"number-input-controls"},rs={class:"config-col"},ds={class:"number-input-container"},us={class:"number-input-controls"},ps={class:"config-row"},cs={class:"config-col"},fs={class:"toggle-wrapper"},vs={class:"toggle-switch"},gs={key:0,class:"nested-box fade-in"},bs={class:"config-row mb-2"},ms={class:"config-col"},_s={class:"list-container"},ys=["onUpdate:modelValue"],ks=["onClick"],ws={class:"config-row"},Cs={class:"config-col"},xs={class:"toggle-wrapper"},Ss={class:"toggle-switch"},Vs={key:1,class:"nested-box fade-in"},Us={class:"config-row mb-2"},Ps={class:"config-col"},Ds={class:"list-container"},Ts=["onUpdate:modelValue"],$s=["onClick"],Is={class:"config-row"},Ls={class:"config-col"},Ms={class:"toggle-wrapper"},Ns={class:"toggle-switch"},As={class:"config-col"},Es={class:"toggle-wrapper"},Fs={class:"toggle-switch"},Rs={class:"config-col"},Bs={class:"toggle-wrapper"},js={class:"toggle-switch"},zs={class:"config-row"},Ks={class:"config-col"},Os={class:"toggle-wrapper"},qs={class:"toggle-switch"},Gs={key:2,class:"nested-box fade-in"},Xs={class:"config-row"},Hs={class:"config-col"},Js={class:"config-row mt-3"},Qs={class:"config-col"},Ws={class:"config-row mt-4"},Ys={class:"config-col"},Zs={class:"toggle-wrapper"},hs={class:"toggle-switch"},st={key:3,class:"nested-box fade-in"},tt={class:"config-row"},nt={class:"config-col"},ot={class:"config-col"},et={class:"number-input-container"},lt={class:"number-input-controls"},it={class:"btn-action-group"},at=["disabled"],rt={key:0,class:"fas fa-spinner fa-spin"},dt={key:1,class:"fas fa-save"},ut=["disabled"],pt={key:0,class:"fas fa-spinner fa-spin"},ct={key:1,class:"fas fa-rocket"},mt={__name:"VPNConfig",setup(ft){const{profilesApiClient:y}=q(),S=G(),{status:V,refresh:w}=F(),n=N({protocol:"udp",port:1194,vpn_network:"",public_ip:"",tun_mtu:0,mssfix:0,tunnel_type:"FULL",split_routes:[],user_defined_dns:!1,dns_servers:[],duplicate_cn:!1,client_to_client:!1,crl_verify:!1,user_defined_cdscripts:!1,connect_script:"",disconnect_script:"",management_interface:!1,management_interface_address:"",management_port:7505}),g=k(!1),p=k(!1),f=k("");A(g,e=>{n.tunnel_type=e?"SPLIT":"FULL"});function U(e){if(!e)return"";const s=e.split(".");let r=0;const o={255:8,254:7,252:6,248:5,240:4,224:3,192:2,128:1,0:0};for(let d of s)r+=o[parseInt(d)]||0;return r}const b=(e,s="success")=>S.show(e,s),P=()=>n.split_routes.push(""),D=e=>n.split_routes.splice(e,1),T=()=>n.dns_servers.push(""),$=e=>n.dns_servers.splice(e,1),I=async()=>{try{const s=(await y.get("/config",{params:{section:"server"}})).data,r=s.server?s.server:s;if(Object.keys(r).forEach(o=>{n.hasOwnProperty(o)&&(o==="tunnel_type"&&(g.value=r[o]==="SPLIT"),n[o]=r[o])}),r.vpn_network&&r.vpn_netmask){const o=U(r.vpn_netmask);o&&(n.vpn_network=`${r.vpn_network}/${o}`)}}catch(e){console.error(e),b("Failed to load Server config from Management API.","error")}},L=async()=>{p.value=!0,f.value="save";const e={...n};if(e.split_routes=e.split_routes.filter(s=>s&&s.trim()!==""),e.dns_servers=e.dns_servers.filter(s=>s&&s.trim()!==""),e.vpn_network.includes("/")){const[s,r]=e.vpn_network.split("/");e.vpn_network=s}try{await y.put("/config/server",e),b("Server configuration saved!","success")}catch(s){b(`Error saving: ${s.response?.data?.detail||s.message}`,"error")}finally{p.value=!1,f.value=""}},M=async()=>{p.value=!0,f.value="apply";try{const s=(await y.post("/server/configure")).data;b(s.message||"Configuration applied!","success")}catch(e){b(`Error applying: ${e.response?.data?.detail||e.message}`,"error"),w()}finally{p.value=!1,f.value=""}};return E(()=>{w(),I()}),(e,s)=>{const r=z("router-link");return a(),i("div",X,[R(V).pki_ready?(a(),i("div",J,[s[75]||(s[75]=t("div",{class:"config-header"},[t("h1",null,"Server Infrastructure Configuration")],-1)),t("form",{onSubmit:O(L,["prevent"])},[t("div",Q,[t("div",W,[s[30]||(s[30]=t("label",{class:"config-label"},"Tunnel Protocol",-1)),t("div",Y,[l(t("select",{class:"config-select","onUpdate:modelValue":s[0]||(s[0]=o=>n.protocol=o)},[...s[28]||(s[28]=[t("option",{value:"tcp"},"TCP",-1),t("option",{value:"udp"},"UDP",-1)])],512),[[K,n.protocol]]),s[29]||(s[29]=t("div",{class:"select-arrow"},[t("i",{class:"fas fa-chevron-down"})],-1))])]),t("div",Z,[s[33]||(s[33]=t("label",{class:"config-label"},"Tunnel Port",-1)),t("div",h,[l(Line truncated
|
||||
import{a as N,r as k,D as A,o as E,z as F,c as i,e as R,d as t,A as B,g as v,m as j,E as z,x as _,w as l,v as K,q as u,h as c,F as C,i as x,C as O,j as q,B as G,k as a}from"./index-BsVv6gaD.js";import"./vendor-charts-Bcjh2pZL.js";import"./vendor-ui-jlFFG6nm.js";const X={class:"config-wrapper"},H={key:0,class:"config-card"},J={key:1,class:"config-card"},Q={class:"config-row"},W={class:"config-col"},Y={class:"select-container"},Z={class:"config-col"},h={class:"number-input-container"},ss={class:"number-input-controls"},ts={class:"config-row"},ns={class:"config-col"},os={class:"config-col"},es={class:"config-row"},ls={class:"config-col"},is={class:"number-input-container"},as={class:"number-input-controls"},rs={class:"config-col"},ds={class:"number-input-container"},us={class:"number-input-controls"},ps={class:"config-row"},cs={class:"config-col"},fs={class:"toggle-wrapper"},vs={class:"toggle-switch"},gs={key:0,class:"nested-box fade-in"},bs={class:"config-row mb-2"},ms={class:"config-col"},_s={class:"list-container"},ys=["onUpdate:modelValue"],ks=["onClick"],ws={class:"config-row"},Cs={class:"config-col"},xs={class:"toggle-wrapper"},Ss={class:"toggle-switch"},Vs={key:1,class:"nested-box fade-in"},Us={class:"config-row mb-2"},Ps={class:"config-col"},Ds={class:"list-container"},Ts=["onUpdate:modelValue"],$s=["onClick"],Is={class:"config-row"},Ls={class:"config-col"},Ms={class:"toggle-wrapper"},Ns={class:"toggle-switch"},As={class:"config-col"},Es={class:"toggle-wrapper"},Fs={class:"toggle-switch"},Rs={class:"config-col"},Bs={class:"toggle-wrapper"},js={class:"toggle-switch"},zs={class:"config-row"},Ks={class:"config-col"},Os={class:"toggle-wrapper"},qs={class:"toggle-switch"},Gs={key:2,class:"nested-box fade-in"},Xs={class:"config-row"},Hs={class:"config-col"},Js={class:"config-row mt-3"},Qs={class:"config-col"},Ws={class:"config-row mt-4"},Ys={class:"config-col"},Zs={class:"toggle-wrapper"},hs={class:"toggle-switch"},st={key:3,class:"nested-box fade-in"},tt={class:"config-row"},nt={class:"config-col"},ot={class:"config-col"},et={class:"number-input-container"},lt={class:"number-input-controls"},it={class:"btn-action-group"},at=["disabled"],rt={key:0,class:"fas fa-spinner fa-spin"},dt={key:1,class:"fas fa-save"},ut=["disabled"],pt={key:0,class:"fas fa-spinner fa-spin"},ct={key:1,class:"fas fa-rocket"},mt={__name:"VPNConfig",setup(ft){const{profilesApiClient:y}=q(),S=G(),{status:V,refresh:w}=F(),n=N({protocol:"udp",port:1194,vpn_network:"",public_ip:"",tun_mtu:0,mssfix:0,tunnel_type:"FULL",split_routes:[],user_defined_dns:!1,dns_servers:[],duplicate_cn:!1,client_to_client:!1,crl_verify:!1,user_defined_cdscripts:!1,connect_script:"",disconnect_script:"",management_interface:!1,management_interface_address:"",management_port:7505}),g=k(!1),p=k(!1),f=k("");A(g,e=>{n.tunnel_type=e?"SPLIT":"FULL"});function U(e){if(!e)return"";const s=e.split(".");let r=0;const o={255:8,254:7,252:6,248:5,240:4,224:3,192:2,128:1,0:0};for(let d of s)r+=o[parseInt(d)]||0;return r}const b=(e,s="success")=>S.show(e,s),P=()=>n.split_routes.push(""),D=e=>n.split_routes.splice(e,1),T=()=>n.dns_servers.push(""),$=e=>n.dns_servers.splice(e,1),I=async()=>{try{const s=(await y.get("/config",{params:{section:"server"}})).data,r=s.server?s.server:s;if(Object.keys(r).forEach(o=>{n.hasOwnProperty(o)&&(o==="tunnel_type"&&(g.value=r[o]==="SPLIT"),n[o]=r[o])}),r.vpn_network&&r.vpn_netmask){const o=U(r.vpn_netmask);o&&(n.vpn_network=`${r.vpn_network}/${o}`)}}catch(e){console.error(e),b("Failed to load Server config from Management API.","error")}},L=async()=>{p.value=!0,f.value="save";const e={...n};if(e.split_routes=e.split_routes.filter(s=>s&&s.trim()!==""),e.dns_servers=e.dns_servers.filter(s=>s&&s.trim()!==""),e.vpn_network.includes("/")){const[s,r]=e.vpn_network.split("/");e.vpn_network=s}try{await y.put("/config/server",e),b("Server configuration saved!","success")}catch(s){b(`Error saving: ${s.response?.data?.detail||s.message}`,"error")}finally{p.value=!1,f.value=""}},M=async()=>{p.value=!0,f.value="apply";try{const s=(await y.post("/server/configure")).data;b(s.message||"Configuration applied!","success")}catch(e){b(`Error applying: ${e.response?.data?.detail||e.message}`,"error"),w()}finally{p.value=!1,f.value=""}};return E(()=>{w(),I()}),(e,s)=>{const r=z("router-link");return a(),i("div",X,[R(V).pki_ready?(a(),i("div",J,[s[75]||(s[75]=t("div",{class:"config-header"},[t("h1",null,"Server Infrastructure Configuration")],-1)),t("form",{onSubmit:O(L,["prevent"])},[t("div",Q,[t("div",W,[s[30]||(s[30]=t("label",{class:"config-label"},"Tunnel Protocol",-1)),t("div",Y,[l(t("select",{class:"config-select","onUpdate:modelValue":s[0]||(s[0]=o=>n.protocol=o)},[...s[28]||(s[28]=[t("option",{value:"tcp"},"TCP",-1),t("option",{value:"udp"},"UDP",-1)])],512),[[K,n.protocol]]),s[29]||(s[29]=t("div",{class:"select-arrow"},[t("i",{class:"fas fa-chevron-down"})],-1))])]),t("div",Z,[s[33]||(s[33]=t("label",{class:"config-label"},"Tunnel Port",-1)),t("div",h,[l(Line truncated
|
||||
@@ -0,0 +1,7 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Analytics-D8_MsU7I.js","assets/vendor-charts-Bcjh2pZL.js","assets/vendor-ui-jlFFG6nm.js","assets/Certificates-DI1YjC4x.js","assets/ConfirmModal-CzamKe9d.js","assets/PKIConfig-DcX7kknv.js","assets/VPNConfig-hH9toHBV.js","assets/ServerManagement-DcQnn0e_.js","assets/BackupRestore-p02MFVQ3.js","assets/Account-D01xrOy_.js"])))=>i.map(i=>d[i]);
|
||||
import{C as zu,r as om}from"./vendor-charts-Bcjh2pZL.js";import{M as lm}from"./vendor-ui-jlFFG6nm.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function wl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Be={},Ds=[],gn=()=>{},Gu=()=>!1,ki=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),El=e=>e.startsWith("onUpdate:"),rt=Object.assign,Al=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},am=Object.prototype.hasOwnProperty,ke=(e,t)=>am.call(e,t),oe=Array.isArray,Ms=e=>Or(e)==="[object Map]",zs=e=>Or(e)==="[object Set]",Cc=e=>Or(e)==="[object Date]",me=e=>typeof e=="function",Xe=e=>typeof e=="string",Zt=e=>typeof e=="symbol",$e=e=>e!==null&&typeof e=="object",Ju=e=>($e(e)||me(e))&&me(e.then)&&me(e.catch),Xu=Object.prototype.toString,Or=e=>Xu.call(e),cm=e=>Or(e).slice(8,-1),Yu=e=>Or(e)==="[object Object]",Cl=e=>Xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ur=wl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ni=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},um=/-\w/g,zt=Ni(e=>e.replace(um,t=>t.slice(1).toUpperCase())),fm=/\B([A-Z])/g,qn=Ni(e=>e.replace(fm,"-$1").toLowerCase()),Ii=Ni(e=>e.charAt(0).toUpperCase()+e.slice(1)),ko=Ni(e=>e?`on${Ii(e)}`:""),Un=(e,t)=>!Object.is(e,t),fi=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Qu=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Li=e=>{const t=parseFloat(e);return isNaN(t)?e:t},dm=e=>{const t=Xe(e)?Number(e):NaN;return isNaN(t)?e:t};let xc;const Di=()=>xc||(xc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mi(e){if(oe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Xe(s)?gm(s):Mi(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(Xe(e)||$e(e))return e}const hm=/;(?![^(]*\))/g,pm=/:([^]+)/,mm=/\/\*[^]*?\*\//g;function gm(e){const t={};return e.replace(mm,"").split(hm).forEach(n=>{if(n){const s=n.split(pm);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ft(e){let t="";if(Xe(e))t=e;else if(oe(e))for(let n=0;n<e.length;n++){const s=ft(e[n]);s&&(t+=s+" ")}else if($e(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const _m="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",bm=wl(_m);function Zu(e){return!!e||e===""}function vm(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Rr(e[s],t[s]);return n}function Rr(e,t){if(e===t)return!0;let n=Cc(e),s=Cc(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Zt(e),s=Zt(t),n||s)return e===t;if(n=oe(e),s=oe(t),n||s)return n&&s?vm(e,t):!1;if(n=$e(e),s=$e(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const l in e){const c=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(c&&!u||!c&&u||!Rr(e[l],t[l]))return!1}}return String(e)===String(t)}function xl(e,t){return e.findIndex(n=>Rr(n,t))}const ef=e=>!!(e&&e.__v_isRef===!0),Ge=e=>Xe(e)?e:e==null?"":oe(e)||$e(e)&&(e.toString===Xu||!me(e.toString))?ef(e)?Ge(e.value):JSON.stringify(e,tf,2):String(e),tf=(e,t)=>ef(t)?tf(e,t.value):Ms(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[No(s,o)+" =>"]=r,n),{})}:zs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>No(n))}:Zt(t)?No(t):$e(t)&&!oe(t)&&!Yu(t)?String(t):t,No=(e,t="")=>{var n;return Zt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Rt;class ym{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Rt,!t&&Rt&&(this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Rt;try{return Rt=this,t()}finally{Rt=n}}}on(){++this._on===1&&(this.prevScope=Rt,Rt=this)}off(){this._on>0&&--this._on===0&&(Rt=this.prevScope,this.pLine truncated
|
||||
`).forEach(function(l){r=l.indexOf(":"),n=l.substring(0,r).trim().toLowerCase(),s=l.substring(r+1).trim(),!(!n||t[n]&&Wb[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},_u=Symbol("internals");function ir(e){return e&&String(e).trim().toLowerCase()}function vi(e){return e===!1||e==null?e:S.isArray(e)?e.map(vi):String(e)}function zb(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const Gb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vo(e,t,n,s,r){if(S.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!S.isString(t)){if(S.isString(s))return t.indexOf(s)!==-1;if(S.isRegExp(s))return s.test(t)}}function Jb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Xb(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,o,l){return this[s].call(this,t,r,o,l)},configurable:!0})})}let kt=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function o(c,u,h){const d=ir(u);if(!d)throw new Error("header name must be a non-empty string");const p=S.findKey(r,d);(!p||r[p]===void 0||h===!0||h===void 0&&r[p]!==!1)&&(r[p||u]=vi(c))}const l=(c,u)=>S.forEach(c,(h,d)=>o(h,d,u));if(S.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(S.isString(t)&&(t=t.trim())&&!Gb(t))l(Kb(t),n);else if(S.isObject(t)&&S.isIterable(t)){let c={},u,h;for(const d of t){if(!S.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[h=d[0]]=(u=c[h])?S.isArray(u)?[...u,d[1]]:[u,d[1]]:d[1]}l(c,n)}else t!=null&&o(n,t,s);return this}get(t,n){if(t=ir(t),t){const s=S.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return zb(r);if(S.isFunction(n))return n.call(this,r,s);if(S.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ir(t),t){const s=S.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Vo(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function o(l){if(l=ir(l),l){const c=S.findKey(s,l);c&&(!n||Vo(s,s[c],c,n))&&(delete s[c],r=!0)}}return S.isArray(t)?t.forEach(o):o(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const o=n[s];(!t||Vo(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const n=this,s={};return S.forEach(this,(r,o)=>{const l=S.findKey(s,o);if(l){n[l]=vi(r),delete n[o];return}const c=t?Jb(o):String(o).trim();c!==o&&delete n[o],n[c]=vi(r),s[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&S.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[_u]=this[_u]={accessors:{}}).accessors,r=this.prototype;function o(l){const c=ir(l);s[c]||(Xb(r,l),s[c]=!0)}return S.isArray(t)?t.forEach(o):o(t),this}};kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(kt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});S.freezeMethods(kt);function qo(e,t){const n=this||Mr,s=t||n,r=kt.from(s.headers);let o=s.data;return S.forEach(e,function(c){o=c.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function Sd(e){return!!(e&&e.__CANCEL__)}function Js(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}S.inherits(Js,ge,{__CANCEL__:!0});function Td(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Yb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Qb(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,l;return t=t!==void 0?t:1e3,function(u){const h=Date.now(),d=s[o];l||(l=h),n[r]=u,s[r]=h;let p=o,_=0;for(;p!==r;)_+=n[p++],p=p%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),h-l<t)return;const v=d&&h-d;return v?Math.round(_*1e3/v):void 0}}function Zb(e,t){let n=0,s=1e3/t,r,o;const l=(h,d=Date.now())=>{n=d,r=null,o&&(clearTimeout(o),o=null),e(...h)};return[(...h)=>{const d=Date.now(),p=d-n;p>=s?l(h,d):(r=h,o||(o=setTimeout(()=>{o=null,l(r)},s-p)))},()=>r&&l(r)]}const Pi=(e,t,n=3)=>{let s=0;const r=Qb(50,250);return Zb(o=>{const l=o.loaded,c=o.lengthComputable?o.total:void 0,u=l-s,h=r(u),d=l<=c;s=l;const p={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:h||void 0,estimated:h&&c&&d?(c-l)/h:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},bu=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},vu=e=>(...t)=>S.asap(()=>e(...t)),ev=gt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gt.origin),gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent)):()=>!0,tv=gt.hasStandardBrowserEnv?{write(e,t,n,s,r,o,l){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];S.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),S.isString(s)&&c.push(`path=${s}`),S.isString(r)&&c.push(`domain=${r}`),o===!0&&c.push("secure"),S.isString(l)&&c.push(`SameSite=${l}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function nv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Od(e,t,n){let s=!nv(t);return e&&(s||n==!1)?sv(e,t):t}const yu=e=>e instanceof kt?{...e}:e;function ms(e,t){t=t||{};const n={};function s(h,d,p,_){return S.isPlainObject(h)&&S.isPlainObject(d)?S.merge.call({caseless:_},h,d):S.isPlainObject(d)?S.merge({},d):S.isArray(d)?d.slice():d}function r(h,d,p,_){if(S.isUndefined(d)){if(!S.isUndefined(h))return s(void 0,h,p,_)}else return s(h,d,p,_)}function o(h,d){if(!S.isUndefined(d))return s(void 0,d)}function l(h,d){if(S.isUndefined(d)){if(!S.isUndefined(h))return s(void 0,h)}else return s(void 0,d)}function c(h,d,p){if(p in t)return s(h,d);if(p in e)return s(void 0,h)}const u={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(h,d,p)=>r(yu(h),yu(d),p,!0)};return S.forEach(Object.keys({...e,...t}),function(d){const p=u[d]||r,_=p(e[d],t[d],d);S.isUndefined(_)&&p!==c||(n[d]=_)}),n}const Rd=e=>{const t=ms({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:l,auth:c}=t;if(t.headers=l=kt.from(l),t.url=Ad(Od(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),S.isFormData(n)){if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(S.isFunction(n.getHeaders)){const u=n.getHeaders(),h=["content-type","content-length"];Object.entries(u).forEach(([d,p])=>{h.inclu
Line truncated
|
||||
`+l.map(Su).join(`
|
||||
`):" "+Su(l[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return r}const kd={getAdapter:pv,adapters:ql};function Wo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Js(null,e)}function Tu(e){return Wo(e),e.headers=kt.from(e.headers),e.data=qo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),kd.getAdapter(e.adapter||Mr.adapter,e)(e).then(function(s){return Wo(e),s.data=qo.call(e,e.transformResponse,s),s.headers=kt.from(s.headers),s},function(s){return Sd(s)||(Wo(e),s&&s.response&&(s.response.data=qo.call(e,e.transformResponse,s.response),s.response.headers=kt.from(s.response.headers))),Promise.reject(s)})}const Nd="1.13.2",Gi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gi[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Ou={};Gi.transitional=function(t,n,s){function r(o,l){return"[Axios v"+Nd+"] Transitional option '"+o+"'"+l+(s?". "+s:"")}return(o,l,c)=>{if(t===!1)throw new ge(r(l," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!Ou[l]&&(Ou[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,c):!0}};Gi.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function mv(e,t,n){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],l=t[o];if(l){const c=e[o],u=c===void 0||l(c,o,e);if(u!==!0)throw new ge("option "+o+" must be "+u,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const yi={assertOptions:mv,validators:Gi},fn=yi.validators;let hs=class{constructor(t){this.defaults=t||{},this.interceptors={request:new gu,response:new gu}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
||||
`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ms(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&yi.assertOptions(s,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),r!=null&&(S.isFunction(r)?n.paramsSerializer={serialize:r}:yi.assertOptions(r,{encode:fn.function,serialize:fn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),yi.assertOptions(n,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&S.merge(o.common,o[n.method]);o&&S.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=kt.concat(l,o);const c=[];let u=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(u=u&&x.synchronous,c.unshift(x.fulfilled,x.rejected))});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let d,p=0,_;if(!u){const y=[Tu.bind(this),void 0];for(y.unshift(...c),y.push(...h),_=y.length,d=Promise.resolve(n);p<_;)d=d.then(y[p++],y[p++]);return d}_=c.length;let v=n;for(;p<_;){const y=c[p++],x=c[p++];try{v=y(v)}catch(O){x.call(this,O);break}}try{d=Tu.call(this,v)}catch(y){return Promise.reject(y)}for(p=0,_=h.length;p<_;)d=d.then(h[p++],h[p++]);return d}getUri(t){t=ms(this.defaults,t);const n=Od(t.baseURL,t.url,t.allowAbsoluteUrls);return Ad(n,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){hs.prototype[t]=function(n,s){return this.request(ms(s||{},{method:t,url:n,data:(s||{}).data}))}});S.forEach(["post","put","patch"],function(t){function n(s){return function(o,l,c){return this.request(ms(c||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:l}))}}hs.prototype[t]=n(),hs.prototype[t+"Form"]=n(!0)});let gv=class Id{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const s=this;this.promise.then(r=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const l=new Promise(c=>{s.subscribe(c),o=c}).then(r);return l.cancel=function(){s.unsubscribe(o)},l},t(function(o,l,c){s.reason||(s.reason=new Js(o,l,c),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Id(function(r){t=r}),cancel:t}}};function _v(e){return function(n){return e.apply(null,n)}}function bv(e){return S.isObject(e)&&e.isAxiosError===!0}const ml={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ml).forEach(([e,t])=>{ml[t]=e});function Ld(e){const t=new hs(e),n=fd(hs.prototype.request,t);return S.extend(n,hs.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Ld(ms(e,r))},n}const Ke=Ld(Mr);Ke.Axios=hs;Ke.CanceledError=Js;Ke.CancelToken=gv;Ke.isCancel=Sd;Ke.VERSION=Nd;Ke.toFormData=zi;Ke.AxiosError=ge;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=_v;Ke.isAxiosError=bv;Ke.mergeConfig=ms;Ke.AxiosH
Line truncated
|
||||
@@ -1,7 +0,0 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Analytics-CE9OWhfn.js","assets/vendor-charts-Bcjh2pZL.js","assets/vendor-ui-jlFFG6nm.js","assets/Certificates-DL4-OpRZ.js","assets/ConfirmModal-likdDJzi.js","assets/PKIConfig-CJEinDsL.js","assets/VPNConfig-cSWblOqw.js","assets/ServerManagement-DWxVTYxH.js","assets/Account-B9jhwMBa.js"])))=>i.map(i=>d[i]);
|
||||
import{C as zu,r as om}from"./vendor-charts-Bcjh2pZL.js";import{M as lm}from"./vendor-ui-jlFFG6nm.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const o of r)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function n(r){const o={};return r.integrity&&(o.integrity=r.integrity),r.referrerPolicy&&(o.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?o.credentials="include":r.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function s(r){if(r.ep)return;r.ep=!0;const o=n(r);fetch(r.href,o)}})();function wl(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Be={},Ds=[],mn=()=>{},Gu=()=>!1,Ni=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),El=e=>e.startsWith("onUpdate:"),rt=Object.assign,Al=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},am=Object.prototype.hasOwnProperty,Ne=(e,t)=>am.call(e,t),oe=Array.isArray,Ms=e=>Or(e)==="[object Map]",zs=e=>Or(e)==="[object Set]",Cc=e=>Or(e)==="[object Date]",me=e=>typeof e=="function",Xe=e=>typeof e=="string",Zt=e=>typeof e=="symbol",$e=e=>e!==null&&typeof e=="object",Ju=e=>($e(e)||me(e))&&me(e.then)&&me(e.catch),Xu=Object.prototype.toString,Or=e=>Xu.call(e),cm=e=>Or(e).slice(8,-1),Yu=e=>Or(e)==="[object Object]",Cl=e=>Xe(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ur=wl(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ki=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},um=/-\w/g,zt=ki(e=>e.replace(um,t=>t.slice(1).toUpperCase())),fm=/\B([A-Z])/g,qn=ki(e=>e.replace(fm,"-$1").toLowerCase()),Ii=ki(e=>e.charAt(0).toUpperCase()+e.slice(1)),No=ki(e=>e?`on${Ii(e)}`:""),Un=(e,t)=>!Object.is(e,t),fi=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Qu=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Li=e=>{const t=parseFloat(e);return isNaN(t)?e:t},dm=e=>{const t=Xe(e)?Number(e):NaN;return isNaN(t)?e:t};let xc;const Di=()=>xc||(xc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mi(e){if(oe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=Xe(s)?gm(s):Mi(s);if(r)for(const o in r)t[o]=r[o]}return t}else if(Xe(e)||$e(e))return e}const hm=/;(?![^(]*\))/g,pm=/:([^]+)/,mm=/\/\*[^]*?\*\//g;function gm(e){const t={};return e.replace(mm,"").split(hm).forEach(n=>{if(n){const s=n.split(pm);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ft(e){let t="";if(Xe(e))t=e;else if(oe(e))for(let n=0;n<e.length;n++){const s=ft(e[n]);s&&(t+=s+" ")}else if($e(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const _m="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",bm=wl(_m);function Zu(e){return!!e||e===""}function vm(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=Rr(e[s],t[s]);return n}function Rr(e,t){if(e===t)return!0;let n=Cc(e),s=Cc(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=Zt(e),s=Zt(t),n||s)return e===t;if(n=oe(e),s=oe(t),n||s)return n&&s?vm(e,t):!1;if(n=$e(e),s=$e(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const l in e){const c=e.hasOwnProperty(l),u=t.hasOwnProperty(l);if(c&&!u||!c&&u||!Rr(e[l],t[l]))return!1}}return String(e)===String(t)}function xl(e,t){return e.findIndex(n=>Rr(n,t))}const ef=e=>!!(e&&e.__v_isRef===!0),Ge=e=>Xe(e)?e:e==null?"":oe(e)||$e(e)&&(e.toString===Xu||!me(e.toString))?ef(e)?Ge(e.value):JSON.stringify(e,tf,2):String(e),tf=(e,t)=>ef(t)?tf(e,t.value):Ms(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],o)=>(n[ko(s,o)+" =>"]=r,n),{})}:zs(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>ko(n))}:Zt(t)?ko(t):$e(t)&&!oe(t)&&!Yu(t)?String(t):t,ko=(e,t="")=>{var n;return Zt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Rt;class ym{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Rt,!t&&Rt&&(this.index=(Rt.scopes||(Rt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Rt;try{return Rt=this,t()}finally{Rt=n}}}on(){++this._on===1&&(this.prevScope=Rt,Rt=this)}off(){this._on>0&&--this._on===0&&(Rt=this.prevScope,this.pLine truncated
|
||||
`).forEach(function(l){r=l.indexOf(":"),n=l.substring(0,r).trim().toLowerCase(),s=l.substring(r+1).trim(),!(!n||t[n]&&Wb[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},_u=Symbol("internals");function ir(e){return e&&String(e).trim().toLowerCase()}function vi(e){return e===!1||e==null?e:S.isArray(e)?e.map(vi):String(e)}function zb(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const Gb=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Vo(e,t,n,s,r){if(S.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!S.isString(t)){if(S.isString(s))return t.indexOf(s)!==-1;if(S.isRegExp(s))return s.test(t)}}function Jb(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function Xb(e,t){const n=S.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,o,l){return this[s].call(this,t,r,o,l)},configurable:!0})})}let Nt=class{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function o(c,u,h){const d=ir(u);if(!d)throw new Error("header name must be a non-empty string");const p=S.findKey(r,d);(!p||r[p]===void 0||h===!0||h===void 0&&r[p]!==!1)&&(r[p||u]=vi(c))}const l=(c,u)=>S.forEach(c,(h,d)=>o(h,d,u));if(S.isPlainObject(t)||t instanceof this.constructor)l(t,n);else if(S.isString(t)&&(t=t.trim())&&!Gb(t))l(Kb(t),n);else if(S.isObject(t)&&S.isIterable(t)){let c={},u,h;for(const d of t){if(!S.isArray(d))throw TypeError("Object iterator must return a key-value pair");c[h=d[0]]=(u=c[h])?S.isArray(u)?[...u,d[1]]:[u,d[1]]:d[1]}l(c,n)}else t!=null&&o(n,t,s);return this}get(t,n){if(t=ir(t),t){const s=S.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return zb(r);if(S.isFunction(n))return n.call(this,r,s);if(S.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=ir(t),t){const s=S.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Vo(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function o(l){if(l=ir(l),l){const c=S.findKey(s,l);c&&(!n||Vo(s,s[c],c,n))&&(delete s[c],r=!0)}}return S.isArray(t)?t.forEach(o):o(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const o=n[s];(!t||Vo(this,this[o],o,t,!0))&&(delete this[o],r=!0)}return r}normalize(t){const n=this,s={};return S.forEach(this,(r,o)=>{const l=S.findKey(s,o);if(l){n[l]=vi(r),delete n[o];return}const c=t?Jb(o):String(o).trim();c!==o&&delete n[o],n[c]=vi(r),s[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return S.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&S.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
||||
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[_u]=this[_u]={accessors:{}}).accessors,r=this.prototype;function o(l){const c=ir(l);s[c]||(Xb(r,l),s[c]=!0)}return S.isArray(t)?t.forEach(o):o(t),this}};Nt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);S.reduceDescriptors(Nt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});S.freezeMethods(Nt);function qo(e,t){const n=this||Mr,s=t||n,r=Nt.from(s.headers);let o=s.data;return S.forEach(e,function(c){o=c.call(n,o,r.normalize(),t?t.status:void 0)}),r.normalize(),o}function Sd(e){return!!(e&&e.__CANCEL__)}function Js(e,t,n){ge.call(this,e??"canceled",ge.ERR_CANCELED,t,n),this.name="CanceledError"}S.inherits(Js,ge,{__CANCEL__:!0});function Td(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Yb(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Qb(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,o=0,l;return t=t!==void 0?t:1e3,function(u){const h=Date.now(),d=s[o];l||(l=h),n[r]=u,s[r]=h;let p=o,_=0;for(;p!==r;)_+=n[p++],p=p%e;if(r=(r+1)%e,r===o&&(o=(o+1)%e),h-l<t)return;const v=d&&h-d;return v?Math.round(_*1e3/v):void 0}}function Zb(e,t){let n=0,s=1e3/t,r,o;const l=(h,d=Date.now())=>{n=d,r=null,o&&(clearTimeout(o),o=null),e(...h)};return[(...h)=>{const d=Date.now(),p=d-n;p>=s?l(h,d):(r=h,o||(o=setTimeout(()=>{o=null,l(r)},s-p)))},()=>r&&l(r)]}const Pi=(e,t,n=3)=>{let s=0;const r=Qb(50,250);return Zb(o=>{const l=o.loaded,c=o.lengthComputable?o.total:void 0,u=l-s,h=r(u),d=l<=c;s=l;const p={loaded:l,total:c,progress:c?l/c:void 0,bytes:u,rate:h||void 0,estimated:h&&c&&d?(c-l)/h:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},bu=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},vu=e=>(...t)=>S.asap(()=>e(...t)),ev=gt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,gt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(gt.origin),gt.navigator&&/(msie|trident)/i.test(gt.navigator.userAgent)):()=>!0,tv=gt.hasStandardBrowserEnv?{write(e,t,n,s,r,o,l){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];S.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),S.isString(s)&&c.push(`path=${s}`),S.isString(r)&&c.push(`domain=${r}`),o===!0&&c.push("secure"),S.isString(l)&&c.push(`SameSite=${l}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function nv(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sv(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Od(e,t,n){let s=!nv(t);return e&&(s||n==!1)?sv(e,t):t}const yu=e=>e instanceof Nt?{...e}:e;function ps(e,t){t=t||{};const n={};function s(h,d,p,_){return S.isPlainObject(h)&&S.isPlainObject(d)?S.merge.call({caseless:_},h,d):S.isPlainObject(d)?S.merge({},d):S.isArray(d)?d.slice():d}function r(h,d,p,_){if(S.isUndefined(d)){if(!S.isUndefined(h))return s(void 0,h,p,_)}else return s(h,d,p,_)}function o(h,d){if(!S.isUndefined(d))return s(void 0,d)}function l(h,d){if(S.isUndefined(d)){if(!S.isUndefined(h))return s(void 0,h)}else return s(void 0,d)}function c(h,d,p){if(p in t)return s(h,d);if(p in e)return s(void 0,h)}const u={url:o,method:o,data:o,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:c,headers:(h,d,p)=>r(yu(h),yu(d),p,!0)};return S.forEach(Object.keys({...e,...t}),function(d){const p=u[d]||r,_=p(e[d],t[d],d);S.isUndefined(_)&&p!==c||(n[d]=_)}),n}const Rd=e=>{const t=ps({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:o,headers:l,auth:c}=t;if(t.headers=l=Nt.from(l),t.url=Ad(Od(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&l.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),S.isFormData(n)){if(gt.hasStandardBrowserEnv||gt.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if(S.isFunction(n.getHeaders)){const u=n.getHeaders(),h=["content-type","content-length"];Object.entries(u).forEach(([d,p])=>{h.inclu
Line truncated
|
||||
`+l.map(Su).join(`
|
||||
`):" "+Su(l[0]):"as no adapter specified";throw new ge("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return r}const Nd={getAdapter:pv,adapters:ql};function Wo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Js(null,e)}function Tu(e){return Wo(e),e.headers=Nt.from(e.headers),e.data=qo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Nd.getAdapter(e.adapter||Mr.adapter,e)(e).then(function(s){return Wo(e),s.data=qo.call(e,e.transformResponse,s),s.headers=Nt.from(s.headers),s},function(s){return Sd(s)||(Wo(e),s&&s.response&&(s.response.data=qo.call(e,e.transformResponse,s.response),s.response.headers=Nt.from(s.response.headers))),Promise.reject(s)})}const kd="1.13.2",Gi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gi[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Ou={};Gi.transitional=function(t,n,s){function r(o,l){return"[Axios v"+kd+"] Transitional option '"+o+"'"+l+(s?". "+s:"")}return(o,l,c)=>{if(t===!1)throw new ge(r(l," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED);return n&&!Ou[l]&&(Ou[l]=!0,console.warn(r(l," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,l,c):!0}};Gi.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function mv(e,t,n){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const o=s[r],l=t[o];if(l){const c=e[o],u=c===void 0||l(c,o,e);if(u!==!0)throw new ge("option "+o+" must be "+u,ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ge("Unknown option "+o,ge.ERR_BAD_OPTION)}}const yi={assertOptions:mv,validators:Gi},fn=yi.validators;let ds=class{constructor(t){this.defaults=t||{},this.interceptors={request:new gu,response:new gu}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r={};Error.captureStackTrace?Error.captureStackTrace(r):r=new Error;const o=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?o&&!String(s.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(s.stack+=`
|
||||
`+o):s.stack=o}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ps(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:o}=n;s!==void 0&&yi.assertOptions(s,{silentJSONParsing:fn.transitional(fn.boolean),forcedJSONParsing:fn.transitional(fn.boolean),clarifyTimeoutError:fn.transitional(fn.boolean)},!1),r!=null&&(S.isFunction(r)?n.paramsSerializer={serialize:r}:yi.assertOptions(r,{encode:fn.function,serialize:fn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),yi.assertOptions(n,{baseUrl:fn.spelling("baseURL"),withXsrfToken:fn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let l=o&&S.merge(o.common,o[n.method]);o&&S.forEach(["delete","get","head","post","put","patch","common"],y=>{delete o[y]}),n.headers=Nt.concat(l,o);const c=[];let u=!0;this.interceptors.request.forEach(function(x){typeof x.runWhen=="function"&&x.runWhen(n)===!1||(u=u&&x.synchronous,c.unshift(x.fulfilled,x.rejected))});const h=[];this.interceptors.response.forEach(function(x){h.push(x.fulfilled,x.rejected)});let d,p=0,_;if(!u){const y=[Tu.bind(this),void 0];for(y.unshift(...c),y.push(...h),_=y.length,d=Promise.resolve(n);p<_;)d=d.then(y[p++],y[p++]);return d}_=c.length;let v=n;for(;p<_;){const y=c[p++],x=c[p++];try{v=y(v)}catch(O){x.call(this,O);break}}try{d=Tu.call(this,v)}catch(y){return Promise.reject(y)}for(p=0,_=h.length;p<_;)d=d.then(h[p++],h[p++]);return d}getUri(t){t=ps(this.defaults,t);const n=Od(t.baseURL,t.url,t.allowAbsoluteUrls);return Ad(n,t.params,t.paramsSerializer)}};S.forEach(["delete","get","head","options"],function(t){ds.prototype[t]=function(n,s){return this.request(ps(s||{},{method:t,url:n,data:(s||{}).data}))}});S.forEach(["post","put","patch"],function(t){function n(s){return function(o,l,c){return this.request(ps(c||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:o,data:l}))}}ds.prototype[t]=n(),ds.prototype[t+"Form"]=n(!0)});let gv=class Id{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const s=this;this.promise.then(r=>{if(!s._listeners)return;let o=s._listeners.length;for(;o-- >0;)s._listeners[o](r);s._listeners=null}),this.promise.then=r=>{let o;const l=new Promise(c=>{s.subscribe(c),o=c}).then(r);return l.cancel=function(){s.unsubscribe(o)},l},t(function(o,l,c){s.reason||(s.reason=new Js(o,l,c),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Id(function(r){t=r}),cancel:t}}};function _v(e){return function(n){return e.apply(null,n)}}function bv(e){return S.isObject(e)&&e.isAxiosError===!0}const ml={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ml).forEach(([e,t])=>{ml[t]=e});function Ld(e){const t=new ds(e),n=fd(ds.prototype.request,t);return S.extend(n,ds.prototype,t,{allOwnKeys:!0}),S.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return Ld(ps(e,r))},n}const Ke=Ld(Mr);Ke.Axios=ds;Ke.CanceledError=Js;Ke.CancelToken=gv;Ke.isCancel=Sd;Ke.VERSION=kd;Ke.toFormData=zi;Ke.AxiosError=ge;Ke.Cancel=Ke.CanceledError;Ke.all=function(t){return Promise.all(t)};Ke.spread=_v;Ke.isAxiosError=bv;Ke.mergeConfig=ps;Ke.AxiosH
Line truncated
|
||||
@@ -1 +1 @@
|
||||
@charset "UTF-8";:root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, .75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, .5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, .175);--bs-border-radius:.375rem;--bs-border-radius-sm:.25rem;--bs-border-radius-lg:.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 .5rem 1rem rgba(0, 0, 0, .15);--bs-box-shadow-sm:0 .125rem .25rem rgba(0, 0, 0, .075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, .175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, .075);--bs-focus-ring-width:.25rem;--bs-focus-ring-opacity:.25;--bs-focus-ring-color:rgba(13, 110, 253, .25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222,226,230;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255,255,255;--bs-secondary-color:rgba(222, 226, 230, .75);--bs-secondary-color-rgb:222,226,230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(222, 226, 230, .5);--bs-tertiary-color-rgb:222,226,230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--Line truncated
|
||||
@charset "UTF-8";:root,[data-bs-theme=light]{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-primary-text-emphasis:#052c65;--bs-secondary-text-emphasis:#2b2f32;--bs-success-text-emphasis:#0a3622;--bs-info-text-emphasis:#055160;--bs-warning-text-emphasis:#664d03;--bs-danger-text-emphasis:#58151c;--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:#cfe2ff;--bs-secondary-bg-subtle:#e2e3e5;--bs-success-bg-subtle:#d1e7dd;--bs-info-bg-subtle:#cff4fc;--bs-warning-bg-subtle:#fff3cd;--bs-danger-bg-subtle:#f8d7da;--bs-light-bg-subtle:#fcfcfd;--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:#9ec5fe;--bs-secondary-border-subtle:#c4c8cb;--bs-success-border-subtle:#a3cfbb;--bs-info-border-subtle:#9eeaf9;--bs-warning-border-subtle:#ffe69c;--bs-danger-border-subtle:#f1aeb5;--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-color-rgb:33,37,41;--bs-body-bg:#fff;--bs-body-bg-rgb:255,255,255;--bs-emphasis-color:#000;--bs-emphasis-color-rgb:0,0,0;--bs-secondary-color:rgba(33, 37, 41, .75);--bs-secondary-color-rgb:33,37,41;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233,236,239;--bs-tertiary-color:rgba(33, 37, 41, .5);--bs-tertiary-color-rgb:33,37,41;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248,249,250;--bs-heading-color:inherit;--bs-link-color:#0d6efd;--bs-link-color-rgb:13,110,253;--bs-link-decoration:underline;--bs-link-hover-color:#0a58ca;--bs-link-hover-color-rgb:10,88,202;--bs-code-color:#d63384;--bs-highlight-color:#212529;--bs-highlight-bg:#fff3cd;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, .175);--bs-border-radius:.375rem;--bs-border-radius-sm:.25rem;--bs-border-radius-lg:.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 .5rem 1rem rgba(0, 0, 0, .15);--bs-box-shadow-sm:0 .125rem .25rem rgba(0, 0, 0, .075);--bs-box-shadow-lg:0 1rem 3rem rgba(0, 0, 0, .175);--bs-box-shadow-inset:inset 0 1px 2px rgba(0, 0, 0, .075);--bs-focus-ring-width:.25rem;--bs-focus-ring-opacity:.25;--bs-focus-ring-color:rgba(13, 110, 253, .25);--bs-form-valid-color:#198754;--bs-form-valid-border-color:#198754;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}[data-bs-theme=dark]{color-scheme:dark;--bs-body-color:#dee2e6;--bs-body-color-rgb:222,226,230;--bs-body-bg:#212529;--bs-body-bg-rgb:33,37,41;--bs-emphasis-color:#fff;--bs-emphasis-color-rgb:255,255,255;--bs-secondary-color:rgba(222, 226, 230, .75);--bs-secondary-color-rgb:222,226,230;--bs-secondary-bg:#343a40;--bs-secondary-bg-rgb:52,58,64;--bs-tertiary-color:rgba(222, 226, 230, .5);--bs-tertiary-color-rgb:222,226,230;--bs-tertiary-bg:#2b3035;--bs-tertiary-bg-rgb:43,48,53;--bs-primary-text-emphasis:#6ea8fe;--bs-secondary-text-emphasis:#a7acb1;--bs-success-text-emphasis:#75b798;--bs-info-text-emphasis:#6edff6;--bs-warning-text-emphasis:#ffda6a;--bs-danger-text-emphasis:#ea868f;--bs-light-text-emphasis:#f8f9fa;--bs-dark-text-emphasis:#dee2e6;--bs-primary-bg-subtle:#031633;--bs-secondary-bg-subtle:#161719;--bs-success-bg-subtle:#051b11;--bs-info-bg-subtle:#032830;--bs-warning-bg-subtle:#332701;--bs-danger-bg-subtle:#2c0b0e;--bs-light-bg-subtle:#343a40;--bs-dark-bg-subtle:#1a1d20;--bs-primary-border-subtle:#084298;--bs-secondary-border-subtle:#41464b;--bs-success-border-subtle:#0f5132;--bs-info-border-subtle:#087990;--bs-warning-border-subtle:#997404;--bs-danger-border-subtle:#842029;--bs-light-border-subtle:#495057;--bs-dark-border-subtle:#343a40;--bs-heading-color:inherit;--Line truncated
|
||||
@@ -6,10 +6,10 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>OpenVPN Controller</title>
|
||||
<script type="module" crossorigin src="/assets/index-DQu6UtRL.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-BsVv6gaD.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/vendor-charts-Bcjh2pZL.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/vendor-ui-jlFFG6nm.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Mq5XawTO.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-b8NXKHGm.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
Reference in new issue
Block a user