From e027d84da4ae4e76394bd886ae65c7a527aaeb67 Mon Sep 17 00:00:00 2001 From: Accusys Date: Sun, 18 Oct 2026 20:15:01 +0800 Subject: [PATCH] docs: add Pause/Resume UI implementation guide for Studio team - API endpoint documentation (pause, resume, list paused) - Vue component examples for Pause/Resume buttons - Paused Jobs management page template - Navigation update suggestions - State flow diagram --- .../Pause_Resume_Job_UI_Guide_2026-10-18.md | 324 ++++++++++++++++++ 1 file changed, 324 insertions(+) create mode 100644 docs_v1.0/STUDIO_TEAM/Pause_Resume_Job_UI_Guide_2026-10-18.md diff --git a/docs_v1.0/STUDIO_TEAM/Pause_Resume_Job_UI_Guide_2026-10-18.md b/docs_v1.0/STUDIO_TEAM/Pause_Resume_Job_UI_Guide_2026-10-18.md new file mode 100644 index 00000000..c722426f --- /dev/null +++ b/docs_v1.0/STUDIO_TEAM/Pause_Resume_Job_UI_Guide_2026-10-18.md @@ -0,0 +1,324 @@ +# Pause/Resume Job Feature - UI Implementation Guide + +**Date**: 2026-10-18 +**From**: Core Team +**To**: Studio Team +**Priority**: Medium + +--- + +## Overview + +The Core team has implemented a Pause/Resume feature for job management. This allows users to pause stuck jobs so the worker can process other pending jobs. + +--- + +## New API Endpoints + +### 1. POST `/api/v1/jobs/:uuid/pause` + +**Purpose**: Pause a job so the worker skips it during polling. + +**Request**: +```http +POST /api/v1/jobs/7a1523df54e2161a54e4577d1835acfd/pause +X-API-Key: muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69 +``` + +**Response**: +```json +{ + "success": true, + "message": "Job 7a1523df54e2161a54e4577d1835acfd paused", + "uuid": "7a1523df54e2161a54e4577d1835acfd" +} +``` + +**Error Responses**: +- `404`: Job not found +- `400`: Cannot pause completed/failed job +- `500`: Internal server error + +--- + +### 2. POST `/api/v1/jobs/:uuid/resume` + +**Purpose**: Resume a paused job. + +**Request**: +```http +POST /api/v1/jobs/7a1523df54e2161a54e4577d1835acfd/resume +X-API-Key: muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69 +``` + +**Response**: +```json +{ + "success": true, + "message": "Job 7a1523df54e2161a54e4577d1835acfd resumed", + "uuid": "7a1523df54e2161a54e4577d1835acfd" +} +``` + +--- + +### 3. GET `/api/v1/jobs/paused` + +**Purpose**: List all paused jobs. + +**Request**: +```http +GET /api/v1/jobs/paused +X-API-Key: muser_68600856036340bcafc01930eb4bd839_1774418104_97221b69 +``` + +**Response**: +```json +{ + "jobs": [ + { + "uuid": "7a1523df54e2161a54e4577d1835acfd", + "file_name": "Accusys-WD_FilmRiot_test.mp4", + "status": "paused", + "paused_at": "2026-10-18T12:00:00Z" + } + ], + "total": 1 +} +``` + +--- + +## UI Implementation Recommendations + +### 1. Job List Page - Pause/Resume Buttons + +**Add action buttons to each job card**: + +```vue + + + + + + +``` + +--- + +### 2. Paused Jobs Management Page + +**Create a new page or tab for managing paused jobs**: + +```vue + + + + +``` + +--- + +### 3. Navigation Update + +**Add a link to the Paused Jobs page in the navigation**: + +```vue + + +``` + +--- + +## Files to Modify + +| File | Changes | +|------|---------| +| `src/api/jobs.ts` | Add pause/resume/listPaused methods | +| `src/components/JobCard.vue` | Add Pause/Resume buttons | +| `src/views/PausedJobsView.vue` | New component | +| `src/router/index.ts` | Add route for /jobs/paused | +| `src/stores/jobs.ts` | Add paused jobs state management | + +--- + +## State Flow + +``` +β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” POST /pause β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” +β”‚ Pending β”‚ ───────────────────▢ β”‚ Paused β”‚ +β”‚ Running β”‚ β”‚ β”‚ +β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ◀─────────────────── β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ + POST /resume +``` + +--- + +## Priority + +| Feature | Priority | Effort | +|---------|----------|--------| +| Pause/Resume buttons | πŸ”΄ High | Low | +| Paused Jobs list | 🟑 Medium | Medium | +| Navigation badge | 🟒 Low | Low | + +--- + +**Contact**: Core Team for API questions.