Skip to content

fix: Add links and variables to job tables#253

Merged
adityachoudhari26 merged 1 commit intomainfrom
job-table-improvements
Dec 5, 2024
Merged

fix: Add links and variables to job tables#253
adityachoudhari26 merged 1 commit intomainfrom
job-table-improvements

Conversation

@adityachoudhari26
Copy link
Copy Markdown
Member

@adityachoudhari26 adityachoudhari26 commented Dec 5, 2024

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced new columns in the job table: "Resource," "Links," and "Variables."
    • Added JobLinksCell component for displaying job-related links with enhanced interactivity.
    • Introduced VariableCell component for displaying job variables with hover functionality.
  • Bug Fixes

    • Enhanced data retrieval for job triggers and runbooks to include job metadata and variables.
  • Documentation

    • Updated UI components to improve user experience and visual presentation of job data.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 5, 2024

Caution

Review failed

The pull request is closed.

Walkthrough

The changes in this pull request focus on enhancing the job table and related components in the web service application. Key modifications include the introduction of new columns in the job table for "Links" and "Variables," facilitated by the addition of JobLinksCell and VariableCell components. The TableRow component has been updated to replace the previous LinksCell with the new JobLinksCell. Additionally, the API layer has been enhanced with left joins to include job metadata and variables in the data responses, improving the overall data structure and retrieval process.

Changes

File Change Summary
apps/webservice/src/app/[workspaceSlug]/(app)/(job)/jobs/JobTable.tsx Updated job table to replace "Target" column with "Resource," added "Links" and "Variables" columns using JobLinksCell and VariableCell components. Adjusted rendering logic for job data accordingly.
apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployment-resource-drawer/TableRow.tsx Removed LinksCell, added JobLinksCell. Updated ReleaseJobTrigger type to include metadata for job links. Streamlined imports by removing unused components.
apps/webservice/src/app/[workspaceSlug]/(app)/_components/job-table/JobLinksCell.tsx Introduced JobLinksCell component to render job-related links, handling display logic based on the number of links.
apps/webservice/src/app/[workspaceSlug]/(app)/_components/job-table/VariableCell.tsx Added VariableCell component to display job variables with conditional rendering in a HoverCard.
apps/webservice/src/app/[workspaceSlug]/(app)/systems/[systemSlug]/runbooks/[runbookId]/page.tsx Removed VariableCell, added JobLinksCell to the RunbookPage component. Updated table to include "Links" column.
packages/api/src/router/job.ts Enhanced releaseJobTriggerRouter with new left joins in byWorkspaceId and byReleaseId procedures to include job metadata and variables in the response structure.
packages/api/src/router/release.ts Modified getItems function in releaseRouter to include a left join with jobMetadata, simplifying filtering logic and enhancing job trigger retrieval.
packages/api/src/router/runbook.ts Updated jobs procedure in runbookRouter to include a left join with jobMetadata, enhancing job variable handling and ensuring uniqueness in returned job data.

Possibly related PRs

Suggested reviewers

  • jsbroks

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 3a89101 and 0ee7c4b.

📒 Files selected for processing (8)
  • apps/webservice/src/app/[workspaceSlug]/(app)/(job)/jobs/JobTable.tsx (3 hunks)
  • apps/webservice/src/app/[workspaceSlug]/(app)/_components/deployment-resource-drawer/TableRow.tsx (3 hunks)
  • apps/webservice/src/app/[workspaceSlug]/(app)/_components/job-table/JobLinksCell.tsx (1 hunks)
  • apps/webservice/src/app/[workspaceSlug]/(app)/_components/job-table/VariableCell.tsx (1 hunks)
  • apps/webservice/src/app/[workspaceSlug]/(app)/systems/[systemSlug]/runbooks/[runbookId]/page.tsx (3 hunks)
  • packages/api/src/router/job.ts (2 hunks)
  • packages/api/src/router/release.ts (3 hunks)
  • packages/api/src/router/runbook.ts (2 hunks)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@adityachoudhari26 adityachoudhari26 merged commit b3fe2d4 into main Dec 5, 2024
@adityachoudhari26 adityachoudhari26 deleted the job-table-improvements branch December 5, 2024 00:26
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.

2 participants