Dashboard Extension
1. Overview
The Docker module extends the subscription dashboard with an Environments section, showing Portainer environment status and capacity using the OWL patch mechanism.
2. Environments Section
Displays all Portainer environments with their container counts and capacity.
Per Environment Card
- Environment Name - Display name
- Status Badge -
Normal(green) orOver Capacity(red) - Running Containers - Count with green badge
- Stopped Containers - Count with red badge (if any)
- Total Containers - Count with gray badge
- Capacity Bar - Visual progress bar showing running / max capacity
- Specs - CPU cores, RAM, and available slots
3. Technical Implementation
The dashboard extension uses OWL patch to add environments data without modifying the base subscription dashboard code.
- JS: Patches
SubscriptionDashboardComponentto addloadEnvironmentsData()method - XML: Template inheritance using xpath to inject the environments section after the charts row
- API: Fetches data from
/sadeem/dashboard/environmentsendpoint
Graceful Degradation
If the Docker module is not installed, the environments section simply doesn't appear. The dashboard works independently of the Docker module.