Add jobs count admin jobs vue
What does this MR do and why?
This is one step to refactor the jobs view for admins from haml to vue.
Previously, the job count, which is represents the amount jobs displayed in the table, was obtained from get_all_jobs.query.graphql
. However, I was requested to separate the job count from the job data and create a separate query for it.
In this MR I am :
- adding a
job count
queryget_all_jobs_count.query.graphql
- removing the
count
field fromget_all_jobs.query.graphql
- implementing the new query into
admin_jobs_table_app.vue
- handling graphql errors for the
job count
query - updating tests
- extending fixtures and mocks for tests to work
- refactoring
jobs.rb
fixture (Attention: This change has nothing to do with the MR itself, but I think it's appropriate to include the refactoring here)
I have oriented myself towards the implementation in job_table_app.vue
relevant issues for context are: #22626 (closed), #329224, and #262679 (closed).
Screenshots or screen recordings
How to set up and validate locally
- Make sure to enable FF
Feature.enable(:admin_jobs_vue)
- Go to
Admin > CI/CD > Jobs
- Play with filter and tabs
OR
- Run tests
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.