@odigos/ui-kit 0.0.155 → 0.0.156

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.156](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.155...ui-kit-v0.0.156) (2025-12-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fetchSourceDescribe and fetchSourceLibraries ([#562](https://github.com/odigos-io/ui-kit/issues/562)) ([9858c7f](https://github.com/odigos-io/ui-kit/commit/9858c7f5e8d1ddde4b1376e7e7baa3714d0423a8))
9
+
3
10
  ## [0.0.155](https://github.com/odigos-io/ui-kit/compare/ui-kit-v0.0.154...ui-kit-v0.0.155) (2025-12-21)
4
11
 
5
12
 
@@ -2,9 +2,7 @@ import { type FC } from 'react';
2
2
  import { type DescribeSource, type Source, type WorkloadId } from '@/types';
3
3
  interface DescribeProps {
4
4
  source: Source;
5
- fetchSourceDescribe: (req: {
6
- variables: WorkloadId;
7
- }) => Promise<{
5
+ fetchSourceDescribe: (req: WorkloadId) => Promise<{
8
6
  data?: {
9
7
  describeSource: DescribeSource;
10
8
  };
@@ -2,9 +2,7 @@ import { type FC } from 'react';
2
2
  import { type InstrumentationInstanceComponent, type Source, type WorkloadId } from '@/types';
3
3
  interface LibrariesProps {
4
4
  source: Source;
5
- fetchSourceLibraries: (req: {
6
- variables: WorkloadId;
7
- }) => Promise<{
5
+ fetchSourceLibraries: (req: WorkloadId) => Promise<{
8
6
  data?: {
9
7
  instrumentationInstanceComponents: InstrumentationInstanceComponent[];
10
8
  };
package/lib/containers.js CHANGED
@@ -467,11 +467,11 @@ import e,{useState as t,useEffect as i,forwardRef as a,useRef as n,useImperative
467
467
  flex-direction: column;
468
468
  gap: 24px;
469
469
  padding: 4px;
470
- `,Sl=({formData:t,handleFormChange:i})=>e.createElement(Cl,null,e.createElement($,{name:"sourceName",title:"Source name",tooltip:"This overrides the default service name that runs in your cluster.",placeholder:"Use a name that overrides the source name",value:t.otelServiceName,onChange:({target:{value:e}})=>i("otelServiceName",e)})),wl=({workloadOdigosHealthStatus:t})=>{if(!t)return null;const i=Ut(t.status),a=nt(t.reasonEnum),n=t.message;return e.createElement(ue,{$alignItems:"center",$justifyContent:"center"},e.createElement(de,{status:i,title:a,subtitle:n,withBackground:i!==he.Disabled,withBorder:!0,withIcon:!0,width:"calc(100% - 24px)"}))},Tl=({source:a,fetchSourceDescribe:n,restartPod:o})=>{const[l,r]=t(!1),[s,d]=t(null);return i(()=>{a&&n({variables:{namespace:a.namespace,name:a.name,kind:a.kind}}).then(({data:e})=>{e?.describeSource?d(e.describeSource):r(!0)})},[n,a.namespace,a.name,a.kind]),s||l?e.createElement(ee,{$gap:12},l?e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Could not fetch describe for this source"})):s?.pods?.length?s.pods.map(({podName:t,nodeName:i,phase:n,agentInjected:l,runningLatestWorkloadRevision:r,containers:d,manifestYAML:u})=>{const p=n.status!==W.Success||Yt(d)?W.Error:W.Success,m=[];return m.push(e.createElement(Gt,{key:"copy-text",value:`kubectl get pod ${t.value} -n ${s?.namespace?.value||a.namespace}`.toLowerCase()})),m.push(e.createElement(se,{key:"divider-1",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-1",title:i.name,tooltip:i.explain||"",value:{status:i.status||void 0,text:i.value}})),m.push(e.createElement(se,{key:"divider-2",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-2",title:n.name,tooltip:n.explain||"",value:{status:n.status||void 0,text:n.value}})),m.push(e.createElement(se,{key:"divider-3",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-3",title:l.name,tooltip:l.explain||"",value:{status:l.status||void 0,text:l.value}})),m.push(e.createElement(se,{key:"divider-4",length:"100%",margin:"0"})),r?.name&&(m.push(e.createElement(Xt,{key:"describe-row-4",title:r.name,tooltip:r.explain||void 0,value:{status:r.status||void 0,text:r.value}})),m.push(e.createElement(se,{key:"divider-5",length:"100%",margin:"0"}))),d.forEach(t=>{m.push(e.createElement(Zt,{key:`pod-container-${t.containerName.value}`,...t}))}),u&&(m.push(e.createElement(se,{key:"divider-6",length:"100%",margin:"0"})),m.push(e.createElement(Xi,{key:"yaml-section-card",yaml:u}))),e.createElement(Z,{key:`pod-${t.value}`,title:`Pod: ${t.value}`,withExtend:!0,action:({hovered:i})=>e.createElement("div",{style:{position:"relative"}},e.createElement(de,{key:"status",status:p,title:p,withIcon:!0,withBorder:!0}),i&&e.createElement(Qt,{key:"hover-actions",isOpen:!0,positionRight:"calc(100% + 12px)",actions:[{id:ei(),label:"Restart",rightIcon:zi,onClick:()=>o(s?.namespace?.value||a.namespace,t.value)}]}))},c.toArray(m))}):e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Check if you have any running pods and try again"}))):e.createElement(De,{$height:"70vh"},e.createElement(Pe,null))},Dl=d(ue)`
470
+ `,Sl=({formData:t,handleFormChange:i})=>e.createElement(Cl,null,e.createElement($,{name:"sourceName",title:"Source name",tooltip:"This overrides the default service name that runs in your cluster.",placeholder:"Use a name that overrides the source name",value:t.otelServiceName,onChange:({target:{value:e}})=>i("otelServiceName",e)})),wl=({workloadOdigosHealthStatus:t})=>{if(!t)return null;const i=Ut(t.status),a=nt(t.reasonEnum),n=t.message;return e.createElement(ue,{$alignItems:"center",$justifyContent:"center"},e.createElement(de,{status:i,title:a,subtitle:n,withBackground:i!==he.Disabled,withBorder:!0,withIcon:!0,width:"calc(100% - 24px)"}))},Tl=({source:a,fetchSourceDescribe:n,restartPod:o})=>{const[l,r]=t(!1),[s,d]=t(null);return i(()=>{a&&n({namespace:a.namespace,name:a.name,kind:a.kind}).then(({data:e})=>{e?.describeSource?d(e.describeSource):r(!0)})},[a.namespace,a.name,a.kind]),s||l?e.createElement(ee,{$gap:12},l?e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Could not fetch describe for this source"})):s?.pods?.length?s.pods.map(({podName:t,nodeName:i,phase:n,agentInjected:l,runningLatestWorkloadRevision:r,containers:d,manifestYAML:u})=>{const p=n.status!==W.Success||Yt(d)?W.Error:W.Success,m=[];return m.push(e.createElement(Gt,{key:"copy-text",value:`kubectl get pod ${t.value} -n ${s?.namespace?.value||a.namespace}`.toLowerCase()})),m.push(e.createElement(se,{key:"divider-1",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-1",title:i.name,tooltip:i.explain||"",value:{status:i.status||void 0,text:i.value}})),m.push(e.createElement(se,{key:"divider-2",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-2",title:n.name,tooltip:n.explain||"",value:{status:n.status||void 0,text:n.value}})),m.push(e.createElement(se,{key:"divider-3",length:"100%",margin:"0"})),m.push(e.createElement(Xt,{key:"describe-row-3",title:l.name,tooltip:l.explain||"",value:{status:l.status||void 0,text:l.value}})),m.push(e.createElement(se,{key:"divider-4",length:"100%",margin:"0"})),r?.name&&(m.push(e.createElement(Xt,{key:"describe-row-4",title:r.name,tooltip:r.explain||void 0,value:{status:r.status||void 0,text:r.value}})),m.push(e.createElement(se,{key:"divider-5",length:"100%",margin:"0"}))),d.forEach(t=>{m.push(e.createElement(Zt,{key:`pod-container-${t.containerName.value}`,...t}))}),u&&(m.push(e.createElement(se,{key:"divider-6",length:"100%",margin:"0"})),m.push(e.createElement(Xi,{key:"yaml-section-card",yaml:u}))),e.createElement(Z,{key:`pod-${t.value}`,title:`Pod: ${t.value}`,withExtend:!0,action:({hovered:i})=>e.createElement("div",{style:{position:"relative"}},e.createElement(de,{key:"status",status:p,title:p,withIcon:!0,withBorder:!0}),i&&e.createElement(Qt,{key:"hover-actions",isOpen:!0,positionRight:"calc(100% + 12px)",actions:[{id:ei(),label:"Restart",rightIcon:zi,onClick:()=>o(s?.namespace?.value||a.namespace,t.value)}]}))},c.toArray(m))}):e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Check if you have any running pods and try again"}))):e.createElement(De,{$height:"70vh"},e.createElement(Pe,null))},Dl=d(ue)`
471
471
  width: 100%;
472
472
  align-items: center;
473
473
  justify-content: space-between;
474
- `,Nl=({source:a,fetchSourceLibraries:n})=>{const o=O.useTheme(),[l,s]=t(!1),[c,d]=t(null);return i(()=>{a&&n({variables:{namespace:a.namespace,name:a.name,kind:a.kind}}).then(({data:e})=>{e?.instrumentationInstanceComponents?d(Tt(e.instrumentationInstanceComponents).sort((e,t)=>e.name.localeCompare(t.name))):s(!0)})},[n,a.namespace,a.name,a.kind]),c||l?e.createElement(ee,{$gap:12},l?e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Could not fetch libraries for this source"})):c?.length?e.createElement(Z,{title:"Instrumented Libraries"},c.map(({name:t,healthy:i,nonIdentifyingAttributes:a},n)=>e.createElement(r,{key:`library-${t}`},e.createElement(Dl,null,e.createElement(E,{size:12,color:o.text.grey},t),e.createElement(ue,{$gap:4},a.map(({key:i,value:a})=>ti(a)&&ii(a)&&"is_standard_lib"===i?e.createElement(de,{key:`${t}-${i}`,status:W.Default,title:"STANDARD",withBorder:!0}):null),"boolean"==typeof i&&e.createElement(de,{status:i?W.Success:W.Error,title:i?"HEALTHY":"UNHEALTHY",withBorder:!0}))),n!==c.length-1&&e.createElement(se,{length:"100%",margin:"0"})))):e.createElement(De,{$height:"70vh",$gap:12},e.createElement(Ne,{title:"No libraries found",subTitle:""}),e.createElement(oe,{type:W.Warning,message:"This feature is in early development, and has very limited support"}))):e.createElement(De,{$height:"70vh"},e.createElement(Pe,null))};var El;!function(e){e.Overview="Overview",e.Pods="Pods",e.Libraries="Libraries"}(El||(El={}));const Ol=[oi.Deployment,oi.StatefulSet,oi.DaemonSet,oi.DeploymentConfig],Fl=[li.Python,li.Go,li.Java],Il=d.div`
474
+ `,Nl=({source:a,fetchSourceLibraries:n})=>{const o=O.useTheme(),[l,s]=t(!1),[c,d]=t(null);return i(()=>{a&&n({namespace:a.namespace,name:a.name,kind:a.kind}).then(({data:e})=>{e?.instrumentationInstanceComponents?d(Tt(e.instrumentationInstanceComponents).sort((e,t)=>e.name.localeCompare(t.name))):s(!0)})},[a.namespace,a.name,a.kind]),c||l?e.createElement(ee,{$gap:12},l?e.createElement(De,{$height:"70vh"},e.createElement(Ne,{subTitle:"Could not fetch libraries for this source"})):c?.length?e.createElement(Z,{title:"Instrumented Libraries"},c.map(({name:t,healthy:i,nonIdentifyingAttributes:a},n)=>e.createElement(r,{key:`library-${t}`},e.createElement(Dl,null,e.createElement(E,{size:12,color:o.text.grey},t),e.createElement(ue,{$gap:4},a.map(({key:i,value:a})=>ti(a)&&ii(a)&&"is_standard_lib"===i?e.createElement(de,{key:`${t}-${i}`,status:W.Default,title:"STANDARD",withBorder:!0}):null),"boolean"==typeof i&&e.createElement(de,{status:i?W.Success:W.Error,title:i?"HEALTHY":"UNHEALTHY",withBorder:!0}))),n!==c.length-1&&e.createElement(se,{length:"100%",margin:"0"})))):e.createElement(De,{$height:"70vh",$gap:12},e.createElement(Ne,{title:"No libraries found",subTitle:""}),e.createElement(oe,{type:W.Warning,message:"This feature is in early development, and has very limited support"}))):e.createElement(De,{$height:"70vh"},e.createElement(Pe,null))};var El;!function(e){e.Overview="Overview",e.Pods="Pods",e.Libraries="Libraries"}(El||(El={}));const Ol=[oi.Deployment,oi.StatefulSet,oi.DaemonSet,oi.DeploymentConfig],Fl=[li.Python,li.Go,li.Java],Il=d.div`
475
475
  width: 100%;
476
476
  height: 100%;
477
477
  max-height: calc(100vh - 220px);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odigos/ui-kit",
3
- "version": "0.0.155",
3
+ "version": "0.0.156",
4
4
  "author": "Odigos",
5
5
  "license": "MIT",
6
6
  "repository": {