Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

TES Dashboard

[![license][badge-license]][badge-url-license] [![chat][badge-chat]][badge-url-chat]

A comprehensive, modern dashboard for monitoring and managing Task Execution Service (TES) instances and workflow execution across federated cloud infrastructures. Built as part of the [ELIXIR Cloud][res-elixir-cloud] ecosystem, this dashboard provides real-time insights into distributed computing resources and seamless task management capabilities.

✨ Features

πŸ” Service Monitoring

  • Real-time Service Status: Monitor health of TES gateway and all federated nodes
  • Network Topology Visualization: Interactive map showing TES instances across the ELIXIR federation
  • Performance Metrics: Response times, connectivity status, and service availability
  • Automated Health Checks: Continuous monitoring with configurable refresh intervals

πŸ“Š Task & Workflow Management

  • Task Submission: Submit and track computational tasks across the federation
  • Workflow Orchestration: Support for CWL, Nextflow, and Snakemake workflows
  • Batch Processing: Submit CWL, Nextflow, and Snakemake batch jobs
  • Real-time Task Tracking: Monitor task progress, logs, and execution status

πŸ›  Administrative Tools

  • Node Management: Add, remove, update, and test TES nodes in the federation
  • Instance Management: View and manage TES instances and their locations
  • Middleware Manager: Configure and monitor the middleware pipeline
  • Authentication System: Secure admin access with session-based permissions

🎨 Modern User Experience

  • Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
  • Interactive Components: Rich data visualizations and intuitive navigation
  • Real-time Updates: Live data refresh without page reloads

πŸš€ Quick Start

Prerequisites

  • Docker and Docker Compose (for containerised deployment)
  • Python 3.9+ (for local backend development)
  • Node.js 18+ and npm (for local frontend development)
  • Git for cloning the repository

🐳 Docker Deployment (Recommended)

Run both services with a single command:

# Build and start frontend + backend
docker compose up --build -d

# Follow logs
docker compose logs -f

# Stop services
docker compose down

This starts:

πŸ”§ Local Development Setup

Backend (Flask API)

cd backend
cp .env.example .env          # configure environment variables
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python app.py

The backend will be available at http://localhost:8000

Frontend (React App)

cd frontend
npm install
npm start

The frontend will be available at http://localhost:3000

πŸ“ Project Structure

tes-dashboard/
β”œβ”€β”€ README.md
β”œβ”€β”€ docker-compose.yml                   # Single-command deployment
β”œβ”€β”€ backend/                             # Flask Backend API
β”‚   β”œβ”€β”€ app.py                           # Application entry point & blueprint registration
β”‚   β”œβ”€β”€ config.py                        # Configuration (env vars, CORS, paths)
β”‚   β”œβ”€β”€ requirements.txt                 # Python dependencies
β”‚   β”œβ”€β”€ .env.example                     # Environment variable template
β”‚   β”œβ”€β”€ tes_instance_locations.json      # TES federation node geo-data
β”‚   β”œβ”€β”€ .tes_instances                   # Persisted TES instance list
β”‚   β”œβ”€β”€ Dockerfile                       # Development container image
β”‚   β”œβ”€β”€ Dockerfile.production            # Hardened production image
β”‚   β”œβ”€β”€ middleware_manager.py            # Middleware chain orchestration
β”‚   β”œβ”€β”€ middleware_config.py             # Middleware configuration & wiring
β”‚   β”œβ”€β”€ middleware_implementations.py    # Middleware implementations
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   └── middleware_api.py            # Middleware REST API blueprint
β”‚   β”œβ”€β”€ routes/                          # Flask blueprints (one per domain)
β”‚   β”‚   β”œβ”€β”€ health.py                    # GET /api/health
β”‚   β”‚   β”œβ”€β”€ dashboard.py                 # GET /api/dashboard_data
β”‚   β”‚   β”œβ”€β”€ instances.py                 # /api/instances, /api/tes_locations, /api/service_info
β”‚   β”‚   β”œβ”€β”€ nodes.py                     # /api/nodes CRUD, /api/service_status
β”‚   β”‚   β”œβ”€β”€ tasks.py                     # /api/tasks, /api/submit_task
β”‚   β”‚   β”œβ”€β”€ workflows.py                 # /api/workflows, /api/submit_workflow
β”‚   β”‚   β”œβ”€β”€ batch.py                     # /api/batch_runs, /api/batch_cwl|nextflow|snakemake
β”‚   β”‚   β”œβ”€β”€ logs.py                      # /api/task_log, /api/workflow_log, /api/batch_log
β”‚   β”‚   └── network.py                   # /api/network_topology, /api/network_metrics
β”‚   β”œβ”€β”€ services/                        # Business logic layer
β”‚   β”‚   β”œβ”€β”€ tes_service.py               # TES API interactions
β”‚   β”‚   β”œβ”€β”€ task_service.py              # Task operations & auto-updater
β”‚   β”‚   β”œβ”€β”€ workflow_service.py          # Workflow orchestration
β”‚   β”‚   └── batch_service.py             # Batch job processing
β”‚   └── utils/
β”‚       β”œβ”€β”€ tes_utils.py                 # TES utility functions
β”‚       β”œβ”€β”€ file_utils.py                # File handling helpers
β”‚       └── auth_utils.py               # Authentication helpers
β”œβ”€β”€ frontend/                            # React Frontend Application
β”‚   β”œβ”€β”€ package.json                     # Node.js dependencies
β”‚   β”œβ”€β”€ nginx.conf                       # Nginx config (proxies /api β†’ backend)
β”‚   β”œβ”€β”€ server.js                        # Express server for k8s deployments
β”‚   β”œβ”€β”€ Dockerfile                       # Development container image
β”‚   β”œβ”€β”€ Dockerfile.production            # Hardened production image
β”‚   β”œβ”€β”€ public/                          # Static assets (index.html, icons, manifest)
β”‚   └── src/
β”‚       β”œβ”€β”€ App.js                       # Router & top-level layout
β”‚       β”œβ”€β”€ components/
β”‚       β”‚   β”œβ”€β”€ MiddlewareManager.js     # Middleware manager component
β”‚       β”‚   β”œβ”€β”€ auth/
β”‚       β”‚   β”‚   β”œβ”€β”€ AdminLogin.js        # Admin login form
β”‚       β”‚   β”‚   └── ProtectedRoute.js    # Route guard for admin pages
β”‚       β”‚   └── common/
β”‚       β”‚       β”œβ”€β”€ Header.js            # Top navigation bar
β”‚       β”‚       β”œβ”€β”€ Sidebar.js           # Side navigation
β”‚       β”‚       β”œβ”€β”€ ServiceStatus.js     # Service status widget
β”‚       β”‚       β”œβ”€β”€ ServiceStatusIndicator.js
β”‚       β”‚       β”œβ”€β”€ LoadingSpinner.js
β”‚       β”‚       └── ErrorMessage.js
β”‚       β”œβ”€β”€ contexts/
β”‚       β”‚   └── AuthContext.js           # Global auth state
β”‚       β”œβ”€β”€ hooks/
β”‚       β”‚   β”œβ”€β”€ useInstances.js          # TES instance data hook
β”‚       β”‚   └── usePolling.js            # Generic polling hook
β”‚       β”œβ”€β”€ pages/
β”‚       β”‚   β”œβ”€β”€ Dashboard.js             # Main overview dashboard
β”‚       β”‚   β”œβ”€β”€ Tasks.js                 # Task list & management
β”‚       β”‚   β”œβ”€β”€ TaskDetails.js           # Individual task detail view
β”‚       β”‚   β”œβ”€β”€ SubmitTask.js            # Task submission form
β”‚       β”‚   β”œβ”€β”€ Workflows.js             # Workflow list & submission
β”‚       β”‚   β”œβ”€β”€ BatchProcessing.js       # Batch job submission
β”‚       β”‚   β”œβ”€β”€ BatchRuns.js             # Batch run history
β”‚       β”‚   β”œβ”€β”€ Logs.js                  # Task / workflow / batch log viewer
β”‚       β”‚   β”œβ”€β”€ NetworkTopology.js       # Network topology visualisation
β”‚       β”‚   β”œβ”€β”€ NetworkTopologyPage.tsx  # Network topology page wrapper
β”‚       β”‚   β”œβ”€β”€ RealTimeNetworkTopology.tsx # Live network topology
β”‚       β”‚   β”œβ”€β”€ NodeManagement.js        # Admin: manage TES nodes
β”‚       β”‚   β”œβ”€β”€ InstanceManagement.js    # TES instance management
β”‚       β”‚   β”œβ”€β”€ MiddlewareManager.js     # Middleware configuration page
β”‚       β”‚   β”œβ”€β”€ ServiceInfo.js           # TES service info viewer
β”‚       β”‚   β”œβ”€β”€ SystemStatus.js          # System-wide status overview
β”‚       β”‚   β”œβ”€β”€ Utilities.js             # Service health & utilities
β”‚       β”‚   β”œβ”€β”€ Settings.js              # Application settings
β”‚       β”‚   └── ApiTest.js              # API connectivity tester
β”‚       β”œβ”€β”€ services/                    # API client layer
β”‚       β”‚   β”œβ”€β”€ api.js                   # Axios instance & base URL config
β”‚       β”‚   β”œβ”€β”€ taskService.js           # Task API calls
β”‚       β”‚   β”œβ”€β”€ workflowService.js       # Workflow API calls
β”‚       β”‚   β”œβ”€β”€ batchService.js          # Batch API calls
β”‚       β”‚   β”œβ”€β”€ instanceService.js       # Instance API calls
β”‚       β”‚   β”œβ”€β”€ logService.js            # Log API calls
β”‚       β”‚   β”œβ”€β”€ serviceInfoService.js    # TES service info calls
β”‚       β”‚   β”œβ”€β”€ serviceService.js        # General service calls
β”‚       β”‚   β”œβ”€β”€ serviceStatusService.js  # Service status polling
β”‚       β”‚   β”œβ”€β”€ statusService.js         # System status calls
β”‚       β”‚   └── mapService.js            # Map/geo data service
β”‚       β”œβ”€β”€ styles/
β”‚       β”‚   └── MiddlewareManager.css
β”‚       └── utils/
β”‚           β”œβ”€β”€ constants.js             # App-wide constants
β”‚           β”œβ”€β”€ formatters.js            # Data formatting helpers
β”‚           β”œβ”€β”€ helpers.js               # General helper functions
β”‚           └── validators.js            # Input validation
└── test-data/                           # Sample payloads for manual testing
    β”œβ”€β”€ config.json
    β”œβ”€β”€ sample-data.csv
    β”œβ”€β”€ sample-input.txt
    β”œβ”€β”€ tasks/                           # Example TES task JSON payloads
    β”‚   β”œβ”€β”€ hello-world-task.json
    β”‚   β”œβ”€β”€ data-processing-task.json
    β”‚   β”œβ”€β”€ bioinformatics-analysis.json
    β”‚   └── gpu-ml-training.json
    β”œβ”€β”€ batch-processing/                # Example batch submission payloads
    β”‚   β”œβ”€β”€ hello-world-batch.json
    β”‚   β”œβ”€β”€ data-analysis-batch.json
    β”‚   β”œβ”€β”€ genomics-pipeline-batch.json
    β”‚   └── ml-hyperparameter-batch.json
    └── workflows/                       # Example workflow definitions
        β”œβ”€β”€ hello-world.cwl
        β”œβ”€β”€ data-processing.cwl
        β”œβ”€β”€ hello-world.nf
        β”œβ”€β”€ rna-seq-analysis.nf
        β”œβ”€β”€ Snakefile
        β”œβ”€β”€ bioinformatics-pipeline.smk
        └── config.yaml

βš™οΈ Configuration

Backend

Copy .env.example to .env in the backend/ directory and fill in your values:

SECRET_KEY=your-secret-key-here
FLASK_ENV=development

# TES gateway credentials (optional)
FUNNEL_SERVER_USER=
FUNNEL_SERVER_PASSWORD=
TES_TOKEN=
TES_GATEWAY=

TES Federation Nodes

Add or edit nodes in backend/tes_instance_locations.json:

{
  "id": "my-tes-node",
  "name": "My TES Node",
  "url": "https://my-tes-node.example.com",
  "country": "My Country",
  "lat": 40.7128,
  "lng": -74.0060,
  "status": "healthy",
  "description": "My TES instance description"
}

πŸ”Œ API Reference

Health

GET  /api/health                          # Backend health check

Dashboard & Instances

GET  /api/dashboard_data                  # Aggregated dashboard data
GET  /api/instances                       # All TES instances
GET  /api/tes_locations                   # Instance geo-locations
GET  /api/healthy-instances               # Healthy instances only
GET  /api/service_info?tes_url=<url>      # Service info for a specific instance

Nodes

GET    /api/nodes                         # List nodes
POST   /api/nodes                         # Add a node
GET    /api/nodes/<id>                    # Get node details
PUT    /api/nodes/<id>                    # Update a node
DELETE /api/nodes/<id>                    # Remove a node
GET    /api/nodes/<id>/health             # Node health check
GET    /api/service_status                # All nodes service status
GET    /api/test_connection               # Test backend connectivity

Tasks

GET  /api/tasks                           # List tasks
POST /api/submit_task                     # Submit a new task
GET  /api/task_details?task_id=<id>&tes_url=<url>  # Task details
GET  /api/task_log/<task_id>              # Task logs

Workflows

GET  /api/workflows                       # List workflows
POST /api/submit_workflow                 # Submit a workflow (CWL/NF/Snakemake)
GET  /api/latest_workflow_status          # Latest workflow run status
GET  /api/workflow_log/<run_id>           # Workflow logs

Batch

GET  /api/batch_runs                      # Batch run history
POST /api/batch_cwl                       # Submit CWL batch
POST /api/batch_nextflow                  # Submit Nextflow batch
POST /api/batch_snakemake                 # Submit Snakemake batch
GET  /api/batch_log/<run_id>              # Batch run logs

Network

GET  /api/network_topology                # Full network topology
GET  /api/network_status                  # Network connectivity status
GET  /api/network_metrics                 # Aggregated network metrics
GET  /api/instance_metrics/<id>           # Per-instance metrics
GET  /api/data_transfers                  # Active data transfers
GET  /api/storage_locations               # Storage endpoint list

πŸ› Troubleshooting

TES instances not loading (Network Error)

  • When running via Docker Compose the frontend proxies /api requests through nginx to the backend container. Ensure REACT_APP_API_URL is left empty (the default) so the proxy is used.
  • Verify both containers are running: docker compose ps
  • Check backend logs: docker compose logs tes-dashboard-backend-service

Backend container not healthy

  • The health check calls GET /api/health. Confirm the backend started without import errors: docker compose logs tes-dashboard-backend-service

Admin login not working

  • Default credentials: tesadmin / admin@dashboard
  • Check browser console for CORS errors β€” the backend must be reachable from the origin used by the browser.

Frontend won't start locally

  • Requires Node.js 18+. Clear cached modules with rm -rf node_modules && npm install.

Backend won't start locally

  • Requires Python 3.9+. Activate the virtual environment before running python app.py.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to your branch: git push origin feature/amazing-feature
  5. Open a pull request

About

Task Execution Service Management

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages