Skip to content

Frontend: Pod: Added Deeplink compatibility for viewing logs#4399

Merged
illume merged 1 commit intokubernetes-sigs:mainfrom
mudit06mah:logDeepLink
Jan 31, 2026
Merged

Frontend: Pod: Added Deeplink compatibility for viewing logs#4399
illume merged 1 commit intokubernetes-sigs:mainfrom
mudit06mah:logDeepLink

Conversation

@mudit06mah
Copy link
Contributor

@mudit06mah mudit06mah commented Jan 20, 2026

Summary

This PR let's users to add ?view=logs to the URL to get logs for a pod.

Related Issue

Fixes #4348

Changes

Changed Details.tsx to check for query params, if found it activates log window.

Steps to Test

Through Deeplink:

  • For any pod, go to: /c/{cluster}/pods/{namespace}/{pod-name}?view=logs, it opens up the logs for that particular pod.

From client Side:

  • Open browser console for the pod Details page and write: window.history.pushState({}, '', window.location.pathname + '?view=logs');
  • Then to dispatch that event to the router, add: window.dispatchEvent(new PopStateEvent('popstate'));

Screenshots (if applicable)

image

@k8s-ci-robot k8s-ci-robot requested a review from illume January 20, 2026 12:01
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 20, 2026
@k8s-ci-robot k8s-ci-robot requested a review from sniok January 20, 2026 12:01
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 20, 2026
@mudit06mah mudit06mah changed the title Added Deeplink compatibility for viewing logs Frontend: Pod: Added Deeplink compatibility for viewing logs Jan 21, 2026
@mudit06mah
Copy link
Contributor Author

This PR passes all tests and is ready to be merged.

@mudit06mah
Copy link
Contributor Author

mudit06mah commented Jan 21, 2026

@sniok It appears I was unaware of i18n translation.
image

This PR should pass without any errors now :)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for deep-linking directly into a Pod’s logs view via ?view=logs, so opening a pod details URL with that query param automatically launches the logs activity.

Changes:

  • Parse the view query parameter in PodDetails and auto-launch logs when view=logs.
  • Refactor the “Show Logs” action handler to reuse a shared launchLogs helper.
  • Normalize/move the Logs i18n glossary key placement across multiple locales.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
frontend/src/components/pod/Details.tsx Adds view=logs query-param handling and refactors log-launching into a helper used by both the button and deep link.
frontend/src/i18n/locales/en/glossary.json Moves/ensures the Logs key exists in the expected position.
frontend/src/i18n/locales/de/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/es/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/fr/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/hi/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/it/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/ja/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/ko/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/pt/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/ta/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/zh/glossary.json Moves the Logs key entry for consistency.
frontend/src/i18n/locales/zh-tw/glossary.json Moves the Logs key entry for consistency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mudit06mah
Copy link
Contributor Author

mudit06mah commented Jan 25, 2026

@illume I have made the changes suggested by copilot.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

Looking good. Thanks for those changes 🎉

Can you please answer the two questions I left? After you update the testing scenarios in the PR description I will manually test it.

@mudit06mah
Copy link
Contributor Author

@illume @sniok I have made all the changes mentioned by copilot and maintainers and ran all tests as well. Can you please review this again?

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@illume
Copy link
Contributor

illume commented Jan 30, 2026

Thanks @ranjit-parva for the review/testing.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 31, 2026
@mudit06mah
Copy link
Contributor Author

@illume Made all changes suggested by copilot, Please review this again 👾

@mudit06mah mudit06mah requested review from illume and sniok January 31, 2026 10:57
Copy link
Contributor

@illume illume left a comment

Choose a reason for hiding this comment

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

🎉 thanks!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: illume, mudit06mah, ranjit-parva

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 31, 2026
@illume illume merged commit 6e59afb into kubernetes-sigs:main Jan 31, 2026
11 of 12 checks passed
@ashu8912 ashu8912 added this to the v0.40.0 milestone Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI] Deeplink to pod logs view

6 participants