Procedure
-
Add the following to the
console-extensions.json
file:{ "type": "console.page/resource/tab", "properties": { "name": "Example Tab", "href": "example", "model": { "group": "core", "version": "v1", "kind": "Pod" }, "component": { "$codeRef": "ExampleTab" } }
-
Edit the
package.json
file to include the following changes:"exposedModules": { "ExamplePage": "./components/ExamplePage", "ExampleTab": "./components/ExampleTab" }
-
Write a message to display on a new custom tab on the Pods page by creating a new file
src/components/ExampleTab.tsx
and adding the following script:import * as React from 'react'; export default function ExampleTab() { return ( <p>This is a custom tab added to a resource using a dynamic plug-in.</p> ); }
Verification
-
Visit a Pod page to view the added tab.