Repository navigation
feat: pause and resume job schedules from the job page - #1243
Merged
Merged
Conversation
Deploying edgewatch with
|
| Latest commit: |
4194543
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://9b1ebcc8.edgewatch-cpd.pages.dev |
| Branch Preview URL: | https://feat-job-pause-resume.edgewatch-cpd.pages.dev |
The job page has a Pause schedule / Resume schedule button that uses the existing pause and resume endpoints with the loaded revision, instead of requiring an edit and save of the whole job. It is disabled while the job's scan runs and hidden for archived jobs. The console now handles job.paused, job.resumed, the baseline events, job-silent, scan.cancellation_requested, scan.cycle_discarded and scanner-profile.changed with targeted query invalidation instead of refreshing every cached query in every open tab. Fixes #1232
crypt0rr
force-pushed
the
feat/job-pause-resume
branch
from
October 7, 2026 16:33
0aaeb91 to
4194543
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pause and resume from the job page (#1232)
POST /jobs/{id}/pauseandPOST /jobs/{id}/resumeendpoints with the loaded revision. Until now these were wrapped inapi.tsbut nothing in the console called them, so the only way to pause was Edit → "Schedule enabled" → Save, which also resubmits the whole form.job_active, and hidden for archived jobs. Errors such asjob_activeor a revision conflict appear in the page's alert, and a conflict reloads the job.Targeted live-update invalidation
invalidateQueries()with no arguments in every open tab of the unit:job.paused,job.resumedbaseline-approved,baseline-reset,baseline-complete,baseline-updated,baseline-stalledjob-silentscan.cancellation_requested,scan.cycle_discardedscanner-profile.changedDocs: the jobs guide describes pausing and resuming.
Compatibility
Console only; there are no API changes.
Validation
npm run lintnpm --prefix docs run buildNew tests:
JobDetail.actions.test.tsx:job_activemessage;main.test.tsx: each listed event triggers its targeted invalidation and no full refresh.Fixes #1232