fix show when empty

This commit is contained in:
Will Browne
2024-10-25 11:58:19 +01:00
parent 30696c0966
commit c9ff568c91
2 changed files with 6 additions and 1 deletions
@@ -93,7 +93,7 @@ export function PluginDetailsRightPanel(props: Props): React.ReactElement | null
</Stack>
)}
{pluginDependants && (
{pluginDependants && pluginDependants.length > 0 && (
<Stack direction="column" gap={1}>
<Text color="secondary">
<Trans i18nKey={'plugins.details.labels.pluginDependants'}>Required by: </Trans>
@@ -157,6 +157,7 @@ export function mapRemoteToCatalog(plugin: RemotePlugin, error?: PluginError): C
pluginDependencies: plugin.json?.dependencies?.plugins || [],
dependantPlugins: dependantPlugins(id),
links: plugin.json?.info.links || [],
grafanaDependency: plugin.json?.dependencies?.grafanaDependency,
},
};
}
@@ -212,6 +213,8 @@ export function mapLocalToCatalog(plugin: LocalPlugin, error?: PluginError): Cat
pluginDependencies: plugin.dependencies?.plugins || [],
dependantPlugins: dependantPlugins(id),
links: plugin.info.links || [],
grafanaDependency: plugin.dependencies?.grafanaDependency,
versions: [],
},
};
}
@@ -280,6 +283,8 @@ export function mapToCatalogPlugin(local?: LocalPlugin, remote?: RemotePlugin, e
pluginDependencies: local?.dependencies?.plugins || remote?.json?.dependencies?.plugins || [],
dependantPlugins: dependantPlugins(id),
links: local?.info.links || remote?.json?.info.links || [],
grafanaDependency: local?.dependencies?.grafanaDependency || remote?.json?.dependencies?.grafanaDependency || '',
versions: [],
},
};
}