Merge remote-tracking branch 'origin/master' into feature/usb-aio-workflow
# Conflicts: # README.md # inventory/test_specification_migration.py
This commit is contained in:
@@ -153,6 +153,13 @@ class NumberSequence(models.Model):
|
||||
|
||||
|
||||
HARDWARE_DEFAULTS = {
|
||||
"camera": "UNKNOWN",
|
||||
"sound": "UNKNOWN",
|
||||
"hdmi": "UNKNOWN",
|
||||
"vga": "UNKNOWN",
|
||||
"dvi": "UNKNOWN",
|
||||
"displayport": "UNKNOWN",
|
||||
"aspect_ratio": "",
|
||||
"battery": "UNKNOWN", "wifi": "UNKNOWN", "lan": "UNKNOWN",
|
||||
"display_inches": None, "ram_gb": None, "ssd_gb": None, "hdd_gb": None,
|
||||
"cpu": "", "hwid": "", "ports": "", "resolution": "",
|
||||
@@ -216,6 +223,13 @@ class Device(TimeStampedModel):
|
||||
cpu = HardwareValue("cpu")
|
||||
hwid = HardwareValue("hwid")
|
||||
ports = HardwareValue("ports")
|
||||
camera = HardwareValue("camera")
|
||||
sound = HardwareValue("sound")
|
||||
hdmi = HardwareValue("hdmi")
|
||||
vga = HardwareValue("vga")
|
||||
dvi = HardwareValue("dvi")
|
||||
displayport = HardwareValue("displayport")
|
||||
aspect_ratio = HardwareValue("aspect_ratio")
|
||||
resolution = HardwareValue("resolution")
|
||||
print_technology = HardwareValue("print_technology")
|
||||
duplex = HardwareValue("duplex")
|
||||
@@ -358,10 +372,12 @@ class ComputerCore(models.Model):
|
||||
|
||||
|
||||
class LaptopSpecification(ComputerCore):
|
||||
hardware_field_names = ("cpu", "hwid", "ram_gb", "ssd_gb", "hdd_gb", "display_inches", "battery", "wifi", "lan", "ports")
|
||||
hardware_field_names = ("cpu", "hwid", "ram_gb", "ssd_gb", "hdd_gb", "display_inches", "battery", "wifi", "lan", "ports", "camera", "sound")
|
||||
device = models.OneToOneField(Device, on_delete=models.CASCADE, related_name="laptop_specification", primary_key=True)
|
||||
display_inches = models.DecimalField(max_digits=4, decimal_places=1, null=True, blank=True)
|
||||
battery = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
camera = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
sound = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
|
||||
|
||||
class DesktopSpecification(ComputerCore):
|
||||
@@ -370,17 +386,24 @@ class DesktopSpecification(ComputerCore):
|
||||
|
||||
|
||||
class AllInOneSpecification(ComputerCore):
|
||||
hardware_field_names = ("cpu", "hwid", "ram_gb", "ssd_gb", "hdd_gb", "display_inches", "wifi", "lan", "ports")
|
||||
hardware_field_names = ("cpu", "hwid", "ram_gb", "ssd_gb", "hdd_gb", "display_inches", "wifi", "lan", "ports", "camera", "sound")
|
||||
device = models.OneToOneField(Device, on_delete=models.CASCADE, related_name="aio_specification", primary_key=True)
|
||||
display_inches = models.DecimalField(max_digits=4, decimal_places=1, null=True, blank=True)
|
||||
camera = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
sound = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
|
||||
|
||||
class MonitorSpecification(models.Model):
|
||||
hardware_field_names = ("display_inches", "resolution", "ports")
|
||||
hardware_field_names = ("display_inches", "resolution", "ports", "hdmi", "vga", "dvi", "displayport", "aspect_ratio")
|
||||
device = models.OneToOneField(Device, on_delete=models.CASCADE, related_name="monitor_specification", primary_key=True)
|
||||
display_inches = models.DecimalField(max_digits=4, decimal_places=1, null=True, blank=True)
|
||||
resolution = models.CharField(max_length=80, blank=True)
|
||||
ports = models.CharField(max_length=255, blank=True)
|
||||
hdmi = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
vga = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
dvi = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
displayport = models.CharField(max_length=10, choices=Device.TriState.choices, default=Device.TriState.UNKNOWN)
|
||||
aspect_ratio = models.CharField(max_length=20, blank=True)
|
||||
|
||||
|
||||
class PrinterSpecification(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user