-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implementation ( Content Analytics Search): #30231 Implement Search form and results. #30390
Merged
+512
−28
Conversation
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
hmoreras
requested review from
oidacra,
nicobytes,
zJaaal,
rjvelazco and
valentinogiardino
October 22, 2024 20:46
nicobytes
requested changes
Oct 22, 2024
.../dot-analytics-search/portlet/src/lib/dot-analytics-search/dot-analytics-search.component.ts
Outdated
Show resolved
Hide resolved
core-web/libs/portlets/dot-analytics-search/portlet/jest.config.ts
Outdated
Show resolved
Hide resolved
oidacra
reviewed
Oct 22, 2024
core-web/libs/portlets/dot-analytics-search/portlet/tsconfig.json
Outdated
Show resolved
Hide resolved
oidacra
approved these changes
Oct 22, 2024
nicobytes
approved these changes
Oct 22, 2024
Quality Gate passedIssues Measures |
spbolton
pushed a commit
that referenced
this pull request
Nov 11, 2024
…orm and results. (#30390) ### Proposed Changes * Initial version of the Content Analytics search. ### Screenshots <img width="1213" alt="image" src="https://github.com/user-attachments/assets/eebf23a2-b455-435b-8cb7-282917707a87"> <img width="1643" alt="image" src="https://github.com/user-attachments/assets/f6c4712d-5ffa-40f4-bee3-d037deec7c13"> This pull request introduces a new analytics search feature and updates related components, services, and configurations to support it. The most important changes include adding a new service for analytics search, updating the routing module to include a new resolver, and modifying the component to handle analytics search queries and display results. ### New Analytics Search Feature: * [`core-web/libs/data-access/src/lib/dot-analytics-search/dot-analytics-search.service.ts`](diffhunk://#diff-088e89fee35bf9a339b6fee96c3b70a9b3951e498b953582efe6d7a8bbb8c07dR1-R43): Added `DotAnalyticsSearchService` to perform analytics search operations with methods for making POST requests to specific endpoints. * [`core-web/libs/data-access/src/lib/dot-analytics-search/dot-analytics-search.service.spec.ts`](diffhunk://#diff-468bba47163d237961e388bddf913b9a105879d9ae68dbc2e5d7c8b2342d8fddR1-R37): Added unit tests for `DotAnalyticsSearchService` to verify the POST requests and response handling. * [`core-web/libs/dotcms-models/src/lib/dot-content-analytics.model.ts`](diffhunk://#diff-d296d98d7e78a0ba6f48c6706ba8aa9f358aa41b033b449e69ad6bfaefc4b2b7R1-R4): Introduced `AnalyticsQueryType` enum to differentiate between default and cube query types. ### Component Updates: * [`core-web/libs/portlets/dot-analytics-search/portlet/src/lib/dot-analytics-search/dot-analytics-search.component.ts`](diffhunk://#diff-fa944beb3f94e677d995ccf0c2bde8e94332d5f9767887e1c71974d18e1e580eR1-R66): Updated `DotAnalyticsSearchComponent` to integrate with the new service, handle user queries, and display results using `ngx-monaco-editor`. * [`core-web/libs/portlets/dot-analytics-search/portlet/src/lib/dot-analytics-search/dot-analytics-search.component.html`](diffhunk://#diff-f345130de7c17933ec8236c79bbf53077fa6d6d8d187cd8589f083796ff0f886L1-R27): Modified the template to include sections for query input and results display. * [`core-web/libs/portlets/dot-analytics-search/portlet/src/lib/dot-analytics-search/dot-analytics-search.component.spec.ts`](diffhunk://#diff-2269342f0e34e2946cf219e6f852372d86e5883c9df8066e93f4167d755cae4aL1-R71): Added tests for `DotAnalyticsSearchComponent` to ensure proper initialization and query handling. ### Routing and Configuration: * [`core-web/apps/dotcms-ui/src/app/app-routing.module.ts`](diffhunk://#diff-6c7f381c5033c96909090cb6d24c4507c999ed3ccec1ec3b74958152f21a572fR76-R81): Added `DotEnterpriseLicenseResolver` to the route configuration for `analytics-search` path and updated the route to use `MenuGuardService`. * [`core-web/libs/portlets/dot-analytics-search/portlet/jest.config.ts`](diffhunk://#diff-15deaf36e0a2d3f5b2fdd099a1d0640c96b5e7c0f5ac08dbe37b127a2a96aa66L3-R7): Updated Jest configuration to reflect the new project structure and added `@happy-dom/jest-environment` for testing. [[1]](diffhunk://#diff-15deaf36e0a2d3f5b2fdd099a1d0640c96b5e7c0f5ac08dbe37b127a2a96aa66L3-R7) [[2]](diffhunk://#diff-15deaf36e0a2d3f5b2fdd099a1d0640c96b5e7c0f5ac08dbe37b127a2a96aa66L21-R23) These changes collectively introduce a robust analytics search feature, ensuring it is well-integrated and thoroughly tested.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Screenshots
This pull request introduces a new analytics search feature and updates related components, services, and configurations to support it. The most important changes include adding a new service for analytics search, updating the routing module to include a new resolver, and modifying the component to handle analytics search queries and display results.
New Analytics Search Feature:
core-web/libs/data-access/src/lib/dot-analytics-search/dot-analytics-search.service.ts
: AddedDotAnalyticsSearchService
to perform analytics search operations with methods for making POST requests to specific endpoints.core-web/libs/data-access/src/lib/dot-analytics-search/dot-analytics-search.service.spec.ts
: Added unit tests forDotAnalyticsSearchService
to verify the POST requests and response handling.core-web/libs/dotcms-models/src/lib/dot-content-analytics.model.ts
: IntroducedAnalyticsQueryType
enum to differentiate between default and cube query types.Component Updates:
core-web/libs/portlets/dot-analytics-search/portlet/src/lib/dot-analytics-search/dot-analytics-search.component.ts
: UpdatedDotAnalyticsSearchComponent
to integrate with the new service, handle user queries, and display results usingngx-monaco-editor
.core-web/libs/portlets/dot-analytics-search/portlet/src/lib/dot-analytics-search/dot-analytics-search.component.html
: Modified the template to include sections for query input and results display.core-web/libs/portlets/dot-analytics-search/portlet/src/lib/dot-analytics-search/dot-analytics-search.component.spec.ts
: Added tests forDotAnalyticsSearchComponent
to ensure proper initialization and query handling.Routing and Configuration:
core-web/apps/dotcms-ui/src/app/app-routing.module.ts
: AddedDotEnterpriseLicenseResolver
to the route configuration foranalytics-search
path and updated the route to useMenuGuardService
.core-web/libs/portlets/dot-analytics-search/portlet/jest.config.ts
: Updated Jest configuration to reflect the new project structure and added@happy-dom/jest-environment
for testing. [1] [2]These changes collectively introduce a robust analytics search feature, ensuring it is well-integrated and thoroughly tested.