catalog-client: change entities interface, add fields support (#3296)
This commit is contained in:
@@ -52,7 +52,7 @@ describe('RollbarHome component', () => {
|
||||
catalogApiRef,
|
||||
({
|
||||
async getEntities() {
|
||||
return [];
|
||||
return { items: [] };
|
||||
},
|
||||
} as Partial<CatalogApi>) as CatalogApi,
|
||||
],
|
||||
|
||||
@@ -28,8 +28,8 @@ export function useRollbarEntities() {
|
||||
configApi.getString('organization.name');
|
||||
|
||||
const { value, loading, error } = useAsync(async () => {
|
||||
const entities = await catalogApi.getEntities();
|
||||
return entities.filter(entity => {
|
||||
const response = await catalogApi.getEntities();
|
||||
return response.items.filter(entity => {
|
||||
return !!entity.metadata.annotations?.[ROLLBAR_ANNOTATION];
|
||||
});
|
||||
}, [catalogApi]);
|
||||
|
||||
Reference in New Issue
Block a user