well, let's clean up some more
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -9,26 +9,18 @@ import { BackstagePlugin } from '@backstage/core-plugin-api';
|
||||
import { Entity } from '@backstage/catalog-model';
|
||||
import { RouteRef } from '@backstage/core-plugin-api';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "EntityKafkaContent" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const EntityKafkaContent: (_props: {}) => JSX.Element;
|
||||
export const EntityKafkaContent: () => JSX.Element;
|
||||
|
||||
// Warning: (ae-missing-release-tag) "isPluginApplicableToEntity" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
const isPluginApplicableToEntity: (entity: Entity) => boolean;
|
||||
export { isPluginApplicableToEntity as isKafkaAvailable };
|
||||
export { isPluginApplicableToEntity };
|
||||
|
||||
// Warning: (ae-missing-release-tag) "KAFKA_CONSUMER_GROUP_ANNOTATION" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const KAFKA_CONSUMER_GROUP_ANNOTATION =
|
||||
'kafka.apache.org/consumer-groups';
|
||||
|
||||
// Warning: (ae-missing-release-tag) "kafkaPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
const kafkaPlugin: BackstagePlugin<
|
||||
{
|
||||
@@ -40,9 +32,6 @@ const kafkaPlugin: BackstagePlugin<
|
||||
export { kafkaPlugin };
|
||||
export { kafkaPlugin as plugin };
|
||||
|
||||
// Warning: (ae-forgotten-export) The symbol "Props" needs to be exported by the entry point index.d.ts
|
||||
// Warning: (ae-missing-release-tag) "Router" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
|
||||
//
|
||||
// @public (undocumented)
|
||||
export const Router: (_props: Props) => JSX.Element;
|
||||
export const Router: () => JSX.Element;
|
||||
```
|
||||
|
||||
@@ -22,12 +22,12 @@ import { KAFKA_CONSUMER_GROUP_ANNOTATION } from './constants';
|
||||
import { KafkaTopicsForConsumer } from './components/ConsumerGroupOffsets/ConsumerGroupOffsets';
|
||||
import { MissingAnnotationEmptyState } from '@backstage/core-components';
|
||||
|
||||
/** @public */
|
||||
export const isPluginApplicableToEntity = (entity: Entity) =>
|
||||
Boolean(entity.metadata.annotations?.[KAFKA_CONSUMER_GROUP_ANNOTATION]);
|
||||
|
||||
type Props = {};
|
||||
|
||||
export const Router = (_props: Props) => {
|
||||
/** @public */
|
||||
export const Router = () => {
|
||||
const { entity } = useEntity();
|
||||
|
||||
if (!isPluginApplicableToEntity(entity)) {
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/** @public */
|
||||
export const KAFKA_CONSUMER_GROUP_ANNOTATION =
|
||||
'kafka.apache.org/consumer-groups';
|
||||
|
||||
export const KAFKA_DASHBOARD_URL = 'kafka.apache.org/dashboard-urls';
|
||||
|
||||
@@ -26,10 +26,12 @@ import {
|
||||
} from '@backstage/core-plugin-api';
|
||||
import { KafkaDashboardClient } from './api/KafkaDashboardClient';
|
||||
|
||||
/** @public */
|
||||
export const rootCatalogKafkaRouteRef = createRouteRef({
|
||||
id: 'kafka',
|
||||
});
|
||||
|
||||
/** @public */
|
||||
export const kafkaPlugin = createPlugin({
|
||||
id: 'kafka',
|
||||
apis: [
|
||||
@@ -50,6 +52,7 @@ export const kafkaPlugin = createPlugin({
|
||||
},
|
||||
});
|
||||
|
||||
/** @public */
|
||||
export const EntityKafkaContent = kafkaPlugin.provide(
|
||||
createRoutableExtension({
|
||||
name: 'EntityKafkaContent',
|
||||
|
||||
Reference in New Issue
Block a user