Skip to content

Commit b6a9d41

Browse files
authored
Merge pull request #129 from headlamp-k8s/add-link-to-all-plugins
plugin-catalog: Add link to all plugins from installed list
2 parents 1f0685b + ceb1789 commit b6a9d41

File tree

1 file changed

+46
-32
lines changed

1 file changed

+46
-32
lines changed

plugin-catalog/src/components/plugins/InstalledList.tsx

+46-32
Original file line numberDiff line numberDiff line change
@@ -22,41 +22,55 @@ export interface PurePluginInstalledListProps {
2222

2323
export function PurePluginInstalledList({ installedPlugins, error }: PurePluginInstalledListProps) {
2424
return (
25-
<SectionBox title="Installed" textAlign="center" paddingTop={2}>
25+
<SectionBox
26+
title="Installed"
27+
paddingTop={2}
28+
headerProps={{
29+
noPadding: false, headerStyle: 'subsection' ,
30+
actions: [
31+
<Link routeName="plugins">Go to all installed plugins</Link>,
32+
]
33+
}}
34+
>
2635
{error ? (
2736
<Typography>{`Error loading Installed plugins: ${error}`}</Typography>
2837
) : (
29-
<SimpleTable
30-
columns={[
31-
{
32-
label: 'Name',
33-
getter: plugin => (
34-
<Box>
35-
<Link
36-
routeName="/plugin-catalog/:repoName/:pluginName"
37-
params={{ repoName: plugin.repoName, pluginName: plugin.folderName }}
38-
>
39-
{plugin.pluginTitle}
40-
</Link>
41-
</Box>
42-
),
43-
},
44-
{
45-
label: 'Version',
46-
getter: plugin => plugin.pluginVersion,
47-
},
48-
{
49-
label: 'Repo',
50-
getter: plugin => plugin.repoName,
51-
},
52-
{
53-
label: 'Author',
54-
getter: plugin => plugin.author,
55-
},
56-
]}
57-
emptyMessage="No plugins installed"
58-
data={installedPlugins || []}
59-
/>
38+
<>
39+
<Typography component="h2">
40+
Plugins installed from the Plugin Catalog.
41+
</Typography>
42+
<SimpleTable
43+
columns={[
44+
{
45+
label: 'Name',
46+
getter: plugin => (
47+
<Box>
48+
<Link
49+
routeName="/plugin-catalog/:repoName/:pluginName"
50+
params={{ repoName: plugin.repoName, pluginName: plugin.folderName }}
51+
>
52+
{plugin.pluginTitle}
53+
</Link>
54+
</Box>
55+
),
56+
},
57+
{
58+
label: 'Version',
59+
getter: plugin => plugin.pluginVersion,
60+
},
61+
{
62+
label: 'Repo',
63+
getter: plugin => plugin.repoName,
64+
},
65+
{
66+
label: 'Author',
67+
getter: plugin => plugin.author,
68+
},
69+
]}
70+
emptyMessage="No plugins installed"
71+
data={installedPlugins || []}
72+
/>
73+
</>
6074
)}
6175
</SectionBox>
6276
);

0 commit comments

Comments
 (0)