Skip to content

Origin/usage report page #664

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

Open
wants to merge 14 commits into
base: dev
Choose a base branch
from
Open

Conversation

SuryaNarayanan-Kgs
Copy link
Contributor

Description

Changes Made

How to Test

  1. Steps to reproduce/test the behavior
  2. Expected outcomes

Notes

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@SuryaNarayanan-Kgs SuryaNarayanan-Kgs requested a review from a team as a code owner March 5, 2025 15:08
@SuryaNarayanan-Kgs SuryaNarayanan-Kgs self-assigned this Mar 5, 2025
Copy link

github-actions bot commented Mar 5, 2025

@CodiumAI-Agent /describe

@CodiumAI-Agent
Copy link

Title

Origin/usage report page


User description

Description

Changes Made

How to Test

  1. Steps to reproduce/test the behavior
  2. Expected outcomes

Notes


PR Type

  • Enhancement

Description

  • Add EngineReportPage for usage reporting

  • Create UsagePerUserTable and UsagePerProjectTable components

  • Update engine routes with new usage report path


Changes walkthrough 📝

Relevant files
Enhancement
EngineReportPage.tsx
New EngineReportPage component with usage tables                 

packages/client/src/pages/engine/EngineReportPage.tsx

  • Introduces EngineReportPage component for usage reporting
  • Uses hooks to determine usage table data
  • Renders separate styled containers for user and project tables
  • +53/-0   
    UsagePerProjectTable.tsx
    Add usage per project table component                                       

    packages/client/src/pages/engine/UsagePerProjectTable.tsx

  • Adds UsagePerProjectTable component
  • Implements styled table for project usage data
  • Maps headers and values for display in table
  • +52/-0   
    UsagePerUserTable.tsx
    Add usage per user table component                                             

    packages/client/src/pages/engine/UsagePerUserTable.tsx

  • Adds UsagePerUserTable component for user data
  • Uses styled container and table from semoss UI
  • Maps headers and values for user usage display
  • +47/-0   
    Configuration changes
    engine.constants.ts
    Update engine routes with usage report route                         

    packages/client/src/pages/engine/engine.constants.ts

  • Integrates EngineReportPage into engine routes
  • Adds a "Usage Report" route for different engine types
  • Restricts route access to OWNER roles
  • +32/-0   

    Need help?
  • Type /help how to ... in the comments thread for any questions about PR-Agent usage.
  • Check out the documentation for more information.
  • Copy link

    github-actions bot commented Mar 5, 2025

    @CodiumAI-Agent /review

    @CodiumAI-Agent
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Template Safety

    The pixel query strings use template literals with direct interpolation of id. While this is common practice, please confirm that the id value is properly validated or sanitized to avoid unintended side effects.

    ? `GetEngineUsagePerUser(engine='${id}');`
    : '';
    Route Duplication

    The addition of the 'Usage Report' route appears in multiple sections. Verify that this duplication is intentional and that it won’t cause maintenance or routing conflicts in the future.

    {
        name: 'Usage Report',
        path: 'usageReport',
        component: EngineReportPage,
        restrict: ['OWNER'],
    },

    Copy link

    github-actions bot commented Mar 5, 2025

    @CodiumAI-Agent /improve

    @CodiumAI-Agent
    Copy link

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Correct import case sensitivity

    Ensure the import path matches the file name's casing to avoid issues on
    case-sensitive systems.

    packages/client/src/pages/engine/engine.constants.ts [22]

    -import { EngineReportPage } from './engineReportPage';
    +import { EngineReportPage } from './EngineReportPage';
    Suggestion importance[1-10]: 8

    __

    Why: The suggestion addresses a potential issue on case‐sensitive file systems by correcting the file name casing, and the improved code accurately reflects the modification.

    Medium

    @ppatel9703 ppatel9703 marked this pull request as draft March 5, 2025 16:38

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    @SuryaNarayanan-Kgs SuryaNarayanan-Kgs linked an issue Mar 10, 2025 that may be closed by this pull request
    SuryaNarayanan-Kgs and others added 8 commits March 11, 2025 19:30

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    …moss-ui into origin/UsageReportPage
    @SuryaNarayanan-Kgs SuryaNarayanan-Kgs marked this pull request as ready for review May 20, 2025 09:51
    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.

    [FE] Add Engine Usage Tab under Engine Details Page
    4 participants