UNPKG

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

1 lines • 1.81 kB
import{i as e}from"./chunk-62oNxeRG.js";import{Q as t,t as n}from"./Box-zFhO8JOc.js";import{n as r,o as i}from"./i18n.store-BgO27SyP.js";import{n as a,t as o}from"./Tabs-DzDOhecV.js";import{r as s}from"./redis-state.store-D1VAMKQx.js";import{r as c}from"./common.store-BdGjnV1l.js";import{C as l,S as u,w as d}from"./index-CHO_02-t.js";import{destroyMonitoringData as f,initMonitoringData as p,startProfiler as m,startPubSub as h,stopProfiler as g,stopPubSub as _}from"./monitoring-data.store-CaA416U1.js";var v=e(i()),y=t(),b=[`/monitoring`,`/monitoring/profiler`,`/monitoring/pubsub`,`/monitoring/analysis`];function x(e){return e.startsWith(`/monitoring/profiler`)?1:e.startsWith(`/monitoring/pubsub`)?2:e.startsWith(`/monitoring/analysis`)?3:0}function S(){let e=r(e=>e.strings);r(e=>e.currentLang);let t=s(e=>e.connection),{generalHandleError:i}=c(),S=l(),C=d(),[w,T]=(0,v.useState)(()=>x(S.pathname));return(0,v.useEffect)(()=>{T(x(S.pathname))},[S.pathname]),(0,v.useEffect)(()=>t?(p(()=>r.getState().currentLang),(async()=>{try{await m()}catch(e){i(e)}try{await h()}catch(e){i(e)}})(),()=>{g(),_(),f()}):void 0,[t]),(0,y.jsxs)(n,{sx:{display:`flex`,flexDirection:`column`,flex:1,minHeight:0,position:`absolute`,top:0,left:0,right:0,bottom:0},children:[(0,y.jsxs)(o,{value:w,onChange:(e,t)=>{t>=0&&t<b.length&&(T(t),C(b[t]))},variant:`fullWidth`,sx:{bgcolor:`background.paper`,borderBottom:1,borderColor:`divider`,flexShrink:0},children:[(0,y.jsx)(a,{label:e?.intention?.pulse}),(0,y.jsx)(a,{label:e?.intention?.profiler}),(0,y.jsx)(a,{label:e?.intention?.pubsubMonitor}),(0,y.jsx)(a,{label:e?.intention?.memoryAnalysis})]}),(0,y.jsx)(n,{id:`p3xr-monitoring-content`,className:`p3xr-monitoring-shell-content`,sx:{flex:1,minHeight:0,overflow:`auto`,p:`5px`},children:(0,y.jsx)(u,{})})]})}export{S as default};