Skip to content

Commit

Permalink
test flyout
Browse files Browse the repository at this point in the history
  • Loading branch information
Javier Solana Huertas committed Jan 17, 2024
1 parent 4b9bdd6 commit da46274
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,34 @@ window?.extensionsAPI?.registerResourceExtension(component, '', 'Pod', 'Metrics1
window?.extensionsAPI?.registerResourceExtension(component, '*', 'Deployment', 'Metrics2', { icon: "fa fa-chart-area" });
window?.extensionsAPI?.registerResourceExtension(component, '*', 'Application', 'Metrics3', { icon: "fa fa-chart-area" });
window?.extensionsAPI?.registerResourceExtension(component, 'Application', 'Application', 'Metrics4', { icon: "fa fa-chart-area" });


const flyoutComponent = (props: {
openFlyout: () => any
}) => {
return React.createElement(
"div",
{
style: { padding: "10px" },
onClick: () => props.openFlyout()
},
"Hello World"
);
};
const flyout = () => {
return React.createElement(
"div",
{ style: { padding: "10px" } },
"This is a flyout"
);
};
window.extensionsAPI.registerStatusPanelExtension(
flyoutComponent,
"My Extension",
"my_extension",
flyout
);


})(window);

0 comments on commit da46274

Please sign in to comment.