@backstage-community/plugin-kafka 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @backstage-community/plugin-kafka
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - d4e81be: Backstage version bump to v1.49.2
8
+
3
9
  ## 0.11.0
4
10
 
5
11
  ### Minor Changes
@@ -1 +1 @@
1
- {"version":3,"file":"Router.esm.js","sources":["../src/Router.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { Route, Routes } from 'react-router-dom';\nimport {\n useEntity,\n MissingAnnotationEmptyState,\n} from '@backstage/plugin-catalog-react';\nimport { KAFKA_CONSUMER_GROUP_ANNOTATION } from './constants';\nimport { KafkaTopicsForConsumer } from './components/ConsumerGroupOffsets/ConsumerGroupOffsets';\n\n/** @public */\nexport const isPluginApplicableToEntity = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[KAFKA_CONSUMER_GROUP_ANNOTATION]);\n\n/** @public */\nexport const Router = () => {\n const { entity } = useEntity();\n\n if (!isPluginApplicableToEntity(entity)) {\n return (\n <MissingAnnotationEmptyState\n annotation={KAFKA_CONSUMER_GROUP_ANNOTATION}\n />\n );\n }\n\n return (\n <Routes>\n <Route path=\"/\" element={<KafkaTopicsForConsumer />} />\n </Routes>\n );\n};\n"],"names":[],"mappings":";;;;;;AA0Ba,MAAA,0BAAA,GAA6B,CAAC,MACzC,KAAA,OAAA,CAAQ,OAAO,QAAS,CAAA,WAAA,GAAc,+BAA+B,CAAC;AAGjE,MAAM,SAAS,MAAM;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAE7B,EAAI,IAAA,CAAC,0BAA2B,CAAA,MAAM,CAAG,EAAA;AACvC,IACE,uBAAA,GAAA;AAAA,MAAC,2BAAA;AAAA,MAAA;AAAA,QACC,UAAY,EAAA;AAAA;AAAA,KACd;AAAA;AAIJ,EACE,uBAAA,GAAA,CAAC,MACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,KAAM,EAAA,EAAA,IAAA,EAAK,KAAI,OAAS,kBAAA,GAAA,CAAC,sBAAuB,EAAA,EAAA,CAAA,EAAI,CACvD,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"Router.esm.js","sources":["../src/Router.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { Entity } from '@backstage/catalog-model';\nimport { Route, Routes } from 'react-router-dom';\nimport {\n useEntity,\n MissingAnnotationEmptyState,\n} from '@backstage/plugin-catalog-react';\nimport { KAFKA_CONSUMER_GROUP_ANNOTATION } from './constants';\nimport { KafkaTopicsForConsumer } from './components/ConsumerGroupOffsets/ConsumerGroupOffsets';\n\n/** @public */\nexport const isPluginApplicableToEntity = (entity: Entity) =>\n Boolean(entity.metadata.annotations?.[KAFKA_CONSUMER_GROUP_ANNOTATION]);\n\n/** @public */\nexport const Router = () => {\n const { entity } = useEntity();\n\n if (!isPluginApplicableToEntity(entity)) {\n return (\n <MissingAnnotationEmptyState\n annotation={KAFKA_CONSUMER_GROUP_ANNOTATION}\n />\n );\n }\n\n return (\n <Routes>\n <Route path=\"/\" element={<KafkaTopicsForConsumer />} />\n </Routes>\n );\n};\n"],"names":[],"mappings":";;;;;;AA0BO,MAAM,0BAAA,GAA6B,CAAC,MAAA,KACzC,OAAA,CAAQ,OAAO,QAAA,CAAS,WAAA,GAAc,+BAA+B,CAAC;AAGjE,MAAM,SAAS,MAAM;AAC1B,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAE7B,EAAA,IAAI,CAAC,0BAAA,CAA2B,MAAM,CAAA,EAAG;AACvC,IAAA,uBACE,GAAA;AAAA,MAAC,2BAAA;AAAA,MAAA;AAAA,QACC,UAAA,EAAY;AAAA;AAAA,KACd;AAAA,EAEJ;AAEA,EAAA,uBACE,GAAA,CAAC,MAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,IAAA,EAAK,KAAI,OAAA,kBAAS,GAAA,CAAC,sBAAA,EAAA,EAAuB,CAAA,EAAI,CAAA,EACvD,CAAA;AAEJ;;;;"}
@@ -1,4 +1,4 @@
1
- import { ApiBlueprint, discoveryApiRef, identityApiRef, configApiRef } from '@backstage/frontend-plugin-api';
1
+ import { ApiBlueprint, identityApiRef, discoveryApiRef, configApiRef } from '@backstage/frontend-plugin-api';
2
2
  import { kafkaApiRef, kafkaDashboardApiRef } from '../api/types.esm.js';
3
3
  import { KafkaBackendClient } from '../api/KafkaBackendClient.esm.js';
4
4
  import { KafkaDashboardClient } from '../api/KafkaDashboardClient.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"apis.esm.js","sources":["../../src/alpha/apis.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ApiBlueprint,\n configApiRef,\n discoveryApiRef,\n identityApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { kafkaApiRef, kafkaDashboardApiRef } from '../api/types';\nimport { KafkaBackendClient } from '../api/KafkaBackendClient';\nimport { KafkaDashboardClient } from '../api/KafkaDashboardClient';\n\n/**\n * @alpha\n */\nexport const kafkaApi = ApiBlueprint.make({\n params: definedParams =>\n definedParams({\n api: kafkaApiRef,\n deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef },\n factory: ({ discoveryApi, identityApi }) =>\n new KafkaBackendClient({ discoveryApi, identityApi }),\n }),\n});\n\n/**\n * @alpha\n */\nexport const kafkaDashboardApi = ApiBlueprint.make({\n name: 'dashboard',\n params: definedParams =>\n definedParams({\n api: kafkaDashboardApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => new KafkaDashboardClient({ configApi }),\n }),\n});\n"],"names":[],"mappings":";;;;;AA6Ba,MAAA,QAAA,GAAW,aAAa,IAAK,CAAA;AAAA,EACxC,MAAA,EAAQ,mBACN,aAAc,CAAA;AAAA,IACZ,GAAK,EAAA,WAAA;AAAA,IACL,IAAM,EAAA,EAAE,YAAc,EAAA,eAAA,EAAiB,aAAa,cAAe,EAAA;AAAA,IACnE,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,WAAA,EACxB,KAAA,IAAI,kBAAmB,CAAA,EAAE,YAAc,EAAA,WAAA,EAAa;AAAA,GACvD;AACL,CAAC;AAKY,MAAA,iBAAA,GAAoB,aAAa,IAAK,CAAA;AAAA,EACjD,IAAM,EAAA,WAAA;AAAA,EACN,MAAA,EAAQ,mBACN,aAAc,CAAA;AAAA,IACZ,GAAK,EAAA,oBAAA;AAAA,IACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,IAChC,OAAA,EAAS,CAAC,EAAE,SAAA,OAAgB,IAAI,oBAAA,CAAqB,EAAE,SAAA,EAAW;AAAA,GACnE;AACL,CAAC;;;;"}
1
+ {"version":3,"file":"apis.esm.js","sources":["../../src/alpha/apis.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n ApiBlueprint,\n configApiRef,\n discoveryApiRef,\n identityApiRef,\n} from '@backstage/frontend-plugin-api';\nimport { kafkaApiRef, kafkaDashboardApiRef } from '../api/types';\nimport { KafkaBackendClient } from '../api/KafkaBackendClient';\nimport { KafkaDashboardClient } from '../api/KafkaDashboardClient';\n\n/**\n * @alpha\n */\nexport const kafkaApi = ApiBlueprint.make({\n params: definedParams =>\n definedParams({\n api: kafkaApiRef,\n deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef },\n factory: ({ discoveryApi, identityApi }) =>\n new KafkaBackendClient({ discoveryApi, identityApi }),\n }),\n});\n\n/**\n * @alpha\n */\nexport const kafkaDashboardApi = ApiBlueprint.make({\n name: 'dashboard',\n params: definedParams =>\n definedParams({\n api: kafkaDashboardApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => new KafkaDashboardClient({ configApi }),\n }),\n});\n"],"names":[],"mappings":";;;;;AA6BO,MAAM,QAAA,GAAW,aAAa,IAAA,CAAK;AAAA,EACxC,MAAA,EAAQ,mBACN,aAAA,CAAc;AAAA,IACZ,GAAA,EAAK,WAAA;AAAA,IACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,aAAa,cAAA,EAAe;AAAA,IACnE,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,WAAA,EAAY,KACpC,IAAI,kBAAA,CAAmB,EAAE,YAAA,EAAc,WAAA,EAAa;AAAA,GACvD;AACL,CAAC;AAKM,MAAM,iBAAA,GAAoB,aAAa,IAAA,CAAK;AAAA,EACjD,IAAA,EAAM,WAAA;AAAA,EACN,MAAA,EAAQ,mBACN,aAAA,CAAc;AAAA,IACZ,GAAA,EAAK,oBAAA;AAAA,IACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAA,EAAa;AAAA,IAChC,OAAA,EAAS,CAAC,EAAE,SAAA,OAAgB,IAAI,oBAAA,CAAqB,EAAE,SAAA,EAAW;AAAA,GACnE;AACL,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { convertLegacyRouteRef, compatWrapper } from '@backstage/core-compat-api';
2
+ import { compatWrapper, convertLegacyRouteRef } from '@backstage/core-compat-api';
3
3
  import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
4
4
  import { rootCatalogKafkaRouteRef } from '../plugin.esm.js';
5
5
  import { KAFKA_CONSUMER_GROUP_ANNOTATION } from '../constants.esm.js';
@@ -1 +1 @@
1
- {"version":3,"file":"entityContents.esm.js","sources":["../../src/alpha/entityContents.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { rootCatalogKafkaRouteRef } from '../plugin';\nimport { KAFKA_CONSUMER_GROUP_ANNOTATION } from '../constants';\n\n/**\n * @alpha\n */\nexport const kafkaEntityContent = EntityContentBlueprint.make({\n params: {\n path: '/kafka',\n title: 'Kafka',\n routeRef: convertLegacyRouteRef(rootCatalogKafkaRouteRef),\n filter: {\n [`metadata.annotations.${KAFKA_CONSUMER_GROUP_ANNOTATION}`]: {\n $exists: true,\n },\n },\n loader: async () =>\n import('../Router').then(m => compatWrapper(<m.Router />)),\n },\n});\n"],"names":[],"mappings":";;;;;;AA2Ba,MAAA,kBAAA,GAAqB,uBAAuB,IAAK,CAAA;AAAA,EAC5D,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA,QAAA;AAAA,IACN,KAAO,EAAA,OAAA;AAAA,IACP,QAAA,EAAU,sBAAsB,wBAAwB,CAAA;AAAA,IACxD,MAAQ,EAAA;AAAA,MACN,CAAC,CAAA,qBAAA,EAAwB,+BAA+B,CAAA,CAAE,GAAG;AAAA,QAC3D,OAAS,EAAA;AAAA;AACX,KACF;AAAA,IACA,MAAQ,EAAA,YACN,OAAO,kBAAW,CAAE,CAAA,IAAA,CAAK,CAAK,CAAA,KAAA,aAAA,iBAAe,GAAA,CAAA,CAAA,CAAE,MAAF,EAAA,EAAS,CAAE,CAAC;AAAA;AAE/D,CAAC;;;;"}
1
+ {"version":3,"file":"entityContents.esm.js","sources":["../../src/alpha/entityContents.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n compatWrapper,\n convertLegacyRouteRef,\n} from '@backstage/core-compat-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { rootCatalogKafkaRouteRef } from '../plugin';\nimport { KAFKA_CONSUMER_GROUP_ANNOTATION } from '../constants';\n\n/**\n * @alpha\n */\nexport const kafkaEntityContent = EntityContentBlueprint.make({\n params: {\n path: '/kafka',\n title: 'Kafka',\n routeRef: convertLegacyRouteRef(rootCatalogKafkaRouteRef),\n filter: {\n [`metadata.annotations.${KAFKA_CONSUMER_GROUP_ANNOTATION}`]: {\n $exists: true,\n },\n },\n loader: async () =>\n import('../Router').then(m => compatWrapper(<m.Router />)),\n },\n});\n"],"names":[],"mappings":";;;;;;AA2BO,MAAM,kBAAA,GAAqB,uBAAuB,IAAA,CAAK;AAAA,EAC5D,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,QAAA;AAAA,IACN,KAAA,EAAO,OAAA;AAAA,IACP,QAAA,EAAU,sBAAsB,wBAAwB,CAAA;AAAA,IACxD,MAAA,EAAQ;AAAA,MACN,CAAC,CAAA,qBAAA,EAAwB,+BAA+B,CAAA,CAAE,GAAG;AAAA,QAC3D,OAAA,EAAS;AAAA;AACX,KACF;AAAA,IACA,MAAA,EAAQ,YACN,OAAO,kBAAW,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,KAAK,aAAA,iBAAc,GAAA,CAAC,CAAA,CAAE,MAAA,EAAF,EAAS,CAAE,CAAC;AAAA;AAE/D,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertLegacyRouteRefs } from '@backstage/core-compat-api';\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { rootCatalogKafkaRouteRef } from '../plugin';\nimport { kafkaApi, kafkaDashboardApi } from './apis';\nimport { kafkaEntityContent } from './entityContents';\n\n/**\n * @alpha\n */\nexport const kafkaPlugin = createFrontendPlugin({\n pluginId: 'kafka',\n info: { packageJson: () => import('../../package.json') },\n extensions: [kafkaApi, kafkaDashboardApi, kafkaEntityContent],\n routes: convertLegacyRouteRefs({\n entityContent: rootCatalogKafkaRouteRef,\n }),\n});\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,cAAc,oBAAqB,CAAA;AAAA,EAC9C,QAAU,EAAA,OAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,wBAAoB,CAAE,EAAA;AAAA,EACxD,UAAY,EAAA,CAAC,QAAU,EAAA,iBAAA,EAAmB,kBAAkB,CAAA;AAAA,EAC5D,QAAQ,sBAAuB,CAAA;AAAA,IAC7B,aAAe,EAAA;AAAA,GAChB;AACH,CAAC;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.ts"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { convertLegacyRouteRefs } from '@backstage/core-compat-api';\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { rootCatalogKafkaRouteRef } from '../plugin';\nimport { kafkaApi, kafkaDashboardApi } from './apis';\nimport { kafkaEntityContent } from './entityContents';\n\n/**\n * @alpha\n */\nexport const kafkaPlugin = createFrontendPlugin({\n pluginId: 'kafka',\n info: { packageJson: () => import('../../package.json') },\n extensions: [kafkaApi, kafkaDashboardApi, kafkaEntityContent],\n routes: convertLegacyRouteRefs({\n entityContent: rootCatalogKafkaRouteRef,\n }),\n});\n"],"names":[],"mappings":";;;;;;AAyBO,MAAM,cAAc,oBAAA,CAAqB;AAAA,EAC9C,QAAA,EAAU,OAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,wBAAoB,CAAA,EAAE;AAAA,EACxD,UAAA,EAAY,CAAC,QAAA,EAAU,iBAAA,EAAmB,kBAAkB,CAAA;AAAA,EAC5D,QAAQ,sBAAA,CAAuB;AAAA,IAC7B,aAAA,EAAe;AAAA,GAChB;AACH,CAAC;;;;"}
package/dist/alpha.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- /// <reference types="react" />
2
1
  import * as _backstage_catalog_model from '@backstage/catalog-model';
3
2
  import * as react from 'react';
4
- import * as _backstage_plugin_catalog_react_alpha from '@backstage/plugin-catalog-react/alpha';
3
+ import * as _backstage_filter_predicates from '@backstage/filter-predicates';
5
4
  import * as _backstage_frontend_plugin_api from '@backstage/frontend-plugin-api';
6
5
 
7
6
  /**
@@ -17,9 +16,7 @@ declare const kafkaPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlu
17
16
  configInput: {};
18
17
  output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
19
18
  inputs: {};
20
- params: <TApi, TImpl extends TApi, TDeps extends {
21
- [x: string]: unknown;
22
- }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
19
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
23
20
  }>;
24
21
  "api:kafka/dashboard": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
25
22
  kind: "api";
@@ -28,9 +25,7 @@ declare const kafkaPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlu
28
25
  configInput: {};
29
26
  output: _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.AnyApiFactory, "core.api.factory", {}>;
30
27
  inputs: {};
31
- params: <TApi, TImpl extends TApi, TDeps extends {
32
- [x: string]: unknown;
33
- }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
28
+ params: <TApi, TImpl extends TApi, TDeps extends { [name in string]: unknown; }>(params: _backstage_frontend_plugin_api.ApiFactory<TApi, TImpl, TDeps>) => _backstage_frontend_plugin_api.ExtensionBlueprintParams<_backstage_frontend_plugin_api.AnyApiFactory>;
34
29
  }>;
35
30
  "entity-content:kafka": _backstage_frontend_plugin_api.OverridableExtensionDefinition<{
36
31
  kind: "entity-content";
@@ -38,14 +33,16 @@ declare const kafkaPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlu
38
33
  config: {
39
34
  path: string | undefined;
40
35
  title: string | undefined;
41
- filter: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
36
+ filter: _backstage_filter_predicates.FilterPredicate | undefined;
42
37
  group: string | false | undefined;
38
+ icon: string | undefined;
43
39
  };
44
40
  configInput: {
45
- filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | undefined;
46
- title?: string | undefined;
47
41
  path?: string | undefined;
42
+ title?: string | undefined;
43
+ filter?: _backstage_filter_predicates.FilterPredicate | undefined;
48
44
  group?: string | false | undefined;
45
+ icon?: string | undefined;
49
46
  };
50
47
  output: _backstage_frontend_plugin_api.ExtensionDataRef<react.JSX.Element, "core.reactElement", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "core.routing.path", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<_backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams>, "core.routing.ref", {
51
48
  optional: true;
@@ -55,18 +52,21 @@ declare const kafkaPlugin: _backstage_frontend_plugin_api.OverridableFrontendPlu
55
52
  optional: true;
56
53
  }> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-title", {}> | _backstage_frontend_plugin_api.ExtensionDataRef<string, "catalog.entity-content-group", {
57
54
  optional: true;
55
+ }> | _backstage_frontend_plugin_api.ExtensionDataRef<string | react.ReactElement<any, string | react.JSXElementConstructor<any>>, "catalog.entity-content-icon", {
56
+ optional: true;
58
57
  }>;
59
58
  inputs: {};
60
59
  params: {
61
- defaultPath?: [Error: "Use the 'path' param instead"] | undefined;
60
+ defaultPath?: [Error: `Use the 'path' param instead`];
62
61
  path: string;
63
- defaultTitle?: [Error: "Use the 'title' param instead"] | undefined;
62
+ defaultTitle?: [Error: `Use the 'title' param instead`];
64
63
  title: string;
65
- defaultGroup?: [Error: "Use the 'group' param instead"] | undefined;
66
- group?: (string & {}) | "development" | "deployment" | "overview" | "documentation" | "operation" | "observability" | undefined;
64
+ defaultGroup?: [Error: `Use the 'group' param instead`];
65
+ group?: ("development" | "deployment" | "overview" | "documentation" | "operation" | "observability") | (string & {});
66
+ icon?: string | react.ReactElement;
67
67
  loader: () => Promise<JSX.Element>;
68
- routeRef?: _backstage_frontend_plugin_api.RouteRef<_backstage_frontend_plugin_api.AnyRouteRefParams> | undefined;
69
- filter?: _backstage_plugin_catalog_react_alpha.EntityPredicate | ((entity: _backstage_catalog_model.Entity) => boolean) | undefined;
68
+ routeRef?: _backstage_frontend_plugin_api.RouteRef;
69
+ filter?: string | _backstage_filter_predicates.FilterPredicate | ((entity: _backstage_catalog_model.Entity) => boolean);
70
70
  };
71
71
  }>;
72
72
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"KafkaBackendClient.esm.js","sources":["../../src/api/KafkaBackendClient.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { KafkaApi, ConsumerGroupOffsetsResponse } from './types';\nimport { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';\n\nexport class KafkaBackendClient implements KafkaApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly identityApi: IdentityApi;\n\n constructor(options: {\n discoveryApi: DiscoveryApi;\n identityApi: IdentityApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.identityApi = options.identityApi;\n }\n\n private async internalGet(path: string): Promise<any> {\n const url = `${await this.discoveryApi.getBaseUrl('kafka')}${path}`;\n const { token: idToken } = await this.identityApi.getCredentials();\n const response = await fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...(idToken && { Authorization: `Bearer ${idToken}` }),\n },\n });\n\n if (!response.ok) {\n const payload = await response.text();\n const message = `Request failed with ${response.status} ${response.statusText}, ${payload}`;\n throw new Error(message);\n }\n\n return await response.json();\n }\n\n async getConsumerGroupOffsets(\n clusterId: string,\n consumerGroup: string,\n ): Promise<ConsumerGroupOffsetsResponse> {\n return await this.internalGet(\n `/consumers/${clusterId}/${consumerGroup}/offsets`,\n );\n }\n}\n"],"names":[],"mappings":"AAmBO,MAAM,kBAAuC,CAAA;AAAA,EACjC,YAAA;AAAA,EACA,WAAA;AAAA,EAEjB,YAAY,OAGT,EAAA;AACD,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA;AAC5B,IAAA,IAAA,CAAK,cAAc,OAAQ,CAAA,WAAA;AAAA;AAC7B,EAEA,MAAc,YAAY,IAA4B,EAAA;AACpD,IAAM,MAAA,GAAA,GAAM,GAAG,MAAM,IAAA,CAAK,aAAa,UAAW,CAAA,OAAO,CAAC,CAAA,EAAG,IAAI,CAAA,CAAA;AACjE,IAAA,MAAM,EAAE,KAAO,EAAA,OAAA,KAAY,MAAM,IAAA,CAAK,YAAY,cAAe,EAAA;AACjE,IAAM,MAAA,QAAA,GAAW,MAAM,KAAA,CAAM,GAAK,EAAA;AAAA,MAChC,MAAQ,EAAA,KAAA;AAAA,MACR,OAAS,EAAA;AAAA,QACP,cAAgB,EAAA,kBAAA;AAAA,QAChB,GAAI,OAAW,IAAA,EAAE,aAAe,EAAA,CAAA,OAAA,EAAU,OAAO,CAAG,CAAA;AAAA;AACtD,KACD,CAAA;AAED,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAM,MAAA,OAAA,GAAU,MAAM,QAAA,CAAS,IAAK,EAAA;AACpC,MAAM,MAAA,OAAA,GAAU,uBAAuB,QAAS,CAAA,MAAM,IAAI,QAAS,CAAA,UAAU,KAAK,OAAO,CAAA,CAAA;AACzF,MAAM,MAAA,IAAI,MAAM,OAAO,CAAA;AAAA;AAGzB,IAAO,OAAA,MAAM,SAAS,IAAK,EAAA;AAAA;AAC7B,EAEA,MAAM,uBACJ,CAAA,SAAA,EACA,aACuC,EAAA;AACvC,IAAA,OAAO,MAAM,IAAK,CAAA,WAAA;AAAA,MAChB,CAAA,WAAA,EAAc,SAAS,CAAA,CAAA,EAAI,aAAa,CAAA,QAAA;AAAA,KAC1C;AAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"KafkaBackendClient.esm.js","sources":["../../src/api/KafkaBackendClient.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { KafkaApi, ConsumerGroupOffsetsResponse } from './types';\nimport { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';\n\nexport class KafkaBackendClient implements KafkaApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly identityApi: IdentityApi;\n\n constructor(options: {\n discoveryApi: DiscoveryApi;\n identityApi: IdentityApi;\n }) {\n this.discoveryApi = options.discoveryApi;\n this.identityApi = options.identityApi;\n }\n\n private async internalGet(path: string): Promise<any> {\n const url = `${await this.discoveryApi.getBaseUrl('kafka')}${path}`;\n const { token: idToken } = await this.identityApi.getCredentials();\n const response = await fetch(url, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n ...(idToken && { Authorization: `Bearer ${idToken}` }),\n },\n });\n\n if (!response.ok) {\n const payload = await response.text();\n const message = `Request failed with ${response.status} ${response.statusText}, ${payload}`;\n throw new Error(message);\n }\n\n return await response.json();\n }\n\n async getConsumerGroupOffsets(\n clusterId: string,\n consumerGroup: string,\n ): Promise<ConsumerGroupOffsetsResponse> {\n return await this.internalGet(\n `/consumers/${clusterId}/${consumerGroup}/offsets`,\n );\n }\n}\n"],"names":[],"mappings":"AAmBO,MAAM,kBAAA,CAAuC;AAAA,EACjC,YAAA;AAAA,EACA,WAAA;AAAA,EAEjB,YAAY,OAAA,EAGT;AACD,IAAA,IAAA,CAAK,eAAe,OAAA,CAAQ,YAAA;AAC5B,IAAA,IAAA,CAAK,cAAc,OAAA,CAAQ,WAAA;AAAA,EAC7B;AAAA,EAEA,MAAc,YAAY,IAAA,EAA4B;AACpD,IAAA,MAAM,GAAA,GAAM,GAAG,MAAM,IAAA,CAAK,aAAa,UAAA,CAAW,OAAO,CAAC,CAAA,EAAG,IAAI,CAAA,CAAA;AACjE,IAAA,MAAM,EAAE,KAAA,EAAO,OAAA,KAAY,MAAM,IAAA,CAAK,YAAY,cAAA,EAAe;AACjE,IAAA,MAAM,QAAA,GAAW,MAAM,KAAA,CAAM,GAAA,EAAK;AAAA,MAChC,MAAA,EAAQ,KAAA;AAAA,MACR,OAAA,EAAS;AAAA,QACP,cAAA,EAAgB,kBAAA;AAAA,QAChB,GAAI,OAAA,IAAW,EAAE,aAAA,EAAe,CAAA,OAAA,EAAU,OAAO,CAAA,CAAA;AAAG;AACtD,KACD,CAAA;AAED,IAAA,IAAI,CAAC,SAAS,EAAA,EAAI;AAChB,MAAA,MAAM,OAAA,GAAU,MAAM,QAAA,CAAS,IAAA,EAAK;AACpC,MAAA,MAAM,OAAA,GAAU,uBAAuB,QAAA,CAAS,MAAM,IAAI,QAAA,CAAS,UAAU,KAAK,OAAO,CAAA,CAAA;AACzF,MAAA,MAAM,IAAI,MAAM,OAAO,CAAA;AAAA,IACzB;AAEA,IAAA,OAAO,MAAM,SAAS,IAAA,EAAK;AAAA,EAC7B;AAAA,EAEA,MAAM,uBAAA,CACJ,SAAA,EACA,aAAA,EACuC;AACvC,IAAA,OAAO,MAAM,IAAA,CAAK,WAAA;AAAA,MAChB,CAAA,WAAA,EAAc,SAAS,CAAA,CAAA,EAAI,aAAa,CAAA,QAAA;AAAA,KAC1C;AAAA,EACF;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"KafkaDashboardClient.esm.js","sources":["../../src/api/KafkaDashboardClient.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { KafkaDashboardApi } from './types';\nimport { Entity } from '@backstage/catalog-model';\nimport { ConfigApi } from '@backstage/core-plugin-api';\nimport { KAFKA_DASHBOARD_URL } from '../constants';\n\nexport class KafkaDashboardClient implements KafkaDashboardApi {\n private readonly configApi: ConfigApi;\n private readonly regexPattern =\n /^([a-z0-9._-]+)\\/([a-z0-9._-]+)?\\/?(https?.*)$/i;\n\n constructor(options: { configApi: ConfigApi }) {\n this.configApi = options.configApi;\n }\n\n getDashboardUrl(\n clusterId: string,\n consumerGroup: string,\n entity: Entity,\n ): { url?: string } {\n const annotation = entity.metadata.annotations?.[KAFKA_DASHBOARD_URL] ?? '';\n\n const dashboardList = annotation\n .split(',')\n .filter(value => value !== undefined && value !== '')\n .map(value => value.match(this.regexPattern) as string[])\n .filter(\n value =>\n value[1] === clusterId &&\n (value[2] === undefined || value[2] === consumerGroup),\n )\n .sort((a, b) => {\n if (a[2] === b[2]) return 0;\n if (a[2] !== undefined) return -1;\n return 1;\n });\n\n if (dashboardList.length > 0) {\n return { url: dashboardList[0][3] };\n }\n\n return {\n url:\n this.configApi\n .getConfigArray('kafka.clusters')\n .filter(value => value.getString('name') === clusterId)\n .map(value => value.getOptionalString('dashboardUrl'))[0] ||\n undefined,\n };\n }\n}\n"],"names":[],"mappings":";;AAqBO,MAAM,oBAAkD,CAAA;AAAA,EAC5C,SAAA;AAAA,EACA,YACf,GAAA,iDAAA;AAAA,EAEF,YAAY,OAAmC,EAAA;AAC7C,IAAA,IAAA,CAAK,YAAY,OAAQ,CAAA,SAAA;AAAA;AAC3B,EAEA,eAAA,CACE,SACA,EAAA,aAAA,EACA,MACkB,EAAA;AAClB,IAAA,MAAM,UAAa,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,GAAc,mBAAmB,CAAK,IAAA,EAAA;AAEzE,IAAA,MAAM,gBAAgB,UACnB,CAAA,KAAA,CAAM,GAAG,CACT,CAAA,MAAA,CAAO,WAAS,KAAU,KAAA,KAAA,CAAA,IAAa,UAAU,EAAE,CAAA,CACnD,IAAI,CAAS,KAAA,KAAA,KAAA,CAAM,MAAM,IAAK,CAAA,YAAY,CAAa,CACvD,CAAA,MAAA;AAAA,MACC,CAAA,KAAA,KACE,KAAM,CAAA,CAAC,CAAM,KAAA,SAAA,KACZ,KAAM,CAAA,CAAC,CAAM,KAAA,KAAA,CAAA,IAAa,KAAM,CAAA,CAAC,CAAM,KAAA,aAAA;AAAA,KAE3C,CAAA,IAAA,CAAK,CAAC,CAAA,EAAG,CAAM,KAAA;AACd,MAAA,IAAI,EAAE,CAAC,CAAA,KAAM,CAAE,CAAA,CAAC,GAAU,OAAA,CAAA;AAC1B,MAAA,IAAI,CAAE,CAAA,CAAC,CAAM,KAAA,KAAA,CAAA,EAAkB,OAAA,CAAA,CAAA;AAC/B,MAAO,OAAA,CAAA;AAAA,KACR,CAAA;AAEH,IAAI,IAAA,aAAA,CAAc,SAAS,CAAG,EAAA;AAC5B,MAAA,OAAO,EAAE,GAAK,EAAA,aAAA,CAAc,CAAC,CAAA,CAAE,CAAC,CAAE,EAAA;AAAA;AAGpC,IAAO,OAAA;AAAA,MACL,GAAA,EACE,KAAK,SACF,CAAA,cAAA,CAAe,gBAAgB,CAC/B,CAAA,MAAA,CAAO,CAAS,KAAA,KAAA,KAAA,CAAM,SAAU,CAAA,MAAM,MAAM,SAAS,CAAA,CACrD,IAAI,CAAS,KAAA,KAAA,KAAA,CAAM,kBAAkB,cAAc,CAAC,CAAE,CAAA,CAAC,CAC1D,IAAA,KAAA;AAAA,KACJ;AAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"KafkaDashboardClient.esm.js","sources":["../../src/api/KafkaDashboardClient.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { KafkaDashboardApi } from './types';\nimport { Entity } from '@backstage/catalog-model';\nimport { ConfigApi } from '@backstage/core-plugin-api';\nimport { KAFKA_DASHBOARD_URL } from '../constants';\n\nexport class KafkaDashboardClient implements KafkaDashboardApi {\n private readonly configApi: ConfigApi;\n private readonly regexPattern =\n /^([a-z0-9._-]+)\\/([a-z0-9._-]+)?\\/?(https?.*)$/i;\n\n constructor(options: { configApi: ConfigApi }) {\n this.configApi = options.configApi;\n }\n\n getDashboardUrl(\n clusterId: string,\n consumerGroup: string,\n entity: Entity,\n ): { url?: string } {\n const annotation = entity.metadata.annotations?.[KAFKA_DASHBOARD_URL] ?? '';\n\n const dashboardList = annotation\n .split(',')\n .filter(value => value !== undefined && value !== '')\n .map(value => value.match(this.regexPattern) as string[])\n .filter(\n value =>\n value[1] === clusterId &&\n (value[2] === undefined || value[2] === consumerGroup),\n )\n .sort((a, b) => {\n if (a[2] === b[2]) return 0;\n if (a[2] !== undefined) return -1;\n return 1;\n });\n\n if (dashboardList.length > 0) {\n return { url: dashboardList[0][3] };\n }\n\n return {\n url:\n this.configApi\n .getConfigArray('kafka.clusters')\n .filter(value => value.getString('name') === clusterId)\n .map(value => value.getOptionalString('dashboardUrl'))[0] ||\n undefined,\n };\n }\n}\n"],"names":[],"mappings":";;AAqBO,MAAM,oBAAA,CAAkD;AAAA,EAC5C,SAAA;AAAA,EACA,YAAA,GACf,iDAAA;AAAA,EAEF,YAAY,OAAA,EAAmC;AAC7C,IAAA,IAAA,CAAK,YAAY,OAAA,CAAQ,SAAA;AAAA,EAC3B;AAAA,EAEA,eAAA,CACE,SAAA,EACA,aAAA,EACA,MAAA,EACkB;AAClB,IAAA,MAAM,UAAA,GAAa,MAAA,CAAO,QAAA,CAAS,WAAA,GAAc,mBAAmB,CAAA,IAAK,EAAA;AAEzE,IAAA,MAAM,gBAAgB,UAAA,CACnB,KAAA,CAAM,GAAG,CAAA,CACT,MAAA,CAAO,WAAS,KAAA,KAAU,MAAA,IAAa,UAAU,EAAE,CAAA,CACnD,IAAI,CAAA,KAAA,KAAS,KAAA,CAAM,MAAM,IAAA,CAAK,YAAY,CAAa,CAAA,CACvD,MAAA;AAAA,MACC,CAAA,KAAA,KACE,KAAA,CAAM,CAAC,CAAA,KAAM,SAAA,KACZ,KAAA,CAAM,CAAC,CAAA,KAAM,MAAA,IAAa,KAAA,CAAM,CAAC,CAAA,KAAM,aAAA;AAAA,KAC5C,CACC,IAAA,CAAK,CAAC,CAAA,EAAG,CAAA,KAAM;AACd,MAAA,IAAI,EAAE,CAAC,CAAA,KAAM,CAAA,CAAE,CAAC,GAAG,OAAO,CAAA;AAC1B,MAAA,IAAI,CAAA,CAAE,CAAC,CAAA,KAAM,MAAA,EAAW,OAAO,EAAA;AAC/B,MAAA,OAAO,CAAA;AAAA,IACT,CAAC,CAAA;AAEH,IAAA,IAAI,aAAA,CAAc,SAAS,CAAA,EAAG;AAC5B,MAAA,OAAO,EAAE,GAAA,EAAK,aAAA,CAAc,CAAC,CAAA,CAAE,CAAC,CAAA,EAAE;AAAA,IACpC;AAEA,IAAA,OAAO;AAAA,MACL,GAAA,EACE,KAAK,SAAA,CACF,cAAA,CAAe,gBAAgB,CAAA,CAC/B,MAAA,CAAO,CAAA,KAAA,KAAS,KAAA,CAAM,SAAA,CAAU,MAAM,MAAM,SAAS,CAAA,CACrD,IAAI,CAAA,KAAA,KAAS,KAAA,CAAM,kBAAkB,cAAc,CAAC,CAAA,CAAE,CAAC,CAAA,IAC1D;AAAA,KACJ;AAAA,EACF;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.esm.js","sources":["../../src/api/types.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { Entity } from '@backstage/catalog-model';\n\nexport const kafkaApiRef = createApiRef<KafkaApi>({\n id: 'plugin.kafka.service',\n});\n\nexport const kafkaDashboardApiRef = createApiRef<KafkaDashboardApi>({\n id: 'plugin.kafka.dashboard',\n});\n\nexport type ConsumerGroupOffsetsResponse = {\n consumerId: string;\n offsets: {\n topic: string;\n partitionId: number;\n topicOffset: string;\n groupOffset: string;\n }[];\n};\n\nexport interface KafkaApi {\n getConsumerGroupOffsets(\n clusterId: string,\n consumerGroup: string,\n ): Promise<ConsumerGroupOffsetsResponse>;\n}\n\nexport interface KafkaDashboardApi {\n getDashboardUrl(\n clusterId: string,\n consumerGroup: string,\n entity: Entity,\n ): { url?: string };\n}\n"],"names":[],"mappings":";;AAmBO,MAAM,cAAc,YAAuB,CAAA;AAAA,EAChD,EAAI,EAAA;AACN,CAAC;AAEM,MAAM,uBAAuB,YAAgC,CAAA;AAAA,EAClE,EAAI,EAAA;AACN,CAAC;;;;"}
1
+ {"version":3,"file":"types.esm.js","sources":["../../src/api/types.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport { Entity } from '@backstage/catalog-model';\n\nexport const kafkaApiRef = createApiRef<KafkaApi>({\n id: 'plugin.kafka.service',\n});\n\nexport const kafkaDashboardApiRef = createApiRef<KafkaDashboardApi>({\n id: 'plugin.kafka.dashboard',\n});\n\nexport type ConsumerGroupOffsetsResponse = {\n consumerId: string;\n offsets: {\n topic: string;\n partitionId: number;\n topicOffset: string;\n groupOffset: string;\n }[];\n};\n\nexport interface KafkaApi {\n getConsumerGroupOffsets(\n clusterId: string,\n consumerGroup: string,\n ): Promise<ConsumerGroupOffsetsResponse>;\n}\n\nexport interface KafkaDashboardApi {\n getDashboardUrl(\n clusterId: string,\n consumerGroup: string,\n entity: Entity,\n ): { url?: string };\n}\n"],"names":[],"mappings":";;AAmBO,MAAM,cAAc,YAAA,CAAuB;AAAA,EAChD,EAAA,EAAI;AACN,CAAC;AAEM,MAAM,uBAAuB,YAAA,CAAgC;AAAA,EAClE,EAAA,EAAI;AACN,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ConsumerGroupOffsets.esm.js","sources":["../../../src/components/ConsumerGroupOffsets/ConsumerGroupOffsets.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport RetryIcon from '@material-ui/icons/Replay';\nimport { useConsumerGroupsOffsetsForEntity } from './useConsumerGroupsOffsetsForEntity';\nimport { Table, TableColumn, Link } from '@backstage/core-components';\n\nexport type TopicPartitionInfo = {\n topic: string;\n partitionId: number;\n topicOffset: string;\n groupOffset: string;\n};\n\nconst generatedColumns: TableColumn[] = [\n {\n title: 'Topic',\n field: 'topic',\n highlight: true,\n render: (row: Partial<TopicPartitionInfo>) => {\n return <>{row.topic ?? ''}</>;\n },\n },\n {\n title: 'Partition',\n field: 'partitionId',\n render: (row: Partial<TopicPartitionInfo>) => {\n return <>{row.partitionId ?? ''}</>;\n },\n },\n {\n title: 'Topic Offset',\n field: 'topicOffset',\n render: (row: Partial<TopicPartitionInfo>) => {\n return <>{row.topicOffset ?? ''}</>;\n },\n },\n {\n title: 'Group Offset',\n field: 'groupOffset',\n render: (row: Partial<TopicPartitionInfo>) => {\n return <>{row.groupOffset ?? ''}</>;\n },\n },\n {\n title: 'Lag',\n field: 'lag',\n render: (row: Partial<TopicPartitionInfo>) => {\n let lag = undefined;\n if (row.topicOffset && row.groupOffset) {\n lag = +row.topicOffset - +row.groupOffset;\n }\n return <>{lag ?? ''}</>;\n },\n },\n];\n\ntype Props = {\n loading: boolean;\n retry: () => void;\n clusterId: string;\n dashboardUrl?: string;\n consumerGroup: string;\n topics?: TopicPartitionInfo[];\n};\n\nexport const ConsumerGroupOffsets = ({\n loading,\n topics,\n clusterId,\n dashboardUrl,\n consumerGroup,\n retry,\n}: Props) => {\n return (\n <Table\n isLoading={loading}\n actions={[\n {\n icon: () => <RetryIcon />,\n tooltip: 'Refresh Data',\n isFreeAction: true,\n onClick: () => retry(),\n },\n ]}\n data={topics ?? []}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"h6\">\n Consumed Topics for {consumerGroup} (\n {(dashboardUrl && <Link to={dashboardUrl}>{clusterId}</Link>) ||\n clusterId}\n )\n </Typography>\n </Box>\n }\n columns={generatedColumns}\n />\n );\n};\n\nexport const KafkaTopicsForConsumer = () => {\n const [tableProps, { retry }] = useConsumerGroupsOffsetsForEntity();\n return (\n <Grid container spacing={3}>\n {tableProps.consumerGroupsTopics?.map(consumerGroup => (\n <Grid item xs={12} key={consumerGroup.clusterId}>\n <ConsumerGroupOffsets\n {...consumerGroup}\n loading={tableProps.loading}\n retry={retry}\n />\n </Grid>\n ))}\n </Grid>\n );\n};\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"ConsumerGroupOffsets.esm.js","sources":["../../../src/components/ConsumerGroupOffsets/ConsumerGroupOffsets.tsx"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport Box from '@material-ui/core/Box';\nimport Grid from '@material-ui/core/Grid';\nimport Typography from '@material-ui/core/Typography';\nimport RetryIcon from '@material-ui/icons/Replay';\nimport { useConsumerGroupsOffsetsForEntity } from './useConsumerGroupsOffsetsForEntity';\nimport { Table, TableColumn, Link } from '@backstage/core-components';\n\nexport type TopicPartitionInfo = {\n topic: string;\n partitionId: number;\n topicOffset: string;\n groupOffset: string;\n};\n\nconst generatedColumns: TableColumn[] = [\n {\n title: 'Topic',\n field: 'topic',\n highlight: true,\n render: (row: Partial<TopicPartitionInfo>) => {\n return <>{row.topic ?? ''}</>;\n },\n },\n {\n title: 'Partition',\n field: 'partitionId',\n render: (row: Partial<TopicPartitionInfo>) => {\n return <>{row.partitionId ?? ''}</>;\n },\n },\n {\n title: 'Topic Offset',\n field: 'topicOffset',\n render: (row: Partial<TopicPartitionInfo>) => {\n return <>{row.topicOffset ?? ''}</>;\n },\n },\n {\n title: 'Group Offset',\n field: 'groupOffset',\n render: (row: Partial<TopicPartitionInfo>) => {\n return <>{row.groupOffset ?? ''}</>;\n },\n },\n {\n title: 'Lag',\n field: 'lag',\n render: (row: Partial<TopicPartitionInfo>) => {\n let lag = undefined;\n if (row.topicOffset && row.groupOffset) {\n lag = +row.topicOffset - +row.groupOffset;\n }\n return <>{lag ?? ''}</>;\n },\n },\n];\n\ntype Props = {\n loading: boolean;\n retry: () => void;\n clusterId: string;\n dashboardUrl?: string;\n consumerGroup: string;\n topics?: TopicPartitionInfo[];\n};\n\nexport const ConsumerGroupOffsets = ({\n loading,\n topics,\n clusterId,\n dashboardUrl,\n consumerGroup,\n retry,\n}: Props) => {\n return (\n <Table\n isLoading={loading}\n actions={[\n {\n icon: () => <RetryIcon />,\n tooltip: 'Refresh Data',\n isFreeAction: true,\n onClick: () => retry(),\n },\n ]}\n data={topics ?? []}\n title={\n <Box display=\"flex\" alignItems=\"center\">\n <Typography variant=\"h6\">\n Consumed Topics for {consumerGroup} (\n {(dashboardUrl && <Link to={dashboardUrl}>{clusterId}</Link>) ||\n clusterId}\n )\n </Typography>\n </Box>\n }\n columns={generatedColumns}\n />\n );\n};\n\nexport const KafkaTopicsForConsumer = () => {\n const [tableProps, { retry }] = useConsumerGroupsOffsetsForEntity();\n return (\n <Grid container spacing={3}>\n {tableProps.consumerGroupsTopics?.map(consumerGroup => (\n <Grid item xs={12} key={consumerGroup.clusterId}>\n <ConsumerGroupOffsets\n {...consumerGroup}\n loading={tableProps.loading}\n retry={retry}\n />\n </Grid>\n ))}\n </Grid>\n );\n};\n"],"names":[],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"useConsumerGroupsForEntity.esm.js","sources":["../../../src/components/ConsumerGroupOffsets/useConsumerGroupsForEntity.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useMemo } from 'react';\nimport { KAFKA_CONSUMER_GROUP_ANNOTATION } from '../../constants';\n\nexport const useConsumerGroupsForEntity = () => {\n const { entity } = useEntity();\n const annotation =\n entity.metadata.annotations?.[KAFKA_CONSUMER_GROUP_ANNOTATION] ?? '';\n\n return useMemo(() => {\n return annotation.split(',').map(consumer => {\n const [clusterId, consumerGroup] = consumer.split('/');\n\n if (!clusterId || !consumerGroup) {\n throw new Error(\n `Failed to parse kafka consumer group annotation: got \"${annotation}\"`,\n );\n }\n\n return {\n clusterId: clusterId.trim(),\n consumerGroup: consumerGroup.trim(),\n };\n });\n }, [annotation]);\n};\n"],"names":[],"mappings":";;;;AAoBO,MAAM,6BAA6B,MAAM;AAC9C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAA,MAAM,UACJ,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,GAAc,+BAA+B,CAAK,IAAA,EAAA;AAEpE,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAA,OAAO,UAAW,CAAA,KAAA,CAAM,GAAG,CAAA,CAAE,IAAI,CAAY,QAAA,KAAA;AAC3C,MAAA,MAAM,CAAC,SAAW,EAAA,aAAa,CAAI,GAAA,QAAA,CAAS,MAAM,GAAG,CAAA;AAErD,MAAI,IAAA,CAAC,SAAa,IAAA,CAAC,aAAe,EAAA;AAChC,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,yDAAyD,UAAU,CAAA,CAAA;AAAA,SACrE;AAAA;AAGF,MAAO,OAAA;AAAA,QACL,SAAA,EAAW,UAAU,IAAK,EAAA;AAAA,QAC1B,aAAA,EAAe,cAAc,IAAK;AAAA,OACpC;AAAA,KACD,CAAA;AAAA,GACH,EAAG,CAAC,UAAU,CAAC,CAAA;AACjB;;;;"}
1
+ {"version":3,"file":"useConsumerGroupsForEntity.esm.js","sources":["../../../src/components/ConsumerGroupOffsets/useConsumerGroupsForEntity.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { useEntity } from '@backstage/plugin-catalog-react';\nimport { useMemo } from 'react';\nimport { KAFKA_CONSUMER_GROUP_ANNOTATION } from '../../constants';\n\nexport const useConsumerGroupsForEntity = () => {\n const { entity } = useEntity();\n const annotation =\n entity.metadata.annotations?.[KAFKA_CONSUMER_GROUP_ANNOTATION] ?? '';\n\n return useMemo(() => {\n return annotation.split(',').map(consumer => {\n const [clusterId, consumerGroup] = consumer.split('/');\n\n if (!clusterId || !consumerGroup) {\n throw new Error(\n `Failed to parse kafka consumer group annotation: got \"${annotation}\"`,\n );\n }\n\n return {\n clusterId: clusterId.trim(),\n consumerGroup: consumerGroup.trim(),\n };\n });\n }, [annotation]);\n};\n"],"names":[],"mappings":";;;;AAoBO,MAAM,6BAA6B,MAAM;AAC9C,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,UAAA,GACJ,MAAA,CAAO,QAAA,CAAS,WAAA,GAAc,+BAA+B,CAAA,IAAK,EAAA;AAEpE,EAAA,OAAO,QAAQ,MAAM;AACnB,IAAA,OAAO,UAAA,CAAW,KAAA,CAAM,GAAG,CAAA,CAAE,IAAI,CAAA,QAAA,KAAY;AAC3C,MAAA,MAAM,CAAC,SAAA,EAAW,aAAa,CAAA,GAAI,QAAA,CAAS,MAAM,GAAG,CAAA;AAErD,MAAA,IAAI,CAAC,SAAA,IAAa,CAAC,aAAA,EAAe;AAChC,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,yDAAyD,UAAU,CAAA,CAAA;AAAA,SACrE;AAAA,MACF;AAEA,MAAA,OAAO;AAAA,QACL,SAAA,EAAW,UAAU,IAAA,EAAK;AAAA,QAC1B,aAAA,EAAe,cAAc,IAAA;AAAK,OACpC;AAAA,IACF,CAAC,CAAA;AAAA,EACH,CAAA,EAAG,CAAC,UAAU,CAAC,CAAA;AACjB;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useConsumerGroupsOffsetsForEntity.esm.js","sources":["../../../src/components/ConsumerGroupOffsets/useConsumerGroupsOffsetsForEntity.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport useAsyncRetry from 'react-use/esm/useAsyncRetry';\nimport { kafkaApiRef, kafkaDashboardApiRef } from '../../api/types';\nimport { useConsumerGroupsForEntity } from './useConsumerGroupsForEntity';\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nexport const useConsumerGroupsOffsetsForEntity = () => {\n const consumers = useConsumerGroupsForEntity();\n const { entity } = useEntity();\n const api = useApi(kafkaApiRef);\n const apiDashboard = useApi(kafkaDashboardApiRef);\n const errorApi = useApi(errorApiRef);\n\n const {\n loading,\n value: consumerGroupsTopics,\n retry,\n } = useAsyncRetry(async () => {\n try {\n return await Promise.all(\n consumers.map(async ({ clusterId, consumerGroup }) => {\n const response = await api.getConsumerGroupOffsets(\n clusterId,\n consumerGroup,\n );\n return {\n clusterId,\n dashboardUrl: apiDashboard.getDashboardUrl(\n clusterId,\n consumerGroup,\n entity,\n ).url,\n consumerGroup,\n topics: response.offsets,\n };\n }),\n );\n } catch (e) {\n errorApi.post(e);\n throw e;\n }\n }, [consumers, api, apiDashboard, errorApi, entity]);\n\n return [\n {\n loading,\n consumerGroupsTopics,\n },\n {\n retry,\n },\n ] as const;\n};\n"],"names":[],"mappings":";;;;;;AAsBO,MAAM,oCAAoC,MAAM;AACrD,EAAA,MAAM,YAAY,0BAA2B,EAAA;AAC7C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA;AAC7B,EAAM,MAAA,GAAA,GAAM,OAAO,WAAW,CAAA;AAC9B,EAAM,MAAA,YAAA,GAAe,OAAO,oBAAoB,CAAA;AAChD,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA;AAEnC,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,KAAO,EAAA,oBAAA;AAAA,IACP;AAAA,GACF,GAAI,cAAc,YAAY;AAC5B,IAAI,IAAA;AACF,MAAA,OAAO,MAAM,OAAQ,CAAA,GAAA;AAAA,QACnB,UAAU,GAAI,CAAA,OAAO,EAAE,SAAA,EAAW,eAAoB,KAAA;AACpD,UAAM,MAAA,QAAA,GAAW,MAAM,GAAI,CAAA,uBAAA;AAAA,YACzB,SAAA;AAAA,YACA;AAAA,WACF;AACA,UAAO,OAAA;AAAA,YACL,SAAA;AAAA,YACA,cAAc,YAAa,CAAA,eAAA;AAAA,cACzB,SAAA;AAAA,cACA,aAAA;AAAA,cACA;AAAA,aACA,CAAA,GAAA;AAAA,YACF,aAAA;AAAA,YACA,QAAQ,QAAS,CAAA;AAAA,WACnB;AAAA,SACD;AAAA,OACH;AAAA,aACO,CAAG,EAAA;AACV,MAAA,QAAA,CAAS,KAAK,CAAC,CAAA;AACf,MAAM,MAAA,CAAA;AAAA;AACR,KACC,CAAC,SAAA,EAAW,KAAK,YAAc,EAAA,QAAA,EAAU,MAAM,CAAC,CAAA;AAEnD,EAAO,OAAA;AAAA,IACL;AAAA,MACE,OAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA;AAAA,MACE;AAAA;AACF,GACF;AACF;;;;"}
1
+ {"version":3,"file":"useConsumerGroupsOffsetsForEntity.esm.js","sources":["../../../src/components/ConsumerGroupOffsets/useConsumerGroupsOffsetsForEntity.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport useAsyncRetry from 'react-use/esm/useAsyncRetry';\nimport { kafkaApiRef, kafkaDashboardApiRef } from '../../api/types';\nimport { useConsumerGroupsForEntity } from './useConsumerGroupsForEntity';\nimport { errorApiRef, useApi } from '@backstage/core-plugin-api';\nimport { useEntity } from '@backstage/plugin-catalog-react';\n\nexport const useConsumerGroupsOffsetsForEntity = () => {\n const consumers = useConsumerGroupsForEntity();\n const { entity } = useEntity();\n const api = useApi(kafkaApiRef);\n const apiDashboard = useApi(kafkaDashboardApiRef);\n const errorApi = useApi(errorApiRef);\n\n const {\n loading,\n value: consumerGroupsTopics,\n retry,\n } = useAsyncRetry(async () => {\n try {\n return await Promise.all(\n consumers.map(async ({ clusterId, consumerGroup }) => {\n const response = await api.getConsumerGroupOffsets(\n clusterId,\n consumerGroup,\n );\n return {\n clusterId,\n dashboardUrl: apiDashboard.getDashboardUrl(\n clusterId,\n consumerGroup,\n entity,\n ).url,\n consumerGroup,\n topics: response.offsets,\n };\n }),\n );\n } catch (e) {\n errorApi.post(e);\n throw e;\n }\n }, [consumers, api, apiDashboard, errorApi, entity]);\n\n return [\n {\n loading,\n consumerGroupsTopics,\n },\n {\n retry,\n },\n ] as const;\n};\n"],"names":[],"mappings":";;;;;;AAsBO,MAAM,oCAAoC,MAAM;AACrD,EAAA,MAAM,YAAY,0BAAA,EAA2B;AAC7C,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,SAAA,EAAU;AAC7B,EAAA,MAAM,GAAA,GAAM,OAAO,WAAW,CAAA;AAC9B,EAAA,MAAM,YAAA,GAAe,OAAO,oBAAoB,CAAA;AAChD,EAAA,MAAM,QAAA,GAAW,OAAO,WAAW,CAAA;AAEnC,EAAA,MAAM;AAAA,IACJ,OAAA;AAAA,IACA,KAAA,EAAO,oBAAA;AAAA,IACP;AAAA,GACF,GAAI,cAAc,YAAY;AAC5B,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,OAAA,CAAQ,GAAA;AAAA,QACnB,UAAU,GAAA,CAAI,OAAO,EAAE,SAAA,EAAW,eAAc,KAAM;AACpD,UAAA,MAAM,QAAA,GAAW,MAAM,GAAA,CAAI,uBAAA;AAAA,YACzB,SAAA;AAAA,YACA;AAAA,WACF;AACA,UAAA,OAAO;AAAA,YACL,SAAA;AAAA,YACA,cAAc,YAAA,CAAa,eAAA;AAAA,cACzB,SAAA;AAAA,cACA,aAAA;AAAA,cACA;AAAA,aACF,CAAE,GAAA;AAAA,YACF,aAAA;AAAA,YACA,QAAQ,QAAA,CAAS;AAAA,WACnB;AAAA,QACF,CAAC;AAAA,OACH;AAAA,IACF,SAAS,CAAA,EAAG;AACV,MAAA,QAAA,CAAS,KAAK,CAAC,CAAA;AACf,MAAA,MAAM,CAAA;AAAA,IACR;AAAA,EACF,GAAG,CAAC,SAAA,EAAW,KAAK,YAAA,EAAc,QAAA,EAAU,MAAM,CAAC,CAAA;AAEnD,EAAA,OAAO;AAAA,IACL;AAAA,MACE,OAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA;AAAA,MACE;AAAA;AACF,GACF;AACF;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.esm.js","sources":["../src/constants.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @public */\nexport const KAFKA_CONSUMER_GROUP_ANNOTATION =\n 'kafka.apache.org/consumer-groups';\n\nexport const KAFKA_DASHBOARD_URL = 'kafka.apache.org/dashboard-urls';\n"],"names":[],"mappings":"AAiBO,MAAM,+BACX,GAAA;AAEK,MAAM,mBAAsB,GAAA;;;;"}
1
+ {"version":3,"file":"constants.esm.js","sources":["../src/constants.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/** @public */\nexport const KAFKA_CONSUMER_GROUP_ANNOTATION =\n 'kafka.apache.org/consumer-groups';\n\nexport const KAFKA_DASHBOARD_URL = 'kafka.apache.org/dashboard-urls';\n"],"names":[],"mappings":"AAiBO,MAAM,+BAAA,GACX;AAEK,MAAM,mBAAA,GAAsB;;;;"}
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage-community/plugin-kafka";
2
- var version = "0.11.0";
2
+ var version = "0.12.0";
3
3
  var description = "A Backstage plugin that integrates towards Kafka";
4
4
  var backstage = {
5
5
  role: "frontend-plugin",
@@ -12,7 +12,7 @@ var backstage = {
12
12
  var publishConfig = {
13
13
  access: "public"
14
14
  };
15
- var exports = {
15
+ var exports$1 = {
16
16
  ".": "./src/index.ts",
17
17
  "./alpha": "./src/alpha/index.ts",
18
18
  "./package.json": "./package.json"
@@ -52,23 +52,24 @@ var scripts = {
52
52
  test: "backstage-cli package test"
53
53
  };
54
54
  var dependencies = {
55
- "@backstage/catalog-model": "^1.7.6",
56
- "@backstage/core-compat-api": "^0.5.5",
57
- "@backstage/core-components": "^0.18.4",
58
- "@backstage/core-plugin-api": "^1.12.1",
59
- "@backstage/frontend-plugin-api": "^0.13.2",
60
- "@backstage/plugin-catalog-react": "^1.21.4",
55
+ "@backstage/catalog-model": "^1.7.7",
56
+ "@backstage/core-compat-api": "^0.5.9",
57
+ "@backstage/core-components": "^0.18.8",
58
+ "@backstage/core-plugin-api": "^1.12.4",
59
+ "@backstage/frontend-plugin-api": "^0.16.1",
60
+ "@backstage/plugin-catalog-react": "^2.1.0",
61
61
  "@material-ui/core": "^4.12.2",
62
62
  "@material-ui/icons": "^4.9.1",
63
63
  "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
64
64
  "react-use": "^17.2.4"
65
65
  };
66
66
  var devDependencies = {
67
- "@backstage/cli": "^0.35.1",
68
- "@backstage/dev-utils": "^1.1.18",
69
- "@backstage/frontend-defaults": "^0.3.4",
70
- "@backstage/plugin-catalog": "^1.32.1",
71
- "@backstage/test-utils": "^1.7.14",
67
+ "@backstage/cli": "^0.36.0",
68
+ "@backstage/dev-utils": "^1.1.21",
69
+ "@backstage/frontend-defaults": "^0.5.0",
70
+ "@backstage/frontend-test-utils": "^0.5.1",
71
+ "@backstage/plugin-catalog": "^2.0.1",
72
+ "@backstage/test-utils": "^1.7.16",
72
73
  "@testing-library/dom": "^10.0.0",
73
74
  "@testing-library/jest-dom": "^6.0.0",
74
75
  "@testing-library/react": "^15.0.0",
@@ -90,7 +91,7 @@ var _package = {
90
91
  description: description,
91
92
  backstage: backstage,
92
93
  publishConfig: publishConfig,
93
- exports: exports,
94
+ exports: exports$1,
94
95
  typesVersions: typesVersions,
95
96
  homepage: homepage,
96
97
  repository: repository,
@@ -106,5 +107,5 @@ var _package = {
106
107
  configSchema: configSchema
107
108
  };
108
109
 
109
- export { backstage, configSchema, _package as default, dependencies, description, devDependencies, exports, files, homepage, license, main, name, peerDependencies, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
110
+ export { backstage, configSchema, _package as default, dependencies, description, devDependencies, exports$1 as exports, files, homepage, license, main, name, peerDependencies, publishConfig, repository, scripts, sideEffects, types, typesVersions, version };
110
111
  //# sourceMappingURL=package.json.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"package.json.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { KafkaBackendClient } from './api/KafkaBackendClient.esm.js';
2
2
  import { kafkaApiRef, kafkaDashboardApiRef } from './api/types.esm.js';
3
- import { createRouteRef, createPlugin, createApiFactory, discoveryApiRef, identityApiRef, configApiRef, createRoutableExtension } from '@backstage/core-plugin-api';
3
+ import { createRouteRef, createPlugin, createApiFactory, identityApiRef, discoveryApiRef, configApiRef, createRoutableExtension } from '@backstage/core-plugin-api';
4
4
  import { KafkaDashboardClient } from './api/KafkaDashboardClient.esm.js';
5
5
 
6
6
  const rootCatalogKafkaRouteRef = createRouteRef({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { KafkaBackendClient } from './api/KafkaBackendClient';\nimport { kafkaApiRef, kafkaDashboardApiRef } from './api/types';\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n createRouteRef,\n discoveryApiRef,\n identityApiRef,\n configApiRef,\n} from '@backstage/core-plugin-api';\nimport { KafkaDashboardClient } from './api/KafkaDashboardClient';\n\n/** @public */\nexport const rootCatalogKafkaRouteRef = createRouteRef({\n id: 'kafka',\n});\n\n/** @public */\nexport const kafkaPlugin = createPlugin({\n id: 'kafka',\n apis: [\n createApiFactory({\n api: kafkaApiRef,\n deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef },\n factory: ({ discoveryApi, identityApi }) =>\n new KafkaBackendClient({ discoveryApi, identityApi }),\n }),\n createApiFactory({\n api: kafkaDashboardApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => new KafkaDashboardClient({ configApi }),\n }),\n ],\n routes: {\n entityContent: rootCatalogKafkaRouteRef,\n },\n});\n\n/** @public */\nexport const EntityKafkaContent = kafkaPlugin.provide(\n createRoutableExtension({\n name: 'EntityKafkaContent',\n component: () => import('./Router').then(m => m.Router),\n mountPoint: rootCatalogKafkaRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;;AA6BO,MAAM,2BAA2B,cAAe,CAAA;AAAA,EACrD,EAAI,EAAA;AACN,CAAC;AAGM,MAAM,cAAc,YAAa,CAAA;AAAA,EACtC,EAAI,EAAA,OAAA;AAAA,EACJ,IAAM,EAAA;AAAA,IACJ,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,WAAA;AAAA,MACL,IAAM,EAAA,EAAE,YAAc,EAAA,eAAA,EAAiB,aAAa,cAAe,EAAA;AAAA,MACnE,OAAA,EAAS,CAAC,EAAE,YAAc,EAAA,WAAA,EACxB,KAAA,IAAI,kBAAmB,CAAA,EAAE,YAAc,EAAA,WAAA,EAAa;AAAA,KACvD,CAAA;AAAA,IACD,gBAAiB,CAAA;AAAA,MACf,GAAK,EAAA,oBAAA;AAAA,MACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAa,EAAA;AAAA,MAChC,OAAA,EAAS,CAAC,EAAE,SAAA,OAAgB,IAAI,oBAAA,CAAqB,EAAE,SAAA,EAAW;AAAA,KACnE;AAAA,GACH;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,aAAe,EAAA;AAAA;AAEnB,CAAC;AAGM,MAAM,qBAAqB,WAAY,CAAA,OAAA;AAAA,EAC5C,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,oBAAA;AAAA,IACN,SAAA,EAAW,MAAM,OAAO,iBAAU,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,MAAM,CAAA;AAAA,IACtD,UAAY,EAAA;AAAA,GACb;AACH;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2020 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { KafkaBackendClient } from './api/KafkaBackendClient';\nimport { kafkaApiRef, kafkaDashboardApiRef } from './api/types';\nimport {\n createApiFactory,\n createPlugin,\n createRoutableExtension,\n createRouteRef,\n discoveryApiRef,\n identityApiRef,\n configApiRef,\n} from '@backstage/core-plugin-api';\nimport { KafkaDashboardClient } from './api/KafkaDashboardClient';\n\n/** @public */\nexport const rootCatalogKafkaRouteRef = createRouteRef({\n id: 'kafka',\n});\n\n/** @public */\nexport const kafkaPlugin = createPlugin({\n id: 'kafka',\n apis: [\n createApiFactory({\n api: kafkaApiRef,\n deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef },\n factory: ({ discoveryApi, identityApi }) =>\n new KafkaBackendClient({ discoveryApi, identityApi }),\n }),\n createApiFactory({\n api: kafkaDashboardApiRef,\n deps: { configApi: configApiRef },\n factory: ({ configApi }) => new KafkaDashboardClient({ configApi }),\n }),\n ],\n routes: {\n entityContent: rootCatalogKafkaRouteRef,\n },\n});\n\n/** @public */\nexport const EntityKafkaContent = kafkaPlugin.provide(\n createRoutableExtension({\n name: 'EntityKafkaContent',\n component: () => import('./Router').then(m => m.Router),\n mountPoint: rootCatalogKafkaRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;;AA6BO,MAAM,2BAA2B,cAAA,CAAe;AAAA,EACrD,EAAA,EAAI;AACN,CAAC;AAGM,MAAM,cAAc,YAAA,CAAa;AAAA,EACtC,EAAA,EAAI,OAAA;AAAA,EACJ,IAAA,EAAM;AAAA,IACJ,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,WAAA;AAAA,MACL,IAAA,EAAM,EAAE,YAAA,EAAc,eAAA,EAAiB,aAAa,cAAA,EAAe;AAAA,MACnE,OAAA,EAAS,CAAC,EAAE,YAAA,EAAc,WAAA,EAAY,KACpC,IAAI,kBAAA,CAAmB,EAAE,YAAA,EAAc,WAAA,EAAa;AAAA,KACvD,CAAA;AAAA,IACD,gBAAA,CAAiB;AAAA,MACf,GAAA,EAAK,oBAAA;AAAA,MACL,IAAA,EAAM,EAAE,SAAA,EAAW,YAAA,EAAa;AAAA,MAChC,OAAA,EAAS,CAAC,EAAE,SAAA,OAAgB,IAAI,oBAAA,CAAqB,EAAE,SAAA,EAAW;AAAA,KACnE;AAAA,GACH;AAAA,EACA,MAAA,EAAQ;AAAA,IACN,aAAA,EAAe;AAAA;AAEnB,CAAC;AAGM,MAAM,qBAAqB,WAAA,CAAY,OAAA;AAAA,EAC5C,uBAAA,CAAwB;AAAA,IACtB,IAAA,EAAM,oBAAA;AAAA,IACN,SAAA,EAAW,MAAM,OAAO,iBAAU,EAAE,IAAA,CAAK,CAAA,CAAA,KAAK,EAAE,MAAM,CAAA;AAAA,IACtD,UAAA,EAAY;AAAA,GACb;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-kafka",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "A Backstage plugin that integrates towards Kafka",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -65,23 +65,24 @@
65
65
  "test": "backstage-cli package test"
66
66
  },
67
67
  "dependencies": {
68
- "@backstage/catalog-model": "^1.7.6",
69
- "@backstage/core-compat-api": "^0.5.5",
70
- "@backstage/core-components": "^0.18.4",
71
- "@backstage/core-plugin-api": "^1.12.1",
72
- "@backstage/frontend-plugin-api": "^0.13.2",
73
- "@backstage/plugin-catalog-react": "^1.21.4",
68
+ "@backstage/catalog-model": "^1.7.7",
69
+ "@backstage/core-compat-api": "^0.5.9",
70
+ "@backstage/core-components": "^0.18.8",
71
+ "@backstage/core-plugin-api": "^1.12.4",
72
+ "@backstage/frontend-plugin-api": "^0.16.1",
73
+ "@backstage/plugin-catalog-react": "^2.1.0",
74
74
  "@material-ui/core": "^4.12.2",
75
75
  "@material-ui/icons": "^4.9.1",
76
76
  "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
77
77
  "react-use": "^17.2.4"
78
78
  },
79
79
  "devDependencies": {
80
- "@backstage/cli": "^0.35.1",
81
- "@backstage/dev-utils": "^1.1.18",
82
- "@backstage/frontend-defaults": "^0.3.4",
83
- "@backstage/plugin-catalog": "^1.32.1",
84
- "@backstage/test-utils": "^1.7.14",
80
+ "@backstage/cli": "^0.36.0",
81
+ "@backstage/dev-utils": "^1.1.21",
82
+ "@backstage/frontend-defaults": "^0.5.0",
83
+ "@backstage/frontend-test-utils": "^0.5.1",
84
+ "@backstage/plugin-catalog": "^2.0.1",
85
+ "@backstage/test-utils": "^1.7.16",
85
86
  "@testing-library/dom": "^10.0.0",
86
87
  "@testing-library/jest-dom": "^6.0.0",
87
88
  "@testing-library/react": "^15.0.0",