strimzi-ui icon indicating copy to clipboard operation
strimzi-ui copied to clipboard

feat: Add useTopics model hook and query for topics listing

Open ajborley opened this issue 4 years ago • 2 comments

  • This commit adds a new useTopics model hook, which makes GraphQL requests to the server to administer Kafka topics.
  • The hook returns a set of sub-hooks, with just the useGetTopics sub-hook implemented for now. useGetTopics returns the list of topics (including name, number of partitions and number of replicas).

Contributes to: #124

Signed-off-by: Andrew Borley [email protected]

ajborley avatar Dec 02 '20 16:12 ajborley

PR Report

Bundle Sizes

View bundle sizes for 'client'
Bundle New Size Original Size Increase/Decrease File
1.bundle.js 633.3KB 631.33KB 0% 1.bundle.js
Strimzi UI JS Bundle 12.09KB 11.08KB 9% main.bundle.js
Overall bundle size change: 0.47%
View bundle sizes for 'server'
Bundle New Size Original Size Increase/Decrease File
Strimzi UI Server JS Bundle 26.71KB 26.67KB 0% main.js
Overall bundle size change: 0.16%

Test Coverage

View test coverage
File Lines Statement Functions Branches
Total 100% 100% 100% 100%
client/Bootstrap/Navigation/useRouteConfig/useRouteConfig.hook.ts 100% 100% 100% 100%
client/Contexts/ConfigFeatureFlag/Context.tsx 100% 100% 100% 100%
client/Contexts/ConfigFeatureFlag/FeatureFlag.view.tsx 100% 100% 100% 100%
client/Contexts/Introspect/Introspection.ts 100% 100% 100% 100%
client/Contexts/Logging/Context.tsx 100% 100% 100% 100%
client/Hooks/useConfigFeatureFlag/useConfigFeatureFlag.ts 100% 100% 100% 100%
client/Hooks/useLogger/Hook.ts 100% 100% 100% 100%
client/Panels/Home/Home.tsx 100% 100% 100% 100%
client/Panels/Topics/Model.ts 100% 100% 100% 100%
client/Panels/Topics/View.carbon.tsx 100% 100% 100% 100%
client/Utils/sanitise/sanitise.ts 100% 100% 100% 100%
client/Utils/window/window.ts 100% 100% 100% 100%
File Lines Statement Functions Branches
Total 100% 100% 100% 100%
server/api/controller.ts 100% 100% 100% 100%
server/api/router.ts 100% 100% 100% 100%
server/client/controller.ts 100% 100% 100% 100%
server/client/router.ts 100% 100% 100% 100%
server/config/controller.ts 100% 100% 100% 100%
server/config/router.ts 100% 100% 100% 100%
server/core/app.ts 100% 100% 100% 100%
server/core/modules.ts 100% 100% 100% 100%
server/log/router.ts 100% 100% 100% 100%
server/mockapi/data.ts 100% 100% 100% 100%
server/mockapi/router.ts 100% 100% 100% 100%

Triggered by commit: a4c0f81b856c372d2e17d7e4a2194803ccd81d9f

github-actions[bot] avatar Dec 02 '20 16:12 github-actions[bot]

@matthew-chirgwin - I have pushed up a new commit based on your suggestions. It seems to work fine in webpack-dev-server and the e2e server, and tests are passing, but I'm getting an eslint warning that I haven't been able to get past so far.

ajborley avatar Dec 07 '20 21:12 ajborley