-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-2176]: fix "ResizeObserver loop" error in UI (#2215)
This pull request includes several changes to the frontend web application, focusing on refactoring the data flow components and updating GraphQL queries. The changes involve removing redundant code, updating imports, and modifying the way data is fetched and processed. ### Refactoring Data Flow Components: * [`frontend/webapp/components/overview/add-entity/index.tsx`](diffhunk://#diff-c2573243562745e61986b398f50211fc364b6391e2a2d792f518a72a86b44ea2R6-R8): Removed the `useComputePlatform` hook and the `FadeLoader` component, simplifying the `AddEntity` component. [[1]](diffhunk://#diff-c2573243562745e61986b398f50211fc364b6391e2a2d792f518a72a86b44ea2R6-R8) [[2]](diffhunk://#diff-c2573243562745e61986b398f50211fc364b6391e2a2d792f518a72a86b44ea2L75) [[3]](diffhunk://#diff-c2573243562745e61986b398f50211fc364b6391e2a2d792f518a72a86b44ea2L95-R94) * [`frontend/webapp/containers/main/overview/overview-data-flow/build-action-nodes.ts`](diffhunk://#diff-2a2957e6035bd001e3c0c52f29f01f4473b6b99a8ce4381a08e9de504916c3b1L3-R11): Updated the `Params` interface and the `buildActionNodes` function to use `ActionDataParsed` and a single `unfilteredCount` instead of `ComputePlatformMapped` and `EntityCounts`. [[1]](diffhunk://#diff-2a2957e6035bd001e3c0c52f29f01f4473b6b99a8ce4381a08e9de504916c3b1L3-R11) [[2]](diffhunk://#diff-2a2957e6035bd001e3c0c52f29f01f4473b6b99a8ce4381a08e9de504916c3b1L32-L35) [[3]](diffhunk://#diff-2a2957e6035bd001e3c0c52f29f01f4473b6b99a8ce4381a08e9de504916c3b1L48-R46) * [`frontend/webapp/containers/main/overview/overview-data-flow/build-destination-nodes.ts`](diffhunk://#diff-aa30a6b7893a9d1393f196b9846b1fdc19956c7c07f4099570cb25ff2f77fa43L3-R11): Similar updates as `build-action-nodes.ts`, using `ActualDestination` and `unfilteredCount`. [[1]](diffhunk://#diff-aa30a6b7893a9d1393f196b9846b1fdc19956c7c07f4099570cb25ff2f77fa43L3-R11) [[2]](diffhunk://#diff-aa30a6b7893a9d1393f196b9846b1fdc19956c7c07f4099570cb25ff2f77fa43L31-L34) [[3]](diffhunk://#diff-aa30a6b7893a9d1393f196b9846b1fdc19956c7c07f4099570cb25ff2f77fa43L47-R45) * [`frontend/webapp/containers/main/overview/overview-data-flow/build-rule-nodes.ts`](diffhunk://#diff-a37edc5ed2e31d0b06f407f3d1d5b155d499c689f95609db388f0e8246a1800bL3-R11): Updated to use `InstrumentationRuleSpecMapped` and `unfilteredCount`. [[1]](diffhunk://#diff-a37edc5ed2e31d0b06f407f3d1d5b155d499c689f95609db388f0e8246a1800bL3-R11) [[2]](diffhunk://#diff-a37edc5ed2e31d0b06f407f3d1d5b155d499c689f95609db388f0e8246a1800bL31-L34) [[3]](diffhunk://#diff-a37edc5ed2e31d0b06f407f3d1d5b155d499c689f95609db388f0e8246a1800bL47-R45) * [`frontend/webapp/containers/main/overview/overview-data-flow/build-source-nodes.ts`](diffhunk://#diff-278da68d858c88d202c10e2011bc1263fe6c0b543dc9d0fc4995a0f0675d3db1L3): Updated to use `K8sActualSource` and `unfilteredCount`. [[1]](diffhunk://#diff-278da68d858c88d202c10e2011bc1263fe6c0b543dc9d0fc4995a0f0675d3db1L3) [[2]](diffhunk://#diff-278da68d858c88d202c10e2011bc1263fe6c0b543dc9d0fc4995a0f0675d3db1L13-R12) [[3]](diffhunk://#diff-278da68d858c88d202c10e2011bc1263fe6c0b543dc9d0fc4995a0f0675d3db1L39-L42) ### Removing Redundant Code: * [`frontend/webapp/containers/main/overview/overview-data-flow/get-entity-counts.ts`](diffhunk://#diff-9180e7735f3b0a44ca96a2b3211d3f6adf63d412713f4f6e6b8cfe4566eb0e86L1-L21): Removed the `get-entity-counts.ts` file as it is no longer needed. * [`frontend/webapp/containers/main/overview/overview-data-flow/index.tsx`](diffhunk://#diff-ee7b35d91186596456e449c5e4d64517a4c905dc8735b0211d51a8b500d11e55L9-L20): Refactored to use CRUD hooks instead of `useComputePlatform`, and removed references to `getEntityCounts`. [[1]](diffhunk://#diff-ee7b35d91186596456e449c5e4d64517a4c905dc8735b0211d51a8b500d11e55L9-L20) [[2]](diffhunk://#diff-ee7b35d91186596456e449c5e4d64517a4c905dc8735b0211d51a8b500d11e55L38-R81) [[3]](diffhunk://#diff-ee7b35d91186596456e449c5e4d64517a4c905dc8735b0211d51a8b500d11e55L125-R120) ### Updating GraphQL Queries: * [`frontend/webapp/graphql/queries/compute-platform.ts`](diffhunk://#diff-31f9118ffb7e3400a45302bd5f30d621f58adaf33d086beb183bd302b980c521R6): Added new queries `GET_NAMESPACE`, `GET_SOURCES`, `GET_DESTINATIONS`, `GET_ACTIONS`, and `GET_INSTRUMENTATION_RULES`, and removed redundant parts of `GET_COMPUTE_PLATFORM`. [[1]](diffhunk://#diff-31f9118ffb7e3400a45302bd5f30d621f58adaf33d086beb183bd302b980c521R6) [[2]](diffhunk://#diff-31f9118ffb7e3400a45302bd5f30d621f58adaf33d086beb183bd302b980c521R17-R70) [[3]](diffhunk://#diff-31f9118ffb7e3400a45302bd5f30d621f58adaf33d086beb183bd302b980c521R102-R108) [[4]](diffhunk://#diff-31f9118ffb7e3400a45302bd5f30d621f58adaf33d086beb183bd302b980c521R121-R127) [[5]](diffhunk://#diff-31f9118ffb7e3400a45302bd5f30d621f58adaf33d086beb183bd302b980c521L90-L136)
- Loading branch information
1 parent
cef91ec
commit 9e10aff
Showing
17 changed files
with
271 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
frontend/webapp/containers/main/overview/overview-data-flow/get-entity-counts.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.