p3x-redis-ui-material
Version:
💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity
13 lines • 53.3 kB
JavaScript
import{d as L}from"./main-OCJB5534.js";import{B as Hy,Bi as ym,Di as wf,Dn as _y,Dr as lo,Dt as Qe$1,Gn as dT,In as by,It as Sn,Kr as oT,Lt as Sy,P as HT,Pi as xf,Pn as bm,Pr as mc,Qr as qC,Rn as co,T as Ee$1,Tt as QN,Xt as Uy,Zr as q,_ as Cf,ei as qT,er as gT,gt as O,h as By,in as Wa,mn as YQ,nn as Vy,pt as Nf,q as JT,rn as WC,s as $y,t as $Y,ur as iT,vr as jy,w as Eb,wr as lc,zr as nN}from"./chunk-CHqDEyfr.js";import{n as u,t as f}from"./chunk-DolM25Wu.js";import"./chunk-CPClUPec.js";import{t as Q}from"./chunk-CyniViPG.js";import{n as bi}from"./chunk-DjVJBOYc.js";import"./chunk-CWEwaFv9.js";import"./chunk-CyaMV1f5.js";import{t as It}from"./chunk-BM0xjj91.js";import{C as xn,b as pt,i as Gn,m as jn,u as Tn,y as on}from"./chunk-B_FU7ynV.js";import{r as gt,t as Qt$1}from"./chunk-CNSP-oVC.js";import{n as wt,r as yt}from"./chunk-CGgWGJ3E.js";import"./chunk-CFyh5uM7.js";import{d as qe$1,i as Qt$2,o as U}from"./chunk-CLjqwtZV.js";import{i as ze$1,t as Oe$1}from"./chunk-BYtjyP-K.js";import"./chunk-DxgAwx0L.js";import{t as lt}from"./chunk-Cc4dc3EH2.js";import{t as X}from"./chunk-BfFSlGI12.js";import"./chunk-CaLi_qYn2.js";import{n as Yt,r as Zt$1,t as Xt$1}from"./chunk-C73tB7I62.js";import{t as Oe$2}from"./chunk-HfFSBPyS2.js";var Qt=[`memoryChart`];var Zt=[`opsChart`];var Gt=[`clientsChart`];var Jt=[`networkChart`];var qt=(o,m)=>m.id;var Xt=(o,m)=>m.db;var te=(o,m)=>m.name;var ee=(o,m)=>m.key;var ie=(o,m)=>m.slot;var ne=(o,m)=>m.master.id;function oe(o,m){if(o&1&&(Wa(0,`div`,4)(1,`mat-icon`),HT(2,`hourglass_empty`),wf(),Wa(3,`span`),HT(4),wf()()),o&2){let t=gT();Sn(4),jy(t.strings().label?.loading)}}function re(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12),HT(3),wf(),Wa(4,`div`,13),HT(5),wf()()(),_y(6,`mat-divider`)),o&2){let t=gT(3);Sn(3),jy(t.strings().page?.monitor?.os),Sn(2),jy(t.serverInfo.os)}}function ae(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12),HT(3),wf(),Wa(4,`div`,13),HT(5),wf()()(),_y(6,`mat-divider`)),o&2){let t=gT(3);Sn(3),jy(t.strings().page?.monitor?.port),Sn(2),jy(t.serverInfo.port)}}function se(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12),HT(3),wf(),Wa(4,`div`,13),HT(5),wf()()(),_y(6,`mat-divider`)),o&2){let t=gT(3);Sn(3),jy(t.strings().page?.monitor?.pid),Sn(2),jy(t.serverInfo.pid)}}function le(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12),HT(3),wf(),Wa(4,`div`,13),HT(5),wf()()(),_y(6,`mat-divider`)),o&2){let t=gT(3);Sn(3),jy(t.strings().page?.monitor?.configFile),Sn(2),jy(t.serverInfo.configFile)}}function ce(o,m){if(o&1){let t=dT();_y(0,`br`),Wa(1,`p3xr-ng-accordion`,27)(2,`div`,6)(3,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT(2).exportServerInfo(),bm(i.stopPropagation())}),wf()(),Wa(4,`div`,10)(5,`mat-list`),co(6,re,7,2),co(7,ae,7,2),co(8,se,7,2),co(9,le,7,2),Wa(10,`mat-list-item`)(11,`div`,11)(12,`div`,12),HT(13),wf(),Wa(14,`div`,13),HT(15),wf()()(),_y(16,`mat-divider`),Wa(17,`mat-list-item`)(18,`div`,11)(19,`div`,12),HT(20),wf(),Wa(21,`div`,13),HT(22),wf()()()()()()}if(o&2){let t=gT(2);Sn(),by(`title`,t.strings().page?.monitor?.serverInfo),Sn(2),by(`label`,t.strings().intention?.export),Sn(3),lo(t.serverInfo.os?6:-1),Sn(),lo(t.serverInfo.port?7:-1),Sn(),lo(t.serverInfo.pid?8:-1),Sn(),lo(t.serverInfo.configFile?9:-1),Sn(4),Nf(``,t.strings().page?.monitor?.cpuSys,` CPU`),Sn(2),jy(t.serverInfo.cpuSys),Sn(5),Nf(``,t.strings().page?.monitor?.cpuUser,` CPU`),Sn(2),jy(t.serverInfo.cpuUser)}}function de(o,m){if(o&1&&(_y(0,`mat-divider`),Wa(1,`mat-list-item`)(2,`div`,11)(3,`div`,12),HT(4),wf(),Wa(5,`div`,13),HT(6),wf()()()),o&2){let t=gT(3);Sn(4),jy(t.strings().page?.monitor?.aofSize),Sn(2),jy(t.persistenceInfo.aofSize)}}function me(o,m){if(o&1){let t=dT();_y(0,`br`),Wa(1,`p3xr-ng-accordion`,28)(2,`div`,6)(3,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT(2).exportPersistence(),bm(i.stopPropagation())}),wf()(),Wa(4,`div`,10)(5,`mat-list`)(6,`mat-list-item`)(7,`div`,11)(8,`div`,12),HT(9),wf(),Wa(10,`div`,13),HT(11),wf()()(),_y(12,`mat-divider`),Wa(13,`mat-list-item`)(14,`div`,11)(15,`div`,12),HT(16),wf(),Wa(17,`div`,13),HT(18),wf()()(),_y(19,`mat-divider`),Wa(20,`mat-list-item`)(21,`div`,11)(22,`div`,12),HT(23),wf(),Wa(24,`div`,13),HT(25),wf()()(),_y(26,`mat-divider`),Wa(27,`mat-list-item`)(28,`div`,11)(29,`div`,12),HT(30),wf(),Wa(31,`div`,13),HT(32),wf()()(),co(33,de,7,2),wf()()()}if(o&2){let t=gT(2);Sn(),by(`title`,t.strings().page?.monitor?.persistence),Sn(2),by(`label`,t.strings().intention?.export),Sn(6),jy(t.strings().page?.monitor?.rdbLastSave),Sn(2),jy(t.persistenceInfo.rdbLastSave),Sn(5),jy(t.strings().page?.monitor?.rdbStatus),Sn(2),jy(t.persistenceInfo.rdbStatus),Sn(5),jy(t.strings().page?.monitor?.rdbChanges),Sn(2),jy(t.persistenceInfo.rdbChanges),Sn(5),jy(t.strings().page?.monitor?.aofEnabled),Sn(2),jy(t.persistenceInfo.aofEnabled),Sn(),lo(t.persistenceInfo.aofSize?33:-1)}}function pe(o,m){if(o&1&&(_y(0,`mat-divider`),Wa(1,`mat-list-item`)(2,`div`,11)(3,`div`,12),HT(4),wf(),Wa(5,`div`,13),HT(6),wf()()()),o&2){let t=gT(3);Sn(4),jy(t.strings().page?.monitor?.replicas),Sn(2),jy(t.replicationInfo.replicas)}}function xe(o,m){if(o&1&&(_y(0,`mat-divider`),Wa(1,`mat-list-item`)(2,`div`,11)(3,`div`,12),HT(4),wf(),Wa(5,`div`,13),HT(6),wf()()()),o&2){let t=gT(3);Sn(4),jy(t.strings().page?.monitor?.masterHost),Sn(2),By(``,t.replicationInfo.masterHost,`:`,t.replicationInfo.masterPort)}}function he(o,m){if(o&1&&(_y(0,`mat-divider`),Wa(1,`mat-list-item`)(2,`div`,11)(3,`div`,12),HT(4),wf(),Wa(5,`div`,13),HT(6),wf()()()),o&2){let t=gT(3);Sn(4),jy(t.strings().page?.monitor?.linkStatus),Sn(2),jy(t.replicationInfo.linkStatus)}}function ue(o,m){if(o&1){let t=dT();_y(0,`br`),Wa(1,`p3xr-ng-accordion`,29)(2,`div`,6)(3,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT(2).exportReplication(),bm(i.stopPropagation())}),wf()(),Wa(4,`div`,10)(5,`mat-list`)(6,`mat-list-item`)(7,`div`,11)(8,`div`,12),HT(9),wf(),Wa(10,`div`,13),HT(11),wf()()(),co(12,pe,7,2),co(13,xe,7,3),co(14,he,7,2),wf()()()}if(o&2){let t=gT(2);Sn(),by(`title`,t.strings().page?.monitor?.replication),Sn(2),by(`label`,t.strings().intention?.export),Sn(6),jy(t.strings().page?.monitor?.role),Sn(2),jy(t.replicationInfo.role),Sn(),lo(t.replicationInfo.replicas!==void 0?12:-1),Sn(),lo(t.replicationInfo.masterHost?13:-1),Sn(),lo(t.replicationInfo.linkStatus?14:-1)}}function _e(o,m){o&1&&_y(0,`mat-divider`)}function ge(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12),HT(3),wf(),Wa(4,`div`,13),HT(5),wf()()(),co(6,_e,1,0,`mat-divider`)),o&2){let t=m.$implicit,e=m.$index,i=m.$count,s=gT(3);Sn(3),jy(t.db),Sn(2),Hy(``,s.strings().page?.monitor?.keys,`: `,t.keys,` · `,s.strings().page?.monitor?.expires,`: `,t.expires),Sn(),lo(e!==i-1?6:-1)}}function fe(o,m){if(o&1){let t=dT();_y(0,`br`),Wa(1,`p3xr-ng-accordion`,30)(2,`div`,6)(3,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT(2).exportKeyspace(),bm(i.stopPropagation())}),wf()(),Wa(4,`div`,10)(5,`mat-list`),oT(6,ge,7,6,null,null,Xt),wf()()()}if(o&2){let t=gT(2);Sn(),by(`title`,t.strings().page?.monitor?.keyspace),Sn(2),by(`label`,t.strings().intention?.export),Sn(3),iT(t.keyspaceEntries)}}function Ce(o,m){if(o&1&&(Wa(0,`div`,15),HT(1),wf()),o&2){let t=gT(2);Sn(),jy(t.strings().page?.monitor?.noModules)}}function ve(o,m){o&1&&_y(0,`mat-divider`)}function ye(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12),HT(3),wf(),Wa(4,`div`,13),HT(5),wf()()(),co(6,ve,1,0,`mat-divider`)),o&2){let t=m.$implicit,e=m.$index,i=m.$count;Sn(3),jy(t.name),Sn(2),Nf(`v`,t.ver),Sn(),lo(e!==i-1?6:-1)}}function Se(o,m){if(o&1&&(Wa(0,`mat-list`),oT(1,ye,7,3,null,null,te),wf()),o&2){let t=gT(2);Sn(),iT(t.modulesList)}}function be(o,m){if(o&1){let t=dT();Wa(0,`p3xr-ng-button`,31),Sy(`click`,function(i){return ym(t),gT(2).resetSlowLog(),bm(i.stopPropagation())}),wf()}}function $e(o,m){if(o&1&&(Wa(0,`div`,23),HT(1),wf()),o&2){let t=gT(2);Sn(),Nf(` `,t.strings().page?.monitor?.noSlowQueries,` `)}}function we(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,32)(2,`kbd`,33),HT(3),wf(),Wa(4,`span`,34),HT(5),wf()()(),_y(6,`mat-divider`)),o&2){let t=m.$implicit;Sn(3),Nf(``,t.duration,`µs`),Sn(2),jy(t.command)}}function ke(o,m){if(o&1){let t=dT();Wa(0,`p3xr-ng-button`,35),Sy(`click`,function(i){return ym(t),gT(2).loadClientList(),bm(i.stopPropagation())}),wf()}if(o&2)by(`label`,gT(2).strings().intention?.refresh)}function Ie(o,m){if(o&1&&(Wa(0,`div`,15),HT(1),wf()),o&2){let t=gT(2);Sn(),jy(t.strings().page?.monitor?.noClients)}}function Ee(o,m){if(o&1&&(Wa(0,`div`,15),HT(1),wf()),o&2){let t=gT(2);Sn(),jy(t.strings().label?.loading)}}function Te(o,m){if(o&1&&(Wa(0,`span`,38),HT(1),wf()),o&2){let t=gT().$implicit;Sn(),Nf(`(`,t.name,`)`)}}function Me(o,m){if(o&1){let t=dT();Wa(0,`mat-icon`,41),Sy(`click`,function(i){ym(t);let s=gT().$implicit;return bm(gT(3).killClient(s.id,i))}),HT(1,`close`),wf()}if(o&2)by(`matTooltip`,gT(4).strings().page?.monitor?.killClient)}function Re(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,36)(2,`span`,37),HT(3),wf(),co(4,Te,2,1,`span`,38),Wa(5,`span`,39),HT(6),wf(),co(7,Me,2,1,`mat-icon`,40),wf()(),_y(8,`mat-divider`)),o&2){let t=m.$implicit,e=gT(3);Sn(3),jy(t.addr),Sn(),lo(t.name?4:-1),Sn(2),Vy(` db`,t.db,` · `,t.cmd,` · `,t.idle,`s `),Sn(),lo(e.isReadonly?-1:7)}}function Pe(o,m){if(o&1&&(Wa(0,`mat-list`),oT(1,Re,9,6,null,null,qt),wf()),o&2){let t=gT(2);Sn(),iT(t.clientList)}}function Le(o,m){if(o&1){let t=dT();Wa(0,`p3xr-ng-button`,35),Sy(`click`,function(i){return ym(t),gT(2).loadTopKeys(),bm(i.stopPropagation())}),wf()}if(o&2)by(`label`,gT(2).strings().intention?.refresh)}function Ke(o,m){if(o&1&&(Wa(0,`div`,15),HT(1),wf()),o&2){let t=gT(2);Sn(),jy(t.strings().page?.monitor?.noKeys)}}function Ve(o,m){if(o&1&&(Wa(0,`div`,15),HT(1),wf()),o&2){let t=gT(2);Sn(),jy(t.strings().label?.loading)}}function Fe(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12)(3,`span`,42),HT(4),wf(),Wa(5,`span`,43),HT(6),wf()(),Wa(7,`div`,13),HT(8),wf()()(),_y(9,`mat-divider`)),o&2){let t=m.$implicit,e=m.$index,i=gT(3);Sn(4),Nf(`#`,e+1),Sn(2),jy(t.key),Sn(2),jy(i.formatBytes(t.bytes))}}function Be(o,m){if(o&1&&(Wa(0,`mat-list`),oT(1,Fe,10,3,null,null,ee),wf()),o&2){let t=gT(2);Sn(),iT(t.topKeys)}}function ze(o,m){o&1&&(Wa(0,`div`,15),HT(1,`No slot data`),wf())}function De(o,m){if(o&1&&HT(0),o&2){let t=gT().$implicit;Nf(` `,t[`key-count`],` keys `)}}function He(o,m){if(o&1&&HT(0),o&2){let t=gT().$implicit;Nf(` `,t[`cpu-usec`],` μs `)}}function Oe(o,m){if(o&1&&HT(0),o&2){let t=gT().$implicit;Nf(` `,gT(4).formatBytes(t[`memory-bytes`]),` `)}}function Ue(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12)(3,`span`,42),HT(4),wf(),Wa(5,`span`,51),HT(6),wf()(),Wa(7,`div`,13),co(8,De,1,1),co(9,He,1,1),co(10,Oe,1,1),wf()()(),_y(11,`mat-divider`)),o&2){let t=m.$implicit,e=m.$index,i=gT(4);Sn(4),Nf(`#`,e+1),Sn(2),Nf(`Slot `,t.slot),Sn(2),lo(i.slotStatsMetric===`KEY-COUNT`?8:-1),Sn(),lo(i.slotStatsMetric===`CPU-USEC`?9:-1),Sn(),lo(i.slotStatsMetric===`MEMORY-BYTES`?10:-1)}}function Ne(o,m){if(o&1&&(Wa(0,`mat-list`),oT(1,Ue,12,5,null,null,ie),wf()),o&2){let t=gT(3);Sn(),iT(t.slotStats)}}function Ae(o,m){if(o&1){let t=dT();_y(0,`br`),Wa(1,`p3xr-ng-accordion`,44)(2,`div`,6)(3,`p3xr-ng-button`,35),Sy(`click`,function(i){return ym(t),gT(2).loadSlotStats(),bm(i.stopPropagation())}),wf()(),Wa(4,`div`,10)(5,`div`,45)(6,`mat-form-field`,46)(7,`mat-label`),HT(8,`Metric`),wf(),Wa(9,`select`,47),$y(`ngModelChange`,function(i){ym(t);let s=gT(2);return qT(s.slotStatsMetric,i)||(s.slotStatsMetric=i),bm(i)}),Sy(`change`,function(){ym(t);return bm(gT(2).loadSlotStats())}),Wa(10,`option`,48),HT(11,`Key Count`),wf(),Wa(12,`option`,49),HT(13,`CPU (μs)`),wf(),Wa(14,`option`,50),HT(15,`Memory (bytes)`),wf()(),WC(),wf()(),co(16,ze,2,0,`div`,15),co(17,Ne,3,0,`mat-list`),wf()()}if(o&2){let t=gT(2);Sn(),by(`title`,t.strings().page?.monitor?.slotStats),Sn(2),by(`label`,t.strings().intention?.refresh),Sn(6),Uy(`ngModel`,t.slotStatsMetric),qC(),Sn(7),lo(t.slotStats.length===0&&t.slotStatsLoaded?16:-1),Sn(),lo(t.slotStats.length>0?17:-1)}}function je(o,m){if(o&1){let t=dT();Wa(0,`p3xr-ng-button`,35),Sy(`click`,function(i){return ym(t),gT(3).loadClusterShards(),bm(i.stopPropagation())}),wf()}if(o&2)by(`label`,gT(3).strings().intention?.refresh)}function We(o,m){if(o&1&&(Wa(0,`div`,23),HT(1),wf()),o&2){let t=gT(3);Sn(),Nf(` `,t.strings().page?.monitor?.noClusterData,` `)}}function qe(o,m){if(o&1&&(Wa(0,`span`,56),HT(1),wf()),o&2){let t=gT().$implicit,e=gT(4);Sn(),Nf(`(`,e.formatReplicas(t),`)`)}}function Ye(o,m){if(o&1&&(Wa(0,`mat-list-item`)(1,`div`,11)(2,`div`,12)(3,`span`,54),HT(4),wf(),Wa(5,`span`,55),HT(6),wf()(),Wa(7,`div`,13),HT(8),co(9,qe,2,1,`span`,56),wf()()(),_y(10,`mat-divider`)),o&2){let t=m.$implicit,e=gT(4);Sn(4),By(``,t.master.host,`:`,t.master.port),Sn(2),Nf(` `,e.formatSlotRanges(t),` `),Sn(2),By(` `,e.getSlotCount(t),` `,e.strings().page?.monitor?.totalSlots,` `),Sn(),lo(t.replicas.length>0?9:-1)}}function Qe(o,m){if(o&1&&(Wa(0,`mat-list`),oT(1,Ye,11,6,null,null,ne),wf(),Wa(3,`div`,53),HT(4),wf()),o&2){let t=gT(3);Sn(),iT(t.clusterShards),Sn(3),Nf(` 16384 slots across `,t.clusterShards.length,` masters `)}}function Ze(o,m){if(o&1){let t=dT();_y(0,`br`),Wa(1,`p3xr-ng-accordion`,52)(2,`div`,6)(3,`p3xr-ng-button`,7),Sy(`click`,function(i){return ym(t),gT(2).toggleAutoRefreshShards(),bm(i.stopPropagation())}),wf(),co(4,je,1,1,`p3xr-ng-button`,25),Wa(5,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT(2).exportClusterSlots(),bm(i.stopPropagation())}),wf()(),Wa(6,`div`,10),co(7,We,2,1,`div`,23)(8,Qe,5,1),wf()()}if(o&2){let t=gT(2);Sn(),by(`title`,t.strings().page?.monitor?.clusterSlotMap),Sn(2),by(`label`,t.strings().label?.autoRefresh)(`mdIcon`,t.autoRefreshShards?`check_box`:`check_box_outline_blank`),Sn(),lo(t.autoRefreshShards?-1:4),Sn(),by(`label`,t.strings().intention?.export),Sn(2),lo(t.clusterShards?8:7)}}function Ge(o,m){if(o&1){let t=dT();Wa(0,`p3xr-ng-accordion`,5)(1,`div`,6)(2,`p3xr-ng-button`,7),Sy(`click`,function(i){return ym(t),gT().togglePause(),bm(i.stopPropagation())}),wf(),Wa(3,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT().exportOverview(),bm(i.stopPropagation())}),wf(),Wa(4,`p3xr-ng-button`,9),Sy(`click`,function(i){return ym(t),gT().exportAll(),bm(i.stopPropagation())}),wf()(),Wa(5,`div`,10)(6,`mat-list`)(7,`mat-list-item`)(8,`div`,11)(9,`div`,12),HT(10),wf(),Wa(11,`div`,13),HT(12),wf()()(),_y(13,`mat-divider`),Wa(14,`mat-list-item`)(15,`div`,11)(16,`div`,12),HT(17),wf(),Wa(18,`div`,13),HT(19),wf()()(),_y(20,`mat-divider`),Wa(21,`mat-list-item`)(22,`div`,11)(23,`div`,12),HT(24),wf(),Wa(25,`div`,13),HT(26),wf()()(),_y(27,`mat-divider`),Wa(28,`mat-list-item`)(29,`div`,11)(30,`div`,12),HT(31),wf(),Wa(32,`div`,13),HT(33),wf()()(),_y(34,`mat-divider`),Wa(35,`mat-list-item`)(36,`div`,11)(37,`div`,12),HT(38),wf(),Wa(39,`div`,13),HT(40),wf()()(),_y(41,`mat-divider`),Wa(42,`mat-list-item`)(43,`div`,11)(44,`div`,12),HT(45),wf(),Wa(46,`div`,13),HT(47),wf()()(),_y(48,`mat-divider`),Wa(49,`mat-list-item`)(50,`div`,11)(51,`div`,12),HT(52),wf(),Wa(53,`div`,13),HT(54),wf()()(),_y(55,`mat-divider`),Wa(56,`mat-list-item`)(57,`div`,11)(58,`div`,12),HT(59),wf(),Wa(60,`div`,13),HT(61),wf()()(),_y(62,`mat-divider`),Wa(63,`mat-list-item`)(64,`div`,11)(65,`div`,12),HT(66),wf(),Wa(67,`div`,13),HT(68),wf()()(),_y(69,`mat-divider`),Wa(70,`mat-list-item`)(71,`div`,11)(72,`div`,12),HT(73),wf(),Wa(74,`div`,13),HT(75),wf()()(),_y(76,`mat-divider`),Wa(77,`mat-list-item`)(78,`div`,11)(79,`div`,12),HT(80),wf(),Wa(81,`div`,13),HT(82),wf()()(),_y(83,`mat-divider`),Wa(84,`mat-list-item`)(85,`div`,11)(86,`div`,12),HT(87),wf(),Wa(88,`div`,13),HT(89),JT(90,`number`),JT(91,`number`),wf()()(),_y(92,`mat-divider`),Wa(93,`mat-list-item`)(94,`div`,11)(95,`div`,12),HT(96),wf(),Wa(97,`div`,13),HT(98),wf()()(),_y(99,`mat-divider`),Wa(100,`mat-list-item`)(101,`div`,11)(102,`div`,12),HT(103),wf(),Wa(104,`div`,13),HT(105),wf()()()()()(),co(106,ce,23,10),co(107,me,34,11),co(108,ue,15,7),co(109,fe,8,2),_y(110,`br`),Wa(111,`p3xr-ng-accordion`,14)(112,`div`,6)(113,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT().exportModules(),bm(i.stopPropagation())}),wf()(),Wa(114,`div`,10),co(115,Ce,2,1,`div`,15),co(116,Se,3,0,`mat-list`),wf()(),_y(117,`br`),Wa(118,`p3xr-ng-accordion`,16)(119,`div`,6)(120,`p3xr-ng-button`,8),Sy(`click`,function(i){ym(t);let s=gT();return s.exportChart(s.memoryChartRef,`memory`),bm(i.stopPropagation())}),wf()(),Wa(121,`div`,10),_y(122,`div`,17,0),wf()(),_y(124,`br`),Wa(125,`p3xr-ng-accordion`,18)(126,`div`,6)(127,`p3xr-ng-button`,8),Sy(`click`,function(i){ym(t);let s=gT();return s.exportChart(s.opsChartRef,`ops`),bm(i.stopPropagation())}),wf()(),Wa(128,`div`,10),_y(129,`div`,17,1),wf()(),_y(131,`br`),Wa(132,`p3xr-ng-accordion`,19)(133,`div`,6)(134,`p3xr-ng-button`,8),Sy(`click`,function(i){ym(t);let s=gT();return s.exportChart(s.clientsChartRef,`clients`),bm(i.stopPropagation())}),wf()(),Wa(135,`div`,10),_y(136,`div`,17,2),wf()(),_y(138,`br`),Wa(139,`p3xr-ng-accordion`,20)(140,`div`,6)(141,`p3xr-ng-button`,8),Sy(`click`,function(i){ym(t);let s=gT();return s.exportChart(s.networkChartRef,`network`),bm(i.stopPropagation())}),wf()(),Wa(142,`div`,10),_y(143,`div`,17,3),wf()(),_y(145,`br`),Wa(146,`p3xr-ng-accordion`,21)(147,`div`,6),co(148,be,1,0,`p3xr-ng-button`,22),Wa(149,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT().exportSlowLog(),bm(i.stopPropagation())}),wf()(),Wa(150,`div`,10),co(151,$e,2,1,`div`,23),Wa(152,`mat-list`),oT(153,we,7,2,null,null,qt),wf()()(),_y(155,`br`),Wa(156,`p3xr-ng-accordion`,24)(157,`div`,6)(158,`p3xr-ng-button`,7),Sy(`click`,function(i){return ym(t),gT().toggleAutoRefreshClients(),bm(i.stopPropagation())}),wf(),co(159,ke,1,1,`p3xr-ng-button`,25),Wa(160,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT().exportClientList(),bm(i.stopPropagation())}),wf()(),Wa(161,`div`,10),co(162,Ie,2,1,`div`,15),co(163,Ee,2,1,`div`,15),co(164,Pe,3,0,`mat-list`),wf()(),_y(165,`br`),Wa(166,`p3xr-ng-accordion`,26)(167,`div`,6)(168,`p3xr-ng-button`,7),Sy(`click`,function(i){return ym(t),gT().toggleAutoRefreshTopKeys(),bm(i.stopPropagation())}),wf(),co(169,Le,1,1,`p3xr-ng-button`,25),Wa(170,`p3xr-ng-button`,8),Sy(`click`,function(i){return ym(t),gT().exportTopKeys(),bm(i.stopPropagation())}),wf()(),Wa(171,`div`,10),co(172,Ke,2,1,`div`,15),co(173,Ve,2,1,`div`,15),co(174,Be,3,0,`mat-list`),wf()(),co(175,Ae,18,5),co(176,Ze,9,6)}if(o&2){let t=gT();by(`title`,t.strings().page?.monitor?.title),Sn(2),by(`label`,t.paused?t.strings().intention?.resume:t.strings().intention?.pause)(`mdIcon`,t.paused?`play_arrow`:`pause`),Sn(),by(`label`,t.strings().intention?.export),Sn(),by(`label`,t.strings().page?.analysis?.exportAll),Sn(6),By(`Redis `,t.current.server.version,` · `,t.current.server.mode),Sn(2),jy(t.uptimeFormatted),Sn(5),jy(t.strings().page?.monitor?.memory),Sn(2),jy(t.current.memory.usedHuman),Sn(5),jy(t.strings().page?.monitor?.rss),Sn(2),jy(t.current.memory.rssHuman),Sn(5),jy(t.strings().page?.monitor?.peak),Sn(2),jy(t.current.memory.peakHuman),Sn(5),jy(t.strings().page?.monitor?.fragmentation),Sn(2),Nf(``,t.current.memory.fragRatio,`x`),Sn(5),jy(t.strings().page?.monitor?.opsPerSec),Sn(2),jy(t.current.stats.opsPerSec),Sn(5),jy(t.strings().page?.monitor?.totalCommands),Sn(2),jy(t.current.stats.totalCommands),Sn(5),jy(t.strings().page?.monitor?.clients),Sn(2),jy(t.current.clients.connected),Sn(5),jy(t.strings().page?.monitor?.blocked),Sn(2),jy(t.current.clients.blocked),Sn(5),jy(t.strings().page?.monitor?.hitsMisses),Sn(2),Nf(``,t.current.stats.hitRate,`%`),Sn(5),jy(t.strings().page?.monitor?.hitsAndMisses),Sn(2),By(``,t.current.stats.hits,` / `,t.current.stats.misses),Sn(5),jy(t.strings().page?.monitor?.networkIo),Sn(2),By(``,nN(90,74,t.current.stats.inputKbps,`1.1-1`),` / `,nN(91,77,t.current.stats.outputKbps,`1.1-1`),` KB/s`),Sn(7),jy(t.strings().page?.monitor?.expired),Sn(2),jy(t.current.stats.expiredKeys),Sn(5),jy(t.strings().page?.monitor?.evicted),Sn(2),jy(t.current.stats.evictedKeys),Sn(),lo(t.serverInfo?106:-1),Sn(),lo(t.persistenceInfo?107:-1),Sn(),lo(t.replicationInfo?108:-1),Sn(),lo(t.keyspaceEntries.length>0?109:-1),Sn(2),by(`title`,t.strings().page?.monitor?.modules),Sn(2),by(`label`,t.strings().intention?.export),Sn(2),lo(t.modulesList.length===0?115:-1),Sn(),lo(t.modulesList.length>0?116:-1),Sn(2),by(`title`,t.strings().page?.monitor?.memory+` (MB)`),Sn(2),by(`label`,t.strings().intention?.export),Sn(5),by(`title`,t.strings().page?.monitor?.opsPerSec),Sn(2),by(`label`,t.strings().intention?.export),Sn(5),by(`title`,t.strings().page?.monitor?.clients),Sn(2),by(`label`,t.strings().intention?.export),Sn(5),by(`title`,t.strings().page?.monitor?.networkIo+` (KB/s)`),Sn(2),by(`label`,t.strings().intention?.export),Sn(5),by(`title`,t.strings().page?.monitor?.slowLog),Sn(2),lo(t.isReadonly?-1:148),Sn(),by(`label`,t.strings().intention?.export),Sn(2),lo(t.current.slowlog.length===0?151:-1),Sn(2),iT(t.current.slowlog),Sn(3),by(`title`,t.strings().page?.monitor?.clientList),Sn(2),by(`label`,t.strings().label?.autoRefresh)(`mdIcon`,t.autoRefreshClients?`check_box`:`check_box_outline_blank`),Sn(),lo(t.autoRefreshClients?-1:159),Sn(),by(`label`,t.strings().intention?.export),Sn(2),lo(t.clientList.length===0&&t.clientListLoaded?162:-1),Sn(),lo(t.clientList.length===0&&!t.clientListLoaded?163:-1),Sn(),lo(t.clientList.length>0?164:-1),Sn(2),by(`title`,t.strings().page?.monitor?.topKeys),Sn(2),by(`label`,t.strings().label?.autoRefresh)(`mdIcon`,t.autoRefreshTopKeys?`check_box`:`check_box_outline_blank`),Sn(),lo(t.autoRefreshTopKeys?-1:169),Sn(),by(`label`,t.strings().intention?.export),Sn(2),lo(t.topKeys.length===0&&t.topKeysLoaded?172:-1),Sn(),lo(t.topKeys.length===0&&!t.topKeysLoaded?173:-1),Sn(),lo(t.topKeys.length>0?174:-1),Sn(),lo(t.isCluster&&t.state.redisVersion().isAtLeast(8,2)?175:-1),Sn(),lo(t.isCluster?176:-1)}}var Je=new Intl.DateTimeFormat(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1});var Wt=o=>Je.format(new Date(o));var Xe=120;var Mi=(()=>{class o{i18n;socket;common;cdr;ngZone;elementRef;state;monitorData;strings;current=null;history=[];paused=!1;clientList=[];topKeys=[];isReadonly=!1;autoRefreshClients=localStorage.getItem(`p3xr-monitor-auto-clients`)===`true`;autoRefreshTopKeys=localStorage.getItem(`p3xr-monitor-auto-topkeys`)===`true`;clientListLoaded=!1;topKeysLoaded=!1;slotStats=[];slotStatsMetric=`KEY-COUNT`;slotStatsLoaded=!1;isCluster=!1;clusterShards=null;autoRefreshShards=localStorage.getItem(`p3xr-monitor-auto-shards`)===`true`;shardsInterval=null;memoryChartRef;opsChartRef;clientsChartRef;networkChartRef;intervalId;uPlot;memoryPlot;opsPlot;clientsPlot;networkPlot;chartsInitialized=!1;resizeObserver=null;themeObserver=null;unsubFns=[];boundRecalcHost=null;constructor(t,e,i,s,l,h,S,E){this.i18n=t,this.socket=e,this.common=i,this.cdr=s,this.ngZone=l,this.elementRef=h,this.state=S,this.monitorData=E,this.strings=this.i18n.strings}ngOnInit(){this.isReadonly=this.state.connection()?.readonly===!0,this.isCluster=this.state.connection()?.cluster===!0,this.fetchData(),this.loadClientList(),this.loadTopKeys(),this.isCluster&&this.state.redisVersion().isAtLeast(8,2)&&this.loadSlotStats();let t=this.socket.stateChanged$.subscribe(()=>{this.isReadonly=this.state.connection()?.readonly===!0,this.isCluster=this.state.connection()?.cluster===!0,this.history=[],this.chartsInitialized=!1,this.memoryPlot?.destroy(),this.opsPlot?.destroy(),this.clientsPlot?.destroy(),this.networkPlot?.destroy(),this.fetchData(),this.loadClientList(),this.loadTopKeys()});this.unsubFns.push(()=>t.unsubscribe()),this.ngZone.runOutsideAngular(()=>{this.intervalId=setInterval(()=>{this.paused||(this.fetchData(),this.autoRefreshClients&&this.loadClientList(),this.autoRefreshTopKeys&&this.loadTopKeys())},2e3),this.themeObserver=new MutationObserver(()=>{this.chartsInitialized&&setTimeout(()=>this.reinitCharts(),100)}),this.themeObserver.observe(document.body,{attributes:!0,attributeFilter:[`class`]});let e=this.i18n.currentLang(),i=setInterval(()=>{let s=this.i18n.currentLang();s!==e&&(e=s,this.chartsInitialized&&setTimeout(()=>this.reinitCharts(),100))},500);this.unsubFns.push(()=>clearInterval(i))})}ngAfterViewInit(){setTimeout(()=>this.loadUPlot(),500)}ngOnDestroy(){this.intervalId&&clearInterval(this.intervalId),this.shardsInterval&&clearInterval(this.shardsInterval),this.unsubFns.forEach(t=>t()),this.themeObserver?.disconnect(),this.resizeObserver?.disconnect(),this.memoryPlot?.destroy(),this.opsPlot?.destroy(),this.clientsPlot?.destroy(),this.networkPlot?.destroy()}serverInfoLabel(){if(!this.current)return``;let t=this.current.server,e=this.paused?this.strings().intention?.resume:this.strings().intention?.pause;return`Redis ${t.version} \xB7 ${t.mode} \xB7 ${this.uptimeFormatted} \xB7 ${e}`}toggleAutoRefreshClients(){this.autoRefreshClients=!this.autoRefreshClients;try{localStorage.setItem(`p3xr-monitor-auto-clients`,String(this.autoRefreshClients))}catch(t){}}toggleAutoRefreshTopKeys(){this.autoRefreshTopKeys=!this.autoRefreshTopKeys;try{localStorage.setItem(`p3xr-monitor-auto-topkeys`,String(this.autoRefreshTopKeys))}catch(t){}}loadClientList(){return L(this,null,function*(){try{let t=yield this.socket.request({action:`client/list`,payload:{}});this.clientList=t.data,this.clientListLoaded=!0,this.safeDetectChanges()}catch(t){this.clientListLoaded=!0}})}killClient(t,e){return L(this,null,function*(){e.stopPropagation();try{yield this.common.confirm({message:this.strings().page?.monitor?.confirmKillClient}),yield this.socket.request({action:`client/kill`,payload:{id:t}}),this.common.toast({message:this.strings().page?.monitor?.clientKilled}),yield this.loadClientList()}catch(i){i!==void 0&&this.common.generalHandleError(i)}})}loadSlotStats(){return L(this,null,function*(){try{let t=yield this.socket.request({action:`cluster/slot-stats`,payload:{metric:this.slotStatsMetric,limit:20}});this.slotStats=t.slots||[],this.slotStatsLoaded=!0,this.safeDetectChanges()}catch(t){this.slotStatsLoaded=!0,this.slotStats=[]}})}loadTopKeys(){return L(this,null,function*(){try{let t=yield this.socket.request({action:`memory/top-keys`,payload:{topN:20}});this.topKeys=t.data,this.topKeysLoaded=!0,this.safeDetectChanges()}catch(t){this.topKeysLoaded=!0}})}safeDetectChanges(){this.ngZone.run(()=>{let t=document.getElementById(`p3xr-database-content-container`)||document.querySelector(`.p3xr-layout-content`),e=t?.scrollTop??window.scrollY;try{this.cdr.detectChanges()}catch(i){}requestAnimationFrame(()=>{t?t.scrollTop=e:window.scrollTo(0,e)})})}formatBytes(t){return t<1024?t+` B`:t<1024*1024?(t/1024).toFixed(1)+` KB`:(t/(1024*1024)).toFixed(1)+` MB`}togglePause(){this.paused=!this.paused}get serverInfo(){let t=this.state.info();if(!t)return null;let e=t.server||{},i=t.cpu||{};return{os:e.os||``,port:e.tcp_port||``,pid:e.process_id||``,configFile:e.config_file||``,cpuSys:i.used_cpu_sys||`0`,cpuUser:i.used_cpu_user||`0`}}get persistenceInfo(){let t=this.state.info();if(!t?.persistence)return null;let e=t.persistence,i=parseInt(e.rdb_last_save_time,10);return{rdbLastSave:i?new Date(i*1e3).toLocaleString():`N/A`,rdbStatus:e.rdb_last_bgsave_status||`N/A`,rdbChanges:e.rdb_changes_since_last_save??`N/A`,aofEnabled:e.aof_enabled===`1`?`Yes`:`No`,aofSize:e.aof_enabled===`1`?this.formatBytes(parseInt(e.aof_current_size,10)||0):``}}get replicationInfo(){let t=this.state.info();if(!t?.replication)return null;let e=t.replication,i={role:e.role||`unknown`};return e.role===`master`?i.replicas=e.connected_slaves??`0`:e.role===`slave`&&(i.masterHost=e.master_host,i.masterPort=e.master_port,i.linkStatus=e.master_link_status),i}get keyspaceEntries(){let t=this.state.info();return t?.keyspace?Object.keys(t.keyspace).filter(e=>e.startsWith(`db`)).sort((e,i)=>parseInt(e.slice(2),10)-parseInt(i.slice(2),10)).map(e=>{let i=t.keyspace[e];return{db:e,keys:typeof i==`object`&&i.keys||`0`,expires:typeof i==`object`&&i.expires||`0`}}):[]}get modulesList(){return(this.state.modules()||[]).map(t=>({name:t.name||`unknown`,ver:String(t.ver??t.version??``)}))}exportServerInfo(){let t=this.serverInfo;if(!t)return;let e=this.strings().page?.monitor||{},i=[`${e.os}: ${t.os}`,`${e.port}: ${t.port}`,`${e.pid}: ${t.pid}`,`${e.configFile}: ${t.configFile}`,`${e.cpuSys} CPU: ${t.cpuSys}`,`${e.cpuUser} CPU: ${t.cpuUser}`];this.downloadText(i.join(`
`),`${this.connName}-server-info.txt`)}exportPersistence(){let t=this.persistenceInfo;if(!t)return;let e=this.strings().page?.monitor||{},i=[`${e.rdbLastSave}: ${t.rdbLastSave}`,`${e.rdbStatus}: ${t.rdbStatus}`,`${e.rdbChanges}: ${t.rdbChanges}`,`${e.aofEnabled}: ${t.aofEnabled}`];t.aofSize&&i.push(`${e.aofSize}: ${t.aofSize}`),this.downloadText(i.join(`
`),`${this.connName}-persistence.txt`)}exportReplication(){let t=this.replicationInfo;if(!t)return;let e=this.strings().page?.monitor||{},i=[`${e.role}: ${t.role}`];t.replicas!==void 0&&i.push(`${e.replicas}: ${t.replicas}`),t.masterHost&&i.push(`${e.masterHost}: ${t.masterHost}:${t.masterPort}`),t.linkStatus&&i.push(`${e.linkStatus}: ${t.linkStatus}`),this.downloadText(i.join(`
`),`${this.connName}-replication.txt`)}exportKeyspace(){let t=this.keyspaceEntries;if(t.length===0)return;let e=this.strings().page?.monitor||{},i=t.map(s=>`${s.db}: ${e.keys}: ${s.keys}, ${e.expires}: ${s.expires}`);this.downloadText(i.join(`
`),`${this.connName}-keyspace.txt`)}exportModules(){let t=this.modulesList,e=this.strings().page?.monitor||{};if(t.length===0){this.downloadText(e.noModules,`${this.connName}-modules.txt`);return}let i=t.map(s=>`${s.name} v${s.ver}`);this.downloadText(i.join(`
`),`${this.connName}-modules.txt`)}get connName(){return this.state.connection()?.name||`redis`}exportOverview(){if(!this.current)return;let t=this.current,e=this.strings().page?.monitor||{},i=[`${e.memory}: ${t.memory.usedHuman}`,`${e.rss}: ${t.memory.rssHuman}`,`${e.peak}: ${t.memory.peakHuman}`,`${e.fragmentation}: ${t.memory.fragRatio}x`,`${e.opsPerSec}: ${t.stats.opsPerSec}`,`${e.totalCommands}: ${t.stats.totalCommands}`,`${e.clients}: ${t.clients.connected}`,`${e.blocked}: ${t.clients.blocked}`,`${e.hitsMisses}: ${t.stats.hitRate}%`,`${e.hitsAndMisses}: ${t.stats.hits} / ${t.stats.misses}`,`${e.networkIo}: ${t.stats.inputKbps.toFixed(1)} / ${t.stats.outputKbps.toFixed(1)} KB/s`,`${e.expired}: ${t.stats.expiredKeys}`,`${e.evicted}: ${t.stats.evictedKeys}`];this.downloadText(i.join(`
`),`${this.connName}-overview.txt`)}exportChart(t,e){let i=t?.nativeElement?.querySelector(`canvas`);if(!i)return;let s=document.createElement(`canvas`);s.width=i.width,s.height=i.height;let l=s.getContext(`2d`);l.fillStyle=getComputedStyle(document.body).getPropertyValue(`--p3xr-body-bg`).trim()||`#ffffff`,l.fillRect(0,0,s.width,s.height),l.drawImage(i,0,0);let h=s.toDataURL(`image/png`),S=document.createElement(`a`);S.href=h,S.download=`${this.connName}-${e}.png`,S.click()}resetSlowLog(){return L(this,null,function*(){try{yield this.common.confirm({message:this.strings().page?.monitor?.confirmSlowLogReset}),yield this.socket.request({action:`monitor/slowlog-reset`}),this.common.toast({message:this.strings().page?.monitor?.slowLogResetDone})}catch(t){}})}exportSlowLog(){if(!this.current)return;let t=this.current.slowlog.map(e=>`${e.duration}\xB5s ${e.command}`);this.downloadText(t.join(`
`),`${this.connName}-slowlog.txt`)}loadClusterShards(){return L(this,null,function*(){try{let t=yield this.socket.request({action:`cluster/shards`});this.clusterShards=t.data.shards,this.safeDetectChanges()}catch(t){this.common.generalHandleError(t)}})}toggleAutoRefreshShards(){this.autoRefreshShards=!this.autoRefreshShards,localStorage.setItem(`p3xr-monitor-auto-shards`,String(this.autoRefreshShards)),this.autoRefreshShards?(this.loadClusterShards(),this.shardsInterval=setInterval(()=>this.loadClusterShards(),2e3)):(clearInterval(this.shardsInterval),this.shardsInterval=null)}getSlotCount(t){return t.slotRanges.reduce((e,[i,s])=>e+(s-i+1),0)}formatSlotRanges(t){return t.slotRanges.map(([e,i])=>`${e}-${i}`).join(`, `)}formatReplicas(t){return t.replicas.map(e=>`${e.host}:${e.port}`).join(`, `)}exportClusterSlots(){if(!this.clusterShards)return;let t=this.clusterShards.map(e=>{let i=e.slotRanges.map(([h,S])=>`${h}-${S}`).join(`, `),s=this.getSlotCount(e),l=e.replicas.map(h=>`${h.host}:${h.port}`).join(`, `);return`${e.master.host}:${e.master.port} | ${i} | ${s} slots | replicas: ${l||`none`}`});this.downloadText(t.join(`
`),`${this.connName}-cluster-slots.txt`)}exportClientList(){let t=this.clientList.map(e=>`${e.addr} ${e.name||``} db${e.db} ${e.cmd} idle:${e.idle}s`);this.downloadText(t.join(`
`),`${this.connName}-clients.txt`)}exportTopKeys(){let t=this.topKeys.map((e,i)=>`#${i+1} ${e.key} ${this.formatBytes(e.bytes)}`);this.downloadText(t.join(`
`),`${this.connName}-topkeys.txt`)}exportAll(){return L(this,null,function*(){if(this.current)try{let t=(yield import(`./chunk-Dnmtr78C2.js`)).default,e=new t,i=this.current,s=[],l=this.strings().page?.monitor||{},h=this.strings().page?.analysis||{};s.push(`============================`,` PULSE`,`============================`,``,`--- ${l.title} ---`,`Redis ${i.server.version} \xB7 ${i.server.mode} \xB7 Uptime: ${this.uptimeFormatted}`,`${l.memory}: ${i.memory.usedHuman}`,`${l.rss}: ${i.memory.rssHuman}`,`${l.peak}: ${i.memory.peakHuman}`,`${l.fragmentation}: ${i.memory.fragRatio}x`,`${l.opsPerSec}: ${i.stats.opsPerSec}`,`${l.totalCommands}: ${i.stats.totalCommands}`,`${l.clients}: ${i.clients.connected}`,`${l.blocked}: ${i.clients.blocked}`,`${l.hitsMisses}: ${i.stats.hitRate}%`,`${l.hitsAndMisses}: ${i.stats.hits} / ${i.stats.misses}`,`${l.networkIo}: ${i.stats.inputKbps.toFixed(1)} / ${i.stats.outputKbps.toFixed(1)} KB/s`,`${l.expired}: ${i.stats.expiredKeys}`,`${l.evicted}: ${i.stats.evictedKeys}`);let S=this.serverInfo;S&&(s.push(``,`--- ${l.serverInfo} ---`),s.push(`${l.os}: ${S.os}`,`${l.port}: ${S.port}`,`${l.pid}: ${S.pid}`),S.configFile&&s.push(`${l.configFile}: ${S.configFile}`),s.push(`${l.cpuSys} CPU: ${S.cpuSys}`,`${l.cpuUser} CPU: ${S.cpuUser}`));let E=this.persistenceInfo;E&&(s.push(``,`--- ${l.persistence} ---`),s.push(`${l.rdbLastSave}: ${E.rdbLastSave}`,`${l.rdbStatus}: ${E.rdbStatus}`),s.push(`${l.rdbChanges}: ${E.rdbChanges}`,`${l.aofEnabled}: ${E.aofEnabled}`),E.aofSize&&s.push(`${l.aofSize}: ${E.aofSize}`));let V=this.replicationInfo;V&&(s.push(``,`--- ${l.replication} ---`),s.push(`${l.role}: ${V.role}`),V.replicas!==void 0&&s.push(`${l.replicas}: ${V.replicas}`),V.masterHost&&s.push(`${l.masterHost}: ${V.masterHost}:${V.masterPort}`),V.linkStatus&&s.push(`${l.linkStatus}: ${V.linkStatus}`));let B=this.keyspaceEntries;B.length>0&&(s.push(``,`--- ${l.keyspace} ---`),s.push(...B.map(_=>`${_.db}: ${l.keys}: ${_.keys}, ${l.expires}: ${_.expires}`)));let f=this.modulesList;f.length>0?(s.push(``,`--- ${l.modules} ---`),s.push(...f.map(_=>`${_.name} v${_.ver}`))):s.push(``,`--- ${l.modules} ---`,l.noModules),i.slowlog.length>0&&(s.push(``,`--- ${l.slowLog} ---`),s.push(...i.slowlog.map(_=>`${_.duration}\xB5s ${_.command}`))),this.clientList.length>0&&(s.push(``,`--- ${l.clientList} ---`),s.push(...this.clientList.map(_=>`${_.addr} ${_.name||``} db${_.db} ${_.cmd} idle:${_.idle}s`))),this.topKeys.length>0&&(s.push(``,`--- ${l.topKeys} ---`),s.push(...this.topKeys.map((_,P)=>`#${P+1} ${_.key} ${this.formatBytes(_.bytes)}`)));let R=[];try{let P=(yield this.socket.request({action:`memory/analysis`,payload:{topN:20,maxScanKeys:5e3}})).data;if(P){let H=P.memoryInfo,Y=P.expirationOverview,J=Object.keys(P.typeDistribution||{}).map(L=>({type:L,count:P.typeDistribution[L],bytes:P.typeMemory?.[L]||0})).sort((L,w)=>w.bytes-L.bytes);s.push(``,``,`============================`,` ANALYSIS`,`============================`),s.push(``,`--- ${h.keysScanned} ---`,`${h.keysScanned}: ${P.totalScanned} / ${P.dbSize}`),s.push(``,`--- ${h.memoryBreakdown} ---`),s.push(`${h.totalMemory}: ${H.usedHuman}`,`${h.rssMemory}: ${H.rssHuman}`,`${h.peakMemory}: ${H.peakHuman}`),s.push(`${h.overheadMemory}: ${this.formatBytes(H.overhead)}`,`${h.datasetMemory}: ${this.formatBytes(H.dataset)}`),s.push(`${h.luaMemory}: ${this.formatBytes(H.lua)}`,`${h.fragmentation}: ${H.fragRatio}x`,`${h.allocator}: ${H.allocator}`),s.push(``,`--- ${h.typeDistribution} ---`),s.push(...J.map(L=>`${L.type}: ${L.count} ${h.keyCount}, ${this.formatBytes(L.bytes)}`)),P.prefixMemory?.length>0&&(s.push(``,`--- ${h.prefixMemory} ---`),s.push(...P.prefixMemory.map((L,w)=>`#${w+1} ${L.prefix} \u2014 ${L.keyCount} ${h.keyCount}, ${this.formatBytes(L.totalBytes)}`))),s.push(``,`--- ${h.expirationOverview} ---`),s.push(`${h.withTTL}: ${Y.withTTL}`,`${h.persistent}: ${Y.persistent}`,`${h.avgTTL}: ${Y.avgTTL}s`),R=[{name:h.typeDistribution,items:J.map(L=>({label:L.type,value:L.bytes}))},{name:h.prefixMemory,items:(P.prefixMemory||[]).slice(0,20).map(L=>({label:L.prefix,value:L.totalBytes}))}]}}catch(_){}let z=_=>_.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F]/g,``),$=[];this.monitorData.profilerEntries.length>0&&($.push(``,``,`============================`,` PROFILER`,`============================`,``),$.push(...this.monitorData.profilerEntries.map(_=>z(`${_.fullTimestamp} [${_.database} ${_.source}] ${_.command}`)))),this.monitorData.pubsubEntries.length>0&&($.push(``,``,`============================`,` PUBSUB`,`============================`,``),$.push(...this.monitorData.pubsubEntries.map(_=>z(`${_.fullTimestamp} ${_.channel} ${_.message}`))));let u=[...s,...$].join(`
`),x=new TextEncoder().encode(u),D=new Uint8Array([239,187,191]),M=new Uint8Array(D.length+x.length);M.set(D),M.set(x,D.length),e.file(`monitoring.txt`,M);let b=[];b.push(...this.renderPulseChartsForExport());for(let _ of R){if(_.items.length===0)continue;let P=this.renderBarChart(_.items);P&&b.push({label:_.name,canvas:P})}if(b.length>0){let _=yield this.stitchCharts(b);_&&e.file(`charts.png`,_)}try{let _=yield this.generatePdf(s,b,$);_&&e.file(`monitoring.pdf`,_)}catch(_){}let O=yield e.generateAsync({type:`blob`}),j=URL.createObjectURL(O),U=document.createElement(`a`);U.href=j,U.download=`${this.connName}-monitoring.zip`,U.click(),URL.revokeObjectURL(j)}catch(t){this.common.generalHandleError(t)}})}stitchCharts(t){return L(this,null,function*(){let l=Math.max(2400,...t.map(R=>R.canvas.width)),h=32;for(let R of t){let z=R.canvas.height*(l/R.canvas.width);h+=60+z+40}h+=32;let S=document.createElement(`canvas`);S.width=l,S.height=h;let E=S.getContext(`2d`),V=getComputedStyle(document.body).getPropertyValue(`--p3xr-body-bg`).trim()||`#ffffff`,B=this.getChartColors();E.fillStyle=V,E.fillRect(0,0,l,h);let f=32;for(let R of t){E.fillStyle=B.text,E.font=`bold 28px Roboto, sans-serif`,E.textAlign=`left`,E.textBaseline=`top`,E.fillText(R.label,32,f),f+=60;let z=l-64,$=R.canvas.height*(z/R.canvas.width);E.drawImage(R.canvas,32,f,z,$),f+=$+40}return new Promise(R=>S.toBlob(z=>R(z),`image/png`))})}renderPulseChartsForExport(){let t;if(this.history.length>=2)t=this.buildChartData();else if(this.current){let l=this.current,h=Date.now()/1e3;t={timestamps:[h-1,h],memUsed:[l.memory.used/(1024*1024),l.memory.used/(1024*1024)],memRss:[l.memory.rss/(1024*1024),l.memory.rss/(1024*1024)],ops:[l.stats.opsPerSec,l.stats.opsPerSec],connected:[l.clients.connected,l.clients.connected],blocked:[l.clients.blocked,l.clients.blocked],netIn:[l.stats.inputKbps,l.stats.inputKbps],netOut:[l.stats.outputKbps,l.stats.outputKbps]}}else return[];let e=this.getChartColors(),i=this.strings().page?.monitor||{};return[{label:i.memory+` (MB)`,series:[{label:i.memory,color:e.primary,values:t.memUsed,fill:!0},{label:`RSS`,color:e.accent,values:t.memRss}]},{label:i.opsPerSec,series:[{label:i.opsPerSec,color:e.primary,values:t.ops,fill:!0}]},{label:i.clients,series:[{label:i.clients,color:e.primary,values:t.connected},{label:i.blocked,color:e.warn,values:t.blocked}]},{label:i.networkIo+` (KB/s)`,series:[{label:`↓ In`,color:e.primary,values:t.netIn,fill:!0},{label:`↑ Out`,color:e.accent,values:t.netOut}]}].map(l=>({label:l.label,canvas:this.renderLineChart(t.timestamps,l.series,e)}))}renderLineChart(t,e,i){let $=document.createElement(`canvas`);$.width=900*2,$.height=260*2;let u=$.getContext(`2d`);u.scale(2,2),u.fillStyle=getComputedStyle(document.body).getPropertyValue(`--p3xr-body-bg`).trim()||`#ffffff`,u.fillRect(0,0,900,260);let x=t.length;if(x<2)return $;let D=Infinity,M=-Infinity;for(let w of e)for(let K of w.values)K<D&&(D=K),K>M&&(M=K);D===M&&(D-=1,M+=1);let b=M-D,O=t[0],U=t[x-1]-O||1,_=w=>60+(w-O)/U*824,P=w=>200-(w-D)/b*168;u.strokeStyle=i.grid,u.lineWidth=1;let H=5;for(let w=0;w<=H;w++){let K=32+168/H*w;u.beginPath(),u.moveTo(60,K),u.lineTo(884,K),u.stroke();let W=M-b/H*w;u.fillStyle=i.text,u.font=`10px Roboto Mono, monospace`,u.textAlign=`right`,u.textBaseline=`middle`,u.fillText(W>=1e3?(W/1e3).toFixed(1)+`k`:W.toFixed(1),54,K)}let Y=Math.min(6,x);u.font=`10px Roboto, sans-serif`,u.textAlign=`center`,u.textBaseline=`top`,u.fillStyle=i.text;for(let w=0;w<Y;w++){let W=t[Math.round(w/(Y-1)*(x-1))],X=new Date(W*1e3),Yt=`${String(X.getHours()).padStart(2,`0`)}:${String(X.getMinutes()).padStart(2,`0`)}:${String(X.getSeconds()).padStart(2,`0`)}`;u.fillText(Yt,_(W),206)}for(let w of e){u.strokeStyle=w.color,u.lineWidth=2,u.lineJoin=`round`,u.beginPath();for(let K=0;K<x;K++){let W=_(t[K]),X=P(w.values[K]);K===0?u.moveTo(W,X):u.lineTo(W,X)}if(u.stroke(),w.fill){u.fillStyle=w.color+`20`,u.beginPath(),u.moveTo(_(t[0]),P(w.values[0]));for(let K=1;K<x;K++)u.lineTo(_(t[K]),P(w.values[K]));u.lineTo(_(t[x-1]),200),u.lineTo(_(t[0]),200),u.closePath(),u.fill()}}let J=60,L=244;u.font=`11px Roboto, sans-serif`,u.textAlign=`left`,u.textBaseline=`middle`;for(let w of e)u.fillStyle=w.color,u.fillRect(J,L-4,12,8),u.fillStyle=i.text,u.fillText(w.label,J+16,L),J+=u.measureText(w.label).width+32;return $}renderBarChart(t){if(t.length===0)return null;let e=this.getChartColors(),i=e.text.includes(`255`),s=[e.primary,e.accent,e.warn,i?`#ffb74d`:`#ff9800`,i?`#81c784`:`#4caf50`,i?`#4dd0e1`:`#00bcd4`,i?`#a1887f`:`#795548`,i?`#90a4ae`:`#607d8b`],l=2,h=800,S=24,E=120,V=80,B=128,R=h-V-8-B,z=8,$=z+t.length*28+8,u=document.createElement(`canvas`);u.width=h*l,u.height=$*l;let x=u.getContext(`2d`);x.scale(l,l),x.fillStyle=getComputedStyle(document.body).getPropertyValue(`--p3xr-body-bg`).trim()||`#ffffff`,x.fillRect(0,0,h,$);let D=Math.max(...t.map(M=>M.value),1);return t.forEach((M,b)=>{let O=z+b*28;x.fillStyle=e.text,x.font=`12px Roboto, sans-serif`,x.textAlign=`right`,x.textBaseline=`middle`,x.fillText(M.label.length>15?M.label.substring(0,14)+`…`:M.label,E,O+S/2),x.fillStyle=e.grid,x.fillRect(B,O,R,S),x.fillStyle=s[b%s.length],x.fillRect(B,O,M.value/D*R,S),x.fillStyle=e.text,x.font=`11px Roboto Mono, monospace`,x.textAlign=`left`,x.fillText(this.formatBytes(M.value),720,O+S/2)}),u}generatePdf(s,l){return L(this,arguments,function*(t,e,i=[]){let{jsPDF:h}=yield import(`./chunk-plXMTV3Y.js`),S=document.body.classList.contains(`p3xr-theme-dark`),E=getComputedStyle(document.body).getPropertyValue(`--p3xr-body-bg`).trim()||`#ffffff`,V=S?`#e0e0e0`:`#212121`,B=S?`#90caf9`:`#1565c0`,f=new h({orientation:`portrait`,unit:`mm`,format:`a4`}),R=f.internal.pageSize.getWidth(),z=f.internal.pageSize.getHeight(),$=12,u=R-$*2,x=$,D=()=>{f.setFillColor(E),f.rect(0,0,R,z,`F`)};D();let M=b=>{x+b>z-$&&(f.addPage(),D(),x=$)};for(let b of t){if(b.startsWith(`====`))continue;if(b.trim()===`PULSE`||b.trim()===`PROFILER`||b.trim()===`PUBSUB`||b.trim()===`ANALYSIS`){M(14),x+=4,f.setFontSize(14),f.setTextColor(B),f.text(b.trim(),$,x),x+=8;continue}if(b.startsWith(`---`)&&b.endsWith(`---`)){M(8);let U=b.replace(/^-+\s*/,``).replace(/\s*-+$/,``);x+=2,f.setFontSize(10),f.setTextColor(B),f.text(U,$,x),x+=5;continue}if(b===``){x+=2;continue}M(4),f.setTextColor(V),f.setFontSize(8);let j=f.splitTextToSize(b,u);for(let U of j)M(4),f.text(U,$,x),x+=3.5}for(let b of e){f.addPage(),D(),x=$,f.setFontSize(12),f.setTextColor(B),f.text(b.label,$,x),x+=8;let O=b.canvas.toDataURL(`image/png`),j=b.canvas.height/b.canvas.width,U=z-x-$,_=u,P=_*j;if(P>U){let H=U,Y=H/j;f.addImage(O,`PNG`,$,x,Y,H),x+=H}else f.addImage(O,`PNG`,$,x,_,P),x+=P}i.length>0&&e.length>0&&(f.addPage(),D(),x=$);for(let b of i){if(b.startsWith(`====`))continue;if(b.trim()===`PROFILER`||b.trim()===`PUBSUB`){M(14),x+=4,f.setFontSize(14),f.setTextColor(B),f.text(b.trim(),$,x),x+=8;continue}if(b===``){x+=2;continue}M(4),f.setTextColor(V),f.setFontSize(8);let j=f.splitTextToSize(b,u);for(let U of j)M(4),f.text(U,$,x),x+=3.5}return f.output(`blob`)})}downloadText(t,e){let i=new Blob([t],{type:`text/plain`}),s=URL.createObjectURL(i),l=document.createElement(`a`);l.href=s,l.download=e,l.click(),URL.revokeObjectURL(s)}get uptimeFormatted(){if(!this.current)return`-`;let t=this.current.server.uptime,e=Math.floor(t/86400),i=Math.floor(t%86400/3600),s=Math.floor(t%3600/60);return e>0?`${e}d ${i}h ${s}m`:i>0?`${i}h ${s}m`:`${s}m`}fetchData(){return L(this,null,function*(){try{let e=(yield this.socket.request({action:`monitor/info`,payload:{}})).data;this.current=e,this.isCluster=this.state.connection()?.cluster===!0,this.history.push(e),this.history.length>Xe&&this.history.shift(),this.chartsInitialized?this.updateCharts():this.uPlot&&this.history.length>=2&&this.initCharts(),this.safeDetectChanges()}catch(t){}})}loadUPlot(){return L(this,null,function*(){let t=yield import(`./chunk-D64pLR9Q.js`);this.uPlot=t.default,this.history.length>=2&&this.initCharts()})}getChartColors(){let t=document.body.classList.contains(`p3xr-theme-dark`),e=getComputedStyle(document.body),i=e.getPropertyValue(`--p3xr-btn-primary-bg`).trim(),s=e.getPropertyValue(`--p3xr-btn-accent-bg`).trim(),l=e.getPropertyValue(`--p3xr-btn-warn-bg`).trim();return{primary:i||(t?`#90caf9`:`#1976d2`),accent:s||(t?`#ce93d8`:`#9c27b0`),warn:l||(t?`#ef9a9a`:`#f44336`),text:t?`rgba(255,255,255,0.87)`:`rgba(0,0,0,0.87)`,grid:t?`rgba(255,255,255,0.08)`:`rgba(0,0,0,0.08)`}}reinitCharts(){this.memoryPlot?.destroy(),this.opsPlot?.destroy(),this.clientsPlot?.destroy(),this.networkPlot?.destroy(),this.chartsInitialized=!1,this.history.length>=2&&this.initCharts()}getChartWidth(t){return t?.offsetWidth||500}createOpts(t,e){let i=this.getChartColors();return{width:t,height:180,cursor:{show:!0,drag:{x:!1,y:!1}},legend:{show:!0,live:!1},scales:{x:{time:!0}},axes:[{stroke:i.text,grid:{stroke:i.grid,width:1},ticks:{stroke:i.grid},font:`11px Roboto`,values:(s,l)=>l.map(h=>Wt(h*1e3))},{stroke:i.text,grid:{stroke:i.grid,width:1},ticks:{stroke:i.grid},font:`11px Roboto Mono`,size:55}],series:[{label:this.strings().label?.time,value:(s,l)=>l?Wt(l*1e3):``},...e]}}initCharts(){if(!this.uPlot||this.chartsInitialized)return;let t=this.getChartColors(),e=this.buildChartData(),i=this.memoryChartRef?.nativeElement,s=this.opsChartRef?.nativeElement,l=this.clientsChartRef?.nativeElement,h=this.networkChartRef?.nativeElement;if(!i||!s||!l||!h)return;let S=this.strings().page?.monitor||{};this.memoryPlot=new this.uPlot(this.createOpts(this.getChartWidth(i),[{label:S.memory,stroke:t.primary,width:2,fill:t.primary+`15`},{label:`RSS`,stroke:t.accent,width:2}]),[e.timestamps,e.memUsed,e.memRss],i),this.opsPlot=new this.uPlot(this.createOpts(this.getChartWidth(s),[{label:S.opsPerSec,stroke:t.primary,width:2,fill:t.primary+`20`}]),[e.timestamps,e.ops],s),this.clientsPlot=new this.uPlot(this.createOpts(this.getChartWidth(l),[{label:S.clients,stroke:t.primary,width:2},{label:S.blocked,stroke:t.warn,width:2}]),[e.timestamps,e.connected,e.blocked],l),this.networkPlot=new this.uPlot(this.createOpts(this.getChartWidth(h),[{label:`↓ In`,stroke:t.primary,width:2,fill:t.primary+`15`},{label:`↑ Out`,stroke:t.accent,width:2}]),[e.timestamps,e.netIn,e.netOut],h),this.chartsInitialized=!0;let E;this.resizeObserver=new ResizeObserver(()=>{clearTimeout(E),E=setTimeout(()=>{let V=this.getChartWidth(i),B=this.getChartWidth(s),f=this.getChartWidth(l),R=this.getChartWidth(h);V>0&&this.memoryPlot?.setSize({width:V,height:180}),B>0&&this.opsPlot?.setSize({width:B,height:180}),f>0&&this.clientsPlot?.setSize({width:f,height:180}),R>0&&this.networkPlot?.setSize({width:R,height:180})},50)}),this.resizeObserver.observe(i),this.resizeObserver.observe(s),this.resizeObserver.observe(l),this.resizeObserver.observe(h)}buildChartData(){return{timestamps:this.history.map(t=>t.timestamp/1e3),memUsed:this.history.map(t=>t.memory.used/(1024*1024)),memRss:this.history.map(t=>t.memory.rss/(1024*1024)),ops:this.history.map(t=>t.stats.opsPerSec),connected:this.history.map(t=>t.clients.connected),blocked:this.history.map(t=>t.clients.blocked),netIn:this.history.map(t=>t.stats.inputKbps),netOut:this.history.map(t=>t.stats.outputKbps)}}updateCharts(){if(!this.chartsInitialized)return;let t=this.buildChartData();this.memoryPlot?.setData([t.timestamps,t.memUsed,t.memRss]),this.opsPlot?.setData([t.timestamps,t.ops]),this.clientsPlot?.setData([t.timestamps,t.connected,t.blocked]),this.networkPlot?.setData([t.timestamps,t.netIn,t.netOut])}static ɵfac=function(e){return new(e||o)(Qe$1(YQ),Qe$1(bi),Qe$1(It),Qe$1(mc),Qe$1(O),Qe$1(q),Qe$1(Q),Qe$1(Oe$2))};static ɵcmp=Ee$1({type:o,selectors:[[`p3xr-monitoring`]],viewQuery:function(e,i){if(e&1&&lc(Qt,5)(Zt,5)(Gt,5)(Jt,5),e&2){let s;Cf(s=xf())&&(i.memoryChartRef=s.first),Cf(s=xf())&&(i.opsChartRef=s.first),Cf(s=xf())&&(i.clientsChartRef=s.first),Cf(s=xf())&&(i.networkChartRef=s.first)}},decls:2,vars:2,consts:[[`memoryChart`,``],[`opsChart`,``],[`clientsChart`,``],[`networkChart`,``],[1,`p3xr-monitoring-loading`],[`accordionKey`,`monitor-overview`,3,`title`],[`actions`,``],[3,`click`,`label`,`mdIcon`],[`mdIcon`,`download`,3,`click`,`label`],[`mdIcon`,`archive`,3,`click`,`label`],[`content`,``],[1,`p3xr-settings-pair-row`],[1,`p3xr-settings-row-label`],[1,`p3xr-settings-row-value`,`p3xr-mono`],[`accordionKey`,`monitor-modules`,3,`title`],[2,`padding`,`16px`,`opacity`,`0.5`],[`accordionKey`,`monitor-chart-memory`,3,`title`],[1,`p3xr-monitoring-chart`],[`accordionKey`,`monitor-chart-ops`,3,`title`],[`accordionKey`,`monitor-chart-clients`,3,`title`],[`accordionKey`,`monitor-chart-network`,3,`title`],[`accordionKey`,`monitor-slowlog`,3,`title`],[`label`,`Reset`,`mdIcon`,`delete_sweep`],[2,`padding`,`12px 16px`,`opacity`,`0.6`],[`accordionKey`,`monitor-clients-list`,3,`title`],[`mdIcon`,`refresh`,3,`label`],[`accordionKey`,`monitor-top-keys`,3,`title`],[`accordionKey`,`monitor-server-info`,3,`title`],[`accordionKey`,`monitor-persistence`,3,`title`],[`accordionKey`,`monitor-replication`,3,`title`],[`accordionKey`,`monitor-keyspace`,3,`title`],[`label`,`Reset`,`mdIcon`,`delete_sweep`,3,`click`],[1,`p3xr-monitoring-slowlog-row`],[1,`p3xr-kbd`,`p3xr-kbd-small`],[1,`p3xr-monitoring-slowlog-cmd`],[`mdIcon`,`refresh`,3,`click`,`label`],[1,`p3xr-monitoring-client-row`],[1,`p3xr-mono`,`p3xr-monitoring-client-addr`],[1,`p3xr-monitoring-client-name`],[1,`p3xr-monitoring-client-info`],[1,`p3xr-monitoring-client-kill`,3,`matTooltip`],[1,`p3xr-monitoring-client-kill`,3,`click`,`matTooltip`],[2,`opacity`,`0.4`,`margin-right`,`8px`],[1,`p3xr-mono`,2,`font-size`,`13px`],[`accordionKey`,`monitor-slot-stats`,3,`title`],[2,`padding`,`8px 16px`,`display`,`flex`,`gap`,`8px`,`align-items`,`center`],[`subscriptSizing`,`dynamic`,2,`width`,`180px`],[`matNativeControl`,``,3,`ngModelChange`,`change`,`ngModel`],[`value`,`KEY-COUNT`],[`value`,`CPU-USEC`],[`value`,`MEMORY-BYTES`],[1,`p3xr-mono`],[`accordionKey`,`monitor-cluster-slots`,3,`title`],[2,`padding`,`8px 16px`,`opacity`,`0.6`,`font-size`,`12px`],[2,`font-weight`,`500`],[1,`p3xr-analysis-sub`],[2,`opacity`,`0.5`,`margin-left`,`8px`]],template:function(e,i){e&1&&(co(0,oe,5,1,`div`,4),co(1,Ge,177,80)),e&2&&(lo(i.current?-1:0),Sn(),lo(i.current?1:-1))},dependencies:[Eb,Gn,jn,Tn,pt,xn,on,yt,wt,$Y,Qt$1,gt,f,u,Yt,Xt$1,Zt$1,Qt$2,qe$1,U,Oe$1,ze$1,X,lt,QN],styles:[`p3xr-monitoring{display:block;color:var(--%NS%mat-app-text-color, inherit)}.p3xr-monitoring-loading{display:flex;align-items:center;justify-content:center;gap:8px;padding:64px;opacity:.5;font-size:18px}.p3xr-monitoring-server-info{opacity:.6;font-size:12px;white-space:nowrap}.p3xr-mono{font-family:Roboto Mono,monospace}.p3xr-monitoring-sub{opacity:.5;font-size:12px;margin-left:8px}.p3xr-monitoring-chart{width:100%;min-height:180px;overflow:hidden}.p3xr-monitoring-chart .uplot{font-family:Roboto,sans-serif}.p3xr-monitoring-chart .u-legend{font-size:12px;color:var(--%NS%mat-app-text-color, inherit);opacity:.8}.p3xr-monitoring-chart .u-legend .u-series td{padding:1px 4px}.p3xr-monitoring-client-row{display:flex;align-items:center;width:100%;gap:8px}.p3xr-monitoring-client-addr{font-size:13px;font-weight:700;min-width:150px}.p3xr-monitoring-client-name{opacity:.5;font-size:12px}.p3xr-monitoring-client-info{flex:1;text-align:right;font-family:Roboto Mono,monospace;font-size:12px;opacity:.6}.p3xr-monitoring-client-kill{cursor:pointer;font-size:18px!important;width:18px!important;height:18px!important;color:var(--%NS%p3xr-btn-warn-bg, #f44336);opacity:.7;flex-shrink:0}.p3xr-monitoring-client-kill:hover{opacity:1}.p3xr-monitoring-slowlog-row{display:flex;align-items:center;gap:12px;width:100%}.p3xr-monitoring-slowlog-cmd{font-family:Roboto Mono,monospace;font-size:13px;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
`],encapsulation:2})}return o})();export{Mi as MonitoringComponent};