Skip to content

Conversation

@samirtechlab
Copy link
Contributor

@samirtechlab samirtechlab commented Nov 21, 2025

Issue

https://gravitee.atlassian.net/browse/GKO-1897

Description

Make the Stats and Pie Widgets use the real data from the backend.

Screenshot 2025-11-25 at 11 53 46 Screenshot 2025-11-25 at 11 53 25

@samirtechlab samirtechlab requested a review from a team as a code owner November 21, 2025 18:16
@gemini-code-assist
Copy link

Summary of Changes

Hello @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

  • Real Data Integration: The Stats Widget now utilizes real data fetched from the backend, enhancing the accuracy and relevance of displayed information.
  • Base URL Configuration: The component is now configured to use a base URL, facilitating easier environment configuration and API endpoint management.
  • Code Cleanup: Unnecessary enum imports and metric/measure names have been removed from multiple files, streamlining the codebase.
  • Formatting: Stats are now formatted according to locale.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@samirtechlab samirtechlab force-pushed the feat/GKO-1897-Renderer-us-real-data-from-backend branch from 39967d1 to 6c355d3 Compare November 21, 2025 18:19
Copy link

@gemini-code-assist gemini-code-assist bot left a 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.

Copy link
Contributor

@jourdiw jourdiw left a 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 🤔

@samirtechlab samirtechlab changed the title feat(dashboard-lib): Make stats widget using real data from the backend feat(dashboard-lib): Make stats and pie widgets using real data from the backend Nov 25, 2025
@samirtechlab samirtechlab enabled auto-merge (rebase) November 25, 2025 10:55
@samirtechlab samirtechlab force-pushed the feat/GKO-1897-Renderer-us-real-data-from-backend branch from d9f14d3 to 0b5e5cf Compare November 25, 2025 11:35
@samirtechlab samirtechlab enabled auto-merge (rebase) November 25, 2025 13:37
@samirtechlab samirtechlab merged commit 7aacecc into master Nov 25, 2025
36 of 37 checks passed
@samirtechlab samirtechlab deleted the feat/GKO-1897-Renderer-us-real-data-from-backend branch November 25, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants