mirror of
https://github.com/RunLit/Bambu-Run.git
synced 2026-06-22 14:09:04 +01:00
Add Vortek hotend rack tracking: per-SN registry with slot mapping confirmed against live MQTT capture, plus a fallback for non-inductive nozzles (e.g. H2C's fixed left nozzle) shown read-only without fabricated identity. New dashboard card hides entirely on printers with no Vortek/nozzle-info data at all.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from .models import Printer, PrinterMetrics, Filament, FilamentType, FilamentSnapshot, PrintJob, FilamentUsage, BambuCloudTask
|
||||
from .models import Printer, PrinterMetrics, Filament, FilamentType, FilamentSnapshot, PrintJob, FilamentUsage, BambuCloudTask, Hotend, HotendSnapshot
|
||||
|
||||
|
||||
@admin.register(Printer)
|
||||
@@ -107,6 +107,21 @@ class FilamentUsageAdmin(admin.ModelAdmin):
|
||||
readonly_fields = ('consumed_percent', 'consumed_grams')
|
||||
|
||||
|
||||
@admin.register(Hotend)
|
||||
class HotendAdmin(admin.ModelAdmin):
|
||||
list_display = ('printer', 'serial_number', 'nozzle_type', 'is_toolhead', 'slot_number', 'used_time_seconds', 'wear_percent', 'last_seen_at')
|
||||
list_filter = ('printer', 'is_toolhead', 'nozzle_type')
|
||||
search_fields = ('serial_number',)
|
||||
readonly_fields = ('last_seen_at', 'created_at')
|
||||
|
||||
|
||||
@admin.register(HotendSnapshot)
|
||||
class HotendSnapshotAdmin(admin.ModelAdmin):
|
||||
list_display = ('printer_metric', 'hotend', 'raw_id', 'used_time_seconds', 'wear_percent', 'timestamp')
|
||||
list_filter = ('hotend',)
|
||||
readonly_fields = ('printer_metric', 'hotend', 'raw_id', 'used_time_seconds', 'wear_percent', 'stat', 'timestamp')
|
||||
|
||||
|
||||
@admin.register(BambuCloudTask)
|
||||
class BambuCloudTaskAdmin(admin.ModelAdmin):
|
||||
list_display = ('task_id', 'design_title', 'plate_title', 'device_serial', 'cloud_status', 'weight_grams', 'cloud_start_time', 'synced_at')
|
||||
|
||||
Reference in New Issue
Block a user