@lacneu/atrium 0.71.5 → 0.71.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccessTab-B_hOZpp8.js → AccessTab-DYrUPmjp.js} +1 -1
- package/dist/assets/{AdvancedFilter-CHrlsf4a.js → AdvancedFilter-BDVmqtnD.js} +1 -1
- package/dist/assets/AgentFilesTab-kIRg9YDO.js +3 -0
- package/dist/assets/AnomaliesTab-b4O_PHhq.js +1 -0
- package/dist/assets/AuditTab-DLXQguRl.js +1 -0
- package/dist/assets/BridgeTab-COOjCey2.js +1 -0
- package/dist/assets/{ChatDefaultsTab-DHxEQm0M.js → ChatDefaultsTab-DULvhN5B.js} +1 -1
- package/dist/assets/{DataTableShell-D04EM9Zp.js → DataTableShell-vuJDvlum.js} +1 -1
- package/dist/assets/{DetailChips-DYBZDMW5.js → DetailChips-D-HlZTp-.js} +1 -1
- package/dist/assets/FeedbacksTab-DJn3PSSA.js +1 -0
- package/dist/assets/{FieldLabel-DXrZ-jZW.js → FieldLabel-fW5dBj9i.js} +1 -1
- package/dist/assets/FilesTab-iqISoQvw.js +1 -0
- package/dist/assets/{FilterBar-McDCuaLr.js → FilterBar-BbF96T8z.js} +1 -1
- package/dist/assets/GroupsTab-COHQgpuq.js +1 -0
- package/dist/assets/InstancesTab-DzkWXWDr.js +1 -0
- package/dist/assets/{IntegrationsTab-CwqGvBbR.js → IntegrationsTab-DhEekkdi.js} +1 -1
- package/dist/assets/KpiTab-CM9cHlkw.js +1 -0
- package/dist/assets/PreferencesTab-BJ_drPlk.js +1 -0
- package/dist/assets/ProjectPage-C9ncz-Wz.js +1 -0
- package/dist/assets/PromptInjectionsTab-B4sZi64x.js +4 -0
- package/dist/assets/RolesTab-Bsjz_VFr.js +1 -0
- package/dist/assets/ScheduledTab-r1YDrEr3.js +1 -0
- package/dist/assets/ServiceAccountsTab-CHBjoJrF.js +1 -0
- package/dist/assets/{SubAgentReportsTab-BZZgz35X.js → SubAgentReportsTab-BoTWB1Sz.js} +1 -1
- package/dist/assets/ThemeShowroom-S86Ia-Tt.js +1 -0
- package/dist/assets/{TimeRangePicker-4lLXkwg_.js → TimeRangePicker-BWBSluZX.js} +1 -1
- package/dist/assets/{TimezoneCombobox-JMlCoWmN.js → TimezoneCombobox-B0NcuG2m.js} +1 -1
- package/dist/assets/TracesTab-CnTLWpFj.js +1 -0
- package/dist/assets/UsersTab-DKG6lmyS.js +1 -0
- package/dist/assets/VoiceTab-CS0P6-jO.js +1 -0
- package/dist/assets/{api-BilJV3v_.js → api-Dr5hDHvi.js} +5 -5
- package/dist/assets/{button-9dv2rCon.js → button-BI3fckfr.js} +1 -1
- package/dist/assets/{card-Bm7W459T.js → card-D2togi2C.js} +1 -1
- package/dist/assets/check-DAI8V1Km.js +1 -0
- package/dist/assets/chevron-up-BwcZQhBy.js +1 -0
- package/dist/assets/chevrons-up-down-DBgS9XVd.js +1 -0
- package/dist/assets/{compatView-CrO1qBCx.js → compatView-Dw2Mg_up.js} +1 -1
- package/dist/assets/{dispatchErrorInfo-Bb8p70Cg.js → dispatchErrorInfo-CvAG5Yps.js} +1 -1
- package/dist/assets/{dist-CqrxhZ9M.js → dist-B9J3rPRX.js} +1 -1
- package/dist/assets/{dist-B5ZuNyna.js → dist-D8R6-oX1.js} +1 -1
- package/dist/assets/{dist-BAdv_1OK.js → dist-nYugf5jG.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-Btb9KJq1.js → highlighted-body-OFNGDK62-DkEeCM4I.js} +1 -1
- package/dist/assets/index-CaP52i63.js +238 -0
- package/dist/assets/{list-D6QNuEgi.js → list-C4l173ZQ.js} +1 -1
- package/dist/assets/mermaid-GHXKKRXX-OwBbbvqf.js +1 -0
- package/dist/assets/{pdf-CFmOMsHJ.js → pdf-BlYP59Fs.js} +1 -1
- package/dist/assets/roleDescriptions-DKViGJea.js +1 -0
- package/dist/assets/{table-Clk0vmat.js → table-CH0obeXz.js} +1 -1
- package/dist/assets/{tabs-Cb9Sl0jx.js → tabs-BPua3v_Q.js} +1 -1
- package/dist/assets/x-B_mNl1Gq.js +1 -0
- package/dist/index.html +9 -9
- package/package.json +1 -1
- package/dist/assets/AgentFilesTab-BkKEuRDd.js +0 -3
- package/dist/assets/AnomaliesTab-u9-3K-lF.js +0 -1
- package/dist/assets/AuditTab-CYmqDWNR.js +0 -1
- package/dist/assets/BridgeTab-C0rgWnuo.js +0 -1
- package/dist/assets/FeedbacksTab-hmGYgwlb.js +0 -1
- package/dist/assets/FilesTab-BcrhL8PB.js +0 -1
- package/dist/assets/GroupsTab-D0IitvKz.js +0 -1
- package/dist/assets/InstancesTab-B6Pv9uOt.js +0 -1
- package/dist/assets/KpiTab-Ct-kkiQm.js +0 -1
- package/dist/assets/PreferencesTab-D4bQt-DS.js +0 -1
- package/dist/assets/ProjectPage-Ba6YWHAH.js +0 -1
- package/dist/assets/PromptInjectionsTab-Cq0cq9bR.js +0 -4
- package/dist/assets/RolesTab-C36Tft_N.js +0 -1
- package/dist/assets/ScheduledTab-CqKvdh3Q.js +0 -1
- package/dist/assets/ServiceAccountsTab-C33Dtnvs.js +0 -1
- package/dist/assets/ThemeShowroom-pi2gvnOQ.js +0 -1
- package/dist/assets/TracesTab-CaBG2F9P.js +0 -1
- package/dist/assets/UsersTab-oIR5XnzZ.js +0 -1
- package/dist/assets/VoiceTab-BWquWQ-G.js +0 -1
- package/dist/assets/check-CqOJd5HV.js +0 -1
- package/dist/assets/chevron-up-pWi7u_A_.js +0 -1
- package/dist/assets/chevrons-up-down-CWR38QEI.js +0 -1
- package/dist/assets/index-DU-gHWXa.js +0 -238
- package/dist/assets/mermaid-GHXKKRXX-B3_VFkZ8.js +0 -1
- package/dist/assets/roleDescriptions-BpMhqxQ8.js +0 -1
- package/dist/assets/x-CzNvcA7I.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$N as r,$P as i,AP as a,BP as o,CP as s,D as c,DP as l,EP as u,FP as d,GN as f,GP as p,HN as m,HP as h,IP as g,JN as _,JP as v,KN as y,KP as ee,LP as te,MP as ne,MR as re,NP as ie,NR as ae,OP as oe,PP as se,QN as ce,QP as le,RP as ue,SP as de,TP as fe,UN as pe,UP as me,UR as b,VN as he,VP as ge,VR as _e,WN as ve,WP as ye,WR as x,XN as be,XP as xe,YN as S,YP as Se,ZN as Ce,ZP as we,_P as Te,aF as Ee,aP as De,as as C,bP as Oe,cF as ke,cP as Ae,dP as je,eF as Me,eP as Ne,fP as Pe,gP as Fe,hP as Ie,iF as Le,iP as Re,is as w,jP as ze,jR as Be,kP as Ve,lF as He,lP as Ue,mP as We,nF as Ge,nP as Ke,ns as qe,oF as Je,oP as Ye,pP as Xe,qN as Ze,qP as Qe,r as $e,rF as et,rP as tt,rs as nt,sF as rt,sP as T,t as E,tF as it,tP as at,uP as ot,vP as st,wP as ct,xP as lt,yP as ut,zP as dt}from"./api-BilJV3v_.js";import{t as D}from"./check-CqOJd5HV.js";import{t as O}from"./x-CzNvcA7I.js";import{t as k}from"./button-9dv2rCon.js";import{$ as A,Dn as ft,En as j,Et as M,Ft as pt,G as mt,It as N,K as ht,Lt as gt,Mt as _t,Nt as vt,Pt as P,Q as F,X as I,Z as L,et as R,jt as z,q as B,ut as V}from"./index-DU-gHWXa.js";import{t as yt}from"./localePickerView-C2RmOS86.js";import{a as bt,i as xt,n as St,o as Ct,r as wt,t as Tt}from"./card-Bm7W459T.js";import{a as Et,i as H,n as Dt,o as U,r as W,t as Ot}from"./table-Clk0vmat.js";import{t as kt}from"./TimeRangePicker-4lLXkwg_.js";import{t as At}from"./FilterBar-McDCuaLr.js";import{t as jt}from"./AdvancedFilter-CHrlsf4a.js";var G=c(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]),K=t(e(),1),Mt=.1,Nt=[248,248,248],Pt=[24,24,24];function Ft(e,t,n){let r=t,i=n,a=-1,o=-1;for(let s=0;s<n;s++)for(let n=0;n<t;n++)e[(s*t+n)*4+3]>8&&(n<r&&(r=n),n>a&&(a=n),s<i&&(i=s),s>o&&(o=s));return a<0?null:{x:r,y:i,width:a-r+1,height:o-i+1}}function It(e,t,n){let r=t*n;if(r===0)return 0;let i=0;for(let t=3;t<e.length;t+=4)e[t]<=8&&i++;return i/r}function q(e,t,n){return It(e,t,n)>=Mt}function Lt(e,t){for(let n=0;n<e.length;n+=4)e[n]=t[0],e[n+1]=t[1],e[n+2]=t[2]}function Rt(e){for(let t=0;t<e.length;t+=4)e[t]=255-e[t],e[t+1]=255-e[t+1],e[t+2]=255-e[t+2]}var zt=12*1024*1024,Bt=480,Vt=160,Ht=.92;async function Ut(e,t={}){if(!e.type.startsWith(`image/`))throw Error(ot());if(e.size>zt)throw Error(Ue());let{source:n,width:r,height:i,cleanup:a}=await Wt(e);try{let a=e.type===`image/svg+xml`,o=Math.min(Bt/r,Vt/i,a?1/0:1),s=Math.max(1,Math.round(r*o)),c=Math.max(1,Math.round(i*o)),l=document.createElement(`canvas`);l.width=s,l.height=c;let u=l.getContext(`2d`);if(!u)throw Error(T());u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,u.drawImage(n,0,0,s,c);let d=Ft(u.getImageData(0,0,s,c).data,s,c)??{x:0,y:0,width:s,height:c},f=document.createElement(`canvas`);f.width=d.width,f.height=d.height;let p=f.getContext(`2d`);if(!p)throw Error(T());if(p.drawImage(l,d.x,d.y,d.width,d.height,0,0,d.width,d.height),t.variantFor){let e=p.getImageData(0,0,d.width,d.height);q(e.data,d.width,d.height)?Lt(e.data,t.variantFor===`dark`?Nt:Pt):Rt(e.data),p.putImageData(e,0,0)}let m=q(p.getImageData(0,0,d.width,d.height).data,d.width,d.height),h=await Y(f,`image/webp`,Ht)??await Y(f,`image/png`);if(!h)throw Error(Ye());return{blob:h,hasAlpha:m}}finally{a()}}async function Wt(e){if(e.type===`image/svg+xml`)return J(e);if(typeof createImageBitmap==`function`)try{let t=await createImageBitmap(e);return{source:t,width:t.width,height:t.height,cleanup:()=>t.close()}}catch{}return J(e)}async function J(e){let t=URL.createObjectURL(e);try{let e=new Image;return e.decoding=`async`,await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=()=>r(Error(Ae())),e.src=t}),{source:e,width:e.naturalWidth||300,height:e.naturalHeight||150,cleanup:()=>URL.revokeObjectURL(t)}}catch(e){throw URL.revokeObjectURL(t),e}}function Y(e,t,n){return new Promise(r=>e.toBlob(e=>r(e),t,n))}var X=n();function Gt(e,t){let n=e.trim().replace(/[^A-Za-z0-9_.-]+/g,`-`).replace(/^-+|-+$/g,``)||`chart`,r=new Blob([JSON.stringify(t,null,2)],{type:`application/json`}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=`${n}.chart.json`,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(i)}var Z=`__all__`,Q={kind:`relative`,from:`now-24h`,to:`now`},Kt=[{value:`status`,label:`Statut`},{value:`latencyMs`,label:`Latence (ms)`},{value:`route`,label:`Route`},{value:`roleKey`,label:`Rôle`},{value:`correlationId`,label:`Corrélation`}];function $({title:e,description:t,children:n}){return(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:e}),t?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:t}):null]}),(0,X.jsx)(`div`,{className:`oc-show__demo`,children:n})]})}function qt(e){return e===`light`?ae():e===`dark`?re():Be()}var Jt=[`primary`,`secondary`,`accent`,`muted`,`chart-1`,`chart-2`];function Yt({tokens:e,mode:t}){let n=e.colors[t];return(0,X.jsx)(`div`,{className:`oc-chart-swatches`,"aria-hidden":!0,children:Jt.map(e=>{let t=n[e];return(0,X.jsx)(`span`,{className:`oc-chart-swatch`,style:t?{background:t}:void 0},e)})})}function Xt({selected:e,title:t,subtitle:n,tokens:r,mode:i,onSelect:a,onExport:o}){return(0,X.jsxs)(`div`,{className:`oc-chart-card-wrap`,children:[(0,X.jsxs)(`button`,{type:`button`,className:$e(`oc-chart-card`,e&&`oc-chart-card--selected`),"aria-pressed":e,onClick:a,children:[(0,X.jsxs)(`div`,{className:`oc-chart-card__head`,children:[(0,X.jsx)(`span`,{className:`oc-chart-card__title`,children:t}),e?(0,X.jsx)(D,{className:`size-4 text-primary`,"aria-hidden":!0}):null]}),r?(0,X.jsx)(Yt,{tokens:r,mode:i}):(0,X.jsx)(`div`,{className:`oc-chart-swatches oc-chart-swatches--native`,"aria-hidden":!0}),(0,X.jsx)(`div`,{className:`oc-chart-card__meta`,children:(0,X.jsx)(`span`,{className:`oc-chart-card__subtitle`,children:n})})]}),o?(0,X.jsx)(k,{type:`button`,variant:`ghost`,size:`icon`,className:`oc-chart-card__export`,onClick:o,"aria-label":C(),title:C(),children:(0,X.jsx)(ft,{className:`size-4`})}):null]})}function Zt({selectedKey:e,resolvedMode:t}){let n=x(E.charts.listMyCharts),r=b(E.charts.setMyChart);async function a(e){try{await r({name:e})}catch{}}return(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:it()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Me()})]}),(0,X.jsxs)(`div`,{className:`oc-chart-grid`,children:[(0,X.jsx)(Xt,{selected:e===null,title:i(),subtitle:le(),tokens:null,mode:t,onSelect:()=>void a(null)}),(n??[]).map(n=>{let r=n.via===`common`?we():n.via===`owner`?xe():Se({group:n.via.group});return(0,X.jsx)(Xt,{selected:e===n.key,title:n.name,subtitle:r,tokens:n.tokens,mode:t,onSelect:()=>void a(n.key),onExport:()=>Gt(n.name,n.tokens)},n.key)})]}),n!==void 0&&n.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:v()}):null]})}function Qt(){let e=b(E.charts.importChart),[t,n]=(0,K.useState)(``),[r,i]=(0,K.useState)(``),[o,s]=(0,K.useState)(null),[c,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(!1);async function m(e){let t=e.target.files?.[0];if(e.target.value=``,t){s(null),d(!1);try{i(await t.text())}catch{s(u())}}}async function h(){if(s(null),d(!1),t.trim()===``){s(ct());return}let a;try{a=JSON.parse(r)}catch{s(u());return}p(!0);try{await e({name:t.trim(),tokens:a}),d(!0),n(``),i(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{p(!1)}}return(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:se()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ie()})]}),(0,X.jsxs)(`div`,{className:`oc-chart-import`,children:[(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:ne()}),(0,X.jsx)(z,{value:t,onChange:e=>n(e.target.value),placeholder:ze(),maxLength:60})]}),(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:a()}),(0,X.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:r,onChange:e=>i(e.target.value),placeholder:Ve(),rows:8,spellCheck:!1})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(k,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,X.jsx)(G,{className:`size-4`}),oe(),(0,X.jsx)(`input`,{type:`file`,accept:`application/json,.json`,className:`oc-chart-import__file-input`,onChange:e=>void m(e)})]})}),(0,X.jsx)(k,{size:`sm`,disabled:f,onClick:()=>void h(),children:l()})]}),o?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null,c?(0,X.jsx)(`p`,{className:`oc-chart-import__ok`,children:fe()}):null]})]})}function $t({chart:e}){let t=_e(E.charts.setChartLogo),n=b(E.charts.removeChartLogo),[r,i]=(0,K.useState)(!1),[a,o]=(0,K.useState)(null),s=t=>t===`light`?e.logoLightUrl:e.logoDarkUrl;async function c(n,r,a){if(e.chartId!==void 0){o(null),i(!0);try{let{blob:i,hasAlpha:o}=await Ut(r,a?{variantFor:a}:{}),s=await i.arrayBuffer();await t({chartId:e.chartId,bytes:s,mode:n,hasAlpha:o})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function l(e,t){let n=t.target.files?.[0];t.target.value=``,n&&await c(e,n)}async function u(t){if(e.chartId!==void 0){o(null),i(!0);try{await n({chartId:e.chartId,mode:t})}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}async function d(e){let t=s(e===`light`?`dark`:`light`);if(t){o(null),i(!0);try{await c(e,await(await fetch(t)).blob(),e)}catch(e){o(e instanceof Error?e.message:String(e))}finally{i(!1)}}}function f({mode:e}){let t=s(e),n=s(e===`light`?`dark`:`light`);return(0,X.jsxs)(`div`,{className:`oc-chart-mine__logo-slot`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__logo-mode`,children:e===`light`?Te():Fe()}),(0,X.jsx)(`span`,{className:`oc-chart-mine__logo-preview`,"data-mode":e,"data-empty":t?void 0:`1`,children:t?(0,X.jsx)(`img`,{src:t,alt:``}):null}),(0,X.jsx)(k,{variant:`outline`,size:`sm`,asChild:!0,children:(0,X.jsxs)(`label`,{className:`oc-chart-import__file`,children:[(0,X.jsx)(G,{className:`size-4`}),t?We():Ie(),(0,X.jsx)(`input`,{type:`file`,accept:`image/*`,className:`oc-chart-import__file-input`,onChange:t=>void l(e,t)})]})}),!t&&n?(0,X.jsx)(k,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void d(e),children:Pe()}):null,t?(0,X.jsx)(k,{variant:`ghost`,size:`sm`,disabled:r,onClick:()=>void u(e),children:Xe()}):null]})}return(0,X.jsxs)(`div`,{className:`oc-chart-mine__logo`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:st()}),(0,X.jsxs)(`div`,{className:`oc-chart-mine__logo-slots`,children:[(0,X.jsx)(f,{mode:`light`}),(0,X.jsx)(f,{mode:`dark`})]}),r?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:je()}):null,a?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:a}):null]})}function en({chart:e}){let t=x(E.me.getMe,{host:B}),n=b(E.charts.addChartDomain),r=b(E.charts.removeChartDomain),[i,a]=(0,K.useState)(``),[o,s]=(0,K.useState)(null),[c,l]=(0,K.useState)(!1);if(t?.role!==`admin`)return null;let u=e.domains??[];async function d(){let t=i.trim();if(t!==``){s(null),l(!0);try{await n({chartKey:e.key,domain:t}),a(``)}catch(e){s(e instanceof Error?e.message:String(e))}finally{l(!1)}}}async function f(t){s(null);try{await r({chartKey:e.key,domain:t})}catch{}}return(0,X.jsxs)(`div`,{className:`oc-chart-mine__domains`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:De()}),(0,X.jsxs)(`div`,{className:`oc-chart-mine__domains-body`,children:[(0,X.jsx)(`div`,{className:`oc-chart-avail__groups`,children:u.length===0?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:at()}):u.map(e=>(0,X.jsxs)(M,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e,(0,X.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":Ne({domain:e}),onClick:()=>void f(e),children:(0,X.jsx)(O,{className:`size-3`})})]},e))}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(z,{value:i,onChange:e=>a(e.target.value),placeholder:tt(),className:`oc-chart-mine__domains-input`,onKeyDown:e=>{e.key===`Enter`&&d()}}),(0,X.jsx)(k,{variant:`outline`,size:`sm`,disabled:c,onClick:()=>void d(),children:Ke()})]}),(0,X.jsx)(`span`,{className:`oc-show__desc`,children:Re()}),o?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:o}):null]})]})}function tn(e){let t={...e};return delete t.bpm,JSON.stringify(t,null,2)}function nn({chart:e}){let t=b(E.charts.updateChart),n=b(E.charts.deleteChart),[i,a]=(0,K.useState)(!1),[o,s]=(0,K.useState)(e.name),[c,l]=(0,K.useState)(()=>tn(e.tokens)),[d,f]=(0,K.useState)(e.tokens.bpm??0),[p,m]=(0,K.useState)(null),[h,g]=(0,K.useState)(!1);function _(){s(e.name),l(tn(e.tokens)),f(e.tokens.bpm??0),m(null),a(!0)}async function v(){if(e.chartId===void 0)return;m(null);let n;try{n=JSON.parse(c)}catch{m(u());return}if(n&&typeof n==`object`&&!Array.isArray(n)){let e=n;d>0?e.bpm=d:delete e.bpm}g(!0);try{await t({chartId:e.chartId,name:o.trim(),tokens:n}),a(!1)}catch(e){m(e instanceof Error?e.message:String(e))}finally{g(!1)}}async function y(){if(e.chartId!==void 0&&window.confirm(S()))try{await n({chartId:e.chartId})}catch{}}return(0,X.jsxs)(`div`,{className:`oc-chart-mine__row`,children:[(0,X.jsxs)(`div`,{className:`oc-chart-mine__head`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__name`,children:e.name}),(0,X.jsx)(`div`,{className:`oc-show__row`,children:i?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(k,{variant:`outline`,size:`sm`,onClick:_,children:Oe()}),(0,X.jsx)(k,{variant:`ghost`,size:`sm`,onClick:()=>void y(),children:ut()})]})})]}),i?(0,X.jsxs)(`div`,{className:`oc-chart-mine__editor`,children:[(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:Ce()}),(0,X.jsx)(z,{value:o,onChange:e=>s(e.target.value),maxLength:60})]}),(0,X.jsxs)(`div`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:w()}),(0,X.jsxs)(`div`,{className:`oc-chart-bpm`,children:[(0,X.jsx)(`input`,{type:`range`,className:`oc-chart-bpm__slider`,min:0,max:90,step:5,value:d,onChange:e=>f(Number(e.target.value)),"aria-label":w()}),(0,X.jsx)(`span`,{className:`oc-chart-bpm__value`,children:d===0?nt():`${d} BPM`})]}),(0,X.jsx)(`span`,{className:`oc-show__desc`,children:qe()})]}),(0,X.jsxs)(`label`,{className:`oc-chart-import__field`,children:[(0,X.jsx)(`span`,{className:`oc-chart-import__label`,children:be()}),(0,X.jsx)(`textarea`,{className:`oc-chart-import__textarea`,value:c,onChange:e=>l(e.target.value),rows:10,spellCheck:!1})]}),p?(0,X.jsx)(`p`,{className:`oc-chart-import__error`,children:p}):null,(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(k,{size:`sm`,disabled:h,onClick:()=>void v(),children:r()}),(0,X.jsx)(k,{variant:`ghost`,size:`sm`,onClick:()=>a(!1),children:ce()})]})]}):null,(0,X.jsx)($t,{chart:e}),(0,X.jsx)(en,{chart:e})]})}function rn(){let e=x(E.charts.listMyCharts),t=(e??[]).filter(e=>e.via===`owner`);return(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:s()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:de()})]}),e!==void 0&&t.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:lt()}):(0,X.jsx)(`div`,{className:`oc-chart-mine-list`,children:t.map(e=>(0,X.jsx)(nn,{chart:e},e.key))})]})}function an({chart:e,groups:t}){let n=b(E.charts.addChartToGroupPool),r=b(E.charts.removeChartFromGroupPool),i=e.restrictedToGroups,a=e.poolGroups,s=new Set((a??[]).map(e=>e.groupId)),c=t.filter(e=>!s.has(e._id));async function l(t){try{await n({groupId:t,chartKey:e.key})}catch{}}async function u(t){try{await r({groupId:t,chartKey:e.key})}catch{}}return(0,X.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,X.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,X.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,X.jsx)(M,{variant:i?`secondary`:`outline`,className:`oc-chart-avail__state`,children:i?o():e.kind===`custom`&&e.scope===`personal`?f():ge()}),e.isGlobalDefault?(0,X.jsx)(M,{variant:`default`,children:dt()}):null]}),(0,X.jsxs)(`div`,{className:`oc-chart-avail__groups`,children:[(0,X.jsx)(`span`,{className:`oc-chart-mine__groups-label`,children:te()}),(a??[]).map(e=>(0,X.jsxs)(M,{variant:`secondary`,className:`oc-chart-avail__chip`,children:[e.name,(0,X.jsx)(`button`,{type:`button`,className:`oc-chart-avail__chip-x`,"aria-label":d({group:e.name}),onClick:()=>void u(e.groupId),children:(0,X.jsx)(O,{className:`size-3`})})]},e.groupId)),c.length>0?(0,X.jsxs)(I,{value:``,onValueChange:e=>void l(e),children:[(0,X.jsx)(A,{size:`sm`,className:`w-56`,children:(0,X.jsx)(R,{placeholder:g()})}),(0,X.jsx)(L,{children:c.map(e=>(0,X.jsx)(F,{value:e._id,children:e.name},e._id))})]}):t.length===0?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:ue()}):null]})]})}function on({chart:e}){let t=b(E.charts.promoteChartToCommon),n=b(E.charts.deleteChart);async function r(){if(e.chartId!==void 0)try{await t({chartId:e.chartId})}catch{}}async function i(){if(e.chartId!==void 0&&window.confirm(S()))try{await n({chartId:e.chartId})}catch{}}return(0,X.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,X.jsxs)(`div`,{className:`oc-chart-avail__head`,children:[(0,X.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name}),(0,X.jsx)(M,{variant:e.scope===`common`?`outline`:`secondary`,children:e.scope===`common`?ve():f()}),e.ownerLabel?(0,X.jsx)(`span`,{className:`oc-show__desc`,children:y({owner:e.ownerLabel})}):null]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[e.scope===`personal`?(0,X.jsx)(k,{variant:`outline`,size:`sm`,onClick:()=>void r(),children:pe()}):null,(0,X.jsx)(k,{variant:`ghost`,size:`sm`,onClick:()=>void i(),children:m()})]})]})}function sn({defaultThemeMode:e,defaultLocale:t,defaultChartKey:n}){let r=b(E.admin.setDefaultThemeMode),a=b(E.admin.setDefaultLocale),o=b(E.charts.setDefaultChart),s=x(E.charts.listChartsAdmin),c=x(E.groups.listGroups,{}),l=e??`system`,u=t??`fr`;return(0,X.jsxs)(`div`,{className:`oc-appearance-admin`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h2`,{className:`oc-show__title`,children:et()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Ge()})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:Qe()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ee()})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(k,{variant:n===null?`default`:`outline`,size:`sm`,onClick:()=>void o({name:null}),children:i()}),ht.map(e=>(0,X.jsx)(k,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key)),(s??[]).filter(e=>e.kind===`custom`&&e.scope===`common`).map(e=>(0,X.jsx)(k,{variant:n===e.key?`default`:`outline`,size:`sm`,onClick:()=>void o({name:e.key}),children:e.name},e.key))]})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:p()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ye()})]}),(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:(s??[]).filter(e=>!(e.kind===`custom`&&e.scope===`common`)).map(e=>(0,X.jsx)(an,{chart:e,groups:c??[]},e.key))})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:me()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:h()})]}),(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:(s??[]).filter(e=>e.kind===`builtin`||e.scope===`common`).map(e=>(0,X.jsxs)(`div`,{className:`oc-chart-avail`,children:[(0,X.jsx)(`div`,{className:`oc-chart-avail__head`,children:(0,X.jsx)(`span`,{className:`oc-chart-avail__name`,children:e.name})}),(0,X.jsx)(en,{chart:e})]},e.key))})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:_()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Ze()})]}),(()=>{let e=(s??[]).filter(e=>e.kind===`custom`);return e.length===0?(0,X.jsx)(`p`,{className:`oc-show__desc`,children:he()}):(0,X.jsx)(`div`,{className:`oc-chart-avail-list`,children:e.map(e=>(0,X.jsx)(on,{chart:e},e.key))})})()]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:He()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:ke()})]}),(0,X.jsx)(`div`,{className:`oc-show__row`,children:[`light`,`dark`,`system`].map(e=>(0,X.jsx)(k,{variant:l===e?`default`:`outline`,size:`sm`,onClick:()=>void r({mode:e}),children:qt(e)},e))})]}),(0,X.jsxs)(`section`,{className:`oc-show__section`,children:[(0,X.jsxs)(`div`,{className:`oc-show__heading`,children:[(0,X.jsx)(`h3`,{className:`oc-show__title`,children:rt()}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Je()})]}),(0,X.jsx)(`div`,{className:`oc-show__row`,children:yt().map(e=>(0,X.jsx)(k,{variant:u===e.value?`default`:`outline`,size:`sm`,onClick:()=>void a({locale:e.value}),children:e.label},e.value))}),(0,X.jsx)(`p`,{className:`oc-show__desc`,children:Ee()})]})]})}function cn(){let e=x(E.me.getMe,{host:B}),t=mt(e?.resolvedThemeMode);return(0,X.jsxs)(`div`,{className:`oc-appearance`,children:[(0,X.jsx)(Zt,{selectedKey:e?.chartKey??null,resolvedMode:t}),(0,X.jsx)(Qt,{}),(0,X.jsx)(rn,{}),e?.role===`admin`?(0,X.jsx)(sn,{defaultThemeMode:e.defaultThemeMode,defaultLocale:e.defaultLocale,defaultChartKey:e.defaultChartKey}):null]})}function ln(){let[e,t]=(0,K.useState)(!0),[n,r]=(0,K.useState)(`per-user`),[i,a]=(0,K.useState)(``),[o,s]=(0,K.useState)(Z),[c,l]=(0,K.useState)(Z),[u,d]=(0,K.useState)(Q),f=i!==``||o!==Z||c!==Z;function p(){a(``),s(Z),l(Z),d(Q)}return(0,X.jsxs)(`div`,{className:`oc-show`,children:[(0,X.jsx)(cn,{}),(0,X.jsxs)(`details`,{className:`oc-show__ref`,children:[(0,X.jsx)(`summary`,{className:`oc-show__title`,children:Le()}),(0,X.jsxs)($,{title:`Buttons`,description:`Variants`,children:[(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(k,{children:`Default`}),(0,X.jsx)(k,{variant:`secondary`,children:`Secondary`}),(0,X.jsx)(k,{variant:`outline`,children:`Outline`}),(0,X.jsx)(k,{variant:`ghost`,children:`Ghost`}),(0,X.jsx)(k,{variant:`destructive`,children:`Destructive`}),(0,X.jsx)(k,{variant:`link`,children:`Link`})]}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(k,{size:`sm`,children:`Small`}),(0,X.jsx)(k,{children:`Default`}),(0,X.jsx)(k,{size:`lg`,children:`Large`}),(0,X.jsx)(k,{size:`icon`,"aria-label":`more`,children:(0,X.jsx)(j,{})}),(0,X.jsx)(k,{disabled:!0,children:`Disabled`})]})]}),(0,X.jsx)($,{title:`Badges`,children:(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(M,{children:`Default`}),(0,X.jsx)(M,{variant:`secondary`,children:`Secondary`}),(0,X.jsx)(M,{variant:`outline`,children:`Outline`}),(0,X.jsx)(M,{variant:`destructive`,children:`Destructive`})]})}),(0,X.jsx)($,{title:`Inputs & selection`,children:(0,X.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,X.jsx)(z,{placeholder:`Text input…`}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsxs)(I,{value:n,onValueChange:r,children:[(0,X.jsx)(A,{className:`w-56`,children:(0,X.jsx)(R,{placeholder:`Select…`})}),(0,X.jsxs)(L,{children:[(0,X.jsx)(F,{value:`per-user`,children:`per-user (chacun son agent)`}),(0,X.jsx)(F,{value:`shared`,children:`shared (agent commun)`})]})]}),(0,X.jsxs)(`label`,{className:`oc-show__check`,children:[(0,X.jsx)(V,{checked:e,onCheckedChange:e=>t(!!e)}),`Checkbox`]})]})]})}),(0,X.jsx)($,{title:`Filtres & plage temporelle`,description:`Barre réutilisable (recherche debouncée + selects rapides à largeur auto + plage façon Grafana) et constructeur de filtre avancé. Câblée dans Users, Groups, Comptes de service, Traces, Anomalies, Audit et KPI.`,children:(0,X.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,X.jsxs)(At,{q:i,onQChange:a,searchPlaceholder:`Rechercher (kind, principal, rôle, route…)`,timeRange:u,onTimeRangeChange:d,onReset:p,canReset:f,children:[(0,X.jsxs)(I,{value:o,onValueChange:s,children:[(0,X.jsx)(A,{size:`sm`,children:(0,X.jsx)(R,{})}),(0,X.jsxs)(L,{children:[(0,X.jsx)(F,{value:Z,children:`Toutes directions`}),(0,X.jsx)(F,{value:`inbound`,children:`inbound`}),(0,X.jsx)(F,{value:`outbound`,children:`outbound`}),(0,X.jsx)(F,{value:`internal`,children:`internal`})]})]}),(0,X.jsxs)(I,{value:c,onValueChange:l,children:[(0,X.jsx)(A,{size:`sm`,children:(0,X.jsx)(R,{})}),(0,X.jsxs)(L,{children:[(0,X.jsx)(F,{value:Z,children:`Toutes sévérités`}),(0,X.jsx)(F,{value:`info`,children:`info`}),(0,X.jsx)(F,{value:`warn`,children:`warn`}),(0,X.jsx)(F,{value:`critical`,children:`critical`})]})]})]}),(0,X.jsx)(jt,{fields:Kt,onChange:()=>{}}),(0,X.jsxs)(`div`,{className:`oc-show__row`,children:[(0,X.jsx)(`span`,{className:`oc-show__desc`,children:`Sélecteur de plage seul :`}),(0,X.jsx)(kt,{value:u,onChange:d})]})]})}),(0,X.jsx)($,{title:`Dropdown menu`,description:`Row actions / kebab`,children:(0,X.jsxs)(_t,{children:[(0,X.jsx)(gt,{asChild:!0,children:(0,X.jsx)(k,{variant:`outline`,size:`icon`,"aria-label":`Open menu`,children:(0,X.jsx)(j,{})})}),(0,X.jsxs)(vt,{align:`start`,children:[(0,X.jsx)(pt,{children:`Actions`}),(0,X.jsx)(N,{}),(0,X.jsx)(P,{children:`Edit`}),(0,X.jsx)(P,{children:`Duplicate`}),(0,X.jsx)(N,{}),(0,X.jsx)(P,{variant:`destructive`,children:`Delete`})]})]})}),(0,X.jsx)($,{title:`Card`,children:(0,X.jsxs)(Tt,{className:`w-80`,children:[(0,X.jsxs)(bt,{children:[(0,X.jsx)(Ct,{children:`Instance`}),(0,X.jsx)(wt,{children:`Non-secret metadata only.`})]}),(0,X.jsx)(St,{className:`text-sm text-muted-foreground`,children:`ws://gateway.example.org:18789`}),(0,X.jsxs)(xt,{className:`gap-2`,children:[(0,X.jsx)(k,{size:`sm`,children:`Save`}),(0,X.jsx)(k,{size:`sm`,variant:`ghost`,children:`Cancel`})]})]})}),(0,X.jsx)($,{title:`Table`,children:(0,X.jsxs)(Ot,{children:[(0,X.jsx)(Et,{children:(0,X.jsxs)(U,{children:[(0,X.jsx)(H,{className:`w-8`,children:(0,X.jsx)(V,{"aria-label":`select all`})}),(0,X.jsx)(H,{children:`Name`}),(0,X.jsx)(H,{children:`Mode`}),(0,X.jsx)(H,{className:`text-right`,children:`Status`}),(0,X.jsx)(H,{className:`w-8`})]})}),(0,X.jsx)(Dt,{children:[{n:`admins`,m:`per-user`,s:`active`},{n:`family`,m:`shared`,s:`active`}].map(e=>(0,X.jsxs)(U,{children:[(0,X.jsx)(W,{children:(0,X.jsx)(V,{"aria-label":`select ${e.n}`})}),(0,X.jsx)(W,{className:`font-medium`,children:e.n}),(0,X.jsx)(W,{children:(0,X.jsx)(M,{variant:`secondary`,children:e.m})}),(0,X.jsx)(W,{className:`text-right`,children:(0,X.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-muted-foreground`,children:[(0,X.jsx)(D,{className:`size-3.5`}),` `,e.s]})}),(0,X.jsx)(W,{children:(0,X.jsx)(k,{variant:`ghost`,size:`icon`,"aria-label":`row actions`,children:(0,X.jsx)(j,{})})})]},e.n))})]})}),(0,X.jsx)($,{title:`App fragments`,description:`Chat-specific components`,children:(0,X.jsxs)(`div`,{className:`oc-show__row oc-show__row--col`,children:[(0,X.jsx)(`div`,{className:`oc-msg oc-msg--assistant`,children:(0,X.jsx)(`div`,{className:`oc-msg__body`,children:`Assistant message bubble.`})}),(0,X.jsx)(`div`,{className:`oc-tool oc-tool--completed`,children:(0,X.jsxs)(`div`,{className:`oc-tool__header`,children:[(0,X.jsx)(`span`,{className:`oc-tool__icon`,children:`✓`}),(0,X.jsx)(`span`,{className:`oc-tool__name`,children:`write-file`}),(0,X.jsx)(`span`,{className:`oc-tool__phase`,children:`completed`})]})}),(0,X.jsxs)(`div`,{className:`oc-run-status oc-run-status--streaming`,children:[(0,X.jsx)(`span`,{className:`oc-run-status__dot`}),(0,X.jsx)(`span`,{className:`oc-run-status__label`,children:`Running`})]})]})})]})]})}export{ln as ThemeShowroom};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$O as r,Ax as i,BO as a,Br as o,Bx as s,CO as c,Cx as l,D as u,DO as d,Dx as f,EO as p,Ex as m,FO as h,Fx as ee,GO as g,HO as te,IO as _,Ix as ne,JO as v,KO as y,LO as re,Lx as b,Mx as x,Nx as ie,OO as ae,Ox as oe,PO as S,Px as se,QO as C,RO as w,Rr as T,Rx as ce,SO as E,Sx as le,TO as D,Tx as ue,UO as O,UR as k,VO as de,Vx as fe,WO as pe,WR as A,XO as j,YO as me,ZO as he,_O as ge,_x as _e,ax as M,bO as ve,bx as ye,cx as be,dx as xe,ek as N,fx as Se,gO as P,gx as Ce,hO as F,hx as we,ik as Te,ix as Ee,jx as De,kO as Oe,kx as ke,lx as Ae,mx as je,nk as Me,ox as Ne,px as Pe,qO as Fe,rk as Ie,sx as Le,t as I,tk as Re,ux as ze,vO as Be,vx as Ve,wO as He,wx as Ue,xO as We,xx as Ge,yO as Ke,yx as qe,zO as Je,zr as Ye,zx as Xe}from"./api-BilJV3v_.js";import{t as Ze}from"./check-CqOJd5HV.js";import{t as Qe}from"./x-CzNvcA7I.js";import{i as L,n as R,r as $e,t as et}from"./tabs-Cb9Sl0jx.js";import{t as z}from"./button-9dv2rCon.js";import{$ as B,Et as V,Fn as tt,H as nt,On as rt,Pn as it,Q as H,Tn as at,X as U,Z as W,a as ot,at as st,ct as G,et as K,i as ct,lt,nt as ut,o as dt,ot as ft,q as pt,rt as mt,s as ht,tt as gt,xn as _t}from"./index-DU-gHWXa.js";import{n as vt}from"./TimeRangePicker-4lLXkwg_.js";import{t as yt}from"./FilterBar-McDCuaLr.js";import{t as bt}from"./AdvancedFilter-CHrlsf4a.js";import{t as xt}from"./DataTableShell-D04EM9Zp.js";var St=u(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Ct=u(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),q=t(e(),1),J=n(),Y={kind:`relative`,from:`now-520w`,to:`now`},X=e=>e===null?`-`:String(Math.round(e));function wt(e){let t=e.indexOf(`:`);if(t<0)return e;let n=e.slice(0,t),r=e.slice(t+1);return n===`admin`?Je():n===`agent`?`${w()} - ${r}`:e}function Tt(){let e=A(I.me.getMe,{host:pt})?.role===`admin`,t=A(I.deliveryTiming.getDeliveryStatus,{}),n=k(I.deliveryTiming.startDeliveryRecord),i=k(I.deliveryTiming.stopDeliveryRecord),[a,o]=(0,q.useState)(!1),[s,c]=(0,q.useState)(!1),l=t?.recording??!1,u=async()=>{c(!0);try{l?await i({}):await n({})}finally{c(!1)}};return(0,J.jsxs)(`section`,{className:`mb-4 flex flex-col gap-3 rounded-lg border border-border p-4`,children:[(0,J.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,J.jsxs)(`div`,{children:[(0,J.jsx)(`h3`,{className:`text-sm font-semibold`,children:Te()}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ie()})]}),e?(0,J.jsx)(z,{variant:l?`destructive`:`default`,size:`sm`,disabled:s||t===void 0,onClick:()=>void u(),children:l?Re():Me()}):null]}),l?(0,J.jsxs)(`p`,{className:`flex items-center gap-2 text-sm`,children:[(0,J.jsx)(V,{variant:`secondary`,children:N()}),t?.startedAt?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:r({time:lt(t.startedAt)})}):null]}):null,(0,J.jsx)(`div`,{children:(0,J.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>o(e=>!e),children:a?j():he()})}),a?(0,J.jsx)(Et,{isAdmin:e}):null]})}function Et({isAdmin:e}){let t=A(I.deliveryTiming.listDeliverySessions,{}),n=k(I.deliveryTiming.deleteDeliverySessions),[r,i]=(0,q.useState)(``),[o,s]=(0,q.useState)(`all`),[c,l]=(0,q.useState)(Y),[u,d]=(0,q.useState)(null),{from:f,to:p}=vt(c),m=c.to===`now`?1/0:p,ee=r.trim()!==``||o!==`all`||c!==Y,ne=()=>{i(``),s(`all`),l(Y)},b=(0,q.useMemo)(()=>{if(t===void 0)return;let e=r.trim().toLowerCase();return t.filter(t=>(e===``||t.startedBy.toLowerCase().includes(e))&&(o===`all`||(o===`active`?t.active:!t.active))&&t.startedAt>=f&&t.startedAt<=m).map(e=>({...e,_id:e.sessionId}))},[t,r,o,f,m]),x=e=>{let t=new Set((b??[]).map(e=>e.sessionId)),r=e.filter(e=>t.has(e));r.length!==0&&(n({sessionIds:r}),u!==null&&r.includes(u)&&d(null))};return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsx)(yt,{q:r,onQChange:i,searchPlaceholder:v(),timeRange:c,onTimeRangeChange:l,onReset:ne,canReset:ee,children:(0,J.jsxs)(U,{value:o,onValueChange:e=>s(e),children:[(0,J.jsx)(B,{size:`sm`,className:`w-36`,children:(0,J.jsx)(K,{})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(H,{value:`all`,children:Fe()}),(0,J.jsx)(H,{value:`active`,children:y()}),(0,J.jsx)(H,{value:`stopped`,children:g()})]})]})}),(0,J.jsx)(xt,{title:me(),rows:b,emptyHint:P(),columns:[{header:``,className:`w-8`,cell:e=>(0,J.jsx)(z,{variant:`ghost`,size:`icon`,"aria-label":u===e.sessionId?_():re(),onClick:()=>d(t=>t===e.sessionId?null:e.sessionId),children:u===e.sessionId?(0,J.jsx)(St,{size:15,"aria-hidden":!0}):(0,J.jsx)(at,{size:15,"aria-hidden":!0})})},{header:pe(),sort:e=>e.startedAt,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:G(e.startedAt)})},{header:O(),sort:e=>e.stoppedAt,cell:e=>e.stoppedAt===null?(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,J.jsx)(`span`,{className:`tabular-nums`,children:G(e.stoppedAt)})},{header:te(),sort:e=>e.count,cell:e=>(0,J.jsx)(`span`,{className:`tabular-nums`,children:X(e.count)})},{header:de(),sort:e=>e.startedBy,cell:e=>wt(e.startedBy)},{header:a(),sort:e=>e.active,cell:e=>e.active?(0,J.jsx)(V,{variant:`secondary`,children:y()}):(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:g()})}],rowActions:e?e=>[{label:h(),variant:`destructive`,onSelect:()=>x([e.sessionId])}]:void 0,bulkActions:e?[{label:h(),variant:`destructive`,onSelect:e=>x(e)}]:void 0,isExpanded:e=>e.sessionId===u,renderExpanded:e=>(0,J.jsx)(Dt,{sessionId:e.sessionId})})]})}function Dt({sessionId:e}){let t=A(I.deliveryTiming.getDeliveryReport,{sessionId:e}),[n,r]=(0,q.useState)(!1);return(0,J.jsx)(Ot,{report:t,copied:n,onCopy:()=>{t&&navigator.clipboard?.writeText(nt(t)).then(()=>{r(!0),window.setTimeout(()=>r(!1),1200)}).catch(()=>{})}})}function Ot({report:e,copied:t,onCopy:n}){if(!e)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:S()});if(e.count===0||e.segments===null)return(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:C()});let r=e.segments,i=(e,t)=>(0,J.jsxs)(`tr`,{className:`border-t border-border`,children:[(0,J.jsx)(`td`,{className:`py-1`,children:e}),(0,J.jsx)(`td`,{className:`py-1 text-right tabular-nums`,children:t.count}),(0,J.jsxs)(`td`,{className:`py-1 text-right tabular-nums`,children:[X(t.p50),` / `,X(t.p95),` / `,X(t.max)]})]});return(0,J.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,J.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,J.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.count,` `,F()]}),(0,J.jsxs)(z,{variant:`outline`,size:`sm`,onClick:n,children:[t?(0,J.jsx)(Ze,{size:13,"aria-hidden":!0}):(0,J.jsx)(rt,{size:13,"aria-hidden":!0}),t?ge():Be()]})]}),(0,J.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,J.jsx)(`thead`,{children:(0,J.jsxs)(`tr`,{className:`text-left text-muted-foreground`,children:[(0,J.jsx)(`th`,{className:`py-1 font-medium`,children:d()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:p()}),(0,J.jsx)(`th`,{className:`py-1 text-right font-medium`,children:D()})]})}),(0,J.jsxs)(`tbody`,{children:[i(He(),r.bridge),i(c(),r.A),i(E(),r.C)]})]}),(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:We()}),e.truncated?(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:Ke()}):null,(0,J.jsx)(`p`,{className:`oc-admin__hint`,children:ve()})]})}var kt=[50,100,200,500],Z=`all`,Q=`__all__`,At=[`2xx`,`4xx`,`5xx`],jt=[`user`,`service`,`system`],Mt=[`inbound`,`outbound`,`internal`],Nt={kind:`relative`,from:`now-30d`,to:`now`},Pt=[{value:`kind`,label:`kind`},{value:`status`,label:`status`},{value:`latencyMs`,label:o()},{value:`principalType`,label:Ye()},{value:`direction`,label:`direction`},{value:`roleKey`,label:T()},{value:`route`,label:`route`},{value:`correlationId`,label:`correlationId`}];function Ft(){let e=tt({from:`/settings/traces`}),t=it({from:`/settings/traces`}),n=e.limit,r=e.kind,a=e.statusClass??Q,o=e.principalType??Q,c=e.direction??Q,u=e.roleKey??Q,d=e.q??``,p=e.correlationId,h=ct(e.from,e.to),g=(0,q.useMemo)(()=>ht(e.adv),[e.adv]),{from:te,to:_}=vt(h),[v,y]=(0,q.useState)(null),[re,S]=(0,q.useState)(null),C=e=>void t({search:t=>({...t,limit:e})}),w=e=>void t({search:t=>({...t,kind:e})}),T=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),E=e=>void t({search:t=>({...t,statusClass:e===Q?void 0:e})}),D=e=>void t({search:t=>({...t,principalType:e===Q?void 0:e})}),O=e=>void t({search:t=>({...t,direction:e===Q?void 0:e})}),k=e=>void t({search:t=>({...t,roleKey:e===Q?void 0:e})}),de=e=>void t({search:t=>({...t,...dt(e)})}),pe=e=>void t({search:t=>({...t,adv:ot(e)}),replace:!0}),j=A(I.observability.listEvents,{limit:n}),me=A(I.observability.listEvents,{limit:n,kind:r===Z?void 0:r,...p?{correlationId:p}:{},filter:{q:d||void 0,from:te,to:_,statusClass:a===Q?void 0:a,principalType:o===Q?void 0:o,direction:c===Q?void 0:c,roleKey:u===Q?void 0:u,advanced:g.length>0?g:void 0}}),he=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])e.add(t.kind);return[...e].sort()},[j]),ge=(0,q.useMemo)(()=>{let e=new Set;for(let t of j??[])t.roleKey&&e.add(t.roleKey);return[...e].sort()},[j]),M=d!==``||a!==Q||o!==Q||c!==Q||u!==Q||g.length>0||h.kind!==`relative`||h.from!==Nt.from;function ve(){t({search:{limit:100,kind:`all`},replace:!0})}let N=v?j?.filter(e=>e.correlationId===v):me,P=e.section,F=e=>void t({search:t=>({...t,section:e}),replace:!0});return(0,J.jsxs)(et,{value:P,onValueChange:e=>F(e),children:[(0,J.jsxs)($e,{className:`w-full`,children:[(0,J.jsxs)(L,{value:`latency`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(_t,{size:13,"aria-hidden":!0}),Oe()]}),(0,J.jsxs)(L,{value:`events`,className:`flex-1 gap-1.5`,children:[(0,J.jsx)(Ct,{size:13,"aria-hidden":!0}),ae()]})]}),(0,J.jsx)(R,{value:`latency`,children:(0,J.jsx)(Tt,{})}),(0,J.jsxs)(R,{value:`events`,className:`flex flex-col gap-3`,children:[(0,J.jsxs)(`p`,{className:`oc-admin__hint`,children:[fe(),(0,J.jsx)(`strong`,{children:s()}),Xe(),` `,(0,J.jsx)(`span`,{className:`oc-filter__window`,children:ce()})]}),(0,J.jsxs)(yt,{q:d,onQChange:T,searchPlaceholder:b(),timeRange:h,onTimeRangeChange:de,onReset:ve,canReset:M,children:[(0,J.jsxs)(U,{value:a,onValueChange:E,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(K,{placeholder:ne()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(H,{value:Q,children:ee()}),At.map(e=>(0,J.jsx)(H,{value:e,children:e},e))]})]}),(0,J.jsxs)(U,{value:o,onValueChange:D,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(K,{placeholder:se()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(H,{value:Q,children:ie()}),jt.map(e=>(0,J.jsx)(H,{value:e,children:e},e))]})]}),(0,J.jsxs)(U,{value:c,onValueChange:O,children:[(0,J.jsx)(B,{size:`sm`,className:`w-32`,children:(0,J.jsx)(K,{placeholder:x()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(H,{value:Q,children:De()}),Mt.map(e=>(0,J.jsx)(H,{value:e,children:e},e))]})]}),(0,J.jsxs)(U,{value:u,onValueChange:k,children:[(0,J.jsx)(B,{size:`sm`,className:`w-36`,children:(0,J.jsx)(K,{placeholder:i()})}),(0,J.jsxs)(W,{children:[(0,J.jsx)(H,{value:Q,children:ke()}),ge.map(e=>(0,J.jsx)(H,{value:e,children:e},e))]})]}),(0,J.jsx)(`input`,{list:`oc-trace-kinds`,className:`oc-input oc-input--sm w-44`,value:r===Z?``:r,placeholder:oe(),"aria-label":oe(),onChange:e=>{let t=e.target.value.trim();w(t===``?Z:t)}}),(0,J.jsx)(`datalist`,{id:`oc-trace-kinds`,children:he.map(e=>(0,J.jsx)(`option`,{value:e},e))}),(0,J.jsxs)(U,{value:String(n),onValueChange:e=>C(Number(e)),children:[(0,J.jsx)(B,{size:`sm`,className:`w-28`,children:(0,J.jsx)(K,{})}),(0,J.jsx)(W,{children:kt.map(e=>(0,J.jsx)(H,{value:String(e),children:f({count:e})},e))})]})]}),(0,J.jsx)(bt,{fields:Pt,seed:g,onChange:pe}),v?(0,J.jsx)(`div`,{className:`oc-traces__followline`,children:(0,J.jsxs)(`button`,{type:`button`,className:`oc-traces__chip`,onClick:()=>y(null),title:m(),children:[(0,J.jsxs)(`span`,{className:`oc-traces__chip-label`,children:[ue(),(0,J.jsx)(`code`,{children:$(v)})]}),(0,J.jsx)(Qe,{className:`oc-traces__chip-x`,"aria-hidden":!0}),(0,J.jsx)(`span`,{className:`sr-only`,children:Ue()})]})}):null,(0,J.jsx)(xt,{title:l(),rows:N,emptyHint:v?le():Ge(),columns:[{header:ye(),sort:e=>e.at,cell:e=>(0,J.jsx)(`span`,{className:`oc-traces__time`,children:G(e.at)})},{header:qe(),sort:e=>e.kind,cell:e=>(0,J.jsx)(V,{variant:`secondary`,children:e.kind})},{header:Ve(),sort:e=>Lt(e)??null,cell:e=>{let t=Lt(e);return t?(0,J.jsxs)(`span`,{className:`oc-traces__fail`,title:t,children:[`✕ `,t]}):(0,J.jsx)(`span`,{className:`oc-traces__ok`,"aria-label":_e(),children:`✓`})}},{header:Ce(),sort:e=>e.direction,cell:e=>e.direction?(0,J.jsx)(V,{variant:`outline`,children:e.direction}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:we(),sort:e=>e.principalType,cell:e=>(0,J.jsxs)(`span`,{className:`oc-traces__principal`,children:[(0,J.jsx)(V,{variant:`outline`,children:e.principalType}),e.principalId?(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:$(e.principalId)}):null]})},{header:je(),sort:e=>e.roleKey,cell:e=>e.roleKey?(0,J.jsx)(V,{variant:`secondary`,children:e.roleKey}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Pe(),sort:e=>e.route,cell:e=>e.route?(0,J.jsxs)(`span`,{className:`oc-traces__route`,children:[e.method?(0,J.jsx)(`span`,{className:`oc-traces__method`,children:e.method}):null,(0,J.jsx)(`code`,{className:`oc-traces__mono`,children:e.route})]}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:Se(),sort:e=>e.status,cell:e=>e.status===null?(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,J.jsx)(`span`,{className:`oc-traces__status ${It(e.status)}`,children:e.status})},{header:xe(),sort:e=>e.latencyMs,cell:e=>e.latencyMs===null?(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`}):(0,J.jsxs)(`span`,{className:`oc-traces__mono`,children:[e.latencyMs,` ms`]})},{header:ze(),sort:e=>e.correlationId,cell:e=>e.correlationId?(0,J.jsx)(`button`,{type:`button`,className:`oc-traces__corr`,title:Ae(),onClick:()=>y(e.correlationId),children:$(e.correlationId)}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})},{header:be(),sort:e=>+!!e.meta,cell:e=>e.meta?(0,J.jsx)(z,{variant:`outline`,size:`sm`,onClick:()=>S(e),children:Le()}):(0,J.jsx)(`span`,{className:`oc-traces__muted`,children:`—`})}]}),(0,J.jsx)(Rt,{row:re,onClose:()=>S(null)})]})]})}function It(e){return e>=500?`oc-traces__status--5xx`:e>=400?`oc-traces__status--4xx`:e>=200&&e<300?`oc-traces__status--2xx`:`oc-traces__status--other`}function $(e){return e.length>8?e.slice(0,8):e}function Lt(e){if(typeof e.status==`number`&&e.status>=400)return String(e.status);if(!e.meta)return null;try{let t=JSON.parse(e.meta);if(e.kind===`openclaw.dispatch`&&t.dispatchStatus===`failed`)return t.errorCode??`failed`;if(e.kind===`assistant.stream`&&t.phase===`finalize`&&(t.streamStatus===`error`||t.streamStatus===`aborted`))return t.streamStatus;if(e.kind===`openclaw.ingest.denied`)return`denied`}catch{}return null}function Rt({row:e,onClose:t}){let n=(0,q.useMemo)(()=>{if(!e?.meta)return``;try{return JSON.stringify(JSON.parse(e.meta),null,2)}catch{return e.meta}},[e]);return(0,J.jsx)(gt,{open:e!==null,onOpenChange:e=>{e||t()},children:e?(0,J.jsxs)(ut,{className:`max-w-lg`,children:[(0,J.jsxs)(st,{children:[(0,J.jsxs)(ft,{className:`oc-traces__meta-title`,children:[Ne(),` `,(0,J.jsx)(`code`,{children:e.kind}),(0,J.jsx)(V,{variant:`outline`,children:M()})]}),(0,J.jsx)(mt,{children:Ee()})]}),(0,J.jsx)(`pre`,{className:`oc-traces__meta-json`,children:n})]}):null})}export{Ft as TracesTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{AE as r,Ab as i,CE as a,Cb as o,DE as s,Db as c,EE as l,Eb as u,ME as d,OE as f,Ob as p,SE as m,Sb as h,TE as g,Tb as _,UR as v,WR as y,_E as ee,aE as te,bE as ne,bb as b,cE as re,dE as ie,df as x,fE as ae,ff as S,gE as oe,hE as se,iE as ce,jE as C,kE as le,kb as w,lE as ue,mE as T,oE as E,pE as D,pf as O,sE as de,t as k,uE as fe,vE as pe,vb as A,wE as me,wb as j,xE as he,xb as M,yE as ge,yb as N,zT as P}from"./api-BilJV3v_.js";import{t as F}from"./button-9dv2rCon.js";import{$ as I,Dt as L,Et as R,Fn as _e,Ft as z,Lt as ve,Mt as ye,Nt as be,Pn as xe,Pt as Se,Q as B,U as Ce,W as we,X as V,Z as H,an as U,at as Te,c as W,et as G,l as Ee,nt as De,on as K,ot as Oe,q as ke,rt as Ae,tt as q,u as J,ut as Y}from"./index-DU-gHWXa.js";import{t as je}from"./FilterBar-McDCuaLr.js";import{t as Me}from"./DataTableShell-D04EM9Zp.js";import{t as Ne}from"./DetailChips-DYBZDMW5.js";var X=t(e(),1),Z=n();function Pe({profileId:e,userLabel:t,open:n,onOpenChange:r}){let a=y(k.agents.listAgentPoolForUser,n&&e?{profileId:e}:`skip`),s=y(k.agents.listUserAgents,n&&e?{profileId:e}:`skip`),l=new Set((s??[]).map(e=>`${e.instanceName}/${e.agentId}`)),d=(s??[]).find(e=>e.isDefault)??null,f=d?`${d.instanceName}/${d.agentId}`:null,m=new Set((a?.agents??[]).map(e=>`${e.instanceName}/${e.agentId}`)),h=[...(a?.agents??[]).map(e=>({...e,outOfPool:!1})),...(s??[]).filter(e=>!m.has(`${e.instanceName}/${e.agentId}`)).map(e=>({instanceName:e.instanceName,agentId:e.agentId,displayName:e.displayName,emoji:e.emoji,model:e.model,kind:e.kind,enabled:e.enabled,state:e.state,outOfPool:!0}))],g=new Map;for(let e of h){let t=g.get(e.instanceName)??[];t.push(e),g.set(e.instanceName,t)}return(0,Z.jsx)(q,{open:n,onOpenChange:r,children:(0,Z.jsxs)(De,{className:`oc-access`,children:[(0,Z.jsxs)(Te,{children:[(0,Z.jsx)(Oe,{children:i({user:t})}),(0,Z.jsx)(Ae,{children:w()})]}),a?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:a.inGroup?p():c()}):null,(0,Z.jsx)(`div`,{className:`oc-access__list`,children:a===void 0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:u()}):h.length===0?(0,Z.jsx)(`p`,{className:`oc-access__hint`,children:o()}):[...g.entries()].map(([t,n])=>(0,Z.jsx)(Fe,{profileId:e,instanceName:t,kind:n[0].kind,agents:n,assigned:l,defaultKey:f},t))})]})})}function Fe({profileId:e,instanceName:t,kind:n,agents:r,assigned:i,defaultKey:a}){let o=v(k.agents.assignAgent),s=v(k.agents.removeAgent),c=v(k.agents.setDefaultAgent),l=L();if(!e)return null;async function u(n,r){try{r?await s({profileId:e,instanceName:t,agentId:n}):await o({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(_(),e)}}async function d(n){try{await c({profileId:e,instanceName:t,agentId:n})}catch(e){l.error(j(),e)}}return(0,Z.jsxs)(`div`,{className:`oc-access__group`,children:[(0,Z.jsxs)(`div`,{className:`oc-access__instance`,children:[(0,Z.jsx)(K,{size:13,"aria-hidden":!0}),(0,Z.jsx)(`span`,{children:t}),(0,Z.jsx)(R,{variant:`outline`,className:`oc-access__kind`,children:n})]}),r.map(e=>{let n=`${t}/${e.agentId}`,r=i.has(n),o=a===n,s=e.state===`deleted`,c=!e.enabled;return(0,Z.jsxs)(`div`,{className:`oc-access__row${c?` is-disabled`:``}`,children:[(0,Z.jsx)(Y,{checked:r,disabled:(s||c)&&!r,onCheckedChange:()=>void u(e.agentId,r),"aria-label":h({name:e.displayName??e.agentId})}),(0,Z.jsxs)(`span`,{className:`oc-access__label`,children:[e.emoji?`${e.emoji} `:``,e.displayName??e.agentId]}),e.model?(0,Z.jsx)(`span`,{className:`oc-access__model`,children:e.model}):null,s?(0,Z.jsx)(R,{variant:`outline`,className:`oc-access__gone`,children:M()}):null,e.outOfPool?(0,Z.jsx)(R,{variant:`outline`,className:`oc-access__gone`,children:b()}):null,r?o?(0,Z.jsx)(`span`,{className:`oc-access__fav`,role:`img`,"aria-label":N(),title:N(),children:(0,Z.jsx)(U,{size:14,fill:`currentColor`})}):(0,Z.jsx)(F,{type:`button`,size:`icon-sm`,variant:`ghost`,className:`oc-access__setdefault`,"aria-label":A(),title:A(),disabled:c,onClick:()=>void d(e.agentId),children:(0,Z.jsx)(U,{size:14})}):null]},e.agentId)})]})}var Q=`__all__`;function $(e){switch(e){case`pending`:return x();case`user`:return S();case`admin`:return O();default:return e}}function Ie({granted:e,onToggle:t}){let n=new Set(e),i=W.filter(e=>n.has(J[e])).length;return(0,Z.jsxs)(ye,{children:[(0,Z.jsx)(ve,{asChild:!0,children:(0,Z.jsx)(F,{variant:`outline`,size:`sm`,className:`h-8 w-36 justify-start font-normal`,children:i===0?d():C({count:i})})}),(0,Z.jsxs)(be,{align:`start`,className:`w-52`,children:[(0,Z.jsx)(z,{children:r()}),W.map(e=>{let r=J[e];return(0,Z.jsxs)(Se,{className:`gap-2`,onSelect:e=>{e.preventDefault(),t(r)},children:[(0,Z.jsx)(Y,{checked:n.has(r),"aria-hidden":!0,tabIndex:-1,className:`pointer-events-none`}),(0,Z.jsx)(`span`,{children:Ee[e]()})]},e)})]})]})}function Le(){let e=_e({from:`/settings/users`}),t=xe({from:`/settings/users`}),n=e.q??``,r=e.role??Q,i=e=>void t({search:t=>({...t,q:e||void 0}),replace:!0}),o=e=>void t({search:t=>({...t,role:e===Q?void 0:e})}),c=y(k.admin.listUsers,{filter:{q:n||void 0,role:r===Q?void 0:r},withAgents:!0}),u=y(k.me.getMe,{host:ke}),d=v(k.admin.setRole),p=v(k.admin.setUserPermissions),h=v(k.admin.startImpersonation),_=v(k.admin.deleteUser),b=v(k.admin.setUserName),x=Ce(),S=we(),C=L(),[w,O]=(0,X.useState)(null),A=(0,X.useMemo)(()=>{let e=new Set([`pending`,`user`,`admin`]);for(let t of c??[])e.add(t.role);return[...e]},[c]),j=n!==``||r!==Q;function M(){t({search:{},replace:!0})}async function N(e){try{await d(e)}catch(e){C.error(le(),e)}}async function F(e){try{await p(e)}catch(e){C.error(f(),e)}}async function R(e){let t=e.email||e.name||e.canonical||e.userId.slice(0,8);if(await x({title:he(),description:ne({user:t}),confirmWord:ge(),confirmLabel:pe(),destructive:!0}))try{await _({profileId:e._id}),C.success(oe({user:t}))}catch(e){C.error(ee(),e)}}async function z(e){let t=e.email||e.name||e.userId.slice(0,8),n=await S({title:T(),label:D({user:t}),placeholder:ae(),defaultValue:e.name??``,confirmLabel:P()});if(n!==null)try{await b({profileId:e._id,name:n}),C.success(ie())}catch(e){C.error(fe(),e)}}return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(je,{q:n,onQChange:i,searchPlaceholder:s(),onReset:M,canReset:j,children:(0,Z.jsxs)(V,{value:r,onValueChange:o,children:[(0,Z.jsx)(I,{size:`sm`,className:`w-36`,children:(0,Z.jsx)(G,{})}),(0,Z.jsxs)(H,{children:[(0,Z.jsx)(B,{value:Q,children:l()}),A.map(e=>(0,Z.jsx)(B,{value:e,children:$(e)},e))]})]})}),(0,Z.jsx)(Me,{title:g(),rows:c,emptyHint:me(),rowActions:e=>{let t=[{label:ce(),onSelect:()=>O({profileId:e._id,label:e.email||e.name||e.canonical||e.userId.slice(0,8)})},{label:se(),onSelect:()=>void z(e)}];return e.userId!==u?.userId&&t.push({label:a(),onSelect:()=>void h({profileId:e._id})},{label:m(),variant:`destructive`,onSelect:()=>void R(e)}),t},columns:[{header:ue(),cell:e=>{let t=e.email||e.name||e.canonical||e.userId.slice(0,8),n=e.email&&e.name&&e.name!==e.email?e.name:null;return(0,Z.jsxs)(`div`,{className:`flex flex-col`,children:[(0,Z.jsx)(`span`,{children:t}),n?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:n}):null]})},sort:e=>e.email||e.name||e.canonical||e.userId},{header:re(),sort:e=>e.role===`admin`?2:+(e.role===`user`),cell:e=>(0,Z.jsxs)(V,{value:e.role,onValueChange:t=>void N({profileId:e._id,role:t}),children:[(0,Z.jsx)(I,{size:`sm`,className:`w-28`,children:(0,Z.jsx)(G,{})}),(0,Z.jsxs)(H,{children:[(0,Z.jsx)(B,{value:`pending`,children:$(`pending`)}),(0,Z.jsx)(B,{value:`user`,children:$(`user`)}),(0,Z.jsx)(B,{value:`admin`,children:$(`admin`)})]})]})},{header:de(),sort:e=>e.role===`admin`?9999:e.extraPermissions?.length??0,cell:e=>e.role===`admin`?(0,Z.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:E()}):(0,Z.jsx)(Ie,{granted:e.extraPermissions??[],onToggle:t=>{let n=new Set(e.extraPermissions??[]);n.has(t)?n.delete(t):n.add(t),F({profileId:e._id,permissions:[...n]})}})},{header:te(),cell:e=>(0,Z.jsx)(Ne,{icon:(0,Z.jsx)(K,{size:12,"aria-hidden":!0}),total:e.agentCount??0,items:e.agents.map(e=>({label:e}))}),sort:e=>e.agentCount??0}]}),(0,Z.jsx)(Pe,{profileId:w?.profileId??null,userLabel:w?.label??``,open:w!==null,onOpenChange:e=>{e||O(null)}})]})}export{Le as UsersTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,l as t,r as n}from"./bundle-mjs-C73ZY4La.js";import{$n as r,At as i,Bn as a,Bt as o,FR as s,Fn as c,Ft as l,Gn as ee,Hn as u,Ht as d,ID as f,In as p,It as m,Jn as h,Kn as g,LR as te,Ln as _,Nt as v,Ot as ne,Pt as y,Qn as b,Rn as x,Td as S,UR as C,Un as re,Ut as ie,VR as ae,Vn as w,Vt as T,WR as E,Wn as oe,Xn as se,Xt as ce,Yn as le,Zn as D,ar as ue,er as O,eu as de,gt as fe,ir as pe,jt as k,kt as me,nr as A,nu as j,qn as M,rr as N,t as P,tr as F,zn as I,zt as L}from"./api-BilJV3v_.js";import{i as R,n as z,r as he,t as ge}from"./tabs-Cb9Sl0jx.js";import{t as B}from"./button-9dv2rCon.js";import{$ as V,$t as H,Et as U,Fn as _e,Jt as ve,Nn as ye,Pn as be,Q as W,Qt as G,X as K,Xt as xe,Yt as Se,Z as q,Zt as Ce,en as we,et as J,gn as Te,nn as Ee,q as De,ut as Y}from"./index-DU-gHWXa.js";/* empty css */var X=t(e(),1),Z=n(),Q=[[`auto`,()=>b()],[`fr-FR`,()=>ie()],[`en-US`,()=>d()],[`en-GB`,()=>T()],[`de-DE`,()=>o()],[`es-ES`,()=>L()]],Oe=[[`0.75`,()=>se()],[`1`,()=>le()],[`1.25`,()=>h()],[`1.5`,()=>M()]],$=0;function ke({instance:e}){let t=C(P.admin.upsertInstanceConfig),n=e.config??{},a={enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0},[o,s]=(0,X.useState)(a),[c,l]=(0,X.useState)(`idle`),[d,f]=(0,X.useState)(!1),[p,m]=(0,X.useState)(!1),h=ae(P.voice.gatewayTtsPreview);(0,X.useEffect)(()=>{s({enabled:n.voiceEnabled===!0,engine:n.voiceEngine===`gateway`?`gateway`:`browser`,lang:typeof n.voiceLang==`string`?n.voiceLang:`auto`,rate:typeof n.voiceRate==`number`?String(n.voiceRate):`1`,autoRead:n.voiceAutoRead===!0}),l(`idle`)},[e._id]);let _=o.enabled!==a.enabled||o.engine!==a.engine||o.lang!==a.lang||o.rate!==a.rate||o.autoRead!==a.autoRead;async function v(){l(`saving`);try{let n={...e.config??{}};n.voiceEnabled=o.enabled,o.engine===`gateway`?n.voiceEngine=`gateway`:delete n.voiceEngine,o.lang===`auto`?delete n.voiceLang:n.voiceLang=o.lang;let r=Number.parseFloat(o.rate);!Number.isFinite(r)||r===1?delete n.voiceRate:n.voiceRate=r,o.autoRead?n.voiceAutoRead=!0:delete n.voiceAutoRead,await t({instanceId:e._id,config:n}),l(`idle`)}catch{l(`error`)}}return(0,Z.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Z.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Z.jsx)(`span`,{className:`oc-voice__instance`,children:e.name}),(0,Z.jsx)(U,{variant:`secondary`,children:e.kind===`hermes`?`Hermes`:`OpenClaw`})]}),(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(Y,{checked:o.enabled,onCheckedChange:e=>s({...o,enabled:e===!0}),"aria-label":O()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:O()})]}),(0,Z.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:k()}),(0,Z.jsxs)(K,{value:o.engine,onValueChange:e=>s({...o,engine:e}),disabled:!o.enabled,children:[(0,Z.jsx)(V,{size:`sm`,"aria-label":k(),children:(0,Z.jsx)(J,{})}),(0,Z.jsxs)(q,{children:[(0,Z.jsx)(W,{value:`browser`,children:i()}),e.kind===`hermes`?null:(0,Z.jsx)(W,{value:`gateway`,children:me()})]})]})]}),o.engine===`gateway`?(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:ne()}):null,o.engine===`gateway`?null:(0,Z.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:r()}),(0,Z.jsxs)(K,{value:o.lang,onValueChange:e=>s({...o,lang:e}),disabled:!o.enabled,children:[(0,Z.jsx)(V,{size:`sm`,"aria-label":r(),children:(0,Z.jsx)(J,{})}),(0,Z.jsx)(q,{children:Q.map(([e,t])=>(0,Z.jsx)(W,{value:e,children:t()},e))})]})]}),(0,Z.jsxs)(`div`,{className:`oc-voice__row`,children:[(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:D()}),(0,Z.jsxs)(K,{value:o.rate,onValueChange:e=>s({...o,rate:e}),disabled:!o.enabled,children:[(0,Z.jsx)(V,{size:`sm`,"aria-label":D(),children:(0,Z.jsx)(J,{})}),(0,Z.jsx)(q,{children:Oe.map(([e,t])=>(0,Z.jsx)(W,{value:e,children:t()},e))})]})]}),o.engine===`gateway`?null:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(Y,{checked:o.autoRead,onCheckedChange:e=>s({...o,autoRead:e===!0}),disabled:!o.enabled,"aria-label":g()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:g()})]}),(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:ee()})]}),(0,Z.jsxs)(`div`,{className:`oc-cdefaults__inline`,children:[(0,Z.jsx)(B,{size:`sm`,disabled:!_||c===`saving`,onClick:()=>void v(),children:c===`saving`?S():j()}),(0,Z.jsx)(B,{variant:`outline`,size:`sm`,disabled:!o.enabled||d,onClick:()=>{let t=Number.parseFloat(o.rate)||1,n=++$;if(m(!1),H(),G(),o.engine!==`gateway`){Ce(u(),{lang:xe(o.lang,te()),rate:t});return}f(!0),h({instanceName:e.name,text:u()}).then(({mime:e,audioBase64:r})=>{n===$&&Se(r,e,{rate:t})}).catch(()=>{n===$&&m(!0)}).finally(()=>f(!1))},children:d?S():oe()}),(0,Z.jsx)(B,{variant:`ghost`,size:`sm`,onClick:()=>{$++,f(!1),H(),G()},children:re()})]}),c===`error`||p?(0,Z.jsx)(`p`,{className:`oc-cdefaults__error`,role:`alert`,children:p?fe():de()}):null]})}function Ae({stt:e}){let t=E(P.me.getMe,{host:De}),n=C(P.admin.setFeatureEnabled),r=t?.ui?.featuresEnabled?.voiceInput===!0,i=t?.role===`admin`;return(0,Z.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Z.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Z.jsx)(`span`,{className:`oc-voice__instance`,children:a()}),(0,Z.jsx)(U,{variant:e?`secondary`:`outline`,children:e?p():c()}),(0,Z.jsx)(U,{variant:r?`secondary`:`destructive`,children:r?l():y()})]}),i?(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(Y,{checked:r,onCheckedChange:e=>void n({key:`voiceInput`,enabled:e===!0}),"aria-label":m()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:m()})]}):null,(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:I()})]})}function je(){let e=E(P.admin.listInstances,{}),t=(0,X.useMemo)(()=>we(),[]),n=(0,X.useMemo)(()=>ve(),[]),{section:r}=_e({from:`/settings/voice`}),i=be({from:`/settings/voice`});return(0,Z.jsxs)(`div`,{className:`oc-admin__tab oc-voice`,children:[(0,Z.jsx)(`p`,{className:`oc-admin__hint`,children:ue()}),(0,Z.jsxs)(`div`,{className:`oc-voice__support`,children:[(0,Z.jsx)(U,{variant:t?`secondary`:`destructive`,children:t?pe():N()}),(0,Z.jsx)(U,{variant:n?`secondary`:`destructive`,children:n?A():F()})]}),(0,Z.jsxs)(ge,{value:r,onValueChange:e=>void i({search:{section:e},replace:!0}),children:[(0,Z.jsxs)(he,{className:`w-full`,children:[(0,Z.jsxs)(R,{value:`readaloud`,className:`flex-1 gap-1.5`,children:[(0,Z.jsx)(Ee,{size:13,"aria-hidden":!0}),v()]}),(0,Z.jsxs)(R,{value:`dictation`,className:`flex-1 gap-1.5`,children:[(0,Z.jsx)(Te,{size:13,"aria-hidden":!0}),a()]}),(0,Z.jsxs)(R,{value:`talk`,className:`flex-1 gap-1.5`,children:[(0,Z.jsx)(ye,{size:13,"aria-hidden":!0}),x()]})]}),(0,Z.jsx)(z,{value:`readaloud`,children:e===void 0?(0,Z.jsx)(`p`,{className:`oc-admin__hint`,children:s()}):e.length===0?(0,Z.jsx)(`p`,{className:`oc-admin__hint`,children:w()}):e.map(e=>(0,Z.jsx)(ke,{instance:e},e._id))}),(0,Z.jsx)(z,{value:`dictation`,children:(0,Z.jsx)(Ae,{stt:n})}),(0,Z.jsxs)(z,{value:`talk`,children:[(0,Z.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Z.jsx)(`header`,{className:`oc-voice__cardhead`,children:(0,Z.jsx)(`span`,{className:`oc-voice__instance`,children:x()})}),(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:_()})]}),e===void 0?(0,Z.jsx)(`p`,{className:`oc-admin__hint`,children:s()}):e.length===0?(0,Z.jsx)(`p`,{className:`oc-admin__hint`,children:w()}):e.map(e=>(0,Z.jsx)(Me,{instance:e},e._id))]})]})]})}function Me({instance:e}){let t=C(P.admin.upsertInstanceConfig),n=e.config??{},r=n.talkEnabled===!0,i=e.kind===`hermes`;return(0,Z.jsxs)(`section`,{className:`oc-voice__card`,children:[(0,Z.jsxs)(`header`,{className:`oc-voice__cardhead`,children:[(0,Z.jsx)(`span`,{className:`oc-voice__instance`,children:e.name}),(0,Z.jsx)(U,{variant:`secondary`,children:i?`Hermes`:`OpenClaw`})]}),i?(0,Z.jsx)(`p`,{className:`oc-cdefaults__help`,children:ce()}):(0,Z.jsxs)(`label`,{className:`oc-cdefaults__inline`,style:{cursor:`pointer`},children:[(0,Z.jsx)(Y,{checked:r,onCheckedChange:r=>{let i={...n};r===!0?i.talkEnabled=!0:delete i.talkEnabled,t({instanceId:e._id,config:i})},"aria-label":f()}),(0,Z.jsx)(`span`,{className:`oc-cdefaults__label`,children:f()})]})]})}export{je as VoiceTab};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e}from"./api-BilJV3v_.js";var t=e(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e}from"./api-BilJV3v_.js";var t=e(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{D as e}from"./api-BilJV3v_.js";var t=e(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]);export{t};
|