mirror of https://github.com/buster-so/buster.git
fix: enable report navigation and display in collections
- Fix report route to use APP_REPORTS_ID instead of APP_REPORT_ID - Add report icon to CollectionIconRecord - Add report case to createAssetLink function for proper navigation
This commit is contained in:
parent
ff0828d75a
commit
d308b20c3e
|
@ -158,7 +158,8 @@ CollectionList.displayName = 'CollectionList';
|
||||||
|
|
||||||
const CollectionIconRecord: Record<string, React.ReactNode> = {
|
const CollectionIconRecord: Record<string, React.ReactNode> = {
|
||||||
dashboard: <ASSET_ICONS.dashboards />,
|
dashboard: <ASSET_ICONS.dashboards />,
|
||||||
metric: <ASSET_ICONS.metrics />
|
metric: <ASSET_ICONS.metrics />,
|
||||||
|
report: <ASSET_ICONS.reports />
|
||||||
};
|
};
|
||||||
|
|
||||||
const createAssetLink = (asset: BusterCollectionItemAsset, collectionId: string) => {
|
const createAssetLink = (asset: BusterCollectionItemAsset, collectionId: string) => {
|
||||||
|
@ -176,6 +177,13 @@ const createAssetLink = (asset: BusterCollectionItemAsset, collectionId: string)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (asset.asset_type === 'report') {
|
||||||
|
return createBusterRoute({
|
||||||
|
route: BusterRoutes.APP_REPORTS_ID,
|
||||||
|
reportId: asset.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (asset.asset_type === 'collection') {
|
if (asset.asset_type === 'collection') {
|
||||||
return createBusterRoute({
|
return createBusterRoute({
|
||||||
route: BusterRoutes.APP_COLLECTIONS
|
route: BusterRoutes.APP_COLLECTIONS
|
||||||
|
|
Loading…
Reference in New Issue