import{h as i,k as a}from"./entry_page.js";import{d as u,E as p,a as m}from"./Dashboard.EnterpriseViewOnlyPreset.hOZR46Qg.js";import{w as d,h as _,g as l}from"./Dashboard.utils.0p-tEVNs.js";import"./Search.BNBTqs0I.js";import"./ErrorBoundary.xJor3Ppq.js";import"./ArrowBroadUnderbarDown.wq6id2ca.js";const x=({dashboardDefinition:o})=>(i.useEffect(()=>{d('[data-input-id="resource_tab_input"]',"#resource_tab_description_viz")},[]),i.useEffect(()=>{const r=t=>{const e=t.querySelector('[data-test="viz-waiting-for-input-message"]');e?.textContent==="No search results returned"&&(e.textContent="No results found. Resource consumption may not be supported for your operating system.")},n={childList:!0,subtree:!0},c=t=>{t.forEach(e=>{e.type==="childList"&&e.addedNodes.length>0&&e.target.dataset.test==="viz-size-wrapper"&&r(e.target)})},s=new MutationObserver(c);return _("#resource_tab_cpu_consumption_viz","#resource_tab_memory_consumption_viz",()=>{const t=document.querySelector("#resource_tab_cpu_consumption_viz"),e=document.querySelector("#resource_tab_memory_consumption_viz");t&&(r(t),s.observe(t,n)),e&&(r(e),s.observe(e,n))},400,4e3),()=>{s.disconnect()}},[o]),o?a.jsx(u.DashboardContextProvider,{preset:p,initialDefinition:o,children:a.jsx(m.DashboardCore,{width:"100%",height:"auto",actionMenus:l("error")})}):null);export{x as ResourceDashboard,x as default};
