Skip to content

feat: add job status filter #17202

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
Apr 4, 2025
Merged

Conversation

BrunoQuaresma
Copy link
Collaborator

Closes #17155

Demo:

Screen.Recording.2025-04-01.at.16.08.45.mov

@BrunoQuaresma BrunoQuaresma requested review from Copilot, a team and bcpeinhardt and removed request for a team April 1, 2025 19:09
Copy link
Contributor

@Copilot 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

This pull request adds a job status filter to the Organization Provisioner Jobs page, allowing users to filter jobs by their status. Key changes include the addition of a new status-select UI in the view component, updates in the API and query functions to handle filtering by status, and corresponding story adjustments to demonstrate the filtered state.

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
OrganizationProvisionerJobsPageView.tsx Added status filter UI using a Select component and introduced a mapping object for status indicators.
OrganizationProvisionerJobsPageView.stories.tsx Added a new story with state to simulate filtering behavior using the status filter.
OrganizationProvisionerJobsPage.tsx Integrated URL search parameters to drive filtering and updated query calls accordingly.
JobRow.tsx Included a conditional to render template name or a placeholder if undefined.
CancelJobConfirmationDialog.tsx Updated the query key call to match the new naming.
organizations.ts Renamed query key and updated the query function to handle job status filtering.
api.ts Modified the API method to accept an optional status parameter and build the query string appropriately.
Comments suppressed due to low confidence (2)

site/src/pages/OrganizationSettingsPage/OrganizationProvisionerJobsPage/OrganizationProvisionerJobsPageView.tsx:60

  • [nitpick] Consider updating the 'status' property type to 'ProvisionerJobStatus' for consistency with the rest of the filtering logic.
type JobProvisionersFilter = { status: string; };

site/src/pages/OrganizationSettingsPage/OrganizationProvisionerJobsPage/OrganizationProvisionerJobsPageView.stories.tsx:86

  • The variable 'MockProvisionerJobs' is referenced but not imported; please verify whether the correct mock data variable is used or update the import accordingly.
const filteredJobs = MockProvisionerJobs.filter((job) =>

@BrunoQuaresma BrunoQuaresma merged commit 3bfafe3 into main Apr 4, 2025
34 checks passed
@BrunoQuaresma BrunoQuaresma deleted the bq/add-provisioner-jobs-filter branch April 4, 2025 13:02
@github-actions github-actions bot locked and limited conversation to collaborators Apr 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpire all "Pending" jobs from provisioner jobs list
2 participants