@backstage-community/plugin-kafka 0.3.39 → 0.5.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,17 @@
1
1
  # @backstage-community/plugin-kafka
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - b47c7a8: Backstage version bump to v1.35.1
8
+
9
+ ## 0.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 6f33d70: Backstage version bump to v1.34.1
14
+
3
15
  ## 0.3.39
4
16
 
5
17
  ### Patch 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 React from 'react';\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":";;;;;;AA2Ba,MAAA,0BAAA,GAA6B,CAAC,MACzC,KAAA,OAAA,CAAQ,OAAO,QAAS,CAAA,WAAA,GAAc,+BAA+B,CAAC,EAAA;AAGjE,MAAM,SAAS,MAAM;AAC1B,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAE7B,EAAI,IAAA,CAAC,0BAA2B,CAAA,MAAM,CAAG,EAAA;AACvC,IACE,uBAAA,KAAA,CAAA,aAAA;AAAA,MAAC,2BAAA;AAAA,MAAA;AAAA,QACC,UAAY,EAAA,+BAAA;AAAA,OAAA;AAAA,KACd,CAAA;AAAA,GAEJ;AAEA,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,MACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,EAAA,EAAA,IAAA,EAAK,KAAI,OAAS,kBAAA,KAAA,CAAA,aAAA,CAAC,sBAAuB,EAAA,IAAA,CAAA,EAAI,CACvD,CAAA,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 React from 'react';\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":";;;;;;AA2Ba,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,KAAA,CAAA,aAAA;AAAA,MAAC,2BAAA;AAAA,MAAA;AAAA,QACC,UAAY,EAAA;AAAA;AAAA,KACd;AAAA;AAIJ,EACE,uBAAA,KAAA,CAAA,aAAA,CAAC,MACC,EAAA,IAAA,kBAAA,KAAA,CAAA,aAAA,CAAC,KAAM,EAAA,EAAA,IAAA,EAAK,KAAI,OAAS,kBAAA,KAAA,CAAA,aAAA,CAAC,sBAAuB,EAAA,IAAA,CAAA,EAAI,CACvD,CAAA;AAEJ;;;;"}
@@ -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,CAAA;AAAA,EACA,WAAA,CAAA;AAAA,EAEjB,YAAY,OAGT,EAAA;AACD,IAAA,IAAA,CAAK,eAAe,OAAQ,CAAA,YAAA,CAAA;AAC5B,IAAA,IAAA,CAAK,cAAc,OAAQ,CAAA,WAAA,CAAA;AAAA,GAC7B;AAAA,EAEA,MAAc,YAAY,IAA4B,EAAA;AACpD,IAAM,MAAA,GAAA,GAAM,GAAG,MAAM,IAAA,CAAK,aAAa,UAAW,CAAA,OAAO,CAAC,CAAA,EAAG,IAAI,CAAA,CAAA,CAAA;AACjE,IAAA,MAAM,EAAE,KAAO,EAAA,OAAA,KAAY,MAAM,IAAA,CAAK,YAAY,cAAe,EAAA,CAAA;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,EAAA;AAAA,OACtD;AAAA,KACD,CAAA,CAAA;AAED,IAAI,IAAA,CAAC,SAAS,EAAI,EAAA;AAChB,MAAM,MAAA,OAAA,GAAU,MAAM,QAAA,CAAS,IAAK,EAAA,CAAA;AACpC,MAAM,MAAA,OAAA,GAAU,uBAAuB,QAAS,CAAA,MAAM,IAAI,QAAS,CAAA,UAAU,KAAK,OAAO,CAAA,CAAA,CAAA;AACzF,MAAM,MAAA,IAAI,MAAM,OAAO,CAAA,CAAA;AAAA,KACzB;AAEA,IAAO,OAAA,MAAM,SAAS,IAAK,EAAA,CAAA;AAAA,GAC7B;AAAA,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,CAAA;AAAA,KAC1C,CAAA;AAAA,GACF;AACF;;;;"}
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 +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,CAAA;AAAA,EACA,YACf,GAAA,iDAAA,CAAA;AAAA,EAEF,YAAY,OAAmC,EAAA;AAC7C,IAAA,IAAA,CAAK,YAAY,OAAQ,CAAA,SAAA,CAAA;AAAA,GAC3B;AAAA,EAEA,eAAA,CACE,SACA,EAAA,aAAA,EACA,MACkB,EAAA;AAClB,IAAA,MAAM,UAAa,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,GAAc,mBAAmB,CAAK,IAAA,EAAA,CAAA;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,CAAA;AAAA,KAE3C,CAAA,IAAA,CAAK,CAAC,CAAA,EAAG,CAAM,KAAA;AACd,MAAA,IAAI,EAAE,CAAC,CAAA,KAAM,CAAE,CAAA,CAAC,GAAU,OAAA,CAAA,CAAA;AAC1B,MAAA,IAAI,CAAE,CAAA,CAAC,CAAM,KAAA,KAAA,CAAA,EAAkB,OAAA,CAAA,CAAA,CAAA;AAC/B,MAAO,OAAA,CAAA,CAAA;AAAA,KACR,CAAA,CAAA;AAEH,IAAI,IAAA,aAAA,CAAc,SAAS,CAAG,EAAA;AAC5B,MAAA,OAAO,EAAE,GAAK,EAAA,aAAA,CAAc,CAAC,CAAA,CAAE,CAAC,CAAE,EAAA,CAAA;AAAA,KACpC;AAEA,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,CAAA;AAAA,KACJ,CAAA;AAAA,GACF;AACF;;;;"}
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 +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,sBAAA;AACN,CAAC,EAAA;AAEM,MAAM,uBAAuB,YAAgC,CAAA;AAAA,EAClE,EAAI,EAAA,wBAAA;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,YAAuB,CAAA;AAAA,EAChD,EAAI,EAAA;AACN,CAAC;AAEM,MAAM,uBAAuB,YAAgC,CAAA;AAAA,EAClE,EAAI,EAAA;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 React from 'react';\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 </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AAAA,GACX,CAAA;AAEJ,EAAA;AAEO,MAAM,yBAAyB,MAAM;AAC1C,EAAA,MAAM,CAAC,UAAY,EAAA,EAAE,KAAM,EAAC,IAAI,iCAAkC,EAAA,CAAA;AAClE,EAAA,2CACG,IAAK,EAAA,EAAA,SAAA,EAAS,MAAC,OAAS,EAAA,CAAA,EAAA,EACtB,WAAW,oBAAsB,EAAA,GAAA,CAAI,CACpC,aAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAI,EAAI,EAAA,GAAA,EAAK,cAAc,SACpC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACE,GAAG,aAAA;AAAA,MACJ,SAAS,UAAW,CAAA,OAAA;AAAA,MACpB,KAAA;AAAA,KAAA;AAAA,GAEJ,CACD,CACH,CAAA,CAAA;AAEJ;;;;"}
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 React from 'react';\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 {...cons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M,CAAC,UAAY,EAAA,EAAE,KAAM,EAAC,IAAI,iCAAkC,EAAA;AAClE,EAAA,2CACG,IAAK,EAAA,EAAA,SAAA,EAAS,MAAC,OAAS,EAAA,CAAA,EAAA,EACtB,WAAW,oBAAsB,EAAA,GAAA,CAAI,CACpC,aAAA,qBAAA,KAAA,CAAA,aAAA,CAAC,QAAK,IAAI,EAAA,IAAA,EAAC,IAAI,EAAI,EAAA,GAAA,EAAK,cAAc,SACpC,EAAA,kBAAA,KAAA,CAAA,aAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACE,GAAG,aAAA;AAAA,MACJ,SAAS,UAAW,CAAA,OAAA;AAAA,MACpB;AAAA;AAAA,GAEJ,CACD,CACH,CAAA;AAEJ;;;;"}
@@ -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,CAAA;AAC7B,EAAA,MAAM,UACJ,GAAA,MAAA,CAAO,QAAS,CAAA,WAAA,GAAc,+BAA+B,CAAK,IAAA,EAAA,CAAA;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,CAAA;AAErD,MAAI,IAAA,CAAC,SAAa,IAAA,CAAC,aAAe,EAAA;AAChC,QAAA,MAAM,IAAI,KAAA;AAAA,UACR,yDAAyD,UAAU,CAAA,CAAA,CAAA;AAAA,SACrE,CAAA;AAAA,OACF;AAEA,MAAO,OAAA;AAAA,QACL,SAAA,EAAW,UAAU,IAAK,EAAA;AAAA,QAC1B,aAAA,EAAe,cAAc,IAAK,EAAA;AAAA,OACpC,CAAA;AAAA,KACD,CAAA,CAAA;AAAA,GACH,EAAG,CAAC,UAAU,CAAC,CAAA,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,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 +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,CAAA;AAC7C,EAAM,MAAA,EAAE,MAAO,EAAA,GAAI,SAAU,EAAA,CAAA;AAC7B,EAAM,MAAA,GAAA,GAAM,OAAO,WAAW,CAAA,CAAA;AAC9B,EAAM,MAAA,YAAA,GAAe,OAAO,oBAAoB,CAAA,CAAA;AAChD,EAAM,MAAA,QAAA,GAAW,OAAO,WAAW,CAAA,CAAA;AAEnC,EAAM,MAAA;AAAA,IACJ,OAAA;AAAA,IACA,KAAO,EAAA,oBAAA;AAAA,IACP,KAAA;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;AAAA,WACF,CAAA;AACA,UAAO,OAAA;AAAA,YACL,SAAA;AAAA,YACA,cAAc,YAAa,CAAA,eAAA;AAAA,cACzB,SAAA;AAAA,cACA,aAAA;AAAA,cACA,MAAA;AAAA,aACA,CAAA,GAAA;AAAA,YACF,aAAA;AAAA,YACA,QAAQ,QAAS,CAAA,OAAA;AAAA,WACnB,CAAA;AAAA,SACD,CAAA;AAAA,OACH,CAAA;AAAA,aACO,CAAG,EAAA;AACV,MAAA,QAAA,CAAS,KAAK,CAAC,CAAA,CAAA;AACf,MAAM,MAAA,CAAA,CAAA;AAAA,KACR;AAAA,KACC,CAAC,SAAA,EAAW,KAAK,YAAc,EAAA,QAAA,EAAU,MAAM,CAAC,CAAA,CAAA;AAEnD,EAAO,OAAA;AAAA,IACL;AAAA,MACE,OAAA;AAAA,MACA,oBAAA;AAAA,KACF;AAAA,IACA;AAAA,MACE,KAAA;AAAA,KACF;AAAA,GACF,CAAA;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,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 +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,mCAAA;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,+BACX,GAAA;AAEK,MAAM,mBAAsB,GAAA;;;;"}
@@ -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,OAAA;AACN,CAAC,EAAA;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,CAAA;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,CAAA;AAAA,KACnE,CAAA;AAAA,GACH;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,aAAe,EAAA,wBAAA;AAAA,GACjB;AACF,CAAC,EAAA;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,wBAAA;AAAA,GACb,CAAA;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,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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-kafka",
3
- "version": "0.3.39",
3
+ "version": "0.5.0",
4
4
  "description": "A Backstage plugin that integrates towards Kafka",
5
5
  "backstage": {
6
6
  "role": "frontend-plugin",
@@ -39,19 +39,19 @@
39
39
  "test": "backstage-cli package test"
40
40
  },
41
41
  "dependencies": {
42
- "@backstage/catalog-model": "^1.7.0",
43
- "@backstage/core-components": "^0.15.1",
44
- "@backstage/core-plugin-api": "^1.10.0",
45
- "@backstage/plugin-catalog-react": "^1.14.0",
42
+ "@backstage/catalog-model": "^1.7.3",
43
+ "@backstage/core-components": "^0.16.3",
44
+ "@backstage/core-plugin-api": "^1.10.3",
45
+ "@backstage/plugin-catalog-react": "^1.15.1",
46
46
  "@material-ui/core": "^4.12.2",
47
47
  "@material-ui/icons": "^4.9.1",
48
48
  "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
49
49
  "react-use": "^17.2.4"
50
50
  },
51
51
  "devDependencies": {
52
- "@backstage/cli": "^0.28.0",
53
- "@backstage/dev-utils": "^1.1.2",
54
- "@backstage/test-utils": "^1.7.0",
52
+ "@backstage/cli": "^0.29.6",
53
+ "@backstage/dev-utils": "^1.1.6",
54
+ "@backstage/test-utils": "^1.7.4",
55
55
  "@testing-library/dom": "^10.0.0",
56
56
  "@testing-library/jest-dom": "^6.0.0",
57
57
  "@testing-library/react": "^15.0.0",
@@ -68,5 +68,12 @@
68
68
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
69
69
  },
70
70
  "configSchema": "config.d.ts",
71
+ "typesVersions": {
72
+ "*": {
73
+ "index": [
74
+ "dist/index.d.ts"
75
+ ]
76
+ }
77
+ },
71
78
  "module": "./dist/index.esm.js"
72
79
  }