@odigos/ui-kit 0.0.277 → 0.0.278
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/CHANGELOG.md +7 -0
- package/lib/containers.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.278](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.277...ui-kit-v0.0.278) (2026-07-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* pod YAML fetching logic ([#1139](https://github.com/odigos-io/ui-kit/issues/1139)) ([d4cf210](https://github.com/odigos-io/ui-kit/commit/d4cf210c176b23f547e5246ca140e440e80dc9d1))
|
|
9
|
+
|
|
3
10
|
## [0.0.277](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.276...ui-kit-v0.0.277) (2026-07-29)
|
|
4
11
|
|
|
5
12
|
|
package/lib/containers.js
CHANGED
|
@@ -605,7 +605,7 @@ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import o,{useMem
|
|
|
605
605
|
background-color: ${({theme:e})=>e.v2.colors.silver[800]};
|
|
606
606
|
}
|
|
607
607
|
`}
|
|
608
|
-
`,Jp=({serviceName:n,isVirtual:o,nodeAttributes:a})=>{const l=vn(e=>e.drawerEntityId),{items:r}=Gl().sourcesApi.useSources(),s=i(()=>r.find(e=>e.id.name===n||e.serviceName===n),[r,n]),c=i(()=>s&&JSON.stringify(yn(s))!==JSON.stringify(yn(l)),[s,l]),d=i(()=>{if(o){const e=Object.fromEntries((a??[]).map(({key:e,value:t})=>[e,t]));return[Cn({serviceName:n,attributes:e})]}if(n?.toLowerCase()===Gp)return[yl];const e=s?Sn(s):void 0;return e?.length?e:[fl]},[o,a,n,s]),p=c?()=>{const{setDrawerType:e,setDrawerEntityId:t}=vn.getState();e(wn(Et.Source)),t({namespace:s?.id.namespace??"",name:s?.id.name??"",kind:s?.id.kind??"",region:s?.id.region??""})}:void 0;return e(Yp,{onClick:p,$withClick:!!p,children:[e(oe,{$gap:8,children:[t(xn,{icons:d}),t(ee,{size:te.XXS,children:n})]}),o&&t(ce,{status:Pe.Info,label:nt.VIRTUAL,textSize:te.XXXS,invertColors:!0,tooltip:nt.VIRTUAL_TOOLTIP})]})},qp=e=>{if("string"==typeof e)return e;if(e&&"object"==typeof e){const t=e;if("string"==typeof t.k8sActualManifest)return t.k8sActualManifest;if("string"==typeof t.manifest)return t.manifest}},Zp=({source:n})=>{const o=v(),{k8sManifestApi:r}=Gl(),[s,c]=l(!0),[d,p]=l(void 0),[u,h]=l(!0),[m,g]=l(void 0),[f,b]=l(!0),[y,C]=l({})
|
|
608
|
+
`,Jp=({serviceName:n,isVirtual:o,nodeAttributes:a})=>{const l=vn(e=>e.drawerEntityId),{items:r}=Gl().sourcesApi.useSources(),s=i(()=>r.find(e=>e.id.name===n||e.serviceName===n),[r,n]),c=i(()=>s&&JSON.stringify(yn(s))!==JSON.stringify(yn(l)),[s,l]),d=i(()=>{if(o){const e=Object.fromEntries((a??[]).map(({key:e,value:t})=>[e,t]));return[Cn({serviceName:n,attributes:e})]}if(n?.toLowerCase()===Gp)return[yl];const e=s?Sn(s):void 0;return e?.length?e:[fl]},[o,a,n,s]),p=c?()=>{const{setDrawerType:e,setDrawerEntityId:t}=vn.getState();e(wn(Et.Source)),t({namespace:s?.id.namespace??"",name:s?.id.name??"",kind:s?.id.kind??"",region:s?.id.region??""})}:void 0;return e(Yp,{onClick:p,$withClick:!!p,children:[e(oe,{$gap:8,children:[t(xn,{icons:d}),t(ee,{size:te.XXS,children:n})]}),o&&t(ce,{status:Pe.Info,label:nt.VIRTUAL,textSize:te.XXXS,invertColors:!0,tooltip:nt.VIRTUAL_TOOLTIP})]})},qp=e=>{if("string"==typeof e)return e;if(e&&"object"==typeof e){const t=e;if("string"==typeof t.k8sActualManifest)return t.k8sActualManifest;if("string"==typeof t.manifest)return t.manifest}},Zp=({source:n})=>{const o=v(),{k8sManifestApi:r}=Gl(),[s,c]=l(!0),[d,p]=l(void 0),[u,h]=l(!0),[m,g]=l(void 0),[f,b]=l(!0),[y,C]=l({});a(()=>{r.fetch({namespace:n.id.namespace,kind:n.id.kind,name:n.id.name}).then(({data:e})=>p(qp(e))).finally(()=>c(!1)),r.fetch({namespace:n.id.namespace,kind:Tn.InstrumentationConfig,name:`${n.id.kind}-${n.id.name}`.toLowerCase()}).then(({data:e})=>g(qp(e))).finally(()=>h(!1))},[n.id.namespace,n.id.kind,n.id.name]);const S=i(()=>(n.pods??[]).map(e=>e.podName).join(","),[n.pods]);a(()=>{if(Object.keys(y).length>0)return;const e=S?S.split(","):[];if(0===e.length)return C({}),void b(!1);let t=!1;return b(!0),Promise.all(e.map(async e=>{const{data:t}=await r.fetch({namespace:n.id.namespace,kind:Tn.Pod,name:e});return[e,qp(t)]})).then(e=>{t||C(Object.fromEntries(e))}).finally(()=>{t||b(!1)}),()=>{t=!0}},[y,S,n.id.namespace]);const x=i(()=>[{label:nt.DESCRIBE_POD,value:`kubectl describe ${n.id.kind} ${n.id.name} -n ${n.id.namespace}`},{label:nt.GET_POD_YAML,value:`kubectl get ${n.id.kind} ${n.id.name} -n ${n.id.namespace} -o yaml`},{label:nt.GET_POD_YAML,value:`kubectl get ${Tn.InstrumentationConfig} ${n.id.kind}-${n.id.name} -n ${n.id.namespace} -o yaml`}],[n.id.kind,n.id.name,n.id.namespace]);return e(Wt,{bgTint:"1000",children:[t(Wt,{bgTint:"900",richTitle:{icon:Cl,title:nt.DEBUG_COMMANDS},withCollapse:!0,collapseIsDefaultOpen:!0,children:x.map(({label:e,value:n},o)=>t(mn,{label:e,value:n},`debug-cmd-${o}-${e}`))}),s?t(re,{size:1}):t(Dr,{bgTint:"800",codeBgColor:o.v2.colors.silver[900],title:`${n.id.kind} YAML`,yaml:d}),u?t(re,{size:1}):t(Dr,{bgTint:"800",codeBgColor:o.v2.colors.silver[900],title:"Instrumentation Config YAML",yaml:m}),n.pods?.map(e=>f?t(re,{size:1},e.podName):t(Dr,{bgTint:"800",codeBgColor:o.v2.colors.silver[900],title:`Pod ${e.podName} YAML`,yaml:y[e.podName]},e.podName))]})},Qp=({title:n,children:o})=>e(ae,{$gap:8,children:[t(ee,{size:te.XXXS,color:ne.Secondary,children:n}),o]}),eu=({source:n})=>{const o=i(()=>{const[e,t]=In(n.telemetryMetrics?.[0]?.throughputBytes||0).split(" ");return{value:e,units:t}},[n]);return t(Qp,{title:nt.THROUGHPUT_LAST_10_SECONDS,children:e(oe,{$alignItems:"flex-end",$gap:4,children:[t(ee,{size:te.L,children:o.value}),t(ee,{size:te.XS,variant:Ot.Span,children:o.units})]})})},tu=({source:n})=>{const{CopyButton:o}=Pt();return t(Qp,{title:nt.NAMESPACE,children:e(oe,{children:[t(nn,{variant:hn.Blue,label:n.id.namespace}),t(o,{value:n.id.namespace,size:Ct.XS})]})})},nu=({source:n})=>{const{CopyButton:o}=Pt(),i=n.id.region;return i?t(Qp,{title:nt.REGION,children:e(oe,{children:[t(nn,{variant:hn.Blue,label:i}),t(o,{value:i,size:Ct.XS})]})}):null},ou=({source:e})=>{const n=e.markedForInstrumentation?.markedForInstrumentation??!1;return t(Qp,{title:nt.ENABLED,children:t(oe,{children:t(nn,{variant:n?hn.Green:hn.Default,label:n?nt.ENABLED:nt.DISABLED})})})},iu=({source:e,label:n})=>t(Qp,{title:nt.KIND,children:t(oe,{children:t(nn,{variant:hn.Blue,label:n||e.id.kind})})}),au=({source:n})=>{const{CopyButton:o}=Pt();return t(Qp,{title:nt.NAME,children:e(oe,{children:[t(nn,{variant:hn.Blue,label:n.id.name}),t(o,{value:n.id.name,size:Ct.XS})]})})},lu=({source:n})=>{const{CopyButton:o}=Pt(),i=n.serviceName||n.id.name;return t(Qp,{title:nt.SERVICE_NAME,children:e(oe,{children:[t(nn,{variant:hn.Blue,label:i}),t(o,{value:i,size:Ct.XS})]})})},ru=({source:n})=>{const{isK8s:o,isConnector:a}=S(),l=i(()=>kn(n.id.kind),[n.id.kind]);return t(Wt,{children:e(oe,{$gap:24,$alignItems:"flex-start",$justifyContent:"flex-start",$wrap:"wrap",children:[o&&t(eu,{source:n}),t(ou,{source:n}),a&&t(nu,{source:n}),o&&t(tu,{source:n}),t(iu,{source:n,label:l}),t(au,{source:n}),!o&&t(lu,{source:n})]})})},su=({source:e})=>e.pods?.length&&e.podsOdigosHealthStatus?t(Wt,{bgTint:"900",children:t(Np,{podsOdigosHealthStatus:e.podsOdigosHealthStatus,pods:e.pods,noPadding:!0})}):null,cu=({source:e})=>{const n=i(()=>e.workloadOdigosHealthStatus?{status:e.workloadOdigosHealthStatus.status?En(e.workloadOdigosHealthStatus.status):Pe.Unknown,title:Xt(e.workloadOdigosHealthStatus.reasonEnum),subTitle:e.workloadOdigosHealthStatus.message}:null,[e]);return n?t(Ut,{...n,width:"100%"}):null},du=h(null),pu=b.div`
|
|
609
609
|
position: relative;
|
|
610
610
|
`,uu=({children:e})=>{const n=p(null);return t(pu,{ref:n,children:t(du.Provider,{value:n,children:e})})},hu=b.div`
|
|
611
611
|
position: fixed;
|