diff --git a/src/main/java/be/seeseepuff/pcinv/models/CdDriveAsset.java b/src/main/java/be/seeseepuff/pcinv/models/CdDriveAsset.java new file mode 100644 index 0000000..b9d1208 --- /dev/null +++ b/src/main/java/be/seeseepuff/pcinv/models/CdDriveAsset.java @@ -0,0 +1,127 @@ +package be.seeseepuff.pcinv.models; + +import be.seeseepuff.pcinv.meta.*; +import jakarta.persistence.*; +import lombok.Getter; +import lombok.Setter; + +@Getter +@Setter +@Entity +@AssetInfo( + displayName = "CD Drive", + pluralName = "CD Drives", + type = "cd_drive" +) +@Table(name = "cd_drive_assets") +public class CdDriveAsset implements Asset +{ + @Id + @GeneratedValue + private long id; + + /// The generic asset associated with this RAM. + @OneToOne(orphanRemoval = true) + private GenericAsset asset; + + @Description("Indicates if the drive supports reading CD-ROM discs.") + @Property("CD-ROM Supported") + @HideInOverview + private Boolean supportsCdRom; + + @Description("Indicates if the drive supports reading CD-R discs.") + @Property("CD-R Supported") + @HideInOverview + private Boolean supportsCdR; + + @Description("Indicates if the drive supports writing CD-R discs.") + @Property("CD-R Writing Supported") + @HideInOverview + private Boolean supportsCdRwriting; + + @Description("Indicates if the drive supports reading CD-RW discs.") + @Property("CD-RW Supported") + @HideInOverview + private Boolean supportsCdRw; + + @Description("Indicates if the drive supports writing CD-RW discs.") + @Property("CD-RW Writing Supported") + @HideInOverview + private Boolean supportsCdRwwriting; + + @Description("Indicates if the drive supports reading DVD discs.") + @Property("DVD Supported") + @HideInOverview + private Boolean supportsDvd; + + @Description("Indicates if the drive supports reading DVD-R discs.") + @Property("DVD-R Supported") + @HideInOverview + private Boolean supportsDvdR; + + @Description("Indicates if the drive supports writing DVD-R discs.") + @Property("DVD-R Writing Supported") + @HideInOverview + private Boolean supportsDvdRwriting; + + @Description("Indicates if the drive supports reading DVD-RW discs.") + @Property("DVD-RW Supported") + @HideInOverview + private Boolean supportsDvdRw; + + @Description("Indicates if the drive supports writing DVD-RW discs.") + @Property("DVD-RW Writing Supported") + @HideInOverview + private Boolean supportsDvdRwwriting; + + @Description("Indicates if the drive supports reading DVD+R discs.") + @Property("DVD+R Supported") + @HideInOverview + private Boolean supportsDvdPlusR; + + @Description("Indicates if the drive supports writing DVD+R discs.") + @Property("DVD+R Writing Supported") + @HideInOverview + private Boolean supportsDvdPlusRwriting; + + @Description("Indicates if the drive supports reading DVD+RW discs.") + @Property("DVD+RW Supported") + @HideInOverview + private Boolean supportsDvdPlusRw; + + @Description("Indicates if the drive supports writing DVD+RW discs.") + @Property("DVD+RW Writing Supported") + @HideInOverview + private Boolean supportsDvdPlusRwwriting; + + @Description("Indicates if the drive supports reading DVD-RAM discs.") + @Property("DVD-RAM Supported") + @HideInOverview + private Boolean supportsDvdRam; + + @Description("Indicates if the drive supports reading Blu-ray discs.") + @Property("Blu-ray Supported") + @HideInOverview + private Boolean supportsBluRay; + + @Description("Indicates if the drive supports reading HD DVD discs.") + @Property("HD DVD Supported") + @HideInOverview + private Boolean supportsHdDvd; + + @Description("Indicates if the drive supports reading Ultra HD Blu-ray discs.") + @Property("Ultra HD Blu-ray Supported") + @HideInOverview + private Boolean supportsUltraHdBluRay; + + @Description("The type of interface used by the drive. E.g.: SATA, IDE, etc.") + @Property("Interface Type") + @HideInOverview + @InputList + private String interfaceType; + + @Description("The form factor of the CD drive. E.g.: 5.25\", 3.5\", etc.") + @Property("Form Factor") + @InputList + private String formFactor; +} diff --git a/src/main/java/be/seeseepuff/pcinv/repositories/CdDriveRepository.java b/src/main/java/be/seeseepuff/pcinv/repositories/CdDriveRepository.java new file mode 100644 index 0000000..8e4e48c --- /dev/null +++ b/src/main/java/be/seeseepuff/pcinv/repositories/CdDriveRepository.java @@ -0,0 +1,12 @@ +package be.seeseepuff.pcinv.repositories; + +import be.seeseepuff.pcinv.models.CdDriveAsset; +import org.springframework.data.jpa.repository.JpaRepository; + +@SuppressWarnings("unused") +public interface CdDriveRepository extends JpaRepository, AssetRepository { + @Override + default Class getAssetType() { + return CdDriveAsset.class; + } +} diff --git a/src/main/resources/templates/browse.html b/src/main/resources/templates/browse.html index 5e6f3a5..3345974 100644 --- a/src/main/resources/templates/browse.html +++ b/src/main/resources/templates/browse.html @@ -1,6 +1,6 @@
- View device details +

View device details

  • diff --git a/src/main/resources/templates/browse_type.html b/src/main/resources/templates/browse_type.html index 64373d9..8d2df4f 100644 --- a/src/main/resources/templates/browse_type.html +++ b/src/main/resources/templates/browse_type.html @@ -1,21 +1,24 @@
    - There are in the database. - - - - - - - - - -
    Actions
    - - - - View - Edit -
    +

    There are in the database.

    + + + + + + + + + +
    Actions
    + + + + View + Edit +
    +

    + Create a new +

    diff --git a/src/main/resources/templates/create_asset.html b/src/main/resources/templates/create_asset.html index 55ffa48..0ac1fce 100644 --- a/src/main/resources/templates/create_asset.html +++ b/src/main/resources/templates/create_asset.html @@ -1,6 +1,6 @@
    - Create a +

    Create a

    diff --git a/src/main/resources/templates/create_select.html b/src/main/resources/templates/create_select.html index d10491d..e23b6a9 100644 --- a/src/main/resources/templates/create_select.html +++ b/src/main/resources/templates/create_select.html @@ -1,6 +1,6 @@
    - Create a new device +

    Create a new device