1import{r as u,j as e,J as g}from"./CZzrexQa.production.bundle.min.js";import{A as x}from"./D4lvmK5r.production.bundle.min.js";import{a9 as _,L as v,a6 as l}from"./b2Mkg01q.production.bundle.min.js";import{aB as C,aC as P}from"./DeceMiF-.production.bundle.min.js";import{c as i,I as w,S as y,b as j}from"./C_cH1u9D.production.bundle.min.js";import{T as d}from"./oN3AJijl.production.bundle.min.js";import{B as N}from"./YCM_kEyP.production.bundle.min.js";import{b as T,D as I}from"./3wIbuO__.production.bundle.min.js";import"./DGYQp8fe.production.bundle.min.js";import"./DwmhJbxl.production.bundle.min.js";import"./CUZmxn9S.production.bundle.min.js";import"./9eHdvLN4.production.bundle.min.js";import"./CHClG9UV.production.bundle.min.js";import"./CiD4UJCU.production.bundle.min.js";import"./DvLd3evF.production.bundle.min.js";import"./E6csxmgU.production.bundle.min.js";import"./tkddr5kZ.production.bundle.min.js";import"./BmBjCq8D.production.bundle.min.js";import"./Dsqj8S3w.production.bundle.min.js";import"./kkIr59yR.production.bundle.min.js";import"./D-90pMQ7.production.bundle.min.js";import"./B0uEge7d.production.bundle.min.js";import"./DGAisTA8.production.bundle.min.js";import"./DQegFpUo.production.bundle.min.js";import"./D0x1Z4HE.production.bundle.min.js";import"./Ci_hGDFV.production.bundle.min.js";import"./Y4Ob0Is8.production.bundle.min.js";import"./CXT9N8xZ.production.bundle.min.js";import"./C_Ln3svq.production.bundle.min.js";import"./7LcJfZNO.production.bundle.min.js";import"./D8sKcCdJ.production.bundle.min.js";import"./Bm1LOIPR.production.bundle.min.js";import"./DWUNlcjA.production.bundle.min.js";import"./CNsPFEJO.production.bundle.min.js";import"./DtpVAsok.production.bundle.min.js";import"./2mZBARql.production.bundle.min.js";import"./vhNSgALD.production.bundle.min.js";import"./CJIgguc4.production.bundle.min.js";import"./zzLyrqbE.production.bundle.min.js";import"./DFn2u8qh.production.bundle.min.js";import"./CpVN2k6O.production.bundle.min.js";import"./B7Fri_dM.production.bundle.min.js";import"./CLBsRoPD.production.bundle.min.js";import"./Ch78CD0x.production.bundle.min.js";import"./D1TNtnEv.production.bundle.min.js";import"./DnQqxH0F.production.bundle.min.js";const R=[{title:"Pod Group",columnKey:"pod_group",fixed:!0,render:(r,s)=>e.jsx("div",{style:{display:"flex",gap:"8px"},children:s.tags.map(a=>e.jsx(y,{type:j.Info,labelText:a},a))})}],m=[{label:"Type",value:"Type"},{label:"Last Deploy",value:"Last Deploy"},{label:"Requests",value:"Requests"},{label:"Error Rate",value:"Error Rate"},{label:"P90 Latency",value:"P90 Latency"},{label:"P93 Latency",value:"P93 Latency"},{label:"P95 Latency",value:"P95 Latency"},{label:"P97 Latency",value:"P97 Latency"},{label:"P99 Latency",value:"P99 Latency"}],b=r=>{const s={memory_utilization:"30.1%",memory_usage:"168.57 MB",filesystem_usage:"15.8 GB",filesystem_utilization:"8.93%",resource:"Active",cpu:"26.53%"},a=["Internal Host 1289","MW Host 1","Mittal-vostro","Kaushal-vostro","kubernetes-host"];return Array.from({length:r},(c,n)=>({...s,host_id:`${a[n%a.length]}-${n}`,name:a[n%a.length],os:n%2===0?"windows":"linux"}))},p=b(12),h=[{title:"Host ID",columnKey:"host_id",fixed:!0,render:(r,s)=>e.jsx("span",{children:r}),tooltipInfo:"Host id",defaultSortOrder:g.Asc,align:x.Right,renderTooltipContent:"This is formatted content for tooltip"},{title:"Host Name",columnKey:"name",defaultSortOrder:g.Desc,align:x.Right},{title:"Operating System",columnKey:"os",tooltipInfo:"Operating system of your host",render:r=>e.jsxs("div",{style:{display:"flex",gap:"4px",alignItems:"center"},children:[e.jsx("span",{className:"os-icon",children:r==="windows"?e.jsx(_,{}):e.jsx(v,{})}),e.jsx("span",{children:r})]})},{title:"Memory Utilisation",columnKey:"memory_utilization",render:r=>e.jsx(e.Fragment,{children:e.jsx("span",{className:"progress",children:e.jsx(l,{progress:35})})})},{title:"Memory Usage",columnKey:"memory_usage",render:r=>e.jsxs("div",{className:"linear-progress-val",children:[e.jsx("span",{className:"label",children:r}),e.jsx(C,{maxValue:600,value:450})]})},{title:"Filesystem Usage",columnKey:"filesystem_usage",render:r=>{const s=typeof r=="string"?r:"";return e.jsx(P,{title:s,progressMaxValue:600,progressValue:450})}},{title:"Filesystem Utilisation",columnKey:"filesystem_utilization",render:r=>e.jsx(e.Fragment,{children:e.jsx("span",{className:"progress",children:e.jsx(l,{progress:70.2})})})},{title:"Resource State",columnKey:"resource",render:r=>{const s=typeof r=="string"?r:"";return e.jsx(y,{labelText:s,type:j.Success})}},{title:"CPU Utilisation",columnKey:"cpu",render:r=>e.jsx(e.Fragment,{children:e.jsx("span",{className:"progress",children:e.jsx(l,{progress:85.4})})})},{title:"",columnKey:w,render:()=>e.jsxs("div",{className:"actions-row",children:[e.jsx("div",{onClick:r=>{r.stopPropagation()},children:e.jsx(T,{})}),e.jsx("div",{onClick:r=>{r.stopPropagation()},children:e.jsx(I,{})})]})}],K=[{title:"Pod Name",columnKey:"pod_name",fixed:!0,render:(r,s)=>e.jsx("div",{children:r})},{title:"cluster",columnKey:"cluster",fixed:!0,render:(r,s)=>e.jsx("div",{children:r})},{title:"Namespace",columnKey:"namespace",fixed:!0,render:(r,s)=>e.jsx("div",{children:r})},{title:"Age",columnKey:"age",fixed:!0,render:(r,s)=>e.jsx("div",{children:r})},{title:"Restarts",columnKey:"restarts",fixed:!0,render:(r,s)=>e.jsx("div",{children:r})},{title:"CPU Usage Percent",columnKey:"cpu_usage_percent",fixed:!0,render:(r,s)=>e.jsx("div",{children:e.jsx(l,{progress:r})})},{title:"Memory Usage Percent",columnKey:"memory_usage_percent",fixed:!0,render:(r,s)=>e.jsx("div",{children:e.jsx(l,{progress:r})})},{title:"Node",columnKey:"node",fixed:!0,render:(r,s)=>e.jsx("div",{children:r})}],S=[{pod_group:"Example Pod Group 1",pod_group_col2:"",tags:["kfuse","metrics"],subTableData:[{pod_name:"Pod Name 1",cluster:"Cluster 1",namespace:"Namespace 1",age:"28 months",restarts:0,cpu_usage_percent:98.2,memory_usage_percent:12,node:"Node 1"}
1,{pod_name:"Pod Name 2",cluster:"Cluster 2",namespace:"Namespace 2",age:"28 months",restarts:0,cpu_usage_percent:98.2,memory_usage_percent:12,node:"Node 2"}]},{pod_group:"Example Pod Group 2",tags:["kfuse","metrics"],subTableData:[{pod_name:"Pod Name 1",cluster:"Cluster 1",namespace:"Namespace 1",age:"28 months",restarts:0,cpu_usage_percent:98.2,memory_usage_percent:12,node:"Node 1"},{pod_name:"Pod Name 2",cluster:"Cluster 2",namespace:"Namespace 2",age:"28 months",restarts:0,cpu_usage_percent:98.2,memory_usage_percent:12,node:"Node 2"}]}],Pe=()=>{const[r,s]=u.useState(1),[a,c]=u.useState(!1),n=t=>{s(t+1),c(!0);const o=setTimeout(()=>{c(!1),clearTimeout(o)},1e3)};return e.jsxs(e.Fragment,{children:[e.jsx("h6",{children:"Table View"}),e.jsx(d,{statsData:{filtered:26,total:60,label:"Hosts up of ",totalLabel:"total"},columnsSelection:m,onColumnsChange:t=>{console.log(t,"filters..")},actionElements:e.jsx(N,{children:"Add another action"}),children:e.jsx(i,{columns:h,dataProvider:b(r*10),loading:a,uniqId:"example-tableview",rowOnClick:(t,o)=>{console.log(t,"rowIndex",o)},onSelectRow:(t,o)=>console.log(t,o),onSortingChange:(t,o)=>{console.log(t,"name..",o,"type..")},onScroll:n,pagination:{totalRecords:120,page:r,recordsPerPage:10,onChange:(t,o)=>{console.log(t,o),s(t)},recordsLabel:"hosts"},maxHeight:400})}),e.jsx("h4",{children:"Expandable Table"}),e.jsx(d,{titleChild:e.jsxs("p",{children:[e.jsx("span",{className:"bg-green",children:"24"})," Hosts up of"," ",e.jsx("span",{className:"bg-grey",children:"60"})," total"]}),columnsSelection:m,onColumnsChange:t=>{console.log(t,"filters..")},children:e.jsx(i,{columns:h,dataProvider:p,loading:!1,uniqId:"example-tableview-2",maxHeight:400,rowOnClick:(t,o)=>{console.log(t,"rowIndex",o)},expandable:{expandedRowRender:t=>e.jsx("p",{style:{margin:0},children:t.os}),rowExpandable:t=>t.os!=="linux",defaultExpandedRowKeys:["row_2","row_3"]},onSortingChange:(t,o)=>{console.log(t,"name..",o,"type..")},expandOnRowClick:!0,pagination:{totalRecords:p.length,page:r,onChange:(t,o)=>{console.log(t,o),s(t)}}})}),e.jsx("h4",{children:"Expandable Table with Tags"}),e.jsx(d,{titleChild:e.jsxs("p",{children:[e.jsx("span",{className:"bg-green",children:"24"})," Hosts up of"," ",e.jsx("span",{className:"bg-grey",children:"60"})," total"]}),columnsSelection:m,onColumnsChange:t=>{console.log(t,"filters..")},hideSortInfo:!0,children:e.jsx(i,{onChangeExpandedRowKey:(t,o)=>console.log(t,o),columns:R,dataProvider:S,loading:!1,uniqId:"example-tableview-3",maxHeight:400,rowOnClick:(t,o)=>{console.log(t,"rowIndex",o)},expandOnRowClick:!0,showSingleExpandedRow:!0,expandable:{expandedRowRender:t=>e.jsx("div",{style:{border:"1px solid var(--color-neutrals-200)",borderRadius:"8px"},children:e.jsx(i,{columns:K,dataProvider:t.subTableData??[],loading:!1,uniqId:"example-tableview",maxHeight:400,rowOnClick:(o,f)=>{console.log(o,"rowIndex",f)}})})},onSortingChange:(t,o)=>{console.log(t,"name..",o,"type..")},pagination:{totalRecords:p.length,page:r,onChange:(t,o)=>{console.log(t,o),s(t)}}})})]})};export{Pe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.