1"use strict";(self.webpackChunkheadlamp_website=self.webpackChunkheadlamp_website||[]).push([[8703],{28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var r=n(96540);const i={},s=r.createContext(i);function a(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(s.Provider,{value:t},e.children)}},92205:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var r=n(74848),i=n(28453);const s={},a="Function: registerProjectDetailsTab()",c={id:"latest/development/api/plugin/registry/functions/registerProjectDetailsTab",title:"Function: registerProjectDetailsTab()",description:"Defined in1110",source:"@site/docs/latest/development/api/plugin/registry/functions/registerProjectDetailsTab.md",sourceDirName:"latest/development/api/plugin/registry/functions",slug:"/latest/development/api/plugin/registry/functions/registerProjectDetailsTab",permalink:"/docs/latest/development/api/plugin/registry/functions/registerProjectDetailsTab",draft:!1,unlisted:!1,editUrl:"https://github.com/kubernetes-sigs/headlamp/edit/main/docs/development/api/plugin/registry/functions/registerProjectDetailsTab.md",tags:[],version:"current",frontMatter:{},sidebar:"mainSidebar",previous:{title:"Function: registerProjectDeleteButton()",permalink:"/docs/latest/development/api/plugin/registry/functions/registerProjectDeleteButton"},next:{title:"Function: registerProjectHeaderAction()",permalink:"/docs/latest/development/api/plugin/registry/functions/registerProjectHeaderAction"}},o={},l=[{value:"Parameters",id:"parameters",level:2},{value:"Returns",id:"returns",level:2},{value:"Example",id:"example",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.h1,{id:"function-registerprojectdetailstab",children:"Function: registerProjectDetailsTab()"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-ts",children:"function registerProjectDetailsTab(projectDetailsTab: ProjectDetailsTab): void;\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Defined in: ",(0,r.jsx)(t.a,{href:"https://github.com/kubernetes-sigs/headlamp/blob/9cb8e9a311f736f645f4a06f251f59bddca3cf60/frontend/src/plugin/registry.tsx#L1110",children:"plugin/registry.tsx:1110"})]}),"\n",(0,r.jsx)(t.p,{children:"Register a new tab in the project details view."}),"\n",(0,r.jsx)(t.p,{children:"This allows plugins to add custom tabs to the project details page,\nextending the information displayed about a project."}),"\n",(0,r.jsx)(t.h2,{id:"parameters",children:"Parameters"}),"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Parameter"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"projectDetailsTab"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"ProjectDetailsTab"})}),(0,r.jsx)(t.td,{children:"The tab configuration to register"})]})})]}),"\n",(0,r.jsx)(t.h2,{id:"returns",children:"Returns"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.code,{children:"void"})}),"\n",(0,r.jsx)(t.h2,{id:"example",children:"Example"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-tsx",children:"registerProjectDetailsTab({\n id: 'custom-metrics',\n label: 'Metrics',\n component: ({ project }) => <ProjectMetrics project={project} />\n});\n"})})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}}}]);
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.