NETOBSERV-2693 Open Flowcollector status page from OLM page#1570
NETOBSERV-2693 Open Flowcollector status page from OLM page#1570jpinsonneau wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/cherry-pick main |
|
@jpinsonneau: once the present PR merges, I will cherry-pick it on top of DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
web/src/components/forms/resource-watcher.tsx (1)
154-154: 💤 Low valueExtract magic number to a named constant.
The 1000ms delay is a workaround for K8s watch behavior. A named constant improves clarity and makes it easier to tune later.
♻️ Suggested change
+const CR_MISSING_CONFIRMATION_DELAY_MS = 1000; + export const ResourceWatcher: FC<ResourceWatcherProps> = ({Then at line 154:
- const timer = window.setTimeout(() => setMissingConfirmed(true), 1000); + const timer = window.setTimeout(() => setMissingConfirmed(true), CR_MISSING_CONFIRMATION_DELAY_MS);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@web/src/components/forms/resource-watcher.tsx` at line 154, Replace the hardcoded 1000ms value in the window.setTimeout call that sets setMissingConfirmed(true) with a named constant. Define a constant at the module level (near the top of the file) with a semantic name that reflects its purpose as a K8s watch behavior workaround delay, then use that constant in place of the magic number 1000 to improve code clarity and maintainability.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@web/locales/en/plugin__netobserv-plugin.json`:
- Line 223: Fix the spelling errors in the translation key and value that appear
in user-facing error messages. In web/locales/en/plugin__netobserv-plugin.json
at line 223, correct the key and value by changing "occured" to "occurred" and
"retreiving" to "retrieving" in both the key name and the string value. Then in
web/src/components/forms/flowCollector-status.tsx at line 180, update the t()
translation call to use the corrected translation key name that reflects the
fixed spelling.
---
Nitpick comments:
In `@web/src/components/forms/resource-watcher.tsx`:
- Line 154: Replace the hardcoded 1000ms value in the window.setTimeout call
that sets setMissingConfirmed(true) with a named constant. Define a constant at
the module level (near the top of the file) with a semantic name that reflects
its purpose as a K8s watch behavior workaround delay, then use that constant in
place of the magic number 1000 to improve code clarity and maintainability.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c974798f-4b19-4faa-9f74-3d90408961b7
📒 Files selected for processing (9)
web/locales/en/plugin__netobserv-plugin.jsonweb/src/components/forms/flowCollector-status.tsxweb/src/components/forms/flowCollector.tsxweb/src/components/forms/resource-watcher.tsxweb/src/components/forms/utils.tsweb/src/components/status/__tests__/flowcollector-status.spec.tsxweb/src/utils/k8s-models-hook.tsweb/src/utils/url.tsweb/webpack.config.ts
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Rebased without changes |
|
@jpinsonneau: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
Dependencies
n/a
Checklist
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Tests