small integration fixes to kafka client plugin
This commit is contained in:
@@ -15,11 +15,13 @@
|
||||
*/
|
||||
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { MissingAnnotationEmptyState } from '@backstage/core';
|
||||
import React from 'react';
|
||||
import { Route, Routes } from 'react-router';
|
||||
|
||||
import { rootCatalogKafkaRouteRef } from './plugin';
|
||||
import { KAFKA_CONSUMER_GROUP_ANNOTATION } from './constants';
|
||||
import { KafkaTopicsForConsumer } from './components/ConsumerGroupOffsets/ConsumerGroupOffsets';
|
||||
import { MissingAnnotationEmptyState } from '@backstage/core';
|
||||
|
||||
export const isPluginApplicableToEntity = (entity: Entity) =>
|
||||
Boolean(entity.metadata.annotations?.[KAFKA_CONSUMER_GROUP_ANNOTATION]);
|
||||
@@ -30,7 +32,7 @@ export const Router = ({ entity }: { entity: Entity }) => {
|
||||
) : (
|
||||
<Routes>
|
||||
<Route
|
||||
path={`/$(rootRouteRef.path)`}
|
||||
path={`${rootCatalogKafkaRouteRef.path}`}
|
||||
element={<KafkaTopicsForConsumer />}
|
||||
/>
|
||||
</Routes>
|
||||
|
||||
@@ -22,9 +22,9 @@ import {
|
||||
} from '@backstage/core';
|
||||
import { KafkaApi, kafkaApiRef } from './api/KafkaApi';
|
||||
|
||||
export const rootRouteRef = createRouteRef({
|
||||
path: '/kafka',
|
||||
title: 'kafka',
|
||||
export const rootCatalogKafkaRouteRef = createRouteRef({
|
||||
path: '*',
|
||||
title: 'Kafka',
|
||||
});
|
||||
|
||||
export const plugin = createPlugin({
|
||||
|
||||
Reference in New Issue
Block a user