-
Notifications
You must be signed in to change notification settings - Fork 136
[backups,dashboard] User-facing UI #1737
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
Conversation
📝 WalkthroughWalkthroughAdds dashboard integration for Backups (Plans, BackupJobs, Backups): new Backups sidebar section, hardcoded menu entries, custom list column overrides, three detail factories (plan/backupjob/backup), a non-exported application-ref helper, and an integration README. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom Pre-merge checks in the settings. ✨ Finishing touches
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 |
Summary of ChangesHello @lllamnyp, 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 by adding a dedicated user interface for 'backup Plans', enabling better visibility and management of backup resources. Concurrently, it provides detailed documentation to streamline the future integration of other Kubernetes resources into the dashboard, ensuring a consistent and extensible UI framework. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 adds the UI for backup Plan resources to the dashboard, including list and detail views, and a sidebar entry. It also introduces a comprehensive README.md guide for adding new resources to the dashboard. The changes are well-structured and follow the existing patterns.
However, I've identified a recurring issue with how object references (like applicationRef, storageRef, strategyRef) are formatted for display. The current implementation will render them incorrectly when the apiGroup is not present. This issue is present in the new helper function, the Plan details factory, and is also documented in the new README.md. I've left detailed comments on how to address this. Additionally, I've pointed out some minor inaccuracies in line number references in the new documentation.
| parsedText("application-ref-value", | ||
| "{reqsJsonPath[0]['.spec.applicationRef.kind']['-']}.{reqsJsonPath[0]['.spec.applicationRef.apiGroup']['-']}/{reqsJsonPath[0]['.spec.applicationRef.name']['-']}", | ||
| nil), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example provided for displaying object references is flawed. When apiGroup is empty, the resulting string will be Kind./name instead of the desired Kind/name. This is because the dot . separator is hardcoded. This pattern is also used in static_refactored.go for applicationRef, storageRef, and strategyRef. This should be corrected to handle cases where apiGroup is not present. Consider using a custom formatter or a component that supports conditional rendering to build this string correctly.
| antdFlexVertical("spec-application-ref-block", 4, []any{ | ||
| antdText("application-ref-label", true, "Application", nil), | ||
| parsedText("application-ref-value", "{reqsJsonPath[0]['.spec.applicationRef.kind']['-']}.{reqsJsonPath[0]['.spec.applicationRef.apiGroup']['-']}/{reqsJsonPath[0]['.spec.applicationRef.name']['-']}", nil), | ||
| }), | ||
| antdFlexVertical("spec-storage-ref-block", 4, []any{ | ||
| antdText("storage-ref-label", true, "Storage", nil), | ||
| parsedText("storage-ref-value", "{reqsJsonPath[0]['.spec.storageRef.kind']['-']}.{reqsJsonPath[0]['.spec.storageRef.apiGroup']['-']}/{reqsJsonPath[0]['.spec.storageRef.name']['-']}", nil), | ||
| }), | ||
| antdFlexVertical("spec-strategy-ref-block", 4, []any{ | ||
| antdText("strategy-ref-label", true, "Strategy", nil), | ||
| parsedText("strategy-ref-value", "{reqsJsonPath[0]['.spec.strategyRef.kind']['-']}.{reqsJsonPath[0]['.spec.strategyRef.apiGroup']['-']}/{reqsJsonPath[0]['.spec.strategyRef.name']['-']}", nil), | ||
| }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block for displaying applicationRef, storageRef, and strategyRef has the same issue as the createApplicationRefColumn helper. The string concatenation will result in an incorrect format like Kind./name when apiGroup is empty. This pattern should be corrected for all three references to ensure they display correctly. This is a recurring issue in this PR and should be addressed with a robust solution, for example by creating a helper function that correctly formats these references.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
internal/controller/dashboard/sidebar.go (1)
311-322:orderCategoryLabelsfunction is out of sync with documented category order.The main
ensureSidebarfunction documents the category order as "Marketplace, IaaS, PaaS, NaaS, <others A→Z>, Resources, Backups, Administration", but theorderCategoryLabelsfunction's comment (line 316) omits "Backups" and itstailslice (line 323) contains only["Resources", "Administration"].While this currently works because "Backups" is hardcoded and explicitly skipped in the dynamic loop (line 149), the mismatch creates inconsistency. Update the
orderCategoryLabelscomment and tail slice to include "Backups" for consistency with the documented order and to prevent confusion during future refactoring.
🧹 Nitpick comments (4)
internal/controller/dashboard/README.md (3)
284-285: Add language specifier to fenced code block.The code block starting at line 284 lacks a language specifier. Since this is a prompt template, consider adding
textormarkdownas the language identifier for consistency with linting rules.🔎 Proposed fix
-``` +```text Please add support for the {ResourceKind} resource ({group}/{version}/{plural}) to the Cozystack dashboard.
352-352: Convert bare URL to markdown link.Per markdown best practices, wrap the URL in angle brackets or use a proper markdown link format.
🔎 Proposed fix
-- Kubernetes API Conventions: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md +- Kubernetes API Conventions: <https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md>
321-324: Hardcoded line numbers will become stale.References like "Lines 375-379 in
static_refactored.go" will become outdated as the codebase evolves. Consider using function/section names or code search patterns instead of exact line numbers.internal/controller/dashboard/static_refactored.go (1)
1443-1557: Consider adding a YAML tab for consistency.The Plan factory only includes a "Details" tab, while other similar factories (secret, service, ingress, workloadmonitor) also include a "YAML" tab for viewing/editing the resource definition. If Plan resources should be viewable/editable via YAML, consider adding a YAML tab following the pattern used in other factories.
🔎 Example YAML tab to add after the details tab
map[string]any{ "key": "yaml", "label": "YAML", "children": []any{ map[string]any{ "type": "YamlEditorSingleton", "data": map[string]any{ "id": "yaml-editor", "cluster": "{2}", "isNameSpaced": true, "prefillValuesRequestIndex": 0, "substractHeight": float64(400), "type": "api", "typeName": "plans", "apiGroup": "backups.cozystack.io", "apiVersion": "v1alpha1", }, }, }, },
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
internal/controller/dashboard/README.md(1 hunks)internal/controller/dashboard/sidebar.go(6 hunks)internal/controller/dashboard/static_helpers.go(1 hunks)internal/controller/dashboard/static_refactored.go(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
Use Controller-runtime patterns and kubebuilder style for Go code
Files:
internal/controller/dashboard/sidebar.gointernal/controller/dashboard/static_refactored.gointernal/controller/dashboard/static_helpers.go
🧬 Code graph analysis (1)
internal/controller/dashboard/static_refactored.go (1)
internal/controller/dashboard/unified_helpers.go (1)
UnifiedResourceConfig(211-219)
🪛 markdownlint-cli2 (0.18.1)
internal/controller/dashboard/README.md
284-284: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
352-352: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
🔇 Additional comments (4)
internal/controller/dashboard/sidebar.go (2)
115-116: LGTM!The
keysAndTagsentry for plans correctly maps toplan-sidebar, which matches the sidebar tag that will be generated bycreateUnifiedFactoryfor the Plan resource.
169-180: LGTM!The hardcoded "Backups" section follows the established pattern used for "Marketplace" and "Administration". The link format and structure are consistent with other menu items.
internal/controller/dashboard/static_refactored.go (2)
374-380: LGTM!The CustomColumnsOverride for Plans is correctly configured with:
- Proper ID format matching the API path
- Name column with badge and link to the detail page
- Application column using the new helper function
- Created timestamp column
The navigation link
/factory/plan-details/{name}correctly matches the factory key.
1559-1569: LGTM!The plan-details factory is correctly added to the return list, completing the integration.
d9ba772 to
88da2d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (1)
internal/controller/dashboard/static_refactored.go (1)
1530-1541: Fix string concatenation for reference display.The string concatenation pattern
{kind}.{apiGroup}/{name}will produce incorrect output likeKind./namewhenapiGroupis empty (common for core Kubernetes resources). This is the same issue flagged in previous reviews.While line 378 correctly uses the
createApplicationRefColumnhelper for the table column, the factory details here use direct string concatenation. Consider creating a similar helper forparsedTextvalues or refactoring the display logic to handle emptyapiGroupcorrectly.Expected format:
- When apiGroup is present:
Kind.apiGroup/name- When apiGroup is empty:
Kind/nameThis affects all three reference fields: applicationRef (line 1532), storageRef (line 1536), and strategyRef (line 1540).
🧹 Nitpick comments (1)
internal/controller/dashboard/sidebar.go (1)
311-352: Consider updatingorderCategoryLabelsto include "Backups" for consistency.While the current implementation works (line 149 filters out "Backups" from dynamic categories), the
orderCategoryLabelsfunction should be updated to reflect the complete ordering, including "Backups":
Update line 318 fallback to include "Backups":
-return []string{"Marketplace", "IaaS", "PaaS", "NaaS", "Resources", "Administration"} +return []string{"Marketplace", "IaaS", "PaaS", "NaaS", "Resources", "Backups", "Administration"}Update line 322 tail to include "Backups":
-tail := []string{"Resources", "Administration"} +tail := []string{"Resources", "Backups", "Administration"}Update line 341 to exclude "Backups" from others:
-if k == "Resources" || k == "Administration" { +if k == "Resources" || k == "Backups" || k == "Administration" {Update the function comment (lines 312-313) to document "Backups" in the ordering.
This would make the ordering logic more robust and prevent potential issues if a CRD is defined with
category: "Backups"in the future.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
internal/controller/dashboard/sidebar.gointernal/controller/dashboard/static_helpers.gointernal/controller/dashboard/static_refactored.go
🚧 Files skipped from review as they are similar to previous changes (1)
- internal/controller/dashboard/static_helpers.go
🧰 Additional context used
📓 Path-based instructions (2)
internal/**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
Follow controller-runtime patterns and kubebuilder style for Go code in internal directory
Files:
internal/controller/dashboard/sidebar.gointernal/controller/dashboard/static_refactored.go
**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
Do NOT manually edit vendor/ directory or auto-generated files (zz_generated.*.go)
Files:
internal/controller/dashboard/sidebar.gointernal/controller/dashboard/static_refactored.go
🧬 Code graph analysis (1)
internal/controller/dashboard/static_refactored.go (1)
internal/controller/dashboard/unified_helpers.go (1)
UnifiedResourceConfig(211-219)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
🔇 Additional comments (6)
internal/controller/dashboard/static_refactored.go (1)
375-380: LGTM! Well-structured plan column override.The CustomColumnsOverride correctly uses the
createApplicationRefColumnhelper to display the application reference, avoiding string concatenation issues.internal/controller/dashboard/sidebar.go (5)
29-29: LGTM! Documentation updated correctly.The comment accurately reflects the new category ordering that includes the Backups section.
115-116: LGTM! Sidebar tags configured correctly.The keysAndTags entry for plans follows the established pattern for built-in resources.
129-149: LGTM! Skip logic correctly handles hardcoded sections.The condition properly excludes the hardcoded "Backups" section from dynamic category processing, consistent with "Marketplace" and "Administration" handling.
169-180: LGTM! Hardcoded Backups section structured correctly.The Backups menu section follows the established pattern and is correctly positioned between dynamic categories and Administration, as documented in the comments.
220-220: LGTM! Plan details sidebar correctly registered.The addition of "stock-project-factory-plan-details" to targetIDs ensures the plan details sidebar is created with the shared menu.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
♻️ Duplicate comments (1)
internal/controller/dashboard/README.md (1)
204-212: Fix the object reference rendering pattern to handle empty apiGroup.This example shows a hardcoded dot separator between kind and apiGroup. When
apiGroupis empty, this producesKind./nameinstead ofKind/name. As flagged in the previous review, this pattern should handle conditional rendering or use a formatter that omits the separator when apiGroup is absent. This applies toapplicationRef,storageRef, andstrategyRefpatterns throughout the codebase.💡 Suggested approach
Consider using a conditional formatter or custom component that only includes the dot separator when apiGroup is non-empty:
// Pseudocode example: // If apiGroup is present: Kind.apiGroup/name // If apiGroup is empty: Kind/name parsedText("application-ref-value", "{reqsJsonPath[0]['.spec.applicationRef.kind']['-']}{conditional-dot}{reqsJsonPath[0]['.spec.applicationRef.apiGroup']['-']}/{reqsJsonPath[0]['.spec.applicationRef.name']['-']}", nil),Alternatively, document the conditional handling required when implementing this pattern.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
internal/controller/dashboard/README.md
🧰 Additional context used
📓 Path-based instructions (1)
**/*.md
📄 CodeRabbit inference engine (AGENTS.md)
Git commits should follow
[component] Descriptionformat and include--signoffflag
Files:
internal/controller/dashboard/README.md
🪛 markdownlint-cli2 (0.18.1)
internal/controller/dashboard/README.md
284-284: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
352-352: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
## What this PR does Add representation for backup Plans in the dashboard and a readme describing, how to add further resources to the dashboard. ### Release note ```release-note [backups,dashboard] Add backup Plans to the dashboard. ``` Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Moved README describing how to add new resources to the Cozystack dashboard to a separate commit to directly reference relevant code changes from the document. Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
78d8c19 to
297acd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @internal/controller/dashboard/README.md:
- Line 352: Replace the bare URL
"https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md"
with a markdown link, e.g. change that line to use link syntax like [Kubernetes
API
Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md)
so it no longer violates MD034.
- Line 284: The fenced code block in README.md is missing a language identifier
(MD040); update the opening fence from ``` to include a language such as text
(e.g., change ``` to ```text) for the block containing "Please add support for
the {ResourceKind} resource ({group}/{version}/{plural}) to the Cozystack
dashboard." so the markdown linter passes.
In @internal/controller/dashboard/static_refactored.go:
- Around line 1671-1681: The parsedText expressions for application-ref-value
and storage-ref-value currently always insert a dot before the name even when
apiGroup is empty, producing outputs like "Kind./name"; update those parsedText
expressions to build the label as kind + (apiGroup ? '.' + apiGroup : '') + '/'
+ name so the dot is only present when apiGroup is non-empty; also update
strategy-ref-value to follow the same pattern (include kind and apiGroup parts
with the same conditional dot) so its output is consistent with
application/storage refs; locate and modify the parsedText entries with IDs
"application-ref-value", "storage-ref-value", and "strategy-ref-value".
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
internal/controller/dashboard/README.mdinternal/controller/dashboard/sidebar.gointernal/controller/dashboard/static_helpers.gointernal/controller/dashboard/static_refactored.go
🚧 Files skipped from review as they are similar to previous changes (1)
- internal/controller/dashboard/static_helpers.go
🧰 Additional context used
📓 Path-based instructions (3)
**/*.md
📄 CodeRabbit inference engine (AGENTS.md)
Git commits should follow
[component] Descriptionformat and include--signoffflag
Files:
internal/controller/dashboard/README.md
internal/**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
Follow controller-runtime patterns and kubebuilder style for Go code in internal directory
Files:
internal/controller/dashboard/sidebar.gointernal/controller/dashboard/static_refactored.go
**/*.go
📄 CodeRabbit inference engine (AGENTS.md)
Do NOT manually edit vendor/ directory or auto-generated files (zz_generated.*.go)
Files:
internal/controller/dashboard/sidebar.gointernal/controller/dashboard/static_refactored.go
🧬 Code graph analysis (1)
internal/controller/dashboard/static_refactored.go (1)
internal/controller/dashboard/unified_helpers.go (1)
UnifiedResourceConfig(211-219)
🪛 markdownlint-cli2 (0.18.1)
internal/controller/dashboard/README.md
284-284: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
352-352: Bare URL used
(MD034, no-bare-urls)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build
🔇 Additional comments (10)
internal/controller/dashboard/README.md (2)
1-198: Comprehensive integration guide with clear structure.The documentation provides excellent step-by-step guidance for integrating new resources into the dashboard. The structure (Overview → Prerequisites → Steps → Verification) is logical, and the helper function references align well with the codebase.
209-211: Address the reference formatting issue when apiGroup is empty.The example concatenation pattern will produce
Kind./namewhenapiGroupis empty. This issue affects the actual implementation instatic_refactored.goat lines 1549, 1553, 1557, 1673, 1677, 1857, 1861, 1865 and should be corrected across both the documentation and code.Likely an incorrect or invalid review comment.
internal/controller/dashboard/sidebar.go (4)
29-29: Category ordering correctly updated.The Backups section is properly positioned between Resources and Administration in both the documentation comment and the implementation logic.
Also applies to: 135-135
115-122: Sidebar tags correctly configured.The keysAndTags entries for backup resources follow the established naming convention and align with the factory sidebarTags in
static_refactored.go.
155-155: Hardcoded Backups section properly implemented.The Backups section follows the established pattern for hardcoded sidebar sections, with correct API group paths and proper alignment between child keys and keysAndTags entries.
Also applies to: 175-196
236-238: Factory sidebar IDs correctly added.The detail sidebar IDs follow the naming convention and properly align with the factory keys defined in
static_refactored.go.internal/controller/dashboard/static_refactored.go (4)
375-397: CustomColumnsOverride entries properly configured.The column overrides for backup resources follow established patterns, correctly use the
createApplicationRefColumnhelper for consistency, and link to the appropriate factory detail pages.
1897-1899: Factory resources properly added.The three backup-related factories are correctly wired into the return list with keys that align with the sidebar configuration and column override hrefs.
1547-1558: Reference formatting issue in Plan detail view.The manual concatenation of references (applicationRef, storageRef, strategyRef) at lines 1549, 1553, and 1557 will produce
Kind./namewhenapiGroupis empty (e.g., for core Kubernetes resources). This is inconsistent with the CustomColumnsOverride at line 378 which correctly uses thecreateApplicationRefColumnhelper.Consider creating a detail view helper for reference formatting or using conditional rendering to handle empty apiGroup values.
Likely an incorrect or invalid review comment.
1855-1865: Reference formatting issue in Backup detail view.Lines 1857, 1861, and 1865 use the same problematic concatenation pattern, producing
Kind./namewhenapiGroupis empty. All three backup-related detail factories (plan, backupjob, backup) should be refactored to use a consistent helper approach.Likely an incorrect or invalid review comment.
|
|
||
| Use this template when asking an AI agent to add a new resource to the dashboard: | ||
|
|
||
| ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add language identifier to fenced code block.
The code block is missing a language identifier, violating markdown linting standard MD040.
🔎 Fix
-```
+```text
Please add support for the {ResourceKind} resource ({group}/{version}/{plural}) to the Cozystack dashboard.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ``` |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
284-284: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In @internal/controller/dashboard/README.md at line 284, The fenced code block
in README.md is missing a language identifier (MD040); update the opening fence
from ``` to include a language such as text (e.g., change ``` to ```text) for
the block containing "Please add support for the {ResourceKind} resource
({group}/{version}/{plural}) to the Cozystack dashboard." so the markdown linter
passes.
|
|
||
| ## Additional Resources | ||
|
|
||
| - Kubernetes API Conventions: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap bare URL in markdown link syntax.
The URL violates markdown linting standard MD034 by not being wrapped in link syntax.
🔎 Fix
-- Kubernetes API Conventions: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md
+- [Kubernetes API Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Kubernetes API Conventions: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md | |
| - [Kubernetes API Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md) |
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
352-352: Bare URL used
(MD034, no-bare-urls)
🤖 Prompt for AI Agents
In @internal/controller/dashboard/README.md at line 352, Replace the bare URL
"https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md"
with a markdown link, e.g. change that line to use link syntax like [Kubernetes
API
Conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md)
so it no longer violates MD034.
| antdFlexVertical("spec-application-ref-block", 4, []any{ | ||
| antdText("application-ref-label", true, "Application", nil), | ||
| parsedText("application-ref-value", "{reqsJsonPath[0]['.spec.applicationRef.kind']['-']}.{reqsJsonPath[0]['.spec.applicationRef.apiGroup']['-']}/{reqsJsonPath[0]['.spec.applicationRef.name']['-']}", nil), | ||
| }), | ||
| antdFlexVertical("spec-storage-ref-block", 4, []any{ | ||
| antdText("storage-ref-label", true, "Storage", nil), | ||
| parsedText("storage-ref-value", "{reqsJsonPath[0]['.spec.storageRef.kind']['-']}.{reqsJsonPath[0]['.spec.storageRef.apiGroup']['-']}/{reqsJsonPath[0]['.spec.storageRef.name']['-']}", nil), | ||
| }), | ||
| antdFlexVertical("spec-strategy-ref-block", 4, []any{ | ||
| antdText("strategy-ref-label", true, "Strategy", nil), | ||
| parsedText("strategy-ref-value", "{reqsJsonPath[0]['.spec.strategyRef.name']['-']}", nil), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reference formatting issue in BackupJob detail view.
Lines 1673 and 1677 have the same concatenation issue as Plan details, producing Kind./name when apiGroup is empty. Additionally, line 1681 (strategyRef) inconsistently omits the apiGroup/kind pattern entirely, showing only the name.
🤖 Prompt for AI Agents
In @internal/controller/dashboard/static_refactored.go around lines 1671 - 1681,
The parsedText expressions for application-ref-value and storage-ref-value
currently always insert a dot before the name even when apiGroup is empty,
producing outputs like "Kind./name"; update those parsedText expressions to
build the label as kind + (apiGroup ? '.' + apiGroup : '') + '/' + name so the
dot is only present when apiGroup is non-empty; also update strategy-ref-value
to follow the same pattern (include kind and apiGroup parts with the same
conditional dot) so its output is consistent with application/storage refs;
locate and modify the parsedText entries with IDs "application-ref-value",
"storage-ref-value", and "strategy-ref-value".
kvaps
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
## What this PR does Add representation for backup Plans, BackupJobs and Backups in the dashboard and a readme describing, how to add further resources to the dashboard. ### Release note ```release-note [backups,dashboard] Add backup Plans, BackupJobs, and Backups to the dashboard. ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a Backups section in the dashboard navigation with Plans, BackupJobs, and Backups. * Added detailed views for Plan, BackupJob, and Backup showing metadata, references, status, timings, and artifacts. * Enhanced list views with custom columns (application refs, phase/status, created/taken timestamps). * **Documentation** * Added a Dashboard integration guide documenting how to add resources, list/detail wiring, and verification steps. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai --> (cherry picked from commit 67c5265) Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
…d backup system (#1867) ## What this PR does Update changelog for v1.0.0-alpha.1 to include missing features: - **Cozystack Operator**: New operator for Package and PackageSource management (#1740, #1741, #1755, #1756, #1760, #1761) - **Backup System**: Comprehensive backup functionality with Velero integration (#1640, #1685, #1687, #1708, #1719, #1720, #1737, #1762) - Add @androndo to contributors - Update Full Changelog link to v0.38.0...v1.0.0-alpha.1 ### Release note ```release-note [docs] Update changelog for v1.0.0-alpha.1: add cozystack-operator and backup system ```
What this PR does
Add representation for backup Plans in the dashboard and a readme describing, how to add further resources to the dashboard.
Release note
Summary by CodeRabbit
New Features
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.