Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-1724]: create a component for source containers info (display in…
… drawer) (#1893) This pull request includes significant updates to the frontend codebase, focusing on improving the handling of programming language icons and adding a new component for container details. The key changes involve refactoring utility functions, updating component imports, and introducing new styled components. ### Improvements to programming language handling: * [`frontend/webapp/containers/main/sources/source-drawer-container/index.tsx`](diffhunk://#diff-d4745da2f63be90cb1f7af8ea29fb2f37cf0a80f0f04a207b6fc9149855ca6d5L9-R12): Replaced `getMainContainerLanguageLogo` with `getProgrammingLanguageIcon` for better icon handling and added `ContainerDetails` component to display detected containers. [[1]](diffhunk://#diff-d4745da2f63be90cb1f7af8ea29fb2f37cf0a80f0f04a207b6fc9149855ca6d5L9-R12) [[2]](diffhunk://#diff-d4745da2f63be90cb1f7af8ea29fb2f37cf0a80f0f04a207b6fc9149855ca6d5L105-R105) [[3]](diffhunk://#diff-d4745da2f63be90cb1f7af8ea29fb2f37cf0a80f0f04a207b6fc9149855ca6d5R127) * [`frontend/webapp/utils/functions/icons.ts`](diffhunk://#diff-869883e9c9018f4ea6797d1fd860989852023765e868dcdee9fc50d72ad667c2R48-R68): Added `getProgrammingLanguageIcon` function to fetch programming language icons based on the language. ### New component for container details: * [`frontend/webapp/reuseable-components/container-details/index.tsx`](diffhunk://#diff-efc30c3f1c39f706aa0796927eac89e9cee190ea773e9e30d8d611cd30e81b4aR1-R123): Introduced `ContainerDetails` component to display details of detected containers, including their names, languages, and instrumentation status. * [`frontend/webapp/reuseable-components/index.ts`](diffhunk://#diff-ab2c0f4825fb371714af6d7da808d6a9ed85b1b0d55135316364fb5500c1f1f8R36): Exported `ContainerDetails` from reusable components. ### Refactoring and cleanup: * [`frontend/webapp/utils/constants/programming-languages.ts`](diffhunk://#diff-214a28f6c56d77642ca8d1a14cbb3bf89b14a33da8fdb4506c76a6533bfea0a4L3-L4): Removed `LANGUAGES_LOGOS` and `LANGUAGES_COLORS` constants and the `getMainContainerLanguageLogo` function, consolidating icon handling into `getProgrammingLanguageIcon`. [[1]](diffhunk://#diff-214a28f6c56d77642ca8d1a14cbb3bf89b14a33da8fdb4506c76a6533bfea0a4L3-L4) [[2]](diffhunk://#diff-214a28f6c56d77642ca8d1a14cbb3bf89b14a33da8fdb4506c76a6533bfea0a4L22-R20) [[3]](diffhunk://#diff-214a28f6c56d77642ca8d1a14cbb3bf89b14a33da8fdb4506c76a6533bfea0a4L70-L92) * [`frontend/webapp/types/sources.ts`](diffhunk://#diff-2e094683c1e156a4d3b841453d12f98342db28ae37230264200cf979063268b9L1-R6): Updated `SourceContainer` type to use `WORKLOAD_PROGRAMMING_LANGUAGES` enum. These changes collectively enhance the frontend's ability to handle and display programming language information more efficiently and add new functionality for container details visualization.
- Loading branch information