-
Notifications
You must be signed in to change notification settings - Fork 92
feat(dashboard-lib): Make stats and pie widgets using real data from the backend #14153
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
feat(dashboard-lib): Make stats and pie widgets using real data from the backend #14153
Conversation
Summary of ChangesHello @samirtechlab, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the dashboard's analytics viewer by integrating real-time data from the backend into the Stats Widget. It also improves code maintainability by removing redundant imports and standardizing metric names, and adds a base URL configuration for easier deployment across different environments. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
39967d1 to
6c355d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request successfully connects the stats widget to use real data from the backend by introducing a baseURL, updating the dashboard service to perform HTTP requests, and adding a converter for data formatting. The refactoring of enums to string literal types across the dashboard library is a solid improvement for type safety and consistency with API data. My review includes feedback on a few points to improve robustness and maintainability: a risky change to a type guard, a hardcoded URL that should be configurable, a misplaced CSS rule, a misleading method name, and a suggestion to improve data formatting precision.
...xt/projects/gravitee-dashboard/src/lib/components/widget/model/response/measures-response.ts
Outdated
Show resolved
Hide resolved
...ojects/gravitee-dashboard/src/lib/components/text/stats/converter/stats-converter.service.ts
Outdated
Show resolved
Hide resolved
...ortal-webui-next/projects/gravitee-dashboard/src/lib/components/widget/widget.component.scss
Outdated
Show resolved
Hide resolved
...tee-apim-portal-webui-next/projects/gravitee-dashboard/src/lib/gravitee-dashboard.service.ts
Outdated
Show resolved
Hide resolved
...al-webui-next/projects/gravitee-dashboard/src/lib/components/text/stats/stats.component.scss
Outdated
Show resolved
Hide resolved
...ortal-webui-next/projects/gravitee-dashboard/src/lib/components/widget/widget.component.scss
Outdated
Show resolved
Hide resolved
jourdiw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 😎
Maybe injection tokens could be an interesting strategy for the baseUrl 🤔
d9f14d3 to
0b5e5cf
Compare
Issue
https://gravitee.atlassian.net/browse/GKO-1897
Description
Make the Stats and Pie Widgets use the real data from the backend.