From 6b3aa886b9db72881abb1f45fda7b28ab5c6ab03 Mon Sep 17 00:00:00 2001 From: Roy Date: Wed, 26 Apr 2023 20:37:40 +0300 Subject: Eureka downloads --- .../Controllers/DownloadsController.cs | 16 +++++++++++++++- .../Web/Tango.MachineService/Images/eureka.png | Bin 0 -> 142092 bytes .../Web/Tango.MachineService/Models/DownloadModel.cs | 1 + .../Tango.MachineService/Tango.MachineService.csproj | 3 ++- .../Tango.MachineService/Views/Downloads/Index.cshtml | 6 +++++- 5 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 Software/Visual_Studio/Web/Tango.MachineService/Images/eureka.png (limited to 'Software/Visual_Studio/Web/Tango.MachineService') diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs index 1be5b7bdf..a073bd0f9 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/DownloadsController.cs @@ -42,7 +42,7 @@ namespace Tango.MachineService.Controllers downloads.Add(download); } - foreach (var item in db.TangoVersions.Where(x => x.InstallerBlobName != null).Include(x => x.User).Include(x => x.User.Contact).ToList()) + foreach (var item in db.TangoVersions.Where(x => x.InstallerBlobName != null).Include(x => x.User).Include(x => x.User.Contact).Include(x => x.MachineVersion).Where(x => x.MachineVersion.Version == 1).ToList()) { DownloadModel download = new DownloadModel(); download.App = DownloadModel.DownloadApp.PPC; @@ -55,6 +55,20 @@ namespace Tango.MachineService.Controllers downloads.Add(download); } + + foreach (var item in db.TangoVersions.Where(x => x.InstallerBlobName != null).Include(x => x.User).Include(x => x.User.Contact).Include(x => x.MachineVersion).Where(x => x.MachineVersion.Version == 2).ToList()) + { + DownloadModel download = new DownloadModel(); + download.App = DownloadModel.DownloadApp.Eureka; + download.ID = item.InstallerBlobName; + download.Name = $"Eureka v{item.VersionAndTag}.exe"; + download.Version = item.Version; + download.User = item.User.Contact.FullName; + download.Date = item.LastUpdated; + download.Comments = item.Comments; + + downloads.Add(download); + } } downloads = downloads.OrderByDescending(x => x.Date).ToList(); diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Images/eureka.png b/Software/Visual_Studio/Web/Tango.MachineService/Images/eureka.png new file mode 100644 index 000000000..c03daaded Binary files /dev/null and b/Software/Visual_Studio/Web/Tango.MachineService/Images/eureka.png differ diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Models/DownloadModel.cs b/Software/Visual_Studio/Web/Tango.MachineService/Models/DownloadModel.cs index b13f5c66f..cfd2e02cd 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Models/DownloadModel.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Models/DownloadModel.cs @@ -19,6 +19,7 @@ namespace Tango.MachineService.Models { MachineStudio, PPC, + Eureka } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj b/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj index 2e05ad690..451706a19 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj +++ b/Software/Visual_Studio/Web/Tango.MachineService/Tango.MachineService.csproj @@ -343,6 +343,7 @@ + @@ -505,7 +506,7 @@ False - + diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Views/Downloads/Index.cshtml b/Software/Visual_Studio/Web/Tango.MachineService/Views/Downloads/Index.cshtml index 044daaaa2..3a1b8930b 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Views/Downloads/Index.cshtml +++ b/Software/Visual_Studio/Web/Tango.MachineService/Views/Downloads/Index.cshtml @@ -24,10 +24,14 @@ { } - else + else if (item.App == Tango.MachineService.Models.DownloadModel.DownloadApp.PPC) { } + else + { + + } @item.Name -- cgit v1.3.1