fix: view component url use LowerCase
Signed-off-by: rui ma <ruima@alauda.io>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
---
|
||||
|
||||
Fixed an issue generating a wrong entity link at the end of the import process
|
||||
+7
-2
@@ -22,7 +22,7 @@ import { EntityListComponent } from '../EntityListComponent';
|
||||
import { PrepareResult } from '../useImportState';
|
||||
import { Link } from '@backstage/core-components';
|
||||
import partition from 'lodash/partition';
|
||||
import { CompoundEntityRef } from '@backstage/catalog-model';
|
||||
import { CompoundEntityRef, DEFAULT_NAMESPACE } from '@backstage/catalog-model';
|
||||
import { entityRouteRef } from '@backstage/plugin-catalog-react';
|
||||
import { useRouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
@@ -46,7 +46,12 @@ const filterComponentEntity = (
|
||||
entity.kind.toLocaleLowerCase('en-US'),
|
||||
)
|
||||
) {
|
||||
return entity;
|
||||
return {
|
||||
kind: entity.kind.toLocaleLowerCase('en-US'),
|
||||
namespace:
|
||||
entity.namespace?.toLocaleLowerCase('en-US') ?? DEFAULT_NAMESPACE,
|
||||
name: entity.name,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user