An open API service indexing awesome lists of open source software.

https://github.com/myui/fairque-dashboard

Dashboard for monitoring and managing FairQueue task processing system.
https://github.com/myui/fairque-dashboard

dashboard fairque frontend job-queue job-scheduler python task-manager task-queue task-scheduler

Last synced: about 1 year ago
JSON representation

Dashboard for monitoring and managing FairQueue task processing system.

Awesome Lists containing this project

README

          

# FairQueue Dashboard

A comprehensive web-based dashboard for monitoring and managing FairQueue task processing system.

## Features

- **Worker Management**: Monitor worker status, start/stop workers, view performance metrics
- **Queue Management**: View queue statistics, manage queue operations
- **Task Management**: Advanced task filtering, state management, retry operations
- **Pipeline Visualization**: Simple flow visualization for task pipelines
- **XCom Data Management**: View and manage task data exchange
- **Real-time Metrics**: Live dashboard with system health indicators

## Architecture

- **Backend**: FastAPI with async Redis integration
- **Frontend**: React with TypeScript and Material-UI
- **Database**: Redis for both FairQueue data and dashboard state
- **Real-time Updates**: WebSocket connections for live metrics

## Development Setup

### Prerequisites

- Python 3.11+
- Node.js 18+
- Redis server
- Docker & Docker Compose (optional)

### Local Development

1. **Backend Setup**
```bash
cd backend
pip install uv
uv pip install -e .
uvicorn fairque_dashboard.main:app --reload --host 0.0.0.0 --port 8080
```

2. **Frontend Setup**
```bash
cd frontend
npm install
npm run dev
```

3. **Redis Setup**
```bash
# Install and start Redis locally
redis-server
```

### Docker Development

```bash
# Start all services
docker-compose up -d

# View logs
docker-compose logs -f

# Stop services
docker-compose down
```

## Configuration

### Backend Environment Variables

- `FAIRQUE_DASHBOARD_FAIRQUE_REDIS_URL`: Redis connection for FairQueue data
- `FAIRQUE_DASHBOARD_DEBUG`: Enable debug mode
- `FAIRQUE_DASHBOARD_HOST`: Server host (default: 0.0.0.0)
- `FAIRQUE_DASHBOARD_PORT`: Server port (default: 8080)

### Frontend Environment Variables

- `VITE_API_BASE_URL`: Backend API URL (default: http://localhost:8080/api/v1)

## API Endpoints

### Workers
- `GET /api/v1/workers` - List workers
- `GET /api/v1/workers/{worker_id}` - Get worker details
- `POST /api/v1/workers/{worker_id}/start` - Start worker
- `POST /api/v1/workers/{worker_id}/stop` - Stop worker
- `POST /api/v1/workers/{worker_id}/restart` - Restart worker

### Tasks
- `GET /api/v1/tasks` - List tasks with filtering
- `GET /api/v1/tasks/{task_id}` - Get task details
- `POST /api/v1/tasks/{task_id}/cancel` - Cancel task
- `POST /api/v1/tasks/{task_id}/retry` - Retry task
- `DELETE /api/v1/tasks/{task_id}` - Delete task

### Queues
- `GET /api/v1/queues` - List queues
- `GET /api/v1/queues/{queue_name}` - Get queue details
- `POST /api/v1/queues/{queue_name}/pause` - Pause queue
- `POST /api/v1/queues/{queue_name}/resume` - Resume queue
- `DELETE /api/v1/queues/{queue_name}` - Delete queue

### Metrics
- `GET /api/v1/metrics` - Get system metrics
- `GET /api/v1/metrics/workers` - Get worker metrics
- `GET /api/v1/metrics/queues` - Get queue metrics
- `GET /api/v1/metrics/tasks` - Get task metrics

### WebSocket
- `WS /api/v1/ws/metrics` - Real-time metrics updates
- `WS /api/v1/ws/tasks` - Real-time task updates

## Usage

1. **Dashboard**: Overview of system health and metrics
2. **Tasks**: Filter, search, and manage tasks
3. **Workers**: Monitor and control worker processes
4. **Queues**: View queue statistics and manage operations
5. **Pipelines**: Visualize task workflow execution
6. **XCom**: Manage task data exchange

## Development Guidelines

### Code Style
- Backend: Follow PEP 8, use type hints
- Frontend: Use TypeScript, functional components, Material-UI

### Testing
```bash
# Backend tests
cd backend
pytest

# Frontend tests
cd frontend
npm test
```

### Contributing

1. Follow the existing code style
2. Add tests for new features
3. Update documentation
4. Use descriptive commit messages

## License

MIT License