Skip to content

Commit

Permalink
Merge pull request #129 from headlamp-k8s/add-link-to-all-plugins
Browse files Browse the repository at this point in the history
plugin-catalog: Add link to all plugins from installed list
  • Loading branch information
joaquimrocha authored Dec 12, 2024
2 parents 1f0685b + ceb1789 commit b6a9d41
Showing 1 changed file with 46 additions and 32 deletions.
78 changes: 46 additions & 32 deletions plugin-catalog/src/components/plugins/InstalledList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,41 +22,55 @@ export interface PurePluginInstalledListProps {

export function PurePluginInstalledList({ installedPlugins, error }: PurePluginInstalledListProps) {
return (
<SectionBox title="Installed" textAlign="center" paddingTop={2}>
<SectionBox
title="Installed"
paddingTop={2}
headerProps={{
noPadding: false, headerStyle: 'subsection' ,
actions: [
<Link routeName="plugins">Go to all installed plugins</Link>,
]
}}
>
{error ? (
<Typography>{`Error loading Installed plugins: ${error}`}</Typography>
) : (
<SimpleTable
columns={[
{
label: 'Name',
getter: plugin => (
<Box>
<Link
routeName="/plugin-catalog/:repoName/:pluginName"
params={{ repoName: plugin.repoName, pluginName: plugin.folderName }}
>
{plugin.pluginTitle}
</Link>
</Box>
),
},
{
label: 'Version',
getter: plugin => plugin.pluginVersion,
},
{
label: 'Repo',
getter: plugin => plugin.repoName,
},
{
label: 'Author',
getter: plugin => plugin.author,
},
]}
emptyMessage="No plugins installed"
data={installedPlugins || []}
/>
<>
<Typography component="h2">
Plugins installed from the Plugin Catalog.
</Typography>
<SimpleTable
columns={[
{
label: 'Name',
getter: plugin => (
<Box>
<Link
routeName="/plugin-catalog/:repoName/:pluginName"
params={{ repoName: plugin.repoName, pluginName: plugin.folderName }}
>
{plugin.pluginTitle}
</Link>
</Box>
),
},
{
label: 'Version',
getter: plugin => plugin.pluginVersion,
},
{
label: 'Repo',
getter: plugin => plugin.repoName,
},
{
label: 'Author',
getter: plugin => plugin.author,
},
]}
emptyMessage="No plugins installed"
data={installedPlugins || []}
/>
</>
)}
</SectionBox>
);
Expand Down

0 comments on commit b6a9d41

Please sign in to comment.