2 Commits
v0.1.8 ... main

3 changed files with 18 additions and 5 deletions

View File

@@ -22,19 +22,20 @@ RUN pip install --no-cache-dir bambu-lab-cloud-api --no-deps && \
(d / 'INSTALLER').write_text('pip\n'); \
(d / 'RECORD').write_text('')"
# Install project and remaining dependencies (pip sees opencv-python already satisfied)
# Install standalone dependencies first — cached unless pyproject.toml changes
COPY pyproject.toml .
RUN pip install --no-cache-dir ".[standalone,mcp]"
# Copy application code
# Copy full source and install the local package (no-deps: already installed above)
COPY . .
RUN pip install --no-cache-dir --no-deps .
# Create data directory for SQLite
RUN mkdir -p /app/data
# Collect static files
# Collect static files from the locally installed package
ENV DJANGO_SETTINGS_MODULE=standalone.settings
RUN python standalone/manage.py collectstatic --noinput 2>/dev/null || true
RUN python standalone/manage.py collectstatic --noinput
# Supervisor config to run both web and collector
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

View File

@@ -175,10 +175,22 @@ class PrinterDashboardView(LoginRequiredMixin, TemplateView):
# Group trays by physical AMS unit for the panel-style dashboard layout —
# one tinted panel per unit, full-width for multi-slot units (AMS/AMS 2 Pro),
# compact for single-slot units (AMS HT) so several can flow side-by-side.
# Filaments with ams_unit_id=None (pre-multi-AMS rows) fall into a single
# unlabelled group so they still render rather than being silently dropped.
units_meta = {
u.get('unit_id'): u for u in (latest_metric.ams_units or [])
}
ams_groups = []
ungrouped = [f for f in filaments_list if f.get('ams_unit_id') is None]
if ungrouped:
ams_groups.append({
'unit_id': None,
'ams_type': '',
'label': 'AMS',
'humidity': None,
'temp': None,
'filaments': ungrouped,
})
for uid, label in sorted(seen_units.items()):
unit_meta = units_meta.get(str(uid), {})
ams_groups.append({

View File

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "bambu-run"
version = "0.1.8"
version = "0.1.9"
description = "Django reusable app for Bambu Lab 3D printer monitoring and filament inventory management"
readme = "README.md"
license = {text = "MIT"}