Skip to content

Add a new tab for version and environment info #76

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

Merged
merged 4 commits into from
Jun 11, 2025

Conversation

manavgup
Copy link
Contributor

📝 Pull Request Template Selection

Thank you for contributing! To help us review your pull request effectively, please select the appropriate template:

  1. Backend (mcpgateway/version.py):

    • Added a new FastAPI router mounted at /version.
    • The /version endpoint returns diagnostics data as JSON, full HTML, or a partial HTML fragment.
    • The partial HTML fragment is rendered using the new template version_info_partial.html.
    • The endpoint requires authentication.
    • The partial response logs "Serving partial version info" (currently a print statement).
  2. Frontend (mcpgateway/static/admin.js):

    • Added a new tab "Version and Environment Info" with id "tab-version-info".
    • Added an event listener for clicking this tab that logs "Version and Environment Info tab clicked - triggering showTab" and calls showTab("version-info").
    • The tab panel with id "version-info-panel" loads the partial HTML from /version?partial=true via fetch.
  3. Templates:

    • version_info_partial.html: A styled card displaying version and environment info with a "Copy JSON to Clipboard" button.
    • admin.html: Added the new tab "Version and Environment Info" in the navigation and a corresponding hidden div panel for the content.

image

@crivetimihai
Copy link
Member

Love it, having it integrated into the UI as opposed to an external link is great. We should expand the fields with a future PR.

@crivetimihai
Copy link
Member

@kevalmahajan can you also run a test before we merge please?

@crivetimihai crivetimihai self-requested a review June 10, 2025 18:46
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Copy link
Collaborator

@madhav165 madhav165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manavgup I tried adding a gateway from the Gateways/MCP Servers tab, but could not. Looks like the "Add Gateway" functionality is broken from the UI. Did not see any calls going to the MCP server.

Signed-off-by: Madhav Kandukuri <madhav165@gmail.com>
Copy link
Collaborator

@madhav165 madhav165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@manavgup Identified the issue and created a PR for your fork: https://github.com/manavgup/mcp-context-forge/pull/1/files. Please merge so we can merge this PR.

Copy link
Collaborator

@madhav165 madhav165 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, looks fine

Copy link
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and with Docker Compose, looks good!

@crivetimihai crivetimihai merged commit b0925a7 into IBM:main Jun 11, 2025
13 of 15 checks passed
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