mirror of
https://github.com/RunLit/Bambu-Run.git
synced 2026-06-24 23:00:20 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c7d6b8dba | ||
|
|
0a1da46d1f |
@@ -22,19 +22,20 @@ RUN pip install --no-cache-dir bambu-lab-cloud-api --no-deps && \
|
|||||||
(d / 'INSTALLER').write_text('pip\n'); \
|
(d / 'INSTALLER').write_text('pip\n'); \
|
||||||
(d / 'RECORD').write_text('')"
|
(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 .
|
COPY pyproject.toml .
|
||||||
RUN pip install --no-cache-dir ".[standalone,mcp]"
|
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 . .
|
COPY . .
|
||||||
|
RUN pip install --no-cache-dir --no-deps .
|
||||||
|
|
||||||
# Create data directory for SQLite
|
# Create data directory for SQLite
|
||||||
RUN mkdir -p /app/data
|
RUN mkdir -p /app/data
|
||||||
|
|
||||||
# Collect static files
|
# Collect static files from the locally installed package
|
||||||
ENV DJANGO_SETTINGS_MODULE=standalone.settings
|
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
|
# Supervisor config to run both web and collector
|
||||||
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|||||||
@@ -175,10 +175,22 @@ class PrinterDashboardView(LoginRequiredMixin, TemplateView):
|
|||||||
# Group trays by physical AMS unit for the panel-style dashboard layout —
|
# 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),
|
# 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.
|
# 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 = {
|
units_meta = {
|
||||||
u.get('unit_id'): u for u in (latest_metric.ams_units or [])
|
u.get('unit_id'): u for u in (latest_metric.ams_units or [])
|
||||||
}
|
}
|
||||||
ams_groups = []
|
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()):
|
for uid, label in sorted(seen_units.items()):
|
||||||
unit_meta = units_meta.get(str(uid), {})
|
unit_meta = units_meta.get(str(uid), {})
|
||||||
ams_groups.append({
|
ams_groups.append({
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "bambu-run"
|
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"
|
description = "Django reusable app for Bambu Lab 3D printer monitoring and filament inventory management"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = {text = "MIT"}
|
license = {text = "MIT"}
|
||||||
|
|||||||
Reference in New Issue
Block a user